/* Guanzon Motorcycle Shop · CR Transaction Tracker — design system */
:root{
  --font:"Inter","Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;
  --bg:#f3f4f6; --surface:#fff; --surface-2:#f9fafb; --ink:#14161a; --ink-2:#3b4048; --muted:#6a7280;
  --line:#e5e7eb; --line-2:#d5d8de;
  --brand:#c8102e; --brand-600:#a50d25; --brand-ink:#fff; --brand-soft:#fdecef;
  --dark:#14161a; --dark-2:#1d2026; --dark-ink:#f4f5f7; --dark-muted:#9aa1ad;
  --st-filed:#2563eb; --st-filed-bg:#e8effd;
  --st-processing:#b45309; --st-processing-bg:#fdf1dc;
  --st-for-release:#7c3aed; --st-for-release-bg:#f0e9fd;
  --st-released:#15803d; --st-released-bg:#e1f4e8;
  --st-on-hold:#4b5563; --st-on-hold-bg:#eceef1;
  --err:#b42318; --ok:#15803d;
  --r:12px; --r-sm:8px;
  --sh-1:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.08);
  --sh-2:0 4px 6px -2px rgba(16,24,40,.05),0 12px 24px -4px rgba(16,24,40,.10);
  --sh-3:0 24px 64px -12px rgba(16,24,40,.35);
  --focus:0 0 0 3px rgba(200,16,46,.22);
}
@media (prefers-color-scheme:dark){
  :root{--bg:#0e0f12; --surface:#181a1f; --surface-2:#1d2026; --ink:#f1f2f4; --ink-2:#cdd1d8; --muted:#8f97a5;
    --line:#2a2e36; --line-2:#383d47; --brand:#ef4057; --brand-600:#f5667a; --brand-ink:#1a0509; --brand-soft:#33151b;
    --dark:#0a0b0d; --dark-2:#14161a;
    --st-filed:#7aa7ff; --st-filed-bg:#16233f; --st-processing:#f2b45a; --st-processing-bg:#38290f;
    --st-for-release:#b69cff; --st-for-release-bg:#2a2045; --st-released:#6fd49a; --st-released-bg:#13301f;
    --st-on-hold:#a7afbb; --st-on-hold-bg:#272a31; --err:#ff8b80; --ok:#6fd49a;
    --sh-1:none; --sh-2:none; --sh-3:0 24px 64px -12px rgba(0,0,0,.7); --focus:0 0 0 3px rgba(239,64,87,.3)}
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:14.5px/1.55 var(--font);-webkit-font-smoothing:antialiased}
h1,h2,h3,p{margin:0}
button,input,select,textarea{font:inherit;color:inherit}
svg.i{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ---------- buttons & fields ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line-2);background:var(--surface);
  padding:9px 16px;border-radius:var(--r-sm);cursor:pointer;font-weight:600;white-space:nowrap;box-shadow:var(--sh-1);transition:background .15s,border-color .15s,transform .05s}
.btn:hover{background:var(--surface-2)}
.btn:active{transform:translateY(1px)}
.btn.primary{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.btn.primary:hover{background:var(--brand-600);border-color:var(--brand-600)}
.btn.ghost{box-shadow:none;background:transparent}
.btn.block{width:100%;padding:11px 16px}
.btn[disabled]{opacity:.65;cursor:progress}
.btn:focus-visible,.stat:focus-visible,tr:focus-visible,.x:focus-visible{outline:none;box-shadow:var(--focus)}
input,select,textarea{width:100%;padding:10px 12px;border:1px solid var(--line-2);border-radius:var(--r-sm);background:var(--surface);transition:border-color .15s,box-shadow .15s}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:.8}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand);box-shadow:var(--focus)}
textarea{resize:vertical}
select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236a7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:34px}
label{display:block;font-size:12.5px;font-weight:600;color:var(--ink-2)}
label input,label select,label textarea{margin-top:6px;font-weight:400;color:var(--ink)}
label em{color:var(--brand);font-style:normal}
.err{display:block;color:var(--err);font-weight:500;font-size:12px;margin-top:4px}
.err:empty{display:none}
input.invalid,select.invalid,textarea.invalid{border-color:var(--err);box-shadow:0 0 0 3px rgba(180,35,24,.12)}
.hint{display:block;margin-top:6px;font-size:12.5px;color:var(--muted);font-weight:400;line-height:1.4}

/* ---------- login ---------- */
.auth{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);min-height:100dvh;background:var(--surface)}
.auth-hero{position:relative;overflow:hidden;color:var(--dark-ink);padding:48px 56px;display:flex;flex-direction:column;justify-content:space-between;
  background:radial-gradient(900px 500px at 15% -10%,rgba(200,16,46,.55),transparent 60%),radial-gradient(700px 500px at 100% 110%,rgba(200,16,46,.3),transparent 60%),#111317}
.auth-hero::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);background-size:44px 44px;mask-image:radial-gradient(circle at 30% 40%,#000 0,transparent 75%);-webkit-mask-image:radial-gradient(circle at 30% 40%,#000 0,transparent 75%)}
.auth-hero>*{position:relative}
.logo{display:flex;align-items:center;gap:12px}
.logo-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:var(--brand);color:#fff;box-shadow:0 6px 16px -4px rgba(200,16,46,.6);flex:none}
.logo-mark svg{width:24px;height:24px;stroke:#fff;fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.logo b{display:block;font-size:15.5px;letter-spacing:.01em}
.logo small{display:block;font-size:12px;color:var(--dark-muted);letter-spacing:.04em;text-transform:uppercase}
.hero-copy h2{font-size:clamp(28px,3.2vw,40px);line-height:1.12;letter-spacing:-.02em;font-weight:750;max-width:14em}
.hero-copy p{margin-top:14px;color:#c4c9d2;max-width:30em;font-size:15.5px}
.hero-list{list-style:none;margin:28px 0 0;padding:0;display:grid;gap:14px}
.hero-list li{display:flex;gap:12px;align-items:flex-start;color:#dfe2e8}
.hero-list .dot{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);flex:none}
.hero-list .dot svg{width:16px;height:16px}
.hero-list span b{display:block;font-weight:650;color:#fff}
.hero-list span small{color:#a7aebb;font-size:13px}
.hero-foot{font-size:12.5px;color:var(--dark-muted)}
.auth-panel{display:grid;place-items:center;padding:32px 24px;background:var(--surface)}
.auth-card{width:min(390px,100%)}
.auth-card h1{font-size:26px;letter-spacing:-.02em;font-weight:750}
.auth-card .sub{color:var(--muted);margin:6px 0 26px}
.auth-card form{display:grid;gap:16px}
.field{position:relative}
.field>svg{position:absolute;left:12px;bottom:12px;width:18px;height:18px;stroke:var(--muted);fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.field input{padding-left:40px;padding-top:11px;padding-bottom:11px}
.field .peek{position:absolute;right:6px;bottom:5px;border:0;background:none;padding:7px;border-radius:7px;cursor:pointer;color:var(--muted);display:grid;place-items:center}
.field .peek:hover{background:var(--surface-2);color:var(--ink)}
.field .peek svg{position:static;stroke:currentColor;width:18px;height:18px}
.field.has-peek input{padding-right:44px}
.alert{display:flex;gap:10px;align-items:flex-start;padding:11px 13px;border-radius:var(--r-sm);font-size:13.5px;border:1px solid transparent}
.alert.error{background:var(--brand-soft);color:var(--err);border-color:rgba(180,35,24,.2)}
.alert.ok{background:var(--st-released-bg);color:var(--ok);border-color:rgba(21,128,61,.2)}
.alert[hidden]{display:none}
.fine{margin-top:22px;font-size:12.5px;color:var(--muted);text-align:center;display:flex;gap:6px;justify-content:center;align-items:center}
.fine svg{width:14px;height:14px}

/* ---------- app shell ---------- */
.topbar{background:var(--dark);color:var(--dark-ink);position:sticky;top:0;z-index:20;border-bottom:3px solid var(--brand)}
.topbar-in{max-width:1180px;margin:0 auto;padding:11px 20px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.topbar .logo-mark{width:36px;height:36px;border-radius:10px}
.topbar .logo-mark svg{width:21px;height:21px}
.who{display:flex;align-items:center;gap:12px}
.who form{margin:0}
.avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#2b2f37;border:1px solid #3b404a;font-size:12.5px;font-weight:700;color:#fff;letter-spacing:.02em}
.who-meta{line-height:1.2;text-align:right}
.who-meta b{display:block;font-size:13.5px;font-weight:600}
.who-meta small{color:var(--dark-muted);font-size:11.5px}
.topbar .btn{background:transparent;border-color:#3b404a;color:var(--dark-ink);box-shadow:none;padding:7px 12px;font-size:13px}
.topbar .btn:hover{background:#23262d}

.wrap{max-width:1180px;margin:0 auto;padding:26px 20px 56px}
.page-h{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:20px}
.page-h h1{font-size:24px;letter-spacing:-.02em;font-weight:750}
.page-h p{color:var(--muted);margin-top:2px}
.today{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;background:var(--surface);border:1px solid var(--line);padding:7px 12px;border-radius:999px}

.stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:18px}
.stat{--c:var(--muted);--cbg:var(--surface-2);position:relative;text-align:left;cursor:pointer;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px 14px 12px;box-shadow:var(--sh-1);transition:border-color .15s,box-shadow .15s,transform .1s;overflow:hidden}
.stat:hover{box-shadow:var(--sh-2);transform:translateY(-1px)}
.stat[aria-pressed="true"]{border-color:var(--c);box-shadow:0 0 0 1px var(--c),var(--sh-2)}
.stat-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.stat-label{font-size:12.5px;font-weight:600;color:var(--muted)}
.stat-ico{display:grid;place-items:center;width:26px;height:26px;border-radius:8px;background:var(--cbg);color:var(--c)}
.stat-ico svg{width:15px;height:15px}
.stat b{display:block;font-size:30px;line-height:1.1;margin-top:8px;font-weight:750;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.stat .bar{height:4px;border-radius:4px;background:var(--line);margin-top:10px;overflow:hidden}
.stat .bar i{display:block;height:100%;background:var(--c);border-radius:4px;transition:width .5s ease}
.stat.all{--c:var(--ink)}
.stat.s-filed{--c:var(--st-filed);--cbg:var(--st-filed-bg)}
.stat.s-processing{--c:var(--st-processing);--cbg:var(--st-processing-bg)}
.stat.s-for-release{--c:var(--st-for-release);--cbg:var(--st-for-release-bg)}
.stat.s-released{--c:var(--st-released);--cbg:var(--st-released-bg)}
.stat.s-on-hold{--c:var(--st-on-hold);--cbg:var(--st-on-hold-bg)}

.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh-1);overflow:hidden}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid var(--line);background:var(--surface)}
.search{position:relative;flex:1 1 280px}
.search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);stroke:var(--muted);pointer-events:none}
.search input{padding-left:40px;background:var(--surface-2)}
.toolbar select{width:auto;min-width:160px;background-color:var(--surface-2)}
.count{padding:10px 16px;font-size:12.5px;color:var(--muted);border-bottom:1px solid var(--line);background:var(--surface-2)}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse}
th{font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);text-align:left;padding:11px 16px;font-weight:650;background:var(--surface-2);border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:14px 16px;border-bottom:1px solid var(--line);vertical-align:middle}
tbody tr{cursor:pointer;transition:background .12s}
tbody tr:hover{background:var(--surface-2)}
tbody tr:last-child td{border-bottom:0}
td.ref{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
td .t1{display:block;font-weight:600}
td .t2{display:block;color:var(--muted);font-size:12.5px}
td.upd{color:var(--ink-2);white-space:nowrap}
td.chev{width:32px;color:var(--muted);padding-left:0}
td.chev svg{width:16px;height:16px}

.pill{display:inline-flex;align-items:center;gap:6px;padding:3px 10px 3px 8px;border-radius:999px;font-size:12px;font-weight:650;background:var(--st-on-hold-bg);color:var(--st-on-hold);white-space:nowrap}
.pill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.pill.s-filed{background:var(--st-filed-bg);color:var(--st-filed)}
.pill.s-processing{background:var(--st-processing-bg);color:var(--st-processing)}
.pill.s-for-release{background:var(--st-for-release-bg);color:var(--st-for-release)}
.pill.s-released{background:var(--st-released-bg);color:var(--st-released)}
.pill.s-on-hold{background:var(--st-on-hold-bg);color:var(--st-on-hold)}

.empty{display:grid;justify-items:center;gap:6px;text-align:center;padding:48px 20px;color:var(--muted)}
.empty[hidden]{display:none}
.empty svg.big{width:56px;height:56px;stroke:var(--line-2);stroke-width:1.4;margin-bottom:6px}
.empty b{color:var(--ink);font-size:15px}
.skel td{padding:16px}
.skel i{display:block;height:12px;border-radius:6px;background:linear-gradient(90deg,var(--line) 25%,var(--surface-2) 50%,var(--line) 75%);background-size:200% 100%;animation:sh 1.2s infinite linear}
@keyframes sh{to{background-position:-200% 0}}

.toast{position:fixed;right:20px;bottom:20px;z-index:100;max-width:min(420px,calc(100vw - 32px));box-shadow:var(--sh-2);animation:up .2s ease-out}
.toast.alert.ok{background:var(--surface);border-color:var(--line)}
.toast.alert.error{background:var(--surface)}
.toast svg{margin-top:1px}
@keyframes up{from{opacity:0;transform:translateY(8px)}}

/* ---------- dialogs ---------- */
dialog{border:0;border-radius:16px;padding:0;width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 24px);background:var(--surface);color:var(--ink);box-shadow:var(--sh-3);overflow:hidden}
dialog[open]{animation:pop .16s ease-out}
dialog::backdrop{background:rgba(10,12,16,.55);backdrop-filter:blur(3px)}
@keyframes pop{from{opacity:0;transform:translateY(10px) scale(.985)}}
dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 24px)}
.dlg-h{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:20px 24px 16px;border-bottom:1px solid var(--line)}
.dlg-h h2{font-size:18px;letter-spacing:-.01em;font-weight:750}
.dlg-h .sub{color:var(--muted);font-size:13px;margin-top:2px}
.dlg-title{display:flex;gap:14px;align-items:center}
.dlg-ico{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:var(--brand-soft);color:var(--brand)}
.dlg-ico svg{width:20px;height:20px}
.x{border:0;background:none;cursor:pointer;color:var(--muted);padding:6px;border-radius:8px;display:grid;place-items:center}
.x:hover{background:var(--surface-2);color:var(--ink)}
.dlg-b{padding:20px 24px;overflow:auto;display:grid;gap:18px}
.dlg-f{display:flex;justify-content:flex-end;gap:10px;padding:14px 24px;border-top:1px solid var(--line);background:var(--surface-2)}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid .full{grid-column:1/-1}
.note{display:flex;gap:8px;font-size:12.5px;color:var(--muted);background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-sm);padding:10px 12px}
.note svg{width:16px;height:16px;margin-top:1px}
.sec{font-size:11.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:700;margin-bottom:10px}

.steps{display:flex;align-items:flex-start;list-style:none;margin:0;padding:0}
.steps li{flex:1;position:relative;text-align:center;font-size:12px;font-weight:600;color:var(--muted)}
.steps li::before{content:"";position:absolute;top:13px;left:calc(-50% + 16px);right:calc(50% + 16px);height:2px;background:var(--line-2)}
.steps li:first-child::before{display:none}
.steps .n{display:grid;place-items:center;width:28px;height:28px;margin:0 auto 6px;border-radius:50%;border:2px solid var(--line-2);background:var(--surface);font-size:12px;position:relative}
.steps .n svg{width:14px;height:14px;stroke-width:3}
.steps li.done{color:var(--ink-2)}
.steps li.done::before,.steps li.cur::before{background:var(--brand)}
.steps li.done .n{background:var(--brand);border-color:var(--brand);color:#fff}
.steps li.cur{color:var(--ink)}
.steps li.cur .n{border-color:var(--brand);color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}
.hold{display:flex;gap:8px;align-items:center;margin-top:12px;padding:9px 12px;border-radius:var(--r-sm);background:var(--st-on-hold-bg);color:var(--st-on-hold);font-weight:600;font-size:13px}
.hold[hidden]{display:none}
.hold svg{width:16px;height:16px}

.facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:0;background:var(--line);border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden}
.facts div{background:var(--surface);padding:10px 14px}
.facts dt{font-size:11.5px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.05em}
.facts dd{margin:2px 0 0;font-weight:600;overflow-wrap:anywhere}
.facts .wide{grid-column:1/-1}
.history{list-style:none;margin:0;padding:0 0 0 6px}
.history li{position:relative;padding:0 0 16px 22px;font-size:13.5px}
.history li::before{content:"";position:absolute;left:-1px;top:14px;bottom:-2px;width:2px;background:var(--line)}
.history li:last-child::before{display:none}
.history li::after{content:"";position:absolute;left:-5px;top:5px;width:10px;height:10px;border-radius:50%;background:var(--surface);border:2px solid var(--line-2)}
.history li:first-child::after{background:var(--brand);border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}
.history .when{display:block;color:var(--muted);font-size:12px;margin-top:2px}

/* ---------- responsive ---------- */
@media (max-width:1000px){.stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:860px){
  .auth{grid-template-columns:1fr}
  .auth-hero{padding:28px 24px 30px}
  .hero-list,.hero-foot{display:none}
  .hero-copy{margin-top:22px}.hero-copy h2{font-size:24px}.hero-copy p{font-size:14.5px;margin-top:8px}
  .auth-panel{align-items:start;padding-top:28px}
}
@media (max-width:720px){
  .topbar-in{padding:10px 14px}.who-meta{display:none}
  .wrap{padding:18px 14px 48px}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat b{font-size:26px}
  .today{display:none}
  .grid{grid-template-columns:1fr}.facts{grid-template-columns:1fr}
  .dlg-h,.dlg-b,.dlg-f{padding-left:18px;padding-right:18px}
  .steps li{font-size:10.5px}
  .toolbar select,.toolbar .btn{flex:1 1 140px}
  table,thead,tbody,tr,td{display:block}
  thead{position:absolute;left:-9999px}
  tbody tr{margin:12px;border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;background:var(--surface);box-shadow:var(--sh-1)}
  tbody tr:last-child td{border-bottom:0}
  td{border:0;padding:4px 0;display:flex;justify-content:space-between;align-items:center;gap:14px;text-align:right}
  td::before{content:attr(data-label);color:var(--muted);font-size:11.5px;font-weight:650;text-transform:uppercase;letter-spacing:.05em;text-align:left;flex:none}
  td.ref{font-size:15px;padding-bottom:8px;margin-bottom:4px;border-bottom:1px solid var(--line)}
  td.chev{display:none}
  .toast{left:16px;right:16px;bottom:16px;max-width:none}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.dlg-h .dlg-right{margin-left:auto;margin-right:4px}
.dlg-h .x{align-self:flex-start}
@media (max-width:720px){.topbar .logo small{display:none}.topbar .logo b{font-size:14px;white-space:nowrap}}
