/* ============================================================
   康伴陪诊 · 管理后台样式
   浅色主题 / 医疗蓝 + 青绿点缀
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-100: #dbeafe;
  --primary-50: #eff6ff;
  --teal: #0f9488;
  --teal-50: #ecfdf8;
  --violet: #7c5cff;
  --violet-50: #f2efff;
  --red: #dc4b4b;
  --red-50: #fef2f2;
  --amber: #b45309;
  --amber-50: #fffbeb;
  --green: #0f8b5f;
  --green-50: #ecfdf5;
  --text: #17233a;
  --text-2: #5a6a83;
  --text-3: #8b97a9;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --border: #e4e9f2;
  --border-strong: #d3dbe8;
  --shadow-sm: 0 1px 2px rgba(23, 35, 58, 0.05);
  --shadow-md: 0 8px 24px rgba(23, 35, 58, 0.08);
  --shadow-lg: 0 24px 60px rgba(23, 35, 58, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 236px;
  --topbar-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }

.boot-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.boot-mark {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700; letter-spacing: 2px;
  box-shadow: var(--shadow-md);
}
.boot-text { color: var(--text-3); font-size: 13px; }

/* ---------------- 登录页 ---------------- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--surface);
}
.login-visual {
  position: relative;
  padding: 56px 60px;
  background:
    radial-gradient(900px 520px at 12% 8%, #dbeafe 0%, transparent 55%),
    radial-gradient(760px 480px at 88% 92%, #d7f5ee 0%, transparent 58%),
    linear-gradient(160deg, #f7faff 0%, #eef4ff 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: auto -120px -160px auto;
  width: 380px; height: 380px;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.16);
  box-shadow: inset 0 0 0 40px rgba(37, 99, 235, 0.03), inset 0 0 0 80px rgba(15, 148, 136, 0.04);
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: 1px;
}
.brand-name { font-size: 17px; font-weight: 650; letter-spacing: 0.5px; }
.brand-sub { font-size: 12px; color: var(--text-3); letter-spacing: 0.6px; }

.login-hero h1 {
  font-size: 34px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: #12233f;
}
.login-hero h1 em { font-style: normal; color: var(--primary); }
.login-hero p { color: var(--text-2); max-width: 460px; font-size: 14.5px; }
.login-features { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.login-feature {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px; color: var(--text-2);
  backdrop-filter: blur(4px);
}
.login-feature i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
}
.login-foot { color: var(--text-3); font-size: 12px; display: flex; gap: 18px; flex-wrap: wrap; }

.login-form-side {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
}
.login-card { width: 100%; max-width: 372px; }
.login-card h2 { font-size: 23px; font-weight: 650; margin-bottom: 6px; }
.login-card .login-hint { color: var(--text-3); font-size: 13px; margin-bottom: 28px; }
.login-form .field { margin-bottom: 16px; }
.login-error {
  display: none;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--red-50);
  border: 1px solid #f7d4d4;
  color: #a92f2f;
  font-size: 13px;
}
.login-error.show { display: block; }
.login-submit { width: 100%; height: 44px; font-size: 15px; margin-top: 6px; }

/* ---------------- 布局 ---------------- */
.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 14px 14px;
  z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.sidebar-brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
.sidebar-brand .brand-name { font-size: 15px; }
.sidebar-brand .brand-sub { font-size: 11px; }
.nav-group-label {
  font-size: 11px; letter-spacing: 1.2px; color: var(--text-3);
  text-transform: uppercase; padding: 14px 10px 8px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.14s ease, color 0.14s ease;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-50); color: var(--primary-600); border-color: #d8e6ff; font-weight: 600; }
.nav-item .nav-icon { width: 18px; height: 18px; display: grid; place-items: center; opacity: 0.9; }
.nav-item .nav-badge {
  margin-left: auto; font-size: 11px; background: var(--primary);
  color: #fff; border-radius: 999px; padding: 1px 7px; font-weight: 600;
}
.sidebar-foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--border); }
.sidebar-foot .meta { font-size: 11.5px; color: var(--text-3); line-height: 1.8; }
.sidebar-foot .dot { color: var(--green); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
}
.topbar .crumb { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.today-chip {
  font-size: 12.5px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 999px;
}
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); cursor: pointer;
  transition: border-color 0.15s ease;
}
.user-chip:hover { border-color: var(--border-strong); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  color: var(--primary-600);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.user-chip-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip-meta b { font-size: 12.5px; font-weight: 600; }
.user-chip-meta span { font-size: 11px; color: var(--text-3); }
.user-menu {
  position: absolute; top: 58px; right: 28px; z-index: 60;
  min-width: 178px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-md);
  padding: 6px; display: none;
}
.user-menu.open { display: block; }
.user-menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px;
  background: none; border: 0; border-radius: 7px;
  font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left;
}
.user-menu button:hover { background: var(--surface-2); color: var(--text); }
.user-menu button.danger { color: var(--red); }

.content { padding: 24px 28px 48px; width: 100%; max-width: none; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 650; letter-spacing: -0.2px; }
.page-head .desc { color: var(--text-3); font-size: 12.5px; margin-top: 4px; }
.page-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 14.5px; font-weight: 650; }
.card-head .sub { font-size: 12px; color: var(--text-3); }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.06s ease;
}
.btn:hover { background: var(--surface-2); border-color: #c3cddd; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18); }
.btn.primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.danger { color: var(--red); border-color: #f0c9c9; background: #fff; }
.btn.danger:hover { background: var(--red-50); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 550;
  line-height: 1.7;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.75; }
.badge.plain::before { display: none; }
.badge-gray { background: #f1f4f9; color: #55637a; border-color: #e5eaf3; }
.badge-blue { background: var(--primary-50); color: var(--primary-600); border-color: #d9e7ff; }
.badge-teal { background: var(--teal-50); color: #0b7a70; border-color: #cdeee7; }
.badge-green { background: var(--green-50); color: var(--green); border-color: #cdeedf; }
.badge-amber { background: var(--amber-50); color: var(--amber); border-color: #f6e3bd; }
.badge-red { background: var(--red-50); color: #b33636; border-color: #f5d3d3; }
.badge-violet { background: var(--violet-50); color: #6244cc; border-color: #e3dcff; }

.chip {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-2);
}
.chip.teal { background: var(--teal-50); border-color: #d5f0ea; color: #0b7a70; }
.chip.blue { background: var(--primary-50); border-color: #dbe8ff; color: var(--primary-600); }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field > label .req { color: var(--red); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.input::placeholder, .textarea::placeholder { color: #a7b2c2; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #9dbcf9;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.textarea { min-height: 82px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8794a8 50%), linear-gradient(135deg, #8794a8 50%, transparent 50%); background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-section-title {
  grid-column: 1 / -1;
  font-size: 12px; font-weight: 650; color: var(--text-3);
  letter-spacing: 1px; text-transform: uppercase;
  margin-top: 6px; padding-bottom: 8px; border-bottom: 1px dashed var(--border);
}
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 工具栏 */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.toolbar .search { position: relative; flex: 0 0 268px; }
.toolbar .search .input { padding-left: 32px; }
.toolbar .search svg { position: absolute; left: 10px; top: 10px; color: var(--text-3); }
.toolbar .spacer { margin-left: auto; }
.filter-select { min-width: 118px; width: auto; }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: left;
  padding: 11px 14px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data tbody td { padding: 12px 14px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.12s ease; }
table.data tbody tr:hover { background: #fafcff; }
table.data td.num { font-variant-numeric: tabular-nums; }
table.data td .cell-main { font-weight: 550; color: var(--text); }
table.data td .cell-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
table.data .actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
table.data tr.clickable { cursor: pointer; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--text-2); }

.person { display: flex; align-items: center; gap: 10px; }
.person .avatar { width: 32px; height: 32px; font-size: 12px; }
.person .pname { font-weight: 550; }
.person .psub { font-size: 11.5px; color: var(--text-3); }

.pager {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 12.5px;
}
.pager .pages { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.pager button {
  min-width: 30px; height: 30px; padding: 0 8px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 8px; color: var(--text-2); cursor: pointer; font-size: 12.5px;
}
.pager button:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-2); }
.pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: 0.45; cursor: not-allowed; }

.empty { padding: 48px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty .empty-mark {
  width: 44px; height: 44px; margin: 0 auto 12px;
  border-radius: 12px; background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  display: grid; place-items: center; color: #a9b4c4; font-size: 18px;
}

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 14px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card > *:not(.accent) { position: relative; z-index: 1; }
.stat-card .label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.stat-card .value { font-size: 26px; font-weight: 650; letter-spacing: -0.6px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat-card .value small { font-size: 12.5px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.stat-card .foot { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.stat-card .accent {
  position: absolute; right: -18px; top: -18px;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--primary-50); opacity: 0.75;
}
.stat-card.teal .accent { background: var(--teal-50); }
.stat-card.amber .accent { background: var(--amber-50); }
.stat-card.violet .accent { background: var(--violet-50); }
.stat-card.red .accent { background: var(--red-50); }
.stat-card .sicon {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary-600);
  font-size: 14px;
}
.stat-card.teal .sicon { background: var(--teal-50); color: var(--teal); }
.stat-card.amber .sicon { background: var(--amber-50); color: var(--amber); }
.stat-card.violet .sicon { background: var(--violet-50); color: var(--violet); }
.stat-card.red .sicon { background: var(--red-50); color: var(--red); }

.grid { display: grid; gap: 18px; align-items: start; }
.grid.two { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.grid.two-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-gap { margin-top: 18px; }

/* 进度条 */
.progress { height: 6px; border-radius: 999px; background: #eef2f8; overflow: hidden; min-width: 68px; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #5b8def); }
.progress.teal > i { background: linear-gradient(90deg, var(--teal), #33c3b4); }
.progress.amber > i { background: linear-gradient(90deg, #d97706, #f59e0b); }
.progress-row { display: flex; align-items: center; gap: 8px; }
.progress-row span { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* 时间线 */
.timeline { position: relative; padding-left: 8px; }
.timeline-item { position: relative; padding: 0 0 20px 30px; }
.timeline-item::before {
  content: ""; position: absolute; left: 5px; top: 16px; bottom: -2px;
  width: 1px; background: var(--border);
}
.timeline-item:last-child { padding-bottom: 4px; }
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  position: absolute; left: 0; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--border-strong);
}
.timeline-item.done .timeline-dot { background: var(--teal); border-color: var(--teal); }
.timeline-item.doing .timeline-dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14); }
.timeline-item.skipped .timeline-dot { background: #cbd5e1; border-color: #cbd5e1; }
.timeline-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline-head b { font-size: 13.5px; font-weight: 600; }
.timeline-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.timeline-note { font-size: 12.5px; color: var(--text-2); margin-top: 6px; background: var(--surface-2); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); }
.timeline-actions { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.timeline-actions .btn.ghost { border-color: var(--border); background: var(--surface); }
.timeline-actions .btn.ghost:hover { background: var(--surface-2); }

.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }

/* 系统升级 */
.hint-box {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; color: var(--text-2); line-height: 1.8;
}
.hint-box code { background: rgba(23, 35, 58, 0.06); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 170px; padding: 22px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2);
  color: var(--text-3); transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.dropzone span { font-size: 12px; max-width: 430px; line-height: 1.75; }
.dropzone:hover, .dropzone.dragging { border-color: var(--primary); background: var(--primary-50); }
.dropzone.disabled { opacity: 0.55; pointer-events: none; }
.up-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.deploy-log {
  margin: 0; max-height: 320px; overflow: auto; padding: 14px 16px;
  background: #0f172a; color: #cbd5e1; border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.75; white-space: pre-wrap; word-break: break-all;
}

/* 详情弹窗（居中显示） */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 27, 47, 0.38);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  animation: fade 0.16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  width: min(880px, 100%);
  max-height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: popIn 0.2s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.drawer.wide { width: min(1040px, 100%); }
@keyframes popIn { from { transform: translateY(10px) scale(0.985); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 14px; flex: none;
  background: var(--surface); border-radius: 14px 14px 0 0;
}
.drawer-head h2 { font-size: 17px; font-weight: 650; }
.drawer-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.drawer-head .close {
  margin-left: auto; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; font-size: 16px; line-height: 1;
}
.drawer-head .close:hover { background: var(--surface-2); }
.drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 22px; }
.drawer-foot {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2);
  flex: none; border-radius: 0 0 14px 14px;
}

/* 弹窗 */
.modal-overlay {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(16, 27, 47, 0.4);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fade 0.14s ease;
}
.modal {
  width: min(660px, 96vw); max-height: 90vh;
  background: var(--surface); border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: pop 0.18s ease;
}
.modal.lg { width: min(840px, 96vw); }
.modal-form { display: flex; flex-direction: column; min-height: 0; max-height: calc(90vh - 2px); overflow: hidden; }
@keyframes pop { from { transform: translateY(8px) scale(0.99); opacity: 0.7; } to { transform: none; opacity: 1; } }
.modal-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; flex: none; }
.modal-head h3 { font-size: 16px; font-weight: 650; }
.modal-head .close { margin-left: auto; border: 0; background: none; font-size: 18px; color: var(--text-3); cursor: pointer; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 14px 14px; flex: none; }
.modal-error {
  display: none; margin-bottom: 14px; padding: 9px 12px; border-radius: 8px;
  background: var(--red-50); border: 1px solid #f5d3d3; color: #a92f2f; font-size: 12.5px;
}
.modal-error.show { display: block; }

/* 提示 */
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 240px; max-width: 380px;
  background: #fff; border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 10px; box-shadow: var(--shadow-md);
  padding: 11px 14px; font-size: 13px; color: var(--text);
  display: flex; gap: 9px; align-items: flex-start;
  animation: toastIn 0.2s ease;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: #d97706; }
.toast .t-icon { font-weight: 700; }
.toast.success .t-icon { color: var(--green); }
.toast.error .t-icon { color: var(--red); }
.toast.warn .t-icon { color: #d97706; }
.toast .t-body { flex: 1; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 详情信息 */
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; }
.kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv .k { font-size: 11.5px; color: var(--text-3); }
.kv .v { font-size: 13px; color: var(--text); word-break: break-word; }
.kv .v.muted { color: var(--text-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.info-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.info-panel + .info-panel { margin-top: 12px; }
.info-panel h4 { font-size: 12.5px; font-weight: 650; color: var(--text-2); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.info-panel h4 .spacer { margin-left: auto; }
.briefing-block { font-size: 12.8px; color: var(--text-2); line-height: 1.75; }
.briefing-block b { color: var(--text); font-weight: 600; }
.briefing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.briefing-cell { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; }
.briefing-cell .k { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; }
.briefing-cell .v { font-size: 12.8px; white-space: pre-wrap; }

/* 标签页 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
  padding: 9px 14px; border: 0; background: none; cursor: pointer;
  font-size: 13px; color: var(--text-2); border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary-600); border-bottom-color: var(--primary); font-weight: 600; }

/* 图表（纯 CSS 柱状） */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar-col .bar {
  width: 100%; max-width: 42px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #6f9bf5, #2563eb);
  min-height: 4px; position: relative;
  transition: height 0.5s ease;
}
.bar-col .bar.soft { background: linear-gradient(180deg, #8fd8cf, #0f9488); }
.bar-col .bar-val { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar-col .bar-label { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--text-3); margin-top: 10px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.rank-row:last-child { border-bottom: 0; }
.rank-no {
  width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border);
}
.rank-row:nth-child(1) .rank-no { background: #fff7e6; color: #b45309; border-color: #f6e3bd; }
.rank-row:nth-child(2) .rank-no { background: #f2f5fa; color: #5b6a83; }
.rank-row:nth-child(3) .rank-no { background: #fdf2e9; color: #a15c1f; border-color: #f3ddc8; }
.rank-main { flex: 1; min-width: 0; }
.rank-main b { font-size: 13px; font-weight: 550; }
.rank-main div { font-size: 11.5px; color: var(--text-3); }
.rank-val { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 说明页 */
.doc h2 { font-size: 16px; margin: 26px 0 10px; }
.doc h2:first-child { margin-top: 0; }
.doc p { color: var(--text-2); font-size: 13px; line-height: 1.8; }
.doc ul { color: var(--text-2); font-size: 13px; line-height: 1.9; padding-left: 20px; margin: 8px 0; }
.doc code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 12px; }
.perm-table td, .perm-table th { font-size: 12px; }
.perm-table th:first-child, .perm-table td:first-child { width: 38%; }
.perm-yes { color: var(--green); font-weight: 600; }
.perm-no { color: #c3ccda; }

/* 移动端 */
.mobile-toggle { display: none; }
@media (max-width: 1080px) {
  .grid.two, .grid.two-even, .grid.three { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 250px;
    transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .mobile-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 40px; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .kv-grid, .briefing-grid { grid-template-columns: 1fr; }
  .toolbar .search { flex: 1 1 100%; }
}

@media (max-width: 640px) {
  .overlay { padding: 10px; }
  .drawer { max-height: calc(100vh - 20px); }
  .drawer-head { padding: 14px 16px; }
  .drawer-body { padding: 16px; }
  .drawer-foot { padding: 12px 16px; }
}
