/* ==========================================================================
   到期管家 ExpiryMate · 控制台设计系统（浅色）
   与官网 site/index.html 保持同一套 CSS 变量
   ========================================================================== */
:root {
  --bg: #f3f6fa;
  --panel: #ffffff;
  --panel-2: #eaf0f7;
  --border: #d6dee8;
  --border-soft: #e6ecf3;
  --text: #1b2430;
  --muted: #5c6b7e;
  --accent: #0b63ce;
  --accent-dark: #084b9e;
  --accent-soft: #e8f1fd;
  --green: #128049;
  --green-soft: #e4f4eb;
  --orange: #a9540a;
  --orange-soft: #fdf0e2;
  --red: #c8232f;
  --red-soft: #fdeaeb;
  --purple: #6f45b5;
  --purple-soft: #f0eafa;
  --cyan: #0e7181;
  --cyan-soft: #e2f3f5;
  --yellow: #8a6100;
  --yellow-soft: #fdf5df;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);
  --sidebar-w: 224px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.35; }
code, .mono { font-family: "Cascadia Mono", Consolas, "Courier New", monospace; font-size: 12.5px; }

/* ------------------------------ 布局 ------------------------------ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 9px;
  padding: 16px 18px; border-bottom: 1px solid var(--border-soft);
  font-weight: 700; font-size: 15px; color: var(--text);
}
.sidebar .brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #0b63ce, #3f8ee8);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; box-shadow: 0 2px 6px rgba(11, 99, 206, .3);
}
.brand small { display: block; font-size: 9.5px; color: var(--muted); font-weight: 400; letter-spacing: 1.1px; margin-top: -3px; }
.brand-badge {
  font-size: 10px; padding: 1px 6px; border-radius: 5px; margin-left: auto;
  background: var(--purple-soft); color: var(--purple); font-weight: 600;
}
.nav-group { padding: 12px 0 4px; }
.nav-group > .nav-label {
  font-size: 10.5px; color: var(--muted); letter-spacing: 1px;
  padding: 4px 18px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 18px; margin: 1px 8px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 13.5px; cursor: pointer;
}
.nav-item:hover { background: var(--panel-2); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item .cnt {
  margin-left: auto; font-size: 11px; background: var(--red); color: #fff;
  border-radius: 9px; padding: 0 6px; min-width: 17px; text-align: center;
}
.sidebar .side-foot { margin-top: auto; padding: 12px 18px; border-top: 1px solid var(--border-soft); font-size: 11.5px; color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; flex-shrink: 0; background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 16px; font-weight: 700; }
.topbar .crumb { font-size: 12px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.topbar .bell { position: relative; font-size: 17px; cursor: pointer; padding: 4px 6px; border-radius: 7px; }
.topbar .bell:hover { background: var(--panel-2); }
.topbar .bell .dot {
  position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px;
  background: var(--red); color: #fff; border-radius: 8px; font-size: 10px;
  line-height: 15px; text-align: center; padding: 0 3px; font-weight: 600;
}
.user-chip {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 4px 10px 4px 4px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--panel); font-size: 13px;
}
.user-chip:hover { border-color: var(--accent); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #0b63ce, #3f8ee8); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.dropdown {
  position: absolute; right: 20px; top: 52px; z-index: 60;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 190px; padding: 6px; display: none;
}
.dropdown.open { display: block; }
.dropdown .dd-head { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); margin-bottom: 5px; }
.dropdown .dd-head b { display: block; font-size: 13.5px; }
.dropdown .dd-head span { font-size: 11.5px; color: var(--muted); }
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left; padding: 7px 10px;
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text);
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.dropdown a:hover, .dropdown button:hover { background: var(--panel-2); text-decoration: none; }
.dropdown .danger { color: var(--red); }

.content { padding: 20px; flex: 1; }
.content.narrow { max-width: 900px; }

/* ------------------------------ 卡片 / 栅格 ------------------------------ */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.card > .head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border-soft);
}
.card > .head h3 { font-size: 14px; }
.card > .head .sub { font-size: 12px; color: var(--muted); }
.card > .head .spacer { flex: 1; }
.card > .body { padding: 16px; }
.card > .body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }

.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.stat .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat .value { font-size: 25px; font-weight: 700; line-height: 1.25; margin-top: 3px; letter-spacing: -.5px; }
.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat.accent { border-left: 3px solid var(--accent); }
.stat.red { border-left: 3px solid var(--red); }
.stat.orange { border-left: 3px solid var(--orange); }
.stat.green { border-left: 3px solid var(--green); }
.stat.purple { border-left: 3px solid var(--purple); }
.stat.cyan { border-left: 3px solid var(--cyan); }

/* ------------------------------ 按钮 ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm); font-size: 13px;
  font-family: inherit; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  transition: .15s; white-space: nowrap; line-height: 1.5;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-danger { color: var(--red); border-color: var(--border); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--panel-2); color: var(--accent); border-color: transparent; }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ------------------------------ 表单 ------------------------------ */
.field { margin-bottom: 14px; }
.field > label {
  display: block; font-size: 12.5px; color: var(--muted);
  margin-bottom: 5px; font-weight: 500;
}
.field > label .req { color: var(--red); }
.input, input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=datetime-local], input[type=tel], select, textarea {
  width: 100%; padding: 8px 11px; font-size: 13.5px; font-family: inherit;
  color: var(--text); background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: .15s;
}
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 99, 206, .12);
}
textarea { min-height: 76px; resize: vertical; }
select { cursor: pointer; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.err-text { font-size: 12px; color: var(--red); margin-top: 4px; min-height: 16px; }

.filter-bar {
  display: flex; gap: 9px; align-items: flex-end; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--border-soft);
}
.filter-bar .field { margin-bottom: 0; }
.filter-bar .field > label { font-size: 11.5px; }
.filter-bar input, .filter-bar select { min-width: 132px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.check input { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: 11.5px; padding: 3px 9px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--panel); cursor: pointer; color: var(--muted);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ------------------------------ 表格 ------------------------------ */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--muted);
  padding: 10px 12px; background: var(--panel-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.tbl tbody tr:hover { background: #fafcfe; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td.nowrap, table.tbl th.nowrap { white-space: nowrap; }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-link { color: var(--accent); cursor: pointer; font-weight: 500; }
.tbl-link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.ellip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.masked { letter-spacing: 1px; color: var(--muted); }

/* ------------------------------ 配置分组 ------------------------------ */
.cfg-group { border-bottom: 1px solid var(--border-soft); }
.cfg-group:last-child { border-bottom: none; }
.cfg-group-title {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; background: var(--panel-2); border-bottom: 1px solid var(--border-soft);
}
.cfg-group-title .tag { font-weight: 600; }

/* ------------------------------ 标签 ------------------------------ */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 2px 8px; border-radius: 5px;
  background: var(--panel-2); color: var(--muted); white-space: nowrap; font-weight: 500;
}
.tag.blue { background: var(--accent-soft); color: var(--accent); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.orange { background: var(--orange-soft); color: var(--orange); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.purple { background: var(--purple-soft); color: var(--purple); }
.tag.cyan { background: var(--cyan-soft); color: var(--cyan); }
.tag.yellow { background: var(--yellow-soft); color: var(--yellow); }
.tag.gray { background: #eef1f5; color: #64748b; }
.dot-live {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  display: inline-block; margin-right: 5px;
  box-shadow: 0 0 0 3px rgba(18, 128, 73, .15);
}

/* ------------------------------ 进度条 ------------------------------ */
.bar { height: 6px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bar.warn > i { background: var(--orange); }
.bar.danger > i { background: var(--red); }

/* ------------------------------ 分页 ------------------------------ */
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-soft); font-size: 13px; }
.pager .info { color: var(--muted); font-size: 12.5px; }
.pager .spacer { flex: 1; }
.pager button {
  padding: 4px 10px; border: 1px solid var(--border); background: var(--panel);
  border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 12.5px; color: var(--text);
}
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ------------------------------ 空态 / 加载 ------------------------------ */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .ico { font-size: 34px; opacity: .55; margin-bottom: 8px; }
.empty h4 { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.empty p { font-size: 12.5px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 34px; color: var(--muted); font-size: 13px; }
.spinner {
  width: 16px; height: 16px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ 提示 / 弹窗 ------------------------------ */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  padding: 10px 14px; font-size: 13px; min-width: 210px; max-width: 340px;
  animation: slidein .2s ease-out;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--orange); }
.toast b { display: block; font-size: 12.5px; margin-bottom: 1px; }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .38);
  z-index: 150; display: none; align-items: center; justify-content: center; padding: 20px;
}
.mask.open { display: flex; }
.modal {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
}
.modal.wide { max-width: 760px; }
.modal > .head { padding: 15px 18px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; }
.modal > .head h3 { font-size: 15px; }
.modal > .head .spacer { flex: 1; }
.modal > .head .x { cursor: pointer; color: var(--muted); font-size: 19px; line-height: 1; padding: 0 4px; }
.modal > .head .x:hover { color: var(--red); }
.modal > .body { padding: 18px; }
.modal > .foot { padding: 13px 18px; border-top: 1px solid var(--border-soft); display: flex; gap: 9px; justify-content: flex-end; }

/* ------------------------------ 时间线 ------------------------------ */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1.5px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 2.5px var(--panel);
}
.tl-item.ok::before { background: var(--green); }
.tl-item.warn::before { background: var(--orange); }
.tl-item .tl-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tl-item .tl-head b { font-size: 13px; }
.tl-item .tl-time { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.tl-item .tl-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ------------------------------ 描述列表 ------------------------------ */
.dl { display: grid; grid-template-columns: 96px 1fr; gap: 9px 14px; font-size: 13px; }
.dl dt { color: var(--muted); font-size: 12.5px; }
.dl dd { color: var(--text); word-break: break-all; }

/* ------------------------------ 通道切换台 ------------------------------ */
.chan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.chan { border: 1px solid var(--border); border-radius: 10px; background: var(--panel); overflow: hidden; }
.chan.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(11, 99, 206, .10); }
.chan .ch-head {
  padding: 9px 12px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border); background: var(--panel-2);
}
.chan .ch-head b { font-size: 13px; }
.chan .ch-head .spacer { flex: 1; }
.chan .ch-body { padding: 12px; }
.chan .ch-body .dl { grid-template-columns: 82px 1fr; gap: 6px 10px; }
.chan .ch-body .dl dt, .chan .ch-body .dl dd { font-size: 12px; }
.ch-reason { font-size: 12px; margin: 8px 0 10px; line-height: 1.5; }
.ch-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin: 10px 0 0; }
pre.out {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; overflow: auto; max-height: 280px;
  font-size: 12px; line-height: 1.65; margin: 0;
}
@media (max-width: 1100px) { .chan-grid { grid-template-columns: 1fr; } }

/* ------------------------------ 提示条 ------------------------------ */
.alert {
  border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 13px; font-size: 13px; line-height: 1.6;
  background: var(--panel-2); color: var(--text);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.alert.ok { background: var(--green-soft); border-color: transparent; color: var(--green); }
.alert.bad { background: var(--red-soft); border-color: transparent; color: var(--red); }
.alert.warn { background: var(--orange-soft); border-color: transparent; color: var(--orange); }

/* ------------------------------ 步骤 ------------------------------ */
.steps { display: flex; gap: 0; align-items: center; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.step .n {
  width: 20px; height: 20px; border-radius: 50%; background: var(--panel-2);
  color: var(--muted); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.step.on { color: var(--accent); font-weight: 600; }
.step.on .n { background: var(--accent); color: #fff; }
.step.done .n { background: var(--green-soft); color: var(--green); }
.step-line { width: 22px; height: 1.5px; background: var(--border); margin: 0 8px; }

/* ------------------------------ 登录 / 注册页 ------------------------------ */
.auth-wrap { min-height: 100vh; display: flex; }
.auth-side {
  width: 42%; flex-shrink: 0; padding: 44px 46px; color: #fff;
  background: linear-gradient(150deg, #0b63ce 0%, #084b9e 55%, #0e7181 100%);
  display: flex; flex-direction: column;
}
.auth-side .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.auth-side .brand:hover { text-decoration: none; color: #fff; }
.auth-side .brand-mark { background: rgba(255, 255, 255, .2); box-shadow: none; }
.auth-side h2 { font-size: 25px; margin: 40px 0 12px; line-height: 1.4; }
.auth-side p.lead { font-size: 14px; opacity: .9; line-height: 1.8; }
.auth-side ul { list-style: none; margin-top: 24px; }
.auth-side li { font-size: 13.5px; opacity: .93; margin-bottom: 9px; padding-left: 21px; position: relative; }
.auth-side li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; }
.auth-side .side-foot { margin-top: auto; font-size: 11.5px; opacity: .7; }
.auth-side .side-foot a, .sidebar .side-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 34px 20px; background: var(--bg); }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { font-size: 21px; margin-bottom: 6px; }
.auth-box .sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.tabs { display: flex; gap: 4px; background: var(--panel-2); padding: 3px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.tabs button {
  flex: 1; padding: 7px; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--muted); border-radius: 6px;
}
.tabs button.on { background: var(--panel); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm); }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }

/* ------------------------------ 工具类 ------------------------------ */
.mt0 { margin-top: 0; } .mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.tc { text-align: center; } .tr { text-align: right; }
.hide { display: none !important; }
.tar { text-align: right; }
.f1 { flex: 1; }
.hr { height: 1px; background: var(--border-soft); margin: 14px 0; }
.up { color: var(--red); } .down { color: var(--green); }

/* ------------------------------ 响应式 ------------------------------ */
.burger { display: none; background: none; border: none; font-size: 19px; cursor: pointer; color: var(--text); padding: 0 4px; }

@media (max-width: 1100px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 100;
    transform: translateX(-100%); transition: transform .2s;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .burger { display: block; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 14px; }
  .auth-side { display: none; }
  .dl { grid-template-columns: 82px 1fr; }
  .topbar h1 { font-size: 15px; }
}
@media (max-width: 560px) {
  .g4, .g6 { grid-template-columns: 1fr; }
  .row.between { align-items: flex-start; }
}
