/* ===========================================================
   车牌代扣查询系统 - 公共样式
   移动端优先 / 蓝色系 / 工具类应用风格
   =========================================================== */

:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-soft: #e8f1ff;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2329;
  --text-2: #646a73;
  --text-3: #8f959e;
  --line: #eef0f3;
  --danger: #ff4d4f;
  --danger-soft: #fff1f0;
  --success: #00b42a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 34, 67, 0.04), 0 4px 14px rgba(15, 34, 67, 0.05);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 calc(24px + var(--safe-bottom));
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
  margin: 0;
}

/* ---------- 顶部导航 ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--primary);
  color: #fff;
  padding-top: env(safe-area-inset-top, 0px);
  box-shadow: 0 1px 6px rgba(9, 88, 217, 0.18);
}

.app-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
}

.app-header__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* 后台顶部：极简，仅居中标题 */
.app-header--plain .app-header__bar {
  height: 50px;
  justify-content: center;
}

.app-header--plain .app-header__title {
  font-weight: 700;
}

/* 顶部右侧操作按钮（退出登录）：绝对定位，避免影响标题居中 */
.app-header__bar--action {
  position: relative;
}

.app-header__action {
  position: absolute;
  right: 16px;
  top: 50%;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transform: translateY(-50%);
}

.app-header__action:active {
  background: rgba(255, 255, 255, 0.3);
}

/* ---------- 主体容器 ---------- */
.app-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 12px 0;
}

/* ===========================================================
   管理后台：左侧菜单 + 右侧内容区
   PC（>768px）：侧边栏常驻左侧 220px
   移动端（<=768px）：侧边栏收起为抽屉，汉堡菜单唤出
   =========================================================== */
.page-admin {
  padding: 0;
  overflow: hidden;
}

.admin-layout {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ---------- 侧边栏 ---------- */
.admin-sidebar {
  flex: 0 0 220px;
  width: 220px;
  display: flex;
  flex-direction: column;
  background: #001529;
  color: rgba(255, 255, 255, 0.72);
}

.admin-sidebar__brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 62px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar__mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 8px;
}

.admin-sidebar__brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-sidebar__name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.admin-sidebar__sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.admin-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 10px;
}

.admin-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  margin-bottom: 4px;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.admin-nav__item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.admin-nav__item.is-active {
  color: #fff;
  font-weight: 600;
  background: var(--primary);
}

.admin-nav__icon {
  flex: 0 0 auto;
}

.admin-nav__item--logout {
  color: rgba(255, 255, 255, 0.6);
}

.admin-nav__item--logout:hover {
  color: #ffb4b5;
  background: rgba(255, 77, 79, 0.16);
}

.admin-sidebar__foot {
  flex: 0 0 auto;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar__foot .admin-nav__item {
  margin-bottom: 0;
}

.admin-sidebar__user {
  padding: 0 12px 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 移动端抽屉遮罩（PC 不显示） */
.admin-scrim {
  display: none;
}

/* ---------- 右侧主体 ---------- */
.admin-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.admin-topbar__menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.admin-topbar__menu:active {
  background: #f2f3f5;
}

.admin-topbar__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar__action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-2);
  background: #f4f5f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.admin-topbar__action:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #ffd6d7;
}

.admin-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px 20px;
}

.panel {
  display: none;
  max-width: 1040px;
  margin: 0 auto;
}

.panel.is-active {
  display: block;
}

/* 底部统计条 */
.admin-footer {
  position: static;
  flex: 0 0 auto;
  z-index: auto;
  max-width: none;
  margin: 0;
  padding: 10px 20px;
  background: #fff;
  backdrop-filter: none;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 12px;
  color: var(--text-3);
}

.admin-footer span {
  font-weight: 600;
  color: var(--text-2);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}

.card--list {
  padding: 18px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.6;
  margin-bottom: 14px;
}

.card--danger {
  padding: 12px;
}

/* ---------- 表单控件 ---------- */
.field-label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin: 0 0 6px 2px;
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  background: #f7f8fa;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, background 0.15s;
}

.input::placeholder {
  color: #b8bcc4;
}

.input:focus {
  background: #fff;
  border-color: var(--primary);
}

/* 多行车牌输入 */
.textarea {
  height: auto;
  min-height: 76px;
  padding: 12px 14px;
  line-height: 1.55;
  resize: none;
  font-family: inherit;
}

/* 月份选择触发器（替代原生 input[type=month]） */
.month-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  margin-bottom: 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  background: #f7f8fa;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.month-trigger:active {
  background: #eef1f5;
}

.month-trigger__icon {
  display: block;
  line-height: 0;
  color: var(--text-3);
}

.search-card .btn--block {
  margin-top: 14px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  background: #f2f3f5;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, background 0.15s;
}

.btn:active {
  opacity: 0.82;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.btn--primary:active {
  background: var(--primary-dark);
}

.btn--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn--ghost {
  background: #f2f3f5;
  color: var(--text-2);
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* 复选框 */
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-2);
  min-height: 44px;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* ---------- 查询结果 ---------- */
.result {
  padding-bottom: 8px;
}

/* 数据截止日期提示（红色加粗，醒目） */
.result-cutoff {
  font-size: 12px;
  font-weight: 700;
  color: var(--danger);
  margin: 2px 2px 4px;
}

/* 结果概览 */
.result-summary {
  font-size: 13px;
  color: var(--text-3);
  margin: 2px 2px 8px;
}

/* 无数据车牌列表 */
.result-missing {
  font-size: 12px;
  color: #999;
  line-height: 1.7;
  margin: 0 2px 8px;
}

.result-missing__plate {
  color: #666;
}

/* 车牌列表卡片 */
.plate-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  text-align: left;
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.plate-item:active {
  background: #fafbfc;
  transform: scale(0.995);
}

.plate-item__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.plate-item__plate {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text);
}

/* 司机姓名 */
.plate-item__driver {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}

/* 右侧：已收租金 */
.plate-item__right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.plate-item__label {
  font-size: 11px;
  color: var(--text-3);
}

.plate-item__money {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

.plate-item__arrow {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
  color: #c9cdd4;
}

/* 无记录的车牌卡片 */
.plate-item--empty {
  cursor: default;
  box-shadow: none;
  background: #fbfcfd;
  border-color: var(--line);
}

.plate-item--empty:active {
  background: #fbfcfd;
  transform: none;
}

.plate-item--empty .plate-item__plate {
  color: var(--text-2);
  letter-spacing: 1px;
}

.plate-item__empty-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-3);
}

.plate-item__empty-tip svg {
  flex: 0 0 auto;
}

/* 区块标题 */
.section {
  margin-bottom: 12px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin: 4px 2px 8px;
}

/* 扣款明细列表 */
.record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 明细卡片 */
.record-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 单笔明细卡片：金额 + 日期 */
.record-card--row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.record-card__amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.record-card__date {
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- 空状态 ---------- */
.empty-state {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 24px;
  text-align: center;
}

.empty-state__icon {
  display: block;
  margin-bottom: 14px;
  line-height: 0;
}

.empty-state__title {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state__desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.7;
}

/* ---------- 遮罩层（弹窗 / 底部抽屉） ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.overlay--center {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.overlay--bottom {
  align-items: flex-end;
}

/* 打开遮罩时锁定页面滚动 */
body.is-locked {
  overflow: hidden;
}

/* ---------- 自定义月份选择器 ---------- */
.month-panel {
  width: 100%;
  max-width: 340px;
  padding: 14px 16px 12px;
  background: #fff;
  border-radius: 16px;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.overlay.is-open .month-panel {
  transform: none;
}

.month-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.month-panel__year {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.year-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}

.year-nav:active {
  background: #f2f3f5;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 4px 0 16px;
}

.month-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #f5f7fa;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.month-cell:active {
  background: #eef1f5;
}

.month-cell.is-active {
  color: #fff;
  font-weight: 600;
  background: var(--primary);
  border-color: var(--primary);
}

.month-panel__footer {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.month-panel__footer .btn {
  flex: 1 1 0;
}

/* ---------- 底部抽屉 ---------- */
.sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: 82vh;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.overlay.is-open .sheet {
  transform: translateY(0);
}

.sheet__handle {
  flex: 0 0 auto;
  width: 36px;
  height: 4px;
  margin: 8px auto 2px;
  background: #e3e5e9;
  border-radius: 2px;
}

.sheet__head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 14px;
  border-bottom: 1px solid var(--line);
}

.sheet__plate {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.sheet__driver {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.sheet__stats {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-2);
}

.sheet__stats strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.sheet__close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px 0 0;
  color: var(--text-3);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.sheet__close:active {
  background: #f2f3f5;
}

/* 明细区域：内容少时随内容收缩，内容多时独立滚动 */
.sheet__body {
  flex: 1 1 auto;
  max-height: 62vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(20px + var(--safe-bottom));
}

.sheet__body .section:last-child {
  margin-bottom: 0;
}

/* ---------- 管理后台 ---------- */
.import-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.7;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.import-status--error {
  background: var(--danger-soft);
  color: var(--danger);
}

.import-status--success {
  background: #e8ffea;
  color: #009a29;
}

.import-status strong {
  font-weight: 600;
}

/* ---------- 月份选择器（数据列表） ---------- */
.month-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding-bottom: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.month-tabs__empty {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-3);
}

.month-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-2);
  background: #f4f5f7;
  border: 1px solid transparent;
  border-radius: 18px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.month-chip:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.month-chip.is-active {
  color: #fff;
  font-weight: 600;
  background: var(--primary);
  border-color: var(--primary);
}

.month-chip__num {
  padding: 0 6px;
  font-size: 11px;
  line-height: 16px;
  border-radius: 8px;
  background: rgba(31, 35, 41, 0.08);
}

.month-chip.is-active .month-chip__num {
  background: rgba(255, 255, 255, 0.26);
}

/* ---------- 面板头部（标题 + 操作按钮） ---------- */
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-head__desc {
  margin-bottom: 0;
}

.panel-head__action {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

/* ---------- 账号列表 ---------- */
.account-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.account-table__head,
.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 120px minmax(0, 1.6fr) 140px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.account-table__head {
  height: 42px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  background: #fafbfc;
}

.account-row {
  min-height: 56px;
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.account-row__cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.account-row__name {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row__remark {
  font-size: 13px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row__ops {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 1px 8px;
  font-size: 12px;
  border-radius: 10px;
  background: #f2f3f5;
  color: var(--text-2);
  white-space: nowrap;
}

.tag--primary {
  color: var(--primary);
  background: var(--primary-soft);
}

.icon-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--primary);
  background: #fff;
  border: 1px solid #d6e4ff;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.icon-btn:hover {
  background: var(--primary-soft);
}

.icon-btn--danger {
  color: var(--danger);
  border-color: #ffd6d7;
}

.icon-btn--danger:hover {
  background: var(--danger-soft);
}

/* ---------- 通用弹窗（账号新增 / 编辑） ---------- */
.dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 34, 67, 0.22);
}

.dialog__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-3);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.dialog__close:hover {
  color: var(--text);
  background: #f2f3f5;
}

.dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 4px;
}

.dialog__body .input {
  margin-bottom: 14px;
}

/* 下拉框保留原生箭头，便于识别 */
select.input {
  appearance: auto;
  -webkit-appearance: auto;
  padding-right: 12px;
}

.dialog__foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
}

.dialog__foot .btn {
  min-width: 84px;
  min-height: 40px;
  font-size: 14px;
}

/* ---------- 后台移动端适配（<=768px） ---------- */
@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: 250px;
    flex-basis: 250px;
    padding-top: env(safe-area-inset-top, 0px);
    transform: translateX(-100%);
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.3, 1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
  }

  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  body.sidebar-open .admin-scrim {
    opacity: 1;
    visibility: visible;
  }

  .admin-topbar {
    height: 54px;
    padding: 0 12px;
    gap: 6px;
  }

  .admin-topbar__menu {
    display: inline-flex;
  }

  .admin-content {
    padding: 12px 12px 16px;
  }

  .admin-footer {
    padding: 10px 12px calc(10px + var(--safe-bottom));
  }

  /* 账号列表：表格 -> 卡片 */
  .account-table {
    border: none;
    border-radius: 0;
  }

  .account-table__head {
    display: none;
  }

  .account-row {
    display: block;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }

  .account-row__cell {
    margin-bottom: 6px;
  }

  .account-row__cell::before {
    content: attr(data-label);
    flex: 0 0 auto;
    width: 42px;
    font-size: 12px;
    color: var(--text-3);
  }

  .account-row__remark {
    white-space: normal;
  }

  .account-row__ops {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .panel-head__action {
    width: 100%;
  }
}

/* ---------- 分段控件（导入类型 / 数据分栏） ---------- */
.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: #f2f3f5;
  border-radius: 10px;
}

.segmented__item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 0 6px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.segmented__item.is-active {
  color: var(--primary);
  font-weight: 600;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 34, 67, 0.09);
}

.segmented--tabs {
  margin-bottom: 12px;
}

.segmented--tabs .segmented__item {
  min-height: 40px;
}

/* 搜索 + 月份筛选 + 重置，同一行 */
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.filter-row .input {
  flex: 1 1 0;
  min-width: 0;
}

/* 文字按钮（非实心） */
.text-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 2px;
  font-size: 13px;
  font-family: inherit;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.text-btn:active {
  opacity: 0.6;
}

.input--sm {
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

.list-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

/* 记录卡片：上下两行结构 */
.admin-record {
  padding: 14px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.admin-record__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.admin-record__plate {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
}

.admin-record__amount {
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

.admin-record__sub {
  display: flex;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
}

.admin-record__sub > span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.admin-record__sub > span + span::before {
  content: "";
  flex: 0 0 auto;
  width: 1px;
  height: 10px;
  margin: 0 7px;
  background: #dfe3e8;
}

/* 订单号优先级最低：空间不足时省略 */
.admin-record__sub > .is-order {
  min-width: 0;
  overflow: hidden;
}

.admin-record__sub > .is-order .is-order__text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-tip {
  text-align: center;
  font-size: 12px;
  color: #999;
  padding: 14px 0 4px;
}

.list-more {
  margin-top: 12px;
}

/* 底部统计 */
.app-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  max-width: 600px;
  margin: 4px auto 0;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: #999;
}

/* 拖拽态 */
.is-dragover {
  outline: 2px dashed var(--primary);
  outline-offset: -6px;
  background: var(--primary-soft);
}

/* ---------- 登录页 ---------- */
.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 50px);
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  margin-bottom: 0;
  padding: 28px 20px 24px;
}

.login-brand {
  margin-bottom: 24px;
  text-align: center;
}

.login-brand__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.login-brand__sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-3);
}

.login-card .field-label {
  margin-left: 2px;
}

.login-card .input {
  margin-bottom: 16px;
}

.login-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: var(--radius-sm);
}

/* 仍在使用默认账号时的提醒 */
.login-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
}

/* ---------- 小屏微调 ---------- */
@media (max-width: 360px) {
  .plate-item__plate { font-size: 16px; letter-spacing: 1px; }
  .sheet__plate { font-size: 18px; letter-spacing: 1px; }
  .month-cell { height: 44px; font-size: 14px; }
}
