/* ============================================================
   就是玩 · 反馈管理台  —  Calm Operational Console
   ============================================================ */

:root {
  /* 品牌色（与 APP 湖水青蓝一致） */
  --brand: #0EA5A0;
  --brand-dark: #088A85;
  --brand-light: #3DBDAD;
  --brand-soft: rgba(14, 165, 160, 0.10);

  /* 状态色 */
  --pending: #F59E0B;
  --processing: #3B82F6;
  --resolved: #10B981;
  --closed: #94A3B8;
  --danger: #EF4444;

  /* 浅色主题 */
  --bg: #F4F6F7;
  --bg-elev: #FFFFFF;
  --panel: #FFFFFF;
  --panel-2: #FAFBFC;
  --border: #E6EAEC;
  --border-strong: #D6DCE0;
  --text: #16202B;
  --text-2: #5B6770;
  --text-3: #94A0A8;
  --hover: #F1F5F4;
  --row-hover: #F7FAFA;
  --shadow-sm: 0 1px 2px rgba(16, 32, 43, 0.04), 0 1px 3px rgba(16, 32, 43, 0.06);
  --shadow-md: 0 4px 16px rgba(16, 32, 43, 0.08);
  --shadow-lg: 0 12px 40px rgba(16, 32, 43, 0.14);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0E1419;
  --bg-elev: #161D24;
  --panel: #161D24;
  --panel-2: #1B232C;
  --border: #25303A;
  --border-strong: #324050;
  --text: #ECF1F5;
  --text-2: #9BA8B4;
  --text-3: #66757F;
  --hover: #1B232C;
  --row-hover: #1A2129;
  --brand-soft: rgba(14, 165, 160, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}
.muted { color: var(--text-3); }
[hidden] { display: none !important; }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: all .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 8px rgba(14, 165, 160, 0.28);
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost {
  background: transparent; color: var(--text-2); border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-block { width: 100%; height: 42px; font-size: 15px; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: var(--text-2);
  cursor: pointer; transition: all .15s ease;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }

/* ==================== 登录 ==================== */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(14,165,160,.14), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(59,189,173,.10), transparent 55%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 384px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px 36px 32px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 8px 20px rgba(14,165,160,.4);
}
.login-title { text-align: center; font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.login-sub { text-align: center; color: var(--text-3); font-size: 13px; margin: 0 0 28px; }
.login-form .field { margin-bottom: 16px; }
.login-form label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.login-form input {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--panel-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.login-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.login-form .btn { margin-top: 8px; }
.login-hint { min-height: 18px; margin: 12px 0 0; text-align: center; font-size: 12.5px; color: var(--danger); }
.login-foot { margin-top: 28px; color: var(--text-3); font-size: 12px; letter-spacing: .5px; }

/* ==================== 顶栏 ==================== */
.app { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 17px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 4px 12px rgba(14,165,160,.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 15px; }
.brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: .3px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.admin-name { font-size: 13px; color: var(--text-2); margin-right: 4px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ==================== 主区 ==================== */
.main { max-width: 1240px; margin: 0 auto; padding: 24px; }

/* 统计卡 */
.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px;
}
.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.stat-icon-teal { background: linear-gradient(135deg, #0EA5A0, #3DBDAD); }
.stat-icon-amber { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.stat-icon-blue { background: linear-gradient(135deg, #3B82F6, #60A5FA); }
.stat-icon-green { background: linear-gradient(135deg, #10B981, #34D399); }
.stat-icon-purple { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-3); }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.trend-bars { display: flex; align-items: flex-end; gap: 3px; height: 22px; margin-top: 4px; }
.trend-bars .bar {
  flex: 1; min-width: 3px; border-radius: 2px 2px 0 0;
  background: var(--brand-soft); border-bottom: 2px solid var(--brand);
  transition: height .3s ease;
}

/* 面板 */
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* 筛选栏 */
.filter-bar { display: flex; align-items: flex-end; gap: 14px; padding: 16px; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group label { font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.filter-group select, .search-input input {
  height: 36px; padding: 0 12px; background: var(--panel-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit; font-size: 13.5px;
}
.filter-group select { min-width: 120px; cursor: pointer; }
.filter-group select:focus, .search-input input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.filter-search { flex: 1; min-width: 240px; }
.search-input { position: relative; display: flex; align-items: center; }
.search-input svg { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.search-input input { width: 100%; padding-left: 34px; }
.filter-actions { display: flex; gap: 8px; }

/* 列表 */
.list-panel { margin-top: 16px; }
.list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.list-head h2 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.list-count {
  font-size: 12px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); padding: 2px 8px; border-radius: 20px;
}
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead th {
  text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 600;
  color: var(--text-3); background: var(--panel-2); border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0;
}
.data-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr { transition: background-color .12s; cursor: pointer; }
.data-table tbody tr:hover { background: var(--row-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }
.cell-id { font-family: var(--mono); color: var(--text-3); font-size: 12.5px; }
.cell-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--brand-soft);
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.user-sub { font-size: 11.5px; color: var(--text-3); }
.cell-content {
  max-width: 360px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.45;
}
.has-img-dot {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 6px;
  font-size: 11px; color: var(--brand); font-weight: 600;
}
.cell-contact { color: var(--text-2); font-size: 12.5px; }
.cell-time { color: var(--text-3); font-size: 12px; white-space: nowrap; }

/* 徽标 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-cat { color: var(--brand); background: var(--brand-soft); }
.tag-cat::before { display: none; }
.tag-pending { color: var(--pending); background: rgba(245,158,11,.12); }
.tag-processing { color: var(--processing); background: rgba(59,130,246,.12); }
.tag-resolved { color: var(--resolved); background: rgba(16,185,129,.12); }
.tag-closed { color: var(--closed); background: rgba(148,163,184,.14); }
.tag-cat.bug { color: #EF4444; background: rgba(239,68,68,.10); }
.tag-cat.feature { color: #0EA5A0; background: rgba(14,165,160,.10); }
.tag-cat.experience { color: #8B5CF6; background: rgba(139,92,246,.10); }
.tag-cat.other { color: #64748B; background: rgba(100,116,139,.10); }

.row-action {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.row-action:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* 状态层（加载/空/错误） */
.state-layer { padding: 56px 20px; text-align: center; color: var(--text-3); }
.state-layer svg { color: var(--text-3); opacity: .5; margin-bottom: 12px; }
.state-layer .state-title { font-size: 14px; color: var(--text-2); font-weight: 600; }
.state-layer .state-sub { font-size: 12.5px; margin-top: 4px; }
.skeleton-row { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 14px; align-items: center; }
.skeleton { background: var(--hover); border-radius: 6px; height: 14px; }
.sk-pulse { animation: skpulse 1.4s ease-in-out infinite; }
@keyframes skpulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; flex-wrap: wrap; gap: 10px; }
.page-info { font-size: 12.5px; color: var(--text-3); }
.page-nav { display: flex; align-items: center; gap: 6px; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-2);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.page-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ==================== 详情抽屉 ==================== */
.drawer-mask {
  position: fixed; inset: 0; z-index: 50; background: rgba(15,23,30,.45);
  backdrop-filter: blur(2px); animation: fade .2s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 51;
  width: 480px; max-width: 92vw; background: var(--panel);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.61,.36,1);
}
.drawer.open { transform: translateX(0); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border); flex: none;
}
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-section { margin-bottom: 22px; }
.drawer-section h4 {
  margin: 0 0 10px; font-size: 12px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .6px;
}
.user-block { display: flex; align-items: center; gap: 12px; }
.user-block .avatar { width: 44px; height: 44px; }
.user-block .user-name { font-size: 15px; max-width: none; }
.kv { display: flex; font-size: 13px; padding: 6px 0; }
.kv .k { width: 84px; color: var(--text-3); flex: none; }
.kv .v { color: var(--text); word-break: break-all; }
.content-box {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; font-size: 14px; line-height: 1.65; color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.img-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.img-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm);
  cursor: pointer; border: 1px solid var(--border); background: var(--panel-2);
  transition: transform .15s, box-shadow .15s;
}
.img-grid img:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.field-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 7px; text-transform: uppercase; letter-spacing: .6px; }
.status-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.status-pill {
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--panel-2); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.status-pill:hover { border-color: var(--brand); }
.status-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 2px 8px rgba(14,165,160,.3); }
textarea.input-area {
  width: 100%; min-height: 90px; padding: 12px; resize: vertical;
  background: var(--panel-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit; font-size: 13.5px; line-height: 1.6;
}
textarea.input-area:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.drawer-actions { display: flex; gap: 10px; margin-top: 18px; }
.reply-block {
  background: var(--brand-soft); border: 1px solid rgba(14,165,160,.2); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; line-height: 1.6; color: var(--text);
}
.reply-block .reply-tag { font-size: 11px; font-weight: 700; color: var(--brand); display: block; margin-bottom: 4px; }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center; padding: 32px; animation: fade .2s ease;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute; top: 18px; right: 24px; width: 40px; height: 40px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff;
  font-size: 24px; cursor: pointer; line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,.28); }

/* Toast */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 11px 18px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); font-size: 13.5px; font-weight: 500; color: var(--text);
  animation: toastin .25s ease;
}
.toast.ok { border-left: 3px solid var(--resolved); }
.toast.err { border-left: 3px solid var(--danger); }
@keyframes toastin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== 响应式 ==================== */
@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(5) { grid-column: span 2; }
}
@media (max-width: 640px) {
  .main { padding: 14px; }
  .topbar { padding: 0 14px; }
  .brand-sub { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-value { font-size: 22px; }
  .filter-bar { gap: 10px; }
  .filter-search { min-width: 100%; }
  .drawer { width: 100vw; max-width: 100vw; }
  .img-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-name { display: none; }
}

/* ==================== Tab 切换 ==================== */
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 8px 18px;
  font-size: 14px;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all .15s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}
.tab-view[hidden] { display: none; }

/* 资质审核 Tab 内子切换（商家认证 / 地点认领） */
.sub-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.sub-tab {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.sub-tab:hover { color: var(--text); }
.sub-tab.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  font-weight: 600;
}
#audit-merchant[hidden], #audit-claim[hidden] { display: none; }

/* 审核状态标签（商家认证/认领：pending 复用 feedback，补 approved/rejected） */
.tag-approved { color: var(--brand); background: var(--brand-soft); }
.tag-rejected { color: var(--danger); background: rgba(239, 68, 68, 0.12); }

/* ============================================================
   安全配置
   ============================================================ */
.sec-panel .list-head { align-items: center; }
.sec-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: wrap; }
.sec-title h2 { margin: 0; }
.sec-note { font-size: 12.5px; color: var(--text-3); font-weight: 400; }

.sec-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
}
.sec-search { position: relative; flex: 1; max-width: 340px; }
.sec-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.sec-search input {
  width: 100%; height: 34px; padding: 0 12px 0 34px;
  background: var(--panel-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit; font-size: 13px;
}
.sec-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.sec-count { margin-left: auto; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 18px; align-items: start; }
.sec-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; overflow: hidden;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sec-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: transparent; transition: background .15s;
}
.sec-card.is-dirty { background: var(--brand-soft); border-color: rgba(14, 165, 160, .4); }
.sec-card.is-dirty::before { background: var(--brand); }
.sec-card.is-hidden { display: none; }

.sec-card-head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.sec-card-title {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.45; word-break: break-word;
}
.sec-dirty-badge {
  flex: none; display: none; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--brand);
  background: rgba(14, 165, 160, .16); padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.sec-card.is-dirty .sec-dirty-badge { display: inline-flex; }

.sec-card-key {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
  margin-top: 5px; word-break: break-all;
}
.sec-card-input { text-align: center; margin: 16px 0 6px; }
.sec-input-wrap { display: inline-flex; align-items: center; gap: 10px; }
.sec-input-wrap input {
  width: 150px; height: 50px; text-align: center;
  font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text); background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0 12px; transition: border-color .15s, box-shadow .15s;
}
.sec-input-wrap input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.sec-input-wrap input::-webkit-outer-spin-button,
.sec-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sec-input-wrap input { -moz-appearance: textfield; }
.sec-unit { font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }

.sec-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border);
  font-size: 11.5px; color: var(--text-3);
}
.sec-card-time { white-space: nowrap; }
.sec-revert {
  display: none; align-items: center; gap: 4px;
  border: none; background: transparent; cursor: pointer; color: var(--text-2);
  font-family: inherit; font-size: 11.5px; font-weight: 600;
  padding: 4px 8px; border-radius: 6px; transition: all .15s;
}
.sec-revert:hover { color: var(--brand); background: var(--brand-soft); }
.sec-card.is-dirty .sec-revert { display: inline-flex; }

/* 底部吸附保存条 */
.sec-savebar {
  position: sticky; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 14px 20px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); transition: box-shadow .2s, border-color .2s;
}
.sec-savebar.is-dirty { border-color: rgba(14, 165, 160, .45); box-shadow: 0 10px 30px rgba(14, 165, 160, .18); }
.sec-savebar-info { font-size: 13px; color: var(--text-2); }
.sec-savebar-info b { color: var(--brand); font-size: 14px; font-variant-numeric: tabular-nums; }
.sec-savebar-actions { display: flex; gap: 8px; flex: none; }

/* Tab 窄屏防截断：允许横向滚动 */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; white-space: nowrap; }

/* 行内操作按钮组（工作人员等，防挤压、可换行） */
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 860px) {
  .sec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sec-grid { padding: 14px; gap: 10px; }
  .sec-toolbar { padding: 10px 14px; }
  .sec-savebar { flex-direction: column; align-items: stretch; }
  .sec-savebar-actions { justify-content: flex-end; }
  .sec-savebar-actions .btn { flex: 1; }
}

/* ============================================================
   居中模态（处罚表单等）—— 与抽屉同色系，层级在抽屉之上灯箱之下
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; z-index: 60; background: rgba(15,23,30,.5);
  backdrop-filter: blur(2px); animation: fade .2s ease;
}
.modal {
  position: fixed; top: 50%; left: 50%; z-index: 61;
  transform: translate(-50%, -48%) scale(.96);
  width: 520px; max-width: 92vw; max-height: 88vh;
  background: var(--panel); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: transform .22s cubic-bezier(.22,.61,.36,1), opacity .18s;
}
.modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1; pointer-events: auto;
}
.modal[data-size="lg"] { width: 720px; }
.modal[data-size="sm"] { width: 380px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border); flex: none;
}
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.modal-body { flex: 1; overflow-y: auto; padding: 22px; }

/* 处罚表单字段 */
.pun-field { margin-bottom: 14px; }
.pun-input {
  width: 100%; height: 38px; padding: 0 12px;
  background: var(--panel-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: inherit; font-size: 13.5px;
}
.pun-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.pun-input { height: auto; min-height: 72px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.pun-check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none;
}
.pun-check input { width: 16px; height: 16px; accent-color: var(--brand); }
.pun-target {
  background: var(--brand-soft); border: 1px solid rgba(14,165,160,.22);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px;
  color: var(--text); margin-bottom: 14px;
}
.pun-target b { color: var(--brand); }

/* ============================================================
   工作台 —— 卡片栅格深链到各 Tab
   ============================================================ */
.wb-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 18px;
}
.wb-card {
  position: relative; padding: 18px 20px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; gap: 4px; text-align: left;
}
.wb-card:hover {
  border-color: var(--brand); background: var(--brand-soft);
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.wb-card-label { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.wb-card-value {
  font-size: 30px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.wb-card-sub { font-size: 11.5px; color: var(--text-3); }
.wb-card-arrow {
  position: absolute; top: 14px; right: 16px; color: var(--text-3);
  font-size: 18px; transition: color .15s;
}
.wb-card:hover .wb-card-arrow { color: var(--brand); }
.wb-card.is-zero { opacity: .65; }
.wb-card.is-zero .wb-card-value { color: var(--text-3); }

@media (max-width: 860px) { .wb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .wb-grid { grid-template-columns: 1fr; } }

/* ============================================================
   POI 治理 —— 通用输入框 + 治理表单
   ============================================================ */
.pgm-input {
  height: 36px; padding: 0 12px; background: var(--panel-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit; font-size: 13.5px; min-width: 180px;
}
.pgm-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pgm-poi-card {
  margin: 16px; padding: 18px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.pgm-poi-card h4 {
  margin: 0 0 12px; font-size: 12px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .6px;
}
.pgm-section { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pgm-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* 申诉证据/详情等可复用 */
.tag-info { color: var(--processing); background: rgba(59,130,246,.12); }
.tag-warn { color: var(--pending); background: rgba(245,158,11,.12); }
.tag-banned { color: var(--danger); background: rgba(239,68,68,.12); }
