/* ==========================================================================
   ATLENDA TRAVEL DESK — Marketing Design System
   "The Operating System for Modern Travel Agencies"
   --------------------------------------------------------------------------
   A single, marketing-grade design system used by every mockup and the deck.
   Premium B2B SaaS aesthetic — Stripe / Linear / Attio grade. Light theme.
   Adapted from the product DESIGN.md tokens into a polished marketing palette.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..800;1,14..32,400..600&display=swap');

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
  /* --- Palette --- */
  --ink: #0E1525;          /* dark sidebar / nav */
  --navy: #1B2239;         /* deep navy surfaces, hero backdrops */
  --canvas: #F6F8FB;       /* app background */
  --surface: #FFFFFF;      /* cards, panels */
  --surface-2: #FBFCFE;    /* subtle nested surface */
  --border: #E6EAF1;       /* hairline borders, dividers */
  --border-strong: #D4DAE6;/* heavier dividers */
  --text: #1B2333;         /* primary text */
  --muted: #6B7385;        /* secondary text */
  --faint: #9AA1B2;        /* tertiary text, placeholders */

  --brand: #2B59C3;        /* primary action */
  --brand-hover: #2249A6;  /* primary hover */
  --brand-soft: #EAF0FC;   /* brand tint background */
  --brand-ring: rgba(43, 89, 195, 0.35);

  --success: #1E9E6A;
  --success-soft: #E4F6EE;
  --warning: #C77800;
  --warning-soft: #FBF1DF;
  --danger: #D14343;
  --danger-soft: #FBE9E9;
  --amber: #B45313;
  --amber-soft: #FBEEE2;
  --info: #2B59C3;
  --info-soft: #EAF0FC;

  /* --- Chart colors --- */
  --c1: #2B59C3;   /* brand blue */
  --c2: #1E9E6A;   /* green */
  --c3: #B45313;   /* amber */
  --c4: #7C5CE6;   /* violet */
  --c5: #1FA2C7;   /* cyan */
  --c6: #D14343;   /* red */

  /* Avatar palette (deterministic, brandable) */
  --av1: #2B59C3;
  --av2: #1E9E6A;
  --av3: #B45313;
  --av4: #7C5CE6;
  --av5: #1FA2C7;
  --av6: #C2477F;

  /* --- Radii --- */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 1px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08), 0 2px 4px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12), 0 4px 8px rgba(16, 24, 40, 0.05);
  --shadow-xl: 0 24px 60px rgba(16, 24, 40, 0.16), 0 8px 16px rgba(16, 24, 40, 0.06);
  --ring: 0 0 0 3px var(--brand-ring);

  /* --- Typography --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  /* --- Spacing scale (for inline use) --- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* --- Layout --- */
  --sidebar-w: 248px;
  --topbar-h: 60px;
}

/* ==========================================================================
   2. BASE / RESET
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.011em;
}

h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.022em; }
h2 { font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.014em; }

p { margin: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

img { max-width: 100%; display: block; }

code, kbd, pre, .mono { font-family: var(--font-mono); }

::selection { background: var(--brand-soft); color: var(--brand-hover); }

/* Custom scrollbars for shipped-software feel */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #C9D0DD;
  border-radius: var(--r-full);
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #B2BACB; background-clip: content-box; }

/* ==========================================================================
   3. APP SHELL
   ========================================================================== */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--canvas);
}

/* --- Sidebar (dark) --- */
.sidebar {
  background: var(--ink);
  color: #C7CEDC;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 4px;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.sidebar-logo .logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, #3E72E0 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6E7790;
  padding: 16px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: #AEB6C8;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #E8ECF4;
}

.nav-item.active {
  background: rgba(43, 89, 195, 0.18);
  color: #FFFFFF;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}

.nav-item .nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-item .nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: #DCE2EE;
  padding: 1px 7px;
  border-radius: var(--r-full);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- Main column --- */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--canvas);
}

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 7px 12px;
  width: 320px;
  max-width: 40%;
  color: var(--faint);
  font-size: 13px;
}

.topbar-search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
}

.topbar-search .kbd {
  margin-left: auto;
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 4px;
  padding: 1px 5px;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page {
  padding: 28px 32px 48px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header .page-title {
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.page-header .page-subtitle {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 4px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--faint); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ==========================================================================
   4. SURFACES — Cards & Panels
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.01em;
  color: var(--text);
}

.card-title .sub {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0;
}

.card-body {
  padding: 20px;
}

.card-body.flush { padding: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
}

.panel.tint {
  background: var(--brand-soft);
  border-color: #D6E2FA;
}

.section-title {
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ==========================================================================
   5. STATS / KPI
   ========================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}

.stat-label .stat-ico {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stat-value {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-top: 10px;
  line-height: 1.1;
}

.stat-value .unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
  letter-spacing: 0;
}

.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--danger); }
.stat-delta .vs { color: var(--faint); font-weight: 400; margin-left: 4px; }

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  text-decoration: none;
  user-select: none;
}

.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn svg, .btn .ico { width: 15px; height: 15px; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(43, 89, 195, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-primary:hover { background: var(--brand-hover); color: #fff; }

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover { background: var(--canvas); border-color: #C2CAD9; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover { background: var(--canvas); color: var(--text); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #BC3838; }

.btn-sm {
  height: 30px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: var(--r-sm);
}
.btn-sm svg, .btn-sm .ico { width: 13px; height: 13px; }

.btn-lg {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: var(--r);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}
.btn-icon:hover { background: var(--canvas); color: var(--text); }
.btn-icon.bordered { border-color: var(--border); background: var(--surface); }

/* ==========================================================================
   7. BADGES / PILLS / TAGS
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  background: currentColor;
}

.badge-success { background: var(--success-soft); color: #14794F; border-color: #C6ECDA; }
.badge-warning { background: var(--warning-soft); color: #9A5D00; border-color: #F0DCB4; }
.badge-danger  { background: var(--danger-soft);  color: #B43232; border-color: #F2C9C9; }
.badge-info    { background: var(--info-soft);    color: #2249A6; border-color: #D6E2FA; }
.badge-neutral { background: #F1F3F8; color: var(--muted); border-color: var(--border); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: var(--canvas);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ==========================================================================
   8. TABLES
   ========================================================================== */

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 11px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table thead th:first-child { border-top-left-radius: var(--r-lg); }
.table thead th:last-child { border-top-right-radius: var(--r-lg); text-align: right; }

.table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }

.table tbody tr {
  transition: background 0.12s ease;
}
.table tbody tr:hover { background: var(--surface-2); }

.table td .primary { font-weight: 560; color: var(--text); }
.table td .secondary { color: var(--muted); font-size: 12.5px; }

.table-actions {
  text-align: right;
  white-space: nowrap;
}
.table-actions .btn-icon { width: 30px; height: 30px; }

.table.zebra tbody tr:nth-child(even) { background: var(--surface-2); }

/* ==========================================================================
   9. AVATARS
   ========================================================================== */

.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 650;
  color: #fff;
  background: var(--brand);
  flex-shrink: 0;
  letter-spacing: -0.01em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.xl { width: 56px; height: 56px; font-size: 18px; }

.avatar.av1 { background: var(--av1); }
.avatar.av2 { background: var(--av2); }
.avatar.av3 { background: var(--av3); }
.avatar.av4 { background: var(--av4); }
.avatar.av5 { background: var(--av5); }
.avatar.av6 { background: var(--av6); }

.avatar-group {
  display: inline-flex;
  align-items: center;
}
.avatar-group .avatar {
  border: 2px solid var(--surface);
  margin-left: -8px;
}
.avatar-group .avatar:first-child { margin-left: 0; }
.avatar-group .more {
  margin-left: -8px;
  border: 2px solid var(--surface);
  background: #EBEEF4;
  color: var(--muted);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-cell .meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-cell .meta .name { font-weight: 560; color: var(--text); }
.user-cell .meta .role { font-size: 12px; color: var(--muted); }

/* ==========================================================================
   10. KANBAN
   ========================================================================== */

.board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: flex-start;
}

.board-col {
  flex: 0 0 280px;
  width: 280px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.board-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 2px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
}

.board-col-head .count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 1px 7px;
}

.board-col-head .col-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
}

.board-col-head .add {
  margin-left: auto;
  color: var(--faint);
  cursor: pointer;
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.kanban-card .kc-title { font-size: 13px; font-weight: 580; color: var(--text); line-height: 1.35; }
.kanban-card .kc-route { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kanban-card .kc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kanban-card .kc-value { font-size: 13px; font-weight: 680; color: var(--text); letter-spacing: -0.01em; }

/* ==========================================================================
   11. FORMS
   ========================================================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.label {
  font-size: 12.5px;
  font-weight: 580;
  color: var(--text);
}
.label .opt { color: var(--faint); font-weight: 400; margin-left: 4px; }

.input,
.select,
.textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: 9px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.input::placeholder, .textarea::placeholder { color: var(--faint); }

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7385' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
}

.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }

.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: 0 12px;
}
.input-group:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.input-group .ico { color: var(--faint); flex-shrink: 0; }
.input-group input {
  border: 0; outline: none; background: transparent; padding: 9px 0;
  width: 100%; font-size: 13.5px; font-family: inherit; color: var(--text);
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute;
  inset: 0;
  background: #CDD4E0;
  border-radius: var(--r-full);
  transition: background 0.18s ease;
  cursor: pointer;
}
.switch .track::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease;
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::before { transform: translateX(16px); }

/* ==========================================================================
   12. TIMELINE
   ========================================================================== */

.timeline {
  position: relative;
  padding-left: 6px;
}

.timeline-item {
  position: relative;
  padding: 0 0 20px 26px;
  border-left: 2px solid var(--border);
}
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -7px;
  top: 1px;
  width: 12px;
  height: 12px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 2px solid var(--brand);
}
.timeline-dot.success { border-color: var(--success); background: var(--success); }
.timeline-dot.muted { border-color: var(--border-strong); }
.timeline-dot.warning { border-color: var(--warning); background: var(--warning); }

.timeline-item .tl-title { font-size: 13px; font-weight: 560; color: var(--text); }
.timeline-item .tl-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.timeline-item .tl-time { font-size: 11.5px; color: var(--faint); }

/* ==========================================================================
   13. LAYOUT UTILITIES
   ========================================================================== */

.row { display: flex; flex-direction: row; }
.col { display: flex; flex-direction: column; }
.flex { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; justify-content: center; }
.wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.grow { flex: 1; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.strong { font-weight: 650; color: var(--text); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.tabular { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center-text { text-align: center; }
.divider { height: 1px; background: var(--border); border: 0; margin: 16px 0; }

/* ==========================================================================
   14. DECK CHROME — Browser & Phone frames
   ========================================================================== */

.browser-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  width: 100%;
}

.browser-frame .bf-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 14px;
  background: #F3F5F9;
  border-bottom: 1px solid var(--border);
}

.browser-frame .bf-lights {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}
.browser-frame .bf-lights span {
  width: 11px;
  height: 11px;
  border-radius: var(--r-full);
  display: inline-block;
}
.browser-frame .bf-lights .r { background: #FF5F57; }
.browser-frame .bf-lights .y { background: #FEBC2E; }
.browser-frame .bf-lights .g { background: #28C840; }

.browser-frame .bf-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  max-width: 460px;
  margin: 0 auto;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px;
  color: var(--muted);
}
.browser-frame .bf-url .lock { width: 11px; height: 11px; color: var(--success); }

.browser-frame .bf-body { background: var(--canvas); }
.browser-frame iframe { width: 100%; border: 0; display: block; }

.phone-frame {
  width: 320px;
  background: var(--ink);
  border-radius: 38px;
  padding: 10px;
  box-shadow: var(--shadow-xl);
  position: relative;
}
.phone-frame .pf-screen {
  background: var(--canvas);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 9 / 19.5;
}
.phone-frame .pf-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 26px;
  background: var(--ink);
  border-radius: 0 0 16px 16px;
  z-index: 5;
}
.phone-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ==========================================================================
   15. CHARTS — SVG bar / line / area / donut + legend
   ========================================================================== */

.chart {
  width: 100%;
  position: relative;
}
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }

/* Axis & grid */
.chart .axis line,
.chart .grid line {
  stroke: var(--border);
  stroke-width: 1;
}
.chart .grid line { stroke-dasharray: 2 4; }
.chart .axis-text {
  fill: var(--faint);
  font-size: 10.5px;
  font-family: var(--font-sans);
}

/* Bars */
.chart .bar { fill: var(--brand); rx: 4; transition: fill 0.15s ease; }
.chart .bar.c1 { fill: var(--c1); }
.chart .bar.c2 { fill: var(--c2); }
.chart .bar.c3 { fill: var(--c3); }
.chart .bar.c4 { fill: var(--c4); }
.chart .bar.soft { fill: #DCE6FA; }
.chart .bar:hover { fill: var(--brand-hover); }

/* Line + area */
.chart .line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart .line.c2 { stroke: var(--c2); }
.chart .line.c3 { stroke: var(--c3); }
.chart .area { fill: url(#atlasAreaGrad); opacity: 0.9; }
.chart .area.c2 { fill: rgba(30, 158, 106, 0.12); }
.chart .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5; }
.chart .dot.c2 { stroke: var(--c2); }

/* Donut */
.chart .donut-track { fill: none; stroke: var(--border); stroke-width: 16; }
.chart .donut-seg { fill: none; stroke-width: 16; stroke-linecap: round; }
.chart .donut-seg.c1 { stroke: var(--c1); }
.chart .donut-seg.c2 { stroke: var(--c2); }
.chart .donut-seg.c3 { stroke: var(--c3); }
.chart .donut-seg.c4 { stroke: var(--c4); }
.chart .donut-center-value { fill: var(--text); font-size: 22px; font-weight: 700; font-family: var(--font-sans); }
.chart .donut-center-label { fill: var(--muted); font-size: 10px; font-family: var(--font-sans); }

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.legend-item .swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-item .swatch.c1 { background: var(--c1); }
.legend-item .swatch.c2 { background: var(--c2); }
.legend-item .swatch.c3 { background: var(--c3); }
.legend-item .swatch.c4 { background: var(--c4); }
.legend-item .swatch.c5 { background: var(--c5); }
.legend-item .swatch.c6 { background: var(--c6); }
.legend-item .val { color: var(--text); font-weight: 600; margin-left: 2px; }

/* Sparkline */
.sparkline { width: 100%; height: 36px; display: block; }
.sparkline path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; }

/* ==========================================================================
   16. MISC — progress, empty states, list rows
   ========================================================================== */

.progress {
  width: 100%;
  height: 7px;
  border-radius: var(--r-full);
  background: var(--border);
  overflow: hidden;
}
.progress .bar { height: 100%; border-radius: var(--r-full); background: var(--brand); }
.progress .bar.success { background: var(--success); }
.progress .bar.warning { background: var(--warning); }

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: 0; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state .ico {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  color: var(--faint);
}

.kpi-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.kpi-inline .n { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }

/* Hero / marketing helpers (deck) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}
.display {
  font-size: 48px;
  line-height: 1.05;
  font-weight: 720;
  letter-spacing: -0.03em;
  color: var(--text);
}
.lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

/* Responsive: collapse multi-column grids on narrow viewports */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stat-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .display { font-size: 34px; }
}
