:root {
  --bg: #e8ecf4;
  --surface: #ffffff;
  --surface2: #f0f3fa;
  --input-bg: #fbfcff;
  --border: #d5deeb;
  --text: #1c2433;
  --muted: #5a6a80;
  --accent: #4776f5;
  --accent-dim: rgba(71, 118, 245, 0.14);
  --accent-border: rgba(71, 118, 245, 0.28);
  --success: #0d9f6e;
  --warning: #b8860b;
  --danger: #d63b45;
  --radius: 12px;
  --font: "Noto Sans SC", "DM Sans", system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(28, 36, 51, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.is-hidden {
  display: none !important;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(71, 118, 245, 0.12), transparent),
    linear-gradient(180deg, #f5f7fc 0%, var(--bg) 45%, #e4e9f2 100%);
}

.boot-card {
  width: 100%;
  max-width: 320px;
  padding: 1.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(213, 222, 235, 0.92);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(28, 36, 51, 0.09);
  text-align: center;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(71, 118, 245, 0.12), transparent),
    linear-gradient(180deg, #f5f7fc 0%, var(--bg) 45%, #e4e9f2 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #0ea5e9 0%, #3b5bfd 48%, #7c3aed 100%);
  box-shadow: 0 6px 22px rgba(14, 165, 233, 0.28), 0 4px 12px rgba(59, 91, 253, 0.22);
}

.login-mark-svg {
  width: 28px;
  height: 28px;
}

.login-brand {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}

.login-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.5rem 0 1.5rem;
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.btn-block {
  width: 100%;
  margin-top: 0.25rem;
}

.login-error {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--danger, #b42318);
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: 8px;
}

.feishu-dm-test-result {
  margin: 0;
  padding: 0.65rem 0.75rem;
  max-height: 14rem;
  overflow: auto;
  font-size: 0.72rem;
  line-height: 1.45;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-all;
}

.role-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.btn-logout {
  width: 100%;
  margin-top: 0.65rem;
  justify-content: center;
}

.layout {
  display: grid;
  grid-template-columns: minmax(268px, 280px) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #fafbfd 0%, #f2f5fb 100%);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 1rem;
}

.brand-text {
  min-width: 0;
  flex: 1;
}

.brand-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #0ea5e9 0%, #3b5bfd 48%, #7c3aed 100%);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.28), 0 2px 8px rgba(59, 91, 253, 0.2);
}

.brand-mark-svg {
  width: 22px;
  height: 22px;
}

.brand-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: break-word;
  white-space: pre-line;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface2);
}

.nav-item.active {
  color: var(--text);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

.log-tab-btns .log-tab-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.log-panel {
  margin-top: 0.5rem;
}

.nav-icon {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.mobile-nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav-backdrop {
  display: none;
}

body.mobile-nav-open {
  overflow: hidden;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
}

.sync-status-local,
.sync-status-saved {
  background: rgba(33, 150, 83, 0.08);
  border-color: rgba(33, 150, 83, 0.18);
  color: #1f7a45;
}

.sync-status-saving {
  background: rgba(61, 100, 255, 0.08);
  border-color: rgba(61, 100, 255, 0.18);
  color: #2f5bf2;
}

.sync-status-error,
.sync-status-conflict {
  background: rgba(225, 93, 93, 0.08);
  border-color: rgba(225, 93, 93, 0.18);
  color: #c24949;
}

.content {
  padding: 1.5rem 1.75rem 3rem;
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface2);
}

.btn-danger {
  background: rgba(214, 59, 69, 0.1);
  color: var(--danger);
  border-color: rgba(214, 59, 69, 0.28);
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 1rem;
}

.staff-add-form {
  margin-top: 0.5rem;
}

.staff-login-hint {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Code", monospace;
}

.account-list-table .account-list-edit {
  min-width: 5.5rem;
  max-width: 11rem;
}

.account-list-table .account-list-name {
  max-width: 9rem;
}

.account-list-table .staff-login-input {
  font-family: ui-monospace, "Cascadia Code", monospace;
  max-width: 10rem;
}

.account-list-table .staff-feishu-openid {
  font-family: ui-monospace, "Cascadia Code", monospace;
  min-width: 7rem;
  max-width: 14rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 1rem;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(59, 91, 253, 0.1), rgba(124, 58, 237, 0.08));
}

.dashboard-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-kicker {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.dashboard-hero-title {
  margin-top: 0.45rem;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-hero-sub {
  margin-top: 0.45rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 54ch;
}

.dashboard-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.dashboard-pill {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.dashboard-kpi-card {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(28, 36, 51, 0.06);
}

.dashboard-kpi-card span,
.dashboard-chart-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.dashboard-kpi-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.9rem;
  line-height: 1;
}

.dashboard-kpi-card small {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-donut-grid {
  align-items: stretch;
}

.dashboard-donut-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding-top: 1rem;
}

.dashboard-donut-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.dashboard-donut-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.dashboard-donut-ring {
  --donut-pct: 0;
  --donut-color: #5b5dfd;
  --donut-rest: rgba(91, 93, 253, 0.12);
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(var(--donut-color) calc(var(--donut-pct) * 1%), var(--donut-rest) 0);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(91, 93, 253, 0.08);
}

.dashboard-donut-ring::before {
  content: "";
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  grid-area: 1 / 1;
}

.dashboard-donut-center {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.dashboard-donut-center strong {
  font-size: 1.3rem;
  line-height: 1;
}

.dashboard-donut-center span,
.dashboard-donut-foot {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.dashboard-overview-main,
.dashboard-focus-panel,
.dashboard-panel-card,
.dashboard-alerts-card {
  display: flex;
  flex-direction: column;
}

.dashboard-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  height: 100%;
}

.dashboard-chart-card,
.dashboard-focus-card {
  padding: 1rem;
  border-radius: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.dashboard-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-focus-card span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.dashboard-focus-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.3rem;
  line-height: 1;
}

.dashboard-focus-card.is-warn {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.18);
}

.dashboard-focus-alerts {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.dashboard-alert-list-compact {
  margin-top: 0.7rem;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-panel-card {
  min-height: 320px;
}

.dashboard-bars,
.dashboard-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dashboard-bar-row,
.dashboard-progress-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dashboard-bar-meta,
.dashboard-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
}

.dashboard-bar-meta strong,
.dashboard-progress-meta strong {
  font-size: 0.8rem;
}

.dashboard-bar-track,
.dashboard-mini-track {
  height: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.dashboard-bar-fill,
.dashboard-mini-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #7c6adf);
}

.dashboard-mini-fill-alt {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.dashboard-dual-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.dashboard-mini-metric {
  padding: 0.9rem;
  border-radius: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.dashboard-mini-metric span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.dashboard-mini-metric strong {
  display: block;
  margin: 0.35rem 0 0.7rem;
  font-size: 1.15rem;
}

.dashboard-inline-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.dashboard-inline-stats div {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.dashboard-inline-stats span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.dashboard-inline-stats strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.05rem;
}

.dashboard-empty {
  padding: 0.75rem 0 !important;
}

.section-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.section-head {
  padding: 0.9rem 1.1rem;
  background: var(--surface2);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.step-row {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.step-row:last-child {
  border-bottom: none;
}

.step-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.checklist {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text);
}

.checklist li {
  margin: 0.25rem 0;
}

.step-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.step-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-done {
  background: rgba(13, 159, 110, 0.12);
  color: var(--success);
}

.badge-pending {
  background: rgba(184, 134, 11, 0.12);
  color: var(--warning);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.mobile-group-card {
  margin-bottom: 1rem;
}

.mobile-group-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.mobile-record-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mobile-record-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.95rem;
  box-shadow: var(--shadow);
}

.mobile-record-card-pass {
  opacity: 0.95;
}

.mobile-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-record-title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
}

.mobile-record-sub {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.mobile-record-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.mobile-progress {
  margin-top: 0.55rem;
}

.mobile-progress-txt {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.mobile-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.mobile-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.mobile-field-wide {
  grid-column: 1 / -1;
}

.mobile-field-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}

.mobile-field-control {
  min-width: 0;
}

.mobile-field-control .hint {
  display: block;
}

.mobile-check-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.mobile-record-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mobile-choice-native {
  display: none !important;
}

.mobile-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mobile-choice-btn {
  min-height: 2rem;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.mobile-choice-btn.active {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  color: var(--accent);
}

.mobile-record-more {
  margin-top: 0.85rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}

.mobile-record-more summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.mobile-record-more summary::-webkit-details-marker {
  display: none;
}

.mobile-record-more summary::after {
  content: "展开";
  margin-left: 0.45rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.mobile-record-more[open] summary::after {
  content: "收起";
}

.mobile-record-more-body {
  margin-top: 0.75rem;
}

.log-mobile-card .mobile-field-control > span,
.log-mobile-body {
  display: block;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"] {
  width: 100%;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

select,
.form-group select,
.data-table select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 3px),
    calc(100% - 9px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.75rem;
}

.feishu-usage-estimate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.9rem;
}

.feishu-usage-estimate-card {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.feishu-usage-estimate-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.feishu-usage-estimate-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.35rem;
  line-height: 1;
}

.feishu-usage-estimate-card small {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.77rem;
  line-height: 1.5;
  color: var(--muted);
}

.feishu-usage-estimate-card.is-ok {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.18);
}

.feishu-usage-estimate-card.is-warn {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.18);
}

.feishu-usage-estimate-card.is-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
}

.toast {
  position: fixed;
  top: 5rem;
  left: 50%;
  width: min(calc(100vw - 2rem), 34rem);
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.88rem;
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 10050;
  text-align: center;
  line-height: 1.5;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-group {
  margin-bottom: 0.5rem;
}

.nav-group-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.35rem 0.85rem 0.25rem;
  opacity: 0.85;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.toolbar-hint {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 52rem;
  line-height: 1.45;
}

.toolbar-wrap {
  flex-direction: column;
  align-items: stretch;
}

.toolbar-wrap .toolbar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.video-toolbar-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text);
}

.toolbar-search-input {
  min-width: 13rem;
}

.group-fold-btn {
  min-width: 2rem;
  padding: 0.2rem 0.45rem !important;
  margin-right: 0.25rem;
  font-size: 0.75rem;
}

tr.video-row-review-passed {
  opacity: 0.92;
}

tr.video-row-review-passed .video-row-check:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* 文案审核结果：紧跟项目，避免被误认为「消失」 */
.data-table th.col-copy-review,
.data-table td.col-copy-review {
  background: var(--accent-dim, rgba(71, 118, 245, 0.08));
  border-left: 1px solid var(--accent-border, rgba(71, 118, 245, 0.2));
  border-right: 1px solid var(--accent-border, rgba(71, 118, 245, 0.2));
}

.cell-copy-review {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
  min-width: 6.5rem;
}

.cell-copy-review select {
  width: 100%;
}

.data-table th.col-check,
.data-table td.col-check {
  width: 2.25rem;
  text-align: center;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.video-row-check,
.video-check-all {
  width: auto !important;
  min-width: 0;
  cursor: pointer;
  vertical-align: middle;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(28, 36, 51, 0.45);
}

.modal-backdrop.is-hidden {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.data-table th,
.data-table td {
  vertical-align: middle;
  white-space: nowrap;
}

.data-table td {
  max-width: 14rem;
}

.data-table .input-inline {
  min-width: 5rem;
  max-width: 10rem;
}

.input-inline,
.data-table select {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
}

.input-num {
  max-width: 5rem;
}

/* 视频数据表：百分数字段，单位 % 放在单元格内而非表头 */
.cell-pct {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.cell-pct .pct-unit {
  font-size: 0.75rem;
  opacity: 0.55;
  flex-shrink: 0;
}

.btn-sm {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.formula {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 600;
}

.progress-wrap {
  position: relative;
  min-width: 72px;
  height: 22px;
  background: var(--surface2);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7c6adf);
  border-radius: 6px;
  transition: width 0.2s ease;
}

.progress-txt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}

.tag-green {
  background: rgba(13, 159, 110, 0.12);
  color: var(--success);
}

.tag-yellow {
  background: rgba(184, 134, 11, 0.12);
  color: var(--warning);
}

.tag-muted {
  background: var(--surface2);
  color: var(--muted);
}

.tag-teal {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
}

.tag-blue {
  background: var(--accent-dim);
  color: var(--accent);
}

.tag-orange {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}

.tag-ok {
  background: rgba(13, 159, 110, 0.1);
  color: var(--success);
}

.tag-warn {
  background: rgba(184, 134, 11, 0.1);
  color: var(--warning);
}

.tag-role-manager {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.22);
}

.tag-role-employee {
  background: rgba(71, 118, 245, 0.12);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.group-row td {
  background: var(--surface2);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.group-count {
  color: var(--muted);
  font-weight: 500;
  margin-left: 0.35rem;
  font-size: 0.8rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
}

.check-row input {
  width: auto;
}

/* —— 仪表盘提醒列表 —— */
.pipeline-alert-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.pipeline-alert-list li.is-warn {
  color: var(--danger, #b42318);
}

.pipeline-alert-list li.is-info {
  color: var(--muted);
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-title {
    font-size: 1.18rem;
  }

  .dashboard-hero-pills {
    justify-content: flex-start;
  }

  .dashboard-donut-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-overview-grid,
  .dashboard-bottom-grid,
  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-donut-card {
    align-items: flex-start;
    text-align: left;
  }

  .dashboard-donut-head {
    align-items: flex-start;
  }

  .dashboard-kpi-grid,
  .dashboard-focus-grid,
  .dashboard-dual-metrics,
  .dashboard-inline-stats {
    grid-template-columns: 1fr;
  }

  .feishu-usage-estimate-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(84vw, 320px);
    height: 100vh;
    overflow-y: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    border-right: 1px solid var(--border);
    border-bottom: none;
    padding: max(1rem, env(safe-area-inset-top)) 0.8rem calc(1rem + env(safe-area-inset-bottom));
    gap: 1rem;
    box-shadow: 0 18px 40px rgba(28, 36, 51, 0.18);
    transform: translateX(calc(-100% - 1rem));
    transition: transform 0.22s ease;
  }

  .layout.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    width: auto;
    padding: 0.25rem 0.35rem 0.1rem;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(28, 36, 51, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .layout.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: visible;
    white-space: normal;
    padding-bottom: 0;
  }

  .nav-group {
    display: block;
    margin: 0;
  }

  .nav-group-label {
    padding: 0.35rem 0.8rem 0.25rem;
  }

  .nav-item {
    width: 100%;
    padding: 0.7rem 0.85rem;
  }

  .sidebar-footer {
    width: 100%;
    display: block;
    padding: 0.85rem 0.35rem 0;
    border-top: 1px solid var(--border);
  }

  .user-pill {
    min-width: 0;
  }

  .role-badge {
    margin-top: 0.5rem;
  }

  .btn-logout {
    width: 100%;
    margin-top: 0.75rem;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: max(0.9rem, env(safe-area-inset-top)) 1rem 0.9rem;
  }

  .page-title {
    width: auto;
    flex: 1 1 auto;
    font-size: 1.18rem;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .content {
    padding: 1rem 1rem 1.6rem;
  }

  .step-row {
    grid-template-columns: 1fr;
  }

  .step-actions {
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .login-screen {
    padding: 1rem;
    align-items: stretch;
  }

  .login-card {
    max-width: none;
    margin: auto 0;
    padding: 1.35rem 1.1rem;
    border-radius: 14px;
  }

  .card {
    padding: 1rem;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .mobile-field-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .toolbar-wrap .toolbar-btns {
    gap: 0.55rem;
  }

  .toolbar-search-input {
    min-width: 0;
    width: 100%;
  }

  .toolbar .btn,
  .toolbar-wrap .toolbar-btns .btn {
    min-height: 2.5rem;
  }

  .modal-backdrop {
    padding: 0.75rem;
  }

  .modal-card {
    max-width: none;
    padding: 1rem;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }

  th,
  td {
    padding: 0.65rem 0.75rem;
  }

  .data-table td {
    max-width: 10rem;
  }

  .account-list-table .account-list-edit,
  .account-list-table .account-list-name,
  .account-list-table .staff-login-input,
  .account-list-table .staff-feishu-openid {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .sync-status {
    order: -1;
  }

  .toast {
    top: 4.4rem;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    transform: translateY(-10px);
  }

  .toast.show {
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .brand {
    gap: 0.6rem;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 0.84rem;
  }

  .brand-sub {
    font-size: 0.68rem;
  }

  .topbar-actions > .btn,
  .topbar-actions > .file-btn {
    flex: 1 1 calc(50% - 0.25rem);
  }

  .topbar-actions > .sync-status {
    width: 100%;
    justify-content: center;
  }

  .btn,
  input[type="text"],
  input[type="password"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  textarea,
  .form-group select {
    font-size: 16px;
  }

  .content {
    padding: 0.85rem 0.75rem 1.25rem;
  }

  .mobile-record-card {
    padding: 0.85rem;
    border-radius: 12px;
  }

  .mobile-record-head {
    flex-direction: column;
  }

  .mobile-record-head .btn {
    width: 100%;
  }

  .mobile-record-actions .btn {
    width: 100%;
  }

  .card {
    padding: 0.9rem;
    border-radius: 10px;
  }

  .card h3 {
    font-size: 0.76rem;
  }

  .stat-value {
    font-size: 1.45rem;
  }

  .section-head,
  .step-row {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .table-wrap {
    border-radius: 10px;
  }
}

/* 账号管理：飞书 open_id + 按手机号查询 */
.staff-feishu-openid-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.staff-feishu-openid-actions .staff-feishu-openid-input {
  flex: 1 1 9rem;
  min-width: 5rem;
}
