:root {
  --bg: #080b16;
  --ink: #eef1ff;
  --muted: #8b93b0;
  --dim: #5d647e;
  --line: rgba(255, 255, 255, .09);
  --glass: rgba(19, 24, 43, .62);
  --glass-2: rgba(255, 255, 255, .045);
  --accent: #7f9cff;
  --accent-2: #59e2c4;
  --warn: #ffc470;
  --danger: #ff7a8a;
  --ok: #5fe0a8;
  --r: 18px;
  --shadow: 0 22px 60px rgba(0, 0, 0, .42);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "HarmonyOS Sans", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(900px 600px at 8% -8%, rgba(93, 116, 255, .30), transparent 62%),
    radial-gradient(800px 620px at 96% 4%, rgba(38, 214, 184, .18), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(120, 70, 210, .18), transparent 65%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) .6px, transparent .6px);
  background-size: 3px 3px;
  opacity: .35;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 登录 ---------------- */
#login {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
}
.login-card {
  width: min(420px, 100%); padding: 38px 34px 30px; border-radius: 26px;
  background: linear-gradient(160deg, rgba(32, 39, 68, .86), rgba(13, 17, 32, .9));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.14);
  backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(140deg, #8ea7ff, #59e2c4);
  color: #0a1020; font-weight: 800; font-size: 19px; letter-spacing: -.5px;
  box-shadow: 0 10px 26px rgba(105, 140, 255, .35);
}
.brand h1 { font-size: 17px; margin: 0; letter-spacing: .5px; }
.brand p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); letter-spacing: 2px; }
.login-card .title { margin: 28px 0 4px; font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.login-card .sub { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; letter-spacing: .5px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  background: rgba(8, 11, 22, .55); border: 1px solid rgba(255,255,255,.11);
  outline: none; transition: border-color .18s, box-shadow .18s, background .18s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(127, 156, 255, .7); box-shadow: 0 0 0 3px rgba(127,156,255,.14); background: rgba(8,11,22,.75);
}
.textarea { min-height: 86px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 17px; border-radius: 11px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06); cursor: pointer; font-size: 13px;
  transition: transform .12s, background .18s, border-color .18s, box-shadow .18s; white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.11); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, #8ea7ff, #6f8dff); border-color: transparent; color: #0a1020;
  font-weight: 700; box-shadow: 0 10px 26px rgba(112, 142, 255, .3);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255,122,138,.35); background: rgba(255,122,138,.08); }
.btn.ok { color: var(--ok); border-color: rgba(95,224,168,.32); background: rgba(95,224,168,.08); }
.btn.sm { padding: 5px 11px; font-size: 12px; border-radius: 9px; }
.btn.block { width: 100%; padding: 12px; font-size: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------------- 布局 ---------------- */
#app { display: none; position: relative; z-index: 1; height: 100%; }
.shell { display: grid; grid-template-columns: 236px 1fr; height: 100%; }
.sidebar {
  margin: 14px 0 14px 14px; border-radius: 22px; padding: 18px 12px;
  background: linear-gradient(180deg, rgba(23,29,52,.8), rgba(12,16,30,.72));
  border: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; overflow: hidden;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 16px; }
.side-brand .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 15px; }
.side-brand b { font-size: 14px; letter-spacing: .3px; }
.side-brand span { display: block; font-size: 10px; color: var(--dim); letter-spacing: 1.6px; margin-top: 2px; }
.nav { overflow-y: auto; padding: 4px 2px; flex: 1; }
.nav-group { font-size: 10px; color: var(--dim); letter-spacing: 1.6px; padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 2px 4px;
  border-radius: 11px; font-size: 13px; color: #b9c0d8; transition: all .16s; position: relative;
}
.nav a svg { width: 16px; height: 16px; opacity: .75; flex: none; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on {
  background: linear-gradient(120deg, rgba(127,156,255,.22), rgba(89,226,196,.10));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(127,156,255,.28);
}
.nav a.on svg { opacity: 1; color: #aebfff; }
.nav a .dot { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; display: grid; place-items: center; }
.side-foot { padding: 12px 10px 4px; border-top: 1px solid var(--line); margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: linear-gradient(140deg, #46527c, #262d49); color: #dfe5ff; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 10.5px; color: var(--dim); }
.icon-btn { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: rgba(255,255,255,.07); color: #fff; }

.main { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 22px 26px 6px; }
.topbar h2 { margin: 0; font-size: 21px; letter-spacing: .4px; }
.topbar .crumb { font-size: 12px; color: var(--dim); margin-top: 3px; }
.topbar .spacer { flex: 1; }
.pulse { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-2); }
.pulse i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(95,224,168,.16); animation: breathe 2.4s infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px rgba(95,224,168,.05); } }
.content { flex: 1; overflow-y: auto; padding: 16px 26px 30px; }

/* ---------------- 通用 ---------------- */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: linear-gradient(165deg, rgba(26, 32, 56, .72), rgba(13, 17, 31, .72));
  border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 14px 34px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.05);
}
.kpi { padding: 18px 18px 16px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -28px; top: -34px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(127,156,255,.22), transparent 68%); }
.kpi .lab { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi .val { font-size: 27px; font-weight: 700; margin: 10px 0 6px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.kpi .sub { font-size: 11.5px; color: var(--dim); }
.kpi .sub b { color: var(--accent-2); font-weight: 600; }
.kpi .ic { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(127,156,255,.12); color: #a9bcff; }
.kpi .ic svg { width: 17px; height: 17px; }

.section { padding: 18px; }
.section-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-h h3 { margin: 0; font-size: 14.5px; letter-spacing: .3px; }
.section-h .spacer { flex: 1; }
.section-h .hint { font-size: 11.5px; color: var(--dim); }

.two { grid-template-columns: 1.55fr 1fr; }
.three { grid-template-columns: repeat(3, minmax(0,1fr)); }

/* 趋势图 */
.trend { display: flex; align-items: flex-end; gap: 12px; height: 168px; padding: 6px 2px 0; }
.trend .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.trend .bar { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, rgba(140,168,255,.95), rgba(88,116,230,.28)); position: relative; min-height: 3px; transition: filter .2s; }
.trend .bar:hover { filter: brightness(1.25); }
.trend .bar[data-v]::after { content: attr(data-v); position: absolute; top: -19px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.trend .lbl { font-size: 10.5px; color: var(--dim); }
.trend .col.today .bar { background: linear-gradient(180deg, #6ff0d0, rgba(64,190,164,.24)); }

/* 环形 */
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { width: 132px; height: 132px; border-radius: 50%; position: relative; flex: none; }
.donut::after { content: ""; position: absolute; inset: 17px; border-radius: 50%; background: #101527; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.donut .mid { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; }
.donut .mid b { font-size: 23px; display: block; line-height: 1; }
.donut .mid span { font-size: 10.5px; color: var(--dim); }
.legend { display: grid; gap: 9px; flex: 1; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.legend i { width: 8px; height: 8px; border-radius: 3px; }
.legend b { margin-left: auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 排名 */
.rank { display: grid; gap: 4px; }
.rank-row { display: flex; align-items: center; gap: 11px; padding: 9px 8px; border-radius: 12px; transition: background .15s; }
.rank-row:hover { background: rgba(255,255,255,.04); }
.rank-row .no { width: 18px; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.rank-row .no.top { color: var(--warn); font-weight: 700; }
.rank-row .meta { flex: 1; min-width: 0; }
.rank-row .meta b { font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .meta span { font-size: 10.5px; color: var(--dim); }
.rank-row .num { text-align: right; }
.rank-row .num b { font-size: 13px; display: block; }
.rank-row .num span { font-size: 10px; color: var(--dim); }

/* 工具栏 */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; }
.toolbar .search { flex: 1; min-width: 180px; max-width: 300px; position: relative; }
.toolbar .search input { padding-left: 34px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--dim); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(8,11,22,.45); border: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { padding: 6px 13px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; transition: all .15s; }
.tabs button:hover { color: #fff; }
.tabs button.on { background: rgba(127,156,255,.2); color: #fff; box-shadow: inset 0 0 0 1px rgba(127,156,255,.3); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.tb th {
  text-align: left; font-weight: 500; font-size: 11.5px; color: var(--dim); letter-spacing: .4px;
  padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tb td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,.05); color: #c8cee2; vertical-align: middle; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tbody tr { transition: background .14s; }
table.tb tbody tr:hover { background: rgba(255,255,255,.03); }
table.tb .main-cell b { color: var(--ink); font-weight: 600; display: block; }
table.tb .main-cell span { font-size: 11px; color: var(--dim); }
table.tb .num { font-variant-numeric: tabular-nums; }
table.tb .right { text-align: right; }
table.tb .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.cell-user { display: flex; align-items: center; gap: 9px; }
.cell-user .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 11.5px; }
.cell-user b { font-size: 12.5px; font-weight: 600; display: block; }
.cell-user span { font-size: 10.5px; color: var(--dim); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; font-size: 11px; white-space: nowrap; border: 1px solid transparent; }
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.gray { color: #9aa2bd; background: rgba(154,162,189,.1); border-color: rgba(154,162,189,.16); }
.badge.blue { color: #a3b6ff; background: rgba(127,156,255,.12); border-color: rgba(127,156,255,.22); }
.badge.cyan { color: #6fe8cf; background: rgba(89,226,196,.1); border-color: rgba(89,226,196,.2); }
.badge.green { color: #7ee6b0; background: rgba(95,224,168,.1); border-color: rgba(95,224,168,.2); }
.badge.orange { color: #ffc470; background: rgba(255,196,112,.1); border-color: rgba(255,196,112,.2); }
.badge.red { color: #ff96a2; background: rgba(255,122,138,.1); border-color: rgba(255,122,138,.22); }
.badge.purple { color: #c6a6ff; background: rgba(170,120,255,.12); border-color: rgba(170,120,255,.22); }
.tag { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.06); color: var(--muted); }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 14px 16px; font-size: 12px; color: var(--dim); }
.pager b { color: var(--ink); }
.pager .btn { padding: 5px 10px; }

.empty { padding: 52px 20px; text-align: center; color: var(--dim); font-size: 13px; }
.empty svg { width: 38px; height: 38px; opacity: .4; margin-bottom: 10px; }

/* 详情 / 抽屉 */
.drawer-mask { position: fixed; inset: 0; z-index: 40; background: rgba(4,6,14,.6); backdrop-filter: blur(3px); display: none; }
.drawer-mask.on { display: block; }
.drawer {
  position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(560px, calc(100% - 24px)); z-index: 41;
  border-radius: 22px; border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(170deg, rgba(26,32,56,.96), rgba(12,16,30,.97));
  box-shadow: var(--shadow); display: none; flex-direction: column; overflow: hidden;
}
.drawer.on { display: flex; animation: slidein .24s ease; }
@keyframes slidein { from { transform: translateX(24px); opacity: .4; } }
.drawer-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-h h3 { margin: 0; font-size: 15.5px; }
.drawer-h .spacer { flex: 1; }
.drawer-b { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.modal-mask { position: fixed; inset: 0; z-index: 50; background: rgba(4,6,14,.66); backdrop-filter: blur(4px); display: none; place-items: center; padding: 20px; }
.modal-mask.on { display: grid; }
.modal {
  width: min(520px, 100%); max-height: calc(100% - 30px); border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.13); background: linear-gradient(170deg, rgba(28,34,58,.98), rgba(12,16,30,.99));
  box-shadow: var(--shadow); display: flex; flex-direction: column; animation: pop .2s ease;
}
.modal.wide { width: min(760px, 100%); }
@keyframes pop { from { transform: scale(.97); opacity: .4; } }
.modal-h { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-h h3 { margin: 0; font-size: 15px; flex: 1; }
.modal-b { padding: 18px 20px; overflow-y: auto; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

.dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.dl > div { background: #11162a; padding: 11px 14px; }
.dl .k { font-size: 10.5px; color: var(--dim); margin-bottom: 4px; }
.dl .v { font-size: 12.5px; color: var(--ink); word-break: break-all; }
.dl .wide { grid-column: span 2; }

.profile-h { display: flex; align-items: center; gap: 14px; padding: 4px 0 16px; }
.profile-h .avatar { width: 54px; height: 54px; border-radius: 16px; font-size: 19px; }
.profile-h h3 { margin: 0 0 4px; font-size: 17px; }
.profile-h p { margin: 0; font-size: 11.5px; color: var(--dim); }
.profile-h .badges { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }

.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 14px; }
.subtabs button { padding: 8px 12px; background: none; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; border-bottom: 2px solid transparent; }
.subtabs button.on { color: #fff; border-bottom-color: var(--accent); }

.logline { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.06); font-size: 12px; }
.logline:last-child { border-bottom: 0; }
.logline .t { color: var(--dim); font-size: 10.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.logline .who { color: var(--accent-2); white-space: nowrap; }
.logline .act { color: var(--ink); white-space: nowrap; }
.logline .det { color: var(--muted); }

.proofs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.proofs a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0b0f1e; }
.proofs img { width: 100%; height: 100%; object-fit: cover; }
.proofs .ph { display: grid; place-items: center; color: var(--dim); font-size: 10.5px; text-align: center; padding: 6px; }

.chat { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; padding: 4px 0; }
.chat .msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 12px; line-height: 1.5; }
.chat .msg.customer { align-self: flex-start; background: rgba(255,255,255,.06); }
.chat .msg.rider { align-self: flex-start; background: rgba(89,226,196,.08); border: 1px solid rgba(89,226,196,.14); }
.chat .msg.admin { align-self: flex-end; background: rgba(127,156,255,.16); border: 1px solid rgba(127,156,255,.2); }
.chat .msg .who { font-size: 9.5px; color: var(--dim); margin-bottom: 3px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-grid .wide { grid-column: span 2; }
.form-tip { font-size: 11px; color: var(--dim); margin-top: 5px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; }
.switch input { display: none; }
.switch .track { width: 36px; height: 20px; border-radius: 10px; background: rgba(255,255,255,.12); position: relative; transition: background .18s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #cfd6ee; transition: transform .18s; }
.switch input:checked + .track { background: rgba(95,224,168,.55); }
.switch input:checked + .track::after { transform: translateX(16px); background: #eafff7; }

/* 配置 */
.cfg-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.cfg-tabs button { padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass-2); color: var(--muted); font-size: 12.5px; cursor: pointer; }
.cfg-tabs button.on { color: #0a1020; background: linear-gradient(135deg, #9db2ff, #7f9cff); border-color: transparent; font-weight: 600; }
.cfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px 18px; }
.cfg-item label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.cfg-item label .lock { font-size: 10px; color: var(--warn); border: 1px solid rgba(255,196,112,.3); padding: 1px 5px; border-radius: 5px; }
.cfg-item .select, .cfg-item .input { background: rgba(8,11,22,.55); }

.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 12px; font-size: 12.5px; background: rgba(24,30,50,.95); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 12px 30px rgba(0,0,0,.4); animation: toastin .22s ease; }
.toast.ok { border-color: rgba(95,224,168,.35); color: #b9f5dc; }
.toast.err { border-color: rgba(255,122,138,.4); color: #ffc9d0; }
@keyframes toastin { from { transform: translateY(-10px); opacity: 0; } }

.loading { display: flex; align-items: center; justify-content: center; padding: 60px; color: var(--dim); font-size: 12.5px; gap: 10px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.14); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mini-stat { padding: 13px 15px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--line); }
.mini-stat .k { font-size: 10.5px; color: var(--dim); }
.mini-stat .v { font-size: 18px; font-weight: 650; margin-top: 5px; font-variant-numeric: tabular-nums; }

.upload-box { display: flex; align-items: center; gap: 10px; }
.upload-box .preview { width: 52px; height: 52px; border-radius: 10px; border: 1px dashed var(--line); background: rgba(8,11,22,.5); display: grid; place-items: center; overflow: hidden; color: var(--dim); font-size: 10px; flex: none; }
.upload-box .preview img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .two, .three { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 45; left: 0; top: 0; bottom: 0; width: 240px; margin: 0; border-radius: 0 22px 22px 0; transform: translateX(-104%); transition: transform .22s; }
  .sidebar.open { transform: none; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .cfg-grid, .form-grid, .dl { grid-template-columns: 1fr; }
  .dl .wide { grid-column: span 1; }
  .mobile-only { display: inline-flex !important; }
}
.mobile-only { display: none !important; }
