/* FLOW UI Kit — tokens mirror the Figma variables (Brand Guidelines / UI Kit). */
:root {
  --blue: #2D5BFF; --blue-hover: #1F47E6; --blue-50: #EEF2FF; --blue-100: #DCE4FF; --blue-300: #93A9FF;
  --ink: #0B1020; --ink-800: #1B2238;
  --canvas: #F4F6FA; --surface: #FFFFFF; --subtle: #F7F8FB;
  --border: #E8ECF3; --border-strong: #D5DBE7;
  --text: #0B1020; --text-2: #5B6478; --text-3: #98A1B3;
  --success: #12A867; --success-bg: #E6F7EF; --warning: #F59E0B; --warning-bg: #FEF5E6;
  --danger: #F04438; --danger-bg: #FEECEB; --info: #2D5BFF; --info-bg: #EEF2FF;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 24px;
  --shadow: 0 1px 2px rgba(15,23,41,.04), 0 8px 24px -4px rgba(15,23,41,.05);
  --float: 0 20px 48px -8px rgba(15,23,41,.12);
  --glow: 0 8px 20px -6px rgba(46,92,255,.28);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--canvas); color: var(--text);
  font: 500 14px/1.45 "Plus Jakarta Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- shell (Figma: Sidebar 264 · Top bar 64) */
.shell { display: grid; grid-template-columns: 264px 1fr; gap: 24px; min-height: 100vh; padding: 16px; }
.sidebar { background: var(--surface); border-radius: var(--r-xl); padding: 20px 16px 16px; box-shadow: var(--shadow);
  position: sticky; top: 16px; height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.sidebar .logo-row { padding: 0 0 12px 8px; } .sidebar .logo { height: 24px; width: 133px; object-fit: contain; object-position: left; display: block; }
.menu-label { font-size: 11px; font-weight: 700; letter-spacing: .66px; text-transform: uppercase; color: var(--text-3); padding: 14px 0 4px 10px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px 0 8px; border-radius: 14px; color: var(--text-2); flex: none; }
.nav-item .ib { width: 32px; height: 32px; border-radius: 10px; background: var(--subtle); display: grid; place-items: center; color: var(--ink); }
.nav-item .ib svg { opacity: .6; } .nav-item .lbl { flex: 1; } .nav-item > svg { color: var(--text-3); }
.nav-item:hover { background: var(--subtle); }
.nav-item.on { color: var(--text); font-weight: 600; } .nav-item.on .ib { background: var(--blue-50); color: var(--blue); } .nav-item.on .ib svg { opacity: 1; }
.nav-sub { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 52px; border-radius: 12px; color: var(--text-2); flex: none; }
.nav-sub:hover { background: var(--subtle); color: var(--text); }
.nav-sub.active { background: var(--blue); color: #fff; font-weight: 600; box-shadow: var(--glow); }
.nav-sub .count { font-size: 12px; font-weight: 600; background: var(--blue-50); color: var(--blue); border-radius: 99px; padding: 2px 8px; margin-left: auto; }
.nav-sub.active .count { background: #fff; }
.main { padding: 0 0 40px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; height: 64px; margin: 0 0 20px; }
.crumbs small { color: var(--text-3); font-weight: 500; display: block; font-size: 12px; line-height: 1.4; }
.crumbs h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.18px; line-height: 1.35; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; height: 44px; padding: 0 8px 0 16px;
  box-shadow: var(--shadow); width: 340px; color: var(--text-3); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.search kbd { font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1; background: var(--subtle); color: var(--text-3); border-radius: 999px; padding: 6px 8px; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--ink); cursor: pointer; flex: none; }
.icon-btn.dot::after { content: ""; position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); height: 44px; padding: 0 12px 0 6px;
  border-radius: 999px; box-shadow: var(--shadow); cursor: pointer; color: var(--text-3); }
.user-chip b { display: block; font-size: 13px; color: var(--text); font-weight: 600; line-height: 1.2; } .user-chip small { color: var(--text-3); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-50); color: var(--blue);
  font-weight: 600; font-size: 12px; display: grid; place-items: center; flex: none; }
.page-actions { display: flex; gap: 10px; justify-content: flex-end; margin: -8px 0 20px; flex-wrap: wrap; }
.pop { position: fixed; z-index: 40; background: var(--surface); border-radius: 18px; box-shadow: var(--float); padding: 6px; min-width: 220px; max-width: 380px; display: grid; }
.pop button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.pop button:hover { background: var(--subtle); }

/* ---------- blocks */
.grid { display: grid; gap: 20px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 20px; }
.card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.kpi { cursor: default; } .kpi.click { cursor: pointer; } .kpi.click:hover { box-shadow: var(--float); }
.kpi { border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 6px; }
.kpi .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; margin-bottom: 8px; }
.kpi .label { color: var(--text-2); font-weight: 500; }
.kpi .value { font-size: 28px; font-weight: 700; letter-spacing: -.56px; line-height: 1.2; }
.kpi .caption { color: var(--text-3); font-size: 12px; line-height: 1.4; }
.kpi.loss .value { color: var(--danger); }
.mt { margin-top: 20px; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .spacer { flex: 1; }
.muted { color: var(--text-3); } .neg { color: var(--danger); font-weight: 600; } .pos { color: var(--success); font-weight: 600; }

/* ---------- controls */
.btn { border: 0; border-radius: 999px; height: 40px; padding: 0 18px; font-weight: 600; cursor: pointer; background: var(--blue);
  color: #fff; box-shadow: var(--glow); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--blue-hover); }
.btn.dark { background: var(--ink); box-shadow: none; } .btn.secondary { background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border-strong); } .btn.ghost { background: transparent; color: var(--blue); box-shadow: none; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; } .btn.danger { background: var(--danger); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: default; }
.tabs { display: inline-flex; background: var(--surface); border-radius: 99px; padding: 4px; box-shadow: var(--shadow); gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 99px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.tabs button.on { background: var(--ink); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border); font-weight: 600; font-size: 12px; cursor: pointer; }
.chip.on { background: var(--blue-50); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue-300); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.3; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-success { background: var(--success-bg); color: var(--success); } .b-warning { background: var(--warning-bg); color: #D97706; }
.b-danger { background: var(--danger-bg); color: var(--danger); } .b-info { background: var(--info-bg); color: var(--blue); }
.b-neutral { background: var(--subtle); color: var(--text-2); } .b-dark { background: var(--ink); color: #fff; }
label.f { display: block; margin-bottom: 12px; } label.f span { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.inp, select.inp, textarea.inp { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 10px 12px;
  background: var(--surface); outline: 0; }
.inp:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---------- table */
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
.t th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3);
  font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.t td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: var(--subtle); }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 36px; color: var(--text-3); }
.flag { font-size: 18px; margin-right: 6px; }

/* ---------- overlay */
.overlay { position: fixed; inset: 0; background: rgba(11,16,32,.36); display: flex; justify-content: flex-end; z-index: 20; }
.drawer { width: min(720px, 100%); background: var(--canvas); height: 100%; overflow: auto; padding: 24px;
  border-radius: var(--r-xl) 0 0 var(--r-xl); box-shadow: var(--float); }
.overlay.center { justify-content: center; align-items: center; }
.modal { width: min(560px, 94%); background: var(--surface); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--float);
  max-height: 90vh; overflow: auto; }
.modal h2, .drawer h2 { margin: 0 0 16px; font-size: 20px; font-weight: 800; }
.x { float: right; border: 0; background: var(--subtle); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.btn.x { float: none; width: auto; height: auto; border-radius: 999px; }
.timeline div { padding: 8px 0; border-bottom: 1px dashed var(--border); } .timeline small { color: var(--text-3); }
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 50; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--float); max-width: 380px; }
.toast.err { background: var(--danger); }
.secret { font: 600 16px ui-monospace, monospace; background: var(--blue-50); color: var(--blue); padding: 12px; border-radius: var(--r-sm); }

/* ---------- loyalty card (Card / Loyalty in Figma) */
.loyalty-card { position: relative; width: 100%; max-width: 420px; aspect-ratio: 560/352; border-radius: 24px; padding: 22px;
  color: #fff; overflow: hidden; background: linear-gradient(120deg, var(--ink) 0%, #1B2B78 50%, var(--blue) 100%); box-shadow: var(--glow); }
.loyalty-card::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; pointer-events: none; }
.loyalty-card .name { font-weight: 800; letter-spacing: .12em; font-size: 12px; }
.loyalty-card .bal { font-size: 40px; font-weight: 800; margin-top: 22px; }
.loyalty-card .foot { position: absolute; left: 22px; right: 22px; bottom: 20px; display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: .08em; opacity: .9; }

/* ---------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .hero { background: linear-gradient(140deg, var(--ink), #16205A 55%, var(--blue)); color: #fff; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between; border-radius: 0 var(--r-xl) var(--r-xl) 0; }
.login .hero h1 { font-size: 44px; line-height: 1.08; letter-spacing: -.03em; margin: 0 0 14px; }
.login .hero p { opacity: .8; max-width: 440px; }
.login .form { display: grid; place-items: center; padding: 40px; } .login .form .card { width: 380px; padding: 32px; }
.bar { height: 8px; background: var(--subtle); border-radius: 99px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .search { display: none; } }
@media (max-width: 800px) { .shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; margin: 12px; }
  .login { grid-template-columns: 1fr; } .login .hero { display: none; } .g3, .g2, .fgrid { grid-template-columns: 1fr; } }

/* ---------- sign in (Figma 00 · Login) */
.login2 { min-height: 100vh; display: grid; grid-template-columns: 1fr 660px; gap: 16px; padding: 16px; }
.lf-panel { background: var(--surface); border-radius: var(--r-xl); padding: 48px 96px 40px; display: flex; flex-direction: column; min-height: calc(100vh - 32px); }
.lf-logo { height: 27px; width: 150px; object-fit: contain; object-position: left; }
.spacer-v { flex: 1; min-height: 24px; }
.lf-form { display: flex; flex-direction: column; gap: 18px; max-width: 520px; width: 100%; }
.lf-form h1 { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -1.2px; margin: 0; }
.lf-sub { margin: 0 0 6px; color: var(--text-2); font-weight: 500; }
.lf-field { display: flex; flex-direction: column; gap: 8px; } .lf-field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.lf-input { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-radius: 999px; background: var(--subtle);
  border: 1px solid var(--border); color: var(--text-3); transition: .15s; }
.lf-input input { flex: 1; border: 0; outline: 0; background: transparent; font-weight: 500; color: var(--text); min-width: 0; }
.lf-input:focus-within { background: var(--surface); border: 1.5px solid var(--blue); box-shadow: 0 0 0 4px rgba(46,92,255,.15); color: var(--text-2); }
.lf-input.is-ro { color: var(--text-2); } .lf-input.is-ro b { color: var(--text); font-weight: 500; }
.lf-eye { border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 0; display: grid; }
.lf-row { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; } .lf-row a { font-weight: 600; }
.switch { position: relative; width: 40px; height: 24px; flex: none; } .switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--blue); } .switch input:checked + i::after { left: 19px; }
.lf-btn { width: 100%; height: 52px; }
.lf-foot { font-size: 12px; }
.lf-show { position: relative; overflow: hidden; background: var(--ink); border-radius: var(--r-xl); color: #fff; padding: 72px 64px 64px;
  display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.lf-show .orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.lf-show .orb.a { width: 520px; height: 520px; left: 260px; top: -160px; background: rgba(45,91,255,.55); }
.lf-show .orb.b { width: 420px; height: 420px; left: -200px; top: 620px; background: rgba(45,91,255,.35); }
.lf-show h2 { position: relative; font-size: 34px; line-height: 1.25; letter-spacing: -.68px; margin: 0; font-weight: 700; }
.lf-show p { position: relative; margin: 0; color: var(--blue-100); font-weight: 500; }
.lf-float { position: relative; height: 420px; width: 532px; max-width: 100%; color: var(--text); }
.lf-float .card { position: absolute; border-radius: 20px; box-shadow: 0 20px 48px -8px rgba(15,23,41,.12); }
.lf-float .f1 { left: 0; top: 0; width: 280px; padding: 20px; } .lf-float .f2 { left: 232px; top: 120px; width: 290px; padding: 16px; border-radius: 22px; }
.lf-float .f3 { left: 40px; top: 290px; border-radius: 999px; padding: 12px 18px 12px 14px; gap: 12px; }
.bubble { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.bubble.ok { background: var(--success-bg); color: var(--success); }
.mt-6 { margin-top: 8px; } .pos-blue { color: var(--blue); font-weight: 500; }
.lf-tags { position: relative; gap: 8px; flex-wrap: wrap; } .lf-tags span { background: rgba(255,255,255,.1); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; }
@media (max-width: 1100px) { .login2 { grid-template-columns: 1fr; } .lf-show { display: none; } .lf-panel { padding: 40px 28px; } }

/* ---------- home (Figma 00 · Home) */
.grow { flex: 1; min-width: 0; } .grow b, .grow small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow b { font-weight: 600; } .grow small { color: var(--text-3); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: 28px; padding: 28px 28px 28px 32px; display: flex; gap: 24px; align-items: center; }
.hero .orb { position: absolute; left: 380px; top: -260px; width: 460px; height: 460px; border-radius: 50%; background: rgba(45,91,255,.7); filter: blur(100px); pointer-events: none; }
.hero .grow { position: relative; } .hero h2 { margin: 0 0 8px; font-size: 28px; font-weight: 700; letter-spacing: -.56px; line-height: 1.25; }
.hero p { margin: 0; color: var(--blue-100); max-width: 420px; }
.hero-tiles { position: relative; display: flex; gap: 12px; }
.hero-tile { width: 148px; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); color: #fff; }
.hero-tile:hover { background: rgba(255,255,255,.14); }
.hero-tile .hb { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; }
.hero-tile b { font-size: 28px; font-weight: 700; letter-spacing: -.56px; line-height: 1.2; white-space: nowrap; } .hero-tile small { font-size: 12px; color: var(--blue-100); white-space: nowrap; }
.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.home-grid .card { padding: 22px; display: flex; flex-direction: column; gap: 6px; } .home-grid .span2 { grid-column: span 2; gap: 14px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; } .card-head h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.18px; line-height: 1.35; }
.card-head small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }
.link-btn { border: 0; background: none; color: var(--blue); font-weight: 600; cursor: pointer; padding: 0 18px; height: 40px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.add-task { padding: 0; height: 32px; align-self: flex-start; margin-top: auto; }
.li-row { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 18px; color: inherit; cursor: pointer; }
.li-row:hover { background: var(--subtle); } .li-row.late { background: var(--danger-bg); }
.task { display: flex; gap: 12px; align-items: center; padding: 9px 0; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: #fff; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; color: #fff; }
.task.done .tick { background: var(--blue); border-color: var(--blue); } .task.done b { color: var(--text-3); font-weight: 500; }
.pay { display: flex; gap: 10px; align-items: center; padding: 8px 0; } .pay .amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.bubble.plain { background: var(--subtle); color: var(--ink); width: 34px; height: 34px; } .pay .bubble { width: 34px; height: 34px; }
.bubble.blue { background: var(--blue); color: #fff; width: 32px; height: 32px; } .bubble.ink { background: var(--ink); color: #fff; width: 32px; height: 32px; }
.trip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.trip-tile { background: var(--subtle); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.trip-tile b { font-weight: 600; line-height: 1.45; } .trip-tile small { color: var(--text-3); font-size: 12px; }
.block-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.block-tile { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 12px; color: var(--text); }
.block-tile:hover { box-shadow: var(--float); } .block-tile .row > svg { color: var(--text-3); }
.block-tile .kb { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-50); color: var(--ink); display: grid; place-items: center; }
.block-tile b { font-weight: 600; } .block-tile strong { font-size: 20px; font-weight: 700; letter-spacing: -.2px; line-height: 1.2; } .block-tile small { color: var(--text-3); font-size: 12px; margin-top: -4px; }
@media (max-width: 1280px) { .home-grid { grid-template-columns: 1fr 1fr; } .block-row { grid-template-columns: repeat(3, 1fr); } .hero { flex-wrap: wrap; } }
