/* ==========================================================================
   招标全流程工作台 — 设计系统
   深墨侧栏 / 浅灰画布 / 靛蓝主色 / 卡片化信息层级
   ========================================================================== */
:root {
  --ink-900: #0d1424;
  --ink-800: #141d31;
  --ink-700: #1d2740;
  --ink-500: #56617a;
  --ink-400: #7b869e;
  --ink-300: #a7b0c4;

  --brand-700: #3730a3;
  --brand-600: #4338ca;
  --brand-500: #4f46e5;
  --brand-100: #e7e6fd;
  --brand-50: #f2f1fe;

  --canvas: #f4f5f9;
  --surface: #ffffff;
  --line: #e5e8f0;
  --line-soft: #eef0f6;

  --green-600: #047857;
  --green-50: #e8f7f1;
  --amber-600: #b45309;
  --amber-50: #fdf4e3;
  --rose-600: #be123c;
  --rose-50: #fdeef1;
  --blue-600: #0369a1;
  --blue-50: #e8f4fb;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-md: 0 10px 26px rgba(16, 24, 40, .08);
  --sidebar-w: 244px;
  --font: "Segoe UI", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei",
          "PingFang SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-800);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
svg { flex: none; }
::selection { background: var(--brand-100); }

/* ---------------------------------------------------------------- 布局 */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--ink-900), #121a2b 60%, #101828);
  color: #c9d1e3;
  padding: 18px 14px;
  z-index: 40;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 4px 8px 20px;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .38);
}
.brand-text strong {
  display: block; color: #fff; white-space: nowrap;
  font-family: "FangSong", "仿宋", "FangSong_GB2312", "STFangsong", "SimSun", serif;
  font-size: 16.5px; font-weight: 700; letter-spacing: .02em; line-height: 1.3;
}

.nav-group { margin-top: 14px; }
.nav-title {
  font-size: 10.5px; letter-spacing: .16em; color: #6f7b95;
  padding: 0 12px 8px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: 10px; color: #b9c2d6; font-weight: 500;
  transition: background .16s, color .16s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, .26), rgba(99, 102, 241, .08));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .28);
}
.nav-item.active svg { opacity: 1; color: #a5b4fc; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.sidebar-foot {
  margin-top: auto; padding: 14px 10px 2px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 11.5px; color: #75819b;
}
.sidebar-foot .dot { color: #34d399; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar .crumbs { display: flex; align-items: center; gap: 7px; color: var(--ink-400); font-size: 12.5px; }
.topbar .crumbs b { color: var(--ink-800); font-weight: 600; }
.topbar-search { margin-left: auto; position: relative; width: 260px; }
.topbar-search input {
  width: 100%; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: #f7f8fb; padding: 0 12px 0 34px; font: inherit; font-size: 13px;
  color: var(--ink-800); outline: none; transition: border .15s, background .15s;
}
.topbar-search input:focus { border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px var(--brand-50); }
.topbar-search svg { position: absolute; left: 11px; top: 9px; width: 17px; height: 17px; color: var(--ink-400); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; color: var(--ink-500); cursor: pointer;
}
.icon-btn:hover { border-color: #cfd5e3; color: var(--ink-800); }

.content { padding: 26px 28px 60px; max-width: 1500px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; }
.page-head .sub { color: var(--ink-400); font-size: 13px; margin-top: 4px; }
.page-actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 组件 */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
}
.card-head h3 { font-size: 14.5px; }
.card-head .hint { color: var(--ink-400); font-size: 12px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 20px; }
.card-body.tight { padding: 14px 20px; }
.card + .card { margin-top: 18px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; }
.grid-main > div > .card:first-child { margin-top: 0; }
.card.mt-4 { margin-top: 18px; }

.stat {
  padding: 18px 20px; display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.stat .ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
}
.stat .num { font-size: 25px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat .lab { font-size: 12.5px; color: var(--ink-400); margin-top: 2px; }
.stat .ic svg { width: 21px; height: 21px; }

.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); background: #fff; color: var(--ink-700);
  font: inherit; font-size: 13px; font-weight: 550; cursor: pointer;
  transition: transform .12s, background .15s, border .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #cfd5e3; background: #fbfbfd; color: var(--ink-900); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, #5650ef, var(--brand-500));
  border-color: var(--brand-600); color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .24);
}
.btn-primary:hover { background: var(--brand-600); color: #fff; border-color: var(--brand-700); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-500); }
.btn-ghost:hover { background: #eef0f6; border-color: transparent; }
.btn-danger { color: var(--rose-600); border-color: #f3cfd7; background: #fff; }
.btn-danger:hover { background: var(--rose-50); border-color: #eeb3c0; color: var(--rose-600); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: #f0f2f7; color: var(--ink-500);
  white-space: nowrap;
}
.badge.green { background: var(--green-50); color: var(--green-600); }
.badge.amber { background: var(--amber-50); color: var(--amber-600); }
.badge.rose { background: var(--rose-50); color: var(--rose-600); }
.badge.blue { background: var(--blue-50); color: var(--blue-600); }
.badge.brand { background: var(--brand-50); color: var(--brand-600); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 7px;
  background: #f4f5f9; color: var(--ink-500); font-size: 12px;
  border: 1px solid transparent;
}
.chip.active { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-100); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.span-2 { grid-column: span 2; }
.field.span-3 { grid-column: span 3; }
.field > label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-500);
  display: flex; align-items: center; gap: 5px;
}
.field > label .req { color: var(--rose-600); }
.field .tip { font-size: 11.5px; color: var(--ink-300); font-weight: 400; }
input[type="text"], input[type="tel"], input[type="url"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font: inherit; font-size: 13.5px; color: var(--ink-800);
  outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50);
}
input::placeholder, textarea::placeholder { color: #b3bacb; }
textarea { min-height: 84px; resize: vertical; line-height: 1.65; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b869e' stroke-width='2.4'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px;
}
.input-row { display: flex; gap: 8px; }
.input-row > input { flex: 1; min-width: 0; }
.input-row > select { width: 92px; flex: none; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; }
.switch input { display: none; }
.switch .track {
  width: 38px; height: 21px; border-radius: 999px; background: #d9deea;
  position: relative; transition: background .18s;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: transform .18s;
}
.switch input:checked + .track { background: var(--brand-500); }
.switch input:checked + .track::after { transform: translateX(17px); }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-700); }
.check input { width: 16px; height: 16px; accent-color: var(--brand-500); }

/* 表格 */
.table-wrap { overflow: auto; border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th {
  text-align: left; font-size: 11.5px; font-weight: 650; letter-spacing: .04em;
  color: var(--ink-400); text-transform: uppercase;
  padding: 10px 14px; background: #fafbfd; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.table tr:last-child td { border-bottom: 0; }
table.table tbody tr { transition: background .12s; }
table.table tbody tr:hover { background: #fafbff; }
table.table td.num { font-variant-numeric: tabular-nums; }
.table-empty { padding: 48px 20px; text-align: center; color: var(--ink-400); }
.table-empty .big { font-size: 30px; margin-bottom: 8px; opacity: .55; }

/* 进度 */
.progress { height: 6px; border-radius: 999px; background: #eceef5; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #4f46e5); }
.progress.green > i { background: linear-gradient(90deg, #34d399, #059669); }

/* 时间轴（项目流程） */
.timeline { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding: 4px 2px 8px; }
.tl-step { position: relative; flex: 1; min-width: 96px; text-align: center; padding: 0 4px; }
.tl-step::before {
  content: ""; position: absolute; top: 15px; left: 0; right: 0; height: 2px;
  background: var(--line);
}
.tl-step:first-child::before { left: 50%; }
.tl-step:last-child::before { right: 50%; }
.tl-step.done::before { background: #a5b4fc; }
.tl-dot {
  position: relative; z-index: 1; width: 30px; height: 30px; margin: 0 auto 8px;
  border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line); color: var(--ink-300);
  font-size: 12px; font-weight: 700;
}
.tl-step.done .tl-dot { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.tl-step.current .tl-dot {
  border-color: var(--brand-500); color: var(--brand-600);
  box-shadow: 0 0 0 4px var(--brand-50);
}
.tl-name { font-size: 12px; color: var(--ink-400); }
.tl-step.done .tl-name { color: var(--ink-700); font-weight: 600; }
.tl-step.current .tl-name { color: var(--brand-600); font-weight: 650; }
.tl-date { font-size: 10.5px; color: var(--ink-300); margin-top: 1px; }

/* 项目卡 */
.project-row {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  transition: box-shadow .16s, border .16s, transform .16s;
}
.project-row:hover { box-shadow: var(--shadow-sm); border-color: #d8ddeb; transform: translateY(-1px); }
.project-row + .project-row { margin-top: 10px; }
.project-row .title { font-weight: 650; font-size: 14px; color: var(--ink-900); }
.project-row .meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px;
  color: var(--ink-400); font-size: 12px; }
.project-row .meta span { display: inline-flex; align-items: center; gap: 4px; }
.project-row .side { margin-left: auto; text-align: right; flex: none; min-width: 132px; }
.project-row .pct { font-size: 12px; color: var(--ink-400); margin-top: 5px; }

/* 详情页 tab */
.detail-layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 20px; align-items: start; }
.tab-nav { position: sticky; top: 84px; padding: 8px; }
.tab-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 8px; color: var(--ink-500);
  font-size: 13px; font-weight: 500; margin-bottom: 2px;
}
.tab-nav a:hover { background: #f4f6fb; color: var(--ink-800); }
.tab-nav a.active { background: var(--brand-50); color: var(--brand-600); font-weight: 650; }
.tab-nav a .idx {
  width: 20px; height: 20px; border-radius: 6px; background: #f0f2f7;
  display: grid; place-items: center; font-size: 10.5px; color: var(--ink-400);
}
.tab-nav a.active .idx { background: var(--brand-500); color: #fff; }
.tab-nav .divider { height: 1px; background: var(--line-soft); margin: 8px 6px; }

/* 公告/进度清单 */
.check-line {
  display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px dashed var(--line-soft); font-size: 13px;
}
.check-line:last-child { border-bottom: 0; }
.check-line .tick {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; color: #fff; font-size: 11px; flex: none;
}
.check-line.done .tick { background: var(--green-600); border-color: var(--green-600); }
.check-line .u { margin-left: auto; font-size: 12px; color: var(--ink-400); }

/* 空状态 */
.empty { text-align: center; padding: 42px 20px; color: var(--ink-400); }
.empty .icon {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
  background: #f2f4fa; display: grid; place-items: center; color: #9aa4bb;
}
.empty h4 { color: var(--ink-700); margin-bottom: 4px; }
.empty p { font-size: 12.5px; }

/* flash */
.flash-stack { position: fixed; top: 76px; right: 24px; z-index: 80; display: flex; flex-direction: column; gap: 9px; }
.flash {
  min-width: 260px; max-width: 380px; padding: 11px 14px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md);
  display: flex; gap: 9px; font-size: 13px; animation: slideIn .22s ease both;
}
.flash.success { border-left: 3px solid var(--green-600); }
.flash.error { border-left: 3px solid var(--rose-600); }
.flash.warn { border-left: 3px solid var(--amber-600); }
.flash.info { border-left: 3px solid var(--blue-600); }
.flash svg { width: 17px; height: 17px; margin-top: 2px; }
.flash.success svg { color: var(--green-600); }
.flash.error svg { color: var(--rose-600); }
.flash.warn svg { color: var(--amber-600); }
.flash.info svg { color: var(--blue-600); }
@keyframes slideIn { from { opacity: 0; transform: translateX(12px); } }
.flash { position: relative; padding-right: 30px; align-items: flex-start; }
.flash.leaving { opacity: 0; transform: translateX(14px); transition: opacity .24s, transform .24s; }
.flash-x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border: 0; background: transparent; color: var(--ink-300); font-size: 16px;
  line-height: 20px; border-radius: 6px; cursor: pointer; padding: 0;
}
.flash-x:hover { background: #f1f3f9; color: var(--ink-700); }

/* 模态框 */
.modal { display: none; position: fixed; inset: 0; z-index: 90;
  background: rgba(13, 20, 36, .46); padding: 40px 16px; overflow: auto; }
.modal.show { display: block; }
.modal-box {
  width: 100%; max-width: 560px; margin: 0 auto; background: #fff;
  border-radius: 16px; box-shadow: 0 24px 60px rgba(9, 14, 26, .28);
  animation: pop .18s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal-box.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-size: 15px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px;
  border-top: 1px solid var(--line-soft); background: #fcfcfe; border-radius: 0 0 16px 16px; }

/* 文档预览 */
.doc-preview {
  background: #fff; padding: 34px 40px; border: 1px solid var(--line);
  border-radius: 4px; box-shadow: var(--shadow-sm);
  font-family: "SimSun", "Songti SC", serif; font-size: 14.5px; line-height: 1.9;
  color: #111;
}
.doc-preview p { margin: 0 0 6px; min-height: 1.9em; }
.doc-preview .align-center { text-align: center; }
.doc-preview .align-right { text-align: right; }
.doc-preview .align-justify { text-align: justify; }
.doc-preview u { text-decoration: underline; }
.doc-table-wrap { margin: 10px 0; overflow-x: auto; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doc-table td { border: 1px solid #b9bec9; padding: 6px 8px; vertical-align: top; }
.doc-box { display: inline-block; width: 12px; height: 12px; border: 1px solid #333; margin-right: 3px; }
.doc-box.checked { background: #333; color: #fff; font-size: 10px; line-height: 12px; text-align: center; }
.preview-error { color: var(--rose-600); }

/* 模板库 */
.tpl-layout { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 20px; align-items: start; }
.tree { padding: 12px 12px 14px; }
.tree-item {
  display: flex; align-items: center; gap: 7px; padding: 7px 9px;
  border-radius: 8px; color: var(--ink-500); font-size: 13px;
}
.tree-item:hover { background: #f5f7fb; color: var(--ink-800); }
.tree-item.active { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.tree-item .count { margin-left: auto; font-size: 11px; color: var(--ink-300); flex: none; min-width: 22px; text-align: right; }
.tree-item .folder { width: 16px; height: 16px; color: #b3bbcd; }
.tree-item.active .folder { color: var(--brand-500); }

.tpl-card {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.tpl-card + .tpl-card { margin-top: 9px; }
.tpl-card:hover { border-color: #d8ddeb; box-shadow: var(--shadow-xs); }
.tpl-icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  background: #eef2ff; color: #4f46e5; letter-spacing: .02em;
}
.tpl-card .name { font-weight: 600; font-size: 13.5px; }
.tpl-card .sub { font-size: 11.5px; color: var(--ink-400); margin-top: 1px; }
.tpl-card .acts { margin-left: auto; display: flex; gap: 6px; }

.editor-para { border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 11px; margin-bottom: 9px; }
.editor-para .where { display: flex; align-items: center; gap: 8px; font-size: 11px;
  color: var(--ink-400); margin-bottom: 5px; }
.editor-para textarea { border: 0; padding: 0; min-height: 44px; background: transparent;
  box-shadow: none; font-size: 13.5px; }
.editor-para textarea:focus { box-shadow: none; }
.editor-para.has-ph { border-color: #c7d2fe; background: #fbfbff; }

.ph-chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px;
  border-radius: 6px; background: #eef2ff; color: #4338ca; font-size: 11.5px;
  border: 1px dashed #c7d2fe; cursor: pointer; font-family: ui-monospace, Consolas, monospace;
}
.ph-chip:hover { background: #e0e7ff; }

/* 待办 */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.col { background: #eef0f7; border-radius: var(--radius-lg); padding: 12px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.col-head .name { font-weight: 650; font-size: 13.5px; }
.col-head .cnt { margin-left: auto; font-size: 11.5px; color: var(--ink-400); }
.todo-card {
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 13px; box-shadow: var(--shadow-xs);
}
.todo-card + .todo-card { margin-top: 9px; }
.todo-card.done { opacity: .62; }
.todo-card.done .title { text-decoration: line-through; }
.todo-card .title { font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.todo-card .meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; font-size: 11.5px; color: var(--ink-400); }
.todo-card .subs { margin-top: 9px; border-top: 1px dashed var(--line-soft); padding-top: 8px; }
.todo-card .sub {
  display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-500);
  padding: 3px 0;
}
.todo-card .sub input { width: 14px; height: 14px; accent-color: var(--brand-500); }
.todo-card .sub.done span { text-decoration: line-through; color: var(--ink-300); }
.todo-card .sub .del { margin-left: auto; color: var(--ink-300); }
.todo-card .acts { display: flex; gap: 3px; margin-top: 7px; }
.pin { color: var(--amber-600); }

/* 日历 */
.cal { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.cal th { padding: 9px 4px; font-size: 11.5px; color: var(--ink-400); font-weight: 600; }
.cal td { border: 1px solid var(--line-soft); vertical-align: top; height: 106px; padding: 6px; }
.cal td.blank { background: #fafbfd; border-color: transparent; }
.cal td.today { background: #f5f6ff; box-shadow: inset 0 0 0 1px #c7d2fe; }
.cal .dnum { font-size: 12px; color: var(--ink-400); font-weight: 600; }
.cal td.today .dnum { color: var(--brand-600); }
.cal .ev {
  display: block; margin-top: 4px; padding: 3px 6px; border-radius: 5px;
  background: var(--brand-50); color: var(--brand-700); font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: inherit; text-align: left; width: 100%;
}
.cal .ev b { font-weight: 650; }
.cal .ev.green { background: var(--green-50); color: var(--green-600); }
.cal .ev.custom {
  background: var(--amber-50); color: var(--amber-600); border: 1px dashed #f0c987;
  cursor: pointer;
}
.cal .ev.custom:hover { background: #fbe9cc; }

/* 临时日程行（右侧列表） */
.ev-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; margin: 0 -10px; border: 0; border-radius: 8px;
  background: transparent; font: inherit; text-align: left; cursor: pointer;
  color: var(--ink-700);
}
.ev-row:hover { background: #f7f9fd; }
.ev-row .mini-link { margin-left: auto; }

/* 登录? (无) / 其他 */
.list-plain { display: flex; flex-direction: column; }
.list-plain > * + * { border-top: 1px solid var(--line-soft); }
.mini-label { font-size: 11px; color: var(--ink-400); letter-spacing: .06em; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 13px; }
.kv .k { color: var(--ink-400); }
.kv .v { color: var(--ink-800); text-align: right; word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.muted { color: var(--ink-400); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 18px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 18px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.grow { flex: 1; min-width: 0; }
.text-right { text-align: right; }

/* 提示条 */
.notice {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: var(--amber-50); color: #92400e; font-size: 12.5px;
  border: 1px solid #f7e3bd;
}
.notice svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.notice.info { background: var(--blue-50); color: #075985; border-color: #cfe8f6; }
.notice.brand { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }

/* 响应式 */
.menu-btn { display: none; }
@media (max-width: 1450px) {
  .tpl-layout { grid-template-columns: 360px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 1240px) {
  .tpl-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 14px; }
  .tree { padding: 10px 9px 12px; }
  .tree-children { margin-left: 6px; }
  .tree-item { padding: 5px 5px; gap: 4px; }
  .tree-children .tree-item { font-size: 12.4px; }
  .tree-children .tree-children .tree-item { font-size: 12.2px; }
  .tree-item .count { min-width: 18px; font-size: 10.5px; }
}
@media (max-width: 1180px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .detail-layout, .tpl-layout { grid-template-columns: minmax(0, 1fr); }
  .tab-nav { position: static; display: flex; gap: 4px; overflow-x: auto; }
  .tab-nav a { white-space: nowrap; }
  .tab-nav .divider { display: none; }
  .content { padding: 20px 16px 50px; }
  .topbar { padding: 0 16px; }
  .topbar-search { width: 190px; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .form-grid.three { grid-template-columns: minmax(0, 1fr); }
  .field.span-2, .field.span-3 { grid-column: span 1; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .topbar-search { display: none; }
  .project-row { flex-wrap: wrap; }
  .project-row .side { margin-left: 0; text-align: left; }
  .form-grid .input-row { flex-wrap: wrap; }
}
@media print {
  .sidebar, .topbar, .page-actions, .flash-stack { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
}

/* ---------------------------------------------------------------- 模板矩阵 */
.view-tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-xs);
}
.view-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 7px;
  font-size: 13px; color: var(--ink-500); font-weight: 550;
}
.view-tab svg { width: 15px; height: 15px; }
.view-tab:hover { background: #f5f7fb; color: var(--ink-800); }
.view-tab.active { background: var(--brand-600); color: #fff; }
.view-tab.active:hover { background: var(--brand-600); color: #fff; }

.stage-switch {
  display: inline-flex; gap: 2px; padding: 3px;
  background: #f4f6fb; border-radius: 9px;
}
.stage-switch a {
  padding: 6px 15px; border-radius: 7px; font-size: 12.5px;
  color: var(--ink-500); font-weight: 550;
}
.stage-switch a:hover { background: #fff; color: var(--ink-800); }
.stage-switch a.active {
  background: #fff; color: var(--brand-600);
  box-shadow: var(--shadow-xs);
}

.matrix-filter {
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
}
.matrix-filter .field { min-width: 128px; margin: 0; }
.matrix-filter label { font-size: 11.5px; color: var(--ink-400); margin-bottom: 4px; }
.matrix-filter select { height: 34px; font-size: 13px; padding: 0 10px; }

.matrix-list { display: flex; flex-direction: column; }
.matrix-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
}
.matrix-row:last-child { border-bottom: 0; }
.matrix-row:hover { background: #fafbfe; }
.matrix-row.gap { background: #fffdf8; }
.matrix-main { flex: 1; min-width: 0; }
.matrix-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13.5px;
}
.matrix-path {
  font-size: 11.5px; color: var(--ink-400); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.matrix-slots {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
}
.slot {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 2px 8px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--ink-500); background: #fff;
}
.slot i { font-style: normal; font-size: 10px; color: var(--ink-300); }
.slot.specific, .slot.business, .slot.category, .slot.universal {
  background: var(--green-50); border-color: #c7ead9; color: var(--green-600);
}
.slot.universal { background: var(--blue-50); border-color: #cfe8f6; color: var(--blue-600); }
.slot.category { background: #eef2ff; border-color: #dbe1ff; color: var(--brand-600); }
.slot.business { background: #f0fdf9; border-color: #c7ead9; color: var(--green-600); }
.slot.missing { background: var(--amber-50); border-color: #f7e3bd; color: var(--amber-600); }
.matrix-missing {
  margin-top: 7px; font-size: 11.5px; color: var(--amber-600);
}
.matrix-acts {
  display: flex; flex-direction: column; gap: 6px; flex: none;
  align-items: stretch; min-width: 96px;
}
.matrix-acts .btn { justify-content: center; }

.combo-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; padding: 2px 9px; border-radius: 20px;
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid var(--brand-100);
}
.level-pill {
  display: inline-block; font-size: 11px; padding: 1px 8px;
  border-radius: 20px; background: #f4f6fb; color: var(--ink-500);
  border: 1px solid var(--line);
}

/* 模板编辑：变量清单 */
.var-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.var-table td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.var-table tr:last-child td { border-bottom: 0; }
.var-table .alias { color: var(--ink-500); white-space: nowrap; }
.var-table .key { color: var(--ink-300); font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.var-hit { background: var(--green-50); color: var(--green-600); }

.tree-gap {
  font-size: 10px; padding: 0 6px; border-radius: 20px;
  background: var(--amber-50); color: var(--amber-600);
  border: 1px solid #f7e3bd; line-height: 17px;
}
.tree-ok { font-size: 11px; color: var(--green-600); }

.mx-upload {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.mx-upload-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.mx-upload-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.mx-upload-fields .field { margin: 0; min-width: 118px; }
.mx-upload-fields label { font-size: 11.5px; color: var(--ink-400); margin-bottom: 3px; }
.mx-upload-fields select, .mx-upload-fields input[type=file] { height: 34px; font-size: 12.5px; }

.mx-new {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.inline-form { display: inline; margin: 0; }

/* 槽位/术语明细表 */
.matrix-table-wrap { overflow-x: auto; margin: 0 -4px; }
.matrix-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 720px; }
.matrix-table th {
  text-align: left; font-weight: 600; color: var(--ink-400);
  padding: 7px 9px; background: #f7f9fd; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.matrix-table td {
  padding: 7px 9px; border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.matrix-table tr:last-child td { border-bottom: 0; }
.matrix-table tbody tr:hover { background: #fafbfe; }
.matrix-table .mono { font-size: 11.5px; color: var(--ink-600, var(--ink-500)); }

/* 矩阵内“按槽位新建”一行表单 */
.mx-new-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mini-select, .mini-input {
  height: 31px; font-size: 12.5px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
}
.mini-input { min-width: 170px; }
.slot-note { font-size: 10px; color: var(--ink-300); margin-left: 3px; }

.mx-new-block {
  display: block; padding: 14px 16px;
  border-bottom: 1px solid var(--line); background: #f7f9fd;
}
.mx-new-block .mx-new-form { margin-top: 8px; }

/* ---------------------------------------------------------------- 模板库多级目录树 */
.tree { max-height: calc(100vh - 150px); overflow-y: auto; overflow-x: hidden; }
.tree-item { gap: 5px; padding: 6px 7px; border-radius: 7px; font-size: 13px; }
.tree-caret {
  width: 17px; height: 17px; flex: none; border: 0; background: transparent;
  color: var(--ink-300); cursor: pointer; font-size: 10px; line-height: 1;
  display: grid; place-items: center; border-radius: 4px; padding: 0;
  transition: transform .15s ease, background .15s ease;
}
.tree-caret:hover { background: #e9edf6; color: var(--ink-600, var(--ink-500)); }
.tree-caret.open { transform: rotate(90deg); }
.tree-caret.empty { cursor: default; }
.tree-caret.empty::before { content: "·"; color: var(--line); }
.tree-link { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; color: inherit; }
.tree-link:hover { color: inherit; }
.tree-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-sub {
  font-size: 9px; color: var(--ink-300); flex: none; line-height: 15px; opacity: .9;
}
.tree-children { display: none; margin-left: 8px; border-left: 1px dashed var(--line); padding-left: 0; }
.tree-children.open { display: block; }
.tree-children .tree-item { font-size: 13px; }
.tree-children .tree-children .tree-item { font-size: 12.7px; }
.tree-item.active { background: var(--brand-50); }
.tree-item.active .tree-name { font-weight: 650; }
.tree, .tree * { letter-spacing: 0; }

.tree-tools { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-400); margin: 0 2px 7px; }
.tree-tools .muted { flex: 1; }
.mini-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink-500);
  border-radius: 6px; font-size: 11px; padding: 1px 7px; cursor: pointer; line-height: 18px;
}
.mini-btn:hover { border-color: var(--brand-500); color: var(--brand-600); }

/* 面包屑 */
.crumbs-bar { font-size: 11.5px; color: var(--ink-400); display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.crumbs-bar .sep { color: var(--ink-300); padding: 0 2px; }
.crumbs-bar a { color: var(--ink-500); }
.crumbs-bar a:hover { color: var(--brand-600); }

/* 勾选与批量操作 */
.pick-all { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-500); white-space: nowrap; }
.tpl-card > input.pick { margin: 0 2px 0 0; flex: none; width: 15px; height: 15px; }
.subgroup-head { display: flex; align-items: center; gap: 8px; }
.subgroup-link { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; color: inherit; }
.subgroup-link:hover { color: var(--brand-600); }
.subgroup-link .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-link { font-size: 11px; color: var(--ink-400); white-space: nowrap; }
.mini-link:hover { color: var(--brand-600); }

/* 目录浏览：子目录里的模板 */
.subgroup { border-bottom: 1px solid var(--line-soft); padding: 4px 0 8px; }
.subgroup:last-child { border-bottom: 0; padding-bottom: 0; }
.subgroup-head {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; margin: 0 -14px 4px;
  background: #f7f9fd; color: var(--ink-600, var(--ink-500));
  font-size: 12.5px; border-radius: 6px;
}
.subgroup-head:hover { background: #eef2fb; color: var(--ink-800); }
.subgroup-head svg { width: 15px; height: 15px; flex: none; }
.tpl-card.compact { padding: 7px 14px; }
.tpl-card.compact .tpl-icon { width: 30px; height: 22px; font-size: 8.5px; }

/* 子目录分组行：名称省略、操作不挤压 */
.subgroup-head { flex-wrap: nowrap; gap: 8px; }
.subgroup-link svg { flex: none; }
.subgroup-head .badge { flex: none; }
.subgroup-head .mini-link { flex: none; }
.subgroup-head .mono { font-size: 11.5px; }
/* 模板卡片：标题与按钮各占一行，避免按钮挤到名字上 */
.tpl-card.compact { flex-wrap: wrap; row-gap: 6px; }
.tpl-card.compact .acts { margin-left: auto; gap: 5px; }
.tpl-card.compact .acts .btn { height: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; }
.tpl-card .acts .btn-sm { white-space: nowrap; }
@media (max-width: 1320px) {
  .tpl-card { flex-wrap: wrap; row-gap: 6px; }
  .tpl-card .acts { width: 100%; margin-left: 0; justify-content: flex-end; }
}

/* 分段选择（计费方式） */
.seg {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  background: #f2f4fa; border: 1px solid var(--line-soft); border-radius: 10px;
}
.seg button {
  border: 0; background: transparent; color: var(--ink-500); cursor: pointer;
  font-size: 12.5px; padding: 7px 12px; border-radius: 7px; white-space: nowrap;
  font-family: inherit; transition: background .15s, color .15s, box-shadow .15s;
}
.seg button:hover { color: var(--ink-700); background: #e8ecf6; }
.seg button.active {
  background: #fff; color: var(--brand-700); font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }

/* ---------------------------------------------------------------- 招标轮次 */
.tab-nav a .nav-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--rose-600);
  margin-left: auto; flex: none;
}
.round-banner {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; margin-bottom: 18px;
  background: var(--amber-50); border: 1px solid #f7e3bd; border-radius: 12px;
}
.round-banner.rose { background: var(--rose-50); border-color: #f3cfd7; }
.round-banner .big {
  flex: none; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: var(--amber-600); padding: 3px 10px; border-radius: 999px;
  background: #fff; border: 1px solid currentColor;
}
.round-banner.rose .big { color: var(--rose-600); }
.round-banner .txt { font-size: 13px; color: var(--ink-700); min-width: 0; }
.rose-text { color: var(--rose-600); font-weight: 600; }
.flow-tip { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); }
.flow-tip:last-child { border-bottom: 0; }
.flow-tip .n {
  flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid;
  place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--brand-50); color: var(--brand-600);
}
.round-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  padding: 1px 8px; border-radius: 999px; background: var(--brand-50);
  color: var(--brand-600); font-weight: 600;
}

/* ---------------------------------------------------------------- 槽位检查 · 模板更新标记 */
.slot-sync-note {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 10px; border-radius: 9px;
  background: var(--amber-50); border: 1px solid #f3ddb4;
  color: #8a5a10; font-size: 12.5px; line-height: 1.6;
}
.slot-sync-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--amber-600); }
.check-line.slot-changed { background: #fffcf4; border-radius: 8px; }
.check-line .slot-files { display: block; margin-top: 3px; line-height: 1.9; }
.check-line .slot-file { display: inline-flex; align-items: center; gap: 5px; }
.check-line .slot-file .badge { height: 17px; font-size: 10.5px; padding: 0 6px; }

/* 槽位检查：本次不生成的模板 */
.slot-excluded {
  margin-top: 10px; padding: 9px 11px; border-radius: 9px;
  background: #f6f7fb; border: 1px dashed var(--line); font-size: 12px;
}
.slot-excluded-head { color: var(--ink-500); margin-bottom: 5px; font-weight: 600; }
.slot-excluded-row {
  display: flex; gap: 8px; align-items: baseline; padding: 3px 0;
  color: var(--ink-400); flex-wrap: wrap;
}
.slot-excluded-row .nm { color: var(--ink-700); }
.slot-excluded-row .why { font-size: 11.5px; }


/* ==========================================================================
   登录页（独立布局，不套侧栏）
   ========================================================================== */
.auth-body {
  min-height: 100vh;
  background: var(--canvas);
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-wrap {
  width: 100%;
  max-width: 1000px;
  /* 高度跟着内容走：内容多就长，别裁掉左侧要点 */
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .04);
}
.auth-side { min-height: 0; }

/* 左：深墨品牌区，与侧栏同一套视觉 */
.auth-side {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 34px 26px;
  color: #c9d1e3;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(99, 102, 241, .34), transparent 58%),
    radial-gradient(90% 70% at 0% 100%, rgba(56, 189, 248, .16), transparent 60%),
    linear-gradient(165deg, #0d1424, #161f34 55%, #101828);
  overflow: hidden;
}
.auth-side::after {
  /* 一层极淡的网格，避免大面积纯色显得空 */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 90% at 20% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}
.auth-side > * { position: relative; z-index: 1; }

.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-brand .brand-text strong { font-size: 15px; }

.auth-side-body { margin-top: auto; padding: 34px 0 26px; }
.auth-side h1 {
  font-size: 30px;
  line-height: 1.32;
  letter-spacing: -.02em;
  color: #fff;
  font-weight: 680;
}
.auth-lead {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #a8b4cc;
  max-width: 34ch;
}

.auth-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 11px; align-items: flex-start; }
.auth-points svg {
  width: 17px; height: 17px; flex: none; margin-top: 2px;
  color: #818cf8;
  background: rgba(129, 140, 248, .13);
  border-radius: 50%;
  padding: 3px;
  box-sizing: content-box;
}
.auth-points b { display: block; font-size: 13px; color: #f2f5fb; font-weight: 600; }
.auth-points span { display: block; font-size: 12px; color: #98a4bd; margin-top: 1px; }

.auth-side-foot {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 11.5px;
  color: #8b97b0;
  display: flex; align-items: center; gap: 7px;
}
.auth-side-foot .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .16);
}

/* 右：表单 */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 40px;
  background: var(--surface);
}
.auth-card { width: 100%; max-width: 336px; }
.auth-card-head { margin-bottom: 24px; }
.auth-card-head h2 { font-size: 22px; letter-spacing: -.02em; }
.auth-card-head p { margin-top: 6px; font-size: 13px; color: var(--ink-400); }

.auth-alert {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 11px 13px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--rose-50);
  border: 1px solid #f3cfd7;
  color: var(--rose-600);
  font-size: 12.5px;
  line-height: 1.55;
}
.auth-alert svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

.auth-field { margin-bottom: 15px; }
.auth-field > label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.auth-field > input,
.auth-password > input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink-900);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.auth-field > input::placeholder,
.auth-password > input::placeholder { color: var(--ink-300); }
.auth-field > input:focus,
.auth-password > input:focus {
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-50);
}

.auth-password { position: relative; }
.auth-password > input { padding-right: 44px; }
.auth-eye {
  position: absolute;
  right: 5px; top: 5px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--ink-300);
  cursor: pointer;
}
.auth-eye:hover { background: #eef0f6; color: var(--ink-500); }
.auth-eye.on { color: var(--brand-600); }
.auth-eye svg { width: 17px; height: 17px; }

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .28);
  transition: transform .12s, box-shadow .18s, filter .18s;
}
.auth-submit:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(79, 70, 229, .34); }
.auth-submit:active { transform: translateY(1px); }

.auth-tip {
  margin-top: 20px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-400);
}
.auth-tip code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  background: #f1f3f9;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1px 4px;
}

@media (max-width: 820px) {
  .auth-body { padding: 0; place-items: stretch; }
  .auth-wrap {
    max-width: none;
    min-height: 100vh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .auth-side { padding: 26px 24px 22px; }
  .auth-side-body { padding: 26px 0 22px; }
  .auth-side h1 { font-size: 23px; }
  .auth-lead, .auth-points { display: none; }
  .auth-main { padding: 30px 24px 46px; }
  .auth-card { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit { transition: none; }
}


/* ---------------------------------------------------------------- 顶栏账号菜单 */
.acct { position: relative; }
.acct-btn { padding: 0; border: 0; background: transparent; }
.acct-avatar {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(79, 70, 229, .3);
}
.acct-avatar.lg { width: 36px; height: 36px; font-size: 15px; flex: none; }
.acct-btn:hover .acct-avatar { filter: brightness(1.08); }

.acct-menu {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  z-index: 60;
  min-width: 196px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.acct-menu[hidden] { display: none; }
.acct-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px 11px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--line-soft);
}
.acct-head strong { display: block; font-size: 13px; color: var(--ink-900); }
.acct-head span { display: block; font-size: 11.5px; color: var(--ink-400); }
.acct-menu a, .acct-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-700);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.acct-menu a:hover, .acct-menu button:hover { background: #f1f3f9; color: var(--ink-900); }
.acct-menu a { color: var(--ink-700); }

@media (max-width: 720px) {
  .acct { display: none; }
}
