html, body {
  height: 100%;
}

:root {
  --select-chevron-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23d8e2ff' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --select-chevron-size: 10px 6px;
  --select-chevron-position: right 16px center;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg, #0b1021);
  color: var(--text, #eaf2ff);
  min-height: 100vh;
  overflow-x: hidden;
}

:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body:focus,
main:focus {
  outline: none;
}

.app-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  padding: 0;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

main > * {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-height: 36px;
  height: 36px;
  line-height: 1.2;
  font-size: 16px;
  font-family: inherit;
  padding: 0 44px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--input-border, rgba(255, 255, 255, 0));
  background: var(--input-bg, rgba(7, 12, 24, 0.72)) var(--select-chevron-icon) no-repeat var(--select-chevron-position) / var(--select-chevron-size);
  color: var(--input-text, var(--text, #eaf2ff));
  box-shadow: none !important;
}

select:not([multiple]):not([size]):hover {
  border-color: var(--input-border-hover, rgba(255, 255, 255, 0));
  background: var(--input-bg-hover, rgba(7, 12, 24, 0.78)) var(--select-chevron-icon) no-repeat var(--select-chevron-position) / var(--select-chevron-size);
}

select:not([multiple]):not([size]):focus,
select:not([multiple]):not([size]):focus-visible {
  outline: none;
  border-color: var(--input-border-focus, rgba(255, 255, 255, 0));
  background: var(--input-bg-focus, rgba(7, 12, 24, 0.84)) var(--select-chevron-icon) no-repeat var(--select-chevron-position) / var(--select-chevron-size);
  box-shadow: 0 0 0 2px var(--input-focus-ring, transparent) !important;
}

select:not([multiple]):not([size])::-ms-expand {
  display: none;
}

.not-found {
  padding: 32px;
}

.web-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.85));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 0;
  z-index: 50;
}

.web-top-nav .nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.web-top-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.web-top-nav .nav-actions--hidden {
  visibility: hidden;
}

.web-top-nav .brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text, #eaf2ff);
}

.web-top-nav .brand:focus-visible {
  outline: 2px solid rgba(91, 209, 215, 0.7);
  outline-offset: 4px;
}

.web-top-nav .links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.web-top-nav .nav-toggle {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--text, #eaf2ff);
  cursor: pointer;
  display: none;
}

.web-top-nav .nav-toggle:hover,
.web-top-nav .nav-toggle:focus-visible {
  border-color: rgba(91, 209, 215, 0.45);
  background: rgba(15, 23, 42, 0.8);
  outline: none;
}

.web-top-nav .nav-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
}

.web-top-nav .nav-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.web-top-nav .links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.web-top-nav .links .nav-link {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--text, #eaf2ff);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 84px;
}

.web-top-nav .links .nav-link:hover,
.web-top-nav .links .nav-link:focus-visible,
.web-top-nav .links .nav-link.active {
  border-color: rgba(91, 209, 215, 0.6);
  color: var(--text, #eaf2ff);
  background: rgba(91, 209, 215, 0.12);
  outline: none;
}

.web-top-nav .links .nav-link.icon-only {
  width: 44px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.web-top-nav .links .nav-link .nav-label {
  font-size: 12px;
  letter-spacing: 0.2px;
  opacity: 0.85;
  line-height: 1.2;
}

.web-top-nav .links--hidden {
  visibility: hidden;
}

.web-top-nav .auth-button {
  border: 1px solid rgba(255,255,255,0.2);
  background: linear-gradient(120deg, #1f2937, #0f172a);
  color: #f8fafc;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 42px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.web-top-nav .auth-button:hover,
.web-top-nav .auth-button:focus-visible {
  border-color: rgba(94,234,212,0.6);
  background: linear-gradient(120deg, #1e293b, #0b1325);
  outline: none;
  transform: translateY(-1px);
}

.web-top-nav .auth-button--accent {
  background: linear-gradient(135deg, #5bd1d7, #2563eb);
  border-color: rgba(91,209,215,0.5);
  color: #0b1021;
}

.web-top-nav .account-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 44px;
  flex: 0 0 auto;
}

.web-top-nav .account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #e5e7eb;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.web-top-nav .account-trigger:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
}

.web-top-nav .account-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(96,165,250,0.5);
}

.web-top-nav .avatar-shell {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1f2937;
  border: 1px solid rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.web-top-nav .avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.web-top-nav .avatar-initials {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  color: #e5e7eb;
}

.web-top-nav .account-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  line-height: 1.2;
  text-align: left;
}

.web-top-nav .account-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 180px;
}

.web-top-nav .account-email {
  margin: 0;
  font-size: 12px;
  color: rgba(226,232,240,0.75);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 200px;
}

.web-top-nav .account-caret {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  color: rgba(226,232,240,0.8);
}

.web-top-nav .account-caret svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.web-top-nav .account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 320px;
  background: #0d1325;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  padding: 16px;
  z-index: 1200;
  color: #e5e7eb;
  display: none;
}

.web-top-nav .account-panel.open {
  display: block;
}

.web-top-nav .panel-caret {
  position: absolute;
  top: -8px;
  right: 24px;
  width: 16px;
  height: 16px;
  background: #0d1325;
  border-left: 1px solid rgba(255,255,255,0.08);
  border-top: 1px solid rgba(255,255,255,0.08);
  transform: rotate(45deg);
  box-shadow: -6px -6px 18px rgba(0, 0, 0, 0.3);
}

.web-top-nav .panel-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.web-top-nav .panel-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.1);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.web-top-nav .panel-avatar span,
.web-top-nav .panel-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: grid;
  place-items: center;
  background: #0b1220;
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 700;
  object-fit: cover;
}

.web-top-nav .panel-name {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #f8fafc;
}

.web-top-nav .panel-email,
.web-top-nav .panel-caption,
.web-top-nav .panel-tenant {
  margin: 0;
  font-size: 13px;
  color: rgba(226,232,240,0.8);
}

.web-top-nav .panel-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.web-top-nav .account-action,
.web-top-nav form.account-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #e5e7eb;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.web-top-nav .account-action:hover,
.web-top-nav .account-action:focus-visible,
.web-top-nav form.account-action:hover,
.web-top-nav form.account-action:focus-visible {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border-color: rgba(255,255,255,0.16);
  outline: none;
  transform: translateY(-1px);
}

.web-top-nav .account-action.danger,
.web-top-nav form.account-action.danger {
  color: #f87171;
  border-color: rgba(248,113,113,0.45);
  background: rgba(248,113,113,0.06);
}

.web-top-nav form.account-action {
  margin: 0;
}

.web-top-nav form.account-action button {
  all: unset;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: inherit;
}

.web-top-nav form.account-action button::after {
  content: ">";
  font-weight: 700;
  opacity: 0.8;
}

footer {
  padding: 12px 20px 20px;
  color: rgba(234,242,255,0.7);
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: #0d1325;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .web-top-nav {
    padding-right: 20px;
  }

  .web-top-nav .nav-toggle {
    display: inline-flex;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
  }

  .web-top-nav .nav-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }

  .web-top-nav .nav-toggle .nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.7);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.12s ease;
  }

  .web-top-nav .nav-toggle .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .web-top-nav .nav-toggle:hover .nav-icon,
  .web-top-nav .nav-toggle:focus-visible .nav-icon {
    border-color: rgba(91, 209, 215, 0.6);
    background: rgba(15, 23, 42, 0.9);
  }

  .web-top-nav .nav-toggle:active .nav-icon {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.18);
  }

  .web-top-nav .links {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1201;
  }

  .web-top-nav .links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .web-top-nav .links .nav-link {
    width: 100%;
    text-align: left;
  }

  .web-top-nav .nav-actions {
    justify-content: flex-end;
    margin-right: 52px;
  }
}

@media (max-width: 640px) {
  .web-top-nav .nav-actions {
    justify-content: flex-start;
  }

  .web-top-nav .auth-button {
    width: 100%;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
