:root {
  color-scheme: dark;
  --bg: #090b0a;
  --surface: #111411;
  --surface-2: #171b17;
  --line: #2a302b;
  --text: #f3f6f2;
  --muted: #9aa39b;
  --acid: #b7ff1a;
  --danger: #ff5c57;
  --warning: #ffc247;
  --radius: 4px;
  --shadow: 0 24px 60px rgb(0 0 0 / 45%);
  font-family: "Arial Narrow", "PingFang HK", "Noto Sans TC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); }
.error-page { display: grid; place-items: center; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.noise {
  position: fixed; inset: 0; opacity: .035; pointer-events: none; z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar {
  position: sticky; top: 0; z-index: 40; height: 68px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgb(183 255 26 / 18%);
  background: rgb(9 11 10 / 88%); backdrop-filter: blur(18px);
}
.brand { display: flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 37px; height: 37px; display: grid; place-items: center; color: #0c0f0b;
  background: var(--acid); font-weight: 950; letter-spacing: -.08em; transform: skew(-8deg);
  box-shadow: 6px 0 0 #34490b;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: .83rem; letter-spacing: .08em; }
.brand small { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.account-button {
  min-height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 12px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  font-size: .88rem; font-weight: 750;
}
.account-button:hover { border-color: var(--acid); color: var(--acid); }
.account-button span { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-button {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: transparent; cursor: pointer;
}
.notification-button:hover { border-color: var(--acid); color: var(--acid); }
.notification-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px; color: #090b0a; background: var(--acid);
  border: 2px solid var(--bg); font: 900 .66rem/1 system-ui, sans-serif;
}
.account-button svg, .notification-button svg, .panel-title svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }

main { padding-bottom: calc(98px + env(safe-area-inset-bottom)); }
.view { animation: view-in .26s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } }

.hero {
  min-height: min(670px, calc(100svh - 68px)); position: relative; display: flex; align-items: flex-end;
  padding: 48px 20px 34px; overflow: hidden; isolation: isolate;
  background-image: linear-gradient(90deg, #080a09 0%, rgb(8 10 9 / 89%) 30%, rgb(8 10 9 / 12%) 77%),
    linear-gradient(0deg, #090b0a 0%, transparent 30%), url("/assets/newbay-hero.jpg");
  background-size: cover; background-position: 62% center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(120deg, transparent 45%, rgb(183 255 26 / 14%) 45.2%, transparent 45.7%);
}
.hero::after {
  content: "NEW BAY"; position: absolute; right: -22px; bottom: 7px; z-index: -1;
  color: transparent; -webkit-text-stroke: 1px rgb(255 255 255 / 10%);
  font-size: clamp(5rem, 18vw, 12rem); font-weight: 950; letter-spacing: -.08em; white-space: nowrap;
}
.hero-copy { position: relative; width: min(630px, 100%); z-index: 2; }
.kicker { margin: 0 0 10px; color: var(--acid); font: 800 .74rem/1.2 system-ui, sans-serif; letter-spacing: .18em; }
.hero h1 {
  margin: 0; max-width: 8.5ch;
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: clamp(3rem, 8.8vw, 7rem); line-height: 1.08;
  letter-spacing: .01em; font-weight: 900; font-synthesis: none;
}
.hero h1 em {
  display: inline-block; margin-top: .08em;
  color: var(--acid); font-style: normal; letter-spacing: .015em;
}
.page-header h1 {
  margin: 0; font-size: clamp(3.15rem, 14vw, 7.5rem); line-height: 1;
  letter-spacing: -.035em; font-weight: 950;
}
.hero-copy > p:not(.kicker) { max-width: 500px; margin: 22px 0 0; color: #cbd1cb; font-size: 1rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.button {
  min-height: 48px; padding: 0 19px; border: 1px solid transparent; border-radius: var(--radius);
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 850; cursor: pointer; transition: .18s ease;
}
.button:active { transform: translateY(1px) scale(.99); }
.button-primary { background: var(--acid); color: #0b0e09; box-shadow: 7px 7px 0 #34400f; }
.button-primary:hover { background: #ccff5e; }
.button-ghost { background: rgb(17 20 17 / 70%); color: var(--text); border-color: #4a514a; }
.button-ghost:hover { border-color: var(--acid); color: var(--acid); }
.button-danger { background: transparent; border-color: rgb(255 92 87 / 55%); color: var(--danger); margin-top: 10px; }
.button-wide { width: 100%; }
.button-small { min-height: 38px; padding: 0 13px; font-size: .84rem; box-shadow: none; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hero-status {
  position: absolute; top: 24px; right: 16px; z-index: 3; display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; background: rgb(8 10 9 / 78%); border: 1px solid rgb(183 255 26 / 32%); backdrop-filter: blur(12px);
}
.hero-status strong, .hero-status small { display: block; font-family: system-ui, sans-serif; }
.hero-status strong { font-size: .68rem; letter-spacing: .12em; }
.hero-status small { margin-top: 2px; color: var(--muted); font-size: .67rem; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 5px rgb(183 255 26 / 11%), 0 0 18px var(--acid); }

.inventory-section, .page-view { width: min(1180px, 100%); margin: 0 auto; padding: 48px 18px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 21px; }
.section-heading h2, .panel h2, .modal h2 { margin: 0; font-size: clamp(1.8rem, 7vw, 3rem); letter-spacing: -.045em; }
.count-chip { padding: 7px 10px; border: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 18px; scrollbar-width: none; }
.filter-chip { flex: 0 0 auto; padding: 8px 13px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .84rem; }
.filter-chip.is-active { color: #0a0c09; background: var(--acid); border-color: var(--acid); font-weight: 800; }
.inventory-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.vehicle-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); overflow: hidden; position: relative; }
.vehicle-card::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 52px; height: 3px; background: var(--acid); }
.vehicle-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #0e110f; }
.vehicle-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.vehicle-card:hover .vehicle-image img { transform: scale(1.025); }
.condition { position: absolute; left: 12px; top: 12px; padding: 6px 9px; color: #0b0e09; background: var(--acid); font: 850 .73rem/1 system-ui, sans-serif; }
.vehicle-info { padding: 17px; }
.vehicle-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vehicle-info h3 { margin: 0; font-size: 1.3rem; letter-spacing: -.025em; }
.vehicle-info .price { color: var(--acid); font-weight: 900; white-space: nowrap; }
.vehicle-meta { margin: 7px 0 14px; color: var(--muted); font-size: .83rem; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: 5px 8px; background: #1c211c; border-left: 2px solid var(--acid); color: #cdd4cd; font-size: .72rem; }
.skeleton { min-height: 365px; background: linear-gradient(100deg, #111411 20%, #1a1e1a 40%, #111411 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.page-view { min-height: calc(100svh - 68px); }
.page-header { padding: 16px 0 30px; border-bottom: 1px solid var(--line); }
.page-header h1 { font-size: clamp(3rem, 13vw, 6rem); }
.page-header > p:last-child { max-width: 620px; color: var(--muted); line-height: 1.7; }
.vehicle-history-view { max-width: 860px; }
.back-link {
  min-height: 44px; margin: 2px 0 24px; padding: 0; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font-size: .88rem; font-weight: 750;
}
.back-link:hover { color: var(--acid); }
.vehicle-history-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.vehicle-history-heading h1 {
  margin: 0; max-width: 720px; font-size: clamp(2.2rem, 10vw, 4.6rem);
  line-height: .95; letter-spacing: -.055em;
}
.vehicle-history-heading > p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.content-stack { display: grid; gap: 15px; padding-top: 22px; }
.admin-database-view { max-width: 880px; }
.database-panel {
  margin-top: 24px; padding: clamp(22px, 5vw, 42px); background: #111511;
  border: 1px solid #3c453b; border-top: 4px solid var(--acid); box-shadow: var(--shadow);
}
.database-panel-head { display: flex; align-items: center; gap: 13px; }
.database-panel-head strong, .database-panel-head small { display: block; }
.database-panel-head strong { font-size: 1.1rem; }
.database-panel-head small { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.database-status-dot {
  width: 13px; height: 13px; flex: 0 0 auto; border-radius: 50%; background: var(--acid);
  box-shadow: 0 0 0 6px rgb(183 255 26 / 10%), 0 0 18px rgb(183 255 26 / 55%);
}
.database-warning {
  margin: 26px 0; padding: 15px; color: #ffd892; background: rgb(255 194 71 / 8%);
  border-left: 3px solid var(--warning); line-height: 1.65;
}
.database-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.database-actions .button { min-height: 58px; margin: 0; font-size: 1.05rem; }
.database-actions .button-danger { background: rgb(255 92 87 / 7%); }
.database-actions .button:disabled { opacity: .42; cursor: wait; }
.database-progress { min-height: 24px; margin: 16px 0 0; color: var(--muted); font-size: .84rem; }
.staff-table-view { max-width: 1280px; }
.table-page-header { padding-bottom: 20px; }
.table-page-header h1 { font-size: clamp(2.4rem, 9vw, 4.8rem); }
.table-page-header > strong { display: block; margin-top: 14px; color: var(--acid); }
.table-toolbar {
  margin-top: 18px; padding: 15px; background: #121612; border: 1px solid #353d35;
  display: grid; gap: 10px;
}
.table-toolbar > label { color: #c9d0c9; font-size: .88rem; font-weight: 800; }
.table-toolbar > strong { color: var(--muted); font-size: .88rem; }
.table-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.table-search-row .button { min-height: 46px; box-shadow: none; }
.data-table-wrap { margin-top: 18px; overflow: auto; border: 1px solid #3a423a; background: #0d100e; }
.data-table { width: 100%; min-width: 850px; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td {
  padding: 12px 13px; text-align: left; white-space: nowrap; border-right: 1px solid #303630;
  border-bottom: 1px solid #303630; vertical-align: middle;
}
.data-table th:last-child, .data-table td:last-child { border-right: 0; }
.data-table thead th {
  position: sticky; top: 0; z-index: 1; color: #0b0e09; background: var(--acid);
  font-weight: 900;
}
.data-table tbody tr:nth-child(even) { background: #141814; }
.data-table tbody tr:hover { background: #1c2319; }
.data-table td { color: #d8ded8; }
.data-table .table-details { min-width: 260px; white-space: normal; line-height: 1.5; }
.data-table .table-empty { padding: 30px 14px; color: var(--muted); text-align: center; }
.table-link {
  padding: 0; border: 0; background: transparent; color: var(--acid); font-weight: 900;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.table-muted { color: var(--muted); }
.table-pagination {
  min-height: 54px; padding-top: 12px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
}
.table-pagination button {
  min-height: 42px; padding: 0 16px; border: 1px solid #414941; background: #151915;
  color: var(--text); font-weight: 800; cursor: pointer;
}
.table-pagination button:last-child { grid-column: 3; }
.table-pagination button:disabled { opacity: .35; cursor: default; }
.table-pagination span { grid-column: 2; grid-row: 1; color: var(--muted); font-size: .84rem; }
.table-detail-dialog { width: min(1080px, calc(100% - 20px)); }
.customer-detail-head { padding: 4px 42px 17px 0; border-bottom: 1px solid var(--line); }
.customer-detail-head h2 { font-size: clamp(1.8rem, 6vw, 3.2rem); }
.customer-detail-meta { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.customer-vehicle-summary { margin: 18px 0 0; color: #d7ddd7; font-weight: 800; }
.table-detail-dialog .data-table-wrap { max-height: min(60vh, 560px); }
.service-register-table { min-width: 1650px; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 18px; }
.panel-title { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
.panel-title svg { color: var(--acid); width: 22px; height: 22px; }
.panel-title h2 { font-size: 1.3rem; }
.vehicle-service-card { background: #0d100e; border: 1px solid var(--line); }
.vehicle-service-head {
  padding: 19px 17px; display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
  background: linear-gradient(115deg, #20291b 0%, #171d17 54%, #101311 100%);
  border-left: 4px solid var(--acid); border-bottom: 1px solid #3b4635;
}
.vehicle-identity { min-width: 0; }
.plate {
  display: inline-flex; padding: 9px 12px; background: #f1f4f0; color: #111;
  border: 2px solid #586056; border-radius: 3px;
  font: 950 clamp(1.35rem, 5.8vw, 1.85rem)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .075em; box-shadow: 4px 4px 0 rgb(0 0 0 / 30%);
}
.vehicle-owner { margin: 13px 0 0; color: #aeb8ab; font-size: .86rem; }
.vehicle-owner strong { color: var(--acid); font-size: 1rem; }
.vehicle-service-head h2 { margin: 8px 0 2px; font-size: 1.15rem; }
.vehicle-service-head .vehicle-spec { margin: 0; color: var(--muted); font-size: .83rem; }
.vehicle-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.register-summary { cursor: pointer; font-weight: 900; color: var(--acid); list-style: none; }
.register-summary::-webkit-details-marker { display: none; }
.inline-action {
  width: fit-content; padding: 0; border: 0; background: transparent;
  color: var(--acid); font-size: .86rem; font-weight: 850; cursor: pointer;
}
.inline-action:hover { text-decoration: underline; }
.service-toolbar {
  padding: 16px; background: #171c18; border: 1px solid #3a423a; border-top: 3px solid var(--acid);
}
.service-filter-grid { display: grid; gap: 11px; }
.service-filter-grid label { display: grid; gap: 7px; color: #c7cec7; font-size: .82rem; font-weight: 750; }
.service-clear { min-height: 48px; }
.service-list-meta {
  margin-top: 14px; padding-top: 12px; display: flex; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem;
}
.service-list-meta strong { color: var(--text); font-size: .95rem; }
.service-card-list { display: grid; gap: 15px; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.pagination button {
  min-height: 44px; border: 1px solid #414941; background: #151915; color: var(--text);
  font-weight: 800; cursor: pointer;
}
.pagination button:last-child { grid-column: 3; }
.pagination button:disabled { opacity: .35; cursor: default; }
.pagination span { grid-column: 2; grid-row: 1; color: var(--muted); font-size: .82rem; }
.service-accordion { background: #0d100e; }
.service-accordion > summary {
  min-height: 54px; padding: 13px 17px; display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 11px; list-style: none; cursor: pointer; color: #dfe5df;
  font-size: .9rem; font-weight: 850;
}
.service-accordion > summary::-webkit-details-marker { display: none; }
.service-accordion > summary strong { color: var(--acid); font-size: .8rem; }
.service-accordion > summary svg {
  width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 1.8;
  transform: rotate(90deg); transition: transform .18s ease;
}
.service-accordion[open] > summary { background: #141815; border-bottom: 1px solid var(--line); }
.service-accordion[open] > summary svg { transform: rotate(-90deg); }
.service-list { display: grid; }
.service-row { width: 100%; padding: 15px 17px; display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; text-align: left; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.service-row:last-child { border-bottom: 0; }
.service-row:hover { background: #151915; }
.service-row strong { font-size: .95rem; }
.service-row small { color: var(--muted); font-size: .75rem; }
.service-row svg { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.status-badge { width: fit-content; padding: 5px 8px; border-radius: 999px; font: 750 .72rem/1 system-ui, sans-serif; background: #283025; color: #c8d4c4; }
.status-badge.progress { color: var(--acid); background: rgb(183 255 26 / 10%); }
.status-badge.done { color: #a9e8ff; background: rgb(66 180 230 / 12%); }
.empty-state { padding: 46px 20px; text-align: center; border: 1px dashed #343b34; color: var(--muted); }
.empty-state.compact { padding: 22px 17px; border: 0; }
.empty-state svg { width: 42px; height: 42px; stroke: var(--acid); fill: none; margin-bottom: 12px; }

.scan-panel { max-width: 520px; margin: 24px auto 0; display: grid; gap: 11px; }
.scan-frame { aspect-ratio: 1; border: 1px solid var(--line); background: #0c0f0d; display: grid; place-items: center; color: var(--muted); overflow: hidden; box-shadow: inset 0 0 0 2px rgb(183 255 26 / 12%); }
.scan-frame > svg { width: 50px; height: 50px; fill: none; stroke: var(--acid); stroke-width: 1.2; }
.scan-frame > span { display: block; margin-top: -42%; font-size: .82rem; }
.scan-frame video { object-fit: cover; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fine-print { color: var(--muted); font-size: .75rem; line-height: 1.5; }

.contact-grid { display: grid; gap: 14px; margin-top: 22px; }
.form-panel { display: grid; gap: 14px; }
.form-panel label { display: grid; gap: 7px; color: #c7cec7; font-size: .84rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 12px; color: var(--text); background: #090b0a; border: 1px solid #373e38; border-radius: 2px; outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--acid); box-shadow: 0 0 0 3px rgb(183 255 26 / 9%); }
.form-error { min-height: 18px; margin: 0; color: var(--danger); font-size: .8rem; }

.bottom-nav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(72px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: rgb(11 13 11 / 94%); border-top: 1px solid #2a302b; backdrop-filter: blur(18px); }
.bottom-nav.is-guest { grid-template-columns: 1fr; }
.nav-item { position: relative; border: 0; background: transparent; color: #7f8980; display: grid; place-items: center; align-content: center; gap: 4px; cursor: pointer; font-size: .69rem; }
.nav-item > svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.nav-item.is-active { color: var(--acid); }
.nav-item.is-active::after { content: ""; position: absolute; top: 0; width: 30px; height: 2px; background: var(--acid); box-shadow: 0 0 10px var(--acid); }
.scan-icon { width: 46px; height: 46px; margin-top: -25px; display: grid; place-items: center; color: #0a0c09; background: var(--acid); transform: rotate(45deg); border: 5px solid var(--bg); }
.scan-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; transform: rotate(-45deg); }

.modal { width: min(470px, calc(100% - 24px)); max-height: calc(100svh - 32px); overflow: auto; padding: 28px 20px 22px; color: var(--text); background: #111411; border: 1px solid #3b433b; border-radius: var(--radius); box-shadow: var(--shadow); }
.modal-large { width: min(720px, calc(100% - 24px)); }
.modal::backdrop { background: rgb(0 0 0 / 76%); backdrop-filter: blur(5px); }
.modal-close { position: absolute; top: 11px; right: 11px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.modal-intro { color: var(--muted); margin: 8px 0 20px; line-height: 1.5; }
.demo-logins { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 12px; margin-bottom: 17px; background: #0b0e0c; border: 1px solid var(--line); }
.demo-logins::before { content: "DEMO 快速登入"; grid-column: 1 / -1; color: var(--muted); font-size: .7rem; letter-spacing: .1em; }
.demo-login { min-height: 38px; padding: 0 8px; border: 1px solid #343b34; background: #151915; color: #d9dfd9; cursor: pointer; font-size: .78rem; }
.demo-login:hover { border-color: var(--acid); color: var(--acid); }
.notification-toolbar {
  min-height: 44px; margin: 15px 0 10px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; color: var(--muted); font-size: .82rem;
}
.notification-toolbar button { padding: 7px 0; border: 0; background: transparent; color: var(--acid); cursor: pointer; font-weight: 800; }
.notification-list { display: grid; border: 1px solid var(--line); }
.notification-item {
  position: relative; padding: 15px 16px; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px;
  text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #0c0f0d; cursor: pointer;
}
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: #151915; }
.notification-item.is-unread { border-left: 4px solid var(--acid); background: #151b12; }
.notification-kind { width: fit-content; padding: 4px 7px; color: #0b0e09; background: var(--acid); font: 850 .7rem/1 system-ui, sans-serif; }
.notification-item time { justify-self: end; color: var(--muted); font-size: .73rem; }
.notification-item strong { grid-column: 1 / -1; font-size: 1rem; }
.notification-item p { grid-column: 1 / -1; margin: 0; color: #b8c0b8; line-height: 1.55; white-space: pre-line; }
.qr-preview { margin: 18px auto; max-width: 320px; background: white; color: #0b0d0b; }
.qr-preview img { display: block; width: 100%; padding: 16px 16px 5px; }
.qr-label {
  min-height: 86px; padding: 12px 18px 17px; display: grid; place-items: center;
  border-top: 4px solid #0b0d0b; text-align: center;
}
.qr-label span { font: 850 .68rem/1 system-ui, sans-serif; letter-spacing: .18em; }
.qr-label strong { margin-top: 7px; font: 950 1.7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .09em; }

.detail-head { padding-right: 40px; margin-bottom: 22px; }
.detail-head h2 { margin: 5px 0 8px; }
.new-service-head { display: grid; justify-items: start; gap: 9px; }
.dialog-plate {
  padding: 10px 13px; color: #111; background: #f1f4f0; border: 2px solid #586056;
  font: 950 clamp(1.55rem, 7vw, 2.25rem)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
}
.dialog-owner { margin: 0; color: var(--muted); }
.dialog-owner strong { color: var(--acid); font-size: 1.05rem; }
.detail-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.metric { padding: 13px; background: #0d100e; }
.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: .72rem; }
.metric strong { margin-top: 5px; font-size: .95rem; }
.timeline { margin: 22px 0; padding-left: 18px; border-left: 1px solid #384038; }
.timeline-row { position: relative; padding: 0 0 17px 14px; }
.timeline-row:last-child { padding-bottom: 0; }
.timeline-row::before { content: ""; position: absolute; left: -22px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 4px rgb(183 255 26 / 9%); }
.timeline-row strong, .timeline-row span { display: block; }
.timeline-row strong { font-size: .82rem; }
.timeline-row span { color: var(--muted); font-size: .74rem; margin-top: 2px; }
.lock-note { display: flex; gap: 8px; align-items: center; color: var(--warning); font-size: .8rem; }
.lock-note svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.edit-form { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.check-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.check-row input { width: 19px; min-height: 19px; }

.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 90; width: max-content; max-width: calc(100% - 30px); padding: 11px 15px; opacity: 0; pointer-events: none; color: #0b0e09; background: var(--acid); border-radius: 3px; font-weight: 800; font-size: .82rem; transform: translate(-50%, 12px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 520px) {
  .vehicle-service-head { flex-direction: column; }
  .vehicle-actions { width: 100%; justify-content: stretch; }
  .vehicle-actions .button { flex: 1; }
  .brand strong { font-size: .72rem; }
  .brand small { font-size: .66rem; }
  .database-actions { grid-template-columns: 1fr; }
  .table-search-row { grid-template-columns: 1fr 1fr; }
  .table-search-row input { grid-column: 1 / -1; }
}

@media (min-width: 680px) {
  .topbar { height: 76px; padding-inline: 32px; }
  .hero { min-height: 650px; padding: 70px 6vw 62px; background-position: center; align-items: center; }
  .hero-status { top: 32px; right: 32px; }
  .inventory-section, .page-view { padding: 62px 32px; }
  .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .detail-summary { grid-template-columns: repeat(4, 1fr); }
  .service-filter-grid { grid-template-columns: minmax(220px, 2fr) minmax(170px, 1fr) auto; align-items: end; }
}

@media (min-width: 1020px) {
  main { padding-bottom: 32px; }
  .bottom-nav { left: 50%; right: auto; bottom: 18px; width: 460px; height: 70px; transform: translateX(-50%); border: 1px solid #303630; border-radius: 5px; box-shadow: var(--shadow); }
  .bottom-nav.is-guest { width: 110px; }
  .inventory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vehicle-card:nth-child(1) { grid-column: span 2; }
  .vehicle-card:nth-child(1) .vehicle-image { aspect-ratio: 2 / 1; }
  .vehicle-card:nth-child(1) .vehicle-info { display: grid; grid-template-columns: 1fr auto; gap: 5px 24px; }
  .vehicle-card:nth-child(1) .tag-row { grid-column: 1 / -1; }
  .page-view { padding-bottom: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  body > * { display: none !important; }
  #qrDialog[open] { display: block !important; position: static; border: 0; color: #000; background: #fff; box-shadow: none; }
  #qrDialog .modal-close, #qrDialog .button, #qrDialog .fine-print, #qrDialog .kicker { display: none !important; }
}
