/* 逛摊日记 · 管理后台样式（沿用 UI 原型设计变量：红火市集） */
:root {
  --red-50: #FFF3F1; --red-100: #FFE6E2; --red-200: #FFC9C2; --red-300: #FFA79D;
  --red-400: #F46257; --red-500: #E6231D; --red-600: #C91C17; --red-700: #A41611;
  --ink-900: #1D1816; --ink-800: #2E2723; --ink-700: #4A413B; --ink-600: #635950;
  --ink-500: #7E736B; --ink-400: #A59A92; --ink-300: #C9BFB7; --ink-200: #E4DCD5; --ink-100: #F0EAE4;
  --bg: #FBF8F5; --bg-deep: #F4EFEA; --surface: #FFFFFF; --surface-2: #F7F3EF; --surface-3: #EFE9E2;
  --line: #EBE4DD; --line-strong: #DDD3CA;
  --success: #2E9E6B; --success-bg: #E7F5EE; --warning: #E2912B; --warning-bg: #FFF3DF;
  --info: #3C7FC0; --info-bg: #E9F2FA; --danger: #D9362C; --danger-bg: #FDECEA;
  --ad-tag: #8E857E; --ad-tag-bg: #F0EBE6;
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(60,38,28,.05), 0 1px 3px rgba(60,38,28,.04);
  --sh-2: 0 4px 14px rgba(60,38,28,.07); --sh-3: 0 12px 30px rgba(60,38,28,.12);
  --sh-red: 0 8px 20px rgba(230,35,29,.22);
  --ease: cubic-bezier(.22,1,.36,1);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink-900); font-size: 13px; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--red-500); text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 4px; }
.ico { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; }
.ico svg { width: 100%; height: 100%; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(900px 500px at 20% 0%, rgba(230,35,29,.10), transparent 60%), radial-gradient(700px 400px at 90% 100%, rgba(230,35,29,.07), transparent 60%), var(--bg-deep); }
.login-card { width: 392px; background: var(--surface); border-radius: 22px; padding: 30px 30px 22px; box-shadow: var(--sh-3); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.logo { width: 42px; height: 42px; border-radius: 12px; background: var(--red-500); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 19px; box-shadow: var(--sh-red); flex-shrink: 0; }
.login-brand h1 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.login-brand p { margin: 3px 0 0; font-size: 10.5px; color: var(--ink-500); letter-spacing: .4px; }
.login-card label { display: block; font-size: 12px; color: var(--ink-600); margin: 14px 0 6px; font-weight: 600; }
.login-card input { width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2); outline: none; transition: all .2s; }
.login-card input:focus { border-color: var(--red-400); background: #fff; box-shadow: 0 0 0 3px var(--red-50); }
.login-tip { font-size: 11px; color: var(--ink-400); margin: 12px 0 0; text-align: center; }
.login-demo { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.login-demo span { font-size: 11px; color: var(--ink-400); }
.login-demo button { font-size: 11px; padding: 4px 9px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-600); }
.login-demo button:hover { border-color: var(--red-300); color: var(--red-600); }
.login-foot { font-size: 11.5px; color: var(--ink-400); }

/* ---------- 布局 ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }
.side { width: 222px; flex-shrink: 0; background: #1B1715; color: #CFC6BF; display: flex; flex-direction: column; }
.side-brand { height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.side-brand .logo { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; box-shadow: none; }
.side-brand b { color: #fff; font-size: 14px; display: block; line-height: 1.2; }
.side-brand small { font-size: 9px; color: #8C827A; letter-spacing: .5px; }
.menu { flex: 1; overflow-y: auto; padding: 8px 0 16px; }
.menu::-webkit-scrollbar { width: 0; }
.menu-group-label { padding: 13px 18px 5px; font-size: 10px; color: #6E645E; letter-spacing: 1px; font-weight: 700; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 18px; font-size: 12.5px; font-weight: 500; cursor: pointer;
  border-left: 2px solid transparent; transition: all .18s; }
.menu-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.menu-item.active { background: linear-gradient(90deg, rgba(230,35,29,.24), transparent); color: #fff; border-left-color: var(--red-500); }
.menu-item.active .ico { color: var(--red-400); }
.menu-item .ico { width: 16px; height: 16px; opacity: .8; }
.menu-item .badge { margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red-500); color: #fff;
  font-size: 10px; display: grid; place-items: center; padding: 0 5px; }
.menu-parent { display: flex; align-items: center; gap: 10px; padding: 9px 18px; font-size: 12.5px; font-weight: 500; cursor: pointer; color: #CFC6BF; }
.menu-parent:hover { background: rgba(255,255,255,.05); color: #fff; }
.menu-parent .arrow { margin-left: auto; transition: transform .18s; opacity: .6; width: 12px; height: 12px; }
.menu-parent.open .arrow { transform: rotate(90deg); }
.menu-sub { overflow: hidden; max-height: 0; transition: max-height .25s var(--ease); }
.menu-sub.open { max-height: 420px; }
.menu-sub button { display: block; width: 100%; text-align: left; padding: 7px 18px 7px 46px; font-size: 12px; color: #A79D96; position: relative; }
.menu-sub button::before { content: ''; position: absolute; left: 32px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; transform: translateY(-50%); }
.menu-sub button:hover { color: #fff; background: rgba(255,255,255,.04); }
.menu-sub button.active { color: #fff; background: rgba(230,35,29,.16); }
.side-foot { padding: 12px 18px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 11px; }
.sf-row { display: flex; justify-content: space-between; padding: 3px 0; color: #8C827A; }
.sf-row b { color: #CFC6BF; font-weight: 600; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 22px; gap: 14px; }
.crumb { font-size: 12px; color: var(--ink-500); }
.crumb b { color: var(--ink-900); font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-600); position: relative; }
.top-icon:hover { background: var(--surface-2); }
.top-icon .dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--red-500); border: 1.5px solid #fff; }
.role-chip { padding: 6px 11px; border-radius: var(--r-full); background: var(--red-50); color: var(--red-600); font-size: 11.5px; font-weight: 700; }
.op-menu { position: relative; }
.op-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: var(--r-full); }
.op-btn:hover { background: var(--surface-2); }
.avatar { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--red-400), var(--red-600)); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.op-drop { position: absolute; right: 0; top: 44px; width: 140px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); padding: 6px; z-index: 30; }
.op-drop button { display: block; width: 100%; text-align: left; padding: 9px 11px; border-radius: 8px; font-size: 12.5px; }
.op-drop button:hover { background: var(--surface-2); }
.content { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }

/* ---------- 通用组件 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.page-head p { margin: 4px 0 0; font-size: 12px; color: var(--ink-500); }
.head-actions { display: flex; gap: 8px; align-items: center; }
.btn { padding: 8px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: all .18s; white-space: nowrap; }
.btn.primary { background: var(--red-500); color: #fff; box-shadow: var(--sh-red); }
.btn.primary:hover { background: var(--red-600); }
.btn.line { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-700); }
.btn.line:hover { border-color: var(--red-300); color: var(--red-600); }
.btn.ghost { background: var(--surface-2); color: var(--ink-700); }
.btn.danger { background: var(--danger-bg); color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 11.5px; border-radius: 8px; }
.btn.block { width: 100%; justify-content: center; height: 42px; margin-top: 20px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--sh-1); border: 1px solid transparent; }
.panel { background: var(--surface); border-radius: var(--r-md); padding: 16px; box-shadow: var(--sh-1); margin-bottom: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.panel-head .sub { font-size: 11px; color: var(--ink-400); }
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border-radius: var(--r-md); padding: 14px 15px; box-shadow: var(--sh-1); cursor: pointer; transition: all .22s var(--ease); border: 1px solid transparent; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--red-200); }
.kpi .k-top { display: flex; justify-content: space-between; align-items: center; }
.kpi .k-label { font-size: 11.5px; color: var(--ink-500); }
.kpi .k-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--red-500); background: var(--red-50); }
.kpi .k-num { font-size: 23px; font-weight: 800; letter-spacing: -.8px; margin: 8px 0 2px; }
.kpi .k-sub { font-size: 10.5px; color: var(--ink-400); }
.grid-2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* 表格 */
.table-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.field { height: 34px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; outline: none; font-size: 12px; color: var(--ink-800); }
.field:focus { border-color: var(--red-400); box-shadow: 0 0 0 3px var(--red-50); }
.field.wide { min-width: 210px; }
.tbl-wrap { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--sh-1); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
table.tbl th { background: var(--surface-2); color: var(--ink-500); font-weight: 600; text-align: left; padding: 10px 12px; white-space: nowrap; font-size: 11.5px; }
table.tbl td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: middle; color: var(--ink-800); }
table.tbl tbody tr:hover { background: var(--red-50); }
table.tbl td.actions { white-space: nowrap; }
table.tbl td.actions button { color: var(--red-600); font-size: 11.5px; font-weight: 600; margin-right: 8px; }
table.tbl td.actions button.muted { color: var(--ink-500); }
.tbl-empty { padding: 44px; text-align: center; color: var(--ink-400); font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-500); }
.pager .pbtns { display: flex; gap: 6px; }
.pager button { padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 11.5px; }
.pager button:disabled { opacity: .45; }
.tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.tag.gray { background: var(--surface-3); color: var(--ink-500); }
.tag.red { background: var(--red-50); color: var(--red-600); }
.tag.green { background: var(--success-bg); color: var(--success); }
.tag.orange { background: var(--warning-bg); color: var(--warning); }
.tag.blue { background: var(--info-bg); color: var(--info); }
.tag.dark { background: var(--ad-tag-bg); color: var(--ad-tag); }
.chip { display: inline-flex; padding: 2px 7px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; font-size: 10.5px; color: var(--ink-600); margin: 0 4px 4px 0; }
.cell-main { display: flex; align-items: center; gap: 9px; }
.thumb { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; }
.thumb.lg { width: 68px; height: 68px; border-radius: 10px; }
.muted { color: var(--ink-400); font-size: 11px; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.link { color: var(--red-600); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(29,24,22,.32); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 620px; max-width: 92vw; background: var(--bg); z-index: 41;
  box-shadow: -20px 0 60px rgba(40,25,18,.18); display: flex; flex-direction: column; animation: slideIn .26s var(--ease); }
@keyframes slideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 16px 20px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.drawer-head .close { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-500); }
.drawer-head .close:hover { background: var(--surface-2); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 30px; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: #fff; display: flex; justify-content: flex-end; gap: 8px; }
.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; }
.kv { display: flex; gap: 8px; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.kv span { color: var(--ink-500); flex-shrink: 0; min-width: 78px; }
.kv b { font-weight: 500; color: var(--ink-800); word-break: break-all; }
.sec-title { font-size: 12.5px; font-weight: 700; margin: 18px 0 10px; display: flex; align-items: center; gap: 7px; }
.sec-title::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--red-500); }
.mini-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mini-row { display: flex; gap: 10px; align-items: center; padding: 9px 12px; font-size: 11.5px; background: #fff; }
.mini-row + .mini-row { border-top: 1px solid var(--line); }
.mini-row .grow { flex: 1; min-width: 0; }
.mini-row b { font-weight: 600; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(29,24,22,.36); z-index: 50; display: grid; place-items: center; }
.modal { width: 520px; max-width: 92vw; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--sh-3); }
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 11.5px; color: var(--ink-600); margin-bottom: 5px; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; outline: none; font-size: 12.5px; background: var(--surface-2); }
.form-row textarea { min-height: 76px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--red-400); background: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-hint { font-size: 10.5px; color: var(--ink-400); margin-top: 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* Toast */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 16px; border-radius: 10px; background: #2E2723; color: #fff; font-size: 12.5px; box-shadow: var(--sh-3); animation: toastIn .22s var(--ease); }
.toast.ok { background: #1F6B49; }
.toast.err { background: #A8231D; }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 图表 */
.chart { width: 100%; height: 210px; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--ink-500); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 11.5px; }
.bar-row .bar-label { width: 78px; color: var(--ink-600); flex-shrink: 0; }
.bar-track { flex: 1; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--red-500), var(--red-300)); }
.bar-num { width: 62px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.alert-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; background: var(--danger-bg); margin-bottom: 7px; cursor: pointer; }
.alert-row.warn { background: var(--warning-bg); }
.alert-row .al-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: rgba(255,255,255,.7); color: var(--danger); }
.alert-row.warn .al-ico { color: var(--warning); }
.alert-row .al-body { flex: 1; }
.alert-row .al-body b { display: block; font-size: 12px; }
.alert-row .al-body span { font-size: 10.5px; color: var(--ink-500); }
.rank-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; }
.rank-row + .rank-row { border-top: .5px solid var(--line); }
.rank-row .rn { width: 18px; font-weight: 700; color: var(--ink-400); font-size: 11.5px; }
.rank-row .rn.top { color: var(--red-500); }
.rank-row .rnm { flex: 1; font-size: 12px; }
.rank-row .rnv { font-size: 11.5px; font-weight: 700; }

/* 客服小窗 */
.ticket-win { position: fixed; right: 22px; bottom: 22px; width: 380px; height: 480px; background: #fff; border-radius: 14px;
  box-shadow: var(--sh-3); z-index: 45; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.ticket-win.min { height: 46px; }
.ticket-win.min .tw-body, .ticket-win.min .tw-foot { display: none; }
.tw-head { height: 46px; flex-shrink: 0; background: #1B1715; color: #fff; display: flex; align-items: center; padding: 0 14px; gap: 8px; font-size: 13px; }
.tw-tools { margin-left: auto; display: flex; gap: 6px; }
.tw-tools button { color: #CFC6BF; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; }
.tw-tools button:hover { background: rgba(255,255,255,.1); color: #fff; }
.tw-body { flex: 1; overflow-y: auto; padding: 12px; background: var(--bg); }
.tw-ticket { background: #fff; border-radius: 10px; padding: 11px; margin-bottom: 9px; border: 1px solid var(--line); cursor: pointer; }
.tw-ticket.active { border-color: var(--red-300); box-shadow: 0 0 0 3px var(--red-50); }
.tw-ticket .tt-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-500); margin-bottom: 5px; }
.tw-ticket b { font-size: 12.5px; display: block; margin-bottom: 3px; }
.tw-ticket p { margin: 0; font-size: 11.5px; color: var(--ink-600); line-height: 1.55; }
.tw-msg { display: flex; margin-bottom: 8px; }
.tw-msg .bubble { max-width: 78%; padding: 8px 11px; border-radius: 10px; font-size: 12px; line-height: 1.55; background: #fff; border: 1px solid var(--line); }
.tw-msg.mine { justify-content: flex-end; }
.tw-msg.mine .bubble { background: var(--red-500); color: #fff; border-color: var(--red-500); }
.tw-foot { padding: 9px; border-top: 1px solid var(--line); display: flex; gap: 7px; align-items: flex-end; }
.tw-foot textarea { flex: 1; border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 9px; font-size: 12px; resize: none; outline: none; }
.tw-foot textarea:focus { border-color: var(--red-400); }
.tw-back { font-size: 11.5px; color: var(--red-600); margin-bottom: 8px; cursor: pointer; }

/* 配置表单 */
.cfg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.cfg-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cfg-item label { display: block; font-size: 11.5px; color: var(--ink-600); margin-bottom: 5px; font-weight: 600; }
.cfg-item input { width: 100%; height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 10px; outline: none; font-size: 12px; }
.cfg-item input:focus { border-color: var(--red-400); }
.cfg-item .hint { font-size: 10.5px; color: var(--ink-400); margin-top: 3px; }
.switch { position: relative; width: 40px; height: 22px; border-radius: 11px; background: var(--ink-200); transition: all .2s; flex-shrink: 0; }
.switch.on { background: var(--red-500); }
.switch::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: all .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on::after { left: 20px; }
.slot-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.slot-cell { height: 44px; border-radius: 8px; background: var(--success-bg); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10.5px; color: var(--success); border: 1px solid transparent; cursor: pointer; }
.slot-cell.locked { background: var(--red-50); color: var(--red-600); border-color: var(--red-200); }
.slot-cell b { font-size: 11.5px; }
@media (max-width: 1440px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } .grid-2 { grid-template-columns: 1.5fr 1fr; } }
@media (max-width: 1180px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } .grid-2, .grid-3, .grid-4, .cfg-grid { grid-template-columns: 1fr; } }
