/* ==========================================================================
Grandexpress internal travel operations platform
   Design system: deep navy, electric blue, quiet surfaces, precise data
   ========================================================================== */

:root {
  --navy: #0b1626;
  --navy-2: #0f2038;
  --navy-3: #18324f;
  --blue: #2168e8;
  --blue-2: #3f86ff;
  --blue-soft: #eaf1ff;
  --cyan: #13a8b8;
  --cyan-soft: #e5f8fa;
  --gold: #c8862f;
  --gold-soft: #fbf2e2;
  --green: #168c65;
  --green-soft: #e7f7f0;
  --red: #d14b4b;
  --red-soft: #fcecec;
  --orange: #d4762c;
  --orange-soft: #fdf1e6;
  --purple: #7256c9;
  --purple-soft: #f0ecfb;
  --ink: #172235;
  --ink-2: #35445a;
  --muted: #758397;
  --muted-2: #9aa5b5;
  --line: #e6ebf2;
  --line-2: #eef2f7;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --shadow-xs: 0 1px 2px rgba(16, 33, 58, .04);
  --shadow-sm: 0 4px 14px rgba(16, 33, 58, .05);
  --shadow-md: 0 14px 38px rgba(16, 33, 58, .10);
  --shadow-lg: 0 28px 70px rgba(8, 22, 43, .18);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 252px;
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --mono: "Bahnschrift", "DIN Alternate", "Consolas", "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: #cfe0ff; }

/* --------------------------------------------------------------- boot screen */
.boot-screen {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #17345a 0, #0b1626 56%);
  color: #fff; gap: 12px;
}
.boot-mark {
  width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 27px; font-weight: 700;
  background: linear-gradient(145deg, var(--blue-2), var(--cyan)); box-shadow: 0 16px 40px rgba(33, 104, 232, .35);
  animation: boot-float 2.8s ease-in-out infinite;
}
.boot-name { font-family: var(--mono); font-size: 20px; letter-spacing: 4px; font-weight: 600; }
.boot-screen p { color: #91a3bd; font-size: 12px; letter-spacing: 1px; }
.boot-line { width: 150px; height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.boot-line span { display: block; width: 42%; height: 100%; background: linear-gradient(90deg, var(--blue-2), var(--cyan)); animation: boot-load 1.4s ease-in-out infinite; }
@keyframes boot-load { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }
@keyframes boot-float { 50% { transform: translateY(-6px); } }

/* -------------------------------------------------------------------- utilities */
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.text-gold { color: var(--gold); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 9px; border: 1px solid transparent;
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500;
  white-space: nowrap; transition: all .16s ease; box-shadow: var(--shadow-xs);
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: #cfd8e5; background: #fbfcfe; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, #2469e6, #3d84fb); color: #fff; border-color: #2469e6;
  box-shadow: 0 6px 16px rgba(33, 104, 232, .24);
}
.btn-primary:hover { background: linear-gradient(135deg, #1b5ed6, #3278ed); border-color: #1b5ed6; }
.btn-dark { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.btn-dark:hover { background: var(--navy-3); border-color: var(--navy-3); }
.btn-soft { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.btn-soft:hover { background: #dfeaff; border-color: transparent; }
.btn-ghost { background: transparent; border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--red); background: var(--red-soft); border-color: transparent; }
.btn-danger:hover { background: #f9dddd; border-color: transparent; }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-icon { width: 38px; padding: 0; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--blue); padding: 0; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: .16s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.icon-btn svg { width: 19px; height: 19px; }

/* --------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.field .hint { font-size: 11px; color: var(--muted-2); }
.req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #dfe6ef; border-radius: 9px; background: #fff;
  height: 40px; padding: 0 12px; outline: none; transition: border .15s, box-shadow .15s;
  font-size: 13px; color: var(--ink);
}
.textarea { height: auto; min-height: 82px; padding: 10px 12px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #aab4c2; }
.input:focus, .select:focus, .textarea:focus {
  border-color: #8eb5fb; box-shadow: 0 0 0 3px rgba(33, 104, 232, .10);
}
.input:disabled, .select:disabled { background: #f7f9fc; color: var(--muted); }
.input-sm, .select-sm { height: 34px; font-size: 12px; border-radius: 8px; }
.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='%23758397' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { margin-top: 20px; }
.form-section:first-child { margin-top: 0; }
.form-section-title {
  font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1.4px;
  text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.input-group { display: flex; align-items: center; gap: 8px; }
.input-affix {
  display: flex; align-items: center; border: 1px solid #dfe6ef; border-radius: 9px;
  background: #fff; overflow: hidden; height: 40px; transition: .15s;
}
.input-affix:focus-within { border-color: #8eb5fb; box-shadow: 0 0 0 3px rgba(33,104,232,.10); }
.input-affix .prefix { padding: 0 0 0 12px; color: var(--muted); font-size: 13px; }
.input-affix input { border: 0; box-shadow: none; height: 100%; background: transparent; padding-left: 5px; }
.input-affix input:focus { box-shadow: none; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.checkbox input { width: 15px; height: 15px; accent-color: var(--blue); }
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill input { display: none; }
.radio-pill span {
  display: inline-flex; height: 34px; align-items: center; padding: 0 13px; border: 1px solid var(--line);
  border-radius: 8px; color: var(--muted); font-size: 12px; cursor: pointer; transition: .15s;
}
.radio-pill input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.permission-group { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #fbfcfe; }
.permission-group-title { font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: .6px; margin-bottom: 6px; }
.permission-item { font-size: 11.5px; color: var(--ink-2); padding: 3px 0; }
.permission-item input { accent-color: var(--blue); }
@media (max-width: 600px) { .permission-grid { grid-template-columns: 1fr; } }
.invoice-no-main { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .4px; }
.invoice-no-hero { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.order-hero .invoice-no-hero { color: var(--blue); }
.itinerary-block { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.itinerary-block:last-child { border-bottom: 0; padding-bottom: 0; }
.itinerary-label { font-size: 11px; font-weight: 700; color: var(--ink); margin-bottom: 8px; letter-spacing: .4px; }
.pax-row { display: grid; grid-template-columns: 58px 128px 1fr 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 7px; }
.pax-index { font-size: 10px; color: var(--muted); }
.segment-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fbfcfe; }
.segment-card .between { margin-bottom: 8px; }
.segment-card .form-grid { gap: 8px 10px; }
.itinerary-detail { border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; margin-bottom: 7px; background: #fbfcfe; }
.itinerary-route { font-size: 13px; font-weight: 600; margin: 4px 0; }
.total-price { height: 40px; display: flex; align-items: center; border: 1px dashed var(--line); border-radius: 9px; padding: 0 12px; background: #fbfcfe; }
.readonly-control { height: 40px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; background: #f3f5f8; color: var(--muted); }
.order-log { border-left: 2px solid var(--line); padding: 0 0 12px 12px; margin-left: 4px; position: relative; }
.order-log:before { content: ''; position: absolute; left: -4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.order-log-changes { margin-top: 6px; display: grid; gap: 3px; }
.order-log-changes > div { display: grid; grid-template-columns: 90px 1fr; gap: 6px; font-size: 10px; align-items: baseline; }
.order-log-changes span { color: var(--muted); }
.order-log-changes del { color: var(--red); text-decoration: line-through; }
.order-log-changes ins { color: var(--green); text-decoration: none; }
@media (max-width: 720px) { .pax-row { grid-template-columns: 1fr; } .pax-index { display: none; } }
.invoice-format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.invoice-format-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #fbfcfe; }
.format-name { font-size: 11.5px; font-weight: 600; margin-top: 6px; word-break: break-all; }
.format-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.format-actions .btn { height: 27px; padding: 0 8px; font-size: 9.5px; }
@media (max-width: 720px) { .invoice-format-grid { grid-template-columns: 1fr; } }
.nav-order-groups { display: grid; gap: 13px; }
.nav-order-group { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.nav-order-title { padding: 7px 12px; background: var(--surface-2); font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.nav-order-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-top: 1px solid var(--line-2); background: #fff; cursor: grab; }
.nav-order-item:active { cursor: grabbing; }
.nav-order-item.dragging { opacity: .45; background: var(--blue-soft); }
.nav-order-item b { flex: 1; font-size: 11.5px; font-weight: 500; }
.nav-drag { color: var(--muted-2); display: flex; }
.nav-order-actions { display: flex; gap: 2px; }
.nav-order-actions .icon-btn { width: 24px; height: 24px; }
.nav-order-actions .icon-btn:disabled { opacity: .25; cursor: default; }
.dashboard-note { display: flex; align-items: flex-start; gap: 8px; background: var(--blue-soft); border: 1px solid #cfe1ff; color: #245b9e; border-radius: 9px; padding: 10px 13px; margin-bottom: 12px; font-size: 11.5px; line-height: 1.6; }
.dashboard-note svg { flex: none; margin-top: 2px; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); cursor: pointer; }
.check-row input { accent-color: var(--blue); width: 14px; height: 14px; }
.passenger-lines { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.passenger-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 10.5px; color: var(--muted); }
.passenger-line:last-child { border-bottom: 0; }
.passenger-line b { min-width: 78px; font-size: 11.5px; color: var(--ink); font-weight: 600; }
.passenger-line span { white-space: nowrap; }
.pax-row-hotel { grid-template-columns: 68px minmax(120px, 1.2fr) minmax(130px, 1fr); }
.pax-row-simple { grid-template-columns: 90px 1fr; }
.breakfast-row { min-height: 38px; margin-top: 22px; cursor: pointer; }
.breakfast-row label { cursor: pointer; font-size: 11px; color: var(--ink-2); }
.seg-remark { min-height: 38px; height: 38px; padding: 9px 10px; resize: vertical; line-height: 1.4; }
.segment-invoice-remark { margin-top: 5px; white-space: pre-wrap; color: var(--muted); font-size: 10px; }
.order-passenger-cell { font-size: 11px; color: var(--ink-2); line-height: 1.55; max-width: 130px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-date-cell { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.order-itinerary-cell { display: flex; flex-direction: column; gap: 3px; }
.order-itinerary-cell b { font-family: var(--mono); font-size: 13px; color: var(--ink); letter-spacing: .01em; }
.order-itinerary-cell span { font-size: 11px; color: var(--muted); }
.ge-name { font-size: 11.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.reminder-textarea { min-height: 170px; resize: vertical; line-height: 1.7; }
.reminder-content-cell p { white-space: pre-wrap; }
.reminder-content { white-space: pre-wrap; }
.reminder-table tr.reminder-overdue { background: #fff7f7; }
.reminder-table tr.reminder-overdue td { color: #b42318; }
.reminder-table tr.reminder-overdue .reminder-date { color: #b42318; }
.reminder-table tr.reminder-overdue .badge { background: #fee4e2; color: #b42318; }
#reminder-banner-root { position: fixed; top: 64px; right: 18px; z-index: 125; width: min(380px, calc(100vw - 28px)); pointer-events: none; }
.reminder-banner { pointer-events: auto; transition: transform .3s ease, opacity .3s ease; background: #fff; border: 1px solid #f0c7c2; border-left: 4px solid var(--red); border-radius: 11px; box-shadow: 0 12px 32px rgba(20, 40, 70, .18); overflow: hidden; }
.reminder-banner-main { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 13px 14px 10px; background: transparent; border: 0; text-align: left; cursor: pointer; }
.reminder-banner-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: grid; place-items: center; flex: none; }
.reminder-banner-copy { min-width: 0; flex: 1; }
.reminder-banner-copy b { display: block; font-size: 11.5px; color: var(--red); }
.reminder-banner-time { display: block; margin-top: 2px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.reminder-banner-text { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink); line-height: 1.55; white-space: pre-wrap; max-height: 76px; overflow: hidden; }
.reminder-banner.reminder-banner-closing { transform: translateX(calc(100% + 44px)); opacity: 0; pointer-events: none; }
.reminder-banner-actions { display: flex; gap: 7px; justify-content: flex-end; padding: 0 14px 12px; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #117452; border-color: #117452; }
.reminder-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin-bottom: 12px; }
.reminder-filter .search-box { margin: 0; }
.reminder-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 0 4px 12px; font-size: 10.5px; color: var(--muted); }
.reminder-summary b { color: var(--ink); font-family: var(--mono); font-size: 14px; margin-right: 3px; }
.reminder-summary span { display: inline-flex; align-items: center; gap: 5px; }
.reminder-summary i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--muted-2); }
.reminder-summary .open i { background: var(--orange); }
.reminder-summary .done i { background: var(--green); }
.reminder-summary .cancelled i { background: var(--muted-2); }
.reminder-table td { vertical-align: middle; }
.reminder-date { font-family: var(--mono); font-size: 11.5px; color: var(--ink); white-space: nowrap; }
.reminder-content-cell p { margin: 0; font-size: 12px; color: var(--ink); }
.reminder-content-cell span { display: block; margin-top: 3px; font-size: 9.5px; color: var(--muted); }
.reminder-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.reminder-detail-head h3 { margin: 9px 0 0; font-size: 15px; }
.reminder-content { font-size: 12.5px; line-height: 1.8; margin: 8px 0 0; color: var(--ink); }
.reminder-log-list { margin-top: 8px; }
.reminder-log { display: flex; gap: 10px; padding: 8px 0 8px 2px; position: relative; border-left: 1px solid var(--line); }
.reminder-log .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin: 5px 0 0 -6px; flex: none; }
.reminder-log > div:last-child { padding-left: 2px; }
.reminder-log b { font-size: 11px; }
.reminder-log span { margin-left: 8px; font-size: 9.5px; color: var(--muted); }
.reminder-log p { margin: 3px 0 0; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.cc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 10.5px; }
.cc-node { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; background: #fbfcfe; overflow: hidden; }
.cc-node summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.cc-node summary::-webkit-details-marker { display: none; }
.cc-node summary:before { content: '▸'; color: var(--muted); font-size: 11px; transition: transform .15s; }
.cc-node[open] summary:before { transform: rotate(90deg); }
.cc-name { font-weight: 600; color: var(--ink); font-family: var(--mono); font-size: 12px; }
.cc-approver { color: var(--muted); font-size: 10.5px; }
.cc-count { margin-left: auto; color: var(--muted-2); font-size: 10px; }
.cc-body { padding: 0 12px 10px 35px; border-top: 1px dashed var(--line-2); }
.cc-actions { display: flex; gap: 4px; padding: 7px 0; }
.btn-xs { height: 26px; padding: 0 7px; font-size: 9.5px; }
.btn-xs.danger { color: var(--red); }
.staff-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.staff-row:last-child { border-bottom: 0; }
.staff-main b { display: block; font-size: 11.5px; color: var(--ink); }
.staff-main span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.cabin-head, .cabin-row { display: grid; grid-template-columns: 1.1fr 1.4fr .65fr 34px; gap: 8px; align-items: center; }
.cabin-head { margin: 10px 0 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.cabin-row { margin-bottom: 7px; }
.cabin-row .input { min-width: 0; }
.cabin-row .icon-btn { color: var(--red); }
@media (max-width: 720px) { .cabin-head { display: none; } .cabin-row { grid-template-columns: 1fr 1fr; } .cabin-row .icon-btn { grid-column: 2; justify-self: end; } }
.invoice-no-row { display: flex; gap: 8px; align-items: center; }
.invoice-no-row .input { flex: 1; }
.invoice-no-row .btn { flex: 0 0 auto; }
.pnr-panel { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.pnr-lookup-row { display: flex; gap: 8px; align-items: center; }
.pnr-lookup-row .btn { flex: 0 0 auto; height: 40px; }
.pnr-preview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; }
.pnr-preview > div { min-width: 0; }
.pnr-preview span { display: block; font-size: 9px; color: var(--muted); margin-bottom: 2px; }
.pnr-preview b { display: block; font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .pnr-lookup-row { flex-wrap: wrap; }
  .pnr-preview { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px;
  border-radius: 20px; font-size: 11px; font-weight: 500; white-space: nowrap;
  background: #f1f4f8; color: #5f6c7d;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
.badge-blue { background: var(--blue-soft); color: #2565cf; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-gold { background: var(--gold-soft); color: #a76c1b; }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-orange { background: var(--orange-soft); color: var(--orange); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-cyan { background: var(--cyan-soft); color: #0c8c9a; }
.badge-gray { background: #f1f4f8; color: #6b788a; }
.badge-navy { background: #e9eef6; color: #304663; }
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 11px;
}
.tag-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; }

/* --------------------------------------------------------------- login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(460px, .92fr); background: #fff; }
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px 58px;
  background:
    radial-gradient(900px 520px at 74% 12%, rgba(30, 105, 220, .30), transparent 60%),
    radial-gradient(700px 500px at 16% 92%, rgba(16, 168, 184, .18), transparent 62%),
    linear-gradient(150deg, #07111f 0%, #0b1b31 55%, #102742 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-art::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 50px 50px; mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 88%);
}
.login-art > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-logo {
  width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(145deg, #3b84fb, #18b3c2);
  display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 21px;
  box-shadow: 0 10px 26px rgba(28, 110, 234, .35);
}
.login-brand strong { font-family: var(--mono); font-size: 19px; letter-spacing: 2px; font-weight: 600; display: block; }
.login-brand span { color: #8fa5c2; font-size: 10px; letter-spacing: 2.6px; }
.login-art-body { max-width: 600px; margin-top: 4vh; }
.login-kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 2px;
  color: #7fc3ff; text-transform: uppercase; padding: 7px 11px; border: 1px solid rgba(127,195,255,.22);
  border-radius: 30px; background: rgba(127,195,255,.06);
}
.login-kicker::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #62d2df; box-shadow: 0 0 10px #62d2df; }
.login-art h1 {
  margin-top: 22px; font-size: clamp(32px, 3.3vw, 48px); line-height: 1.22; font-weight: 600;
  letter-spacing: -.5px;
}
.login-art h1 em { font-style: normal; color: #79b7ff; }
.login-art-sub { margin-top: 16px; color: #9db0c8; font-size: 14px; line-height: 1.9; max-width: 510px; }
.login-features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.login-feature {
  display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 8px;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08);
  color: #b7c8de; font-size: 11.5px; backdrop-filter: blur(6px);
}
.login-feature svg { width: 14px; height: 14px; color: #62c9d4; }
.flight-map { position: absolute; right: -2%; bottom: 4%; width: 67%; opacity: .72; pointer-events: none; }
.flight-map svg { width: 100%; height: auto; overflow: visible; }
.login-art-footer { display: flex; align-items: flex-end; justify-content: space-between; color: #5e7694; font-size: 10px; letter-spacing: .8px; }
.login-stat { display: flex; gap: 34px; }
.login-stat b { display: block; font-family: var(--mono); color: #dbe8f7; font-size: 20px; font-weight: 500; margin-bottom: 2px; }
.login-stat span { color: #7188a4; font-size: 10px; }

.login-panel {
  display: flex; align-items: center; justify-content: center; padding: 44px 48px;
  background: #fff; position: relative;
}
.login-inner { width: min(390px, 100%); }
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 34px; }
.login-panel h2 { font-size: 26px; font-weight: 600; letter-spacing: -.3px; }
.login-panel .login-sub { color: var(--muted); font-size: 13px; margin-top: 7px; }
.login-form { margin-top: 30px; display: flex; flex-direction: column; gap: 16px; }
.login-form .field > label { font-size: 12px; font-weight: 600; }
.login-input-wrap { position: relative; }
.login-input-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #9aa7b9; pointer-events: none; }
.login-input-wrap .input { height: 46px; padding-left: 41px; border-radius: 10px; background: #fbfcfe; }
.login-input-wrap .input:focus { background: #fff; }
.login-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #98a5b7; padding: 6px; }
.login-eye svg { position: static; transform: none; width: 16px; height: 16px; }
.login-error {
  display: none; align-items: center; gap: 8px; padding: 10px 12px; background: var(--red-soft);
  color: #b23636; border-radius: 8px; font-size: 12px; border: 1px solid #f4d0d0;
}
.login-error.show { display: flex; }
.login-error svg { width: 15px; height: 15px; flex: 0 0 auto; }
.login-submit { height: 46px; border-radius: 10px; font-size: 14px; letter-spacing: .5px; margin-top: 2px; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 10px; letter-spacing: 1px; margin: 26px 0 14px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-accounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.demo-account {
  border: 1px solid var(--line); background: #fbfcfe; border-radius: 9px; padding: 9px 8px;
  text-align: left; transition: .15s; min-width: 0;
}
.demo-account:hover { border-color: #b9cff5; background: #f7faff; }
.demo-account b { display: block; font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.demo-account span { display: block; font-size: 9.5px; color: var(--muted-2); margin-top: 2px; font-family: var(--mono); }
.login-note { margin-top: 24px; color: var(--muted-2); font-size: 10.5px; line-height: 1.8; }
.login-note strong { color: var(--muted); font-weight: 500; }

/* --------------------------------------------------------------- app shell */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
  background:
    radial-gradient(500px 320px at 8% 0, rgba(39, 108, 210, .18), transparent 65%),
    linear-gradient(180deg, #0a1525 0%, #0b182a 54%, #0a1423 100%);
  color: #a9b8cc; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar-brand {
  height: 84px; padding: 0 22px; display: flex; align-items: center; gap: 11px; flex: 0 0 auto;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.sidebar-logo {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, #3c85fa, #17b3c2); color: #fff;
  font-family: var(--mono); font-weight: 700; font-size: 18px;
  box-shadow: 0 7px 20px rgba(28, 112, 238, .28);
}
.sidebar-brand strong { color: #f3f7fd; font-family: var(--mono); font-size: 16px; letter-spacing: 1.8px; font-weight: 600; }
.sidebar-brand span { display: block; font-size: 8.5px; color: #5f7693; letter-spacing: 1.6px; margin-top: 1px; }
.sidebar-company {
  margin: 14px 16px 8px; padding: 10px 11px; border-radius: 9px; background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.055); display: flex; gap: 9px; align-items: center;
}
.sidebar-company .dot { width: 6px; height: 6px; border-radius: 50%; background: #41d1a4; box-shadow: 0 0 9px rgba(65,209,164,.7); flex: 0 0 auto; }
.sidebar-company b { display: block; color: #c3d0e1; font-size: 10.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-company span { display: block; color: #59708d; font-size: 8.5px; letter-spacing: .6px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 12px 18px; scrollbar-width: thin; scrollbar-color: #243952 transparent; }
.nav-section { margin-top: 17px; }
.nav-section:first-child { margin-top: 6px; }
.nav-section-title { padding: 0 10px 7px; color: #4d6480; font-size: 9px; font-weight: 600; letter-spacing: 1.7px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; height: 39px; padding: 0 11px;
  border-radius: 8px; color: #899cb4; font-size: 12.5px; margin-bottom: 2px; transition: .15s;
  border: 1px solid transparent; cursor: pointer;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .9; }
.nav-item:hover { color: #e2ebf7; background: rgba(255,255,255,.045); }
.nav-item.active {
  color: #fff; background: linear-gradient(90deg, rgba(43, 112, 222, .28), rgba(43, 112, 222, .10));
  border-color: rgba(92, 150, 242, .18);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: #4e94ff; box-shadow: 0 0 12px rgba(78,148,255,.65);
}
.nav-item .nav-badge {
  margin-left: auto; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 6px;
  display: grid; place-items: center; background: rgba(246, 170, 74, .16); color: #f2b45e;
  font-family: var(--mono); font-size: 9.5px;
}
.sidebar-foot { flex: 0 0 auto; padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,.055); }
.sidebar-tip {
  padding: 10px 11px; border-radius: 9px; background: linear-gradient(145deg, rgba(37, 96, 190, .18), rgba(19, 168, 184, .08));
  border: 1px solid rgba(93, 154, 246, .13); margin-bottom: 12px;
}
.sidebar-tip b { display: flex; align-items: center; gap: 6px; color: #b9cdea; font-size: 10px; font-weight: 500; }
.sidebar-tip b svg { width: 12px; height: 12px; color: #55c6d2; }
.sidebar-tip span { display: block; color: #5e7692; font-size: 9px; margin-top: 4px; line-height: 1.6; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 4px 3px; border-radius: 8px; cursor: pointer; }
.sidebar-user:hover { background: rgba(255,255,255,.035); }
.sidebar-user .meta { min-width: 0; flex: 1; }
.sidebar-user b { display: block; color: #d8e3f1; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user span { display: block; color: #5f7692; font-size: 9px; }
.sidebar-user > svg { width: 14px; height: 14px; color: #516a87; }

.main-shell { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 70px; flex: 0 0 auto; position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 241, .9);
  display: flex; align-items: center; gap: 18px; padding: 0 30px;
}
.mobile-menu { display: none; }
.crumb { min-width: 0; }
.crumb-top { display: flex; align-items: center; gap: 7px; color: var(--muted-2); font-size: 9.5px; letter-spacing: .8px; text-transform: uppercase; }
.crumb-top span { color: #b5bfcd; }
.crumb h1 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; margin-top: 1px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.global-search {
  position: relative; width: 238px; transition: width .2s ease;
}
.global-search:focus-within { width: 290px; }
.global-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #9ba8b9; }
.global-search input {
  width: 100%; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #f7f9fc;
  padding: 0 48px 0 34px; font-size: 12px; outline: none; transition: .15s;
}
.global-search input:focus { background: #fff; border-color: #b9d0f7; box-shadow: 0 0 0 3px rgba(33,104,232,.08); }
.global-search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 9px; color: #a1adbd;
  border: 1px solid #e2e8f0; border-radius: 4px; padding: 1px 5px; background: #fff; font-family: var(--mono);
}
.topbar-date { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; padding: 0 4px; }
.topbar-date svg { width: 15px; height: 15px; }
.task-runner-wrap { display: flex; align-items: center; }
.task-runner-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink-2); font-size: 10.5px; cursor: pointer; }
.task-runner-btn:hover, .task-runner-btn.has-active { border-color: #b8d4ff; background: var(--blue-soft); color: #2565cf; }
.task-runner-count { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 9px; display: grid; place-items: center; }
.task-runner-count.hidden { display: none; }
.task-runner-list { display: flex; flex-direction: column; gap: 9px; max-height: 430px; overflow: auto; }
.task-runner-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; }
.task-runner-meta { font-size: 9.5px; color: var(--muted); margin: 4px 0 6px; }
.task-progress { height: 4px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.task-progress span { display: block; height: 100%; background: var(--blue); transition: width .3s; }
.task-runner-actions { display: flex; gap: 6px; align-items: center; }
.invoice-preview-link { border: 0; background: transparent; padding: 0; color: var(--blue); font: inherit; font-family: var(--mono); font-size: 11.5px; font-weight: 600; text-align: left; cursor: pointer; }
.invoice-preview-link:hover { text-decoration: underline; }
.invoice-simple-table th:first-child, .invoice-simple-table td:first-child { padding-left: 12px; }
.batch-choice { text-align: left; cursor: pointer; border: 1px solid var(--line); font: inherit; }
.batch-choice:hover { border-color: #b8d4ff; background: #f7faff; }
.bell-wrap { position: relative; }
.bell-badge {
  position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; border-radius: 9px;
  background: #e25959; color: #fff; font-size: 8.5px; display: grid; place-items: center; padding: 0 4px;
  border: 2px solid #fff; font-family: var(--mono);
}
.topbar-user { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--line); cursor: pointer; }
.topbar-user .meta b { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.topbar-user .meta span { display: block; font-size: 9.5px; color: var(--muted); }
.user-menu {
  position: absolute; top: 62px; right: 26px; width: 220px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-md); padding: 7px; z-index: 80;
  animation: menu-in .15s ease;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-5px); } }
.user-menu .um-head { padding: 10px 11px; border-bottom: 1px solid var(--line-2); margin-bottom: 5px; }
.user-menu .um-head b { display: block; font-size: 12px; }
.user-menu .um-head span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.user-menu button {
  width: 100%; border: 0; background: transparent; border-radius: 7px; padding: 9px 10px;
  display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 12px; text-align: left;
}
.user-menu button:hover { background: var(--surface-2); }
.user-menu button.danger { color: var(--red); }
.user-menu button svg { width: 15px; height: 15px; }

.page { padding: 26px 30px 42px; flex: 1; width: 100%; max-width: 1620px; margin: 0 auto; }
.page-enter { animation: page-in .28s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-title { font-size: 23px; font-weight: 600; letter-spacing: -.5px; }
.page-desc { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* --------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); min-width: 0;
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 0; }
.card-title { font-size: 13.5px; font-weight: 600; letter-spacing: -.1px; display: flex; align-items: center; gap: 8px; }
.card-title svg { width: 16px; height: 16px; color: var(--blue); }
.card-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.card-body { padding: 18px 20px 20px; }
.card-tools { display: flex; align-items: center; gap: 4px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.62fr) minmax(320px, .88fr); }
.grid-lower { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); }
.section { margin-top: 16px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-head h2 { font-size: 15px; font-weight: 600; }
.section-head p { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* --------------------------------------------------------------- stat cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px 14px; overflow: hidden; box-shadow: var(--shadow-xs); transition: .18s;
}
.kpi:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.kpi-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.kpi-icon svg { width: 17px; height: 17px; }
.kpi-icon.cyan { background: var(--cyan-soft); color: #0d96a4; }
.kpi-icon.gold { background: var(--gold-soft); color: var(--gold); }
.kpi-icon.green { background: var(--green-soft); color: var(--green); }
.kpi-icon.purple { background: var(--purple-soft); color: var(--purple); }
.kpi-icon.red { background: var(--red-soft); color: var(--red); }
.kpi-value { font-family: var(--mono); font-size: 25px; line-height: 1.2; font-weight: 600; letter-spacing: -.6px; margin-top: 11px; }
.kpi-value .unit { font-size: 13px; color: var(--muted); margin-left: 2px; font-family: var(--font); font-weight: 400; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.kpi-change { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-family: var(--mono); }
.kpi-change svg { width: 11px; height: 11px; }
.kpi-change.up { color: var(--green); }
.kpi-change.down { color: var(--red); }
.kpi-change.flat { color: var(--muted); }
.kpi-note { color: var(--muted-2); font-size: 9.5px; }
.kpi-spark { display: none; }

/* --------------------------------------------------------------- dashboard */
.hero {
  position: relative; overflow: hidden; border-radius: 17px; padding: 22px 24px;
  background:
    radial-gradient(550px 260px at 88% -20%, rgba(63, 134, 255, .32), transparent 65%),
    linear-gradient(120deg, #0d213d 0%, #12305a 58%, #15508a 100%);
  color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 26px;
  box-shadow: 0 14px 34px rgba(11, 30, 56, .14); margin-bottom: 16px;
}
.hero::before {
  content: ""; position: absolute; right: 4%; top: -42%; width: 340px; height: 340px;
  border: 1px solid rgba(255,255,255,.07); border-radius: 50%; box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 80px rgba(255,255,255,.018);
}
.hero::after {
  content: ""; position: absolute; right: 11%; bottom: -40px; width: 280px; height: 130px;
  background: radial-gradient(ellipse, rgba(58, 184, 220, .17), transparent 65%);
}
.hero-main { position: relative; z-index: 1; min-width: 0; }
.hero-eyebrow { display: flex; align-items: center; gap: 8px; color: #8fb9e8; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; }
.hero-eyebrow::before { content: ""; width: 18px; height: 1px; background: #65a9f0; }
.hero h2 { margin-top: 8px; font-size: 23px; font-weight: 500; letter-spacing: -.2px; }
.hero h2 b { font-weight: 600; color: #9cccff; }
.hero-sub { color: #9eb4cf; font-size: 12px; margin-top: 7px; max-width: 620px; }
.hero-sub .hl { color: #dcecff; font-family: var(--mono); }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex: 0 0 auto; }
.hero-btn {
  height: 36px; padding: 0 13px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.075); color: #e6f2ff; font-size: 11.5px; display: inline-flex;
  align-items: center; gap: 6px; backdrop-filter: blur(8px); transition: .16s;
}
.hero-btn:hover { background: rgba(255,255,255,.14); }
.hero-btn.primary { background: #fff; color: #17355e; border-color: #fff; font-weight: 600; }
.hero-btn.primary:hover { background: #edf5ff; }
.hero-btn svg { width: 14px; height: 14px; }

.chart-wrap { position: relative; width: 100%; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.legend-dot { width: 7px; height: 7px; border-radius: 2px; }
.chart-tabs { display: inline-flex; background: #f3f6fa; border-radius: 7px; padding: 3px; gap: 2px; }
.chart-tab { border: 0; background: transparent; color: var(--muted); font-size: 10.5px; height: 26px; padding: 0 9px; border-radius: 5px; }
.chart-tab.active { background: #fff; color: var(--ink-2); box-shadow: 0 1px 3px rgba(16,33,58,.1); font-weight: 500; }
.chart-metric { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 2px; }
.chart-metric b { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.chart-metric span { font-size: 10px; color: var(--muted); padding-bottom: 3px; }
.chart-tooltip {
  position: absolute; pointer-events: none; background: #0e1f36; color: #fff; border-radius: 7px;
  padding: 7px 9px; font-size: 10px; box-shadow: var(--shadow-md); z-index: 5; opacity: 0;
  transform: translate(-50%, -108%); transition: opacity .12s; white-space: nowrap; line-height: 1.6;
}
.chart-tooltip b { font-family: var(--mono); color: #8fc5ff; }
.chart-tooltip.show { opacity: 1; }

.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut { position: relative; flex: 0 0 auto; }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.donut-center b { font-family: var(--mono); font-size: 24px; font-weight: 600; line-height: 1.1; }
.donut-center span { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.donut-item { display: flex; align-items: center; gap: 8px; font-size: 10.5px; }
.donut-item .dot { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.donut-item .name { color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-item b { font-family: var(--mono); font-size: 10.5px; font-weight: 500; }
.donut-item span { font-family: var(--mono); color: var(--muted-2); font-size: 9px; width: 33px; text-align: right; }

.product-list { display: flex; flex-direction: column; gap: 13px; }
.product-row { display: grid; grid-template-columns: 72px 1fr 62px; align-items: center; gap: 9px; font-size: 10.5px; }
.product-row .name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-row .bar { height: 6px; border-radius: 6px; background: #f0f3f8; overflow: hidden; }
.product-row .bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #3d86fa, #5fc2d0); }
.product-row .value { text-align: right; font-family: var(--mono); color: var(--ink-2); font-size: 10px; }

.rank-list { display: flex; flex-direction: column; gap: 3px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 8px; }
.rank-item:hover { background: var(--surface-2); }
.rank-no {
  width: 19px; height: 19px; border-radius: 6px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 9px; color: var(--muted); background: #f1f4f8;
}
.rank-no.n1 { background: #fbf0d8; color: #b07819; }
.rank-no.n2 { background: #edf1f6; color: #65758a; }
.rank-no.n3 { background: #fbeee4; color: #aa6736; }
.rank-meta { flex: 1; min-width: 0; }
.rank-meta b { display: block; font-size: 11.5px; font-weight: 500; }
.rank-meta span { display: block; font-size: 9px; color: var(--muted-2); margin-top: 1px; }
.rank-value { text-align: right; }
.rank-value b { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 500; }
.rank-value span { font-size: 8.5px; color: var(--green); font-family: var(--mono); }

.task-list { display: flex; flex-direction: column; }
.task-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line-2);
  cursor: pointer;
}
.task-item:last-child { border-bottom: 0; }
.task-item:hover .task-title { color: var(--blue); }
.task-icon { width: 31px; height: 31px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.task-icon svg { width: 15px; height: 15px; }
.task-icon.blue { background: var(--blue-soft); color: var(--blue); }
.task-icon.gold { background: var(--gold-soft); color: var(--gold); }
.task-icon.red { background: var(--red-soft); color: var(--red); }
.task-icon.cyan { background: var(--cyan-soft); color: var(--cyan); }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 11.5px; font-weight: 500; transition: .15s; }
.task-sub { font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.task-count { font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--ink-2); }
.task-count small { font-size: 9px; color: var(--muted); margin-left: 2px; font-family: var(--font); }

/* --------------------------------------------------------------- tables */
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th {
  text-align: left; padding: 10px 14px; background: #f9fafc; color: #8390a2; font-weight: 500;
  font-size: 10px; letter-spacing: .3px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th.num, .table td.num { text-align: right; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fafcff; }
.table tbody tr.row-cancelled,
.table tbody tr.row-cancelled:hover { background: #f3f4f6; color: #9aa5b5; }
.table tbody tr.row-cancelled td,
.table tbody tr.row-cancelled .customer-cell b,
.table tbody tr.row-cancelled .order-no,
.table tbody tr.row-cancelled .money { color: #9aa5b5; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .primary-cell { font-weight: 500; color: var(--ink); }
.table .sub-cell { font-size: 9.5px; color: var(--muted-2); margin-top: 2px; }
.table .actions { display: flex; align-items: center; gap: 5px; justify-content: flex-end; }
.table .row-link { cursor: pointer; }
.table .money { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .money.strong { font-weight: 600; color: var(--ink); }
.table .money.positive { color: var(--green); }
.table-empty { padding: 48px 20px; text-align: center; }
.table-empty svg { width: 34px; height: 34px; color: #c4ceda; margin: 0 auto 8px; }
.table-empty p { color: var(--muted); font-size: 12px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; border-top: 1px solid var(--line); }
.table-foot .info { font-size: 10.5px; color: var(--muted); }
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn {
  min-width: 28px; height: 28px; padding: 0 7px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--muted); font-size: 10.5px; display: grid; place-items: center;
}
.page-btn:hover { background: var(--surface-2); color: var(--ink); }
.page-btn.active { background: var(--blue); color: #fff; font-weight: 500; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------- filters */
.filter-bar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px;
}
.filter-search { position: relative; flex: 1; min-width: 180px; max-width: 280px; }
.filter-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: #a0acbb; }
.filter-search input { padding-left: 32px; height: 34px; font-size: 11.5px; background: #fafbfd; }
.filter-divider { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.filter-bar .select { width: auto; min-width: 104px; height: 34px; font-size: 11.5px; background-color: #fafbfd; }
.filter-bar .date-input { width: 128px; height: 34px; font-size: 11px; background: #fafbfd; }
.filter-bar .btn { height: 34px; font-size: 11.5px; }
.filter-label { font-size: 10px; color: var(--muted-2); margin-right: -3px; }
.filter-bar .spacer { flex: 1; }
.result-count { font-size: 10.5px; color: var(--muted); margin-right: 4px; white-space: nowrap; }

.segmented { display: inline-flex; align-items: center; background: #f1f4f9; border-radius: 8px; padding: 3px; gap: 2px; }
.segmented button {
  border: 0; background: transparent; height: 28px; padding: 0 11px; border-radius: 6px;
  color: var(--muted); font-size: 10.5px; white-space: nowrap;
}
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,33,58,.09); font-weight: 500; }

/* --------------------------------------------------------------- modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 21, 37, .46);
  backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 20px 30px; overflow-y: auto; animation: fade-in .16s ease;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  width: min(620px, 100%); background: #fff; border-radius: 15px; box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease; overflow: hidden; margin: auto;
  max-height: calc(100vh - 10vh - 30px); display: flex; flex-direction: column;
}
.modal-head, .modal-foot { flex: 0 0 auto; }
.modal-body { overflow-y: auto; min-height: 0; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.modal.modal-lg { width: min(830px, 100%); }
.modal.modal-sm { width: min(440px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; font-weight: 600; }
.modal-head p { color: var(--muted); font-size: 11px; margin-top: 3px; }
.modal-close {
  margin-left: auto; width: 30px; height: 30px; border-radius: 7px; border: 0; background: transparent;
  color: var(--muted); display: grid; place-items: center;
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }
.modal-close svg { width: 17px; height: 17px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fcfdff; }
.modal-alert {
  display: flex; gap: 9px; padding: 10px 12px; border-radius: 8px; background: var(--gold-soft);
  color: #8d611f; font-size: 11px; line-height: 1.7; margin-bottom: 16px;
}
.modal-alert svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }
.modal-loading { min-height: 180px; display: grid; place-items: center; }

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 21, 37, .36);
  backdrop-filter: blur(2px); display: flex; justify-content: flex-end; animation: fade-in .16s ease;
}
.drawer {
  width: min(490px, 100%); height: 100%; background: #fff; box-shadow: -20px 0 50px rgba(10,25,45,.16);
  display: flex; flex-direction: column; animation: drawer-in .24s ease;
}
@keyframes drawer-in { from { transform: translateX(30px); opacity: .6; } }
.drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; flex: 0 0 auto; }
.drawer-head h3 { font-size: 16px; font-weight: 600; }
.drawer-head p { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.drawer-body { padding: 20px 22px 28px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 13px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; background: #fcfdff; flex: 0 0 auto; }
.drawer-foot .btn { flex: 0 0 auto; }

/* --------------------------------------------------------------- toast */
.toast-root { position: fixed; top: 18px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(350px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 9px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-md); padding: 11px 12px; font-size: 12px;
  animation: toast-in .22s ease; color: var(--ink-2);
}
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } }
.toast.leaving { opacity: 0; transform: translateX(12px); transition: .2s; }
.toast-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.toast-icon svg { width: 12px; height: 12px; }
.toast.success .toast-icon { background: var(--green-soft); color: var(--green); }
.toast.error .toast-icon { background: var(--red-soft); color: var(--red); }
.toast.info .toast-icon { background: var(--blue-soft); color: var(--blue); }
.toast-message { flex: 1; line-height: 1.6; }

/* --------------------------------------------------------------- loading / empty */
.skeleton { background: linear-gradient(90deg, #f1f4f8 25%, #f8fafc 37%, #f1f4f8 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.loading-block { min-height: 260px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: var(--muted); font-size: 11px; }
.spinner { width: 24px; height: 24px; border: 2px solid #e7edf5; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.sm { width: 15px; height: 15px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 46px 20px; }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 12px; color: #b8c4d3; }
.empty-icon svg { width: 24px; height: 24px; }
.empty-state h4 { font-size: 13px; font-weight: 500; }
.empty-state p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.error-state { text-align: center; padding: 60px 20px; }
.error-state h3 { font-size: 16px; }
.error-state p { color: var(--muted); font-size: 12px; margin: 8px 0 16px; }

/* --------------------------------------------------------------- page specific: orders */
.order-no { font-family: var(--mono); font-size: 10.5px; color: #3e5a7d; letter-spacing: -.2px; }
.order-route { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-2); }
.order-route svg { width: 11px; height: 11px; color: #a4b1c1; }
.order-route .arrow { color: #bdc7d4; font-size: 9px; }
.customer-cell b { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink); }
.customer-cell span { display: block; font-size: 9px; color: var(--muted-2); margin-top: 1px; }
.product-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ink-2); }
.product-icon { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #f1f5fb; color: #5b7ba5; flex: 0 0 auto; }
.product-icon svg { width: 12px; height: 12px; }
.summary-strip.summary-strip-3 { grid-template-columns: repeat(3, 1fr); }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.summary-cell { padding: 12px 16px; border-right: 1px solid var(--line); }
.summary-cell:last-child { border-right: 0; }
.summary-cell span { display: block; font-size: 9.5px; color: var(--muted); }
.summary-cell b { display: block; font-family: var(--mono); font-size: 16px; font-weight: 500; margin-top: 3px; }
.summary-cell b small { font-size: 9px; color: var(--muted); font-family: var(--font); font-weight: 400; margin-left: 2px; }

.order-hero { padding: 18px 0 16px; }
.order-hero .order-no-big { font-family: var(--mono); font-size: 17px; letter-spacing: -.2px; }
.order-hero h3 { font-size: 15px; margin-top: 6px; }
.order-hero .sub { color: var(--muted); font-size: 10.5px; margin-top: 3px; }
.detail-section { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 16px; }
.detail-section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.detail-section-title { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; margin-bottom: 11px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.detail-item label { display: block; font-size: 9.5px; color: var(--muted-2); margin-bottom: 2px; }
.detail-item span { display: block; font-size: 11.5px; color: var(--ink-2); word-break: break-all; }
.detail-item.full { grid-column: 1 / -1; }
.money-board { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 10px; padding: 13px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-board .item label { display: block; font-size: 9px; color: var(--muted); }
.money-board .item b { display: block; font-family: var(--mono); font-size: 14px; font-weight: 500; margin-top: 2px; }
.money-board .item.highlight b { color: var(--green); }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 10px; position: relative; padding-bottom: 14px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #cbd6e5; background: #fff; flex: 0 0 auto; margin-top: 3px; z-index: 1; }
.timeline-dot.done { border-color: var(--green); background: var(--green); }
.timeline-content b { display: block; font-size: 11px; font-weight: 500; }
.timeline-content span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.invoice-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 7px; }
.invoice-mini:last-child { margin-bottom: 0; }
.invoice-mini .no { font-family: var(--mono); font-size: 10px; }
.invoice-mini .amt { font-family: var(--mono); font-size: 11px; }

/* --------------------------------------------------------------- invoice page */
.invoice-no { font-family: var(--mono); font-size: 10.5px; color: #315c9c; }
.invoice-title-cell b { display: block; font-size: 11.5px; font-weight: 500; }
.invoice-title-cell span { display: block; font-size: 9px; color: var(--muted-2); margin-top: 1px; }
.invoice-type-tag { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 4px; font-size: 9px; background: #f1f4f8; color: #65758a; }
.invoice-type-tag.special { background: #fff4e6; color: #a86b19; }
.invoice-preview {
  border: 1px solid #e3d7cb; background: #fffdf9; padding: 18px; border-radius: 6px;
  color: #443c36; position: relative;
}
.invoice-preview h4 { text-align: center; color: #b53b36; font-family: "SimSun", serif; letter-spacing: 3px; font-size: 18px; }
.invoice-preview .ip-meta { display: flex; justify-content: space-between; font-size: 9px; color: #78695f; margin-top: 10px; }
.invoice-preview .ip-line { display: flex; justify-content: space-between; font-size: 10px; padding: 6px 0; border-bottom: 1px dashed #e4d8cd; }
.invoice-preview .ip-total { text-align: right; font-family: var(--mono); font-size: 16px; color: #b53b36; margin-top: 10px; }

/* --------------------------------------------------------------- reports */
.report-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 15px;
}
.report-controls .date-input { width: 135px; }
.report-period { color: var(--muted); font-size: 10.5px; }
.report-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; }
.report-summary .item { padding: 16px 18px; border-right: 1px solid var(--line); }
.report-summary .item:last-child { border-right: 0; }
.report-summary label { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.report-summary b { display: block; font-family: var(--mono); font-size: 21px; font-weight: 600; letter-spacing: -.4px; margin-top: 5px; }
.report-summary span { font-size: 9px; color: var(--muted-2); }
.report-summary .delta { font-family: var(--mono); font-size: 9px; }
.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 105px 1fr 72px; align-items: center; gap: 10px; }
.bar-row .label { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { height: 8px; background: #f1f4f8; border-radius: 8px; overflow: hidden; }
.bar-row .track span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #3e86fa, #62c4d1); }
.bar-row .value { font-family: var(--mono); font-size: 10px; text-align: right; color: var(--ink-2); }
.report-table .table td { padding-top: 9px; padding-bottom: 9px; }
.report-table .table th { position: sticky; top: 0; z-index: 1; }
.report-footnote { color: var(--muted-2); font-size: 9.5px; margin-top: 10px; line-height: 1.7; }

/* --------------------------------------------------------------- employees */
.podium-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.podium-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  display: flex; gap: 12px; overflow: hidden;
}
.podium-card::after { content: ""; position: absolute; right: -25px; bottom: -35px; width: 100px; height: 100px; border-radius: 50%; background: rgba(33,104,232,.04); }
.podium-card.p1 { border-color: #ecd7ac; background: linear-gradient(145deg, #fffdf8, #fff); }
.podium-card.p1::after { background: rgba(200,134,47,.07); }
.podium-rank { position: absolute; right: 12px; top: 9px; font-family: var(--mono); font-size: 22px; color: #eef1f5; font-weight: 700; }
.podium-card.p1 .podium-rank { color: #f3e3c3; }
.podium-main { min-width: 0; position: relative; z-index: 1; }
.podium-main h4 { font-size: 13px; font-weight: 600; margin-top: 9px; }
.podium-main p { font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.podium-sales { font-family: var(--mono); font-size: 17px; font-weight: 600; margin-top: 10px; letter-spacing: -.3px; }
.podium-sub { display: flex; gap: 12px; margin-top: 4px; font-size: 9px; color: var(--muted); }
.podium-sub b { color: var(--ink-2); font-family: var(--mono); font-weight: 500; }
.progress { height: 5px; border-radius: 5px; background: #eef2f7; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #3e86fa, #5bc3cf); }
.progress.gold span { background: linear-gradient(90deg, #d09a45, #e5bd75); }
.avatar {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; flex: 0 0 auto; letter-spacing: .3px;
}
.avatar.sm { width: 27px; height: 27px; border-radius: 7px; font-size: 9.5px; }
.avatar.lg { width: 47px; height: 47px; border-radius: 12px; font-size: 15px; }
.avatar-xl { width: 56px; height: 56px; border-radius: 14px; font-size: 18px; }
.emp-cell { display: flex; align-items: center; gap: 9px; }
.emp-cell .meta b { display: block; font-size: 11.5px; font-weight: 500; }
.emp-cell .meta span { display: block; font-size: 9px; color: var(--muted-2); }
.target-cell { min-width: 100px; }
.target-cell .top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; margin-bottom: 4px; }
.target-cell .top span:first-child { color: var(--muted); font-family: var(--font); }
.employee-hero { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.employee-hero h3 { font-size: 17px; }
.employee-hero p { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* --------------------------------------------------------------- finance */
.finance-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.finance-stat { padding: 16px 18px; }
.finance-stat .label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.finance-stat .label svg { width: 14px; height: 14px; }
.finance-stat .value { font-family: var(--mono); font-size: 22px; font-weight: 600; margin-top: 6px; letter-spacing: -.4px; }
.finance-stat .foot { font-size: 9.5px; color: var(--muted-2); margin-top: 4px; }
.cashflow-chart { padding: 4px 0; }
.expense-cat { display: flex; flex-direction: column; gap: 12px; }
.expense-cat-row .top { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; margin-bottom: 5px; }
.expense-cat-row .top b { font-family: var(--mono); font-weight: 500; }
.expense-cat-row .track { height: 6px; background: #f1f4f8; border-radius: 6px; overflow: hidden; }
.expense-cat-row .track span { display: block; height: 100%; border-radius: 6px; background: #d8a45a; }
.txn-type { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; }
.txn-icon { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; }
.txn-icon svg { width: 13px; height: 13px; }
.txn-icon.receipt { background: var(--green-soft); color: var(--green); }
.txn-icon.payment { background: var(--blue-soft); color: var(--blue); }
.txn-icon.expense { background: var(--gold-soft); color: var(--gold); }
.txn-icon.refund { background: var(--red-soft); color: var(--red); }
.amount-in { color: var(--green); font-family: var(--mono); font-weight: 600; }
.amount-out { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.finance-split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 16px; }
.finance-side { display: flex; flex-direction: column; gap: 16px; }

/* --------------------------------------------------------------- customers */
.customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.customer-card { padding: 16px; position: relative; transition: .18s; cursor: pointer; }
.customer-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); border-color: #d4deec; }
.customer-card .top { display: flex; align-items: flex-start; gap: 11px; }
.customer-card .logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff; flex: 0 0 auto; }
.customer-card h4 { font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.customer-card .sub { font-size: 9px; color: var(--muted); margin-top: 2px; }
.customer-card .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.customer-card .stats label { display: block; font-size: 9px; color: var(--muted); }
.customer-card .stats b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; margin-top: 2px; }
.customer-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 9px; color: var(--muted-2); }
.level-tag { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-family: var(--mono); font-size: 9px; font-weight: 600; }
.level-A { background: #fbf0d8; color: #a9761d; }
.level-B { background: #eaf1ff; color: #2c66c7; }
.level-C { background: #f0f3f7; color: #65758a; }

/* --------------------------------------------------------------- settings */
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 8px; position: sticky; top: 90px; }
.settings-nav button {
  width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 9px 10px;
  display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); text-align: left;
}
.settings-nav button svg { width: 15px; height: 15px; }
.settings-nav button.active { background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.settings-panel { padding: 22px; }
.settings-panel h3 { font-size: 15px; font-weight: 600; }
.settings-panel .panel-desc { color: var(--muted); font-size: 11px; margin-top: 3px; margin-bottom: 20px; }
.settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; }
.info-row { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 11.5px; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row b { font-weight: 500; font-family: var(--mono); font-size: 10.5px; }
.account-list { display: flex; flex-direction: column; gap: 8px; }
.account-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; }
.account-item .meta { flex: 1; }
.account-item b { display: block; font-size: 11.5px; font-weight: 500; }
.account-item span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.password-form { max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.security-note { margin-top: 20px; padding: 12px 14px; border-radius: 9px; background: #f8fafc; border: 1px solid var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.8; }

/* --------------------------------------------------------------- misc */
.loading-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.65); display: grid; place-items: center; border-radius: inherit; z-index: 5; }
.page-loading { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 11px; }
.inline-note { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.inline-note svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; color: #8da0b8; }
.action-menu-wrap { position: relative; }
.action-menu {
  position: absolute; right: 0; top: 32px; min-width: 130px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow-md); z-index: 20; padding: 4px;
}
.action-menu button { width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 9px; border-radius: 5px; font-size: 11px; color: var(--ink-2); }
.action-menu button:hover { background: var(--surface-2); }
.action-menu button.danger { color: var(--red); }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .grid-main { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr); }
  .kpi-value { font-size: 22px; }
  .page { padding: 22px 24px 38px; }
  .topbar { padding: 0 24px; }
  .topbar-date { display: none; }
}
@media (max-width: 1100px) {
  .grid-main, .grid-lower, .finance-split { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { align-items: flex-start; flex-direction: column; gap: 16px; }
  .hero-actions { flex-wrap: wrap; }
  .login-page { grid-template-columns: 1fr 440px; }
  .login-art { padding: 36px; }
  .login-art h1 { font-size: 32px; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 240px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(5,15,30,.2); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; background: rgba(8,20,37,.4); z-index: 55; backdrop-filter: blur(2px); }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .topbar { height: 62px; padding: 0 16px; gap: 10px; }
  .topbar-user .meta, .global-search kbd { display: none; }
  .topbar-user { border-left: 0; padding-left: 4px; }
  .global-search { width: 160px; }
  .global-search:focus-within { width: 200px; }
  .page { padding: 18px 16px 34px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-title { font-size: 20px; }
  .page-actions { justify-content: flex-start; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .summary-cell:nth-child(2) { border-right: 0; }
  .summary-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .report-summary { grid-template-columns: repeat(2, 1fr); }
  .report-summary .item:nth-child(2) { border-right: 0; }
  .report-summary .item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .podium-grid { grid-template-columns: 1fr; }
  .finance-strip { grid-template-columns: repeat(2, 1fr); }
  .customer-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-nav button { width: auto; white-space: nowrap; }
  .settings-form { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; padding: 34px 24px; }
  .login-mobile-brand { display: flex; }
  .demo-accounts { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .modal-backdrop { padding: 2vh 12px 20px; }
  .modal { max-height: calc(100vh - 4vh - 20px); }
  .drawer { width: 100%; }
  .topbar-date { display: none; }
}
@media (max-width: 860px) {
  .kpi-spark { display: none; }
  .table { min-width: 900px; }
}
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .filter-bar { padding: 9px; }
  .filter-search { max-width: none; flex-basis: 100%; }
  .filter-bar .select { flex: 1; }
  .global-search { display: none; }
  .hero { padding: 18px; }
  .hero h2 { font-size: 19px; }
  .hero-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-btn { justify-content: center; white-space: nowrap; }
  .hero-btn.primary { grid-column: 1 / -1; }
  .donut-wrap { flex-direction: column; align-items: flex-start; }
  .donut { align-self: center; }
  .table th, .table td { padding-left: 10px; padding-right: 10px; }
  .page { padding-left: 12px; padding-right: 12px; }
  .topbar { padding: 0 12px; }
}

/* --------------------------------------------------------------- report print */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .page-actions, .filter-bar, .report-controls, .no-print, .toast-root { display: none !important; }
  .main-shell { margin-left: 0; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #d9e0e9; break-inside: avoid; }
  .page-head { margin-bottom: 12px; }
  .report-summary { break-inside: avoid; }
  .grid-main, .grid-lower { grid-template-columns: 1fr; }
  .report-table .table-wrap { overflow: visible; }
  .report-table .table th { position: static; }
  @page { size: A4 landscape; margin: 12mm; }
}
