/* ===== 主题变量 ===== */
:root {
  --bg: #f4f5fa;
  --panel: #ffffff;
  --panel-2: #f8f9fd;
  --text: #1b1d2a;
  --text-2: #4a4f66;
  --muted: #8388a0;
  --border: #e6e9f2;
  --border-2: #eef0f7;
  --accent: #6c5ce7;
  --accent-2: #4f8cff;
  --accent-soft: rgba(108, 92, 231, .10);
  --ok: #12b981;
  --ok-soft: rgba(18, 185, 129, .12);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, .14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, .12);
  --info: #0ea5e9;
  --info-soft: rgba(14, 165, 233, .12);
  --shadow: 0 6px 22px rgba(27, 29, 42, .06);
  --shadow-lg: 0 18px 48px rgba(27, 29, 42, .14);
  --radius: 14px;
  --radius-sm: 10px;
  --grad: linear-gradient(135deg, #6c5ce7 0%, #4f8cff 100%);
}

html[data-theme="dark"] {
  --bg: #0d0f16;
  --panel: #151822;
  --panel-2: #1a1e29;
  --text: #e9ebf5;
  --text-2: #b9bfd2;
  --muted: #7d859c;
  --border: #262b39;
  --border-2: #20242f;
  --accent: #8b7cff;
  --accent-2: #6aa2ff;
  --accent-soft: rgba(139, 124, 255, .16);
  --shadow: 0 6px 22px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 布局 ===== */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 232px; flex: 0 0 232px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 16px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 17px;
  box-shadow: 0 6px 16px rgba(108, 92, 231, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.35; overflow: hidden; }
.brand-text strong { font-size: 15px; }
.brand-text span { font-size: 11.5px; color: var(--muted); }

.nav { flex: 1; padding: 6px 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 3px;
  border-radius: var(--radius-sm);
  color: var(--text-2); cursor: pointer;
  font-size: 14px; font-weight: 500;
  transition: background .16s, color .16s;
  border: none; background: none; width: 100%; text-align: left;
  position: relative;
}
.nav-item svg { flex: 0 0 18px; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .badge { margin-left: auto; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border-2); }
.side-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: none; border: none; cursor: pointer;
  color: var(--text-2); font-size: 13.5px;
}
.side-btn:hover { background: var(--panel-2); color: var(--text); }
.side-ico { display: grid; place-items: center; }
.side-ico svg { width: 17px; height: 17px; }
/* 侧栏底部按钮的文字（深色模式 / 退出登录）：撑满剩余宽度，窄屏自动省略 */
.side-label { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-ver { font-size: 11px; color: var(--muted); padding: 8px 12px 2px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 66px; flex: 0 0 66px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
}
.topbar-title h1 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: .2px; }
.topbar-title p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }

.view { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }

/* ===== 通用元素 ===== */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--border-2);
}
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px 18px; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-1-2 { grid-template-columns: 1fr 1.65fr; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text-2);
  cursor: pointer; font-size: 13.5px; font-weight: 500;
  transition: transform .12s, box-shadow .16s, background .16s, color .16s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 4px 14px rgba(108, 92, 231, .3); }
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.btn-ok:hover { background: var(--ok); color: #fff; }
/* 次级按钮：分组管理里的「组员进出 / 换主管 / 改组名 / 留痕」用，与主按钮同排但不抢视线 */
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text-2); }
.btn-ghost:hover { background: var(--panel-2); border-color: var(--accent); color: var(--accent); }
.btn-sm { height: 29px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 27px; padding: 0 11px; border-radius: 20px;
  background: var(--panel-2); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2);
}
.chip-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.chip-user { padding-left: 4px; gap: 7px; }
.chip-user .avatar { width: 22px; height: 22px; flex-basis: 22px; border-radius: 7px; font-size: 10px; }
.chip-user .u-ico { display: grid; place-items: center; }
.chip-user .u-ico svg { width: 14px; height: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  background: var(--panel-2); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--ok-soft); color: var(--ok); }
.b-blue { background: var(--info-soft); color: var(--info); }
.b-orange { background: var(--warn-soft); color: #d97706; }
.b-red { background: var(--danger-soft); color: var(--danger); }
.b-purple { background: var(--accent-soft); color: var(--accent); }
.b-gray { background: var(--panel-2); color: var(--muted); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 500; }

.input, .select, .textarea {
  height: 36px; padding: 0 11px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--panel-2); color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
  min-width: 0;
}
.textarea { height: auto; padding: 9px 11px; resize: vertical; min-height: 72px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238388a0' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center; }
.search-wrap { position: relative; }
.search-wrap .input { padding-left: 34px; width: 240px; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; }
table.tb th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 10px 14px; background: var(--panel-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
table.tb td { padding: 11px 14px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
table.tb tbody tr:hover td { background: var(--panel-2); }
table.tb tbody tr:last-child td { border-bottom: none; }
.tb .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.tb-actions .btn { white-space: nowrap; }   /* v2.36.0：窄屏时按钮整体换行，不再把文字挤断 */

.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  display: grid; place-items: center; font-size: 13px; font-weight: 650; color: #fff;
}
.avatar.sm { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; font-size: 11.5px; }
.avatar.md { width: 46px; height: 46px; flex-basis: 46px; border-radius: 13px; font-size: 16px; }
.user-cell .u-name { font-weight: 600; }
.user-cell .u-sub { font-size: 11.5px; color: var(--muted); }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 30px; margin-bottom: 8px; opacity: .55; }

/* ===== KPI ===== */
.kpi { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .k-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .k-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.kpi .k-ico svg { width: 16px; height: 16px; }
.kpi .k-value { font-size: 25px; font-weight: 700; letter-spacing: -.5px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.trend-up { color: var(--ok); font-weight: 600; }
.trend-down { color: var(--danger); font-weight: 600; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; opacity: .07; }
.kpi.c1::after { background: var(--accent); }
.kpi.c2::after { background: var(--ok); }
.kpi.c3::after { background: var(--warn); }
.kpi.c4::after { background: var(--info); }

/* ===== 进度条/排行 ===== */
.bar-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.bar-row .rank {
  width: 22px; height: 22px; border-radius: 7px; flex: 0 0 22px;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--panel-2); color: var(--muted);
}
.bar-row .rank.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.bar-row .rank.r2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #fff; }
.bar-row .rank.r3 { background: linear-gradient(135deg, #f0a882, #d97e56); color: #fff; }
.bar-row .bar-main { flex: 1; min-width: 0; }
.bar-row .bar-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.bar-row .bar-top b { font-variant-numeric: tabular-nums; }
.bar-track { height: 7px; border-radius: 6px; background: var(--border-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--grad); transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* ===== 考勤网格 ===== */
.att-grid { overflow-x: auto; }
.att-grid table { border-collapse: separate; border-spacing: 0; }
.att-grid th, .att-grid td { border-bottom: 1px solid var(--border-2); border-right: 1px solid var(--border-2); }
.att-grid th.day { width: 34px; min-width: 34px; padding: 6px 0; font-size: 11px; color: var(--muted); text-align: center; font-weight: 600; background: var(--panel-2); }
.att-grid th.day.weekend { background: var(--warn-soft); color: var(--warn); }
.att-grid td.name { padding: 0 12px; white-space: nowrap; font-weight: 600; background: var(--panel); position: sticky; left: 0; z-index: 2; }
.att-grid td.cell {
  width: 34px; min-width: 34px; height: 36px; text-align: center; cursor: default;
  font-size: 11px; font-weight: 700; color: var(--muted); user-select: none;
}
/* 只读：不给任何「可点」的暗示 */
.att-grid td.cell:hover { background: transparent; }
.att-grid td.sum { padding: 0 10px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }

/* ===== 模态框 ===== */
.modal-layer { position: relative; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 18, 30, .5);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
  animation: fade .18s ease; backdrop-filter: blur(2px);
}
.modal {
  width: 100%; background: var(--panel); border-radius: 16px;
  box-shadow: var(--shadow-lg); max-height: 88vh; display: flex; flex-direction: column;
  animation: pop .2s cubic-bezier(.2, .9, .3, 1.1);
}
.modal-head { display: flex; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--border-2); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border-2); display: flex; gap: 9px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98) } to { opacity: 1; transform: none } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; font-size: 12.5px; }
.chip-check input { display: none; }
.chip-check.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }

/* ===== 陪玩选择窗口 ===== */
.pick-list { display: flex; flex-direction: column; gap: 5px; max-height: 292px; overflow: auto; padding-right: 2px; }
.pick-item { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--panel-2); cursor: pointer; transition: .16s; }
.pick-item:hover { border-color: var(--accent); }
.pick-item input { display: none; }
.pick-item.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.pick-item.off { opacity: .5; cursor: not-allowed; }
.pick-item.off:hover { border-color: var(--border); }
.pick-item .pi-main { flex: 1; min-width: 0; }
.pick-item .pi-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pick-item .pi-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pick-item .pi-right { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pick-item .pi-right b { color: var(--warn); font-size: 13px; }
.pick-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 13px;
  border: 1px dashed var(--border); border-radius: 12px; }

/* ===== 规则公告卡片 ===== */
.notice-card { margin-bottom: 16px; border-color: var(--warn); box-shadow: var(--shadow); }
.card-head .nc-ico { display: inline-flex; width: 22px; height: 22px; margin-right: 7px; padding: 3px;
  border-radius: 7px; background: var(--warn-soft); color: var(--warn); vertical-align: -4px; }
.card-head .nc-ico svg { width: 100%; height: 100%; }
.notice-tip { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: var(--warn-soft); color: var(--text-2); font-size: 12.8px; line-height: 1.85; }
.notice-tip > svg { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--warn); }
.notice-tip b { color: var(--text); }
.nc-foot { margin-top: 11px; font-size: 12.5px; color: var(--muted); }
.nc-foot b { color: var(--accent); }
.rule-input { display: flex; align-items: center; gap: 6px; }
.rule-input .input { width: 68px; padding: 5px 8px; text-align: center; }
.rule-input span { font-size: 11.5px; color: var(--muted); }
.tb-tight th, .tb-tight td { padding: 9px 12px; font-size: 12.8px; }

/* ===== 待办提醒（导航徽标 / 顶栏） ===== */
.nav-dot {
  position: absolute; top: 7px; right: 12px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; font-style: normal; line-height: 17px; text-align: center;
}
.sidebar.open .nav-dot { top: 6px; }
.chip-todo {
  background: var(--warn-soft); color: var(--warn); border-color: var(--warn);
  font-weight: 600; display: inline-flex; align-items: center; gap: 7px;
}
.chip-todo:hover { filter: brightness(.96); }
.chip-todo .td-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--warn);
  animation: todoPulse 1.6s ease-in-out infinite;
}
@keyframes todoPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ===== 名次激励提示 ===== */
.rank-alert { border-width: 1px; border-left: 4px solid var(--border); }
.rank-alert.good { border-left-color: var(--ok); background: var(--ok-soft); }
.rank-alert.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.rank-alert.danger { border-left-color: var(--danger); background: var(--danger-soft); }
.rank-alert.mid { border-left-color: var(--accent); background: var(--accent-soft); }
.ra-head { display: flex; align-items: center; gap: 14px; padding: 15px 18px 11px; }
.ra-ico { font-size: 30px; line-height: 1; flex: none; }
.ra-ico.sm { font-size: 17px; }
.ra-t { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ra-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ra-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  background: var(--panel); color: var(--text-2); border: 1px solid var(--border); }
.ra-val { margin-left: auto; font-size: 30px; font-weight: 700; line-height: 1;
  font-family: ui-monospace, Menlo, Consolas, monospace; }
.ra-val i { font-size: 14px; font-style: normal; font-weight: 500; color: var(--muted); margin-left: 2px; }
.rank-alert.good .ra-val { color: var(--ok); }
.rank-alert.warn .ra-val { color: var(--warn); }
.rank-alert.danger .ra-val { color: var(--danger); }
.rank-alert.mid .ra-val { color: var(--accent); }
.ra-body { padding: 0 18px 15px; font-size: 13px; line-height: 1.9; color: var(--text-2); }
.ra-body b { color: var(--text); }

/* 管理员端：关键名次战况一览 */
.ra-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 11px; }
.ra-row { border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 11px;
  padding: 11px 13px; background: var(--panel); }
.ra-row.good { border-left-color: var(--ok); }
.ra-row.warn { border-left-color: var(--warn); }
.ra-row.danger { border-left-color: var(--danger); }
.ra-r1 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.ra-pos { font-size: 11.5px; color: var(--muted); }
.ra-r2 { display: flex; align-items: baseline; gap: 7px; margin-top: 7px; font-size: 12.5px; flex-wrap: wrap; }
.ra-r2 i { font-style: normal; color: var(--muted); font-size: 11.5px; }
.ra-me { font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.ra-other { color: var(--muted); }
.ra-gap { margin-left: auto; font-size: 12.5px; color: var(--danger); font-weight: 650; }
.ra-row.good .ra-gap { color: var(--ok); }
.ra-row.warn .ra-gap { color: var(--warn); }
.ra-r3 { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: 12px; line-height: 1.8; color: var(--muted); }
.ra-r3 b { color: var(--text-2); }

/* ===== 联网状态 ===== */
.chip-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok);
  font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.chip-off { background: var(--panel-2); color: var(--muted); border-color: var(--border);
  display: inline-flex; align-items: center; gap: 7px; }
.chip-ok .sy-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  animation: todoPulse 1.6s ease-in-out infinite; }
.chip-off .sy-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }

/* 联网状态卡（系统设置） */
.sync-status { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 13px 15px; border-radius: 11px; margin-bottom: 12px; border: 1px solid var(--border); }
.sync-status.on { background: var(--ok-soft); border-color: var(--ok); }
.sync-status.off { background: var(--warn-soft); border-color: var(--warn); }
.ss-left { display: flex; align-items: center; gap: 12px; }
.ss-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sync-status.on .ss-dot { background: var(--ok); animation: todoPulse 1.6s ease-in-out infinite; }
.sync-status.off .ss-dot { background: var(--warn); }
.ss-t { font-size: 14px; font-weight: 650; }
.sync-status.on .ss-t { color: var(--ok); }
.sync-status.off .ss-t { color: var(--warn); }
.ss-s { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.7; }
.ss-right { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.ss-right > div { display: flex; flex-direction: column; gap: 3px; }
.ss-right span { font-size: 11.5px; color: var(--muted); }
.ss-right b { font-size: 13px; font-weight: 650; }

/* 启动加载 */
.boot-spin {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: bootSpin .8s linear infinite;
}
@keyframes bootSpin { to { transform: rotate(360deg); } }

/* 数据同步 */
.sync-tip { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: var(--panel-2); color: var(--text-2); font-size: 12.8px; line-height: 1.85; }
.sync-tip > svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }

/* ===== PK 擂台 ===== */
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(392px, 1fr)); gap: 14px; }
.pk-card { border: 1px solid var(--border); border-radius: 13px; background: var(--panel-2); padding: 14px 16px 13px; transition: .16s; }
.pk-card:hover { border-color: var(--accent); }
.pk-finished { opacity: .92; }
.pk-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; margin-bottom: 12px; }
.pk-metric { font-weight: 650; color: var(--text); }
.pk-days { margin-left: auto; color: var(--muted); font-size: 11.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }

.pk-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.pk-side { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border-radius: 11px; position: relative; }
.pk-side .pk-name { font-size: 14px; font-weight: 650; }
.pk-side .pk-sub { font-size: 11.5px; color: var(--muted); }
.pk-side.red .pk-name { color: var(--danger); }
.pk-side.blue .pk-name { color: var(--info); }
.pk-side.won { background: var(--ok-soft); }
.pk-crown { position: absolute; top: -2px; right: 6px; font-size: 12px; }
.pk-vs { text-align: center; min-width: 108px; }
.pk-vs-t { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.pk-score { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 5px 0 3px;
  font-size: 19px; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.pk-score i { color: var(--muted); font-style: normal; font-size: 15px; }
.pk-score span { color: var(--muted); }
.pk-score span.lead { color: var(--accent); }
.pk-score span.win { color: var(--ok); }
.pk-score span.lose { color: var(--muted); opacity: .6; }
/* 已结算的比分：加一层底，和进行中的实时比分区分开（不再是"还在打"的观感） */
.pk-score.done { background: var(--panel-2); border-radius: 10px; padding: 4px 11px; margin: 7px 0 5px; }
.pk-stake { font-size: 11.5px; color: var(--muted); }

.pk-pools { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 12px; }
.pk-pool { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--panel); }
.pk-pool span { font-size: 11.5px; color: var(--muted); }
.pk-pool b { font-size: 15px; }
.pk-pool i { font-size: 11px; color: var(--muted); font-style: normal; }
.pk-pool.red { border: 1px solid var(--danger-soft); } .pk-pool.red b { color: var(--danger); }
.pk-pool.blue { border: 1px solid var(--info-soft); } .pk-pool.blue b { color: var(--info); }
.pk-odds { text-align: center; }
.pk-odds .odds-ratio { font-size: 16px; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.pk-odds .odds-tip { font-size: 10.5px; color: var(--muted); }
.pk-back { margin-top: 8px; text-align: center; font-size: 11.5px; color: var(--muted); }
.pk-back b { color: var(--warn); }

.pk-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border); }
.pk-foot .grow { flex: 1; }

/* 等级不足的客服提示 */
.pk-lv-tip { display: flex; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  background: var(--accent-soft); color: var(--text-2); font-size: 12.8px; line-height: 1.8; }
.pk-lv-tip > svg { flex: none; width: 17px; height: 17px; margin-top: 3px; color: var(--accent); }
.pk-lv-modal { text-align: center; padding: 6px 4px 2px; }
.pk-lv-face { font-size: 40px; margin-bottom: 8px; }
.pk-lv-hi { font-size: 15px; margin-bottom: 10px; }
.pk-lv-text { font-size: 13px; color: var(--text-2); line-height: 1.95; text-align: left;
  background: var(--panel-2); border-radius: 11px; padding: 13px 15px; }

.pk-rej-tip { padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.8; background: var(--panel-2); }
.pk-rej-tip.danger { background: var(--danger-soft); color: var(--text-2); }
.pk-rej-tip.ok { background: var(--ok-soft); color: var(--text-2); }

/* 支持弹窗 */
.pk-bet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 12px; border-radius: 12px; background: var(--panel-2); }
.pk-bet-side { text-align: center; }
.pk-bet-side .t { font-size: 11.5px; color: var(--muted); }
.pk-bet-side .n { font-size: 14px; font-weight: 650; margin: 3px 0; }
.pk-bet-side .p { font-size: 11.5px; color: var(--muted); }
.pk-bet-side.red .n { color: var(--danger); }
.pk-bet-side.blue .n { color: var(--info); }
.pk-bet-odds { text-align: center; }
.pk-bet-odds div { font-size: 17px; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.pk-bet-odds span { font-size: 10.5px; color: var(--muted); }
.pk-bet-pre { margin-top: 12px; padding: 10px 13px; border-radius: 10px; background: var(--panel-2);
  font-size: 12.5px; color: var(--text-2); line-height: 1.7; }

/* 详情弹窗 */
.pk-detail-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; margin-bottom: 10px; }
.pk-detail-top .vs { color: var(--muted); font-weight: 700; }
.pk-detail-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted);
  padding: 10px 13px; border-radius: 10px; background: var(--panel-2); }
.pk-detail-score { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pk-detail-score .s { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 14px; border-radius: 10px; background: var(--panel-2); }
.pk-detail-score .s.red b { color: var(--danger); font-size: 17px; }
.pk-detail-score .s.blue b { color: var(--info); font-size: 17px; }
.pk-detail-pots { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-top: 12px; }
.pk-detail-pots .p { text-align: center; font-size: 12.5px; color: var(--muted); padding: 8px; border-radius: 10px; background: var(--panel-2); }
.pk-detail-pots .p.odds { font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; color: var(--text); }
.pk-bet-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pk-bet-col { background: var(--panel-2); border-radius: 11px; padding: 10px 12px; }
.pk-bet-col .h { font-size: 12px; font-weight: 650; margin-bottom: 8px; }
.pk-bet-col .h.red { color: var(--danger); }
.pk-bet-col .h.blue { color: var(--info); }
.pk-bet-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px dashed var(--border); }
.pk-bet-row:last-child { border-bottom: 0; }
.pk-bet-row .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-bet-row .v { color: var(--muted); }
.pk-bet-row .p { font-weight: 650; }
.pk-bet-row .p.win { color: var(--ok); }
.pk-bet-row .p.lose { color: var(--muted); }
.pk-bet-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 14px 0; }

/* 排行榜里的规则小贴士 */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 10px; }
.rt-item { padding: 11px 13px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--border); }
.rt-item.danger { border-color: var(--danger); background: var(--danger-soft); }
.rt-item.good { border-color: var(--ok); background: var(--ok-soft); }
.rt-name { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rt-rule { font-size: 12px; color: var(--text-2); margin-top: 5px; }
.rt-rule b { color: var(--warn); }
.rt-who { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* ===== 待确认积分（灰色） ===== */
.pts-pending { color: var(--muted) !important; opacity: .72;
  text-decoration: underline dotted currentColor; text-underline-offset: 3px; }

/* ===== Toast ===== */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 11px;
  background: var(--panel); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500;
  animation: toastIn .22s cubic-bezier(.2, .9, .3, 1.1);
}
.toast.out { animation: toastOut .2s ease forwards; }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; }
.toast.t-success .dot { background: var(--ok); }
.toast.t-error .dot { background: var(--danger); }
.toast.t-info .dot { background: var(--accent); }
.toast.t-warn .dot { background: var(--warn); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) } to { opacity: 1; transform: none } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) } }

/* ===== 详情 ===== */
.detail-hero { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--border-2); }
.detail-hero .avatar { width: 52px; height: 52px; flex-basis: 52px; border-radius: 14px; font-size: 18px; }
.detail-hero h4 { margin: 0; font-size: 17px; }
.detail-hero .tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kv .item { background: var(--panel-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.kv .item span { font-size: 11.5px; color: var(--muted); display: block; }
.kv .item b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }

.section-title { font-size: 13px; font-weight: 650; margin: 16px 0 9px; display: flex; align-items: center; gap: 7px; }

.setting-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border-2); }
.setting-row:last-child { border-bottom: none; }
.setting-row .sr-text { flex: 1; }
.setting-row .sr-text b { display: block; font-size: 13.5px; font-weight: 600; }
.setting-row .sr-text span { font-size: 12px; color: var(--muted); }
.setting-row .sr-ctrl { flex: 0 0 220px; display: flex; gap: 8px; justify-content: flex-end; }

.mask { display: none; }

/* ===== 登录页（v2.67.3 左品牌区 + 右独立圆角登录卡，零图片） ===== */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(108, 92, 231, .11), transparent 60%),
    radial-gradient(820px 500px at 96% 106%, rgba(79, 140, 255, .09), transparent 60%),
    linear-gradient(180deg, #f8f9fd 0%, #edeff6 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><path d='M28 0H0v28' fill='none' stroke='%231b1d2a' stroke-opacity='.04'/></svg>");
}
.login-wrap::after { content: none; }
.login-card {
  position: relative; z-index: 1;
  width: min(880px, 100%);
  display: flex; align-items: center; gap: 56px;
  background: none; border: none; box-shadow: none; overflow: visible;
}
.login-left {
  flex: 1.15; padding: 0; color: var(--text);
  background: none; border-right: none;
  display: flex; flex-direction: column;
}
.login-left .brand { justify-content: flex-start; }
.login-left .brand-logo { background: var(--grad); box-shadow: 0 6px 16px rgba(108, 92, 231, .35); }
.login-left .brand-text strong, .login-left .brand-text span { color: var(--text); }
.login-left .brand-text span { color: var(--muted); opacity: 1; }
.login-feats { list-style: none; margin: 24px 0 0; padding: 0; }
.login-feats li { display: flex; gap: 11px; margin-bottom: 14px; font-size: 13px; line-height: 1.6; }
.login-feats li svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }
.login-feats b { display: block; font-size: 13.5px; color: var(--text); }
.login-foot { margin-top: 14px; font-size: 12px; color: var(--muted); opacity: 1; }
.login-right {
  flex: 0 0 380px; padding: 34px 32px; display: flex; flex-direction: column; justify-content: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  position: relative;
}
html[data-theme="dark"] .login-wrap {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(139, 124, 255, .13), transparent 60%),
    radial-gradient(820px 500px at 96% 106%, rgba(106, 162, 255, .10), transparent 60%),
    linear-gradient(180deg, #0d0f17 0%, #12141f 100%);
}
html[data-theme="dark"] .login-wrap::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><path d='M28 0H0v28' fill='none' stroke='%23ffffff' stroke-opacity='.05'/></svg>");
}
.login-tip { margin-top: 14px; text-align: center; font-size: 12px; color: var(--muted); }
.login-mascot {
  position: absolute; top: -108px; left: 75%; transform: translateX(-50%);
  pointer-events: none;
}
.login-mascot-img {
  display: block; width: 150px; height: auto;
  filter: drop-shadow(0 6px 12px rgba(27, 29, 42, .15));
}
.select.sel-placeholder { color: var(--muted); }
.select.sel-placeholder option { color: var(--text); }
.select.sel-placeholder option[disabled] { color: var(--muted); }

/* ===== 登录页维护提示（维护锁定期替换登录表单） ===== */
.maint-notice {
  padding: 26px 18px; border-radius: 12px; text-align: center;
  background: var(--warn-soft, rgba(239, 159, 39, .12));
  border: 1px dashed var(--warn, #ef9f27);
}
.maint-notice .maint-ico { font-size: 34px; line-height: 1; }
.maint-notice .maint-title { margin-top: 10px; font-size: 17px; font-weight: 700; color: var(--text); }
.maint-notice .maint-text { margin-top: 8px; font-size: 13px; line-height: 1.9; color: var(--text-2); }
.maint-notice .maint-text b { color: var(--warn, #ef9f27); }
.login-err {
  margin-top: 14px; padding: 9px 12px; border-radius: 9px;
  background: var(--danger-soft); color: var(--danger);
  font-size: 13px; text-align: center; font-weight: 500;
}

/* ===== 分段控件 ===== */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg-btn {
  border: none; background: none; cursor: pointer;
  padding: 6px 14px; border-radius: 8px;
  font-size: 13px; color: var(--muted); font-weight: 500;
  transition: background .15s, color .15s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--accent); color: #fff; font-weight: 600; }

/* ===== 抢单大厅任务卡 ===== */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 14px; }
.task-card {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px;
  display: flex; flex-direction: column;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.task-card:hover:not(.disabled) { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.task-card.disabled { opacity: .58; }
.tc-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tc-game { padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 650; }

/* ===== 排行榜 ===== */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pd-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 16px; text-align: center; box-shadow: var(--shadow); position: relative;
}
.pd-card.rank1 { border: 2px solid #fbbf24; background: linear-gradient(180deg, rgba(251, 191, 36, .10), transparent); }
.pd-card.rank2 { border: 2px solid #cbd5e1; background: linear-gradient(180deg, rgba(203, 213, 225, .12), transparent); }
.pd-card.rank3 { border: 2px solid #e08b5a; background: linear-gradient(180deg, rgba(224, 139, 90, .10), transparent); }
.pd-medal { font-size: 26px; line-height: 1; }
.pd-card .avatar { margin: 8px auto 8px; width: 50px; height: 50px; flex-basis: 50px; border-radius: 14px; font-size: 17px; }
.pd-name { font-size: 15px; font-weight: 650; }
.pd-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pd-value { font-size: 21px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.pd-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pd-empty { visibility: hidden; }

.rank-tag {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700;
  background: var(--panel-2); color: var(--muted);
}
.rank-tag.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.rank-tag.r2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #fff; }
.rank-tag.r3 { background: linear-gradient(135deg, #f0a882, #d97e56); color: #fff; }
tr.row-me td { background: var(--accent-soft); }

.me-banner .card-body { background: linear-gradient(90deg, var(--accent-soft), transparent); }
.hero-card { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: var(--grad); opacity: .06; }

/* ===== 打印（积分结算单） ===== */
@media print {
  .app, .toast-root { display: none !important; }
  .modal-mask { position: static; background: none; backdrop-filter: none; padding: 0; display: block; }
  .modal { max-height: none; box-shadow: none; border: none; max-width: 100% !important; }
  .modal-head, .modal-foot { display: none !important; }
  .modal-body { overflow: visible; padding: 0; }
  @page { margin: 12mm; }
}

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .mask.show { display: block; position: fixed; inset: 0; background: rgba(10, 12, 20, .45); z-index: 30; }
  .menu-btn { display: grid; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .search-wrap .input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .login-card { flex-direction: column; gap: 0; }
  .login-left { padding: 0 4px 22px; }
  .login-right { flex: none; width: 100%; padding: 26px 22px; }
  .login-mascot { top: -80px; }
  .login-mascot-img { width: 116px; }
  .login-feats li:nth-child(n+3) { display: none; }
  .podium { grid-template-columns: 1fr; }
  .pd-empty { display: none; }
  .att-grid td.name { padding: 0 8px; }
}
@media (max-width: 620px) {
  .grid-4 { grid-template-columns: 1fr; }
  .view { padding: 14px 14px 30px; }
  .topbar { padding: 0 14px; }
  .topbar-right .chip:not(.chip-accent) { display: none; }
  .kv { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 荣誉勋章 ---------- */
.medal-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; margin-left: 6px; border: 1px solid; white-space: nowrap; vertical-align: 1px; }
.medal-chip .mc-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.medal-chip.m-gold { color: #f5c94c; border-color: rgba(245,201,76,.45); background: rgba(245,201,76,.08); }
.medal-chip.m-pink { color: #f08bb4; border-color: rgba(240,139,180,.45); background: rgba(240,139,180,.08); }
.medal-chip.m-sun  { color: #ef9f27; border-color: rgba(239,159,39,.45); background: rgba(239,159,39,.08); }
.medal-chip.m-moon { color: #b5d4f4; border-color: rgba(181,212,244,.45); background: rgba(181,212,244,.08); }
.honor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.honor-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.honor-card .mc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 2px; }
.honor-card.mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.hc-name { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.honor-card.m-gold .hc-name { color: #f5c94c; } .honor-card.m-gold .mc-dot { background: #f5c94c; }
.honor-card.m-pink .hc-name { color: #f08bb4; } .honor-card.m-pink .mc-dot { background: #f08bb4; }
.honor-card.m-sun  .hc-name { color: #ef9f27; } .honor-card.m-sun  .mc-dot { background: #ef9f27; }
.honor-card.m-moon .hc-name { color: #b5d4f4; } .honor-card.m-moon .mc-dot { background: #b5d4f4; }
.hc-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hc-holders { font-size: 13.5px; font-weight: 600; margin-top: 8px; line-height: 1.5; }

/* 维护模式（打烊锁）横幅 */
.maint-banner{display:flex;align-items:center;justify-content:center;gap:14px;padding:10px 16px;
  background:#fff3d6;color:#8a5a00;font-weight:600;font-size:14px;border-bottom:1px solid #eeda9f;flex-wrap:wrap}
[data-theme="dark"] .maint-banner{background:#3a2f12;color:#ffd98a;border-bottom-color:#57451a}
/* 密码提醒横幅（v2.45.0）：只提示、可点「去改」，不提供关闭 —— 关掉不等于改掉 */
.pwd-banner{display:flex;align-items:center;justify-content:center;gap:14px;padding:10px 16px;
  background:var(--accent-soft);color:var(--text);font-size:13.5px;border-bottom:1px solid var(--border);flex-wrap:wrap}
.pwd-banner .btn-sm{padding:4px 12px;font-size:12.5px}

/* ===== 离线 / 只读横幅（v2.46.0）=====
   只要系统不在「云端实时模式」，这条就必须挂在最上面：
   以前离线时保存照旧弹「已保存」，实际只写进了浏览器，看着像成功了。 */
.offline-banner{display:flex;align-items:center;justify-content:center;gap:14px;padding:10px 16px;
  background:var(--danger-soft);color:var(--danger);font-size:13.5px;font-weight:600;
  border-bottom:1px solid var(--danger);flex-wrap:wrap;line-height:1.6}

/* ===== 版本过期横幅（v2.51.0）=====
   升级后一直没刷新的页面：界面还是旧代码，它改的设置服务端不会采纳。
   这条要看得见、能点、并且说清楚「刷新不会丢数据」——不写这句没人敢点。 */
.upgrade-banner{display:flex;align-items:center;justify-content:center;gap:14px;padding:10px 16px;
  background:var(--accent-soft);color:var(--text);font-size:13.5px;font-weight:600;
  border-bottom:1px solid var(--accent);flex-wrap:wrap;line-height:1.6}
.upgrade-banner .btn-sm{padding:4px 12px;font-size:12.5px}

/* ===== 公告（v2.21.0）=====
   内容区排版：老板粘贴的原文自动分块，价格行→淡底条、小节→竖条标题、
   承诺项→绿标签。弹窗与公告页共用同一套渲染，两处长得完全一样。 */
.nt-list { display: flex; flex-direction: column; gap: 10px; }
.nt-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--panel); }
.nt-item.is-unread { border-color: var(--accent); background: linear-gradient(0deg, var(--accent-soft), transparent 60%), var(--panel); }
.nt-item.is-archived { opacity: .62; }
.nt-item-main { flex: 1; min-width: 0; }
.nt-item-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.nt-item-name { font-size: 14.5px; font-weight: 650; line-height: 1.45; }
.nt-ver-tag { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; }
.nt-item-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.nt-item-excerpt { font-size: 12.5px; color: var(--text-2); line-height: 1.7; margin-top: 6px; }
.nt-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.nt-item-read { font-size: 11.5px; color: var(--muted); cursor: pointer; border-bottom: 1px dashed var(--border); }
.nt-item-read:hover { color: var(--accent); border-bottom-color: var(--accent); }
.nt-archived { margin-bottom: 16px; }
.nt-archived > summary { padding: 14px 18px; cursor: pointer; font-size: 13px; color: var(--text-2); font-weight: 600; }
.nt-tip { font-size: 12px; color: var(--muted); line-height: 1.8; padding: 0 2px; }

/* 公告正文 */
.nt-sheet { border: 1px solid var(--border); border-radius: 14px; background: var(--panel-2); padding: 16px 18px; }
.nt-sheet-head h3 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.4; }
.nt-meta { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.nt-read-tag { color: var(--ok); font-weight: 600; }
.nt-content { margin-top: 12px; max-height: 56vh; overflow-y: auto; padding-right: 2px; }
.nt-content .nt-gap { height: 8px; }
.nt-content .nt-p { margin: 0 0 7px; font-size: 13px; line-height: 1.8; color: var(--text); }
.nt-content .nt-paras { margin-bottom: 6px; }
.nt-sec { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; }
.nt-sec i { width: 3px; height: 13px; border-radius: 2px; background: var(--accent); flex: none; }
.nt-sec span { font-size: 13.5px; font-weight: 650; }
.nt-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.nt-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--border-2); }
.nt-row-name { font-size: 13.5px; font-weight: 650; flex: none; min-width: 58px; }
.nt-row-mid { font-size: 12.5px; color: var(--text-2); flex: 1; line-height: 1.6; }
.nt-row-mid b { color: var(--text); font-weight: 650; }
.nt-row-tail { font-size: 11.5px; color: var(--info); background: var(--info-soft); border-radius: 999px;
  padding: 3px 9px; flex: none; font-weight: 600; }
.nt-bullets { display: flex; flex-direction: column; gap: 5px; margin-bottom: 4px; }
.nt-bullet { position: relative; padding-left: 15px; font-size: 12.8px; line-height: 1.75; color: var(--text-2); }
.nt-bullet::before { content: ""; position: absolute; left: 4px; top: 9px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent-2); }
.nt-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 8px; }
.nt-tag { font-size: 12.5px; color: var(--ok); background: var(--ok-soft); border-radius: 8px; padding: 5px 11px; font-weight: 600; }

/* 阅读弹窗 */
.nt-switch { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.nt-switch-mid { flex: 1; text-align: center; font-size: 12px; color: var(--text-2); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.nt-foot-hint { flex: 1; font-size: 12px; color: var(--muted); line-height: 1.6; }
.nt-reader .nt-sheet { padding: 15px 17px; }

/* 发布 / 编辑弹窗 */
.nt-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 16px; align-items: start; }
/* 左栏（表单）：grid 子项必须 min-width:0，否则宽 textarea 会把右栏预览挤出去 */
.nt-edit-form { min-width: 0; }
.nt-ta { min-height: 260px; line-height: 1.85; font-size: 12.8px; resize: vertical; }
.nt-help { font-size: 11.5px; color: var(--muted); line-height: 1.8; margin-top: 8px; }
.nt-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2);
  margin-top: 12px; cursor: pointer; }
.nt-check input { width: 15px; height: 15px; accent-color: var(--accent); }
.nt-ver { margin-top: 10px; font-size: 11.5px; color: var(--warn); line-height: 1.7; }
.nt-edit-prev { position: sticky; top: 0; }
.nt-prev-label { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.nt-sheet-prev .nt-content { max-height: 46vh; }

/* 已读名单 */
.nt-stat { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
/* 「谁看了」弹窗主体：纵向排列统计条 + 两组名单 */
.nt-readers { display: flex; flex-direction: column; min-width: 0; }
.nt-stat b { font-size: 22px; color: var(--accent); font-weight: 700; margin-right: 2px; }
.nt-stat-day { font-size: 11.5px; color: var(--muted); margin-left: 8px; }
.nt-rd-sec { margin-bottom: 14px; }
.nt-rd-label { font-size: 12px; font-weight: 650; color: var(--ok); margin-bottom: 7px; }
.nt-rd-label.is-unread { color: var(--danger); }
.nt-people { display: flex; flex-wrap: wrap; gap: 7px; }
.nt-person { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; border-radius: 999px; padding: 4px 11px; }
.nt-person.is-read { background: var(--ok-soft); color: var(--ok); }
.nt-person.is-unread { background: var(--danger-soft); color: var(--danger); }
.nt-person em { font-style: normal; font-size: 10.5px; opacity: .75; }
.nt-none { font-size: 12.5px; color: var(--muted); }

@media (max-width: 760px) {
  .nt-item { flex-direction: column; gap: 10px; }
  .nt-item-side { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .nt-edit { grid-template-columns: minmax(0, 1fr); }
  .nt-edit-prev { position: static; }
  .nt-row { flex-wrap: wrap; gap: 6px 10px; }
  .nt-row-mid { flex-basis: 100%; order: 3; }
  .nt-row-tail { margin-left: auto; }
  .nt-content { max-height: 52vh; }
  .nt-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .nt-foot .btn { width: 100%; }
}

/* ===== 自助排班（v2.23.0）=====
   本周 7 天一排：工作日可点、周末虚线锁死；手机上折成 4 列避免挤成一团。 */
.shift-cell { transition: border-color .15s, background .15s; }
.shift-cell.is-pick:hover { border-color: var(--accent) !important; background: var(--accent-soft) !important; }
@media (max-width: 760px) {
  .shift-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* ---------- v2.34.0 派单窗口：按老板拍板的 A 版原样落地 ----------
   弹窗最多 1560；三栏 1 : 1.18 : 1.16；中栏单列（长选项一次显示全）；
   每个下拉下挂「已选：完整文字」回显；顶部「已填信息汇总」整行显示全部；
   粘贴原文几行就几行高。
   不设固定高度、不做栏内自滚 —— 高度按内容走，真超屏由 .modal-body 整窗滚一次。 */
/* 派单弹窗专用：吃满视口、压缩上下留白（:has 只命中派单，其它弹窗保持原样） */
.modal-mask:has(.pub-wrap) { padding: 10px; }
/* v2.35.1：派单弹窗不要标题横条 —— 顶部直接是「已填信息汇总」，右上只留悬浮关闭按钮 */
.modal-head h3:empty { display: none; }
.modal:has(.pub-wrap) { position: relative; max-height: calc(100vh - 20px); }
.modal:has(.pub-wrap) .modal-head { position: absolute; top: 4px; right: 4px; padding: 8px; border: none; background: none; z-index: 5; }
.modal:has(.pub-wrap) .modal-foot { padding: 9px 16px; }
.modal:has(.pub-wrap) .modal-body { padding: 10px 16px 12px; }
.pub-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1.16fr); gap: 13px; align-items: start; }
.pub-col { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.pub-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .5px; margin-bottom: 0; }
.pub-h::after { content: ''; flex: 1; height: 1px; background: var(--border-2); }
.pub-card { border: 1px solid var(--border-2); border-radius: 12px; padding: 9px 11px; background: var(--panel); }
.pub-card.accent { border-color: var(--accent); background: var(--accent-soft); }
/* 已填信息汇总：一条整行信息带，选完不用点开任何下拉就能核对全部 */
/* v2.35.1：汇总条顶到标题位、做醒目 —— 标签粗体强调色、信息字号加大加粗，右侧给关闭按钮让位 */
.pub-summary { position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; gap: 12px;
  background: var(--accent-soft); border: 1px solid var(--border-2); border-left: 3px solid var(--accent);
  border-radius: 9px; padding: 9px 46px 9px 13px; margin-bottom: 9px; line-height: 1.75; color: var(--text);
  box-shadow: 0 2px 10px rgba(15,18,30,.05); }
.pub-summary .k { flex: none; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .5px; }
.pub-summary .v { color: var(--text); word-break: break-word; font-size: 13px; font-weight: 600; }
.pub-summary b { color: var(--accent); font-weight: 750; }
.pub-summary .sep { color: var(--border); margin: 0 5px; }
/* 密度对齐预览稿：控件 34px、label 11px、字段间隙 4px —— 只作用于派单弹窗内 */
.pub-wrap .input, .pub-wrap .select { height: 34px; }
.pub-wrap .field { gap: 4px; }
.pub-wrap .field > label { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 打手改横排小格：一行站 3~4 人，省下的高度全给粘贴原文；完整信息在 title 里 */
.pub-wrap .pick-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; max-height: none; overflow: visible; padding-right: 0; }
.pub-wrap .pick-item { gap: 6px; padding: 5px 9px; border-radius: 8px; }
/* v2.35.1：点打手格时禁止选中文字 —— 之前点一下名字就出蓝色复制框，点击很不跟手 */
.pub-wrap .pick-item.pick-chip { flex: 0 0 auto; user-select: none; -webkit-user-select: none; -moz-user-select: none; cursor: pointer; }
.pub-wrap .pick-item.pick-chip * { user-select: none; -webkit-user-select: none; }
.pick-chip .pc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.pick-chip .pc-dot.busy { background: var(--warn); }
.pick-chip .pc-name { font-size: 12px; font-weight: 600; white-space: nowrap; }
.pick-chip .pc-lv { font-size: 10px; color: var(--muted); background: var(--panel); border-radius: 4px; padding: 0 4px; }
.pick-chip .pc-rest { font-size: 9.5px; color: var(--muted); background: var(--border-2); border-radius: 3px; padding: 0 3px; }
/* v2.35.1：开工须知 + 客户要求并排（左须知右备注），省下纵向空间不用往下拉 */
.pub-duo { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; align-items: start; }
/* 高度由 rows 属性跟着内容走：几行就几行高，封顶后框内滚动，不做折叠 */
.pub-raw { height: auto; min-height: 62px; max-height: 270px; overflow-y: auto; resize: vertical; }
/* v2.35.0：派单弹窗里的粘贴框给足高度 —— 空着也能看十行，粘完一眼看到全文 */
.pub-wrap .pub-raw { min-height: 240px; max-height: 340px; font-size: 12.5px !important; line-height: 1.6 !important; }
.pub-raw-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.pub-raw-cnt { font-size: 11px; color: var(--muted); }
.pub-raw-cnt b { color: var(--accent); }
.pub-raw-more { font-size: 10.5px; color: var(--warn); background: var(--warn-soft, #fff7e6); border-radius: 5px; padding: 2px 6px; }
@media (max-width: 1100px) {
  .pub-wrap { grid-template-columns: 1fr; }
}

.cp-field { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 8px; padding: 4px 6px 4px 9px; font-size: 12.5px; max-width: 100%; }
.cp-k { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.cp-v { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 650; letter-spacing: .2px; word-break: break-all; }
.cp-btn { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 2px 8px; font-size: 11.5px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.cp-btn:hover { background: var(--accent); color: #fff; }
.cp-tip { color: var(--muted); font-size: 11px; }
.cp-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* 打手端的「开工信息」条：不点详情也能看全、点一下就复制 */
.wk-box { margin-top: 8px; border-left: 3px solid var(--accent); background: var(--panel-2); border-radius: 0 10px 10px 0; padding: 9px 11px; }
.wk-title { font-size: 11.5px; font-weight: 700; color: var(--accent); letter-spacing: .4px; margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.wk-line { font-size: 12.5px; color: var(--text-2); line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.wk-voice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }

/* v2.30.0 权限总览 / 分组 */
.perm-tb td { vertical-align: middle; }
.perm-dash { color: var(--muted); }
.b-edit { background: var(--info-soft, #e6f1fb); color: var(--info, #185fa5); }
.b-use  { background: var(--panel-2); color: var(--text-2); }
.b-ro   { background: var(--warn-soft); color: var(--warn); }
