:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #fafbfc;
  --ink: #0f1e2e;
  --ink-2: #33475b;
  --muted: #6b7f93;
  --line: #e3e8ef;
  --line-2: #eef2f6;
  --brand: #0b5c8a;
  --brand-d: #084a6f;
  --brand-l: #e8f2f8;
  --teal: #0e7490;
  --amber: #b45309;
  --amber-l: #fef3c7;
  --ok: #157347;
  --ok-l: #e6f4ec;
  --bad: #b42318;
  --bad-l: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 60, .05), 0 8px 24px -12px rgba(16, 40, 60, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; border: 2px solid var(--bg); }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(1200px 600px at 10% -10%, #e6f1f8 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, #eef6f4 0%, transparent 55%),
    #f4f7fa;
  padding: 24px;
}
.login-card {
  width: 400px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 34px 34px 26px;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .mark { width: 42px; height: 42px; }
.login-brand b { display: block; font-size: 17px; letter-spacing: .02em; }
.login-brand span { font-size: 12px; color: var(--muted); }
.login-card h2 { font-size: 19px; margin-bottom: 4px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.login-hint { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); line-height: 1.7; }
.login-hint code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--ink-2); }
.login-err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 6px; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 226px; flex: 0 0 226px; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line-2); }
.brand b { font-size: 15px; letter-spacing: .02em; display: block; line-height: 1.2; }
.brand small { color: var(--muted); font-size: 11px; }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.nav-group { margin-top: 14px; }
.nav-group > span { display: block; font-size: 11px; color: #8fa2b5; letter-spacing: .08em; padding: 0 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  color: var(--ink-2); font-size: 13.5px; margin-bottom: 1px;
}
.nav a:hover { background: var(--panel-2); }
.nav a.active { background: var(--brand-l); color: var(--brand-d); font-weight: 600; }
.nav a .dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.nav a.active .dot { background: var(--brand); }
.nav a .cnt { margin-left: auto; font-size: 11px; color: var(--muted); }
.side-foot { border-top: 1px solid var(--line-2); padding: 12px 14px; }
.side-user { display: flex; align-items: center; gap: 9px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.side-user b { display: block; font-size: 13px; line-height: 1.2; }
.side-user span { font-size: 11px; color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; flex: 0 0 58px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 22px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16px; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.content { padding: 20px 22px 40px; }

/* ---------- 通用 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 7px; cursor: pointer;
  font-size: 13px; color: var(--ink-2); white-space: nowrap; transition: .12s;
}
.btn:hover { border-color: #c9d4e0; background: #fbfcfd; }
.btn:active { transform: translateY(.5px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn-danger { color: var(--bad); border-color: #f3c6c2; }
.btn-danger:hover { background: var(--bad-l); }
.btn-sm { height: 27px; padding: 0 9px; font-size: 12.5px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--brand); cursor: pointer; padding: 0; font-size: 13px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16,40,60,.03); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.card-h h3 { font-size: 14px; }
.card-h .spacer { flex: 1; }
.card-b { padding: 16px; }

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.page-head h2 { font-size: 20px; }
.page-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.page-head .spacer { flex: 1; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.search { position: relative; }
.search input { width: 260px; padding-left: 30px; }
.search svg { position: absolute; left: 9px; top: 8px; opacity: .45; }
select.mini, input.mini { height: 30px; font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea {
  height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: #fff;
  outline: none; width: 100%;
}
.field textarea { height: auto; min-height: 68px; padding: 8px 10px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #8fb8d2; box-shadow: 0 0 0 3px rgba(11,92,138,.08); }
.field input:disabled { background: #f8fafc; color: var(--muted); }
.field .hint { font-size: 11.5px; color: var(--muted); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fbfcfd; white-space: nowrap;
}
table.tb td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tb tbody tr:hover { background: #fbfdff; }
table.tb tr.clickable { cursor: pointer; }
table.tb .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tb .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
table.tb tfoot td { font-weight: 600; background: #fbfcfd; border-top: 1px solid var(--line); }
table.tb.compact td, table.tb.compact th { padding: 7px 9px; }
table.tb input, table.tb select { height: 29px; border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; font-size: 12.5px; width: 100%; }
table.tb input.num-in { text-align: right; }
.empty { padding: 44px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); font-size: 12.5px; }
.pager .spacer { flex: 1; }

/* ---------- 徽标 ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.b-gray { background: #f1f5f9; color: #475569; }
.b-blue { background: var(--brand-l); color: var(--brand-d); }
.b-green { background: var(--ok-l); color: var(--ok); }
.b-amber { background: var(--amber-l); color: var(--amber); }
.b-red { background: var(--bad-l); color: var(--bad); }
.b-teal { background: #e6f4f7; color: var(--teal); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; position: relative; overflow: hidden; }
.kpi .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.alert { border-color: #f3d9c0; background: linear-gradient(180deg, #fffdf8, #fff); }
.kpi .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); opacity: .55; }
.kpi.alert .bar { background: var(--amber); }

.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1100px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ---------- 抽屉 / 弹窗 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,30,46,.32); z-index: 60; opacity: 0; animation: fade .16s forwards; }
@keyframes fade { to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 94vw); background: #fff; z-index: 61;
  box-shadow: -8px 0 40px rgba(15,30,46,.14); display: flex; flex-direction: column;
  animation: slide .2s ease-out;
}
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.drawer-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.drawer-h h3 { font-size: 16px; }
.drawer-h .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.drawer-b { flex: 1; overflow-y: auto; padding: 18px 20px 30px; }
.drawer-f { border-top: 1px solid var(--line); padding: 12px 20px; display: flex; gap: 8px; flex-wrap: wrap; background: var(--panel-2); }
.icon-btn { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { color: var(--ink); }

.modal { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, 94vw); max-height: 90vh; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(15,30,46,.25); display: flex; flex-direction: column; animation: pop .18s ease-out; }
@keyframes pop { from { transform: translate(-50%, -46%); opacity: .6; } }
.modal.wide { width: min(1020px, 96vw); }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-h h3 { font-size: 15px; }
.modal-b { padding: 18px 20px; overflow-y: auto; }
.modal-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--panel-2); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .col-2 { grid-column: span 2; }
.form-grid .col-3 { grid-column: span 3; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } .form-grid .col-2, .form-grid .col-3 { grid-column: span 1; } }

.section { margin: 20px 0 10px; font-size: 12px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.section:after { content: ""; height: 1px; background: var(--line-2); flex: 1; }

.kv { display: grid; grid-template-columns: 118px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 12px; cursor: pointer; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-color: var(--brand); font-weight: 600; }

.checks { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.checks label { display: flex; align-items: center; gap: 6px; }
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--brand); }

.progress { height: 5px; background: #eef2f6; border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); }

.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.timeline .item { position: relative; padding-bottom: 14px; font-size: 12.5px; }
.timeline .item:before { content: ""; position: absolute; left: -20px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.timeline .t { color: var(--muted); font-size: 11.5px; }

.note { background: #fbfcfd; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 6px; padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); }
.warn-note { border-left-color: var(--amber); background: #fffdf7; }

.chart { width: 100%; height: 150px; }
.chart .bar { fill: #cfe2ee; }
.chart .bar.on { fill: var(--brand); }
.chart text { fill: var(--muted); font-size: 10px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #10283c; color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: pop .18s; max-width: 360px; }
.toast.err { background: #8f1d17; }
.toast.ok { background: #14532d; }

/* ---------- 附件 ---------- */
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.file-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .sz { color: var(--muted); font-size: 11.5px; }
.upload { display: inline-flex; align-items: center; gap: 8px; }
.upload input[type=file] { display: none; }

@media print {
  .sidebar, .topbar, .drawer-f, .toasts, .no-print { display: none !important; }
  body, .content { background: #fff; }
  .drawer { position: static; width: auto; box-shadow: none; }
}

/* ---------- RFQ / sourcing / review gate ---------- */
.muted-sm { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.sup-picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 6px; max-height: 190px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--panel-2);
}
.sup-opt { display: flex; align-items: center; gap: 7px; font-size: 12.5px; cursor: pointer; padding: 3px 4px; border-radius: 5px; }
.sup-opt:hover { background: #fff; }
.sup-opt.dis { opacity: .5; }
.sup-opt .badge { margin-left: auto; }

.cmp { border-collapse: collapse; }
.cmp th.cmp-col { background: var(--panel-2); text-align: left; vertical-align: bottom; padding: 8px 9px; }
.cmp th.cmp-col .muted-sm { font-weight: 400; }
.cmp td { vertical-align: top; }
.cmp-cell { border-left: 1px solid var(--line-2); }
.cmp-cell.none { color: var(--muted); text-align: center; }
.cmp-cell.best { background: var(--ok-l); }
.cmp-price { font-weight: 600; font-size: 13px; }
.cmp-cell.best .cmp-price { color: var(--ok); }

/* validation checklist */
.gate-bar { display: flex; align-items: center; gap: 12px; border-radius: 8px; padding: 10px 13px; margin-bottom: 10px; border: 1px solid var(--line); }
.gate-bar.ok { background: var(--ok-l); border-color: #cbe7d8; }
.gate-bar.bad { background: var(--bad-l); border-color: #f3c6c2; }
.gate-bar-l b { display: block; font-size: 13px; }
.gate-bar-l span { font-size: 12px; color: var(--ink-2); }
.gate-bar-r { margin-left: auto; display: flex; gap: 6px; }

.gate-list { display: flex; flex-direction: column; gap: 7px; }
.gate-item { border: 1px solid var(--line); border-left-width: 3px; border-radius: 7px; padding: 9px 12px; background: #fff; }
.gate-item.g-blocking { border-left-color: var(--bad); }
.gate-item.g-warning { border-left-color: var(--amber); }
.gate-item.g-info { border-left-color: var(--brand); }
.gate-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.gate-id { margin-left: auto; font-size: 11px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.gate-d { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.gate-f { font-size: 12px; color: var(--ok); margin-top: 4px; }
.gate-ok { padding: 12px; border-radius: 8px; background: var(--ok-l); color: var(--ok); font-size: 13px; }

/* review console */
.rv-list { display: flex; flex-direction: column; }
.rv-card { border-bottom: 1px solid var(--line-2); padding: 14px 16px; }
.rv-card:last-child { border-bottom: 0; }
.rv-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.rv-no { color: var(--muted); font-size: 11.5px; }
.rv-title { color: var(--muted); font-size: 12.5px; }
.rv-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.rv-note { color: var(--ink-2); font-style: italic; }
.rv-find { margin-top: 10px; }
.rv-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- supplier quotation intake & price pool ---------- */
.drop-zone {
  display: block; text-align: center; padding: 26px 18px; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 10px; background: var(--panel-2);
  transition: border-color .15s, background .15s;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--brand); background: var(--brand-l); }
.dz-icon {
  width: 38px; height: 38px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--brand-l); color: var(--brand); display: grid; place-items: center;
  font-size: 19px; font-weight: 700;
}

.pool-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.pool-list { min-width: 0; border-right: 1px solid var(--line-2); }
.pool-side { position: sticky; top: 0; max-height: calc(100vh - 210px); overflow-y: auto; }
.pool-side-in { padding: 14px 16px 20px; }
tr.sel { background: var(--brand-l); }
tr.sel td { background: transparent; }

.pool-line { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
.pl-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 5px; }
.pl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pl-grid label { display: block; font-size: 10.5px; color: var(--muted); }
.pl-grid input { width: 100%; height: 27px; padding: 0 6px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.pl-grid input:disabled { background: var(--panel-2); color: var(--muted); }
.pl-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 5px; }
.pl-sum { border-top: 1px solid var(--line-2); margin-top: 12px; padding-top: 10px; }
.pl-sum > div { display: flex; justify-content: space-between; font-size: 12.5px; padding: 2px 0; }
.pl-sum span { color: var(--muted); }

@media (max-width: 1100px) {
  .pool-wrap { grid-template-columns: 1fr; }
  .pool-list { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .pool-side { position: static; max-height: none; }
}
@media (max-width: 620px) {
  .pl-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- pick quotation lines from supplier quotes ---------- */
.pool-pick { margin-top: 12px; border: 1px solid var(--brand); border-radius: 10px; background: #fff; overflow: hidden; }
.pk-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--brand-l); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pk-head b { font-size: 13px; }
.pk-search { height: 28px; width: 210px; padding: 0 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pk-mk { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.pk-mk input { width: 60px; height: 28px; padding: 0 6px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pk-body { max-height: 306px; overflow-y: auto; }
.pk-foot { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line-2); background: var(--panel-2); flex-wrap: wrap; }
.pk-chk { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; cursor: pointer; }
.pk-table td { padding: 5px 8px; vertical-align: top; }
.pk-table tr.sel td { background: var(--brand-l); }
.pk-body .muted-sm { font-size: 11px; color: var(--muted); margin-top: 1px; }
.ln-src { font-size: 10.5px; color: var(--muted); margin-top: 2px; font-family: ui-monospace, Menlo, monospace; }

/* ---------- Feishu / Lark entry ---------- */
.login-or {
  position: relative; text-align: center; margin: 16px 0 12px; color: var(--muted); font-size: 11.5px;
}
.login-or::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line);
}
.login-or span { position: relative; background: #fff; padding: 0 10px; }
.btn-feishu {
  width: 100%; justify-content: center; background: #2b5fef; border-color: #2b5fef; color: #fff; gap: 8px;
}
.btn-feishu:hover { background: #234fcb; border-color: #234fcb; color: #fff; }

/* ---------- narrow screens (Feishu mobile webview, sidebar panel) ---------- */
@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar {
    position: static; width: auto; flex: none; height: auto;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .brand { padding: 12px 14px 10px; }
  .nav { display: flex; gap: 6px; overflow-x: auto; padding: 6px 10px 10px; }
  .nav-group { margin: 0; display: flex; gap: 6px; flex: 0 0 auto; }
  .nav-group > span { display: none; }
  .nav a { white-space: nowrap; margin: 0; }
  .side-foot { display: flex; align-items: center; padding: 8px 14px; }
  .topbar { height: auto; min-height: 52px; flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
  .topbar .crumb { display: none; }
  .content { padding: 14px 14px 34px; }
  .login-card { width: 100%; max-width: 400px; padding: 26px 22px 20px; }
}
