/* ============================================
   TRAVEL TRACKER — PREMIUM DARK DESIGN SYSTEM
   Inspired by Linear, Vercel, Stripe
   ============================================ */

/* ---- DESIGN TOKENS ---- */
:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #111114;
  --bg-tertiary: #18181c;
  --bg-elevated: #1c1c21;
  --bg-hover: #222228;
  --bg-active: #2a2a32;

  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-default: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.11);

  --text-primary: #f0f0f5;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-muted: #52525b;

  --accent-gold: #e8b923;
  --accent-gold-dim: rgba(232, 185, 35, 0.12);
  --accent-teal: #2dd4bf;
  --accent-teal-dim: rgba(45, 212, 191, 0.12);
  --accent-rose: #fb7185;
  --accent-rose-dim: rgba(251, 113, 133, 0.12);
  --accent-amber: #fbbf24;
  --accent-amber-dim: rgba(251, 191, 36, 0.12);
  --accent-emerald: #34d399;
  --accent-emerald-dim: rgba(52, 211, 153, 0.12);
  --accent-blue: #60a5fa;
  --accent-blue-dim: rgba(96, 165, 250, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow-gold: 0 0 20px rgba(232, 185, 35, 0.15);
  --shadow-glow-teal: 0 0 20px rgba(45, 212, 191, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --sidebar-width: 260px;
  --topbar-height: 64px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- LIGHT THEME ---- */
[data-theme="light"] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f3f5;
  --bg-elevated: #ffffff;
  --bg-hover: #e9ecef;
  --bg-active: #dee2e6;

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-default: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.15);

  --text-primary: #1a1a2e;
  --text-secondary: #495057;
  --text-tertiary: #868e96;
  --text-muted: #adb5bd;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow-gold: 0 0 20px rgba(232, 185, 35, 0.25);
  --shadow-glow-teal: 0 0 20px rgba(45, 212, 191, 0.25);
}

[data-theme="light"] body::before {
  background: radial-gradient(circle at 15% 50%, rgba(232, 185, 35, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 85% 30%, rgba(45, 212, 191, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 50% 80%, rgba(251, 113, 133, 0.03) 0%, transparent 50%);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .mobile-nav {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--border-subtle);
}

[data-theme="light"] .modal-overlay {
  background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-default);
}

[data-theme="light"] .auth-page::before {
  background: radial-gradient(circle at 20% 30%, rgba(232, 185, 35, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(45, 212, 191, 0.06) 0%, transparent 40%),
              radial-gradient(circle at 50% 50%, rgba(251, 113, 133, 0.04) 0%, transparent 40%);
}

[data-theme="light"] .trip-card-cover {
  background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 50%, #9fa8da 100%);
}

[data-theme="light"] .trip-card-cover::before {
  background: linear-gradient(to top, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
}

[data-theme="light"] .trip-card-cover h3 {
  color: var(--text-primary);
}

[data-theme="light"] .card::before {
  background: linear-gradient(180deg, rgba(0,0,0,0.03) 0%, transparent 50%);
}

[data-theme="light"] .btn-primary {
  color: #1a1a2e;
}

[data-theme="light"] .btn-secondary {
  color: #1a1a2e;
}

[data-theme="light"] .btn::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, transparent 100%);
}

[data-theme="light"] .mobile-overlay {
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .progress-bar-fill::after {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
}

/* Smooth theme transitions */
*, *::before, *::after {
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

/* ---- BASE & RESET ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  /* Hotfix 2026-05-21 — companion to body's overflow-x:hidden.
     Mobile Safari occasionally puts the horizontal scrollbar on
     <html> instead of <body>; covering both stops the trip-detail
     page from being horizontally scrollable on iPhone. */
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Selection */
::selection {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

/* ---- UTILITIES ---- */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 185, 35, 0); }
  50% { box-shadow: 0 0 20px 2px rgba(232, 185, 35, 0.15); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.animate-fade-in { animation: fadeIn 0.4s var(--transition-base) forwards; }
.animate-fade-up { animation: fadeInUp 0.5s var(--transition-base) forwards; }
.animate-scale-in { animation: scaleIn 0.35s var(--transition-spring) forwards; }
.animate-slide-in { animation: slideInRight 0.4s var(--transition-base) forwards; }

.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }
.stagger-5 { animation-delay: 250ms; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, #d4a853 0%, #e8b923 100%);
  color: #0a0a0c;
  box-shadow: 0 1px 2px rgba(232, 185, 35, 0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-gold), 0 4px 12px rgba(232, 185, 35, 0.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%);
  color: #0a0a0c;
  box-shadow: 0 1px 2px rgba(45, 212, 191, 0.2);
}
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-teal), 0 4px 12px rgba(45, 212, 191, 0.25);
}

.btn-danger {
  background: var(--accent-rose-dim);
  color: var(--accent-rose);
  border-color: rgba(251, 113, 133, 0.15);
}
.btn-danger:hover {
  background: var(--accent-rose);
  color: white;
  box-shadow: 0 0 20px rgba(251, 113, 133, 0.2);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-default);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.75rem; }
.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ---- FORMS ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-dim), inset 0 1px 2px rgba(0,0,0,0.1);
  background: var(--bg-elevated);
}
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.6; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}
.badge-gold { background: var(--accent-gold-dim); color: var(--accent-gold); }
.badge-teal { background: var(--accent-teal-dim); color: var(--accent-teal); }
.badge-amber { background: var(--accent-amber-dim); color: var(--accent-amber); }
.badge-rose { background: var(--accent-rose-dim); color: var(--accent-rose); }
.badge-emerald { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.badge-blue { background: var(--accent-blue-dim); color: var(--accent-blue); }

/* ---- AUTH PAGE ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232, 185, 35, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(45, 212, 191, 0.06), transparent),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(251, 113, 133, 0.05), transparent);
}
.auth-card {
  background: rgba(18, 18, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.03);
}
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--accent-gold), #d4a853);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-gold);
}
.auth-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-logo p {
  color: var(--text-tertiary);
  margin-top: 0.375rem;
  font-size: 0.875rem;
}
.auth-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.75rem;
  background: var(--bg-tertiary);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.auth-tab {
  flex: 1;
  padding: 0.625rem;
  text-align: center;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
}
.auth-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ---- LAYOUT ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-slow);
}
.sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.sidebar-brand-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--accent-gold), #d4a853);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-gold);
}
.sidebar-brand h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sidebar-brand span {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
}
.sidebar-nav a, .sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  margin-bottom: 0.125rem;
}
.sidebar-nav a:hover, .sidebar-nav a.active,
.sidebar-nav button:hover, .sidebar-nav button.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.sidebar-nav a.active, .sidebar-nav button.active {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  font-weight: 600;
}
.sidebar-nav a.active svg, .sidebar-nav button.active svg {
  stroke: var(--accent-gold);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sidebar-footer .avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.sidebar-footer .user-info { flex: 1; min-width: 0; }
.sidebar-footer .user-info .name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.sidebar-footer .user-info .role {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: capitalize;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Hotfix 2026-05-21 — flex items default to min-width:auto which
     prevents them shrinking below their content's intrinsic min
     width. When a child (e.g. the trip-tab strip) has unwrappable
     long content, this causes .main-content (and via cascade the
     entire viewport) to grow past 100vw. Forcing min-width:0 lets
     flex actually shrink, which combined with .tabs's overflow-x
     keeps the tab strip scrollable inside a bounded container. */
  min-width: 0;
}

.topbar {
  height: var(--topbar-height);
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar h1 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.page-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* Mobile bottom nav */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(17, 17, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
  padding: 0.5rem 0;
}
.mobile-nav a, .mobile-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.mobile-nav a.active, .mobile-nav button.active { color: var(--accent-gold); }
.mobile-nav svg { width: 1.25rem; height: 1.25rem; }

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 99;
}

/* ---- STATS GRID ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.5;
}
.stat-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-icon.gold { background: var(--accent-gold-dim); }
.stat-icon.teal { background: var(--accent-teal-dim); }
.stat-icon.amber { background: var(--accent-amber-dim); }
.stat-icon.rose { background: var(--accent-rose-dim); }
.stat-icon.emerald { background: var(--accent-emerald-dim); }
.stat-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-info p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.125rem;
}

/* ---- TRIP CARDS ---- */
.trips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.trip-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-slow);
  position: relative;
}
.trip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(232, 185, 35, 0.06);
  border-color: var(--border-default);
}
.trip-card-cover {
  height: 160px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  color: white;
  position: relative;
  overflow: hidden;
}
.trip-card-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,12,0.9) 0%, rgba(10,10,12,0.3) 50%, transparent 100%);
}
.trip-card-cover::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(232,185,35,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.trip-card-cover h3 {
  position: relative;
  z-index: 1;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.trip-card-cover .badge {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  z-index: 1;
}
.trip-card-body { padding: 1.25rem; }
.trip-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}
.trip-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.trip-card-stat {
  text-align: center;
  padding: 0.625rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.trip-card-stat .value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: -0.01em;
}
.trip-card-stat .label {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.125rem;
}

/* ---- FLAG STYLES ---- */
.trip-card-flag-bg {
  position: absolute;
  right: -0.5rem;
  bottom: -1rem;
  font-size: 6rem;
  opacity: 0.08;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}
.trip-card-flag {
  font-size: 1.1em;
  margin-right: 0.25rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.trip-info-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}
.trip-info-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}
.trip-info-header p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin: 0;
}
.trip-info-flag {
  font-size: 2.5rem;
  line-height: 1;
}

/* ---- CASH STYLES ---- */
.cash-badge {
  font-size: 0.75rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}
.cash-stat {
  border: 1px solid var(--accent-gold) !important;
  background: rgba(232, 185, 35, 0.05) !important;
}

/* ---- BALANCE STYLES ---- */
.balance-positive { color: var(--accent-emerald); }
.balance-negative { color: var(--accent-rose); }

/* ---- TABS ---- */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
  /* Hotfix 2026-05-21 — explicit max-width pairs with the parent
     chain's min-width:0 so overflow-x:auto actually scrolls instead
     of letting the tab strip push the page wider than the viewport. */
  max-width: 100%;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 0.75rem 1.125rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: all var(--transition-fast);
}
.tab:hover { color: var(--text-secondary); }
.tab.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
  font-weight: 600;
}

/* ---- TABLES ---- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.data-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: background var(--transition-fast);
}
.data-table tbody tr:hover td {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .actions { display: flex; gap: 0.375rem; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
}
.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-gold);
}
.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}
.empty-state p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.03);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.96) translateY(8px);
  transition: transform var(--transition-spring);
}
.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.modal-close {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}
.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ---- TOAST ---- */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.toast {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  border-left: 3px solid var(--accent-gold);
  animation: slideInRight 0.35s var(--transition-spring) forwards;
  max-width: 340px;
  font-size: 0.8125rem;
}
.toast.success { border-left-color: var(--accent-emerald); }
.toast.error { border-left-color: var(--accent-rose); }
.toast.info { border-left-color: var(--accent-blue); }

/* ---- ITINERARY ---- */
.itinerary-day {
  margin-bottom: 2rem;
}
.day-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}
.day-header h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: -0.01em;
}
.day-header .date {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.itinerary-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.625rem;
  transition: all var(--transition-base);
}
.itinerary-item:hover {
  border-color: var(--border-default);
  background: var(--bg-tertiary);
}
.itinerary-time {
  min-width: 72px;
  text-align: center;
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-gold);
  border: 1px solid var(--border-subtle);
  height: fit-content;
}
.itinerary-content { flex: 1; }
.itinerary-content h5 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.itinerary-content p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.itinerary-content .location {
  font-size: 0.75rem;
  color: var(--accent-teal);
  margin-top: 0.25rem;
}

/* ---- CHECKLIST ---- */
.checklist-category {
  margin-bottom: 1.5rem;
}
.checklist-category h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.625rem;
  padding-left: 0.5rem;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.375rem;
  transition: all var(--transition-fast);
}
.checklist-item:hover {
  border-color: var(--border-default);
  background: var(--bg-tertiary);
}
.checklist-item.completed {
  opacity: 0.5;
}
.checklist-item.completed .checklist-title {
  text-decoration: line-through;
  color: var(--text-muted);
}
.checklist-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent-gold);
  cursor: pointer;
  flex-shrink: 0;
}
.checklist-title {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.checklist-assignee {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

/* ---- BOOKING CARDS ---- */
.bookings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.booking-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.booking-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.booking-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-gold), var(--accent-teal));
  opacity: 0;
  transition: opacity var(--transition-base);
}
.booking-card:hover::before { opacity: 1; }
.booking-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.booking-card-type {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.booking-card-type .icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}
.booking-card-type .icon.flight { background: var(--accent-blue-dim); }
.booking-card-type .icon.hotel { background: var(--accent-rose-dim); }
.booking-card-type .icon.train { background: var(--accent-emerald-dim); }
.booking-card-type .icon.bus { background: var(--accent-amber-dim); }
.booking-card-type .icon.car { background: rgba(139, 92, 246, 0.12); }
.booking-card-type .icon.activity { background: var(--accent-teal-dim); }
.booking-card-type .icon.other { background: var(--bg-tertiary); }
.booking-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}
.booking-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.booking-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.booking-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.booking-card-cost {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: -0.01em;
}

/* ---- FILE UPLOAD ---- */
.file-dropzone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-tertiary);
}
.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-dim);
}
.file-dropzone p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
}
.attachment-chip {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.attachment-chip a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 500;
}
.attachment-chip a:hover { text-decoration: underline; }
.attachment-chip button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}
.attachment-chip button:hover { color: var(--accent-rose); }

/* ---- PROGRESS BARS ---- */
.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.progress-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
.progress-bar-fill.gold { background: linear-gradient(90deg, #b8860b, var(--accent-gold)); }
.progress-bar-fill.amber { background: linear-gradient(90deg, #d97706, var(--accent-amber)); }
.progress-bar-fill.rose { background: linear-gradient(90deg, #be123c, var(--accent-rose)); }
.progress-bar-fill.red { background: linear-gradient(90deg, #dc2626, #ef4444); }
.progress-bar-fill.emerald { background: linear-gradient(90deg, #059669, var(--accent-emerald)); }

/* ---- USER LIST (ADMIN) ---- */
.user-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}
.user-row:hover { background: var(--bg-hover); }
.user-row .avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.8125rem;
  flex-shrink: 0;
}
.user-row .info { flex: 1; min-width: 0; }
.user-row .info .name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.user-row .info .email {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ---- PAGE SECTION HEADERS ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-header .count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ---- DIVIDERS ---- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-default), transparent);
  margin: 1.5rem 0;
}

/* ---- GRID UTILS ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

/* ---- RESPONSIVE ---- */
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .trips-grid { grid-template-columns: repeat(2, 1fr); }
  .bookings-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .trips-grid { grid-template-columns: repeat(3, 1fr); }
  .bookings-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1280px) {
  .trips-grid { grid-template-columns: repeat(4, 1fr); }
  .bookings-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-overlay.active { display: block; }
}

@media (max-width: 639px) {
  .mobile-nav { display: flex; }
  .page-content { padding-bottom: 5rem; }
  .topbar { padding: 0 1rem; }
  .topbar h1 { font-size: 1rem; }
  .page-content { padding: 1rem; }
  .modal { max-height: 85vh; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 0.75rem 0.875rem; }
  .stat-icon { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
  /* Hotfix 2026-05-21 — currency-prefixed money values like
     '₹0.00' must wrap if they bump the card edge, and the label
     line below must shrink too. */
  .stat-info h3 {
    font-size: 1rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .stat-info p { font-size: 0.7rem; }
  /* Trip-info header (flag + name + destination) stacks vertically. */
  .trip-info-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.875rem 1rem;
  }
  .trip-info-flag { font-size: 1.75rem; }
  /* Topbar action buttons compress on narrow screens — the buttons
     are still tappable, just tighter. Labels stay (no aria-label
     fallback needed; they're visually the labels). */
  .topbar .btn-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
  .topbar-actions { gap: 0.375rem; }
  /* Long money strings inside trip-overview cards may otherwise
     keep a flex row from wrapping. The .card and modal wrappers
     already break-word; this extends that to the inline-flex
     summary rows like Budget Usage's '0.0% used / ₹0.00 / ₹0.00'. */
  .card-body .flex.justify-between { flex-wrap: wrap; row-gap: 0.25rem; }
}

/* ---- SPINNER ---- */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---- REPORT MODAL SPECIAL ---- */
.report-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition-base);
}
.report-action:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow-gold);
  transform: translateY(-1px);
}
.report-action.excel { border-left: 3px solid var(--accent-emerald); }
.report-action.pdf { border-left: 3px solid var(--accent-rose); }

/* ---- CURRENCY CONVERTER ---- */
.converter-wrapper {
  max-width: 520px;
  margin: 0 auto;
}
.converter-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.converter-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.converter-currencies {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: end;
}
.converter-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.converter-swap-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 0.25rem;
}
.converter-swap-btn:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-color: var(--accent-gold);
  transform: rotate(180deg);
}
.converter-mode-toggle {
  display: flex;
  gap: 1.25rem;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.converter-mode-toggle input[type="radio"] {
  accent-color: var(--accent-gold);
  cursor: pointer;
}
.converter-mode-toggle label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
}
.converter-btn {
  width: 100%;
  margin-top: 0.25rem;
}
.converter-result {
  margin-top: 0.5rem;
  padding: 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  animation: fadeIn 0.3s ease;
}
.converter-result-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-top: 0.25rem;
}
.converter-rate-info {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.converter-recent {
  margin-top: 1rem;
}
.converter-recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
}
.converter-recent-item:last-child {
  border-bottom: none;
}

@media (max-width: 640px) {
  .converter-currencies {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .converter-swap-btn {
    margin: 0 auto;
    transform: rotate(90deg);
  }
  .converter-swap-btn:hover {
    transform: rotate(270deg);
  }
}

/* Sync status badge colors */
.badge-gray { background-color: #e5e7eb; color: #6b7280; }
.badge-green { background-color: #d1fae5; color: #065f46; }
.badge-yellow { background-color: #fef3c7; color: #92400e; }
.badge-red { background-color: #fee2e2; color: #991b1b; }

.itinerary-sync-status {
  font-size: 0.75rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.settings-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

/* ---- AUDIT LOG ---- */
.audit-filter {
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  min-width: 9rem;
}
.audit-filter-limit { width: 4.5rem; min-width: 0; }
.audit-table td code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  background: var(--bg-tertiary, rgba(127,127,127,0.08));
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}
.audit-detail { font-size: 0.875rem; line-height: 1.55; }
.audit-detail strong { color: var(--text-secondary); margin-right: 0.25rem; }
.audit-pre {
  margin: 0.375rem 0 0 0;
  padding: 0.75rem;
  background: var(--bg-tertiary, rgba(127,127,127,0.08));
  border-radius: 0.375rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  max-height: 16rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---- INLINE EDITABLE (Phase 1b Task 8) ---- */
.inline-editable {
  cursor: text;
  border-bottom: 1px dashed transparent;
  transition: border-bottom-color 150ms;
}
.inline-editable:hover {
  border-bottom-color: currentColor;
}
.inline-editable-empty {
  color: var(--text-tertiary);
  font-style: italic;
}

/* ---- MOBILE STACKED TABLES (Phase 1b Task 7) ---- */
/* At <640px, every .data-table converts each <tr> into a labeled card.
 * Each <td> renders its column header (passed via data-label="...") inline
 * via ::before. Desktop appearance is unchanged.
 */
@media (max-width: 639px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block;
    width: 100%;
  }
  .data-table tr {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: var(--bg-secondary, #111114);
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.04));
  }
  .data-table td {
    padding: 0.35rem 0;
    border: none;
    text-align: right;
    position: relative;
    padding-left: 8rem;
  }
  .data-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 7.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-tertiary, #71717a);
    font-size: 0.8125rem;
  }
  .data-table td:empty,
  .data-table td:not([data-label])::before {
    content: '';
    padding-left: 0;
  }
}
