﻿/* ---------- 全局：hidden 属性优先（防止 display 覆盖导致闪现） ---------- */
[hidden] { display: none !important; }
/* ============================================================
   停车查询系统 - 新版样式 (纯前端重做, API 不变)
   ============================================================ */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --accent: #00b894;
  --accent-light: #e6faf5;
  --bg: #f0f4f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #e02424;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --ok: #059669;
  --ok-light: #d1fae5;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(16, 60, 120, .08);
  --shadow-lg: 0 10px 30px rgba(16, 60, 120, .14);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: linear-gradient(135deg, #1a73e8 0%, #00b894 100%);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(26, 115, 232, .25);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex: none;
}
.brand h1 { font-size: 18px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.brand .subtitle { font-size: 11px; opacity: .85; display: block; margin-top: 2px; }
.user-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.user-name { font-size: 13px; font-weight: 600; background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 20px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: 14px; font-weight: 500;
  transition: all .18s; user-select: none;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

/* ---------- 主容器 ---------- */
main { max-width: 780px; margin: 0 auto; padding: 18px 16px 60px; }

/* ---------- 面板卡片 ---------- */
.panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; color: var(--text); }
.panel-head .sub { font-size: 12px; color: var(--muted); }

/* ---------- 搜索 ---------- */
.search-panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.search-panel label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 8px; }
.search-row { display: flex; gap: 10px; }
.search-row input {
  flex: 1; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 16px; outline: none; transition: border .18s, box-shadow .18s;
  letter-spacing: 1px; text-transform: uppercase;
}
.search-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.15); }

/* ---------- 状态提示 ---------- */
.status-area {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px; text-align: center;
  border-left: 4px solid var(--primary);
}
.status-area.error { border-left-color: var(--danger); color: var(--danger); }
.status-area strong { display: block; font-size: 15px; margin-bottom: 6px; }
.status-area p { color: var(--muted); font-size: 13px; }

/* ---------- 详情表格 ---------- */
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; }
.kv dt { color: var(--muted); font-size: 13px; padding-top: 2px; }
.kv dd { font-size: 14.5px; font-weight: 500; word-break: break-all; }

/* ---------- 徽章 ---------- */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; background: #f1f3f5; color: var(--muted);
}
.tag.ok { background: var(--ok-light); color: var(--ok); }
.tag.warn { background: var(--warning-light); color: var(--warning); }
.tag.err { background: var(--danger-light); color: var(--danger); }

/* ---------- 费用 ---------- */
.fee-amount { font-size: 34px; font-weight: 800; color: var(--primary); margin: 4px 0 6px; }
.fee-note { font-size: 12.5px; color: var(--muted); }

/* ---------- 表格列表 ---------- */
.recent-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.recent-row { display: grid; grid-template-columns: repeat(2, 1fr); padding: 10px 12px; gap: 8px; align-items: center; }
.recent-row.four { grid-template-columns: repeat(4, 1fr); }
.recent-row span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-head { background: #f8fafc; font-weight: 700; color: var(--muted); font-size: 12px; }
.recent-row + .recent-row { border-top: 1px solid var(--border); }
.recent-row.ad-row { background: none; border: none; width: 100%; text-align: left; cursor: pointer; }
.recent-row.ad-row:hover { background: var(--primary-light); }
@media (max-width: 520px) {
  .recent-row.four { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: 84px 1fr; }
}

/* ---------- 筛选按钮组 ---------- */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-row .btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 表单 ---------- */
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.auth-form input, .auth-form select, .auth-form textarea {
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: inherit; outline: none; width: 100%;
}
.auth-form input:focus, .auth-form select:focus, .auth-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.12); }
.form-msg { font-size: 13px; color: var(--danger); min-height: 18px; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row img { height: 44px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }

/* ---------- 弹窗 ---------- */
.modal-overlay[hidden] { display: none !important; }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal-box { background: #fff; border-radius: 16px; padding: 22px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
.modal-box h2 { font-size: 17px; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* ---------- 认证页 ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #1a73e8 0%, #00b894 100%); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 30px 26px; box-shadow: var(--shadow-lg); }
.auth-card .auth-logo { text-align: center; margin-bottom: 20px; }
.auth-card .auth-logo .icon { font-size: 42px; }
.auth-card .auth-logo h1 { font-size: 20px; margin-top: 6px; }
.auth-card .auth-logo p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.auth-link { text-align: center; font-size: 13px; margin-top: 14px; color: var(--muted); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }

/* ---------- 管理表格 ---------- */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.admin-table th, .admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.admin-table th { background: #f8fafc; color: var(--muted); font-weight: 600; }
.admin-table tr:hover td { background: #f8fafc; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card { background: var(--card); border-radius: 12px; padding: 14px; text-align: center; box-shadow: var(--shadow); }
.stat-card .num { font-size: 24px; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 提示 toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: #1f2937; color: #fff; padding: 10px 20px; border-radius: 30px;
  font-size: 14px; box-shadow: var(--shadow-lg); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.toast.show { opacity: 1; }


/* ---------- 表单字段提示 ---------- */
.field-hint { font-size: 12px; color: var(--warning); margin-top: -2px; }


