:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --border: #e5e7eb;
  --border-strong: #d5d9df;
  --text: #16181d;
  --text-2: #4b5563;
  --muted: #8b93a1;
  --accent: #2f6feb;
  --accent-soft: #eaf1ff;
  --ok: #0f9d70;
  --ok-soft: #e6f6f0;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
  --danger: #d33a3a;
  --danger-soft: #fdecec;
  --blocked: #7c3aed;
  --blocked-soft: #f1ebfe;
  --dev: #2563eb;
  --uat: #7c3aed;
  --pre: #d97706;
  --prod: #0f9d70;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --mono: "DejaVu Sans Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, select, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }

.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }

/* ---------------- sidebar ---------------- */
.sidebar {
  background: #10131a;
  color: #c9d1dc;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 6px 18px; }
.logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, #2f6feb, #7c3aed);
  color: #fff; font-weight: 700; font-size: 13px;
  display: grid; place-items: center; letter-spacing: .5px;
}
.brand-name { font-weight: 600; color: #fff; font-size: 14px; }
.brand-sub { font-size: 11px; color: #7b8494; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0; color: #aab3c0;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13.5px;
}
.nav-item:hover { background: #1a1f29; color: #e6ebf2; }
.nav-item.active { background: #1e2735; color: #fff; }
.nav-item .ico { width: 16px; text-align: center; opacity: .85; font-size: 13px; }
.side-foot { margin-top: auto; border-top: 1px solid #1e242f; padding-top: 12px; }
.mini-stat { display: flex; justify-content: space-between; font-size: 11.5px; color: #7b8494; padding: 3px 6px; }
.mini-stat b { color: #cfd6e0; font-family: var(--mono); font-size: 11px; }
.side-note { font-size: 11px; color: #6b7484; padding: 10px 6px 0; line-height: 1.5; }

/* ---------------- workspace ---------------- */
.workspace { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 20;
}
.crumbs { font-weight: 600; font-size: 15px; }
.crumbs small { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.field.inline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.field.inline select {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 7px;
  padding: 5px 8px; font-size: 12.5px; color: var(--text); cursor: pointer;
}
.live { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.live.off i { background: var(--muted); box-shadow: none; }
.btn {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 12.5px;
}
.btn:hover { background: var(--surface-2); border-color: #c3c9d2; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #2059c9; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.main { padding: 20px 22px 60px; min-width: 0; }
.skeleton { color: var(--muted); padding: 40px; text-align: center; }

/* ---------------- generic ---------------- */
.grid { display: grid; gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.card-body { padding: 14px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.empty { color: var(--muted); font-size: 12.5px; padding: 18px; text-align: center; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 500;
  background: #eef1f5; color: var(--text-2); white-space: nowrap;
}
.pill.p0 { background: var(--danger-soft); color: var(--danger); }
.pill.p1 { background: var(--warn-soft); color: var(--warn); }
.pill.p2 { background: #eef1f5; color: var(--text-2); }
.pill.p3 { background: #f1f3f6; color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.blocked { background: var(--blocked-soft); color: var(--blocked); }
.pill.env-dev { background: #e8efff; color: var(--dev); }
.pill.env-uat { background: #f1ebfe; color: var(--uat); }
.pill.env-pre { background: #fdf1de; color: var(--pre); }
.pill.env-prod { background: #e6f6f0; color: var(--prod); }

/* ---------------- kpi ---------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 15px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .0; }
.kpi.k-wip::after { background: var(--accent); opacity: 1; }
.kpi.k-blocked::after { background: var(--blocked); opacity: 1; }
.kpi.k-intake::after { background: var(--warn); opacity: 1; }
.kpi.k-done::after { background: var(--ok); opacity: 1; }
.kpi .label { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.kpi .value { font-size: 26px; font-weight: 650; line-height: 1.25; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------------- pipeline ---------------- */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.lane { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lane-head {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  border-top: 3px solid var(--dev);
}
.lane.ph-todo .lane-head { border-top-color: #94a3b8; }
.lane.ph-in_progress .lane-head { border-top-color: var(--dev); }
.lane.ph-dev_done .lane-head { border-top-color: var(--uat); }
.lane.ph-test_done .lane-head { border-top-color: var(--pre); }
.lane.ph-todo .dot { background: #94a3b8; }
.lane.ph-in_progress .dot { background: var(--dev); }
.lane.ph-dev_done .dot { background: var(--uat); }
.lane.ph-test_done .dot { background: var(--pre); }
.lane.env-test .lane-head { border-top-color: #0ea5e9; }
.lane.env-test .dot { background: #0ea5e9; }
.lane.env-dev .lane-head { border-top-color: var(--dev); }
.lane.env-uat .lane-head { border-top-color: var(--uat); }
.lane.env-pre .lane-head { border-top-color: var(--pre); }
.lane.env-prod .lane-head { border-top-color: var(--prod); }
.lane-title { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.lane-title .dot { width: 7px; height: 7px; border-radius: 50%; }
.lane.env-dev .dot { background: var(--dev); }
.lane.env-uat .dot { background: var(--uat); }
.lane.env-pre .dot { background: var(--pre); }
.lane.env-prod .dot { background: var(--prod); }
.lane-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lane-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 90px; }

.req-card {
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px;
  background: var(--surface-2); cursor: pointer; transition: .12s;
  border-left: 3px solid transparent;
}
.req-card:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow); background: #fff; }
.req-card .top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.req-card .rid { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.req-card .title { font-size: 13px; font-weight: 550; margin: 3px 0 6px; line-height: 1.35; }
.req-card .meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); }
.gate-ok { color: var(--ok); }
.gate-wait { color: var(--warn); }
.gate-line { margin-top: 7px; font-size: 11px; display: flex; align-items: center; gap: 5px; }
.gate-line .bar { flex: 1; height: 3px; border-radius: 2px; background: #eceff3; overflow: hidden; }
.gate-line .bar i { display: block; height: 100%; background: var(--ok); }

.intake-strip { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- tables ---------------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
table.tbl th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px;
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2);
}
table.tbl td { padding: 9px 10px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #fafbfc; }
table.tbl tr.clickable { cursor: pointer; }
.tbl-wrap { overflow: auto; }
.tid { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.input, textarea.input, select.input {
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 10px;
  background: var(--surface); font-size: 12.8px; outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { width: 100%; resize: vertical; min-height: 64px; line-height: 1.5; }

/* ---------------- activity ---------------- */
.feed { display: flex; flex-direction: column; }
.feed-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #f0f2f5; align-items: center; }
.feed-item:last-child { border-bottom: 0; }
.feed-time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.feed-main { min-width: 0; }
.feed-title { font-size: 12.8px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.feed-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.seq { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.actor { font-weight: 600; font-size: 12px; }

/* ---------------- env cards ---------------- */
.env-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.env-card .card-head { border-top: 3px solid var(--dev); }
.env-card.env-uat .card-head { border-top-color: var(--uat); }
.env-card.env-pre .card-head { border-top-color: var(--pre); }
.env-card.env-prod .card-head { border-top-color: var(--prod); }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 4px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12px; word-break: break-all; }

/* ---------------- markdown ---------------- */
.md { font-size: 13px; color: var(--text-2); line-height: 1.65; word-break: break-word; }
.md p { margin: 0 0 8px; }
.md h3, .md h4, .md h5 { margin: 12px 0 6px; color: var(--text); font-size: 13.5px; }
.md ul, .md ol { margin: 4px 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md code { background: #f3f5f8; border: 1px solid #e6e9ee; border-radius: 4px; padding: 0 4px;
  font-family: var(--mono); font-size: 11.8px; color: #b32d2e; }
.md pre { background: #0f1319; color: #d7e0ea; border-radius: 8px; padding: 10px 12px; overflow: auto; }
.md pre code { background: transparent; border: 0; color: inherit; padding: 0; }
.md blockquote { border-left: 3px solid var(--border-strong); margin: 6px 0; padding: 2px 10px; color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
.md a { color: var(--accent); }
.md-accept { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.md-table { overflow-x: auto; margin: 8px 0 10px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.md-table th, .md-table td { border: 1px solid var(--border); padding: 5px 8px; vertical-align: top; }
.md-table th { background: var(--surface-2); font-weight: 600; color: var(--text); }
.md-table tr:nth-child(even) td { background: #fafbfc; }

/* ---------------- repo ---------------- */
.repo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.tree-name { font-weight: 550; }
@media (max-width: 1100px) { .repo-grid { grid-template-columns: 1fr; } }

/* ---------------- drawer ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(16, 24, 40, .35); z-index: 60; animation: fade .12s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 94vw); background: var(--surface);
  z-index: 61; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: slide .16s ease;
}
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.drawer-head { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.drawer-title { font-size: 16px; font-weight: 620; line-height: 1.35; margin: 6px 0; }
.drawer-body { flex: 1; overflow: auto; padding: 16px 18px 40px; }
.drawer-close { position: absolute; right: 14px; top: 12px; background: transparent; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 12px -18px 0; padding: 0 18px; }
.tab { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 550; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; }
.section { margin-top: 18px; }
.section h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.gate-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #eef0f3; font-size: 12.5px; }
.gate-item:last-child { border-bottom: 0; }
.gate-ico { width: 16px; flex: none; text-align: center; }
.timeline { position: relative; padding-left: 16px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 12px 6px; font-size: 12.5px; }
.tl-item::before { content: ""; position: absolute; left: -15px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #c9cfd8; border: 2px solid #fff; }
.tl-item.key::before { background: var(--accent); }
.tl-time { font-size: 11px; color: var(--muted); font-family: var(--mono); }

/* ---------------- modal ---------------- */
.modal {
  position: fixed; z-index: 71; left: 50%; top: 12vh; transform: translateX(-50%);
  width: min(560px, 94vw); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg);
  overflow: hidden; animation: pop .14s ease;
}
@keyframes pop { from { transform: translate(-50%, 8px); opacity: .5; } }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 14.5px; }
.modal-body { padding: 16px 18px; max-height: 62vh; overflow: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.form-row .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.err-box { background: var(--danger-soft); border: 1px solid #f6cfcf; color: #9d2b2b; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 12px; }
.ok-box { background: var(--ok-soft); border: 1px solid #c8ebdd; color: #146c50; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 12px; }

/* ---------------- code ---------------- */
pre.code {
  background: #0f1319; color: #d7e0ea; border-radius: 9px; padding: 12px 14px; overflow: auto;
  font-family: var(--mono); font-size: 11.8px; line-height: 1.6; margin: 0;
}
.code-wrap { position: relative; }
.copy-btn { position: absolute; right: 8px; top: 8px; background: #1c232d; color: #9fb0c4; border: 1px solid #2a3340; border-radius: 6px; font-size: 11px; padding: 3px 8px; cursor: pointer; }

/* ---------------- toast ---------------- */
.toast-root { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast {
  background: #10131a; color: #e8eef7; padding: 9px 14px; border-radius: 9px; font-size: 12.5px;
  box-shadow: var(--shadow-lg); animation: pop .16s ease;
}
.toast.err { background: #7f1d1d; }

@media (max-width: 1180px) {
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .env-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .pipeline { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ 登录页 */
body.auth-mode { background: #0f1115; }
body.auth-mode .sidebar,
body.auth-mode .topbar { display: none; }
body.auth-mode .shell { display: block; }
body.auth-mode .main { padding: 0; max-width: none; height: 100vh; overflow: auto; }

.auth { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }

.auth-visual {
  position: relative; padding: 56px 60px; color: #eef1f6;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(88,140,255,.30), transparent 60%),
    radial-gradient(760px 460px at 88% 92%, rgba(15,157,112,.22), transparent 60%),
    linear-gradient(160deg, #101725 0%, #0d1220 55%, #0b0f18 100%);
  display: flex; flex-direction: column; }
.auth-visual::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 30%, #000 0%, transparent 78%);
}
.auth-brandrow { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: .5px; color: #fff;
  background: linear-gradient(140deg, #4f86ff, #2f6feb 55%, #1f56c4);
  box-shadow: 0 6px 18px rgba(47,111,235,.45); }
.auth-brandname { font-size: 16px; font-weight: 650; letter-spacing: .2px; }
.auth-brandsub { font-size: 12px; color: #8fa0bd; margin-top: 2px; }

.auth-visual h1 {
  position: relative; z-index: 1; margin: 54px 0 16px;
  font-size: 34px; line-height: 1.32; font-weight: 650; letter-spacing: .3px; }
.auth-visual h1 em { font-style: normal; color: #7ea7ff; }
.auth-lead { position: relative; z-index: 1; color: #a9b6cc; font-size: 14px; line-height: 1.75; max-width: 460px; }

.auth-points { position: relative; z-index: 1; list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; }
.auth-points li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; color: #c4cfe0; font-size: 13.5px; line-height: 1.6; }
.auth-points i {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-style: normal; font-size: 12px; color: #9fc0ff;
  background: rgba(94,140,255,.14); border: 1px solid rgba(94,140,255,.28); }
.auth-points b { color: #eef3fb; font-weight: 600; }

.auth-meta { position: relative; z-index: 1; margin-top: auto; padding-top: 40px; font-size: 12px; color: #7a89a3; }
.auth-meta a { color: #9fb4d8; text-decoration: none; border-bottom: 1px dashed rgba(159,180,216,.45); }

.auth-pane {
  display: grid; place-items: center; padding: 48px 36px;
  background: linear-gradient(180deg, #fbfcfe, #f3f5f9); }
.auth-card { width: 100%; max-width: 392px; }
.auth-card h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: .2px; color: #12161d; }
.auth-card .sub { margin: 0 0 26px; font-size: 13px; color: #6b7385; line-height: 1.6; }

.auth-label { display: block; font-size: 12.5px; font-weight: 600; color: #3d4658; margin-bottom: 8px; letter-spacing: .2px; }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input input {
  width: 100%; height: 46px; padding: 0 76px 0 14px; font-size: 14px;
  border: 1px solid #d9dfe8; border-radius: 10px; background: #fff; color: #12161d;
  outline: none; transition: border-color .15s, box-shadow .15s; }
.auth-input input:focus { border-color: #2f6feb; box-shadow: 0 0 0 3px rgba(47,111,235,.13); }
.auth-input input.bad { border-color: #d33a3a; box-shadow: 0 0 0 3px rgba(211,58,58,.10); }
.auth-eye {
  position: absolute; right: 8px; height: 32px; padding: 0 10px; font-size: 12px;
  border: 0; border-radius: 7px; background: #eef1f6; color: #4b5563; cursor: pointer; }
.auth-eye:hover { background: #e4e8ef; }

.auth-err {
  display: none; margin-top: 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.55;
  border-radius: 9px; color: #9f1d1d; background: #fdecec; border: 1px solid #f6c9c9; }
.auth-err.show { display: block; }

.auth-go {
  width: 100%; height: 46px; margin-top: 18px; font-size: 14.5px; font-weight: 600;
  border-radius: 10px; border: 0; color: #fff; cursor: pointer;
  background: linear-gradient(140deg, #3f7bf0, #2f6feb 60%, #2559cf);
  box-shadow: 0 8px 20px rgba(47,111,235,.28); transition: transform .06s, box-shadow .15s, opacity .15s; }
.auth-go:hover { box-shadow: 0 10px 26px rgba(47,111,235,.34); }
.auth-go:active { transform: translateY(1px); }
.auth-go[disabled] { opacity: .7; cursor: default; box-shadow: none; }

.auth-hint { margin-top: 18px; font-size: 12px; line-height: 1.7; color: #7b8496; }
.auth-hint code { font-family: var(--mono); font-size: 11.5px; background: #eceff4; padding: 1px 5px; border-radius: 5px; color: #3d4658; }
.auth-foot { margin-top: 28px; font-size: 11.5px; color: #98a1b0; text-align: center; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-pane { min-height: 100vh; }
}


/* ---------------- 映射图 / 标签 ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
  line-height: 1.7; border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--text-2);
}
.chip.mod { border-color: #cfe3d6; background: #eef7f1; color: #17603f; font-family: var(--mono); font-size: 11px; }
.chip.req { border-color: #d4def7; background: #eef3ff; color: #24479e; }
.chip.doc { border-color: #f0dfc0; background: #fdf6e9; color: #8a5a12; }
.chip.img { border-color: #e3d5f7; background: #f4eefe; color: #5b2e9e; }
.chip.cm { border-color: var(--border-strong); background: #f3f4f6; color: #384152; font-family: var(--mono); }
.chip.more { background: transparent; border-style: dashed; color: var(--muted); }

.map-wrap {
  overflow: auto; max-height: 620px; padding: 6px 4px 10px;
  background:
    radial-gradient(circle at 1px 1px, rgba(140, 150, 165, .18) 1px, transparent 0) 0 0 / 22px 22px;
  border-top: 1px solid var(--border);
}
.map-canvas { position: relative; }
.map-svg { position: absolute; inset: 0; pointer-events: none; }
.map-edge { fill: none; stroke: #c3ccd9; stroke-width: 1.2; opacity: .85; }
.map-edge.design { stroke: #d9b46a; }
.map-edge.code { stroke: #7fbf9b; }
.map-edge.build { stroke: #a98fdc; }
.map-edge.commit { stroke: #9aa4b5; stroke-dasharray: 3 3; }
.map-col-title {
  position: absolute; top: 12px; font-size: 12px; font-weight: 600; color: var(--muted);
  letter-spacing: .3px;
}
.map-node {
  position: absolute; border-radius: 9px; padding: 6px 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05); overflow: hidden;
  transition: border-color .12s, box-shadow .12s, transform .06s;
}
.map-node:hover { border-color: var(--accent); box-shadow: 0 6px 16px rgba(47, 111, 235, .16); }
.map-node:active { transform: translateY(1px); }
.map-node .nlabel { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-node .nsub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.map-node.kind-document { border-left: 3px solid #d9a441; }
.map-node.kind-requirement { border-left: 3px solid var(--accent); }
.map-node.kind-module { border-left: 3px solid #3f9c6d; font-family: var(--mono); }
.map-node.kind-image { border-left: 3px solid #8b5cf6; }
.map-node.kind-commit { border-left: 3px solid #94a3b8; }
.map-node.orphan { border-style: dashed; background: #fffdf8; }
