/* =========================================================
   智能停车场车牌识别系统 · 深色科技风样式
   01 设计变量 / 02 基础重置 / 03 顶栏 / 04 通用组件
   05 统计概览 / 06 工作区 / 07 上传预览 / 08 识别结果
   09 设置面板 / 10 记录表格 / 11 摄像头占位 / 12 提示与页脚
   13 响应式 / 14 动效降级
   ========================================================= */

/* ---------- 01 设计变量 ---------- */
:root {
  color-scheme: dark;
  --bg-0: #03070d;
  --bg-1: #060d17;
  --bg-2: #091422;
  --surface: rgba(13, 25, 41, 0.86);
  --surface-strong: #0e1b2c;
  --surface-soft: rgba(18, 34, 54, 0.58);
  --line: rgba(126, 190, 220, 0.13);
  --line-strong: rgba(55, 219, 255, 0.34);
  --cyan: #22d3ee;
  --cyan-bright: #6ce7fb;
  --cyan-rgb: 34, 211, 238;
  --green: #34d399;
  --green-rgb: 52, 211, 153;
  --blue: #5b8dff;
  --blue-rgb: 91, 141, 255;
  --amber: #fbbf24;
  --amber-rgb: 251, 191, 36;
  --red: #ff4d63;
  --red-rgb: 255, 77, 99;
  --text: #eaf6ff;
  --text-soft: #b5c9da;
  --muted: #748da5;
  --muted-deep: #536b82;
  --font-sans: "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --content-max: 1460px;
  --shadow-panel: 0 24px 65px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  --shadow-button: 0 10px 28px rgba(34, 211, 238, 0.2);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition: 200ms var(--ease);
}

/* ---------- 02 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 70% 42% at 50% -12%, rgba(34, 211, 238, 0.13), transparent 70%),
    radial-gradient(ellipse 42% 36% at 100% 14%, rgba(52, 211, 153, 0.055), transparent 70%),
    radial-gradient(ellipse 45% 38% at 0% 52%, rgba(91, 141, 255, 0.045), transparent 72%),
    linear-gradient(180deg, #040a12 0%, #060d17 38%, #040810 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 190, 221, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 190, 221, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  opacity: 0.7;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.45) 48%, transparent 88%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.45) 48%, transparent 88%);
}

body::after {
  position: fixed;
  z-index: -1;
  top: 22%;
  left: 50%;
  width: min(1200px, 95vw);
  height: 460px;
  background: radial-gradient(ellipse at center, rgba(34, 211, 238, 0.045), transparent 68%);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}

::selection {
  background: rgba(34, 211, 238, 0.28);
  color: #ffffff;
}

h1,
h2,
h3,
p,
dl,
dd,
dt,
figure {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
summary,
label {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

a {
  color: var(--cyan);
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* 自定义滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 172, 200, 0.35) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(110, 172, 200, 0.3);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(110, 172, 200, 0.5);
  background-clip: padding-box;
}

/* ---------- 03 顶部导航 ---------- */
.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 10, 18, 0.76);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 4%, rgba(34, 211, 238, 0.22) 34%, transparent 72%);
  content: "";
  pointer-events: none;
}

.topbar-inner {
  display: flex;
  width: 100%;
  max-width: var(--content-max);
  min-height: 76px;
  margin: 0 auto;
  padding: 14px 32px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.18), rgba(52, 211, 153, 0.07)),
    rgba(9, 24, 38, 0.9);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.04) inset,
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 26px rgba(34, 211, 238, 0.09);
  color: var(--cyan);
  place-items: center;
}

.brand-mark::after {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
  content: "";
}

.brand-mark .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.7;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  overflow: hidden;
  color: #f0f9ff;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0.025em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-sub {
  margin-top: 2px;
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  flex: none;
  align-items: center;
  gap: 18px;
}

.engine-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.engine-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.75;
}

.status-pill {
  display: inline-flex;
  min-height: 37px;
  padding: 8px 14px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  align-items: center;
  gap: 9px;
  background: rgba(52, 211, 153, 0.075);
  color: #c8ffe9;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

.status-pill:hover {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.12);
  transform: translateY(-1px);
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(52, 211, 153, 0.9);
}

.status-dot::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 50%;
  animation: status-pulse 2.4s ease-out infinite;
  content: "";
}

.status-pill[data-state="checking"] {
  border-color: rgba(34, 211, 238, 0.26);
  background: rgba(34, 211, 238, 0.07);
  color: #c8f5ff;
}

.status-pill[data-state="checking"] .status-dot {
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(34, 211, 238, 0.8);
}

.status-pill[data-state="checking"] .status-dot::after {
  border-color: rgba(34, 211, 238, 0.45);
}

.status-pill[data-state="demo"] {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.08);
  color: #ffe4a4;
}

.status-pill[data-state="demo"]:hover {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.13);
}

.status-pill[data-state="demo"] .status-dot {
  background: var(--amber);
  box-shadow: 0 0 9px rgba(251, 191, 36, 0.8);
}

.status-pill[data-state="demo"] .status-dot::after {
  border-color: rgba(251, 191, 36, 0.45);
}

.status-pill[data-state="checking"] .status-refresh {
  animation: rotate 1.8s linear infinite;
}

.status-refresh {
  width: 12px;
  height: 12px;
  opacity: 0.55;
}

/* ---------- 04 通用组件 ---------- */
.app-main {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 30px 32px 42px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 17px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

.section-heading {
  display: flex;
  margin-bottom: 15px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin-top: 7px;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.section-note {
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(155deg, rgba(16, 31, 50, 0.9), rgba(7, 16, 28, 0.93)),
    var(--surface);
  box-shadow: var(--shadow-panel);
}

.panel::before {
  position: absolute;
  z-index: 1;
  top: -1px;
  left: 26px;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.36), transparent);
  content: "";
  pointer-events: none;
}

.panel-head {
  position: relative;
  z-index: 2;
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.panel-index {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.055);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  place-items: center;
}

.panel-title h2 {
  color: #edf8ff;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.panel-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.meta-chip,
.count-chip {
  display: inline-flex;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  align-items: center;
  background: rgba(4, 12, 21, 0.45);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  transition:
    border-color var(--transition),
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    opacity var(--transition);
}

.button .icon {
  width: 16px;
  height: 16px;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.button-primary {
  min-width: 132px;
  border-color: rgba(108, 231, 251, 0.48);
  background: linear-gradient(135deg, #28d9ee, #19b8d3);
  box-shadow: var(--shadow-button), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: #03161c;
}

.button-primary:not(:disabled):hover {
  background: linear-gradient(135deg, #55e6f6, #24cbe2);
  box-shadow: 0 13px 34px rgba(34, 211, 238, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(17, 33, 52, 0.72);
  color: var(--text-soft);
}

.button-secondary:not(:disabled):hover,
.button-ghost:not(:disabled):hover {
  border-color: rgba(108, 231, 251, 0.28);
  background: rgba(34, 211, 238, 0.075);
  color: #d9f8ff;
}

.button-ghost {
  border-color: var(--line);
  background: rgba(5, 13, 23, 0.22);
  color: var(--text-soft);
}

.button-danger {
  border-color: rgba(255, 77, 99, 0.18);
  background: rgba(255, 77, 99, 0.055);
  color: #ffb6c0;
}

.button-danger:not(:disabled):hover {
  border-color: rgba(255, 77, 99, 0.38);
  background: rgba(255, 77, 99, 0.11);
}

.button-danger.is-confirming {
  border-color: rgba(255, 77, 99, 0.55);
  background: rgba(255, 77, 99, 0.16);
  color: #ffdbe0;
}

.button-small {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 11px;
}

.button-small .icon {
  width: 14px;
  height: 14px;
}

.icon-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  place-items: center;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.icon-button:hover {
  border-color: rgba(255, 77, 99, 0.24);
  background: rgba(255, 77, 99, 0.08);
  color: #ff98a6;
}

.icon-button .icon {
  width: 15px;
  height: 15px;
}

.text-button {
  display: inline-flex;
  padding: 4px 2px;
  border: 0;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: #ffe3a3;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.text-button:hover {
  color: #fff3cf;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button .icon {
  width: 13px;
  height: 13px;
}

/* 加载动画 */
.spinner {
  display: none;
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid rgba(3, 22, 28, 0.28);
  border-top-color: #03161c;
  border-radius: 50%;
  animation: rotate 0.7s linear infinite;
}

.button.is-loading .spinner {
  display: inline-block;
}

.button.is-loading .button-icon {
  display: none;
}

/* ---------- 05 统计概览 ---------- */
.stats-grid {
  display: grid;
  margin-bottom: 21px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.stat-card {
  --accent: var(--cyan);
  --accent-rgb: var(--cyan-rgb);
  position: relative;
  overflow: hidden;
  padding: 18px 19px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(150deg, rgba(17, 33, 53, 0.9), rgba(8, 18, 30, 0.9)),
    var(--surface);
  box-shadow: 0 13px 36px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.stat-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.45), transparent);
  content: "";
}

.stat-card::after {
  position: absolute;
  top: -44px;
  right: -28px;
  width: 125px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.09), transparent 69%);
  content: "";
  pointer-events: none;
}

.stat-card:hover {
  border-color: rgba(var(--accent-rgb), 0.24);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

.accent-cyan {
  --accent: var(--cyan);
  --accent-rgb: var(--cyan-rgb);
}

.accent-green {
  --accent: var(--green);
  --accent-rgb: var(--green-rgb);
}

.accent-blue {
  --accent: var(--blue);
  --accent-rgb: var(--blue-rgb);
}

.accent-amber {
  --accent: var(--amber);
  --accent-rgb: var(--amber-rgb);
}

.stat-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  display: grid;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 9px;
  background: rgba(var(--accent-rgb), 0.07);
  color: var(--accent);
  place-items: center;
}

.stat-icon .icon {
  width: 16px;
  height: 16px;
}

.stat-tag {
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.stat-value {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: #f1fbff;
  font-family: var(--font-mono);
  font-size: clamp(28px, 2.45vw, 36px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color var(--transition);
}

.stat-card:hover .stat-value {
  color: #ffffff;
}

.stat-unit {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.stat-label {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: #c3d8e8;
  font-size: 12px;
  font-weight: 550;
}

.stat-note {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  color: var(--muted-deep);
  font-size: 10px;
  line-height: 1.5;
}

.stat-value.is-bumping {
  animation: number-bump 0.36s var(--ease);
}

/* 演示模式提示条 */
.demo-banner {
  display: flex;
  margin: -2px 0 19px;
  padding: 11px 14px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 12px;
  align-items: center;
  gap: 11px;
  background:
    linear-gradient(90deg, rgba(251, 191, 36, 0.085), rgba(251, 191, 36, 0.025)),
    rgba(9, 18, 30, 0.75);
  color: #f4d68f;
  font-size: 11.5px;
  animation: banner-in 0.3s var(--ease);
}

.demo-banner-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.09);
  color: var(--amber);
  place-items: center;
}

.demo-banner-icon .icon {
  width: 15px;
  height: 15px;
}

.demo-banner p {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 10px;
}

.demo-banner strong {
  color: #ffe6a7;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}

.demo-banner p span {
  color: #b7a16f;
  font-size: 11px;
}

.demo-banner .text-button {
  margin-left: auto;
}

/* ---------- 06 工作区 ---------- */
.workspace-grid {
  display: grid;
  margin-bottom: 21px;
  grid-template-columns: minmax(0, 1.34fr) minmax(370px, 0.86fr);
  align-items: start;
  gap: 17px;
}

.recognition-panel,
.result-panel {
  padding: 22px;
}

.tabs {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  gap: 3px;
  background: rgba(4, 12, 21, 0.48);
}

.tab {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 13px;
  border: 0;
  border-radius: 7px;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 550;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.tab .icon {
  width: 15px;
  height: 15px;
}

.tab:hover {
  color: var(--text-soft);
}

.tab.is-active {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.14), rgba(34, 211, 238, 0.065));
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.18);
  color: #cff8ff;
}

.tab-badge {
  padding: 1px 5px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 4px;
  background: rgba(251, 191, 36, 0.065);
  color: #d8b969;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.tab-panel {
  margin-top: 16px;
}

/* ---------- 07 上传与预览 ---------- */
.dropzone {
  position: relative;
  display: flex;
  min-height: 148px;
  padding: 20px;
  border: 1px dashed rgba(100, 164, 193, 0.3);
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(34, 211, 238, 0.04), transparent 64%),
    rgba(5, 13, 23, 0.4);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.dropzone::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(115, 189, 219, 0.12) 0.7px, transparent 0.7px);
  background-size: 15px 15px;
  content: "";
  opacity: 0.42;
  pointer-events: none;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: rgba(34, 211, 238, 0.58);
  background:
    radial-gradient(ellipse at 50% 10%, rgba(34, 211, 238, 0.09), transparent 66%),
    rgba(8, 22, 36, 0.58);
  box-shadow: inset 0 0 34px rgba(34, 211, 238, 0.045);
}

.dropzone.is-dragover {
  border-style: solid;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.16), 0 0 30px rgba(34, 211, 238, 0.08);
}

.dropzone.has-file {
  min-height: 92px;
  padding: 15px;
}

.drop-idle {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drop-visual {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 11px;
  place-items: center;
}

.upload-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 50%;
}

.upload-ring::after {
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(34, 211, 238, 0.16);
  border-radius: 50%;
  content: "";
}

.upload-icon {
  display: grid;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.09);
  color: var(--cyan);
  place-items: center;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.08);
}

.upload-icon .icon {
  width: 16px;
  height: 16px;
}

.drop-title {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.drop-title span {
  color: var(--cyan);
  font-weight: 600;
}

.drop-sub {
  margin-top: 3px;
  color: var(--muted-deep);
  font-size: 10.5px;
}

.dropzone:focus-visible {
  border-color: var(--cyan);
  outline: 2px solid rgba(34, 211, 238, 0.7);
  outline-offset: 2px;
}

.drop-selected {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  align-items: center;
  gap: 12px;
  background: rgba(12, 27, 44, 0.78);
  text-align: left;
  animation: fade-in 0.25s var(--ease);
}

.file-format {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.07);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  place-items: center;
}

.file-info {
  min-width: 0;
  flex: 1;
}

.file-name {
  overflow: hidden;
  color: #d9edf8;
  font-size: 12px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  display: flex;
  margin-top: 3px;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.file-replace {
  color: var(--muted-deep);
  font-family: var(--font-sans);
  font-size: 9.5px;
}

.remove-file {
  flex: none;
}

.preview-stage {
  position: relative;
  display: flex;
  min-height: 305px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(34, 211, 238, 0.035), transparent 65%),
    linear-gradient(rgba(108, 190, 221, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 190, 221, 0.03) 1px, transparent 1px),
    #040a11;
  background-size: auto, 26px 26px, 26px 26px, auto;
  transition: border-color var(--transition), background var(--transition);
}

.preview-stage.has-image {
  min-height: 0;
  padding: 0;
  border-color: rgba(91, 141, 255, 0.16);
  background: #02070c;
}

.preview-stage.is-recognizing {
  border-color: rgba(34, 211, 238, 0.4);
}

.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--muted);
  text-align: center;
}

.preview-empty-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 12px;
  border: 1px solid rgba(118, 174, 199, 0.16);
  border-radius: 14px;
  background: rgba(80, 122, 148, 0.045);
  color: var(--muted-deep);
  place-items: center;
}

.preview-empty-icon .icon {
  width: 23px;
  height: 23px;
  stroke-width: 1.4;
}

.preview-empty p {
  color: #9ab1c4;
  font-size: 12px;
  font-weight: 550;
}

.preview-empty span:last-child {
  margin-top: 4px;
  color: var(--muted-deep);
  font-size: 10px;
}

.preview-canvas {
  display: block;
  max-width: 100%;
  border-radius: 3px;
  background: #02070c;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
  transition: filter var(--transition);
}

.preview-stage.is-recognizing .preview-canvas {
  filter: brightness(0.78) saturate(0.9);
}

.preview-badge {
  position: absolute;
  z-index: 2;
  right: 11px;
  bottom: 11px;
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 7px;
  align-items: center;
  gap: 6px;
  background: rgba(3, 11, 19, 0.82);
  color: #bceff8;
  font-family: var(--font-mono);
  font-size: 9.5px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.preview-badge-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

.scan-line {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.9), transparent);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
  opacity: 0;
  pointer-events: none;
}

.preview-stage.is-recognizing .scan-line {
  opacity: 1;
  animation: scan-y 1.7s ease-in-out infinite;
}

.action-row {
  display: flex;
  margin-top: 14px;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.action-hint {
  margin-left: auto;
  color: var(--muted-deep);
  font-size: 10.5px;
  text-align: right;
}

.action-hint.is-ready {
  color: #8eb7c7;
}

.privacy-note {
  display: flex;
  margin-top: 12px;
  align-items: center;
  gap: 6px;
  color: var(--muted-deep);
  font-size: 9.5px;
  line-height: 1.5;
}

.privacy-note .icon {
  width: 12px;
  height: 12px;
  opacity: 0.8;
}

/* ---------- 08 识别结果 ---------- */
.result-panel {
  min-width: 0;
}

.state-chip {
  display: inline-flex;
  min-height: 23px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.state-chip::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.state-chip.is-empty {
  border-color: rgba(116, 141, 165, 0.17);
  background: rgba(116, 141, 165, 0.055);
}

.state-chip.is-loading {
  border-color: rgba(34, 211, 238, 0.24);
  background: rgba(34, 211, 238, 0.07);
  color: var(--cyan);
}

.state-chip.is-ready {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.07);
  color: #7cf0c2;
}

.state-chip.is-warning {
  border-color: rgba(251, 191, 36, 0.24);
  background: rgba(251, 191, 36, 0.065);
  color: #f3cb72;
}

.state-chip.is-error {
  border-color: rgba(255, 77, 99, 0.25);
  background: rgba(255, 77, 99, 0.07);
  color: #ff9aa7;
}

.result-empty {
  display: flex;
  min-height: 345px;
  padding: 30px 20px;
  border: 1px dashed rgba(118, 174, 199, 0.16);
  border-radius: var(--radius-md);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(34, 211, 238, 0.04), transparent 62%),
    rgba(4, 12, 21, 0.3);
  text-align: center;
}

.radar {
  position: relative;
  display: grid;
  width: 86px;
  height: 86px;
  margin-bottom: 19px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.11), transparent 58%),
    repeating-radial-gradient(circle at center, transparent 0 13px, rgba(34, 211, 238, 0.055) 13px 14px),
    rgba(5, 17, 28, 0.5);
  color: var(--cyan);
  place-items: center;
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.055);
}

.radar::before,
.radar::after {
  position: absolute;
  background: rgba(34, 211, 238, 0.09);
  content: "";
}

.radar::before {
  top: 50%;
  right: 9px;
  left: 9px;
  height: 1px;
}

.radar::after {
  top: 9px;
  bottom: 9px;
  left: 50%;
  width: 1px;
}

.radar .icon {
  position: relative;
  z-index: 2;
  width: 27px;
  height: 27px;
  opacity: 0.85;
}

.radar-sweep {
  position: absolute;
  z-index: 1;
  inset: 6px;
  overflow: hidden;
  border-radius: 50%;
}

.radar-sweep::before {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 292deg, rgba(34, 211, 238, 0.2) 330deg, transparent 360deg);
  content: "";
  animation: rotate 5.5s linear infinite;
}

.radar-ring {
  position: absolute;
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 50%;
}

.radar-ring-one {
  inset: 17px;
}

.radar-ring-two {
  inset: 30px;
}

.result-empty h3 {
  color: #cfe4f1;
  font-size: 14px;
  font-weight: 600;
}

.result-empty > p {
  max-width: 280px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.empty-steps {
  display: flex;
  margin-top: 23px;
  align-items: center;
  gap: 9px;
}

.empty-steps span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-deep);
  font-size: 9px;
  white-space: nowrap;
}

.empty-steps b {
  color: rgba(34, 211, 238, 0.7);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
}

.empty-steps i {
  width: 18px;
  height: 1px;
  background: rgba(118, 174, 199, 0.14);
}

.result-content {
  animation: fade-in 0.3s var(--ease);
}

.plate-hero {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.075), transparent 55%),
    linear-gradient(160deg, rgba(13, 30, 49, 0.96), rgba(7, 17, 29, 0.96));
}

.plate-hero::before {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.08), transparent 68%);
  content: "";
  pointer-events: none;
}

.plate-hero-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plate-hero-head > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.copy-button {
  display: inline-flex;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9.5px;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.copy-button:hover {
  border-color: var(--line);
  background: rgba(34, 211, 238, 0.05);
  color: var(--cyan);
}

.copy-button .icon {
  width: 11px;
  height: 11px;
}

.plate-code {
  position: relative;
  z-index: 1;
  margin: 9px 0 10px;
  overflow-wrap: anywhere;
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: clamp(29px, 3vw, 43px);
  font-weight: 700;
  letter-spacing: 0.075em;
  line-height: 1.18;
  text-shadow: 0 0 28px rgba(34, 211, 238, 0.22);
  font-variant-numeric: tabular-nums;
}

.badge-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.badge {
  display: inline-flex;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  align-items: center;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.badge-cyan {
  border-color: rgba(34, 211, 238, 0.2);
  background: rgba(34, 211, 238, 0.085);
  color: #9ceefa;
}

.badge-blue {
  border-color: rgba(91, 141, 255, 0.25);
  background: rgba(91, 141, 255, 0.1);
  color: #a9c2ff;
}

.badge-green {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.1);
  color: #99f3ce;
}

.badge-yellow {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.1);
  color: #ffdd8d;
}

.badge-white {
  border-color: rgba(224, 242, 254, 0.23);
  background: rgba(224, 242, 254, 0.085);
  color: #e7f4ff;
}

.badge-black {
  border-color: rgba(148, 163, 184, 0.23);
  background: rgba(30, 41, 59, 0.62);
  color: #b6c7d8;
}

.badge-gray {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.06);
  color: var(--muted);
}

.badge-amber {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.09);
  color: #f8d477;
}

.confidence-track {
  position: relative;
  z-index: 1;
  height: 3px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(104, 158, 180, 0.12);
}

.confidence-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16b7d0, var(--cyan), #9af5ff);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.38);
  transition: width 0.6s var(--ease);
}

.result-details {
  display: grid;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
}

.result-details > div {
  min-width: 0;
  padding: 11px 13px;
  background: rgba(6, 15, 26, 0.82);
}

.result-details dt {
  color: var(--muted-deep);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.result-details dd {
  margin-top: 3px;
  overflow: hidden;
  color: #c8deeb;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extra-results {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 15, 26, 0.48);
}

.extra-head {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.extra-head h3 {
  color: #a9c4d4;
  font-size: 10px;
  font-weight: 550;
}

.extra-head span {
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 9px;
}

.extra-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.extra-item {
  display: flex;
  padding: 6px 8px;
  border: 1px solid rgba(118, 174, 199, 0.1);
  border-radius: 7px;
  align-items: center;
  gap: 8px;
  background: rgba(15, 31, 48, 0.48);
}

.extra-item code {
  color: #b9edf5;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
}

.extra-item span {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.result-footer {
  display: flex;
  min-height: 36px;
  margin-top: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px;
}

.save-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.save-hint .icon {
  width: 12px;
  height: 12px;
  color: var(--green);
}

.save-hint.is-pending {
  color: #bba06a;
}

.save-hint.is-pending .icon {
  color: var(--amber);
}

/* ---------- 09 设置面板 ---------- */
.settings-panel {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.settings-panel summary {
  display: flex;
  padding: 2px;
  border-radius: 8px;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  transition: color var(--transition);
}

.settings-panel summary::-webkit-details-marker {
  display: none;
}

.settings-symbol {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(34, 211, 238, 0.035);
  color: var(--muted);
  place-items: center;
}

.settings-symbol .icon {
  width: 14px;
  height: 14px;
}

.settings-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.settings-title strong {
  color: #bed4e2;
  font-size: 11.5px;
  font-weight: 600;
}

.settings-title small {
  color: var(--muted-deep);
  font-size: 9px;
}

.chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted-deep);
  transition: transform var(--transition), color var(--transition);
}

.settings-panel[open] .chevron {
  color: var(--muted);
  transform: rotate(180deg);
}

.settings-panel summary:hover .settings-symbol {
  border-color: rgba(34, 211, 238, 0.22);
  color: var(--cyan);
}

.settings-body {
  padding-top: 14px;
  animation: fade-in 0.24s var(--ease);
}

.setting-block {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.setting-block + .setting-block {
  margin-top: 15px;
}

.setting-block legend,
.setting-name {
  color: #a8c0d1;
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
}

.setting-block legend {
  margin-bottom: 7px;
  padding: 0;
}

.segmented {
  display: grid;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(4, 12, 21, 0.46);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.segmented label {
  position: relative;
  display: block;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: block;
  padding: 7px 3px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.segmented label:hover span {
  color: var(--text-soft);
}

.segmented input:checked + span {
  border-color: rgba(34, 211, 238, 0.22);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.14), rgba(34, 211, 238, 0.06));
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.045);
  color: #bff5fd;
  font-weight: 600;
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}

.setting-hint {
  min-height: 16px;
  margin-top: 6px;
  color: var(--muted-deep);
  font-size: 9px;
  line-height: 1.5;
}

.setting-toggles {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 13, 23, 0.3);
}

.toggle-row {
  display: flex;
  padding: 9px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.toggle-row + .toggle-row {
  border-top: 1px solid rgba(126, 190, 220, 0.08);
}

.toggle-copy {
  min-width: 0;
}

.setting-name {
  display: block;
  line-height: 1.4;
}

.toggle-copy p {
  margin-top: 2px;
  color: var(--muted-deep);
  font-size: 8.5px;
  line-height: 1.45;
}

.switch {
  position: relative;
  display: inline-flex;
  flex: none;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  display: block;
  width: 33px;
  height: 19px;
  border: 1px solid rgba(118, 174, 199, 0.18);
  border-radius: 999px;
  background: rgba(75, 105, 124, 0.2);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #7e98aa;
  content: "";
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.switch input:checked + .switch-track {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.16);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.08);
}

.switch input:checked + .switch-track::after {
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(34, 211, 238, 0.6);
  transform: translateX(14px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.settings-foot {
  display: flex;
  margin-top: 11px;
  align-items: flex-start;
  gap: 5px;
  color: var(--muted-deep);
  font-size: 8.5px;
  line-height: 1.55;
}

.settings-foot .icon {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

/* ---------- 10 记录表格 ---------- */
.records-panel {
  overflow: hidden;
}

.records-panel > .panel-head {
  padding: 21px 22px 0;
}

.panel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.panel-actions .count-chip {
  margin-right: 2px;
}

.table-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
}

.records-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.records-table thead th {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 12, 21, 0.52);
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 550;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.records-table thead th:first-child,
.records-table tbody td:first-child {
  padding-left: 22px;
}

.records-table thead th:last-child,
.records-table tbody td:last-child {
  padding-right: 22px;
}

.records-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(126, 190, 220, 0.065);
  color: var(--text-soft);
  font-size: 11px;
  vertical-align: middle;
}

.records-table tbody tr {
  transition: background var(--transition);
}

.records-table tbody tr:hover {
  background: rgba(34, 211, 238, 0.028);
}

.records-table tbody tr.is-new {
  animation: row-highlight 1.5s var(--ease);
}

.col-index {
  width: 58px;
}

.record-index {
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.record-thumb {
  display: block;
  width: 57px;
  height: 37px;
  border: 1px solid rgba(126, 190, 220, 0.14);
  border-radius: 5px;
  object-fit: cover;
  background: #050c14;
}

.record-plate {
  display: inline-block;
  color: #c7f4fb;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.conf-cell {
  display: flex;
  min-width: 105px;
  align-items: center;
  gap: 8px;
}

.conf-bar {
  width: 52px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(118, 174, 199, 0.12);
}

.conf-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color, var(--green));
  box-shadow: 0 0 7px var(--bar-color, var(--green));
}

.conf-text {
  color: #a9c7d6;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.type-chip {
  display: inline-flex;
  padding: 2px 7px;
  border: 1px solid rgba(91, 141, 255, 0.2);
  border-radius: 4px;
  background: rgba(91, 141, 255, 0.075);
  color: #a5bdff;
  font-size: 9px;
  line-height: 1.55;
  white-space: nowrap;
}

.type-chip.is-green {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.075);
  color: #8eecc7;
}

.type-chip.is-yellow {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.07);
  color: #edce81;
}

.type-chip.is-white {
  border-color: rgba(224, 242, 254, 0.22);
  background: rgba(224, 242, 254, 0.07);
  color: #d4e9f5;
}

.type-chip.is-black {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.45);
  color: #aebfce;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.source-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 5px rgba(52, 211, 153, 0.55);
}

.source-chip.is-demo .source-dot {
  background: var(--amber);
  box-shadow: 0 0 5px rgba(251, 191, 36, 0.55);
}

.record-elapsed,
.record-time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.record-time {
  color: var(--muted-deep);
}

.table-empty {
  display: flex;
  padding: 38px 22px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}

.table-empty-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.035);
  color: var(--muted-deep);
  place-items: center;
}

.table-empty-icon .icon {
  width: 18px;
  height: 18px;
}

.table-empty p {
  color: #93aab9;
  font-size: 11px;
  font-weight: 550;
}

.table-empty span:not(.table-empty-icon) {
  display: block;
  margin-top: 2px;
  color: var(--muted-deep);
  font-size: 9.5px;
}

.records-foot {
  display: flex;
  padding: 11px 22px;
  border-top: 1px solid rgba(126, 190, 220, 0.06);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-deep);
  font-size: 9px;
}

.records-foot span:last-child {
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ---------- 11 摄像头 / 视频占位 ---------- */
.camera-placeholder {
  display: flex;
  min-height: 560px;
  padding: 45px 24px;
  border: 1px dashed rgba(118, 174, 199, 0.17);
  border-radius: var(--radius-md);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(34, 211, 238, 0.04), transparent 53%),
    rgba(4, 12, 21, 0.3);
  text-align: center;
}

.camera-visual {
  position: relative;
  display: grid;
  width: 118px;
  height: 118px;
  margin-bottom: 24px;
  place-items: center;
}

.camera-orbit {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(34, 211, 238, 0.18);
  border-radius: 50%;
  animation: rotate 22s linear infinite;
}

.camera-orbit::before,
.camera-orbit::after {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.55);
  content: "";
}

.camera-orbit::before {
  top: 8px;
  left: 50%;
}

.camera-orbit::after {
  right: 4px;
  bottom: 24px;
}

.camera-core {
  position: relative;
  z-index: 1;
  display: grid;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.1), rgba(9, 24, 38, 0.9));
  color: var(--cyan);
  place-items: center;
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.07);
}

.camera-core .icon {
  width: 31px;
  height: 31px;
  stroke-width: 1.5;
}

.camera-pulse {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 9px rgba(251, 191, 36, 0.8);
}

.status-chip {
  display: inline-flex;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.status-chip.is-pending {
  border-color: rgba(251, 191, 36, 0.21);
  background: rgba(251, 191, 36, 0.06);
  color: #dfc078;
}

.chip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.camera-placeholder h3 {
  margin-top: 16px;
  color: #c8deeb;
  font-size: 15px;
  font-weight: 600;
}

.camera-placeholder > p {
  max-width: 470px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.camera-tags {
  display: flex;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.camera-tags span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(11, 26, 42, 0.6);
  color: var(--muted-deep);
  font-size: 9px;
}

.camera-placeholder .camera-note {
  display: inline-flex;
  max-width: 480px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(126, 190, 220, 0.08);
  align-items: flex-start;
  gap: 5px;
  color: var(--muted-deep);
  font-size: 9px;
  line-height: 1.6;
  text-align: left;
}

.camera-note .icon {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

/* ---------- 12 提示、页脚、无障碍 ---------- */
.app-footer {
  display: flex;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 32px 30px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-deep);
  font-size: 9.5px;
}

.app-footer p:last-child {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.app-footer span {
  margin: 0 3px;
  opacity: 0.5;
}

.toast-container {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: flex;
  width: min(355px, calc(100vw - 32px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left-width: 2px;
  border-radius: 10px;
  align-items: flex-start;
  gap: 9px;
  background: rgba(8, 19, 31, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  color: var(--text-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: toast-in 0.28s var(--ease);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
  place-items: center;
}

.toast-icon .icon {
  width: 13px;
  height: 13px;
}

.toast-message {
  min-width: 0;
  padding-top: 2px;
  flex: 1;
  font-size: 10.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.toast-close {
  display: grid;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  flex: none;
  background: transparent;
  color: var(--muted-deep);
  cursor: pointer;
  place-items: center;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
}

.toast-close .icon {
  width: 11px;
  height: 11px;
}

.toast--success {
  border-left-color: var(--green);
}

.toast--success .toast-icon {
  background: rgba(52, 211, 153, 0.09);
  color: var(--green);
}

.toast--warning {
  border-left-color: var(--amber);
}

.toast--warning .toast-icon {
  background: rgba(251, 191, 36, 0.09);
  color: var(--amber);
}

.toast--error {
  border-left-color: var(--red);
}

.toast--error .toast-icon {
  background: rgba(255, 77, 99, 0.09);
  color: #ff8492;
}

.noscript-tip {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 77, 99, 0.3);
  border-radius: 10px;
  background: #1a0b10;
  color: #ffdbe0;
  font-size: 12px;
  text-align: center;
}

/* ---------- 13 响应式 ---------- */
@media (max-width: 1240px) {
  .topbar-inner,
  .app-main,
  .app-footer {
    padding-right: 24px;
    padding-left: 24px;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.9fr);
  }

  .recognition-panel,
  .result-panel {
    padding: 19px;
  }

  .stat-card {
    padding: 16px;
  }
}

@media (max-width: 1080px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-panel {
    display: block;
  }

  .result-empty {
    min-height: 270px;
  }

  .camera-placeholder {
    min-height: 460px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-value {
    font-size: 32px;
  }
}

@media (max-width: 820px) {
  .topbar-inner {
    min-height: 68px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .engine-meta {
    display: none;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .app-main {
    padding-top: 22px;
    padding-bottom: 32px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .section-note {
    padding: 0;
  }

  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .records-panel > .panel-head {
    align-items: center;
  }

  .recognition-panel,
  .result-panel {
    padding: 16px;
  }

  .result-empty {
    min-height: 250px;
  }

  .preview-stage {
    min-height: 250px;
  }

  .action-hint {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .demo-banner {
    align-items: flex-start;
  }

  .demo-banner .text-button {
    margin-left: 0;
    padding-top: 2px;
  }

  .panel-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .records-panel > .panel-head {
    padding: 17px 16px 0;
  }

  .records-table thead th:first-child,
  .records-table tbody td:first-child {
    padding-left: 16px;
  }

  .records-table thead th:last-child,
  .records-table tbody td:last-child {
    padding-right: 16px;
  }

  .records-foot {
    padding: 10px 16px;
  }
}

@media (max-width: 620px) {
  .topbar-inner {
    padding-right: 16px;
    padding-left: 16px;
    gap: 12px;
  }

  .brand {
    gap: 9px;
  }

  .brand-sub {
    display: none;
  }

  .brand-name {
    font-size: 15.5px;
    letter-spacing: 0;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 10px;
  }

  .brand-mark .icon {
    width: 21px;
    height: 21px;
  }

  .status-pill {
    min-height: 33px;
    padding: 7px 10px;
    font-size: 10.5px;
    gap: 7px;
  }

  .status-refresh {
    display: none;
  }

  .app-main {
    padding: 19px 16px 28px;
  }

  .app-footer {
    padding: 0 16px 22px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .stats-grid {
    gap: 9px;
  }

  .stat-card {
    padding: 14px 13px;
    border-radius: 13px;
  }

  .stat-icon {
    width: 27px;
    height: 27px;
  }

  .stat-icon .icon {
    width: 14px;
    height: 14px;
  }

  .stat-tag {
    font-size: 7.5px;
  }

  .stat-value {
    margin-top: 12px;
    font-size: 27px;
  }

  .stat-label {
    margin-top: 6px;
    font-size: 10.5px;
  }

  .stat-note {
    display: none;
  }

  .panel-title {
    gap: 9px;
  }

  .panel-index {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    font-size: 9px;
  }

  .panel-title h2 {
    font-size: 14.5px;
  }

  .panel-title p {
    font-size: 10px;
  }

  .meta-chip {
    display: none;
  }

  .demo-banner {
    padding: 10px 11px;
    font-size: 10.5px;
  }

  .demo-banner p {
    gap: 2px;
  }

  .demo-banner p span {
    width: 100%;
    font-size: 10px;
  }

  .demo-banner .text-button {
    width: 100%;
    justify-content: flex-start;
  }

  .tabs {
    display: flex;
    width: 100%;
  }

  .tab {
    flex: 1;
    justify-content: center;
    padding: 7px 8px;
    font-size: 10.5px;
  }

  .tab-badge {
    display: none;
  }

  .dropzone {
    min-height: 138px;
    padding: 16px;
  }

  .drop-title {
    font-size: 12px;
  }

  .drop-sub {
    font-size: 9.5px;
  }

  .preview-stage {
    min-height: 210px;
    padding: 10px;
  }

  .preview-empty span:last-child {
    max-width: 220px;
  }

  .action-row .button-primary {
    flex: 1;
  }

  .action-row .button-secondary {
    flex: none;
  }

  .plate-code {
    font-size: 30px;
    letter-spacing: 0.045em;
  }

  .result-details > div {
    padding: 10px;
  }

  .result-details dd {
    font-size: 10px;
  }

  .result-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .empty-steps {
    gap: 6px;
  }

  .empty-steps i {
    width: 10px;
  }

  .empty-steps span {
    font-size: 8px;
  }

  .camera-placeholder {
    min-height: 420px;
    padding: 35px 16px;
  }

  .camera-visual {
    width: 100px;
    height: 100px;
  }

  .camera-core {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .camera-core .icon {
    width: 26px;
    height: 26px;
  }

  .records-panel > .panel-head {
    gap: 10px;
  }

  .panel-actions {
    margin-top: 2px;
  }

  .panel-actions .count-chip {
    margin-right: auto;
  }

  .table-empty {
    padding: 32px 16px;
    justify-content: flex-start;
  }

  .records-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .toast-container {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }

  .toast-message {
    font-size: 10px;
  }
}

@media (max-width: 430px) {
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon tag"
      "value label"
      "value note";
    align-items: center;
    column-gap: 11px;
    padding: 12px 14px;
  }

  .stat-top {
    display: contents;
  }

  .stat-icon {
    grid-area: icon;
  }

  .stat-tag {
    grid-area: tag;
    text-align: right;
  }

  .stat-value {
    grid-area: value;
    margin-top: 0;
    font-size: 25px;
    line-height: 1.2;
  }

  .stat-label {
    grid-area: label;
    align-self: end;
    margin-top: 0;
  }

  .stat-note {
    display: block;
    grid-area: note;
    align-self: start;
    margin-top: 1px;
    font-size: 8.5px;
  }

  .drop-selected {
    gap: 8px;
    padding: 9px;
  }

  .file-format {
    width: 36px;
    height: 36px;
  }

  .file-replace {
    display: none;
  }

  .empty-steps {
    display: none;
  }

  .plate-code {
    font-size: 27px;
  }

  .badge-row {
    gap: 4px;
  }

  .badge {
    font-size: 8.5px;
  }
}

/* ---------- 14 动效降级 ---------- */
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes status-pulse {
  0% {
    opacity: 0.7;
    transform: scale(0.55);
  }
  65%,
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes scan-y {
  0% {
    top: 0;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    top: calc(100% - 2px);
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes banner-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes number-bump {
  0% {
    opacity: 0.5;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes row-highlight {
  0% {
    background: rgba(34, 211, 238, 0.12);
  }
  100% {
    background: transparent;
  }
}

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

  .radar-sweep::before,
  .status-dot::after,
  .scan-line {
    animation: none !important;
  }
}
