/* =====================================================================
   LPR 车牌识别云平台 · 统一设计系统（浅色可读版）
   设计方向：深蓝侧边栏 + 白色顶栏 + 白色内容区，正文加大加粗、对比清晰
   ===================================================================== */

:root {
  /* 主色：专业蓝 */
  --el-color-primary: #2563eb;
  --el-color-primary-light-3: #5b8def;
  --el-color-primary-light-5: #8fb2f4;
  --el-color-primary-light-7: #c0d3f9;
  --el-color-primary-light-8: #d6e3fb;
  --el-color-primary-light-9: #eef4fe;
  --el-color-primary-dark-2: #1d4ed8;
  --el-color-success: #16a34a;
  --el-color-warning: #f59e0b;
  --el-color-danger: #dc2626;
  --el-color-error: #dc2626;
  --el-color-info: #64748b;
  --el-border-radius-base: 6px;
  /* 字体：加大、加粗，提升可读性 */
  --el-font-size-base: 15px;
  --el-font-size-small: 13px;
  --el-font-size-large: 18px;
  --el-font-weight-primary: 600;

  /* 平台级变量 */
  --lpr-bg: #f5f6f8;
  --lpr-card-bg: #ffffff;
  --lpr-border: #e5e7eb;
  --lpr-text: #1f2937;
  --lpr-text-sub: #6b7280;
  --lpr-sidebar-bg: #1e293b;
  --lpr-sidebar-sub: #27354d;
  --lpr-sidebar-text: #cbd5e1;
  --lpr-sidebar-active: #ffffff;
  --lpr-header-h: 56px;
}

html, body { height: 100%; margin: 0; }
#app { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--lpr-text);
  background: var(--lpr-bg);
  font-size: 15px;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
}

/* =====================================================================
   主框架：顶栏 + 侧边栏
   ===================================================================== */
.layout { height: 100%; }

/* 顶栏（保持深色） */
.topbar {
  height: var(--lpr-header-h);
  min-height: var(--lpr-header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  background: var(--lpr-sidebar-bg);
  border-bottom: 1px solid #33415a;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  position: relative; z-index: 5;
  overflow: hidden;
}
.topbar .topbar-left { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; }
.topbar .topbar-title {
  font-size: 17px; font-weight: 600; color: #e2e8f0; letter-spacing: .3px;
  display: flex; align-items: center; gap: 8px;
}
.topbar .topbar-title .brand-dot {
  width: 8px; height: 20px; border-radius: 3px; background: linear-gradient(180deg, #2563eb, #7c3aed);
}
.topbar .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar .user-chip {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: #27354d; color: #cbd5e1; font-size: 13px;
}
.topbar .user-chip .avatar {
  width: 24px; height: 24px; border-radius: 50%; background: #2563eb; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.topbar .el-button { color: #cbd5e1; }
.topbar .el-button:hover { color: #fff; background: #27354d; }
.topbar .el-button--text { color: #cbd5e1; }

/* 打开页面多标签（顶栏主行内联，深色） */
.page-tabs {
  display: flex; align-items: center; gap: 5px; margin-left: 8px;
  flex: 1 1 auto; min-width: 0; max-width: none;
  overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap;
  height: 30px;
}
.page-tabs::-webkit-scrollbar { height: 3px; }
.page-tabs::-webkit-scrollbar-thumb { background: #33415a; border-radius: 3px; }
.page-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; font-size: 13px; color: #cbd5e1; cursor: pointer;
  background: #27354d; border: 1px solid #33415a; border-radius: 999px;
  white-space: nowrap; transition: all .15s; flex-shrink: 0;
}
.page-tab:hover { color: #fff; background: #33415a; border-color: #2563eb; }
.page-tab.on { color: #fff; background: #33415a; border-color: #2563eb; font-weight: 600; }
.page-tab .tab-close {
  width: 14px; height: 14px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; color: #94a3b8; margin-left: 1px;
}
.page-tab .tab-close:hover { background: #ef4444; color: #fff; }

/* 侧边栏（深色） */
.aside { background: var(--lpr-sidebar-bg); overflow-x: hidden; color-scheme: dark; }
.aside::-webkit-scrollbar { width: 8px; height: 8px; }
.aside::-webkit-scrollbar-track { background: transparent; }
.aside::-webkit-scrollbar-thumb { background: #33415a; border-radius: 4px; }
.aside::-webkit-scrollbar-thumb:hover { background: #3b4a68; }
.aside { scrollbar-width: thin; scrollbar-color: #33415a transparent; }
.aside .el-menu {
  border-right: none; background: transparent;
}
.aside .el-menu-item, .aside .el-sub-menu__title {
  color: var(--lpr-sidebar-text); height: 42px; line-height: 42px; font-weight: 500;
  font-size: 13px; padding-left: 16px; padding-right: 16px;
}
.aside .el-menu-item .el-icon, .aside .el-sub-menu__title .el-icon { font-size: 16px; margin-right: 7px; }
.aside .el-menu-item:hover, .aside .el-sub-menu__title:hover {
  background: var(--lpr-sidebar-sub); color: #fff;
}
.aside .el-menu-item.is-active {
  color: var(--lpr-sidebar-active); background: var(--lpr-sidebar-sub);
  border-left: 3px solid #2563eb;
  font-weight: 500;
}
.aside .el-sub-menu.is-active > .el-sub-menu__title { color: #fff; }
.aside .mi-emoji { color: inherit; font-size: 13px; }

/* 内容区 */
.main-content { padding: 0; background: var(--lpr-bg); }
.content-iframe { width: 100%; height: 100%; border: none; display: block; background: var(--lpr-bg); }

/* =====================================================================
   登录页
   ===================================================================== */
.login-wrap {
  height: 100%; display: flex; align-items: center; justify-content: center;
  background: #0f172a;
  background-image: radial-gradient(1200px 500px at 15% -10%, #1e3a8a 0%, transparent 60%),
                    radial-gradient(900px 500px at 90% 110%, #1e293b 0%, transparent 55%);
}
.login-card {
  width: 400px; padding: 34px 36px 30px; background: #fff; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.login-card .login-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.login-card .login-logo .brand-dot { width: 10px; height: 26px; border-radius: 4px; background: linear-gradient(180deg,#2563eb,#7c3aed); }
.login-card .login-logo h1 { margin: 0; font-size: 21px; color: var(--lpr-text); font-weight: 700; }
.login-card .sub { margin: 4px 0 26px; color: #94a3b8; font-size: 12px; letter-spacing: .5px; }
.login-card .el-form-item__label { color: #475569; font-weight: 500; }
.login-card .login-btn { width: 100%; height: 40px; font-size: 15px; letter-spacing: 2px; }
.login-card .login-hint { margin-top: 14px; color: #94a3b8; font-size: 12px; line-height: 1.8; text-align: center; }

/* =====================================================================
   通用组件细节（Element Plus 微调，让页面更精致）
   ===================================================================== */
/* 卡片 */
.el-card { border: 1px solid var(--lpr-border); box-shadow: 0 1px 2px rgba(0,0,0,.03) !important; border-radius: 8px !important; }
.el-card__header { font-weight: 600; color: var(--lpr-text); }

/* 表格：表头浅灰、行 hover、字体稍大 */
.el-table { --el-font-size: 15px; }
.el-table th.el-table__cell { background: #f8fafc !important; color: #475569; font-weight: 600; font-size: 14px; }
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell { background: #fafbfc; }
.el-table__body tr:hover > td.el-table__cell { background: #eef4fe !important; }
.el-table td.el-table__cell { font-size: 14px; font-weight: 500; }

/* 按钮统一 */
.el-button { font-weight: 600; }
.el-button--primary { --el-button-text-color: #fff; }

/* 弹窗：统一圆角 + 干净的 footer */
.el-dialog { border-radius: 10px; }
.el-dialog__header { padding: 16px 20px 12px; border-bottom: 1px solid var(--lpr-border); margin-right: 0; }
.el-dialog__title { font-weight: 600; font-size: 16px; color: var(--lpr-text); }
.el-dialog__body { padding: 20px; }

/* 表单 label 稍大 */
.el-form-item__label { font-weight: 600; }

/* 分页 */
.el-pagination { justify-content: flex-end; }

/* 统计卡片 */
.stat-card { border-radius: 8px; }
.stat-card .el-statistic__head { font-size: 13px; color: var(--lpr-text-sub); }
.stat-card .el-statistic__number { font-size: 28px; font-weight: 700; }
.stat-card.entry { border-top: 3px solid #16a34a; }
.stat-card.exit { border-top: 3px solid #dc2626; }
.stat-card.total { border-top: 3px solid #2563eb; }
.stat-card.capacity { border-top: 3px solid #f59e0b; }

/* 数据看板统计卡（首页/看板） */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dash-stats.d3 { grid-template-columns: repeat(3, 1fr); }
.dash-stat {
  display: flex; align-items: center; gap: 14px; padding: 18px 16px;
  background: var(--lpr-card-bg); border: 1px solid var(--lpr-border); border-radius: 10px;
}
.dash-stat .icon {
  width: 46px; height: 46px; border-radius: 10px; flex: 0 0 46px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.dash-stat .meta { min-width: 0; }
.dash-stat .meta .label { font-size: 13px; color: var(--lpr-text-sub); margin-bottom: 5px; white-space: nowrap; }
.dash-stat .meta .value { font-size: 26px; font-weight: 700; color: var(--lpr-text); line-height: 1; }
.dash-stat.total .icon { background: #eef4fe; color: #2563eb; }
.dash-stat.capacity .icon { background: #fef3c7; color: #f59e0b; }
.dash-stat.entry .icon { background: #dcfce7; color: #16a34a; }
.dash-stat.exit .icon { background: #fee2e2; color: #dc2626; }
.dash-stat.info .icon { background: #f1f5f9; color: #64748b; }

/* 弹窗区块标题 */
.dlg-section-title {
  font-size: 13px; font-weight: 600; color: #2563eb;
  margin: 6px 0 14px; padding-left: 8px; border-left: 3px solid #2563eb;
}
.dlg-section-title:first-child { margin-top: 0; }
.dlg-field-tip { font-size: 12px; color: #9ca3af; margin-top: 4px; line-height: 1.5; }

/* 通用工具类 */
.plate-tag { font-weight: 600; letter-spacing: 1px; }
.v-plate-tag { font-family: 'Courier New', monospace; font-weight: 700; letter-spacing: 1px; color: var(--lpr-text); }

/* =====================================================================
   车牌壳（lpr-plate）：按车牌类型套用实际外观，文字显示真实车牌
   ===================================================================== */
.lpr-plate {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0; padding: 1px 7px; border-radius: 3px;
  font-family: 'Arial Black', 'Microsoft YaHei', sans-serif;
  font-weight: 700; font-size: 12px; letter-spacing: normal; line-height: 1.2;
  white-space: nowrap; vertical-align: middle; box-sizing: border-box;
  border: 1px solid #c8cdd4; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 1px 2px rgba(0,0,0,.25);
}
.lpr-plate .lpr-plate__ch { display: inline-block; }
.lpr-plate .lpr-plate__ch--sep { letter-spacing: 0; color: inherit; opacity: .9; }
.lpr-plate .lpr-plate__ch--red { font-weight: 800; font-style: normal; }

/* 蓝牌：蓝底白字 */
.lpr-plate--blue { background: #0a4db3; color: #fff; border-color: #0a3f92; }
/* 黄牌(大型车/教练)：黄底黑字 */
.lpr-plate--yellow { background: linear-gradient(180deg,#fce66a,#f7c928); color: #101010; border-color: #d9a800; }
/* 绿牌新能源(渐变)：绿渐变底黑字 */
.lpr-plate--green_new { background: linear-gradient(90deg,#8ed39c,#2eb872 50%,#a8e59a); color: #062b12; border-color: #1b9a5a; }
/* 白牌(军警)：白底黑字，警字红 */
.lpr-plate--white { background: linear-gradient(180deg,#fbfbfb,#e8e8e8); color: #181818; border-color: #b9b9b9; }
.lpr-plate--white .lpr-plate__ch--red { color: #e11d1d; }
/* 白牌警车：白底黑字，警字红 */
.lpr-plate--white_police { background: linear-gradient(180deg,#fbfbfb,#e8e8e8); color: #181818; border-color: #b9b9b9; }
.lpr-plate--white_police .lpr-plate__ch--red { color: #e11d1d; }
/* 黑牌(港澳/使领馆)：黑底白字 */
.lpr-plate--black_hm { background: linear-gradient(180deg,#1c1c1c,#2b2b2b); color: #fff; border-color: #000; }
.lpr-plate--black_consulate { background: linear-gradient(180deg,#1c1c1c,#2b2b2b); color: #fff; border-color: #000; }
.row-actions { display: flex; gap: 4px; }
.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-online { background: #16a34a; }
.dot-offline { background: #94a3b8; }
.dot-unknown { background: #cbd5e1; }
.blue-link { color: #2563eb; }
.mi-emoji { display: inline-block; width: 14px; height: 14px; line-height: 14px; text-align: center; font-size: 14px; margin-right: 4px; vertical-align: middle; }

/* =====================================================================
   内容页通用的筛选卡片 / 工具栏 / 分页（各页面内联已含同名类，此处作为兜底统一）
   ===================================================================== */
.filter-card { margin-bottom: 10px; }
.filter-card .el-card__body { padding: 10px 12px 4px; }
.filter-wrap { display: flex; flex-wrap: wrap; align-items: center; row-gap: 9px; column-gap: 10px; }
.field { display: inline-flex; align-items: center; gap: 5px; }
.field > .lbl { font-size: 13px; color: #6b7280; white-space: nowrap; min-width: 64px; text-align: right; }
.field > .ctl { display: inline-flex; align-items: center; gap: 5px; }
.toolbar-row { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; padding-top: 7px; border-top: 1px dashed #e5e7eb; }
.page-row { display: flex; justify-content: flex-end; align-items: center; padding: 9px 2px; gap: 8px; }
