:root {
  --blue: #00a0dc;
  --blue-600: #0089be;
  --blue-700: #006f9a;
  --blue-50: #e8f6fc;
  --blue-100: #d2eef9;
  --black: #0c0c0c;
  --ink: #1b2430;
  --muted: #5b6570;
  --line: #e3e8ee;
  --paper: #f3f6f8;
  --white: #fff;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --success: #176c3a;
  --success-bg: #edf9f1;
  --warn: #9a6700;
  --warn-bg: #fff7e8;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(12, 12, 12, .07);
  --side: 268px;
  --font: "Outfit", "Segoe UI", "Helvetica Neue", sans-serif;
  --grad: linear-gradient(120deg, #0c0c0c 0%, #06202c 38%, #0072a0 68%, #00a0dc 100%);
  --grad-soft: linear-gradient(135deg, rgba(12,12,12,.96), rgba(0,160,220,.92));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.02em; color: var(--black); margin: 0 0 .4em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.tiny { font-size: .8rem; }
.lead { color: var(--muted); max-width: 46rem; }

.notify-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--black);
  color: #d7dee4;
  font-size: .85rem;
  padding: .55rem 1rem;
}
.notify-prompt[hidden] { display: none; }
.notify-prompt-actions { display: inline-flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid transparent;
  background: var(--black);
  color: #fff;
  border-radius: 10px;
  padding: .62rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-primary {
  background: linear-gradient(90deg, #0078ad, #00a0dc);
  color: #fff;
}
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-danger { background: var(--danger); }
.btn-success { background: var(--success); }
.btn-warn { background: #c47d00; color: #fff; }
.btn-sm { padding: .4rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.icon-btn {
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: #fff; color: var(--ink);
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.icon-btn-on-dark { background: #1a1a1a; border-color: #2a2a2a; color: #fff; }
.ico { display: block; }

.kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .7rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 6px;
}

.flash {
  border-radius: 10px;
  padding: .8rem 1rem;
  margin: 0 0 14px;
  font-size: .92rem;
}
.flash-success { background: var(--success-bg); color: var(--success); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash-info { background: var(--blue-50); color: var(--blue-700); }

.badge {
  display: inline-flex; align-items: center;
  border-radius: 999px;
  padding: .18rem .6rem;
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .03em;
  background: var(--paper);
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-pending_supervisor, .badge-pending_procurement, .badge-pending_finance, .badge-pending_finance_close, .badge-pending_ceo, .badge-countered,
.badge-pending_clearance, .badge-pending_admin, .badge-awaiting_pre_assessment, .badge-awaiting_return,
.badge-awaiting_return_assessment, .badge-return_assessed, .badge-quote_uploaded, .badge-rfq_ready, .badge-rfq_exported {
  background: var(--warn-bg); color: var(--warn);
}
.badge-approved_to_purchase, .badge-approved_to_pay, .badge-approved, .badge-completed, .badge-closed, .badge-issued,
.badge-available, .badge-active, .badge-pre_assessed {
  background: var(--success-bg); color: var(--success);
}
.badge-rejected_supervisor, .badge-rejected_procurement, .badge-rejected_finance, .badge-rejected_ceo, .badge-rejected_counter, .badge-rejected_clearance,
.badge-rejected, .badge-cancelled, .badge-removed, .badge-under_investigation, .badge-maintenance, .badge-service_due, .badge-not_fit, .badge-damage_found, .badge-disputed {
  background: var(--danger-bg); color: var(--danger);
}
.badge-urgent { background: #fde8e6; color: var(--danger); }
.badge-normal, .badge-draft, .badge-reserved, .badge-training { background: var(--blue-50); color: var(--blue-700); }
.badge-conference { background: #eef0ff; color: #3b4ccc; }
.badge-in_use { background: #eef0ff; color: #3b4ccc; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 12px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 4px 0 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr .9fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--grad);
}
.stat b { display: block; font-size: 1.55rem; letter-spacing: -.03em; }
.stat-label { display: block; color: var(--muted); font-size: .82rem; }
.stat-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.stat-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; flex-shrink: 0;
}
.stat .sparkline { flex-shrink: 0; opacity: .95; }
.stat-trend {
  display: flex; align-items: center; gap: 4px;
  margin-top: 8px; font-size: .72rem; font-weight: 650;
}
.stat-trend .ico { width: 14px; height: 14px; }
.stat-trend.is-up { color: var(--success); }
.stat-trend.is-down { color: var(--danger); }
.stat-trend.is-flat { color: var(--muted); font-weight: 500; }

.insight-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; position: relative; z-index: 1;
}
.insight-pill {
  display: inline-flex; align-items: center;
  border-radius: 999px;
  padding: .28rem .72rem;
  font-size: .75rem; font-weight: 600;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  color: #e8f6fc;
  backdrop-filter: blur(8px);
}
.insight-pill.tone-warn { background: rgba(196,125,0,.28); border-color: rgba(255,200,80,.35); }
.insight-pill.tone-success { background: rgba(23,108,58,.35); border-color: rgba(140,220,170,.3); }
.insight-pill.tone-neutral { background: rgba(0,0,0,.22); }

.chart-span { margin-bottom: 16px; }
.chart-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  margin-bottom: 16px;
}
.chart-card { overflow: hidden; }
.chart-card .card-head { align-items: center; margin-bottom: 8px; }
.chart-card .kicker { margin-bottom: 2px; }
.chart-card h2 { margin: 0; font-size: 1.12rem; }
.chart-card-dark {
  background:
    radial-gradient(720px 240px at 88% -10%, rgba(0,160,220,.38), transparent 55%),
    linear-gradient(135deg, #0c0c0c 0%, #06202c 52%, #003247 100%);
  color: #d5e8f2;
  border: 0;
}
.chart-card-dark h2 { color: #fff; }
.chart-card-dark .kicker { color: #7ad7f5; }
.chart-legend-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.legend-swatch {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; color: #cfe7f3;
}
.legend-swatch::before {
  content: ""; width: 10px; height: 10px; border-radius: 999px;
}
.swatch-purchase::before { background: #5ce1ff; box-shadow: 0 0 0 3px rgba(92,225,255,.18); }
.swatch-trip::before { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.16); }

.chart-canvas-wrap { position: relative; height: 248px; }
.chart-canvas-wrap.is-wide { height: 300px; }
.chart-canvas-wrap.is-donut { height: 220px; }
.chart-canvas-wrap.is-bars { height: 260px; min-height: 180px; }

.chart-donut-layout {
  display: grid;
  grid-template-columns: minmax(160px, .9fr) 1.1fr;
  gap: 8px 16px;
  align-items: center;
}
.chart-legend {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 6px;
}
.chart-legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  gap: 8px;
  align-items: center;
  font-size: .8rem;
  color: var(--ink);
}
.chart-legend i {
  width: 10px; height: 10px; border-radius: 999px; display: block;
}
.chart-legend span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-legend b { font-size: .82rem; }
.chart-legend em { color: var(--muted); font-style: normal; font-size: .72rem; min-width: 2.2em; text-align: right; }

.chart-metric { text-align: right; }
.chart-metric span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.chart-metric strong { font-size: .95rem; }
.chart-footnote { margin: 10px 0 0; }

.seg-bar {
  display: flex; overflow: hidden;
  border-radius: 999px; margin-top: 14px;
  font-size: .72rem; font-weight: 650;
  min-height: 28px;
}
.seg-bar > div {
  display: flex; align-items: center; justify-content: center;
  padding: .25rem .7rem; min-width: 4.5rem;
}
.seg-normal { background: var(--blue-50); color: var(--blue-700); }
.seg-urgent { background: #fde8e6; color: var(--danger); }

.flow-pipe {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.flow-pipe-step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 10px 16px;
  overflow: hidden;
  min-width: 0;
}
.flow-pipe-step b {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.flow-pipe-step span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
}
.flow-pipe-step::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  height: 4px; width: var(--step-fill, 0%);
  background: var(--step-color, var(--blue));
  border-radius: 0 4px 0 0;
}

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td {
  text-align: left; padding: .75rem .6rem;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
table.data th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
table.data tr:hover td { background: #f8fbfd; }
table.data a { font-weight: 600; color: var(--black); text-decoration: none; }
table.data a:hover { color: var(--blue-700); }

.form { display: grid; gap: 12px; }
label.field { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; }
.hint { font-weight: 500; color: var(--muted); font-size: .8rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.row-4 { display: grid; grid-template-columns: 1.6fr 1.2fr .7fr .7fr .9fr auto; gap: 8px; align-items: end; }
.row-cost { display: grid; grid-template-columns: 1.4fr 1.2fr .55fr .55fr .9fr .9fr auto; gap: 8px; align-items: end; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=tel], input[type=search], select, textarea, input[type=file] {
  font: inherit; padding: .65rem .75rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(0,160,220,.28);
  border-color: var(--blue);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--side) 1fr;
  min-height: 100dvh;
}
.sidebar-overlay { display: none; }
.sidebar {
  background: var(--black);
  color: #c9d3da;
  padding: 16px 12px 12px;
  position: sticky; top: 0; height: 100dvh;
  overflow: auto;
  display: flex; flex-direction: column;
  z-index: 50;
}
.sidebar::before {
  content: "";
  display: block; height: 4px; margin: -16px -12px 14px;
  background: linear-gradient(90deg, #000, #00a0dc);
}
.sidebar-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sidebar-close { display: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 4px 8px 12px; }
.brand img { height: 34px; background: #fff; padding: 4px 6px; border-radius: 7px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: #fff; font-size: .92rem; }
.brand-text span { font-size: .72rem; color: #8b96a0; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  color: #d5dce2; text-decoration: none;
  padding: .55rem .7rem; border-radius: 10px; font-size: .9rem; font-weight: 500;
}
.side-nav a:hover, .side-nav a.is-active {
  background: linear-gradient(90deg, rgba(0,160,220,.22), rgba(0,160,220,.06));
  color: #fff; text-decoration: none;
}
.side-nav a.is-active { box-shadow: inset 3px 0 0 var(--blue); }
.nav-ico { width: 22px; display: flex; }
.side-group { display: block; }
.side-label {
  display: flex; align-items: center; gap: 8px;
  width: 100%; margin: 12px 0 2px; padding: 6px 8px;
  border: 0; border-radius: 8px; background: transparent;
  color: #8b96a0; font: inherit; font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 650; cursor: pointer; list-style: none;
}
.side-label::-webkit-details-marker { display: none; }
.side-label::marker { content: ""; }
.side-label:hover { color: #fff; background: rgba(255,255,255,.05); }
.side-label-end { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.side-label .dot { margin-left: 0; }
.side-group[open] > .side-label .dot { display: none; }
.side-chevron {
  width: 7px; height: 7px; flex: 0 0 auto;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease;
}
.side-group[open] > .side-label .side-chevron { transform: rotate(45deg); }
.side-sub { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px; padding-left: 8px; }
.dot {
  margin-left: auto;
  background: var(--blue); color: #fff;
  min-width: 20px; height: 20px; border-radius: 999px;
  font-size: .7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.sidebar-foot { margin-top: auto; padding: 12px 8px 4px; font-size: .72rem; color: #6d7882; }

.app-main { padding: 0 22px 40px; min-width: 0; }
.top-mini {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0 12px;
}
.top-mini-titles { min-width: 0; flex: 1; }
.top-mini-titles h1 { font-size: 1.35rem; margin: 0; }
.app-menu-btn { display: none; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px 4px 4px;
  font-size: .82rem;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
}

.hero-band {
  background: var(--grad);
  color: #fff;
  border-radius: 18px;
  padding: 26px 28px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-band::after {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 60%);
}
.hero-band h1, .hero-band h2 { color: #fff; margin: 0 0 6px; }
.hero-band p { color: #d5e8f2; margin: 0; max-width: 52ch; }
.hero-band .kicker { color: #9be3ff; }

.module-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.module-card {
  display: block; text-decoration: none; color: inherit;
  border-radius: 16px; padding: 20px; min-height: 140px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.module-card:hover { transform: translateY(-2px); text-decoration: none; border-color: #bfe6f6; }
.module-card.purchase { background: linear-gradient(160deg, #fff 55%, #e8f6fc); }
.module-card.training { background: linear-gradient(160deg, #fff 55%, #eef0ff); }
.module-card.fleet { background: linear-gradient(160deg, #fff 55%, #ececec); }
.module-card.ewallet { background: linear-gradient(160deg, #fff 55%, #e7f6ee); }
.module-card h2 { margin: 8px 0 4px; }
.module-card p { color: var(--muted); margin: 0; font-size: .9rem; }
.module-ico {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff;
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: .3rem .8rem;
  color: var(--ink); text-decoration: none; font-size: .85rem;
}
.chip.is-active, .chip:hover { border-color: var(--blue); color: var(--blue-700); text-decoration: none; background: var(--blue-50); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 16px 22px;
  border-left: 2px solid var(--line);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute; left: -6px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue);
}
.timeline strong { display: block; font-size: .9rem; }
.steps {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin: 8px 0 18px;
}
.step {
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 8px 10px;
  font-size: .72rem; color: var(--muted); text-align: center;
  font-weight: 600;
}
.step.is-done { background: var(--blue-50); color: var(--blue-700); border-color: #b8e0f3; }
.step.is-now { background: var(--grad); color: #fff; border-color: transparent; }
.step b { display: block; font-size: .9rem; margin-bottom: 2px; }
.license-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 12, 12, .55);
}
.license-dialog {
  width: min(460px, 100%);
  margin: 0;
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}
.license-dialog h2 { font-size: 1.35rem; }
.license-dialog .actions { margin-top: 8px; }
.steps-8 { grid-template-columns: repeat(8, 1fr); }
.steps-4 { grid-template-columns: repeat(4, 1fr); }
.steps-5 { grid-template-columns: repeat(5, 1fr); }
.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photo-strip a {
  display: block; width: 96px; height: 72px;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--paper);
}
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.steps-3 { grid-template-columns: repeat(3, 1fr); }

.kind-pick {
  border: 0; margin: 0 0 12px; padding: 0;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.kind-pick legend { font-size: .88rem; font-weight: 600; margin-bottom: 6px; width: 100%; }
.kind-option {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .9rem; cursor: pointer; font-weight: 600; font-size: .88rem;
  background: #fff;
}
.kind-option:has(input:checked) {
  border-color: var(--blue); background: var(--blue-50); color: var(--blue-700);
}
.kind-option input { accent-color: var(--blue); }

.line-total {
  display: flex; align-items: center;
  min-height: 42px; font-variant-numeric: tabular-nums; font-weight: 650;
}
.cost-grand {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.cost-grand span { color: var(--muted); font-weight: 600; }
.cost-grand strong { font-size: 1.2rem; letter-spacing: -.02em; }

.budget-panel {
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
  background: var(--paper); border: 1px solid var(--line);
}
.budget-panel.is-ok { background: var(--success-bg); border-color: #c8ead4; }
.budget-panel.is-over { background: var(--danger-bg); border-color: #f4c7c3; }
.budget-meter {
  height: 8px; border-radius: 999px; background: rgba(12,12,12,.08); overflow: hidden; margin-bottom: 12px;
}
.budget-meter i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #0078ad, #00a0dc);
}
.budget-panel.is-over .budget-meter i { background: var(--danger); }
.budget-flag { margin: 8px 0 0; font-size: .88rem; font-weight: 650; }
.budget-flag.ok { color: var(--success); }
.budget-flag.over { color: var(--danger); }

.inline-budget { display: flex; gap: 6px; align-items: center; }
.inline-budget input { width: 130px; }

table.data tfoot th { font-size: .85rem; text-transform: none; letter-spacing: 0; color: var(--ink); }

.item-row { background: #f8fbfd; border: 1px dashed #d5e2ea; border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.remove-row { background: transparent; border: 0; color: var(--danger); cursor: pointer; font: inherit; font-weight: 600; }

.empty {
  text-align: center; padding: 40px 16px; color: var(--muted);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}

.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .92rem; }
.dl dt { color: var(--muted); font-size: .8rem; }

body.is-login {
  background: #07090b;
  min-height: 100dvh;
}
.login-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
}
.login-art {
  background:
    linear-gradient(115deg, #050505 0%, #0c0c0c 42%, #003247 72%, #00a0dc 140%);
  color: #fff;
  padding: 40px 48px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 72%);
  pointer-events: none;
}
.login-orb {
  position: absolute; border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}
.login-orb-a {
  width: 420px; height: 420px;
  right: -120px; top: -80px;
  background: radial-gradient(circle, rgba(0,160,220,.55), transparent 68%);
  animation: orb-drift 14s ease-in-out infinite;
}
.login-orb-b {
  width: 280px; height: 280px;
  left: -80px; bottom: 10%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
  animation: orb-drift 18s ease-in-out infinite reverse;
}
@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 18px) scale(1.08); }
}
.login-art-inner { position: relative; z-index: 1; max-width: 520px; }
.login-logo {
  height: 48px; width: auto;
  background: #fff;
  padding: 7px 10px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.login-kicker {
  margin: 32px 0 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 600;
  color: #7ad7f5;
}
.login-kicker-dark { color: var(--blue-700); margin: 0 0 6px; }
.login-art h1 {
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.04em;
  max-width: 12ch;
  margin: 0 0 16px;
}
.login-lead { color: #cfe7f3; max-width: 42ch; font-size: 1.02rem; }
.login-features { display: grid; gap: 10px; margin-top: 28px; }
.login-feature {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.login-feature-ico {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0c0c0c, #00a0dc);
  color: #fff;
}
.login-feature strong { display: block; color: #fff; font-size: .95rem; }
.login-feature span { color: #b9d7e6; font-size: .8rem; }
.login-art-foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  color: #9bb8c6; font-size: .78rem;
  padding-top: 24px;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 28px 28px 36px;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(0,160,220,.12), transparent 50%),
    #f4f8fb;
  overflow: auto;
}
.auth-card {
  width: min(460px, 100%);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 22px;
  padding: 28px 28px 22px;
  box-shadow: 0 24px 60px rgba(12, 20, 28, .1);
  backdrop-filter: blur(16px);
  animation: card-in .5s ease both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.auth-card-head h2 { font-size: 1.55rem; margin: 0 0 4px; }
.auth-card-head .muted { margin-bottom: 18px; }
.login-logo-mobile { display: none; height: 36px; background: #fff; padding: 5px 7px; border-radius: 8px; margin-bottom: 14px; }
.login-form { gap: 14px; }
.input-shell {
  display: flex; align-items: center; gap: 8px;
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 .55rem 0 .75rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input-shell:focus-within {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,160,220,.16);
}
.input-shell input {
  border: 0; background: transparent; padding: .78rem .35rem; outline: none;
  box-shadow: none; flex: 1; min-width: 0; width: auto;
}
.input-shell input:focus { outline: none; box-shadow: none; }
.input-ico { color: #7a8894; display: flex; }
.input-action {
  border: 0; background: transparent; color: #6b7782;
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.input-action:hover { background: #eef3f6; color: var(--ink); }
.btn-login {
  margin-top: 4px;
  height: 48px;
  border-radius: 12px;
  font-size: 1rem;
  background: linear-gradient(90deg, #0c0c0c, #0078ad 55%, #00a0dc);
  box-shadow: 0 10px 22px rgba(0,160,220,.28);
}
.btn-login:hover { filter: none; background: linear-gradient(90deg, #111, #0089be 55%, #19b4ef); }
.login-help {
  margin: 16px 0 0;
  text-align: center;
  font-size: .88rem;
}
@media (prefers-reduced-motion: reduce) {
  .login-orb-a, .login-orb-b, .auth-card { animation: none; }
}

.rfq-doc {
  background: #fff; max-width: 900px; margin: 0 auto;
  padding: 36px; border: 1px solid var(--line); border-radius: 8px;
}
.rfq-head {
  display: flex; justify-content: space-between; gap: 20px; align-items: start;
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, #000, #00a0dc) 1;
  padding-bottom: 16px; margin-bottom: 20px;
}
.rfq-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin: 16px 0; }
.print-hide { }

.report-group { font-size: 1.05rem; margin: 8px 0 10px; }
.report-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.report-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}
.report-card:hover { border-color: #bfe6f6; text-decoration: none; transform: translateY(-2px); }
.report-card h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.report-card p { margin: 0; color: var(--muted); font-size: .88rem; }

.report-letterhead, .report-print-title { display: none; }
.report-filters { margin-bottom: 14px; }
.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.report-meta { color: var(--muted); font-size: .85rem; margin: 0 0 14px; }
.report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.report-section { margin-bottom: 16px; }
.report-table .num, table.data th.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

@media print {
  .notify-prompt, .sidebar, .top-mini, .print-hide, .flash { display: none !important; }
  .app-shell { display: block; }
  .app-main { padding: 0; }
  .rfq-doc { box-shadow: none; border: 0; }
  .report-letterhead {
    display: flex; align-items: center; gap: 12px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #000, #00a0dc) 1;
    padding-bottom: 12px; margin-bottom: 12px;
  }
  .report-letterhead img { height: 36px; }
  .report-letterhead strong { display: block; }
  .report-letterhead span { color: #5b6570; font-size: .85rem; }
  .report-print-title { display: block; margin-bottom: 8px; }
  .report-print-title h1 { margin: 0; }
  .card { box-shadow: none; }
  .report-kpis .stat { break-inside: avoid; }
  .report-section { break-inside: avoid; }
}

@media (max-width: 1020px) {
  .stats, .grid-4, .grid-3, .module-cards, .steps, .chart-grid, .flow-pipe, .report-cards, .report-filter-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .login-shell { grid-template-columns: 1fr; }
  .row-2, .row-3, .row-4, .row-cost { grid-template-columns: 1fr; }
  .chart-canvas-wrap.is-wide { height: 240px; }
  .login-shell { min-height: auto; }
  .login-art { min-height: auto; padding: 28px 22px 22px; }
  .login-art h1 { font-size: 1.8rem; max-width: none; }
  .login-features { grid-template-columns: 1fr 1fr; }
  .login-art-foot { padding-top: 16px; }
  .login-panel { padding: 18px 16px 32px; }
  .steps { display: flex; overflow: auto; }
  .step { min-width: 110px; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-105%);
    width: min(86vw, 300px); transition: transform .2s ease;
  }
  .sidebar.is-open { transform: none; }
  .sidebar-overlay {
    display: block; position: fixed; inset: 0;
    background: rgba(8,10,12,.48); z-index: 45; border: 0;
  }
  .sidebar-overlay[hidden] { display: none; }
  .app-menu-btn { display: inline-flex; }
  .sidebar-close { display: inline-flex; }
  .hide-xs { display: none !important; }
  .stats, .grid-3, .grid-4, .module-cards, .login-features, .chart-grid, .flow-pipe, .chart-donut-layout, .report-cards, .report-filter-grid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .chart-canvas-wrap.is-wide, .chart-canvas-wrap.is-bars { height: 220px; }
  .chart-legend-inline { width: 100%; }
  .auth-card { padding: 22px 18px 16px; }
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  font-weight: 500;
}
.check-row input { margin-top: 4px; }
.supervise-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
  margin-top: 8px;
}
.supervise-picks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.plain-list { color: var(--muted); padding-left: 18px; }
.plain-list li { margin: 0 0 8px; }

.icon-btn { position: relative; }
.notify-bell-dot, [data-notify-bell] [data-notify-count] {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
[data-notify-bell] [data-notify-count][hidden],
.side-nav [data-notify-count][hidden] { display: none; }

.notify-list { padding: 0; overflow: hidden; }
.notify-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.notify-row:last-child { border-bottom: 0; }
.notify-row:hover { background: var(--blue-50); text-decoration: none; }
.notify-row.is-read { opacity: .65; }
.notify-row-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue); margin-top: 7px; flex-shrink: 0;
}
.notify-row.is-read .notify-row-dot { background: var(--line); }
.notify-row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notify-row-body strong { color: var(--black); }

.notify-toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 24px));
}
.notify-toast {
  background: #0c0c0c;
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  text-decoration: none;
  display: block;
}
.notify-toast:hover { text-decoration: none; color: #fff; }
.notify-toast b { display: block; font-size: .9rem; margin-bottom: 2px; }
.notify-toast span { display: block; font-size: .8rem; color: #c9d3da; }

.dept-hero {
  display: flex; justify-content: space-between; align-items: end; gap: 16px;
}
.dept-hero .btn { position: relative; z-index: 1; }
.dept-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.dept-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.dept-search { flex: 1; min-width: 0; }
.dept-search .input-shell { background: #fff; }
.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.dept-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 230px;
}
.dept-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--dept-accent, var(--blue));
}
.dept-card.is-editing {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,160,220,.12);
}
.dept-card-head { display: flex; gap: 12px; align-items: flex-start; }
.dept-mark {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff;
  background: var(--dept-accent, var(--grad));
}
.dept-card-titles { min-width: 0; }
.dept-card-titles h2 { margin: 0 0 4px; font-size: 1.05rem; }
.dept-code {
  display: inline-flex;
  background: var(--blue-50); color: var(--blue-700);
  border-radius: 999px; padding: .12rem .55rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
}
.dept-meta {
  display: grid; gap: 8px; margin: 0;
  font-size: .88rem;
}
.dept-meta > div { display: grid; gap: 2px; }
.dept-meta dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.dept-meta dd { margin: 0; }
.dept-warn { color: var(--warn); font-weight: 650; }
.dept-people { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dept-avatars { display: flex; }
.dept-avatars .avatar { margin-right: -8px; border: 2px solid #fff; width: 30px; height: 30px; font-size: .65rem; }
.dept-more { background: var(--paper); color: var(--ink); }
.dept-card-actions { display: flex; gap: 8px; margin-top: auto; }
.dept-form-card { position: sticky; top: 16px; }
.dept-unassigned { margin-top: 16px; }
.dept-unassigned-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dept-unassigned-list li {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 10px; align-items: center;
}
.dept-unassigned-list strong { display: block; }
@media (max-width: 1020px) {
  .dept-layout { grid-template-columns: 1fr; }
  .dept-form-card { position: static; }
  .dept-hero { align-items: start; flex-direction: column; }
}

.stat-link { color: inherit; text-decoration: none; display: block; }
.stat-link:hover { text-decoration: none; border-color: #bfe6f6; transform: translateY(-1px); }
.chip-count {
  display: inline-flex; min-width: 1.2em; justify-content: center;
  margin-left: 4px; font-variant-numeric: tabular-nums; opacity: .75;
}
.list-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.list-search { flex: 1; min-width: 220px; }
.list-search .input-shell { background: #fff; }
.list-sort {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; color: var(--muted);
}
.list-sort select { min-width: 180px; }
.sort-link { color: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; }
.sort-link:hover, .sort-link.is-on { color: var(--blue-700); text-decoration: none; }
.list-primary { font-weight: 700; }
.list-table td { vertical-align: middle; }
.row-actions-cell { width: 1%; white-space: nowrap; text-align: right; }
.row-actions { display: inline-flex; align-items: center; gap: 6px; }
.row-actions form { display: contents; }
.row-actions .icon-btn { width: 34px; height: 34px; border-radius: 8px; }
.row-actions .icon-btn .ico { width: 16px; height: 16px; }
.row-actions .icon-btn:hover { border-color: var(--blue); color: var(--blue-700); text-decoration: none; }
.row-actions .icon-btn.is-due,
.row-actions .icon-btn.is-danger { color: var(--danger); border-color: #f4c7c3; background: #fff6f5; }
.row-actions .icon-btn.is-due:hover,
.row-actions .icon-btn.is-danger:hover { color: var(--danger); border-color: var(--danger); }
.row-actions .icon-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.card[id] { scroll-margin-top: 16px; }
.pager {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  margin-top: 14px;
}
.pager-meta { color: var(--muted); font-size: .85rem; }
.pager-pages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pager-gap { color: var(--muted); padding: 0 4px; }
.vehicle-hero-side {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.vehicle-odo {
  font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; color: #fff;
}
.vehicle-odo span { font-size: .85rem; font-weight: 500; color: #cfe7f3; }
.vehicle-trip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vehicle-trip-list li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.vehicle-trip-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.vehicle-trip-list a { font-weight: 700; color: var(--black); }
.service-meter {
  height: 8px; border-radius: 999px; background: rgba(12,12,12,.08); overflow: hidden; margin: 8px 0 6px;
}
.service-meter i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #0078ad, #00a0dc);
}
.service-meter.is-due i { background: var(--danger); }
.service-km { font-variant-numeric: tabular-nums; font-weight: 700; }
tr.is-service-due td { background: #fff6f5; }
.service-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.service-history li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.service-history li:last-child { border-bottom: 0; padding-bottom: 0; }
.budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.budget-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.budget-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--dept-accent, var(--blue));
}
.budget-card.is-over { border-color: #f4c7c3; }
.budget-card.is-unset { background: linear-gradient(180deg, #fff 70%, #f8fbfd); }
.budget-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
}
.budget-card-head h2 { margin: 0 0 4px; font-size: 1.05rem; }
.budget-meter-stack { display: flex; height: 10px; margin-bottom: 0; background: rgba(12,12,12,.08); }
.budget-meter-stack i { height: 100%; display: block; }
.budget-meter-stack .is-approved { background: linear-gradient(90deg, #0078ad, #00a0dc); }
.budget-meter-stack .is-queued { background: #c47d00; }
.budget-legend {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  font-size: .75rem; color: var(--muted); font-weight: 600;
}
.budget-kpis {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0;
}
.budget-kpis dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.budget-kpis dd { margin: 0; font-weight: 700; }
.budget-lines, .budget-requests { display: grid; gap: 10px; }
.budget-line, .budget-request {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.budget-line-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.budget-line-head b { font-variant-numeric: tabular-nums; }
.budget-edit { gap: 8px; }
.budget-edit-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
}
.budget-card-head h2 a { color: inherit; text-decoration: none; }
.budget-card-head h2 a:hover { color: var(--blue-700); }
.budget-line-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.budget-line-list li { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; }
.budget-line-list b { font-variant-numeric: tabular-nums; }
.budget-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.budget-workspace { display: grid; gap: 16px; }
.budget-workspace.is-narrow { max-width: 760px; }
.budget-workspace .page-head { margin-bottom: 0; }
a.kicker { text-decoration: none; }
.budget-history { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.budget-history li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.budget-history a { font-weight: 650; color: var(--black); text-decoration: none; }
.budget-history a:hover { color: var(--blue-700); }
.suggest-row { display: flex; flex-wrap: wrap; gap: 8px; }
button.chip { font: inherit; cursor: pointer; }
button.chip:disabled,
button.chip.is-used { background: var(--blue-50); border-color: var(--blue); color: var(--blue-700); cursor: default; }
.line-sheet { display: grid; gap: 10px; }
.line-sheet-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, .7fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.line-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.line-total b { font-size: 1.05rem; }
.budget-decide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.budget-workspace .dl dd { margin: 0; }
@media (max-width: 820px) {
  .line-sheet-row, .budget-decide { grid-template-columns: 1fr; }
  .line-total { align-items: flex-start; }
}
.budget-workspace.is-transfer { width: 100%; max-width: none; }
.xfer { gap: 16px; }
.xfer-empty h2 { margin-bottom: 6px; }
.xfer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.xfer-summary div {
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 2px;
}
.xfer-summary span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.xfer-summary b { font-variant-numeric: tabular-nums; font-size: 1.02rem; }
.xfer-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.xfer-side { min-width: 0; }
.xfer-legend {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.xfer-picks {
  display: grid;
  gap: 8px;
  max-height: 440px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px;
}
.xfer-picks.is-open { max-height: none; overflow: visible; }
.xfer-pick { display: block; cursor: pointer; position: relative; }
.xfer-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
.xfer-pick-body {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.xfer-pick:hover .xfer-pick-body { border-color: #b7d7e6; }
.xfer-pick:focus-within .xfer-pick-body { outline: 2px solid rgba(0, 160, 220, .45); outline-offset: 2px; }
.xfer-side.is-from .xfer-pick:has(input:checked) .xfer-pick-body {
  border-color: var(--blue);
  background: var(--blue-50);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.xfer-side.is-to .xfer-pick:has(input:checked) .xfer-pick-body {
  border-color: #1f8a4c;
  background: var(--success-bg);
  box-shadow: inset 0 0 0 1px #1f8a4c;
}
.xfer-pick:has(input:disabled) { cursor: not-allowed; }
.xfer-pick:has(input:disabled) .xfer-pick-body { opacity: .42; }
.xfer-pick-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.xfer-pick-name { font-weight: 700; flex: 1 1 7rem; min-width: 0; }
.xfer-code {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--blue-700);
}
.xfer-pick-free { font-variant-numeric: tabular-nums; font-weight: 700; margin-left: auto; }
.xfer-side.is-from .xfer-pick.is-empty .xfer-pick-free { color: var(--warn); }
.xfer-pick-meta, .xfer-after { color: var(--muted); font-size: .78rem; font-weight: 600; }
.xfer-after { color: var(--ink); }
.xfer-meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(12, 12, 12, .08);
  overflow: hidden;
}
.xfer-meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0078ad, #00a0dc);
  transition: width .25s ease;
}
.xfer-side.is-to .xfer-meter i { background: linear-gradient(90deg, #176c3a, #3d9b62); }
.xfer-bridge { display: flex; align-items: center; padding-top: 30px; }
.xfer-swap { background: #fff; }
.xfer-swap:hover { border-color: var(--blue); color: var(--blue-700); }
.xfer-pay {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}
.xfer-pay-side { display: grid; gap: 8px; }
.xfer-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xfer-range { width: 100%; accent-color: #0078ad; margin: 0; }
.xfer-pay .hint { margin: 0; }
.xfer-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #f8fbfd, #fff);
  display: grid;
  gap: 10px;
}
.xfer-preview.is-ready { background: var(--success-bg); border-color: #c8ead4; }
.xfer-preview.is-bad { background: var(--danger-bg); border-color: #f4c7c3; }
.xfer-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.xfer-flow article { display: grid; gap: 2px; min-width: 0; }
.xfer-flow strong { word-break: break-word; }
.xfer-math { font-variant-numeric: tabular-nums; font-weight: 700; }
.xfer-flow-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--blue-700);
}
.xfer-message { margin: 0; font-weight: 650; }
.xfer-preview.is-bad .xfer-message { color: var(--danger); }
.xfer-preview.is-ready .xfer-message { color: var(--success); }
@media (max-width: 800px) {
  .xfer-summary, .xfer-stage, .xfer-pay, .xfer-flow { grid-template-columns: 1fr; }
  .xfer-bridge { padding-top: 0; justify-content: center; }
  .xfer-flow-mark { justify-self: center; }
  .xfer-pick-top { display: grid; }
  .xfer-pick-free { margin-left: 0; }
  .xfer-picks { max-height: none; overflow: visible; }
}
.btn-outline { color: var(--ink); }
.hero-band .btn-outline {
  background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28);
}
.hero-band .btn-outline:hover { background: rgba(255,255,255,.2); }
