:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --ink: #0c1222;
  --ink-2: #333c4f;
  --muted: #79839a;
  --line: #e6e9f0;
  --line-strong: #d5dae5;
  --brand: #2f5bff;
  --brand-ink: #1c3fd6;
  --brand-soft: #eef2ff;
  --cyan: #00c2ff;
  --violet: #7c5cff;
  --ok: #12b76a;
  --ok-soft: #e7f8f0;
  --warn: #f79009;
  --warn-soft: #fff6e6;
  --danger: #f04438;
  --danger-soft: #feeceb;
  --sidebar: #0a1020;
  --sidebar-2: #101a30;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(12, 18, 34, .06), 0 1px 3px rgba(12, 18, 34, .04);
  --shadow-md: 0 6px 24px rgba(12, 18, 34, .08);
  --shadow-lg: 0 24px 60px rgba(12, 18, 34, .18);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd5e2; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- boot ---------------- */
.app-loading { display: grid; place-items: center; min-height: 100vh; }
.boot { text-align: center; animation: fadeup .5s ease; }
.boot-title { font-size: 20px; font-weight: 700; letter-spacing: .04em; margin-top: 12px; }
.boot-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- shell ---------------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #cfd6e6;
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar > .brand { flex: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand img { width: 34px; height: 34px; }
.brand-name { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .04em; line-height: 1.2; }
.brand-sub { font-size: 10px; color: #7e8aa5; letter-spacing: .16em; text-transform: uppercase; }
.nav-group { font-size: 11px; color: #5f6b85; letter-spacing: .12em; padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  color: #b9c2d6; font-size: 13.5px; transition: .16s; border: 1px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(47,91,255,.28), rgba(47,91,255,.06)); color: #fff; border-color: rgba(96,140,255,.28); }
.nav-item .dot { width: 6px; height: 6px; border-radius: 50%; background: #46536e; }
.nav-item.active .dot { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.nav-item .badge { margin-left: auto; background: rgba(255,255,255,.1); color: #dbe3f5; font-size: 11px; padding: 1px 6px; border-radius: 20px; }
.sidebar-foot { margin-top: auto; padding: 12px 10px 4px; font-size: 11.5px; color: #6b7894; line-height: 1.7; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-foot b { color: #c9d3e8; font-weight: 600; }
.ai-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 8px; border-radius: 20px; border: 1px solid rgba(255,255,255,.12); }
.ai-pill .led { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.ai-pill.on .led { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; display: flex; align-items: center; gap: 14px;
  padding: 0 26px; background: rgba(245,246,250,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: .01em; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.content { padding: 24px 26px 60px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ---------------- atoms ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; cursor: pointer; font-size: 13.5px; font-weight: 550; color: var(--ink-2);
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #b9c2d6; background: #fbfcff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #3a63ff, var(--brand)); color: #fff; border-color: var(--brand);
  box-shadow: 0 6px 16px rgba(47, 91, 255, .24);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #eef1f7; color: var(--ink); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.danger { color: var(--danger); border-color: #f3c7c3; background: #fff; }
.btn.block { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-h h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.card-h .spacer { flex: 1; }
.card-b { padding: 18px; }
.card-b.flush { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); background: #fff; border-radius: 9px;
  padding: 9px 11px; outline: none; transition: .15s; font-size: 13.5px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,91,255,.12); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.7; }
.input.sm { height: 32px; padding: 4px 9px; font-size: 12.5px; }

.seg { display: inline-flex; background: #eef1f7; padding: 3px; border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 20px;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; border: 1px solid #dde5ff;
}
.chip.gray { background: #f1f3f8; color: var(--ink-2); border-color: var(--line); }
.chip.ok { background: var(--ok-soft); color: #067647; border-color: #c9f0dd; }
.chip.warn { background: var(--warn-soft); color: #b54708; border-color: #fce4bd; }
.chip.danger { background: var(--danger-soft); color: #b42318; border-color: #f7cdc9; }
.chip .x { cursor: pointer; opacity: .6; }
.chip .x:hover { opacity: 1; }

.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line-strong); border-radius: 9px; padding: 6px 8px; min-height: 38px; background: #fff; }
.tag-input input { border: 0; outline: 0; flex: 1; min-width: 90px; font-size: 13px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fbfcff; }
.table .strong { font-weight: 600; }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .ico { font-size: 26px; opacity: .5; }
.empty .t { margin: 8px 0 4px; color: var(--ink-2); font-weight: 600; }

.skeleton { background: linear-gradient(90deg, #eef1f7 25%, #f6f8fc 37%, #eef1f7 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- dashboard ---------------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 200px at 10% -30%, rgba(47,91,255,.20), transparent 60%),
              linear-gradient(120deg, #0b1224, #132a5e 60%, #0d3b63);
  color: #fff; border-radius: 18px; padding: 26px 28px;
}
.hero h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: .01em; }
.hero p { margin: 0; color: #b9c7e6; max-width: 720px; }
.hero .mesh { position: absolute; right: -40px; top: -40px; opacity: .5; }
.hero-stats { display: flex; gap: 26px; margin-top: 20px; flex-wrap: wrap; }
.hero-stats .hs .v { font-size: 24px; font-weight: 700; letter-spacing: .02em; }
.hero-stats .hs .k { font-size: 12px; color: #9db0d6; }

.stat { padding: 16px 18px; }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: .01em; margin-top: 2px; }
.stat .d { font-size: 12px; color: var(--muted); }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 90px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, #6f8dff, var(--brand)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bar-labels { display: flex; gap: 8px; margin-top: 8px; }
.bar-labels span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); }

.platform-bar { display: grid; grid-template-columns: 88px 1fr 42px; gap: 10px; align-items: center; font-size: 12.5px; }
.platform-bar .track { height: 8px; background: #eef1f7; border-radius: 6px; overflow: hidden; }
.platform-bar .fill { height: 100%; border-radius: 6px; }

/* ---------------- studio ---------------- */
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 16px; align-items: start; }
.platform-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 9px; }
.platform-card {
  border: 1px solid var(--line-strong); border-radius: 11px; padding: 10px 11px; cursor: pointer;
  background: #fff; transition: .15s; position: relative; overflow: hidden;
}
.platform-card:hover { border-color: #b7c4ea; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.platform-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,91,255,.10); }
.platform-card .pc-top { display: flex; align-items: center; gap: 8px; }
.platform-card .pc-dot { width: 8px; height: 8px; border-radius: 50%; }
.platform-card .pc-name { font-weight: 600; font-size: 13px; }
.platform-card .pc-desc { color: var(--muted); font-size: 11.5px; margin-top: 5px; line-height: 1.5; height: 34px; overflow: hidden; }
.platform-card .pc-check { position: absolute; right: 8px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); color: #fff; display: none; place-items: center; font-size: 10px; }
.platform-card.on .pc-check { display: grid; }

.gen-status { display: flex; flex-direction: column; gap: 8px; }
.gen-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; padding: 7px 9px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.gen-row .st { margin-left: auto; font-size: 11.5px; }

/* ---------------- editor ---------------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 6px; background: #eef1f7; border-radius: 12px; }
.tabs .tab { display: flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; border: 1px solid transparent; }
.tabs .tab:hover { background: rgba(255,255,255,.6); }
.tabs .tab.active { background: #fff; box-shadow: var(--shadow-sm); font-weight: 600; border-color: var(--line); }
.tabs .tab .dot { width: 7px; height: 7px; border-radius: 50%; }
.tabs .tab .sc { font-size: 10.5px; padding: 1px 5px; border-radius: 6px; background: #eef1f7; color: var(--muted); }

.ed-title { font-size: 19px; font-weight: 650; line-height: 1.45; }
.ed-body { min-height: 460px; line-height: 1.85; font-size: 13.8px; }
.preview { padding: 4px 2px; font-size: 13.8px; line-height: 1.85; }
.preview h1, .preview h2, .preview h3 { line-height: 1.4; margin: 1.2em 0 .5em; }
.preview h2 { font-size: 17px; }
.preview p { margin: .7em 0; }
.preview ul, .preview ol { padding-left: 1.25em; }
.preview blockquote { margin: .8em 0; padding: .4em 1em; border-left: 3px solid var(--line-strong); color: var(--ink-2); background: var(--surface-2); }
.preview code { background: #f1f3f8; padding: 1px 5px; border-radius: 5px; font-family: var(--mono); font-size: 12.5px; }
.preview pre { background: #0d1424; color: #d6e0f5; padding: 14px; border-radius: 10px; overflow: auto; }
.preview pre code { background: transparent; padding: 0; color: inherit; }
.preview table { width: 100%; border-collapse: collapse; margin: .8em 0; font-size: 13px; }
.preview th, .preview td { border: 1px solid var(--line-strong); padding: 7px 9px; }
.preview th { background: var(--surface-2); }
.preview img { max-width: 100%; border-radius: 8px; }
.preview hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }

.score-ring { display: flex; align-items: center; gap: 14px; }
.ring { --p: 0; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ring-color, var(--brand)) calc(var(--p) * 1%), #edf0f6 0);
  position: relative; }
.ring::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.ring .val { position: relative; z-index: 1; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.ring .val small { font-size: 10px; color: var(--muted); font-weight: 500; }

.geo-group { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.geo-group .gh { display: flex; align-items: center; gap: 8px; padding: 9px 11px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; }
.geo-group .gh .v { margin-left: auto; font-size: 12px; color: var(--muted); }
.geo-item { display: flex; gap: 8px; padding: 7px 11px; border-top: 1px solid var(--line); font-size: 12.3px; align-items: flex-start; }
.geo-item .mk { width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; flex: none; margin-top: 3px; }
.geo-item .mk.ok { background: var(--ok-soft); color: #067647; }
.geo-item .mk.no { background: var(--danger-soft); color: #b42318; }
.geo-item .txt { flex: 1; }
.geo-item .txt .h { color: var(--muted); font-size: 11.5px; }
.geo-item .fix { font-size: 11.5px; color: var(--brand); cursor: pointer; white-space: nowrap; }

.cover-canvas-wrap { background: #0d1424; border-radius: 12px; padding: 10px; display: grid; place-items: center; }
.cover-canvas-wrap canvas { max-width: 100%; height: auto; border-radius: 8px; display: block; box-shadow: var(--shadow-md); }
.cover-tpls { display: flex; gap: 6px; }
.cover-tpls button { flex: 1; border: 1px solid var(--line-strong); background: #fff; border-radius: 8px; padding: 6px 4px; font-size: 11.5px; cursor: pointer; color: var(--ink-2); }
.cover-tpls button.active { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }

/* ---------------- modal / drawer ---------------- */
.modal-mask { position: fixed; inset: 0; background: rgba(8, 12, 24, .5); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; width: min(680px, 100%); max-height: 86vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: .8; } }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-h h3 { margin: 0; font-size: 15px; }
.modal-b { padding: 18px; overflow: auto; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

/* ---------------- toast ---------------- */
.toast-root { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: #0c1222; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: toastin .2s ease; max-width: 380px; line-height: 1.55;
  display: flex; gap: 8px; align-items: flex-start;
}
.toast.ok { background: #0b3b2a; }
.toast.err { background: #4a1410; }
.toast .ic { flex: none; }
@keyframes toastin { from { transform: translateY(6px); opacity: 0; } }

/* ---------------- settings ---------------- */
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.copy-box { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; }
.copy-box code { flex: 1; font-family: var(--mono); font-size: 12px; overflow: auto; white-space: nowrap; }

.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 11px; font-size: 12.8px; line-height: 1.65; }
.notice.info { background: #eff4ff; border: 1px solid #dbe6ff; color: #27408b; }
.notice.warn { background: var(--warn-soft); border: 1px solid #fce4bd; color: #8a5300; }
.notice.ok { background: var(--ok-soft); border: 1px solid #c9f0dd; color: #067647; }

/* ---------------- misc ---------------- */
.article-row { display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.article-row:hover { background: #fbfcff; }
.article-row:last-child { border-bottom: 0; }
.article-row .t { font-weight: 600; margin-bottom: 3px; }
.article-row .m { color: var(--muted); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.plat-dots { display: flex; gap: 4px; margin-top: 6px; }
.plat-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--brand); }

.spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; }
.spin.dark { border-color: #c9d2e8; border-top-color: var(--brand); }
@keyframes rot { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .studio-grid, .editor { grid-template-columns: 1fr; }
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; width: 232px; transform: translateX(-100%); transition: .2s; }
  .sidebar.open { transform: none; }
  .content { padding: 16px; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
}

/* ---------------- 多租户：登录页 / 企业徽标 / 顶栏用户 ---------------- */
.tenant-chip {
  margin: 2px 6px 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
}
.tenant-chip .tc-name { font-size: 12.5px; word-break: break-word; line-height: 1.5; color: #fff; font-weight: 600; line-height: 1.4; }
.tenant-chip .tc-role { font-size: 11px; color: #8b98b4; margin-top: 2px; }
.topbar .select.sm { font-size: 12px; }\n.topbar-user { font-size: 12.5px; color: var(--ink-2); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.login-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.login-brand {
  position: relative; overflow: hidden; color: #fff; padding: 56px 56px 40px;
  background: radial-gradient(900px 400px at 20% -10%, rgba(47, 91, 255, .45), transparent 60%),
              linear-gradient(150deg, #0a1020, #132a5e 55%, #0b3a63);
  display: flex; flex-direction: column;
}
.login-brand::after {
  content: ''; position: absolute; right: -120px; bottom: -140px; width: 520px; height: 520px;
  border-radius: 50%; border: 1px solid rgba(120, 190, 255, .18);
  box-shadow: 0 0 0 60px rgba(120, 190, 255, .05), 0 0 0 130px rgba(120, 190, 255, .035);
}
.lb-logo { display: flex; align-items: center; gap: 12px; }
.lb-name { font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.lb-sub { font-size: 10.5px; color: #8fa8d8; letter-spacing: .22em; }
.login-brand h2 { font-size: 32px; line-height: 1.35; margin: 56px 0 14px; letter-spacing: .01em; }
.login-brand p { color: #b9c7e6; max-width: 430px; line-height: 1.9; margin: 0; font-size: 14px; }
.lb-list { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-direction: column; gap: 12px; }
.lb-list li { color: #c6d3ec; font-size: 13px; padding-left: 18px; position: relative; line-height: 1.7; }
.lb-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #00c2ff; }
.lb-list b { color: #fff; }
.lb-foot { margin-top: auto; font-size: 11.5px; color: #6f80a5; }
.login-form { display: grid; place-items: center; padding: 40px; background: var(--surface); }
.lf-inner { width: 100%; max-width: 360px; }
.lf-inner h1 { font-size: 24px; margin: 0; letter-spacing: .01em; }
.login-err { color: var(--danger); font-size: 12.5px; min-height: 18px; margin-top: 10px; }
.lf-tip { margin-top: 22px; font-size: 12px; color: var(--muted); line-height: 1.8; }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}


/* ---------------- 视角主题：运营端（暖橙） vs 企业端（蓝） ---------------- */
body[data-view="platform"] {
  --brand: #e8590c;
  --brand-ink: #b34708;
  --brand-soft: #fff1e6;
  --sidebar: #1a0f06;
  --sidebar-2: #2a180a;
  --bg: #faf7f4;
}

/* 顶部橙金细线：进入任何页面都能一眼分辨 */
body[data-view="platform"]::after {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #e8590c, #ffb020);
  z-index: 90;
  pointer-events: none;
}

body[data-view="platform"] .topbar { border-bottom-color: #f6d9c2; background: #fffaf5; }

body[data-view="platform"] .btn.primary {
  background: linear-gradient(180deg, #f97316, #e8590c);
  border-color: #e8590c;
}
body[data-view="platform"] .btn.primary:hover { filter: brightness(1.06); }

body[data-view="platform"] .input:focus,
body[data-view="platform"] .select:focus,
body[data-view="platform"] .textarea:focus {
  border-color: #e8590c;
  box-shadow: 0 0 0 3px rgba(232, 89, 12, .14);
}

body[data-view="platform"] .sidebar {
  background: linear-gradient(180deg, #1a0f06, #2a180a);
  border-right: 1px solid #3a2410;
}
body[data-view="platform"] .nav a.act,
body[data-view="platform"] .nav a[aria-current="page"],
body[data-view="platform"] .nav a.active {
  background: rgba(249, 115, 22, .16);
  color: #ffc48a;
}
body[data-view="platform"] .nav a:hover { background: rgba(249, 115, 22, .08); }

body[data-view="platform"] .chip.brand,
body[data-view="platform"] .tag-brand {
  background: #fff1e6;
  color: #b34708;
}

/* 侧边栏品牌名下的「运营端」标识 */
body[data-view="platform"] .topbar::before {
  content: "运营端";
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  color: #9a3f06;
  background: #ffe8d4;
  border: 1px solid #f7c9a3;
  border-radius: 999px;
  padding: 2px 9px;
  margin-right: 10px;
  flex: none;
}

/* 运营端导航更紧凑：多两项菜单，压缩行高保证常用分辨率一屏可见 */
body[data-view="platform"] .sidebar { padding: 14px 12px; gap: 3px; }
body[data-view="platform"] .brand { padding: 4px 8px 12px; }
body[data-view="platform"] .nav-group { padding: 9px 10px 4px; font-size: 10.5px; }
body[data-view="platform"] .nav-item { padding: 7px 10px; font-size: 13px; }
body[data-view="platform"] .sidebar-foot { padding: 10px 10px 2px; font-size: 11px; }

/* ---------------- 视角切换 ---------------- */
.view-switch { display: inline-flex; background: #eef1f7; border-radius: 9px; padding: 2px; gap: 2px; }
.view-switch button {
  border: 0; background: transparent; color: #5b6478; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 7px; cursor: pointer; font-family: inherit;
}
.view-switch button.on { background: #fff; color: #1a1d24; box-shadow: 0 1px 3px rgba(12,18,34,.12); }
body[data-view="platform"] .view-switch { background: #f3e6d9; }
body[data-view="platform"] .view-switch button { color: #8a5a33; }
body[data-view="platform"] .view-switch button.on { background: #fff; color: #9a3f06; }

/* 登录页双身份选择 */
.login-choose { display: flex; flex-direction: column; gap: 10px; }
.lc-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.lc-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.lc-card {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; cursor: pointer; font-family: inherit; transition: .16s;
}
.lc-card:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(47,91,255,.10); transform: translateY(-1px); }
.lc-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; flex: none; }
.lc-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.lc-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.lc-tip { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 4px; }
