:root {
  --bg: #071827;
  --paper: #0b2236;
  --ink: #f4f7fb;
  --muted: #b7c3d4;
  --line: #1c3a55;
  --gold: #e7b94b;
  --gold2: #f0d27a;
  --ok: #34d399;
  --bad: #fb7185;
  --shadow: 0 18px 40px rgba(0, 0, 0, .35);
  --bg: var(--bg);
  --paper: var(--paper);
  --ink: var(--ink);
  --muted: var(--muted);
  --line: var(--line);
  --gold: var(--gold);
  --gold2: var(--gold2);
  --ok: var(--ok);
  --bad: var(--bad);
}
* { box-sizing: border-box; }
html { font-size: 14px; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: "Cairo", Tahoma, sans-serif; line-height: 1.45; }
h1 { font-size: 1.28rem; margin: 0 0 8px; letter-spacing: -.02em; }
h2 { font-size: 1.02rem; margin: 0; }
.ico { width: 18px; height: 18px; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; }
.brand { font-weight: 800; letter-spacing: .04em; }
.brand b { color: var(--gold); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 8px 13px; cursor: pointer; font-size: .84rem; }
.btn-gold { background: var(--gold); color: #03101c; font-weight: 700; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.card, .search, .kpi, table { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 40px 0; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 10px; }
.muted { color: var(--muted); }
.search { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px; box-shadow: var(--shadow); }
.search label, .grid2 label { display: grid; gap: 6px; font-size: .82rem; color: var(--muted); }
input, select, textarea { border: 1px solid #d4b56a; border-radius: 10px; padding: 10px 12px; background: #efe4c8; color: #1c1402; }
select, option { background: #efe4c8; color: #1c1402; color-scheme: light; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.car { padding: 0; overflow: hidden; }
.car-art { height: 110px; display: grid; place-items: center; font-size: 2rem; background: linear-gradient(180deg, #f3ead6, #fff); }
.car .body { padding: 14px; }
.price { color: var(--gold); font-weight: 800; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.side { background: #fffaf3; border-inline-end: 1px solid var(--line); padding: 18px 12px; }
.side a, .side button { width: 100%; background: none; border: 0; color: var(--muted); padding: 10px 12px; border-radius: 12px; text-align: start; cursor: pointer; }
.side a.active, .side a:hover { background: #f1e6d0; color: var(--ink); }
.main { padding: 22px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 16px; }
.kpi strong { display: block; font-size: 1.5rem; color: var(--gold); }
.hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hub a { padding: 18px; box-shadow: var(--shadow); }
.hub h3 { margin: 0 0 6px; }
table { width: 100%; border-collapse: collapse; overflow: hidden; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; font-size: .9rem; }
.notice { padding: 10px 12px; border-radius: 12px; background: #eef7f0; color: var(--ok); margin-bottom: 12px; }
.errors { color: var(--bad); }
.login-box { width: min(420px, calc(100% - 32px)); margin: 8vh auto; padding: 28px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.page-toolbar { display: flex; align-items: center; margin: 0 0 18px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  font-weight: 800; box-shadow: var(--shadow);
}
.back-btn:hover { background: #f4eee3; border-color: var(--gold); color: var(--gold); }
.back-arrow { font-size: 1.1rem; line-height: 1; }
.hub-page, .hub-page { background: #f7f5f0; }
.hub-top { background: #fffdf8; border-bottom: 1px solid var(--line); }
.hub-top-inner { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.hub-top-actions { display: flex; gap: 8px; align-items: center; }
.chip { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .8rem; font-weight: 700; }
.hub-main { padding: 28px 0 48px; }
.hub-hero { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 22px; }
.hub-hero h1 { margin: 4px 0 6px; font-size: clamp(1.25rem, 2.4vw, 1.55rem); }
.eyebrow { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; color: var(--gold); }
.hub-mini-kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.hub-mini-kpis div { min-width: 88px; padding: 10px 14px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.hub-mini-kpis b { display: block; font-size: 1.15rem; }
.hub-mini-kpis span { color: var(--muted); font-size: .75rem; }
.hub-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hub-tile {
  --tile: #8a6a32;
  --tile-icon: #8a6a32;
  --tile-glow: rgba(196, 163, 90, .22);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto;
  min-height: 124px; padding: 14px 12px 10px; border-radius: 18px; overflow: hidden;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: tile-in .4s ease both; animation-delay: var(--delay, 0ms);
}
.hub-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tile) 35%, var(--line)); box-shadow: 0 16px 32px var(--tile-glow); }
.hub-tile::before { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 90px; height: 90px; background: radial-gradient(circle at 0 0, var(--tile-glow), transparent 70%); pointer-events: none; }
.hub-tile-icon { grid-column: 2; grid-row: 1; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--tile) 14%, #fff); color: var(--tile-icon); border: 1px solid color-mix(in srgb, var(--tile) 28%, #fff); font-weight: 800; }
.hub-tile-body { grid-column: 1 / -1; grid-row: 2; margin-top: 12px; }
.hub-tile-body strong { display: block; font-size: .88rem; }
.hub-tile-body small { display: block; margin-top: 5px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.hub-go { grid-column: 1; grid-row: 3; width: 28px; height: 28px; margin-top: 10px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
[dir="rtl"] .hub-go { transform: scaleX(-1); }
.hub-tile:hover .hub-go { background: color-mix(in srgb, var(--tile) 12%, #fff); color: var(--tile); }
.hub-tile[data-tone="teal"] { --tile:#0f766e; --tile-icon:#0f766e; --tile-glow:rgba(15,118,110,.16); }
.hub-tile[data-tone="blue"] { --tile:#1d4ed8; --tile-icon:#1d4ed8; --tile-glow:rgba(29,78,216,.14); }
.hub-tile[data-tone="violet"] { --tile:#6d28d9; --tile-icon:#6d28d9; --tile-glow:rgba(109,40,217,.14); }
.hub-tile[data-tone="amber"] { --tile:#b45309; --tile-icon:#b45309; --tile-glow:rgba(180,83,9,.16); }
.hub-tile[data-tone="rose"] { --tile:#be123c; --tile-icon:#be123c; --tile-glow:rgba(190,18,60,.12); }
.hub-tile[data-tone="emerald"] { --tile:#047857; --tile-icon:#047857; --tile-glow:rgba(4,120,87,.14); }
.hub-tile[data-tone="cyan"] { --tile:#0e7490; --tile-icon:#0e7490; --tile-glow:rgba(14,116,144,.14); }
.hub-tile[data-tone="slate"] { --tile:#475569; --tile-icon:#475569; --tile-glow:rgba(71,85,105,.12); }
@keyframes tile-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .hero, .search, .cards, .kpis, .shell, .hub, .grid2, .hub-hero { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hub-tile { min-height: 132px; padding: 12px; border-radius: 18px; }
  .hub-tile-body strong { font-size: .9rem; }
  .hub-tile-body small { display: none; }
}
html { -webkit-text-size-adjust: 100%; }
button, a, input, select, textarea { touch-action: manipulation; }
input, select, textarea { font-size: 16px; }
.app-dock {
  display: none;
}
@media (max-width: 860px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .hub-top-inner, .top { padding-inline: 4px; }
  .hub-top-actions { gap: 6px; }
  .chip { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero, .search, .cards, .kpis, .shell, .hub, .grid2, .hub-hero { grid-template-columns: 1fr; }
  .search { grid-template-columns: 1fr; }
  .kpis, .hub-mini-kpis { grid-template-columns: 1fr 1fr; display: grid; }
  .login-box { margin: 6vh auto 24px; padding: 22px 18px 24px; border-radius: 24px; }
  .page-toolbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); padding: 8px 0; }
  .back-btn { min-height: 44px; width: 100%; justify-content: center; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .main, .hub-main { padding: 16px 0 8px; }
  .app-dock {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 40;
    background: #efe4c8;
    border-top: 1px solid #e0c36a;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  }
  .app-dock a {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-height: 48px;
    color: #5a4718;
    font-weight: 700;
    border-radius: 14px;
    padding: 6px 4px;
  }
  .app-dock a span { font-size: 1.05rem; }
  .app-dock a small { font-size: .62rem; }
  .app-dock a.active { color: #1c1402; background: #e7b94b; }
}
@media (max-width: 420px) {
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .hub-hero h1, .hero h1 { font-size: 1.45rem; }
}

.intel { display: grid; gap: 18px; }
.intel-hero {
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; gap: 16px; align-items: end;
  padding: 22px 20px; border-radius: 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(196,163,90,.22), transparent 46%),
    radial-gradient(90% 120% at 0% 100%, rgba(15,118,110,.12), transparent 50%),
    #fffdf8;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: intel-in .55s ease both;
}
.intel-hero::after {
  content: ""; position: absolute; inset: -40% auto auto -20%; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(196,163,90,.18), transparent 70%);
  animation: intel-orb 8s ease-in-out infinite;
  pointer-events: none;
}
.intel-hero h1 { margin: 4px 0 6px; font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.intel-hero-meta { display: grid; justify-items: end; gap: 4px; font-size: .82rem; color: var(--muted); z-index: 1; }
.intel-hero-meta strong { color: var(--gold); }
.intel-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.intel-kpi {
  position: relative; overflow: hidden;
  padding: 14px 14px 12px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: intel-in .5s ease both; animation-delay: calc(var(--d, 0) * 70ms);
}
.intel-kpi::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold2), #0f766e);
}
.intel-kpi span { display: block; color: var(--muted); font-size: .74rem; font-weight: 700; }
.intel-kpi strong { display: block; margin: 6px 0 4px; font-size: 1.28rem; letter-spacing: -.03em; }
.intel-kpi small { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.intel-kpi.gold { background: linear-gradient(180deg, #fff8e8, #fff); }
.intel-kpi.gold strong { color: var(--gold); }
.intel-grid { display: grid; grid-template-columns: 1.6fr .9fr; gap: 14px; }
.intel-card {
  padding: 16px; border-radius: 22px; background: #fffdf8;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: intel-in .55s ease both;
}
.intel-card.wide { grid-column: 1 / -1; }
.intel-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 8px; }
.intel-card-head h2 { margin: 0 0 6px; font-size: 1.05rem; }
.intel-card-head p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.65; max-width: 62ch; }
.intel-chip {
  flex: none; padding: 6px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800;
  color: var(--gold); background: #f7eed8; border: 1px solid #ead9a8;
}
.intel-chart { width: 100%; min-height: 180px; }
.intel-chart svg { width: 100%; height: auto; display: block; }
.intel-chart .grid { stroke: #efe7d8; stroke-width: 1; }
.intel-chart .axis { fill: var(--muted); font-size: 11px; font-family: Cairo, sans-serif; }
.intel-chart .area-fill { animation: intel-fill .9s ease both; }
.intel-chart .line-draw {
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: intel-draw 1.5s ease forwards .15s;
}
.intel-chart .dot { opacity: 0; animation: intel-dot .4s ease forwards; animation-delay: calc(.7s + var(--i) * .05s); }
.intel-donut-wrap { position: relative; display: grid; place-items: center; min-height: 220px; }
.intel-chart.donut { width: min(240px, 100%); }
.intel-chart .ring {
  stroke-dasharray: var(--len) var(--circ);
  animation: intel-ring 1.1s cubic-bezier(.22,1,.36,1) both;
  animation-delay: calc(var(--i) * .12s);
}
.intel-donut-center {
  position: absolute; inset: 0; display: grid; place-content: center; place-items: center; pointer-events: none;
}
.intel-donut-center b { font-size: 1.7rem; line-height: 1; }
.intel-donut-center span { color: var(--muted); font-size: .75rem; }
.intel-chart.gauge { min-height: 176px; }
.intel-chart .gauge-num { font-size: 28px; font-weight: 800; fill: var(--ink); font-family: Cairo, sans-serif; }
.intel-chart .gauge-fill, .intel-chart .needle { animation: intel-in .8s ease both; }
.intel-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; list-style: none; margin: 10px 0 0; padding: 0; }
.intel-legend li { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.intel-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.intel-legend b { color: var(--ink); }
.intel-legend em { font-style: normal; color: var(--gold); font-weight: 800; }
.intel-chart.bars { display: grid; gap: 10px; min-height: 0; }
.bar-row { display: grid; grid-template-columns: 72px 1fr 36px; gap: 8px; align-items: center; animation: intel-in .45s ease both; animation-delay: calc(var(--i) * .08s); }
.bar-row span { font-size: .8rem; color: var(--muted); }
.bar-track { height: 10px; border-radius: 999px; background: #f1e9d8; overflow: hidden; }
.bar-row i { display: block; height: 100%; width: 0; border-radius: inherit; animation: intel-bar .9s cubic-bezier(.22,1,.36,1) forwards; animation-delay: calc(.15s + var(--i) * .08s); }
.bar-row b { font-size: .85rem; text-align: end; }
.intel-tip {
  position: fixed; z-index: 80; pointer-events: none; opacity: 0; transform: translateY(6px);
  padding: 8px 10px; border-radius: 12px; background: #1f1b16; color: #fff;
  font-size: .78rem; box-shadow: 0 10px 24px rgba(31,27,22,.22); transition: .16s ease;
}
.intel-tip.on { opacity: 1; transform: none; }
.intel-tip strong { display: block; font-size: .72rem; color: #e8d7a8; }
.table-scroll { overflow-x: auto; }
@keyframes intel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes intel-draw { to { stroke-dashoffset: 0; } }
@keyframes intel-fill { from { opacity: 0; } to { opacity: 1; } }
@keyframes intel-dot { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes intel-ring { from { stroke-dasharray: 0 var(--circ); } }
@keyframes intel-bar { from { width: 0; } to { width: var(--w); } }
@keyframes intel-orb { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(40px, 18px); } }
@media (max-width: 980px) {
  .intel-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .intel-grid { grid-template-columns: 1fr; }
  .intel-hero, .intel-hero-meta { justify-items: start; text-align: start; }
}
@media (max-width: 640px) {
  .intel-kpis { grid-template-columns: 1fr 1fr; }
  .intel-hero { flex-direction: column; align-items: start; padding: 16px; }
  .intel-card-head { flex-direction: column; }
  .bar-row { grid-template-columns: 64px 1fr 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .intel-kpi, .intel-card, .intel-hero, .intel-chart .line-draw, .intel-chart .dot, .bar-row i, .intel-chart .ring {
    animation: none !important; stroke-dashoffset: 0;
  }
  .bar-row i { width: var(--w); }
}

.form-lead { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 14px; }
.form-lead h1 { margin: 0 0 6px; }
.form-lead p { margin: 0; max-width: 52ch; }
.form-tools { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.scan-form { align-items: end; }
.scan-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px; border: 1px solid #ead7a8;
  border-radius: 999px; background: #fff; color: var(--gold); font-weight: 800;
  box-shadow: 0 8px 18px rgba(138, 106, 50, .08); cursor: pointer;
}
.scan-trigger:hover { background: #fff8ea; }
.scan-trigger-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f4ead3; }
body.scan-lock { overflow: hidden; }
.scan-layer {
  position: fixed; inset: 0; z-index: 240;
  display: grid; place-items: center; padding: 18px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.scan-layer.open { opacity: 1; pointer-events: auto; }
.scan-dim { position: absolute; inset: 0; background: rgba(28, 22, 16, .48); backdrop-filter: blur(8px); }
.scan-sheet {
  position: relative; width: min(560px, 100%);
  max-height: min(92vh, 860px); overflow: auto;
  background: #fffdf8; border: 1px solid #ead9b8; border-radius: 24px;
  box-shadow: 0 30px 80px rgba(31, 24, 16, .28);
  transform: translateY(18px) scale(.98); transition: transform .22s ease;
}
.scan-layer.open .scan-sheet { transform: none; }
.scan-head { display: flex; justify-content: space-between; gap: 12px; padding: 18px 18px 8px; }
.scan-kicker { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .12em; color: var(--gold); }
.scan-head h2 { margin: 4px 0 6px; font-size: 1.2rem; }
.scan-head p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.scan-x {
  width: 40px; height: 40px; border: 0; border-radius: 12px; background: #f6f0e4;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.scan-steps { display: flex; align-items: center; gap: 8px; padding: 0 18px 12px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.scan-steps i { flex: 1; height: 1px; background: var(--line); }
.scan-steps span.on { color: var(--gold); }
.scan-steps span.now { color: var(--ink); }
.scan-drop {
  position: relative;
  margin: 0 18px; padding: 22px 16px; border: 1.5px dashed #dcc89a; border-radius: 18px;
  background: linear-gradient(180deg, #fff8ea, #fff); text-align: center;
}
.scan-drop.over { border-color: var(--gold); background: #fff3d8; }
.scan-drop-art {
  width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 16px;
  background:
    radial-gradient(circle at 30% 30%, #fff, transparent 40%),
    linear-gradient(135deg, #c4a35a, #8a6a32);
}
.scan-drop strong { display: block; margin-bottom: 4px; }
.scan-drop small { display: block; color: var(--muted); margin-bottom: 14px; }
.scan-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.scan-pick { position: relative; overflow: hidden; cursor: pointer; }
.scan-pick input[type="file"] {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 18px;
}
.scan-live { margin: 0 18px; display: grid; gap: 12px; }
.scan-live-visual { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.scan-preview { width: 120px; height: 88px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: #f4eee3; }
.scan-bar { height: 7px; background: #efe4cf; border-radius: 999px; overflow: hidden; }
.scan-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #0f766e); transition: width .2s ease; }
.scan-status { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.scan-result { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scan-result label { display: grid; gap: 4px; font-size: .75rem; color: var(--muted); }
.scan-result input { width: 100%; }
.scan-root { display: flex; justify-content: flex-end; width: 100%; }
.scan-foot {
  display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  padding: 14px 18px 18px; position: sticky; bottom: 0; background: #fffdf8;
}
.scan-foot .btn-gold:disabled { opacity: .45; cursor: not-allowed; }
input.scan-filled, select.scan-filled, [data-scan-field].scan-filled {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .15);
  background: #f3fbf8;
}
@media (max-width: 720px) {
  .scan-layer { padding: 0; align-items: end; }
  .scan-sheet { width: 100%; border-radius: 22px 22px 0 0; max-height: 94vh; }
  .scan-live-visual, .scan-result { grid-template-columns: 1fr; }
  .scan-preview { width: 100%; height: 140px; }
  .scan-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

.page-lead { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 14px; }
.page-lead p { margin: 0; max-width: 56ch; }
.subhead { margin: 22px 0 10px; }
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow);
  animation: tile-in .4s ease both; overflow: visible;
}
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.kicker { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .1em; color: var(--gold); }
.panel-head h2 { margin: 2px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid label { display: grid; gap: 5px; font-size: .75rem; color: var(--muted); }
.form-grid label b { color: var(--gold); font-weight: 800; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.doc-card { padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.doc-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.doc-card header > div { flex: 1; }
.doc-card header strong { display: block; font-size: .86rem; }
.doc-card header small { color: var(--muted); font-size: .7rem; }
.doc-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #f6efe0; color: var(--gold); }
.doc-ico .ico { width: 18px; height: 18px; }
.table-wrap { overflow: auto; margin-bottom: 14px; }
.hub-tile-icon .ico { width: 20px; height: 20px; }
.app-dock .ico { width: 20px; height: 20px; }
.app-dock a { display: grid; justify-items: center; gap: 3px; }
.fleet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.car-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow); animation: tile-in .45s ease both; animation-delay: var(--d, 0ms);
  transition: transform .2s ease, box-shadow .2s ease;
}
.car-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(70,50,20,.12); }
.car-card-media { position: relative; height: 132px; background: linear-gradient(160deg, #1f1b16, #8a6a32); }
.car-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-card-art { height: 100%; display: grid; place-items: center; color: #f3ead6; }
.car-card-art .ico { width: 48px; height: 48px; }
.car-plate {
  position: absolute; inset-inline-start: 10px; inset-block-end: 10px;
  background: #f4c430; color: #1a1710; font-weight: 800; font-size: .72rem;
  padding: 4px 8px; border-radius: 6px; letter-spacing: .04em;
}
.car-card-body { padding: 12px; }
.car-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.car-card-top strong { font-size: .9rem; }
.car-card-body p { margin: 6px 0 10px; color: var(--muted); font-size: .74rem; }
.car-card-foot { display: flex; justify-content: space-between; align-items: end; font-size: .72rem; color: var(--muted); }
.car-card-foot b { color: var(--gold); font-size: .92rem; }
.car-card-foot small { font-weight: 700; color: var(--muted); }
.pill { font-size: .65rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.pill-teal { background: #e6f5f2; color: #0f766e; }
.pill-amber { background: #f8ead3; color: #b45309; }
.pill-blue { background: #e8eefc; color: #1d4ed8; }
.pill-violet { background: #eee7fb; color: #6d28d9; }
@media (max-width: 980px) {
  .form-grid-3, .doc-grid, .fleet-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .form-grid, .fleet-grid { grid-template-columns: 1fr; }
}

.hub-lane { margin: 8px 0 28px; }
.hub-lane > header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.hub-lane > header h2 { font-size: .92rem; }
.hub-lane > header p { margin: 0; color: var(--muted); font-size: .75rem; }
.hub-lane .hub-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flow-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.flow-nav button {
  display: flex; align-items: center; gap: 8px; min-height: 42px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700; font-size: .78rem;
}
.flow-nav button i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #f3ead6; font-style: normal; font-size: .72rem;
}
.flow-nav button.on { border-color: var(--gold); background: #fff8ea; color: var(--gold); }
.flow-nav button.on i { background: var(--gold); color: #fff; }
.flow-pane { display: none; }
.flow-pane.is-on { display: block; animation: tile-in .28s ease both; }
.photo-drop {
  display: grid; place-items: center; min-height: 180px; border: 1.5px dashed #dcc89a;
  border-radius: 18px; background: linear-gradient(180deg, #fff8ea, #fff); text-align: center; cursor: pointer; padding: 16px;
}
.photo-drop input { display: none; }
.photo-drop span { color: var(--muted); font-size: .82rem; }
.photo-drop.has-photo { border-style: solid; }
.photo-preview { max-height: 180px; width: min(100%, 320px); object-fit: cover; border-radius: 14px; margin-bottom: 8px; }
.doc-card header { flex-wrap: wrap; }
.scan-sheet { isolation: isolate; }
@media (max-width: 900px) {
  .hub-lane .hub-grid { grid-template-columns: 1fr 1fr; }
  .flow-nav { grid-template-columns: 1fr; }
}
.os-body { background: var(--bg); }
.brand-logo { display: flex; align-items: center; background: #000; padding: 6px 10px; border-radius: 10px; }
.brand-logo img { height: 42px; width: auto; display: block; }
.os-top { position: sticky; top: 0; z-index: 30; background: #efe4c8; border-bottom: 1px solid #e0c36a; }
.os-top-inner, .os-top-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; }
.os-top .chip, .os-top .btn-ghost { color: #1c1402; border-color: #d4b56a; }
.os-main { padding: 18px 0 80px; }
.os-rail { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; }
.os-rail a {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--muted); font-size: .75rem; font-weight: 700;
}
.os-rail a .ico { width: 15px; height: 15px; }
.os-rail a.on, .os-rail a:hover { color: var(--ink); border-color: var(--gold); }
.btn-gold { color: #042f2e; }
.chip { background: #e7b94b; color: #1c1402; }
.hub-tile, .panel, .car-card, .doc-card, .intel-kpi, .intel-card { background: var(--paper); }
.notice { background: #12352f; color: var(--ok); }
option { background: #efe4c8; color: #1c1402; }
tr.is-new, .car-card.is-new { outline: 2px solid var(--gold); background: #fff8e8; }
.quote-box { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff8e8; border: 1px solid #e0c36a; color: #1c1402; font-weight: 700; font-size: .86rem; }
.table-wrap td .btn { margin: 2px; }

