/* 아하브 차량관리 */
:root {
  --bg: #F3F6FA; --surface: #FFFFFF; --sunk: #E8EDF4; --ink: #0F1B2D; --muted: #5A6A80; --line: #DCE3EC;
  --accent: #1E4E8C; --accent-2: #2C6BC0; --accent-ink: #FFFFFF; --accent-soft: #E1EAF7;
  --in: #1C6FD1; --out: #D6402F; --gold: #E0A92E; --ok: #12925F; --bad: #D0342C; --new: #F76707; --hl: #FFF2DE;
  --soon: #E8890C;
  --shadow: 0 1px 2px rgba(15,27,45,.04), 0 8px 24px rgba(15,27,45,.06);
  --hero: radial-gradient(120% 120% at 100% 0%, rgba(247,103,7,.55) 0%, transparent 52%), linear-gradient(135deg, #0F172A 0%, #1E3A66 58%, #2C6BC0 100%);
  --hero-shadow: 0 12px 32px rgba(30,78,140,.30); --hero-ink: #1E4E8C;
  --font-ui: "Pretendard", "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; --radius: 18px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B111B; --surface: #121B29; --sunk: #1A2536; --ink: #E7EEF8; --muted: #9AABC2; --line: #243246;
  --accent: #7FB0F5; --accent-2: #5B95E8; --accent-ink: #08142A; --accent-soft: #18304F; --hl: #3A2E17;
  --ok: #35C48A; --soon: #F2A33A; --bad: #F06A5F;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
} }
.hero-big small { font-size: 16px; font-weight: 700; margin-left: 4px; opacity: .85; }
.carhd { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.carhd .cn { font-size: 20px; font-weight: 800; line-height: 1.3; }
.carhd .cm { font-size: 13px; color: rgba(255,255,255,.8); }
.plate { display: inline-block; background: #fff; color: #0F172A; border-radius: 6px; padding: 1px 8px; font-weight: 800; font-size: 13px; letter-spacing: .04em; border: 2px solid #0F172A; white-space: nowrap; }
.hero-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-three div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.hero-three span { font-size: 11.5px; color: rgba(255,255,255,.78); } .hero-three b { font-size: 17px; font-variant-numeric: tabular-nums; }
.hero-three .r b { color: #FFB4A8; } .hero-three .y b { color: #FFD48A; }
.hero .acts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.hero .acts2 .btn { justify-content: center; border: 0; padding: 12px 8px; font-size: 15px; }
.hero .acts2 .w { background: #fff; color: var(--hero-ink); }
.hero .acts2 .o { background: #F76707; color: #fff; }
.carpick { display: flex; gap: 6px; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px; scrollbar-width: none; }
.carpick::-webkit-scrollbar { display: none; }
.carpick button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14px; }
.carpick button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* 정비 항목 */
.it { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.it:first-of-type, h3.sec + .it { border-top: 0; }
.it .ii { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; background: var(--sunk); }
.it.over .ii { background: color-mix(in srgb, var(--bad) 15%, var(--surface)); }
.it.soon .ii { background: color-mix(in srgb, var(--soon) 18%, var(--surface)); }
.it .tt { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; cursor: pointer; }
.it .tt b { font-size: 15.5px; }
.it .tt small { font-size: 12.5px; color: var(--muted); }
.it .tt small.st { font-weight: 800; font-size: 13px; }
.it.over small.st { color: var(--bad); } .it.soon small.st { color: var(--soon); } .it.ok small.st { color: var(--ok); } .it.unk small.st { color: var(--muted); }
.gauge { height: 7px; background: var(--sunk); border-radius: 4px; overflow: hidden; margin: 5px 0 3px; }
.gauge i { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.it.soon .gauge i { background: var(--soon); } .it.over .gauge i { background: var(--bad); } .it.unk .gauge i { background: var(--muted); opacity: .4; }
.it.off { opacity: .5; }
.allok { display: flex; gap: 12px; align-items: center; }
.allok span { font-size: 34px; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin: -4px 0 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
/* 기록 */
.rec { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.day + .rec { border-top: 0; }
.rec .ri { width: 38px; height: 38px; border-radius: 11px; background: var(--sunk); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.rec .rt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; font-size: 15px; }
.rec .rt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec .rv { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.rec .rv small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.ichips { display: flex; flex-wrap: wrap; gap: 6px; }
.ichips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 11px; font-size: 13.5px; font-weight: 600; }
.ichips button.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.ichips button.due { border-color: var(--soon); }
.photo { margin-top: 10px; }
.photo img { width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: var(--sunk); display: block; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
dl.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
dl.kv dt { color: var(--muted); font-size: 13.5px; font-weight: 700; } dl.kv dd { margin: 0; font-weight: 600; }
/* 비용 */
.trend12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 150px; padding-top: 10px; }
.trend12 div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 10.5px; color: var(--muted); }
.trend12 i { display: block; width: 72%; background: var(--accent); border-radius: 5px 5px 2px 2px; min-height: 2px; opacity: .8; }
.trend12 div.cur i { opacity: 1; background: var(--new); }
.trend12 em { font-style: normal; font-weight: 700; color: var(--ink); font-size: 9.5px; white-space: nowrap; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat3 div { background: var(--sunk); border-radius: 12px; padding: 10px 4px; display: flex; flex-direction: column; }
.stat3 b { font-size: 17px; font-variant-numeric: tabular-nums; } .stat3 span { font-size: 11.5px; color: var(--muted); }
/* 사고·고장 */
details.sos { background: color-mix(in srgb, var(--bad) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 25%, var(--line)); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; }
details.sos summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.sos summary::-webkit-details-marker { display: none; }
details.sos ol { margin: 10px 0 0; padding-left: 20px; font-size: 14.5px; } details.sos li { margin: 5px 0; }
.calls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.calls a { text-align: center; text-decoration: none; border-radius: 12px; padding: 10px 4px; font-weight: 800; font-size: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); display: flex; flex-direction: column; }
.calls a small { font-weight: 600; font-size: 11.5px; color: var(--muted); }
.calls a.main { background: var(--bad); color: #fff; border-color: transparent; } .calls a.main small { color: rgba(255,255,255,.85); }
.mgr { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.mgr:first-of-type { border-top: 0; }
.mgr .mi { font-size: 22px; text-align: center; }
.mgr .tt { min-width: 0; line-height: 1.35; }
.tog { width: 46px; height: 28px; border-radius: 14px; border: 0; background: var(--sunk); position: relative; padding: 0; flex: none; }
.tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.tog.on { background: var(--ok); } .tog.on::after { left: 21px; }
.steps { counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding-left: 30px; margin: 8px 0; font-size: 14.5px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.okbox { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
@media print {
  header.top, nav.tabs, .noprint, .disclaimer, .toast { display: none !important; }
  body { background: #fff; padding: 0; color: #000; }
  .card { box-shadow: none; border: 0; padding: 0; }
  table.hist { font-size: 12px; }
}
table.hist { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.hist th, table.hist td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
table.hist th { font-size: 12px; color: var(--muted); }
table.hist td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.histwrap { overflow-x: auto; }
#rType { margin-bottom: 4px; }
