/* ============================================================
   Application layout — sidebar, topbar, auth, pages
   ============================================================ */

/* ---------- App shell ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-page);
}

.app-sidebar {
  --sidebar-bg: #0B1524;
  --sidebar-surface: #111C2E;
  --sidebar-line: rgba(255, 255, 255, 0.07);
  --sidebar-text: rgba(236, 242, 248, 0.72);
  --sidebar-text-strong: #F5F8FB;
  --sidebar-muted: rgba(236, 242, 248, 0.38);
  --sidebar-accent: var(--teal, #0FA8A0);

  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #152436;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: var(--topbar-height);
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--sidebar-line);
  flex-shrink: 0;
  background: var(--sidebar-surface);
}

.sidebar-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--sidebar-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -0.02em;
  font-family: var(--font-display);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sidebar-brand-mark.sidebar-brand-logo {
  background: #fff;
  padding: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.sidebar-brand-mark.sidebar-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sidebar-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-brand-text {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--sidebar-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.sidebar-brand-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.sidebar-currency {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.42rem;
  border-radius: 4px;
  background: rgba(15, 168, 160, 0.16);
  border: 1px solid rgba(15, 168, 160, 0.3);
  color: #8AE8E1;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-brand-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--sidebar-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.85rem 0.75rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.2rem 0 0.15rem;
}

.nav-section-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-muted);
  padding: 0.15rem 0.75rem 0.45rem;
  white-space: nowrap;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.48rem 0.65rem;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-text-strong);
  border-color: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--sidebar-text-strong);
  font-weight: 650;
  border-color: rgba(255, 255, 255, 0.06);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sidebar-accent);
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover .nav-icon {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-link.active .nav-icon {
  background: rgba(15, 168, 160, 0.16);
  border-color: rgba(15, 168, 160, 0.28);
}

.nav-link svg,
.nav-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.78;
  color: rgba(236, 242, 248, 0.7);
}

.nav-link:hover svg,
.nav-link:hover .nav-icon svg {
  opacity: 1;
  color: #fff;
}

.nav-link.active svg,
.nav-link.active .nav-icon svg {
  opacity: 1;
  color: var(--sidebar-accent);
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.sidebar-footer {
  padding: 0.9rem 1.05rem 1rem;
  border-top: 1px solid var(--sidebar-line);
  flex-shrink: 0;
  background: var(--sidebar-surface);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.sidebar-footer-text {
  font-size: var(--fs-xs);
  color: var(--sidebar-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer-tenant {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(236, 242, 248, 0.75);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sidebar-footer-link {
  font-size: 0.68rem;
  font-weight: 700;
  color: #8AE8E1;
  text-decoration: none;
  padding: 0.15rem 0.42rem;
  border-radius: 4px;
  background: rgba(15, 168, 160, 0.14);
  border: 1px solid rgba(15, 168, 160, 0.28);
}

.sidebar-footer-link:hover {
  color: #fff;
  background: rgba(15, 168, 160, 0.24);
  border-color: rgba(15, 168, 160, 0.45);
}

.sidebar-footer-copy {
  font-size: 0.65rem;
  color: rgba(236, 242, 248, 0.28);
}

/* ---------- Main area ---------- */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* ---------- Topbar ---------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--topbar-height);
  height: auto;
  background: #FFFFFF;
  border-bottom: 1px solid #D0DCE4;
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(280px, 1.4fr) auto;
  align-items: center;
  padding: 0.75rem 1.5rem;
  gap: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 39, 64, 0.045);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-center {
  display: flex;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.topbar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.topbar-brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.015em;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

.topbar-brand-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

.topbar-brand-meta .topbar-date {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  letter-spacing: 0;
}

.topbar-sep {
  color: #B0C0CB;
}

.topbar-context,
.topbar-context-agency,
.topbar-context-meta,
.topbar-pill {
  /* legacy hooks kept harmless */
}

.topbar-quick {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.topbar-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  border: 1px solid #D7E2E8;
  background: #F7FAFC;
  color: var(--navy);
  text-decoration: none;
  font-size: var(--fs-xs);
  font-weight: 600;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.topbar-quick-btn svg {
  width: 14px;
  height: 14px;
}

.topbar-quick-btn:hover {
  background: #EEF5F8;
  border-color: #B9CBD6;
  color: var(--navy-dark);
}

.topbar-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.topbar-icon-btn svg {
  width: 18px;
  height: 18px;
}

.topbar-icon-btn:hover {
  background: #F3F7F9;
  border-color: #E2E8EE;
  color: var(--navy);
}

.topbar-icon-btn em {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.topbar-divider {
  width: 1px;
  height: 28px;
  background: #DCE5EB;
  margin: 0 0.15rem;
}

.topbar-search-hint {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  font-family: var(--font);
  font-size: 0.62rem;
  font-weight: 650;
  color: #6B8294;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F8FA 100%);
  border: 1px solid #D0DCE5;
  border-radius: 6px;
  padding: 0.18rem 0.42rem;
  pointer-events: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 1px 2px rgba(15, 39, 64, 0.04);
  letter-spacing: 0.02em;
}

.topbar-search-hint span {
  font-size: 0.68rem;
  line-height: 1;
}

.topbar-search.is-open .topbar-search-hint,
.topbar-search:focus-within .topbar-search-hint {
  opacity: 0;
  pointer-events: none;
}

.activity-action {
  font-size: 0.75rem;
  background: #F3F7F9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--navy);
}

.activity-table td {
  vertical-align: top;
}

.topbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.topbar-toggle:hover {
  background: var(--bg-muted);
  color: var(--navy);
}

@media (max-width: 992px) {
  .topbar-toggle.topbar-toggle-mobile {
    display: flex;
  }
}

.topbar-agency {
  font-size: var(--fs-table);
  white-space: nowrap;
}

.topbar-search {
  position: relative;
  width: 100%;
  max-width: 580px;
  z-index: 60;
}

.topbar-search.is-open {
  max-width: 640px;
}

.topbar-search input {
  width: 100%;
  height: 44px;
  padding: 0 3.25rem 0 2.85rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid #C5D4DF;
  border-radius: 12px;
  background: linear-gradient(180deg, #F7FAFC 0%, #EEF4F7 100%);
  color: var(--text-main);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.topbar-search input:hover {
  background: linear-gradient(180deg, #F9FBFC 0%, #F1F6F9 100%);
  border-color: #B0C4D2;
}

.topbar-search input:focus,
.topbar-search.is-open input {
  outline: none;
  border-color: #1A4A66;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 61, 92, 0.12), 0 8px 24px rgba(15, 39, 64, 0.08);
}

.topbar-search input::placeholder {
  color: #8499A9;
  font-weight: 450;
}

.topbar-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #5F7A8C;
  pointer-events: none;
  z-index: 1;
  transition: color 0.15s ease;
}

.topbar-search:focus-within .topbar-search-icon,
.topbar-search.is-open .topbar-search-icon {
  color: var(--navy);
}

.topbar-search.is-loading::after {
  content: '';
  position: absolute;
  right: 3.1rem;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid #D0DCE4;
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: searchSpin 0.7s linear infinite;
}

@keyframes searchSpin {
  to { transform: rotate(360deg); }
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  max-height: min(520px, 72vh);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #D0DCE4;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(15, 39, 64, 0.16), 0 2px 6px rgba(15, 39, 64, 0.06);
  padding: 0.4rem 0.4rem 0;
  overscroll-behavior: contain;
}

.search-results-inner {
  padding-bottom: 0.25rem;
}

.search-group + .search-group {
  margin-top: 0.2rem;
  padding-top: 0.35rem;
  border-top: 1px solid #EEF2F5;
}

.search-group-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8A9AAB;
  padding: 0.4rem 0.7rem 0.25rem;
}

.search-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
}

.search-item:hover,
.search-item.is-active {
  background: #EEF4F8;
}

.search-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #E8EEF2;
  color: var(--navy);
  flex-shrink: 0;
}

.search-item-icon.type-customer { background: #E3F0FA; color: #2B6CB0; }
.search-item-icon.type-booking { background: #D8F3F0; color: #0C857E; }
.search-item-icon.type-inquiry { background: #E8EEF8; color: #3D5A80; }
.search-item-icon.type-quote { background: #FEF3E0; color: #B7791F; }
.search-item-icon.type-task { background: #F3E8F7; color: #6B46C1; }
.search-item-icon.type-reminder { background: #FEFCBF; color: #975A16; }
.search-item-icon.type-notification { background: #FDE8E6; color: #C53030; }
.search-item-icon.type-page { background: #E8EEF2; color: var(--navy); }
.search-item-icon.type-action { background: var(--navy); color: #fff; }
.search-item-icon.type-snippet { background: #E6FFFA; color: #234E52; }
.search-item-icon.type-activity { background: #EDF2F7; color: #4A5568; }
.search-item-icon.type-invoice { background: #EBF8FF; color: #2B6CB0; }
.search-item-icon.type-service { background: #F0FFF4; color: #276749; }
.search-item-icon.type-package,
.search-item-icon.type-itinerary { background: #E6FFFA; color: #0C857E; }
.search-item-icon.type-supplier { background: #FFFAF0; color: #9C4221; }

.search-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.search-item-title {
  font-size: var(--fs-table);
  font-weight: 650;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-meta {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-type {
  font-size: 0.6rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8A9AAB;
  white-space: nowrap;
}

.search-empty {
  padding: 1.35rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--fs-table);
}

.search-empty strong {
  color: var(--navy);
}

.search-hint-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.search-hint-chip {
  display: inline-flex;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #D7E2E8;
  background: #F7FAFC;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.search-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  margin: 0.35rem -0.4rem 0;
  background: #F7FAFC;
  border-top: 1px solid #E8EEF2;
  border-radius: 0 0 14px 14px;
  font-size: 0.65rem;
  color: #7A8F9E;
}

.search-footer kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border: 1px solid #D0DCE4;
  border-radius: 4px;
  background: #fff;
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 650;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.user-dropdown {
  position: relative;
  margin-left: 0.25rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.28rem 0.5rem 0.28rem 0.28rem;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid #E2E8EE;
  background: #F8FBFC;
  font-family: var(--font);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.user-menu:hover,
.user-dropdown.open .user-menu {
  background: #EEF5F8;
  border-color: #C5D5E0;
}

.user-caret {
  color: var(--text-muted);
  flex-shrink: 0;
}

.user-dropdown.open .user-caret {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: #fff;
  border: 1px solid #D9E2EA;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 39, 64, 0.12);
  padding: 0.4rem;
  z-index: 70;
}

.user-dropdown-head {
  padding: 0.65rem 0.75rem 0.55rem;
  border-bottom: 1px solid #EEF2F5;
  margin-bottom: 0.25rem;
}

.user-dropdown-item {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
  color: var(--text-main);
  text-decoration: none;
  font-size: var(--fs-table);
  font-weight: 500;
}

.user-dropdown-item:hover {
  background: #F3F7F9;
  color: var(--navy);
}

.user-dropdown-item.danger {
  color: var(--danger);
}

.user-dropdown-item.danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.user-dropdown-sep {
  height: 1px;
  background: #EEF2F5;
  margin: 0.3rem 0.35rem;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.user-info {
  text-align: left;
  line-height: 1.25;
}

.user-info .name {
  display: block;
  font-size: var(--fs-table);
  font-weight: 600;
  color: var(--navy);
}

.user-info .role {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

/* ---------- Page content ---------- */
.app-content {
  flex: 1;
  padding: 1.5rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.page-header .page-title {
  font-size: var(--fs-page);
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}

.page-header .page-subtitle {
  font-size: var(--fs-table);
  color: var(--text-secondary);
  margin: 0.25rem 0 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: var(--fs-section);
  margin-bottom: 0.35rem;
}

.empty-state p {
  font-size: var(--fs-table);
  margin: 0 0 1.25rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Activity list ---------- */
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-item:first-child {
  padding-top: 0;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  margin-top: 0.45rem;
  flex-shrink: 0;
}

.activity-body {
  flex: 1;
  min-width: 0;
}

.activity-body .title {
  font-size: var(--fs-table);
  font-weight: 500;
  color: var(--text-main);
}

.activity-body .meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ---------- Auth pages ---------- */
body.auth-body {
  margin: 0;
  background: #071f2e;
}

.auth-page,
.auth-page-overlay {
  position: relative;
  min-height: 100vh;
  background: #071f2e;
}

.auth-page-overlay {
  display: block;
  overflow: hidden;
}

/* Classic split layout (platform admin login) */
.auth-page:not(.auth-page-overlay) {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.75rem, 4vw, 3rem);
  color: #fff;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(15, 168, 160, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(22, 80, 122, 0.45), transparent 50%),
    linear-gradient(145deg, #0b3d5c 0%, #072a40 55%, #0c857e 140%);
}

.auth-visual-content {
  max-width: 28rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.auth-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.auth-visual h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.auth-visual p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 26rem;
}

.auth-visual-footer {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.auth-page:not(.auth-page-overlay) .auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--bg-page);
  min-height: 100vh;
}

.auth-form-inner {
  width: 100%;
  max-width: 400px;
}

.auth-form-inner h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.auth-form-inner .auth-sub {
  margin: 0 0 1.35rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.auth-form-footer {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .auth-page:not(.auth-page-overlay) {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: auto;
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .auth-visual h1 {
    font-size: 1.55rem;
  }

  .auth-visual p {
    font-size: 0.92rem;
  }

  .auth-page:not(.auth-page-overlay) .auth-form-panel {
    min-height: auto;
    padding: 1.5rem 1.25rem 2rem;
  }
}

/* 5-second slide progress */
.auth-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.auth-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--auth-accent, #0FA8A0), #8AE8E1);
  transform-origin: left center;
}

.auth-progress.is-running span {
  animation: auth-progress-run var(--auth-slide-ms, 5000ms) linear forwards;
}

@keyframes auth-progress-run {
  from { width: 0%; }
  to { width: 100%; }
}

/* Full-bleed travel slideshow background */
.auth-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.auth-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.05s ease;
  pointer-events: none;
  overflow: hidden;
}

.auth-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.auth-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  will-change: transform;
}

.auth-slide.is-zooming img {
  animation: auth-kenburns 5.2s ease-out forwards;
}

@keyframes auth-kenburns {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.2%, -0.6%, 0); }
}

.auth-slide-fallback {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(15, 168, 160, 0.35), transparent 50%),
    linear-gradient(145deg, #0b3d5c, #072a40 55%, #0c857e);
}

.auth-slide-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(7, 31, 46, 0.22) 0%, rgba(7, 31, 46, 0.48) 70%, rgba(7, 31, 46, 0.62) 100%);
  pointer-events: none;
}

.auth-overlay {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.auth-bg-caption {
  position: absolute;
  left: clamp(1.25rem, 3vw, 2.5rem);
  bottom: clamp(1.25rem, 3vw, 2.5rem);
  width: min(22rem, calc(100vw - 2.5rem));
  color: #fff;
  pointer-events: none;
}

.auth-bg-caption.is-swap .auth-place,
.auth-bg-caption.is-swap .auth-line {
  animation: auth-caption-in 0.55s ease both;
}

.auth-bg-caption.is-swap .auth-line {
  animation-delay: 0.06s;
}

@keyframes auth-caption-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-caption-card {
  padding: 1.05rem 1.15rem 1rem;
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), transparent 42%),
    rgba(7, 31, 46, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 16px 40px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}

.auth-caption-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.auth-caption-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.72);
}

.auth-caption-tag::before {
  content: "";
  width: 1.35rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--auth-accent, #0FA8A0), rgba(138, 232, 225, 0.2));
}

.auth-bg-caption .auth-place {
  margin: 0 0 0.28rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.auth-bg-caption .auth-line {
  margin: 0 0 0.95rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
  max-width: 18rem;
}

.auth-slide-count {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.auth-slide-sep {
  margin: 0 0.15rem;
  opacity: 0.55;
}

/* Always one row — never wrap to a second line */
.auth-dots {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  width: 100%;
  overflow: hidden;
}

.auth-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: width 0.28s ease, background 0.28s ease, transform 0.28s ease;
}

.auth-dot.is-active {
  width: 22px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.auth-dot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.08);
}

.auth-dot:focus-visible {
  outline: 2px solid var(--auth-accent, #0FA8A0);
  outline-offset: 2px;
}

.auth-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

.auth-page-overlay .auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  min-height: auto;
  width: 100%;
  max-width: 420px;
}

.auth-form-shell {
  width: 100%;
  max-width: 400px;
  padding: 1.85rem 1.7rem 1.55rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 28px 56px rgba(7, 31, 46, 0.28);
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.auth-product {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.auth-agency {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.auth-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--auth-accent, var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}

.auth-logo-mark-sm {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 1rem;
}

.auth-form-logo {
  height: 40px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
}

.auth-form-head {
  margin-bottom: 1.35rem;
}

.auth-form-head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.025em;
}

.auth-form-head .auth-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.auth-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--danger-bg);
  border: 1px solid rgba(197, 48, 48, 0.2);
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-form .form-group {
  margin-bottom: 1rem;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  pointer-events: none;
  z-index: 1;
}

.auth-page .auth-input {
  padding-left: 2.65rem;
  min-height: 46px;
  border-radius: 10px;
  border-color: rgba(11, 61, 92, 0.18);
  background: rgba(255, 255, 255, 0.88);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-page .auth-input:focus {
  border-color: var(--auth-accent, var(--teal));
  box-shadow: 0 0 0 3px rgba(15, 168, 160, 0.16);
  background: rgba(255, 255, 255, 0.96);
}

.auth-page .password-wrap .auth-input {
  padding-right: 2.75rem;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  min-height: 48px;
  border-radius: 10px;
  font-weight: 650;
  background: var(--auth-accent, var(--teal));
  border-color: var(--auth-accent, var(--teal));
  box-shadow: 0 8px 18px rgba(15, 168, 160, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 168, 160, 0.34);
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
}

.auth-form-footer {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

.auth-demo {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-demo-label {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-demo code {
  font-size: 0.75rem;
  background: #eef5f4;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.auth-demo-sep {
  opacity: 0.4;
  margin: 0 0.15rem;
}

.auth-admin-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}

.auth-admin-link:hover {
  color: var(--auth-accent, var(--teal));
  text-decoration: underline;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-control {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--navy);
}

.auth-fade-up {
  animation: auth-fade-up 0.65s ease both;
}

.auth-delay-1 { animation-delay: 0.08s; }
.auth-delay-2 { animation-delay: 0.16s; }

@keyframes auth-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-fade-up {
    animation: none !important;
  }

  .auth-slide {
    transition: opacity 0.35s ease;
  }

  .auth-slide img,
  .auth-slide.is-zooming img {
    animation: none !important;
    transform: none !important;
  }

  .auth-progress.is-running span {
    animation: none !important;
    width: 100%;
  }
}

/* ---------- Date filter bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-bar .form-control {
  width: auto;
  min-width: 140px;
}

/* ---------- Overlay for mobile ---------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 36, 56, 0.45);
  z-index: 90;
}

.sidebar-overlay.show {
  display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.mobile-open {
    transform: translateX(0);
    width: var(--sidebar-width);
  }

  .app-sidebar.mobile-open .sidebar-brand-text,
  .app-sidebar.mobile-open .nav-label,
  .app-sidebar.mobile-open .nav-section-title,
  .app-sidebar.mobile-open .sidebar-footer-text {
    opacity: 1;
    width: auto;
    pointer-events: auto;
  }

  .app-main {
    margin-left: 0;
  }

  .app-topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left right"
      "center center";
    padding: 0.65rem 1rem;
    gap: 0.65rem 0.75rem;
  }

  .topbar-left { grid-area: left; min-width: 0; }
  .topbar-center { grid-area: center; justify-content: stretch; }
  .topbar-right { grid-area: right; }

  .topbar-brand-name {
    font-size: 0.95rem;
  }

  .topbar-brand-mark {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  .topbar-quick-btn span {
    display: none;
  }

  .topbar-quick-btn {
    padding: 0.4rem;
  }

  .topbar-search-hint {
    display: none;
  }

  .topbar-search,
  .topbar-search.is-open {
    max-width: none;
    width: 100%;
  }

  .user-info {
    display: none;
  }

  .user-caret {
    display: none;
  }

  .auth-overlay {
    padding: 1.15rem;
    justify-content: center;
  }

  .auth-bg-caption {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto;
  }

  .auth-caption-card {
    text-align: left;
    padding: 0.95rem 1rem 0.9rem;
  }

  .auth-bg-caption .auth-place {
    font-size: 1.45rem;
  }

  .auth-dots {
    gap: 4px;
  }

  .auth-dot {
    width: 6px;
    height: 6px;
  }

  .auth-dot.is-active {
    width: 18px;
  }

  .auth-page-overlay .auth-form-panel {
    max-width: 100%;
  }

  .auth-form-shell {
    max-width: 100%;
    background: rgba(255, 255, 255, 0.82);
  }
}

/* ---------- Dashboard hero ---------- */
.dash-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(11, 61, 92, 0.14);
  border-bottom: 4px solid var(--teal);
}

.dash-hero::before,
.dash-hero::after {
  content: none;
}

.dash-hero-copy,
.dash-hero-pulse {
  position: relative;
  z-index: 1;
}

.dash-hero-kicker {
  margin: 0 0 0.35rem;
  font-size: var(--fs-label);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}

.dash-hero-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.dash-hero-sub {
  margin: 0 0 1.15rem;
  font-size: var(--fs-table);
  color: rgba(255, 255, 255, 0.7);
}

.dash-hero-sub strong {
  color: var(--gold-soft);
  font-weight: 600;
}

.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dash-hero-outline {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.dash-hero-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.dash-hero-ghost {
  color: rgba(255, 255, 255, 0.75);
}

.dash-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dash-hero-pulse {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-content: center;
}

.dash-pulse-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.dash-pulse-item.accent-teal {
  border-color: rgba(28, 181, 175, 0.35);
  background: rgba(12, 155, 150, 0.22);
}

.dash-pulse-item.accent-gold {
  border-color: rgba(217, 164, 65, 0.4);
  background: rgba(217, 164, 65, 0.15);
}

.dash-pulse-label {
  font-size: var(--fs-label);
  color: rgba(255, 255, 255, 0.7);
}

.dash-pulse-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.dash-panel {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dash-panel .card-header {
  background: var(--bg-white);
}

@media (max-width: 960px) {
  .dash-hero {
    grid-template-columns: 1fr;
  }
}

/* ---------- Dashboard: rates + today's schedule ---------- */
.dash-split {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.fx-board-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.fx-compact {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.fx-compact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.fx-compact-base {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.fx-compact-rows {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.fx-compact-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-label);
}

.fx-compact-row:last-child { border-bottom: none; }

.fx-compact-row.base {
  background: var(--navy);
  color: #fff;
}

.fx-compact-code {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fx-compact-row.base .fx-compact-code { color: var(--gold-soft); }

.fx-compact-rate {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
}

.fx-compact-row.base .fx-compact-rate { color: rgba(255, 255, 255, 0.55); }

.fx-compact-amt {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  text-align: right;
}

.fx-compact-row.base .fx-compact-amt { color: #fff; }

.fx-compact-foot {
  padding: 0.55rem 0.9rem;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  background: var(--bg-page);
  border-top: 1px solid var(--border);
}

.fx-compact-foot .fx-sep { color: var(--text-muted); opacity: 0.5; margin: 0 0.15rem; }

.fx-compact-empty {
  margin: 0;
  padding: 0.9rem;
  font-size: var(--fs-label);
  color: var(--text-secondary);
  flex: 1;
}

.dash-today {
  min-height: 0;
  margin: 0;
}

.dash-today-body {
  max-height: 260px;
  overflow-y: auto;
}

.dash-today-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-today-list li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 0.65rem;
  align-items: flex-start;
}

.dash-today-list a {
  color: var(--navy);
  text-decoration: none;
}

.dash-today-list a:hover { text-decoration: underline; }

.dash-today-type {
  font-size: 0.65rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.15rem;
}

.cal-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.4rem;
  background: #94A3B8;
  flex-shrink: 0;
}

.cal-dot.teal { background: var(--teal); }
.cal-dot.navy { background: var(--navy); }
.cal-dot.coral { background: var(--coral); }
.cal-dot.sky { background: var(--sky); }
.cal-dot.gold { background: var(--gold); }
.cal-dot.warning { background: #D69E2E; }
.cal-dot.muted { background: #94A3B8; }

@media (max-width: 1100px) {
  .dash-split {
    grid-template-columns: minmax(200px, 240px) 1fr;
  }

  .dash-split .dash-trips {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .dash-split {
    grid-template-columns: 1fr;
  }

  .dash-split .dash-trips {
    grid-column: auto;
  }
}

/* ---------- Dashboard: trips today ---------- */
.dash-trips {
  min-height: 0;
  margin: 0;
}

.dash-trips-body {
  max-height: 260px;
  overflow-y: auto;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.dash-trips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-trips-list li {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid var(--border);
}

.dash-trips-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dash-trip-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.45rem;
  background: var(--navy);
  flex-shrink: 0;
}

.dash-trips-list li.trip-start .dash-trip-mark { background: var(--teal); }
.dash-trips-list li.trip-end .dash-trip-mark { background: var(--coral); }
.dash-trips-list li.trip-day .dash-trip-mark { background: var(--gold); }
.dash-trips-list li.trip-live .dash-trip-mark { background: var(--sky); }

.dash-trip-headline {
  display: block;
  color: var(--navy);
  font-weight: 650;
  text-decoration: none;
  line-height: 1.35;
}

.dash-trip-headline:hover {
  text-decoration: underline;
}

.dash-trip-meta {
  margin-top: 0.2rem;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

.dash-trip-sep {
  opacity: 0.45;
  margin: 0 0.1rem;
}

.dash-trip-kind {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.dash-trips-list li.trip-start .dash-trip-kind { color: var(--teal); }
.dash-trips-list li.trip-end .dash-trip-kind { color: var(--coral); }
.dash-trips-list li.trip-day .dash-trip-kind { color: #B7791F; }
.dash-trips-list li.trip-live .dash-trip-kind { color: var(--sky); }

@media (max-width: 576px) {
  .app-content {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
  }

  .auth-form-panel {
    padding: 1.5rem;
  }
}

/* ---------- Booking operations hub ---------- */
body.booking-hub .app-content {
  background: var(--bg-page);
}

.bk-hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(11, 61, 92, 0.14);
  border-bottom: 4px solid var(--teal);
}

.bk-hero::before {
  content: none;
}

.bk-hero-main,
.bk-hero-side { position: relative; z-index: 1; }

.bk-hero-kicker {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.35rem;
}

.bk-hero-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.bk-hero-sub {
  margin: 0 0 0.65rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-table);
}

.bk-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  font-size: var(--fs-label);
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1rem;
}

.bk-hero-meta .dot { opacity: 0.45; }

.bk-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bk-status-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.bk-status-pill .label {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bk-money {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.75rem;
}

.bk-money .row-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: var(--fs-table);
  color: rgba(255, 255, 255, 0.7);
}

.bk-money .row-line strong { color: #fff; font-weight: 600; }
.bk-money .row-line.accent { color: var(--gold-soft); }
.bk-money .row-line.accent strong { color: var(--gold-soft); }

.bk-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.bk-progress-bar span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 999px;
}

.bk-progress-label {
  margin-top: 0.4rem;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.55);
}

.bk-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.bk-tab {
  flex: 1;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-table);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.bk-tab:hover { background: var(--bg-muted); color: var(--navy); }

.bk-tab.active {
  background: var(--navy);
  color: #fff;
}

.bk-tab em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.bk-tab:not(.active) em {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.bk-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.bk-quick-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
}

.bk-quick-grid .text-muted { font-size: var(--fs-xs); }
.bk-quick-grid strong { color: var(--navy); font-size: 1.1rem; }

.bk-seg-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bk-flight-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  position: relative;
  overflow: hidden;
}

.bk-flight-card.elevated {
  box-shadow: var(--shadow-sm);
}

.bk-flight-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--teal);
}

.bk-flight-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.bk-carrier {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.bk-flight-no {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-display);
}

.bk-flight-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.bk-code {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.bk-time {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.bk-flight-line {
  height: 2px;
  background: var(--teal);
  position: relative;
  min-width: 48px;
  border-radius: 2px;
}

.bk-flight-line span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--teal);
  box-shadow: 0 0 0 3px rgba(12, 155, 150, 0.15);
}

.bk-pnr {
  font-size: var(--fs-label);
  color: var(--text-secondary);
}

.bk-pnr strong {
  color: var(--navy);
  letter-spacing: 0.04em;
}

.bk-flight-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.bk-seg-notes {
  margin-top: 0.65rem;
  font-size: var(--fs-label);
  color: var(--text-secondary);
}

.bk-hotel-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.text-right { text-align: right; }

/* ---------- Customer edit / view ---------- */
body.customer-edit-page .app-content,
body.customer-view-page .app-content {
  background: var(--bg-page);
}

/* Customer view tabs — high-specificity so they never fall back to plain links */
body.customer-view-page .cv-tabs,
.cv-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem;
  margin: 0 0 1rem;
  background: #fff;
  border: 1px solid var(--border, #d7e2e6);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(11, 61, 92, 0.04);
}

body.customer-view-page .cv-tabs .cv-tab,
.cv-tabs .cv-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  color: #5a6f80;
  text-decoration: none !important;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.customer-view-page .cv-tabs .cv-tab:hover,
.cv-tabs .cv-tab:hover {
  background: #f3f6f8;
  color: #0b3d5c;
}

body.customer-view-page .cv-tabs .cv-tab.is-active,
body.customer-view-page .cv-tabs .cv-tab.active,
.cv-tabs .cv-tab.is-active,
.cv-tabs .cv-tab.active {
  background: #0b3d5c;
  border-color: #0b3d5c;
  color: #fff !important;
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 1rem;
  align-items: start;
}

.cv-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.cv-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: 1rem;
}

.cv-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.25rem;
  margin: 0;
}

.cv-dl > div {
  min-width: 0;
}

.cv-dl-full { grid-column: 1 / -1; }

.cv-dl dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.cv-dl dd {
  margin: 0;
  color: var(--navy);
  font-weight: 500;
  font-size: var(--fs-table);
  line-height: 1.45;
}

.cv-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cv-activity li a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  background: var(--bg-page);
}

.cv-activity li a:hover {
  border-color: rgba(11, 61, 92, 0.25);
  background: #fff;
}

.cv-activity-title {
  font-weight: 650;
  color: var(--navy);
  font-size: var(--fs-table);
}

.cv-activity-meta {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.cv-traveller-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cv-traveller {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.cv-traveller.is-warn {
  border-color: rgba(224, 103, 90, 0.45);
  background: rgba(224, 103, 90, 0.06);
}

.cv-traveller-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.75rem;
  align-items: end;
}

.cv-traveller-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.15rem;
}

.cv-pill-warn {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: rgba(224, 103, 90, 0.15);
  color: var(--coral);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cv-add-bar {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem 1.15rem;
  background: #fff;
}

.cv-add-bar h3 {
  margin: 0 0 0.75rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.cv-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cv-notes li {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.cv-note-body {
  color: var(--navy);
  font-size: var(--fs-table);
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

.cv-note-meta {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.cv-follow {
  color: var(--teal);
  font-weight: 600;
}

@media (max-width: 960px) {
  .cv-layout { grid-template-columns: 1fr; }
  .cv-side { position: static; }
  .cv-dl { grid-template-columns: 1fr; }
  .cv-traveller-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
  .cv-traveller-grid { grid-template-columns: 1fr; }
  body.customer-view-page .cv-tabs,
  .cv-tabs {
    flex-direction: column;
    align-items: stretch;
  }
  body.customer-view-page .cv-tabs .cv-tab,
  .cv-tabs .cv-tab {
    width: 100%;
    justify-content: flex-start;
  }
}

.ce-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--teal);
  box-shadow: 0 8px 20px rgba(11, 61, 92, 0.12);
}

.ce-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  flex: 1;
}

.ce-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ce-kicker {
  margin: 0 0 0.25rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

.ce-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.ce-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--fs-table);
  max-width: 36rem;
  line-height: 1.45;
}

.ce-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
  margin-top: 0.65rem;
  font-size: var(--fs-label);
  color: rgba(255, 255, 255, 0.62);
}

.ce-meta .dot { opacity: 0.4; }

.ce-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ce-btn-outline {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.ce-btn-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.ce-btn-ghost {
  color: rgba(255, 255, 255, 0.78);
}

.ce-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ce-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 1rem;
  align-items: start;
}

.ce-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.ce-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ce-panel-head {
  padding: 1rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.ce-panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.ce-panel-head p {
  margin: 0.2rem 0 0;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.ce-panel-body {
  padding: 1.15rem 1.25rem 1.25rem;
}

.ce-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}

.ce-span-2 { grid-column: 1 / -1; }

.ce-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: 1rem;
}

.ce-side-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.ce-side-card h3 {
  margin: 0 0 0.65rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ce-checklist {
  margin: 0;
  padding: 0 0 0 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: var(--fs-label);
  color: var(--text-secondary);
  line-height: 1.4;
}

.ce-side-note {
  margin: 0;
  font-size: var(--fs-label);
  color: var(--text-secondary);
  line-height: 1.45;
}

.ce-side-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ce-side-link {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  color: var(--navy);
  text-decoration: none;
  font-size: var(--fs-label);
  font-weight: 600;
  background: var(--bg-page);
  border: 1px solid transparent;
}

.ce-side-link:hover {
  border-color: var(--border);
  background: #fff;
}

.ce-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
}

@media (max-width: 960px) {
  .ce-layout {
    grid-template-columns: 1fr;
  }

  .ce-side {
    position: static;
  }

  .ce-grid {
    grid-template-columns: 1fr;
  }

  .ce-span-2 { grid-column: auto; }
}

/* ---------- Settings: company logo ---------- */
.brand-logo-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-logo-preview {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-preview.has-logo {
  background: #fff;
  padding: 0.45rem;
}

.brand-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-logo-placeholder {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  opacity: 0.45;
}

.brand-logo-controls {
  flex: 1;
  min-width: 220px;
}

.service-import-dialog {
  width: min(1080px, calc(100vw - 2rem));
  max-width: 1080px;
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text-main);
}

.service-import-dialog::backdrop {
  background: rgba(11, 34, 52, 0.58);
  backdrop-filter: blur(4px);
}

.service-import-dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(11, 61, 92, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 28, 44, 0.3);
}

.service-import-dialog-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.service-import-dialog-head h2 {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.service-import-dialog-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-body);
}

.service-import-eyebrow {
  color: var(--teal, #0f8f8a);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-import-count {
  flex: 0 0 auto;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.service-import-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.1rem 1.5rem;
  overflow: auto;
}

.service-import-review-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: var(--fs-table);
  font-weight: 600;
}

.service-import-table-wrap {
  max-height: min(54vh, 560px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.service-import-preview-table {
  min-width: 780px;
  margin: 0;
}

.service-import-preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-page);
}

.service-import-preview-table td {
  vertical-align: middle;
}

.service-import-row-number,
.service-import-type-hint {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}

.service-import-type-hint {
  color: #a45a12;
}

.service-import-type-hint.is-mapped {
  color: var(--success);
}

.service-import-type-select {
  min-width: 170px;
}

.service-import-price {
  white-space: nowrap;
  font-weight: 700;
}

.service-import-empty {
  padding: 2rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.service-import-footnote {
  margin: 0.75rem 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}

.service-import-dialog-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
}

.service-import-dialog-foot button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.service-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "name name type"
    "country city price"
    "currency active active";
  align-items: start;
  gap: 0.55rem 0.8rem;
  margin-bottom: 0.85rem;
}

.service-form-grid .form-group {
  align-self: start;
  min-width: 0;
  margin-bottom: 0;
}

.service-form-name {
  grid-area: name;
}

.service-form-type {
  grid-area: type;
}

.service-form-country {
  grid-area: country;
}

.service-form-city {
  grid-area: city;
}

.service-form-price {
  grid-area: price;
}

.service-form-currency {
  grid-area: currency;
}

.service-form-active {
  grid-area: active;
}

.service-city-status {
  min-height: 1rem;
  margin-top: 0.25rem;
  line-height: 1.25;
}

.service-city-status[data-state="loading"] {
  color: var(--sky);
}

.service-city-status[data-state="error"] {
  color: var(--warning);
}

@media (max-width: 640px) {
  .service-import-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .service-import-dialog-card {
    max-height: calc(100vh - 1rem);
  }

  .service-import-dialog-head,
  .service-import-dialog-body {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .service-import-review-summary {
    flex-direction: column;
    gap: 0.25rem;
  }

  .service-import-dialog-foot {
    padding: 0.85rem 1rem;
  }

  .service-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "name name"
      "type type"
      "country city"
      "price currency"
      "active active";
  }
}

@media (max-width: 420px) {
  .service-form-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "type"
      "country"
      "city"
      "price"
      "currency"
      "active";
  }
}

@media (max-width: 960px) {
  .bk-hero { grid-template-columns: 1fr; }
  .bk-quick-grid { grid-template-columns: repeat(2, 1fr); }
}
