:root {
  --bg: #f2f5fa;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6ebf2;
  --primary: #2f6bff;
  --primary-deep: #1f4fd6;
  --primary-soft: #eef3ff;
  --green: #0ea472;
  --green-soft: #e8f8f1;
  --amber: #d97706;
  --amber-soft: #fff4e5;
  --red: #e04848;
  --red-soft: #fdeeee;
  --sidebar: #0b1424;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.04);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; }

/* layout */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, #0b1424 0%, #0d1a2f 100%);
  color: #cbd5e1; padding: 22px 14px 18px; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 22px; color: #fff; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  font-weight: 700; font-size: 16px; box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: 0.02em; }
.brand-sub { display: block; font-size: 10px; color: #7f8ba3; letter-spacing: 0.16em; margin-top: 1px; }
.nav-label { font-size: 11px; color: #64748b; letter-spacing: 0.14em; padding: 10px 12px 8px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  color: #aab5c8; font-size: 13.5px; transition: all .16s ease;
}
.nav a svg { width: 17px; height: 17px; opacity: .75; flex: 0 0 auto; }
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav a.active { background: rgba(47, 107, 255, 0.16); color: #fff; box-shadow: inset 2px 0 0 #4d83ff; }
.nav a.active svg { opacity: 1; }
.sidebar-foot { margin-top: auto; padding: 16px 12px 0; font-size: 11px; color: #55637c; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-foot strong { color: #8aa3c8; font-weight: 500; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; font-weight: 600; }
.topbar .crumb { font-size: 12px; color: var(--muted); margin-top: 1px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 999px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #2f6bff, #7c3aed); color: #fff; font-size: 12px; font-weight: 600;
}
.user-meta { line-height: 1.2; }
.user-meta b { font-size: 12.5px; font-weight: 600; display: block; }
.user-meta span { font-size: 10.5px; color: var(--muted); }
.content { padding: 24px 28px 44px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; }
.card-head .hint { font-size: 12px; color: var(--muted); }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-dash { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; }
.grid-2 > .card + .card, .grid-3 > .card + .card, .grid-dash > .card + .card, .crawl-side > .card + .card { margin-top: 0; }
.grid-2 > .card, .grid-3 > .card, .grid-dash > .card { display: flex; flex-direction: column; height: 100%; }
.grid-2 > .card > .card-body, .grid-3 > .card > .card-body, .grid-dash > .card > .card-body { flex: 1 1 auto; }
.card-body > .empty { height: 100%; display: flex; flex-direction: column; justify-content: center; }

/* stats */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 16px 18px;
  display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow);
}
.stat-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 auto; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.stat-value small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }

/* forms */
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 120px; }
.field.grow { flex: 1; min-width: 200px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
  height: 38px; padding: 0 11px; border: 1px solid #d8e0eb; border-radius: 9px; background: #fff;
  color: var(--ink); outline: none; transition: border .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 9px 11px; resize: vertical; }
.input:focus, select.input:focus, textarea.input:focus { border-color: #93b4ff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.input::placeholder { color: #9aa7bb; }
select.input { cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.check input { accent-color: var(--primary); width: 15px; height: 15px; }
.switch { position: relative; display: inline-block; width: 38px; height: 21px; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 20px; cursor: pointer; transition: .18s; }
.switch span:before { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span:before { transform: translateX(17px); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent;
  background: var(--primary); color: #fff; font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { background: var(--primary-deep); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: #fff; border-color: #d8e0eb; color: var(--ink); }
.btn.ghost:hover { border-color: #b9c6d8; background: #f8fafc; }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #c53b3b; }
.btn.danger-soft { background: var(--red-soft); color: var(--red); }
.btn.success { background: var(--green); }
.btn.success:hover { background: #0b8a5f; }
.btn.sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn.xs { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.btn.block { width: 100%; }
.btn.icon { width: 38px; padding: 0; }
.btn svg { width: 16px; height: 16px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl thead th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--muted);
  padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl tbody td { padding: 12px 16px; border-bottom: 1px solid #edf1f7; vertical-align: middle; }
table.tbl tbody tr:hover { background: #f9fbff; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .name { font-weight: 500; color: var(--ink); }
table.tbl .sub { font-size: 11.5px; color: var(--muted); }
table.tbl td.wrap { max-width: 320px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; }
.phone { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12.5px; color: #33507a; white-space: nowrap; }
.tel-line { display: flex; align-items: center; gap: 4px; }
.tel-line + .tel-line { margin-top: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 500; background: #eef2f7; color: #52627c;
}
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.gray { background: #f1f5f9; color: #64748b; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* alerts */
.alert { display: flex; gap: 9px; align-items: center; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; }
.alert.ok { background: var(--green-soft); color: #067a55; border: 1px solid #c8efdf; }
.alert.error { background: var(--red-soft); color: #b52d2d; border: 1px solid #f6d5d5; }
.alert.warn { background: var(--amber-soft); color: #b45309; border: 1px solid #fbe2bd; }
.alert.info { background: var(--primary-soft); color: #1e4fc0; border: 1px solid #d9e5ff; }

/* empty */
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 52px; height: 52px; border-radius: 14px; background: #f1f5fb; display: grid; place-items: center; margin: 0 auto 12px; color: #9aa7bb; }
.empty h3 { font-size: 15px; color: #475569; margin-bottom: 4px; }
.empty p { font-size: 12.5px; }

/* bars / charts */
.bar-list { display: flex; flex-direction: column; gap: 11px; }
.bar-item { display: grid; grid-template-columns: 88px 1fr 58px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-label { color: #42526b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: #eef2f8; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4d83ff, #7c9cff); transition: width .6s ease; }
.bar-fill.green { background: linear-gradient(90deg, #12b886, #4dd4aa); }
.bar-value { text-align: right; color: var(--muted); font-size: 12px; }
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 8px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #6f9bff, #2f6bff); min-height: 3px; transition: height .7s ease; }
.chart-num { font-size: 11px; color: var(--muted); }
.chart-dim { font-size: 10.5px; color: #93a1b5; }

/* city picker */
.picker { display: grid; grid-template-columns: 210px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.picker-left { background: #f8fafc; border-right: 1px solid var(--line); padding: 10px; max-height: 360px; overflow-y: auto; }
.prov-item {
  padding: 8px 10px; border-radius: 8px; font-size: 13px; color: #4a5b73; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.prov-item:hover { background: #eef3fc; }
.prov-item.active { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(16,24,40,.08); font-weight: 500; }
.prov-item .cnt { font-size: 10.5px; color: #9aa7bb; }
.picker-right { padding: 12px; max-height: 360px; overflow-y: auto; min-height: 200px; }
.picker-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.city-check {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e6ebf2;
  border-radius: 8px; cursor: pointer; font-size: 13px; background: #fff; user-select: none;
}
.city-check:hover { border-color: #b9cdfa; }
.city-check input { accent-color: var(--primary); }
.city-check.on { border-color: #b9cdfa; background: #f4f8ff; }
.selected-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px;
  background: var(--primary-soft); color: var(--primary); font-size: 12px;
}
.tag .x { cursor: pointer; font-weight: 600; opacity: .6; }
.tag .x:hover { opacity: 1; }
.tag .d { cursor: pointer; font-size: 11px; color: #2f6bff; background: #eef3ff; border-radius: 4px; padding: 1px 5px; }
.tag .d:hover { background: #dfe8ff; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid #e1e7f0; border-radius: 8px; background: #fff; font-size: 13px; cursor: pointer; user-select: none;
}
.chip input { accent-color: var(--primary); }
.chip.on { border-color: #b9cdfa; background: #f4f8ff; color: var(--primary); }

/* console */
.console {
  background: #0a1020; color: #c7d2e5; border-radius: 12px; padding: 14px 16px;
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.9;
  height: 268px; overflow-y: auto;
}
.console .t { color: #5b6b86; margin-right: 8px; }
.console .ok { color: #4ade80; }
.console .warn { color: #fbbf24; }
.console .err { color: #f87171; }
.console-line { white-space: pre-wrap; word-break: break-all; }

.task-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.task-stat { background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.task-stat span { display: block; font-size: 11px; color: var(--muted); }
.task-stat b { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.progress-track { height: 8px; background: #eef2f8; border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #2f6bff, #6f9bff); border-radius: 999px; transition: width .4s; }
.progress-fill.busy { width: 30%; animation: progress-busy 1.2s linear infinite; }
@keyframes progress-busy { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }

/* sub workspace */
.sub-hero {
  background: radial-gradient(120% 160% at 0% 0%, #12294d 0%, #0b1424 62%);
  color: #fff; border-radius: 16px; padding: 22px 24px; display: flex; justify-content: space-between;
  align-items: center; gap: 20px; margin-bottom: 18px; overflow: hidden; position: relative;
}
.sub-hero:after {
  content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(71, 125, 255, .35), transparent 65%); pointer-events: none;
}
.sub-hero h2 { font-size: 20px; margin-bottom: 4px; }
.sub-hero p { font-size: 12.5px; color: #9fb0ca; }
.quota-ring {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: conic-gradient(#4d83ff calc(var(--p) * 1%), rgba(255,255,255,.12) 0); flex: 0 0 auto;
}
.quota-inner { width: 72px; height: 72px; border-radius: 50%; background: #0e1c33; display: grid; place-items: center; line-height: 1.15; }
.quota-inner b { font-size: 22px; display: block; }
.quota-inner span { font-size: 10px; color: #8fa3c0; }

.sse-box { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.sse-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.sse-status { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(14,164,114,.5); animation: pulse 1.4s infinite; }
.pulse.idle { background: #9aa7bb; animation: none; }
.pulse.err { background: var(--red); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(14,164,114,.45); }
  70% { box-shadow: 0 0 0 10px rgba(14,164,114,0); }
  100% { box-shadow: 0 0 0 0 rgba(14,164,114,0); }
}
.sse-body { max-height: 520px; overflow-y: auto; }
.scan-line { padding: 11px 18px; background: #0a1020; color: #8fa3c0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11.5px; display: flex; gap: 10px; align-items: center; }
.scan-line .spinner { width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.18); border-top-color: #6f9bff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.pager-links { display: flex; gap: 5px; }
.page-btn {
  min-width: 31px; height: 31px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; color: #475569; background: #fff;
}
.page-btn:hover { border-color: #b9cdfa; color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* misc */
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h3 { font-size: 14px; }
.hr { height: 1px; background: var(--line); margin: 16px 0; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex.between { justify-content: space-between; }
.flex.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.right { text-align: right; }
.text-green { color: var(--green); } .text-amber { color: var(--amber); } .text-red { color: var(--red); }
.nowrap { white-space: nowrap; }
.w-100 { width: 100%; }
.mini-note { font-size: 11.5px; color: var(--muted); }
.inline-form { display: inline-flex; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

dialog.modal {
  border: none; border-radius: 16px; padding: 0; width: min(430px, calc(100vw - 32px));
  box-shadow: 0 24px 70px rgba(15, 23, 42, .3);
}
dialog.modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.modal-head { padding: 18px 22px 0; }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 16px 22px 6px; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 9px; }

.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 9px; font-size: 13px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .2); animation: slideIn .25s ease;
}
.toast.err { background: #b52d2d; }
.toast.ok { background: #0b7a57; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* login */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr;
  background: radial-gradient(120% 140% at 10% 0%, #16294a 0%, #0b1424 55%, #080e18 100%);
}
.login-side { padding: 56px 64px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-side:after {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; bottom: -140px;
  background: radial-gradient(circle, rgba(47,107,255,.4), transparent 62%); filter: blur(10px);
}
.login-side .brand { padding: 0; }
.login-hero h2 { font-size: 38px; line-height: 1.28; letter-spacing: -0.02em; margin: 26px 0 14px; }
.login-hero p { color: #a6b5cc; font-size: 14px; max-width: 480px; }
.login-points { display: flex; gap: 26px; margin-top: 34px; }
.login-point b { display: block; font-size: 22px; }
.login-point span { font-size: 12px; color: #8496b1; }
.login-foot { font-size: 12px; color: #6f7f97; position: relative; z-index: 1; }
.login-panel { background: rgba(255,255,255,.98); display: flex; align-items: center; justify-content: center; padding: 30px; }
.login-card { width: min(360px, 100%); }
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card .desc { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.login-card .field { margin-bottom: 14px; }
.login-card .field label { font-size: 12.5px; color: #475569; }
.login-card .input { height: 44px; border-radius: 10px; }
.login-card .btn { height: 44px; border-radius: 10px; margin-top: 8px; font-size: 14px; }
.login-error { background: var(--red-soft); color: #b52d2d; border-radius: 9px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 14px; }
.login-note { margin-top: 22px; font-size: 11.5px; color: #94a3b8; line-height: 1.8; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-dash { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
  .sidebar .brand { padding: 0 8px; }
  .sidebar nav { flex-direction: row; overflow-x: auto; flex: 1 0 100%; margin-top: 10px; }
  .sidebar .nav-label, .sidebar-foot { display: none; }
  .nav a { white-space: nowrap; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 0 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .task-stats { grid-template-columns: repeat(2, 1fr); }
  .picker { grid-template-columns: 1fr; }
  .picker-left { display: flex; flex-wrap: wrap; gap: 6px; max-height: none; border-right: none; border-bottom: 1px solid var(--line); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .login-panel { min-height: 100vh; }
}
