/* ============================================================
   Fly by Deniz Premium — Command Center
   Design tokens + base + components
   ============================================================ */

:root {
  /* Brand gold */
  --gold-1: #EBD49A;
  --gold-2: #CCA04A;
  --gold-3: #9E7424;
  --gold: #C39B45;
  --gold-soft: #F6EDD7;
  --gold-line: #E7D5A8;
  --gold-grad: linear-gradient(135deg, #EBD49A 0%, #CCA04A 52%, #9E7424 100%);

  /* Warm neutrals */
  --ink: #1C1813;
  --ink-2: #56504645;
  --ink-2: #56504A;
  --ink-3: #8B8378;
  --ink-4: #B4ABA0;
  --line: #E9E4DA;
  --line-2: #F1EDE5;
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --bg: #F5F3ED;

  /* Dark frame */
  --dark: #16140F;
  --dark-2: #1E1B15;
  --dark-3: #2A261E;
  --dark-line: rgba(235, 212, 154, 0.10);
  --dark-line-2: rgba(255, 255, 255, 0.06);
  --dark-text: #ECE7DC;
  --dark-muted: #9B9488;
  --dark-faint: #6E685E;

  /* Status (soft) */
  --ok: #2E9E6B;     --ok-bg: #E7F4EC;   --ok-ink: #1E6E48;
  --warn: #C58A1E;   --warn-bg: #FAF0DB;  --warn-ink: #8A5E12;
  --bad: #C44A3D;    --bad-bg: #FAE9E7;   --bad-ink: #8E3128;
  --info: #3B6FA8;   --info-bg: #E9F0F8;  --info-ink: #2A5280;
  --slate: #5E6B72;  --slate-bg: #EDF0F1; --slate-ink: #41494E;
  --violet: #6E5BA8; --violet-bg: #EFEBF7;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 9px;
  --r: 13px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(28, 24, 19, 0.05);
  --shadow-card: 0 1px 2px rgba(28, 24, 19, 0.04), 0 3px 10px rgba(28, 24, 19, 0.045);
  --shadow-pop: 0 12px 40px rgba(28, 24, 19, 0.16), 0 2px 8px rgba(28, 24, 19, 0.08);
  --shadow-gold: 0 6px 20px rgba(168, 124, 42, 0.22);

  /* Density (scaled by tweaks) */
  --dsc: 1;
  --pad-card: calc(20px * var(--dsc));
  --gap: calc(18px * var(--dsc));
  --gap-sm: calc(12px * var(--dsc));
  --row-h: calc(48px * var(--dsc));

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-sans: 'Hanken Grotesk', system-ui, sans-serif;

  --sidebar-w: 252px;
  --sidebar-w-mini: 76px;
  --topbar-h: 64px;
  --agent-w: 372px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14.5px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--gold-soft); }

/* numbers */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(28,24,19,.14); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(28,24,19,.26); background-clip: padding-box; border: 3px solid transparent; }
.dark-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); background-clip: padding-box; }

/* ============================================================
   App shell
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}
.app.no-frame { --sidebar-w: 248px; }
.app.mini { --sidebar-w: var(--sidebar-w-mini); }
.sidebar { transition: none; }

/* edge collapse toggle */
.sb-collapse {
  position: absolute; top: 72px; right: -13px; z-index: 30;
  width: 26px; height: 26px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-2);
  box-shadow: var(--shadow-card); transition: background .14s, color .14s, transform .14s;
}
.sb-collapse:hover { color: var(--gold-3); border-color: var(--gold-line); transform: scale(1.08); }

/* collapsed (mini) sidebar */
.sidebar.mini .sb-brand { justify-content: center; padding: 18px 0 14px; }
.sidebar.mini .sb-brand .bt { display: none; }
.sidebar.mini .sb-search { justify-content: center; padding: 9px 0; margin: 4px 16px 12px; }
.sidebar.mini .sb-search span, .sidebar.mini .sb-search kbd { display: none; }
.sidebar.mini .sb-nav { padding: 4px 12px 12px; }
.sidebar.mini .nav-item { justify-content: center; padding: 11px 0; }
.sidebar.mini .nav-item span { display: none; }
.sidebar.mini .nav-item.active::before { left: -12px; }
.sidebar.mini .nav-badge { position: absolute; top: 5px; right: 11px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; }
.sidebar.mini .sb-group-label { text-align: center; letter-spacing: 0; padding: 14px 0 7px; font-size: 9px; }
.sidebar.mini .sb-user { justify-content: center; }
.sidebar.mini .sb-user .meta, .sidebar.mini .sb-user > svg { display: none; }

/* Sidebar */
.sidebar {
  background: var(--dark);
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(204,160,74,0.10) 0%, rgba(204,160,74,0) 60%);
  color: var(--dark-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--dark-line);
  position: relative;
  z-index: 20;
}
.sidebar.light {
  background: var(--surface);
  background-image: none;
  color: var(--ink);
  border-right: 1px solid var(--line);
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 16px;
}
.sb-brand img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.sb-brand .bt { display: flex; flex-direction: column; line-height: 1; }
.sb-brand .bt b {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: 0.045em;
  font-size: 15px;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sb-brand .bt span { font-size: 9px; letter-spacing: 0.22em; color: var(--dark-muted); margin-top: 4px; font-weight: 600; white-space: nowrap; }
.sidebar.light .bt span { color: var(--ink-3); }

.sb-search {
  margin: 4px 14px 12px;
  display: flex; align-items: center; gap: 8px;
  background: var(--dark-2);
  border: 1px solid var(--dark-line-2);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  color: var(--dark-muted);
  font-size: 12.5px;
}
.sidebar.light .sb-search { background: var(--surface-2); border-color: var(--line); color: var(--ink-3); }
.sb-search kbd {
  margin-left: auto; font-family: var(--font-sans); font-size: 10px;
  background: rgba(255,255,255,.06); border: 1px solid var(--dark-line-2);
  border-radius: 5px; padding: 1px 5px; color: var(--dark-faint);
}
.sidebar.light .sb-search kbd { background: var(--bg); border-color: var(--line); color: var(--ink-4); }

.sb-nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.sb-group-label {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--dark-faint); padding: 14px 10px 7px; font-weight: 700;
}
.sidebar.light .sb-group-label { color: var(--ink-4); }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--dark-muted); font-size: 13.5px; font-weight: 600;
  border: none; background: none; width: 100%; text-align: left;
  position: relative; transition: background .14s, color .14s;
  margin-bottom: 1px;
}
.nav-item:hover { background: var(--dark-2); color: var(--dark-text); }
.sidebar.light .nav-item { color: var(--ink-2); }
.sidebar.light .nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item.active {
  background: linear-gradient(100deg, rgba(204,160,74,0.18), rgba(204,160,74,0.06));
  color: #F3E4BE;
}
.sidebar.light .nav-item.active { background: var(--gold-soft); color: var(--gold-3); }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--gold-grad);
}
.nav-item.active svg { opacity: 1; color: var(--gold-1); }
.sidebar.light .nav-item.active svg { color: var(--gold-2); }
.nav-badge {
  margin-left: auto; font-size: 10.5px; font-weight: 700;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: var(--dark-text);
}
.nav-badge.alert { background: var(--bad); color: #fff; }
.sidebar.light .nav-badge { background: var(--bg); color: var(--ink-2); }

.sb-foot { padding: 12px 14px; border-top: 1px solid var(--dark-line-2); }
.sidebar.light .sb-foot { border-color: var(--line); }
.sb-user { display: flex; align-items: center; gap: 10px; }
.sb-user .meta { line-height: 1.25; }
.sb-user .meta b { font-size: 12.5px; font-weight: 600; }
.sb-user .meta span { font-size: 11px; color: var(--dark-muted); display: block; }
.sidebar.light .sb-user .meta span { color: var(--ink-3); }

/* Main column */
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: hidden; background: var(--bg); position: relative; }

/* Top bar */
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 26px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 15;
}
.tb-title { display: flex; flex-direction: column; line-height: 1.1; }
.tb-title h1 { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.03em; margin: 0; }
.tb-title .crumb { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.tb-search {
  margin-left: 20px; flex: 1; max-width: 440px;
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 8px 15px;
  color: var(--ink-3); font-size: 13px; transition: border-color .15s, box-shadow .15s;
}
.tb-search:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); }
.tb-search input { border: none; outline: none; background: none; flex: 1; font-size: 13px; color: var(--ink); }
.tb-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; color: var(--ink-2);
  position: relative; transition: background .14s, border-color .14s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--gold-line); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 99px; background: var(--bad); border: 1.5px solid var(--surface); }

/* Scroll body */
.screen { flex: 1; overflow-y: auto; }
.screen-pad { padding: 24px 26px 40px; }

/* Overview grid: ops + agent */
.ov-grid { display: grid; grid-template-columns: 1fr var(--agent-w); gap: var(--gap); align-items: start; }
@media (max-width: 1180px) { .ov-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Cards & primitives
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: var(--pad-card); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 16px var(--pad-card) 0; }
.card-h .ch-ic {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.card-h h3 { font-family: var(--font-display); font-weight: 680; font-size: 17.5px; margin: 0; letter-spacing: -0.025em; }
.card-h .sub { font-size: 11.5px; color: var(--ink-3); }
.card-h .link { margin-left: auto; font-size: 12px; color: var(--gold-3); font-weight: 600; background: none; border: none; display: flex; align-items: center; gap: 3px; }
.card-h .link:hover { color: var(--gold-2); }

.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (max-width: 760px) { .module-grid { grid-template-columns: 1fr; } }

/* Stat tiles */
.stat-row { display: flex; gap: var(--gap-sm); flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 0;
  padding: 13px 14px; border-radius: var(--r); background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.stat .lbl { font-size: 11.5px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 5px; letter-spacing: 0; }
.stat .val { font-family: var(--font-display); font-weight: 700; font-size: 29px; letter-spacing: -0.035em; margin-top: 4px; line-height: 1; }
.stat .val small { font-size: 13px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.stat .delta { font-size: 11px; font-weight: 600; margin-top: 5px; display: inline-flex; align-items: center; gap: 3px; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); } .delta.flat { color: var(--ink-3); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill);
  white-space: nowrap; line-height: 1.4; letter-spacing: -0.005em;
}
.badge .bd { width: 6px; height: 6px; border-radius: 99px; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); } .badge.ok .bd { background: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); } .badge.warn .bd { background: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); } .badge.bad .bd { background: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info-ink); } .badge.info .bd { background: var(--info); }
.badge.slate { background: var(--slate-bg); color: var(--slate-ink); } .badge.slate .bd { background: var(--slate); }
.badge.gold { background: var(--gold-soft); color: var(--gold-3); } .badge.gold .bd { background: var(--gold-2); }
.badge.violet { background: var(--violet-bg); color: var(--violet); } .badge.violet .bd { background: var(--violet); }
.badge.outline { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

/* Pills / tabs */
.tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; }
.tab { border: none; background: none; padding: 6px 14px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.tab .cnt { font-size: 10.5px; background: var(--bg); border-radius: 99px; padding: 0 6px; color: var(--ink-3); }
.tab.active .cnt { background: var(--gold-soft); color: var(--gold-3); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background .14s, border-color .14s, transform .05s;
  letter-spacing: -0.01em;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-4); }
.btn.gold { background: var(--gold-grad); border-color: transparent; color: #2A2008; box-shadow: var(--shadow-gold); }
.btn.gold:hover { filter: brightness(1.04); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #000; }
.btn.ghost { background: none; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { filter: brightness(1.05); }
.btn.danger-ghost { color: var(--bad-ink); border-color: var(--bad-bg); background: var(--bad-bg); }
.btn.danger-ghost:hover { background: #F6DDDA; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.04em; padding: 12px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 14px 14px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s; cursor: pointer; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr.sel { background: var(--gold-soft); }
.tbl .cust { display: flex; align-items: center; gap: 10px; }
.tbl .money { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Avatar */
.avatar {
  width: 32px; height: 32px; border-radius: 99px; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  color: #fff; font-family: var(--font-display); letter-spacing: 0;
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 46px; height: 46px; font-size: 16px; }

/* Route display */
.route { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.route .arr { color: var(--ink-4); font-size: 11px; }
.route .iata { letter-spacing: 0.02em; }

/* progress / mini bars */
.pbar { height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.pbar > i { display: block; height: 100%; border-radius: 99px; }

/* segmented status breakdown bar */
.seg { display: flex; height: 9px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--line-2); }
.seg > i { height: 100%; }

/* Section title */
.sec-title { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.sec-title h2 { font-family: var(--font-display); font-weight: 680; font-size: 17px; margin: 0; letter-spacing: -0.025em; }
.sec-title .ln { flex: 1; height: 1px; background: var(--line); }

/* Filter bar */
.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.fb-input {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; color: var(--ink-3); font-size: 13px;
}
.fb-input input { border: none; outline: none; background: none; font-size: 13px; color: var(--ink); width: 160px; }
.fb-select {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 12px; font-size: 13px; color: var(--ink); font-weight: 500;
}

/* Detail drawer */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(28,24,19,.32); backdrop-filter: blur(2px);
  z-index: 40; animation: fade .18s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 520px; max-width: 94vw;
  background: var(--surface); z-index: 41; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; animation: slideIn .24s cubic-bezier(.2,.8,.2,1);
  border-left: 1px solid var(--line);
}
.drawer-h { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 32px; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; background: var(--surface-2); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Detail field list */
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.dl .f .k { font-size: 11px; color: var(--ink-3); font-weight: 500; margin-bottom: 3px; }
.dl .f .v { font-size: 13.5px; font-weight: 600; }
.dl .f.full { grid-column: 1 / -1; }

/* Timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1.5px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content: ''; position: absolute; left: -19px; top: 3px; width: 11px; height: 11px; border-radius: 99px; background: var(--surface); border: 2px solid var(--gold-2); }
.tl-item.agent::before { border-color: var(--gold-2); background: var(--gold-soft); }
.tl-item .tt { font-size: 13px; font-weight: 600; }
.tl-item .tm { font-size: 11px; color: var(--ink-3); margin-top: 1px; }

/* utility */
.muted { color: var(--ink-3); }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap5 { gap: 5px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }

/* follow-up rows on overview */
.fu-row { transition: border-color .14s, background .14s; }
.fu-row:hover { border-color: var(--gold-line); background: var(--surface-2); }
.fu-acts { opacity: .55; transition: opacity .14s; }
.fu-row:hover .fu-acts { opacity: 1; }

/* agent feed items */
.feed-item:hover { background: var(--surface-2); }
.feed-item:hover .feed-chev { opacity: 1; }

/* ============================================================
   Operations timeline
   ============================================================ */
.tl-card { overflow: visible; }
.tl-pad { padding: 4px var(--pad-card) 14px; }
.tl-track {
  position: relative; height: 220px; width: 100%;
}
.tl-track.big { height: 100%; }
/* upcoming region soft wash */
.tl-region-fill {
  position: absolute; top: 26px; bottom: 26px; right: 0;
  background: repeating-linear-gradient(45deg, var(--surface-2) 0 9px, transparent 9px 18px);
  opacity: .55; border-left: 1px dashed var(--line); border-radius: 0 8px 8px 0;
}
/* axis */
.tl-axis {
  position: absolute; top: 50%; left: 0; right: 0; height: 3px;
  transform: translateY(-50%); border-radius: 99px;
  background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 12px);
}
.tl-axis.done { background: var(--gold-grad); box-shadow: 0 1px 6px rgba(168,124,42,.3); }
/* corner edge labels */
.tl-edge {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-4); background: var(--surface); padding: 3px 7px; z-index: 1; border-radius: 5px;
}
.tl-edge.left { left: -4px; }
.tl-edge.right { right: -4px; }
/* today marker */
.tl-today { position: absolute; top: 0; bottom: 0; z-index: 5; pointer-events: none; }
.tl-today-line {
  position: absolute; top: 14px; bottom: 14px; left: 0; width: 2px; transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, var(--gold-2) 16%, var(--gold-2) 84%, transparent);
  opacity: .5;
}
.tl-today-pill {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em; color: #2A2008;
  background: var(--gold-grad); padding: 5px 11px; border-radius: 99px;
  box-shadow: var(--shadow-gold); z-index: 6;
}
/* iconic nodes */
.tl-node { position: absolute; top: 0; bottom: 0; width: 0; }
.tl-dot {
  position: absolute; top: 50%; left: 0; width: 11px; height: 11px; border-radius: 50%;
  transform: translate(-50%, -50%); z-index: 3;
}
.tl-stem { position: absolute; left: 0; width: 2px; transform: translateX(-50%); z-index: 1; }
.tl-stem.top { bottom: 50%; height: 34px; }
.tl-stem.bottom { top: 50%; height: 34px; }
.tl-iwrap { position: absolute; left: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; z-index: 2; }
.tl-iwrap.top { bottom: calc(50% + 34px); flex-direction: column; }
.tl-iwrap.bottom { top: calc(50% + 34px); flex-direction: column-reverse; }
.tl-ibtn {
  border: none; background: none; padding: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; transition: transform .14s;
}
.tl-idisc {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: #fff;
  box-shadow: 0 0 0 3px var(--surface), var(--shadow-card); transition: box-shadow .14s;
}
.tl-ibtn:hover, .tl-ibtn.on { transform: translateY(-2px) scale(1.06); }
.tl-ibtn:hover .tl-idisc, .tl-ibtn.on .tl-idisc { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c), var(--shadow-pop); }
.tl-ibtn.now .tl-idisc { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--gold-line), var(--shadow-gold); }
.tl-icap {
  font-size: 11px; font-weight: 600; color: var(--ink-2); text-align: center; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em;
}
.tl-track.big .tl-icap { font-size: 12px; }
/* tooltip — always on top */
.tl-tip {
  position: absolute; left: 0; width: 248px; z-index: 80;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 12px 13px;
  animation: tlTip .14s ease; pointer-events: none;
}
.tl-iwrap.top .tl-tip { bottom: calc(100% + 10px); }
.tl-iwrap.bottom .tl-tip { top: calc(100% + 10px); }
@keyframes tlTip { from { opacity: 0; transform: translateX(-50%) translateY(4px); } }
.tl-tip-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.tl-tip-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tl-tip-date { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.tl-tip-title { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.tl-tip-detail { font-size: 12px; color: var(--ink-2); margin-top: 5px; line-height: 1.5; }
.tl-tip-flag { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 11px; font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); padding: 4px 9px; border-radius: 99px; }

/* timeline drop-down panel (under the top bar) */
.tl-panel {
  position: absolute; top: var(--topbar-h); left: 0; right: 0; z-index: 30;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; height: 332px;
  animation: tlDrop .26s cubic-bezier(.2,.85,.2,1);
}
@keyframes tlDrop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.tl-panel-head { display: flex; align-items: center; gap: 14px; padding: 13px 22px; border-bottom: 1px solid var(--line-2); }
.tl-draghint { font-size: 11px; font-weight: 600; color: var(--ink-4); }
.tl-ctl { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; }
.tl-ctl-btn { border: none; background: none; min-width: 32px; height: 30px; padding: 0 10px; border-radius: var(--r-xs); display: grid; place-items: center; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.tl-ctl-btn:hover:not(:disabled) { background: var(--surface); color: var(--gold-3); box-shadow: var(--shadow-xs); }
.tl-ctl-btn:disabled { opacity: .35; cursor: not-allowed; }
.tl-zoom { font-size: 12px; font-weight: 700; color: var(--ink); min-width: 42px; text-align: center; }
.tl-panel-body { flex: 1; padding: 12px 34px 8px; position: relative; overflow: visible; cursor: grab; touch-action: pan-y; }
.tl-panel-body.dragging { cursor: grabbing; }
.tl-panel-body.dragging .tl-tip { display: none; }
.tl-jump { display: flex; align-items: center; margin-left: 4px; padding-left: 6px; border-left: 1px solid var(--line); }
.tl-jump .select-wrap { width: 142px; }
.tl-jump .control { padding: 5px 10px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-xs); }
.tl-jump .select-value { font-size: 12.5px; }

/* ============================================================
   Deniz chat panel
   ============================================================ */
.deniz-chat {
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden; padding: 0;
}
.deniz-head {
  display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  background: linear-gradient(120deg, #1A1710, #221E16); color: var(--dark-text);
  border-radius: var(--r-lg) var(--r-lg) 0 0; flex: none;
}
.deniz-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 14px; background: var(--surface-2); }
.chat-row { display: flex; gap: 9px; align-items: flex-start; }
.chat-row.user { justify-content: flex-end; }
.chat-av { width: 28px; height: 28px; border-radius: 9px; background: var(--gold-grad); display: grid; place-items: center; flex: none; box-shadow: var(--shadow-xs); }
.chat-stack { display: flex; flex-direction: column; gap: 7px; max-width: 84%; }
.chat-bubble {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px 13px 13px 13px;
  padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.chat-bubble.alert { border-color: #F0CFCB; background: var(--bad-bg); }
.chat-bubble.user { background: var(--ink); color: #fff; border: none; border-radius: 13px 13px 4px 13px; max-width: 84%; }
.chat-bubble.typing { padding: 12px 14px; }
.chat-msg-ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.chat-jump { border: none; background: none; color: var(--ink-4); padding: 0; margin-left: auto; flex: none; align-self: center; }
.chat-jump:hover { color: var(--gold-3); }
.chat-meta { font-size: 10.5px; color: var(--ink-4); padding-left: 4px; font-weight: 500; }
.chat-card { background: var(--surface); border: 1px solid var(--gold-line); border-radius: 12px; padding: 12px 13px; box-shadow: var(--shadow-xs); }
.chat-resolved { font-size: 12px; font-weight: 600; color: var(--ok-ink); padding: 4px 2px; align-items: center; }
.deniz-foot { flex: none; border-top: 1px solid var(--line); padding: 11px 12px; background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.deniz-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.deniz-chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px; transition: border-color .14s, color .14s; }
.deniz-chip:hover { border-color: var(--gold-line); color: var(--gold-3); }
.deniz-input { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 5px 5px 5px 14px; transition: border-color .15s, box-shadow .15s; }
.deniz-input:focus-within { border-color: var(--gold-2); box-shadow: 0 0 0 4px var(--gold-soft); }
.deniz-input input { flex: 1; border: none; outline: none; background: none; font-size: 13.5px; color: var(--ink); font-family: var(--font-sans); }
.deniz-send { width: 34px; height: 34px; border-radius: 99px; border: none; background: var(--gold-grad); color: #2A2008; display: grid; place-items: center; flex: none; box-shadow: var(--shadow-gold); }
.deniz-send:hover { filter: brightness(1.05); }

/* floating chat widget */
.deniz-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 58;
  width: 60px; height: 60px; border-radius: 50%; border: none;
  background: var(--gold-grad); box-shadow: var(--shadow-gold), var(--shadow-pop);
  display: grid; place-items: center; animation: fabIn .3s cubic-bezier(.2,.85,.2,1);
}
.deniz-fab::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold-2); opacity: .5; animation: ping 2.4s ease-out infinite; }
.deniz-fab:hover { filter: brightness(1.05); transform: translateY(-2px); }
.deniz-fab-badge {
  position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 99px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface); z-index: 1;
}
@keyframes fabIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.deniz-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 59;
  width: 408px; max-width: calc(100vw - 48px); height: min(720px, 82vh);
  border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  display: flex; overflow: hidden; border: 1px solid var(--line);
  animation: floatIn .26s cubic-bezier(.2,.85,.2,1); transform-origin: bottom right;
}
@keyframes floatIn { from { transform: scale(.9) translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.deniz-float .deniz-chat { border-radius: var(--r-lg); }
.deniz-min { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--dark-line-2); background: rgba(255,255,255,.06); color: var(--dark-muted); display: grid; place-items: center; margin-left: 2px; }
.deniz-min:hover { background: rgba(255,255,255,.12); color: var(--dark-text); }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; }
.center { display: grid; place-items: center; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.fdisp { font-family: var(--font-display); letter-spacing: -0.02em; }
.fw7 { font-weight: 700; } .fw6 { font-weight: 600; }
.f11 { font-size: 11px; } .f12 { font-size: 12px; } .f13 { font-size: 13px; }

/* fade-in for screens */
.screen-in { animation: screenIn .28s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* live pulse */
.pulse { position: relative; }
.live-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--ok); position: relative; flex: none; }
.live-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 99px; border: 2px solid var(--ok); opacity: .5; animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.7); opacity: .6; } 100% { transform: scale(1.7); opacity: 0; } }

/* ============================================================
   Form components
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 5px; letter-spacing: -0.005em; }
.field-label .req { color: var(--bad); font-weight: 700; }
.field-hint { font-size: 11.5px; color: var(--ink-3); }
.control {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 13px; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.control:focus-within, .control.focus { border-color: var(--gold-2); box-shadow: 0 0 0 4px var(--gold-soft); }
.control.invalid { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.control input { border: none; outline: none; background: none; font-size: 14px; color: var(--ink); width: 100%; font-weight: 500; font-family: var(--font-sans); }
.control input::placeholder { color: var(--ink-4); }
.control-suffix { font-size: 12.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.control-area { align-items: stretch; padding: 11px 13px; }
.control-area textarea { border: none; outline: none; background: none; resize: vertical; font-size: 14px; color: var(--ink); width: 100%; font-weight: 500; font-family: var(--font-sans); line-height: 1.5; min-height: 64px; }
.control-btn { cursor: pointer; text-align: left; }
.select-wrap { position: relative; display: block; width: 100%; }
.select-value { flex: 1; font-size: 14px; font-weight: 500; color: var(--ink); }
.select-value.ph { color: var(--ink-4); }
.po-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.popover {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-pop); padding: 6px; max-height: 260px; overflow-y: auto;
  animation: tlTip .14s ease;
}
.popover-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 10px; border: none; background: none; border-radius: var(--r-xs);
  font-size: 13.5px; font-weight: 500; color: var(--ink); transition: background .12s;
}
.popover-item:hover { background: var(--surface-2); }
.popover-item.sel { background: var(--gold-soft); color: var(--gold-3); font-weight: 600; }
/* segmented */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px; border: none; background: none;
  padding: 7px 14px; border-radius: var(--r-xs); font-size: 13px; font-weight: 600; color: var(--ink-3);
  transition: background .12s, color .12s;
}
.seg-opt:hover { color: var(--ink); }
.seg-opt.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
/* stepper */
.stepper { justify-content: space-between; gap: 0; padding: 5px 6px; }
.step-btn { width: 32px; height: 32px; border-radius: var(--r-xs); border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink); font-size: 16px; }
.step-btn:hover:not(:disabled) { border-color: var(--gold-2); color: var(--gold-3); }
.step-btn:disabled { opacity: .4; cursor: not-allowed; }
.step-sign { font-size: 18px; line-height: 1; font-weight: 600; }
.step-val { font-size: 14px; font-weight: 600; }
/* toggle */
.toggle-row { display: inline-flex; align-items: center; gap: 10px; border: none; background: none; padding: 0; }
.toggle { width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .16s; flex: none; }
.toggle.on { background: var(--gold-2); }
.toggle .knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 99px; background: #fff; box-shadow: var(--shadow-xs); transition: transform .16s; }
.toggle.on .knob { transform: translateX(16px); }
.toggle-label { font-size: 13.5px; font-weight: 500; color: var(--ink); }
/* calendar */
.popover.cal { padding: 12px; width: 268px; left: 0; right: auto; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font-family: var(--font-display); font-size: 14.5px; font-weight: 680; letter-spacing: -0.02em; }
.cal-nav { width: 28px; height: 28px; border-radius: var(--r-xs); border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); }
.cal-nav:hover { border-color: var(--gold-2); color: var(--gold-3); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.cal-dow span { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--ink-4); padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day { aspect-ratio: 1; border: none; background: none; border-radius: var(--r-xs); font-size: 12.5px; font-weight: 600; color: var(--ink); display: grid; place-items: center; }
.cal-day:hover { background: var(--surface-2); }
.cal-day.today { color: var(--gold-3); box-shadow: inset 0 0 0 1.5px var(--gold-line); }
.cal-day.sel { background: var(--gold-grad); color: #2A2008; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 11px;
  background: var(--ink); color: #fff; padding: 12px 18px 12px 13px;
  border-radius: var(--r-pill); box-shadow: var(--shadow-pop);
  animation: toastIn .26s cubic-bezier(.2,.8,.2,1);
}
.toast .f13 { color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============================================================
   Ask Deniz — command surface
   ============================================================ */
.ask-trigger {
  margin-left: 20px; flex: 1; max-width: 460px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 7px 10px 7px 8px;
  color: var(--ink-3); font-size: 13.5px; font-weight: 500; text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ask-trigger:hover { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); background: var(--surface); }
.ask-trigger .grow { flex: 1; }
.ask-trigger kbd { font-family: var(--font-sans); font-size: 10.5px; font-weight: 600; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--ink-4); }
.ask-scrim {
  position: fixed; inset: 0; background: rgba(28,24,19,.34); backdrop-filter: blur(3px);
  z-index: 70; display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh; animation: fade .16s ease;
}
.ask-modal {
  width: 600px; max-width: 92vw; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  overflow: hidden; animation: askIn .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes askIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.ask-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.ask-input { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.ask-input input { border: none; outline: none; background: none; flex: 1; font-size: 17px; font-weight: 500; color: var(--ink); font-family: var(--font-sans); letter-spacing: -0.01em; }
.ask-input input::placeholder { color: var(--ink-4); }
.ask-input kbd { font-family: var(--font-sans); font-size: 11px; font-weight: 600; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--ink-4); }
.ask-body { padding: 12px; max-height: 50vh; overflow-y: auto; }
.ask-label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); padding: 6px 8px; }
.ask-sug { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 10px; border: none; background: none; border-radius: var(--r-sm); transition: background .12s; }
.ask-sug:hover { background: var(--surface-2); }
.ask-thinking { display: flex; align-items: center; gap: 12px; padding: 22px 12px; }
.ask-dots { display: inline-flex; gap: 5px; }
.ask-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--gold-2); animation: askDot 1s ease-in-out infinite; }
.ask-dots i:nth-child(2) { animation-delay: .16s; }
.ask-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes askDot { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.ask-result { padding: 14px 12px 6px; }
