/* 夜市巡查系统 - 管理后台样式 */
/* 访客只读横幅 */
.zbc-ro-banner{position:fixed;top:0;left:50%;transform:translateX(-50%);z-index:9999;background:#4f46e5;color:#fff;font-size:13px;padding:6px 18px;border-radius:0 0 12px 12px;box-shadow:0 2px 8px rgba(0,0,0,.15);pointer-events:none}
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: #1f2937; color: #cbd5e1;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0;
}
.logo { padding: 20px 18px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #1f2937; }
.nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 3px; }
.nav::-webkit-scrollbar-track { background: transparent; }

/* 设置页二级分类 Tab */
.set-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.set-tab { padding: 8px 16px; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text2); cursor: pointer; transition: all .15s; }
.set-tab:hover { border-color: var(--primary); color: var(--primary); }
.set-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.nav-item { padding: 12px 20px; cursor: pointer; font-size: 14px; transition: background .15s; }
.nav-item:hover { background: #1f2937; }
.nav-item.active { background: var(--primary); color: #fff; }
.sidebar-foot { padding: 16px; border-top: 1px solid #1f2937; }

.main { flex: 1; margin-left: 220px; }
.topbar {
  background: #fff; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-date { color: var(--text2); font-size: 13px; }
.content { padding: 20px 24px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: flex; flex-direction: column;
}
.stat-card .num { font-size: 28px; font-weight: 700; margin: 4px 0; }
.stat-card .label { font-size: 13px; color: var(--text2); }
.stat-card .num.blue { color: var(--primary); }
.stat-card .num.green { color: var(--success); }
.stat-card .num.orange { color: var(--warning); }
.stat-card .num.red { color: var(--danger); }
.stat-card.clickable { cursor: pointer; transition: transform .12s; }
.stat-card.clickable:hover { transform: translateY(-2px); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; }

.alert-row {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px;
  margin-bottom: 8px; font-size: 13px; background: #f9fafb; cursor: pointer;
}
.alert-row:hover { background: #f3f4f6; }
.alert-row.warn { border-left: 4px solid var(--warning); }
.alert-row.danger { border-left: 4px solid var(--danger); }
.alert-row.ok { border-left: 4px solid var(--success); }
.alert-row .txt { flex: 1; }

.dash-empty { color: var(--text2); font-size: 13px; padding: 8px 0; }

/* 照片列表 */
.photo-cell { display: grid; grid-template-columns: repeat(2, 58px); gap: 4px 8px; align-items: start; }
.photo-cell .photo-item { text-align: center; }
.photo-cell .photo-empty { width: 52px; height: 52px; border: 1px dashed #d1d5db; border-radius: 6px; color: #c0c6d0; font-size: 11px; display: flex; align-items: center; justify-content: center; background: #f8fafc; }
.photo-cell .photo-label { font-size: 10px; color: #6b7280; margin-top: 2px; line-height: 1.3; white-space: nowrap; }
.photo-cell .photo-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; cursor: pointer; }

/* 上传控件 */
.upload-box {
  border: 1.5px dashed var(--border); border-radius: 8px; padding: 10px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fafbfc;
}
.upload-box input[type=file] { font-size: 12px; }
.upload-box .photo-thumb { width: 56px; height: 56px; }

/* 统计 */
.stats-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stats-sum-card { background: #f8fafc; border-radius: 10px; padding: 14px; }
.stats-sum-card .name { font-size: 13px; color: var(--text2); }
.stats-sum-card .val { font-size: 20px; font-weight: 700; margin-top: 4px; }
.stats-sum-card .val.rate { color: var(--success); }

.chart-box { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; overflow-x: auto; }
.chart-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

/* SVG 图表 */
.chart-svg { display: block; min-width: 640px; }
.bar { fill: var(--primary); }
.bar-abnormal { fill: #dc2626; }
.bar-absent { fill: #e5e7eb; }
.axis-line { stroke: #d1d5db; stroke-width: 1; }
.grid-line { stroke: #f0f2f5; stroke-width: 1; }
.axis-text { font-size: 11px; fill: #6b7280; }

/* 弹窗内表格 */
.modal table { font-size: 13px; }
.modal th, .modal td { padding: 7px 9px; }

/* 状态行 */
tr.row-expired td { background: #fef2f2 !important; }
tr.row-soon td { background: #fffbeb !important; }

/* 证照照片拖拽上传区 */
.drop-zone {
  border: 2px dashed #d1d5db; border-radius: 10px; padding: 14px 10px;
  text-align: center; cursor: pointer; background: #fafbfc;
  transition: border-color .15s, background .15s; min-height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.drop-zone:hover { border-color: #93c5fd; }
.drop-zone.dragover { border-color: var(--primary); background: var(--soft-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.drop-zone .drop-hint { font-size: 13px; color: #374151; line-height: 1.5; }
.drop-zone .photo-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; }


/* 仪表盘：各夜市区域摊位数量 */
.area-stall-list { display:flex; flex-wrap:wrap; gap:10px; }
.area-stall-item { flex:1 1 220px; display:flex; justify-content:space-between; align-items:center;
  background:#f8fafc; border:1px solid #e5e7eb; border-radius:10px; padding:12px 14px; }
.area-stall-item:hover { border-color:var(--primary); background:var(--soft-bg); }
.area-stall-name { font-weight:600; color:#1e293b; }
.area-stall-num { color:var(--primary); font-weight:600; font-size:14px; }
.tag-temp { background:#fff7ed; color:#f97316; border:1px solid #fdba74; border-radius:4px;
  font-size:10px; padding:1px 5px; margin-left:4px; vertical-align:middle; }
/* ================= 老板驾驶舱 ================= */
#panel-cockpit .stat-cards { grid-template-columns: repeat(5, 1fr); }
.stat-card .num.purple { color: #8b5cf6; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #e2e8f0; }
.att-row:last-child { border-bottom: none; }
.att-label { width: 90px; font-size: 13px; color: var(--text2); flex-shrink: 0; }
.att-bar { flex: 1; height: 14px; background: #f1f5f9; border-radius: 7px; overflow: hidden; }
.att-bar div { height: 100%; border-radius: 7px; transition: width .4s; }
.att-num { width: 110px; text-align: right; font-size: 13px; font-weight: 600; color: var(--text1); flex-shrink: 0; }
.lease-sum { display: flex; gap: 8px; margin-bottom: 10px; }
.lease-list { max-height: 320px; overflow-y: auto; }
#cpAreas .data-table { width: 100%; }
.tag-incomplete { background:#f1f5f9; color:#64748b; border:1px solid #cbd5e1; border-radius:4px;
  font-size:10px; padding:1px 5px; font-weight:400; margin-left:4px; }
.tag-todo { background:#fef3c7; color:#b45309; border:1px solid #fcd34d; border-radius:4px;
  font-size:10px; padding:1px 5px; font-weight:400; }
.tag-doing { background:#dbeafe; color:#1d4ed8; border:1px solid #93c5fd; border-radius:4px;
  font-size:10px; padding:1px 5px; font-weight:400; }
.tag-done { background:#dcfce7; color:#15803d; border:1px solid #86efac; border-radius:4px;
  font-size:10px; padding:1px 5px; font-weight:400; }
.btn-danger { background:#fee2e2; color:#b91c1c; border:1px solid #fecaca; }
.btn-danger:hover { background:#fecaca; color:#991b1b; }

/* 下钻链接（驾驶舱区域数字点击跳转） */
.drill-link { color: var(--primary); text-decoration: underline; cursor: pointer; font-weight: 600; }
.drill-link:hover { color: var(--primary-dark); }

/* 筛选/操作栏固定悬浮（滚动列表时始终可见，下拉选项不被遮挡） */
.sticky-bar {
  position: sticky; top: 0; z-index: 40;
  background: #fff;
  margin: -18px -18px 12px;
  padding: 14px 18px;
  box-shadow: 0 2px 10px rgba(15,23,42,.10);
  border-bottom: 1px solid #eef2f7;
}


/* 评分表：固定列布局，表头与数据单元格强制同宽对齐 */
#scoreTable { table-layout: fixed; width: 100%; }
#scoreTable th, #scoreTable td { text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#scoreTable th:nth-child(1), #scoreTable td:nth-child(1) { width: 9%; }
#scoreTable th:nth-child(2), #scoreTable td:nth-child(2) { width: 9%; }
#scoreTable th:nth-child(3), #scoreTable td:nth-child(3) { width: 12%; }
#scoreTable th:nth-child(11), #scoreTable td:nth-child(11) { width: 8%; }
#scoreTable th:nth-child(12), #scoreTable td:nth-child(12) { width: 17%; }

/* ===== 数据驾驶舱 BI 大屏（深色卡片，参考智慧众摆夜市风格） ===== */
.bi-wrap { display: block; }
#biBody { display: flex; flex-wrap: wrap; gap: 14px; width: 100%; }
.bi-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; }
.bi-head h2 { margin: 0; font-size: 20px; color: var(--text); }
.bi-head .scope { flex: 1; }
.bi-head .upd { font-size: 12px; color: var(--text2); }
.bi-head select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; }
.bi-kpi { flex: 0 0 calc(25% - 10.5px); box-sizing: border-box; background: linear-gradient(135deg, #0f172a, #1e293b); border: 1px solid #334155; border-radius: 12px; padding: 16px 20px; color: #e2e8f0; }
.bi-kpi .k { font-size: 12px; color: #94a3b8; letter-spacing: 1px; }
.bi-kpi .v { font-size: 30px; font-weight: 700; margin-top: 6px; font-family: Consolas, 'Microsoft YaHei', monospace; }
.bi-kpi .s { font-size: 12px; color: #64748b; margin-top: 4px; }
.bi-kpi .v.cyan { color: #22d3ee; } .bi-kpi .v.green { color: #34d399; } .bi-kpi .v.amber { color: #fbbf24; } .bi-kpi .v.rose { color: #fb7185; }
.bi-card { flex: 0 0 calc(33.333% - 9.34px); box-sizing: border-box; background: linear-gradient(135deg, #0f172a, #16233b); border: 1px solid #2a3a55; border-radius: 12px; padding: 16px; color: #e2e8f0; }
.bi-card[data-module="note"], .bi-card[data-module="top"] { flex: 0 0 calc(50% - 7px); }
.bi-card .h { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: #cbd5e1; display: flex; justify-content: space-between; align-items: center; }
.bi-card .h small { font-size: 11px; color: #64748b; font-weight: 400; }
.bi-card .h .tab { display: flex; gap: 6px; }
.bi-card .h .tab span { font-size: 11px; color: #94a3b8; padding: 2px 10px; border-radius: 12px; cursor: pointer; border: 1px solid #334155; }
.bi-card .h .tab span.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.bi-bar-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.bi-bar-row .nm { width: 64px; font-size: 12px; color: #94a3b8; text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-bar-row .track { flex: 1; height: 12px; background: #1e293b; border-radius: 6px; overflow: hidden; }
.bi-bar-row .fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--grad-end)); }
.bi-bar-row .vl { width: 84px; font-size: 11px; color: #cbd5e1; font-family: Consolas, monospace; text-align: right; }
.bi-rank { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #263449; }
.bi-rank:last-child { border-bottom: none; }
.bi-rank .no { width: 22px; height: 22px; border-radius: 50%; background: #1e3a5f; color: #93c5fd; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bi-rank .no.top { background: var(--primary); color: #fff; }
.bi-rank .nm { flex: 1; font-size: 13px; color: #e2e8f0; }
.bi-rank .nm small { display: block; font-size: 11px; color: #64748b; margin-top: 2px; }
.bi-rank .vl { font-size: 12px; color: #94a3b8; font-family: Consolas, monospace; }
.bi-empty { color: #64748b; font-size: 12px; padding: 14px 0; }
@media (max-width: 1200px) { .bi-kpi { flex: 0 0 calc(50% - 7px); } .bi-card { flex: 0 0 100% !important; } }
/* 拖拽交换 */
.bi-kpi[draggable="true"], .bi-card[draggable="true"] { cursor: grab; }
.bi-kpi[draggable="true"]:active, .bi-card[draggable="true"]:active { cursor: grabbing; }
.bi-drag-over { outline: 2px dashed var(--primary) !important; outline-offset: 2px; }

/* 缴费管理 Tab */
.pay-tab{opacity:.55}
.pay-tab.on{opacity:1;background:#3b82f6;color:#fff;border-color:#3b82f6}
