:root {
  color-scheme: light;
  --page: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --border: #eef2f7;
  --border-strong: #e3e8ef;
  --title: #111827;
  --text: #4b5563;
  --muted: #9ca3af;
  --primary: #18b7a4;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --link: #2563eb;
  --sidebar: #111827;
  --sidebar-soft: #1f2937;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
  --shadow-hover: 0 14px 32px rgba(15, 23, 42, 0.075);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d1117;
  --surface: #141a23;
  --surface-soft: #181f2a;
  --border: #242d3a;
  --border-strong: #303b4b;
  --title: #f3f4f6;
  --text: #c2c8d0;
  --muted: #7f8997;
  --sidebar: #080d14;
  --sidebar-soft: #141c27;
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--page);
  color: var(--title);
  font-family: Inter, "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button { color: inherit; }

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(24, 183, 164, 0.2);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cms-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: min(100%, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--page);
  transition: grid-template-columns 180ms ease;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 280px;
  height: 100vh;
  padding: 26px 16px 22px;
  overflow: hidden;
  background: var(--sidebar);
  color: #e5e7eb;
  transition: width 180ms ease, transform 180ms ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 50px;
  padding: 0 8px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  white-space: nowrap;
}

.brand-copy strong { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.brand-copy span { color: #9ca3af; font-size: 13px; font-weight: 400; }

.sidebar-nav {
  display: grid;
  gap: 7px;
  margin-top: 34px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #d1d5db;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item svg { width: 21px; height: 21px; flex: 0 0 21px; }
.nav-item span { font-size: 15px; font-weight: 550; white-space: nowrap; }
.nav-item:hover { background: var(--sidebar-soft); color: #ffffff; transform: translateX(2px); }
.nav-item.is-active { background: #163e63; color: #ffffff; }
.nav-item.is-active::before {
  position: absolute;
  left: -16px;
  top: 9px;
  width: 4px;
  height: 30px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
  content: "";
}

.sidebar-bottom {
  display: grid;
  gap: 22px;
  margin-top: auto;
}

.collapse-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #3a4658;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #d1d5db;
  cursor: pointer;
}

.collapse-button:hover { background: var(--sidebar-soft); color: #fff; }
.collapse-symbol { font-size: 21px; letter-spacing: -5px; transform: translateX(-2px); }

.system-meta { display: grid; gap: 7px; padding: 0 10px; color: #8993a3; font-size: 12px; font-weight: 400; }
.system-meta strong { margin-bottom: 3px; color: #dbe1e9; font-size: 14px; font-weight: 550; }
.system-meta b { color: #b8c0cc; font-weight: 500; }

.content-shell { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 30px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.topbar-left,
.topbar-actions { display: flex; align-items: center; }
.topbar-left { gap: 16px; }
.topbar-left strong { font-size: 15px; font-weight: 600; }
.topbar-actions { position: relative; gap: 12px; }

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover { background: var(--surface-soft); }

.global-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 270px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
  color: #64748b;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.global-search:focus-within { border-color: rgba(24, 183, 164, 0.5); box-shadow: 0 0 0 4px rgba(24, 183, 164, 0.08); }
.global-search svg { width: 18px; height: 18px; }
.global-search input { width: 100%; height: 100%; padding: 0 0 0 10px; border: 0; outline: 0; background: transparent; color: var(--title); font-size: 13px; }
.global-search input::placeholder { color: var(--muted); }

.search-results {
  position: absolute;
  top: 47px;
  left: 0;
  z-index: 70;
  width: 360px;
  max-height: 420px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

.search-result {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.search-result:hover { background: var(--surface-soft); }
.search-kind { flex: 0 0 auto; padding: 4px 7px; border-radius: 7px; background: #eef6ff; color: var(--link); font-size: 11px; }
.search-copy { display: grid; gap: 2px; min-width: 0; }
.search-copy strong, .search-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-copy strong { font-size: 13px; font-weight: 600; }
.search-copy span { color: var(--muted); font-size: 11px; font-weight: 400; }

.notification-button { position: relative; }
.notification-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 9px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
}

.notification-panel {
  position: absolute;
  top: 50px;
  right: 112px;
  z-index: 70;
  width: 330px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

.notification-panel h3 { margin: 0 0 12px; font-size: 15px; }
.notification-panel p { margin: 8px 0; color: var(--text); font-size: 13px; line-height: 1.6; }

.admin-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 4px 0 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.admin-profile strong { font-size: 13px; font-weight: 600; }
.admin-profile > span:last-child { color: var(--muted); }
.admin-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: #e9eef5;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

.dashboard { padding: 20px 30px; }

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.page-heading h1 { margin: 0; color: var(--title); font-size: 34px; font-weight: 600; letter-spacing: -0.035em; }
.page-heading p { margin: 8px 0 0; color: #7b8798; font-size: 14px; font-weight: 400; }
.wave { display: inline-block; margin-left: 6px; font-size: 25px; transform: translateY(-2px); }

.today-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--title);
  font-size: 13px;
  white-space: nowrap;
}
.today-chip svg { width: 17px; height: 17px; color: #64748b; }

.card,
.primary-card,
.operation-strip {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card,
.primary-card,
.operation-card,
.quick-grid > button {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover,
.primary-card:hover,
.operation-card:hover,
.quick-grid > button:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-hover); }

.primary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.primary-card {
  position: relative;
  min-width: 0;
  min-height: 116px;
  padding: 18px 20px;
  overflow: hidden;
}

.primary-card h3,
.operation-card h3 { margin: 0; color: var(--text); font-size: 14px; font-weight: 550; }
.primary-value { display: flex; align-items: baseline; gap: 8px; margin-top: 7px; }
.primary-value strong { color: var(--title); font-size: 42px; font-weight: 700; line-height: 1; letter-spacing: -0.045em; }
.primary-value span { color: #64748b; font-size: 13px; font-weight: 400; }
.primary-foot { margin-top: 14px; color: var(--muted); font-size: 12px; font-weight: 400; }
.primary-icon {
  position: absolute;
  right: 18px;
  top: 25px;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
}
.primary-icon svg { width: 27px; height: 27px; }

.blue { color: #2675f5; }
.green { color: #16a34a; }
.purple { color: #8b5cf6; }
.orange { color: #f97316; }
.red { color: #ef476f; }
.slate { color: #64748b; }
.normal { color: var(--success); }
.warning { color: var(--warning); }
.error { color: var(--danger); }
.primary-icon.blue, .quick-icon.blue { background: #eaf3ff; }
.primary-icon.green, .quick-icon.green { background: #e8f7ee; }
.primary-icon.purple, .quick-icon.purple { background: #f1eaff; }
.primary-icon.orange, .quick-icon.orange { background: #fff0e3; }
.primary-icon.red { background: #ffe9ee; }
.primary-icon.slate, .quick-icon.slate { background: #edf1f5; }

.operation-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 20px;
  overflow: hidden;
}

.operation-card {
  position: relative;
  min-width: 0;
  min-height: 114px;
  padding: 16px 18px 9px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.operation-card:last-child { border-right: 0; }
.operation-card:hover { z-index: 2; }
.operation-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.operation-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-soft); }
.operation-icon svg { width: 18px; height: 18px; }
.operation-value { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; }
.operation-value strong { font-size: 25px; font-weight: 700; letter-spacing: -0.035em; }
.operation-value span { color: #64748b; font-size: 11px; }
.operation-change { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 400; }
.operation-change b { font-weight: 550; }
.sparkline { width: 100%; height: 26px; margin-top: 1px; overflow: visible; }
.system-description { margin-top: 12px; color: var(--text); font-size: 11px; font-weight: 400; line-height: 1.55; }

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr) minmax(270px, 0.92fr);
  gap: 18px;
  margin-top: 16px;
}

.trend-card,
.advice-card,
.recent-card { min-height: 300px; padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.range-switch {
  display: flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}
.range-switch button,
.trend-tabs button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 11px;
}
.range-switch button { height: 28px; padding: 0 10px; }
.range-switch button.is-active { background: var(--surface); color: var(--title); box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08); }

.trend-tabs { display: flex; gap: 3px; margin-top: 15px; }
.trend-tabs button { height: 31px; padding: 0 13px; background: #f5f7fa; }
.trend-tabs button.is-active { background: #edf4ff; color: var(--link); font-weight: 600; }
.chart-wrap { position: relative; height: 185px; margin-top: 9px; }
.main-chart { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #edf0f4; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--link); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: rgba(37, 99, 235, 0.08); stroke: none; }
.chart-dot { fill: #fff; stroke: var(--link); stroke-width: 2; }
.chart-label { fill: #8c97a7; font-size: 10px; font-weight: 400; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.text-button:hover { color: var(--link); }
.text-button svg, .timeline-more svg { width: 14px; height: 14px; }

.advice-list { display: grid; gap: 8px; margin-top: 13px; }
.advice-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.advice-symbol { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #edf4ff; color: var(--link); font-size: 12px; font-weight: 700; }
.advice-symbol.publish { background: #e7f8ee; color: var(--success); }
.advice-symbol.review { background: #fff0e3; color: var(--warning); }
.advice-copy { display: grid; gap: 4px; min-width: 0; }
.advice-copy strong { overflow: hidden; color: var(--title); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.advice-copy span { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.5; }
.small-action {
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: #edf4ff;
  color: var(--link);
  cursor: pointer;
  font-size: 10px;
  font-weight: 550;
}
.small-action:hover { filter: brightness(0.97); }

.timeline { position: relative; display: grid; gap: 7px; margin-top: 12px; padding-left: 21px; }
.timeline::before { position: absolute; left: 5px; top: 7px; bottom: 7px; width: 1px; background: var(--border-strong); content: ""; }
.timeline-item { position: relative; display: grid; gap: 2px; min-height: 32px; }
.timeline-dot { position: absolute; left: -20px; top: 4px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--link); box-shadow: 0 0 0 2px #dbeafe; }
.timeline-dot.green { background: var(--success); box-shadow: 0 0 0 2px #dcfce7; }
.timeline-dot.orange { background: var(--warning); box-shadow: 0 0 0 2px #ffedd5; }
.timeline-dot.purple { background: #8b5cf6; box-shadow: 0 0 0 2px #ede9fe; }
.timeline-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--title);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.timeline-item span { color: var(--muted); font-size: 10px; font-weight: 400; }
.timeline-more {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.timeline-more:hover { color: var(--link); }

.quick-card { margin-top: 16px; padding: 15px 19px 16px; }
.quick-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.quick-grid > button {
  display: grid;
  place-items: center;
  gap: 9px;
  min-width: 0;
  height: 72px;
  padding: 10px 5px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
}
.quick-grid > button strong { font-size: 11px; font-weight: 550; white-space: nowrap; }
.quick-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; }
.quick-icon svg { width: 20px; height: 20px; }

.empty-state { display: grid; min-height: 100px; place-items: center; color: var(--muted); font-size: 12px; font-weight: 400; text-align: center; }
.empty-value { color: var(--muted) !important; }
.skeleton { border-radius: 12px; background: #eef2f6; animation: pulse 1.5s ease-in-out infinite; }
.chart-skeleton { width: 100%; height: 100%; }
@keyframes pulse { 50% { opacity: 0.48; } }

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(10px);
}
.login-overlay[hidden] { display: none; }
.login-dialog {
  display: grid;
  gap: 18px;
  width: min(100%, 400px);
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
}
.login-dialog > img { width: 48px; height: 48px; border-radius: 12px; }
.login-dialog h2 { margin: 0; font-size: 23px; font-weight: 600; }
.login-dialog p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.login-dialog label { display: grid; gap: 7px; color: var(--text); font-size: 13px; }
.login-dialog input { height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--title); outline: 0; }
.primary-button { height: 40px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; cursor: pointer; font-weight: 600; }
.primary-button:hover { background: #129d8d; }
.login-error { min-height: 18px; color: var(--danger) !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 120;
  max-width: min(90vw, 420px);
  padding: 11px 16px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
  font-size: 13px;
  transform: translateX(-50%);
}

.cms-shell.is-collapsed { grid-template-columns: 88px minmax(0, 1fr); }
.cms-shell.is-collapsed .sidebar { width: 88px; padding-inline: 12px; }
.cms-shell.is-collapsed .brand { padding-inline: 10px; }
.cms-shell.is-collapsed .brand-copy,
.cms-shell.is-collapsed .nav-item span,
.cms-shell.is-collapsed .collapse-button span:last-child,
.cms-shell.is-collapsed .system-meta { display: none; }
.cms-shell.is-collapsed .nav-item { justify-content: center; padding: 0; }
.cms-shell.is-collapsed .nav-item:hover { transform: none; }
.cms-shell.is-collapsed .nav-item.is-active::before { left: -12px; }
.cms-shell.is-collapsed .collapse-button { justify-content: center; padding: 0; }
.cms-shell.is-collapsed .collapse-symbol { transform: rotate(180deg); }

@media (max-width: 1220px) {
  .cms-shell { grid-template-columns: 88px minmax(0, 1fr); }
  .sidebar { width: 88px; padding-inline: 12px; }
  .brand { padding-inline: 10px; }
  .brand-copy, .nav-item span, .collapse-button span:last-child, .system-meta { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item.is-active::before { left: -12px; }
  .collapse-button { justify-content: center; padding: 0; }
  .primary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operation-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .operation-card:nth-child(3) { border-right: 0; }
  .operation-card:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
  .insight-grid { grid-template-columns: 1fr 1fr; }
  .trend-card { grid-column: 1 / -1; }
  .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .cms-shell { display: block; }
  .sidebar { position: fixed; left: 0; width: 280px; padding-inline: 16px; transform: translateX(-100%); box-shadow: 18px 0 45px rgba(15, 23, 42, 0.18); }
  .cms-shell.mobile-sidebar-open .sidebar { transform: translateX(0); }
  .sidebar .brand { padding-inline: 8px; }
  .sidebar .brand-copy, .sidebar .nav-item span, .sidebar .collapse-button span:last-child, .sidebar .system-meta { display: grid; }
  .sidebar .nav-item { justify-content: flex-start; padding: 0 14px; }
  .sidebar .nav-item.is-active::before { left: -16px; }
  .topbar { padding: 0 18px; }
  .dashboard { padding: 22px 18px 30px; }
  .global-search { width: 210px; }
  .admin-profile strong, .admin-profile > span:last-child { display: none; }
}

@media (max-width: 640px) {
  .topbar-left > strong { display: none; }
  .topbar-actions { gap: 4px; }
  .global-search { width: 40px; padding: 0; justify-content: center; }
  .global-search input { position: absolute; inset: 0; width: 100%; padding: 0; opacity: 0; }
  .global-search:focus-within { position: fixed; top: 14px; right: 102px; left: 58px; z-index: 80; width: auto; padding: 0 12px; justify-content: flex-start; }
  .global-search:focus-within input { position: static; width: 100%; padding-left: 9px; opacity: 1; }
  .notification-panel { position: fixed; top: 62px; right: 12px; left: 12px; width: auto; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading h1 { font-size: 29px; }
  .today-chip { width: fit-content; }
  .primary-grid { grid-template-columns: 1fr; }
  .primary-card { min-height: 126px; }
  .operation-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operation-card:nth-child(3) { border-right: 1px solid var(--border); }
  .operation-card:nth-child(2n) { border-right: 0; }
  .operation-card:nth-child(-n+4) { border-bottom: 1px solid var(--border); }
  .insight-grid { grid-template-columns: 1fr; }
  .trend-card { grid-column: auto; }
  .trend-tabs { overflow-x: auto; }
  .trend-tabs button { white-space: nowrap; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-results { position: fixed; top: 62px; right: 12px; left: 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* CMS V1 · User management */
select,
textarea { font: inherit; }

.cms-page { padding: 26px 30px 36px; }
.module-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.module-heading h1 { margin: 0; color: var(--title); font-size: 34px; font-weight: 600; letter-spacing: -0.035em; }
.module-heading p { margin: 8px 0 0; color: #7b8798; font-size: 14px; font-weight: 400; }
.action-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; white-space: nowrap; }
.action-button svg { width: 17px; height: 17px; }
.secondary-button,
.danger-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.secondary-button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--title); }
.secondary-button:hover { border-color: #cbd5e1; background: var(--surface-soft); }
.danger-button { border: 0; background: var(--danger); color: #fff; }
.danger-button:hover { background: #dc2626; }
.ghost-button { border: 0; background: transparent; color: var(--text); }
.ghost-button:hover { background: var(--surface-soft); }

.quick-filters { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.quick-filters::-webkit-scrollbar { display: none; }
.quick-filters button {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
}
.quick-filters button:hover { border-color: var(--border-strong); color: var(--title); }
.quick-filters button.is-active { border-color: rgba(24, 183, 164, 0.24); background: #ebfaf7; color: #0f8f80; font-weight: 600; }

.user-toolbar { padding: 16px; }
.user-search { display: flex; align-items: center; width: 100%; height: 43px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--surface); color: #64748b; }
.user-search:focus-within { border-color: rgba(24, 183, 164, .55); box-shadow: 0 0 0 4px rgba(24, 183, 164, .08); }
.user-search svg { width: 18px; height: 18px; }
.user-search input { width: 100%; height: 100%; padding: 0 0 0 10px; border: 0; outline: 0; background: transparent; color: var(--title); font-size: 13px; }
.user-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.user-filter-grid label { display: grid; gap: 6px; min-width: 0; }
.user-filter-grid span { color: var(--muted); font-size: 11px; font-weight: 500; }
.user-filter-grid select,
.user-filter-grid input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; outline: 0; background: var(--surface-soft); color: var(--text); font-size: 12px; }
.user-filter-grid select { padding-right: 28px; }
.user-filter-grid select:focus,
.user-filter-grid input:focus { border-color: rgba(24, 183, 164, .5); }

.user-list-card { margin-top: 16px; overflow: hidden; }
.list-meta { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 17px; border-bottom: 1px solid var(--border); }
.list-meta > div { display: flex; align-items: baseline; gap: 5px; }
.list-meta strong { font-size: 20px; font-weight: 700; }
.list-meta span { color: var(--muted); font-size: 12px; font-weight: 400; }
.user-table-wrap { max-height: 650px; overflow: auto; }
.user-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.user-table th { position: sticky; top: 0; z-index: 2; height: 42px; padding: 0 10px; border-bottom: 1px solid var(--border); background: #fbfcfd; color: #7c8797; font-size: 11px; font-weight: 550; text-align: left; white-space: nowrap; }
.user-table td { height: 67px; padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 12px; vertical-align: middle; }
.user-table tbody tr { transition: background 140ms ease; }
.user-table tbody tr:hover { background: #fafcfd; }
.user-table tbody tr:last-child td { border-bottom: 0; }
.user-table th:nth-child(1) { width: 17%; }.user-table th:nth-child(2) { width: 13%; }.user-table th:nth-child(3) { width: 9%; }.user-table th:nth-child(4) { width: 10%; }.user-table th:nth-child(5) { width: 10%; }.user-table th:nth-child(6) { width: 12%; }.user-table th:nth-child(7) { width: 11%; }.user-table th:nth-child(8) { width: 9%; }.user-table th:nth-child(9) { width: 9%; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-avatar { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; overflow: hidden; border-radius: 12px; background: #e8f7f4; color: #0f8f80; font-size: 14px; font-weight: 700; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-copy,
.cell-stack { display: grid; gap: 4px; min-width: 0; }
.user-copy strong,
.cell-stack strong { overflow: hidden; color: var(--title); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.user-copy span,
.cell-stack span { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.platform-list { display: flex; flex-wrap: wrap; gap: 3px; }
.platform-pill,
.status-pill,
.member-pill,
.source-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 23px;
  padding: 0 7px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
}
.platform-pill.wechat_mini_program { background: #ebf8ef; color: #168343; }
.platform-pill.ios { background: #f1f3f6; color: #374151; }
.platform-pill.android { background: #eef8e8; color: #4d7c0f; }
.member-pill.active { background: #e9f9f5; color: #0f8f80; }
.member-pill.permanent { background: #fff6dc; color: #a16207; }
.member-pill.expired { background: #fff0f0; color: #c2413a; }
.member-pill.ordinary { background: #f1f5f9; color: #64748b; }
.status-pill.normal { background: #ebf8ef; color: #168343; }
.status-pill.banned,
.status-pill.deleted { background: #fff0f0; color: #dc2626; }
.table-actions { display: flex; align-items: center; gap: 3px; }
.table-action { height: 30px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent; color: var(--link); cursor: pointer; font-size: 10px; }
.table-action:hover { background: #edf4ff; }
.table-action.icon-only { display: grid; width: 30px; padding: 0; place-items: center; color: var(--muted); }
.table-action svg { width: 15px; height: 15px; }
.user-mobile-list { display: none; }
.pagination { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 9px 16px; border-top: 1px solid var(--border); }
.pagination-info { color: var(--muted); font-size: 11px; }
.pagination-actions { display: flex; align-items: center; gap: 6px; }
.pagination button,
.pagination select { height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 11px; }
.pagination button { padding: 0 10px; cursor: pointer; }
.pagination button:disabled { cursor: default; opacity: .42; }
.pagination select { padding: 0 8px; }

.back-button { display: inline-flex; align-items: center; gap: 6px; height: 34px; margin-bottom: 14px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.back-button:hover { color: var(--title); }
.back-button svg { width: 17px; height: 17px; }
.user-profile-hero { display: flex; align-items: center; justify-content: space-between; min-height: 122px; padding: 22px 24px; }
.profile-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.profile-avatar { display: grid; flex: 0 0 64px; width: 64px; height: 64px; place-items: center; overflow: hidden; border-radius: 20px; background: #e7f8f4; color: #0f8f80; font-size: 23px; font-weight: 700; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-title { display: grid; gap: 7px; min-width: 0; }
.profile-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.profile-title h1 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 400; }
.profile-actions { display: flex; gap: 8px; }
.profile-actions svg { width: 15px; height: 15px; }
.detail-tabs { display: flex; gap: 3px; margin-top: 16px; padding: 5px; overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); scrollbar-width: none; }
.detail-tabs::-webkit-scrollbar { display: none; }
.detail-tabs button { flex: 0 0 auto; height: 36px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: #64748b; cursor: pointer; font-size: 12px; }
.detail-tabs button:hover { background: var(--surface-soft); color: var(--title); }
.detail-tabs button.is-active { background: #eaf8f5; color: #0f8f80; font-weight: 600; }
.detail-content { margin-top: 16px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(310px, .88fr); gap: 16px; }
.detail-card { padding: 19px; }
.detail-card h2 { margin: 0 0 16px; font-size: 17px; font-weight: 600; }
.detail-card h3 { margin: 0; font-size: 13px; font-weight: 600; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.info-item { display: grid; gap: 5px; min-width: 0; }
.info-item span { color: var(--muted); font-size: 10px; font-weight: 400; }
.info-item strong { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.stat-card-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.stat-card { min-height: 88px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.stat-card span { display: block; color: var(--muted); font-size: 10px; }
.stat-card strong { display: block; margin-top: 9px; color: var(--title); font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.activity-list { display: grid; gap: 0; }
.activity-item { position: relative; display: grid; gap: 3px; min-height: 58px; padding: 10px 0 10px 25px; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: 0; }
.activity-item::before { position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px #e8f8f5; content: ""; }
.activity-item strong { font-size: 12px; font-weight: 600; }
.activity-item span { color: var(--muted); font-size: 10px; font-weight: 400; }

.membership-summary { display: grid; grid-template-columns: minmax(240px, 1.1fr) repeat(3, minmax(130px, .7fr)); gap: 12px; }
.membership-main { min-height: 132px; padding: 20px; border: 1px solid #dcefe9; border-radius: 16px; background: #f7fcfa; }
.membership-main > span { color: #568079; font-size: 11px; }
.membership-main h2 { margin: 10px 0 5px; font-size: 24px; font-weight: 650; }
.membership-main p { margin: 0; color: var(--muted); font-size: 11px; }
.membership-fact { min-height: 132px; padding: 20px; }
.membership-fact span { color: var(--muted); font-size: 10px; }
.membership-fact strong { display: block; margin-top: 12px; font-size: 15px; font-weight: 600; }
.membership-actions-card { margin-top: 16px; padding: 18px; }
.action-cluster { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.action-cluster button { height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 11px; }
.action-cluster button:hover { border-color: rgba(24, 183, 164, .4); background: #f3fbf9; color: #0f8f80; }
.action-cluster button.danger-link:hover { border-color: #fecaca; background: #fff5f5; color: var(--danger); }
.permission-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.permission-item { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 11px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 11px; }
.permission-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.permission-dot.on { background: var(--primary); box-shadow: 0 0 0 4px rgba(24,183,164,.1); }
.custom-permission-note { margin-top: 11px; color: var(--warning); font-size: 11px; }

.study-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.study-range { display: flex; gap: 5px; }
.study-range button { height: 31px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 10px; }
.study-range button.is-active { background: #edf8f6; color: #0f8f80; }
.study-chart-card { margin-top: 16px; padding: 18px; }
.study-chart { height: 220px; margin-top: 14px; }
.study-chart svg { width: 100%; height: 100%; overflow: visible; }
.study-line { fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.study-area { fill: rgba(24, 183, 164, .08); stroke: none; }
.progress-list { display: grid; gap: 13px; margin-top: 14px; }
.progress-row { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(150px, 1.4fr) auto; align-items: center; gap: 12px; font-size: 11px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 5px; background: #edf1f5; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }

.sub-tab-bar { display: flex; gap: 5px; margin-bottom: 12px; }
.sub-tab-bar button { height: 34px; padding: 0 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 11px; }
.sub-tab-bar button.is-active { border-color: rgba(24, 183, 164, .28); background: #edf9f6; color: #0f8f80; }
.record-list { display: grid; gap: 9px; }
.record-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 68px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.record-copy { display: grid; gap: 5px; min-width: 0; }
.record-copy strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.record-copy span { color: var(--muted); font-size: 10px; font-weight: 400; }
.record-actions { display: flex; gap: 5px; }
.record-actions button { height: 30px; border: 0; border-radius: 8px; background: var(--surface-soft); color: var(--text); cursor: pointer; font-size: 10px; }
.record-actions button:hover { background: #edf8f6; color: #0f8f80; }
.simple-table { width: 100%; border-collapse: collapse; }
.simple-table th { padding: 10px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; font-weight: 500; text-align: left; }
.simple-table td { padding: 13px 10px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 11px; font-weight: 400; }
.simple-table tr:last-child td { border-bottom: 0; }
.binding-card { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.binding-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #edf8f6; color: #0f8f80; }
.binding-icon svg { width: 18px; height: 18px; }
.readonly-banner { margin-top: 14px; padding: 13px; border: 1px solid #fde7b2; border-radius: 11px; background: #fffbeb; color: #92400e; font-size: 11px; font-weight: 400; line-height: 1.6; }
.audit-entry { display: grid; grid-template-columns: 140px minmax(0, 1fr) 180px; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.audit-entry:last-child { border-bottom: 0; }
.audit-entry time,
.audit-entry span { color: var(--muted); font-size: 10px; font-weight: 400; }
.audit-entry strong { display: block; margin-bottom: 4px; font-size: 12px; }
.audit-reason { color: var(--text) !important; }

.panel-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(17, 24, 39, .28); backdrop-filter: blur(2px); }
.panel-backdrop[hidden],
.side-drawer[hidden],
.confirm-overlay[hidden] { display: none; }
.side-drawer { position: fixed; top: 0; right: 0; z-index: 95; display: flex; flex-direction: column; width: min(520px, 100vw); height: 100vh; border-left: 1px solid var(--border); background: var(--surface); box-shadow: -24px 0 60px rgba(15,23,42,.12); animation: drawer-in 180ms ease-out; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .7; } }
.side-drawer > header { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.side-drawer > header span { color: var(--muted); font-size: 10px; font-weight: 500; }
.side-drawer > header h2 { margin: 4px 0 0; font-size: 20px; font-weight: 650; }
.drawer-content { flex: 1; padding: 20px 22px 28px; overflow-y: auto; }
.drawer-form { display: grid; gap: 18px; }
.drawer-section { display: grid; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.drawer-section:last-of-type { border-bottom: 0; }
.drawer-section h3 { margin: 0; font-size: 13px; font-weight: 650; }
.drawer-form label { display: grid; gap: 7px; color: var(--text); font-size: 11px; }
.drawer-form input,
.drawer-form select,
.drawer-form textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 10px; outline: 0; background: var(--surface); color: var(--title); font-size: 12px; }
.drawer-form input,
.drawer-form select { height: 41px; padding: 0 11px; }
.drawer-form textarea { min-height: 82px; padding: 11px; resize: vertical; line-height: 1.6; }
.drawer-form input:focus,
.drawer-form select:focus,
.drawer-form textarea:focus { border-color: rgba(24,183,164,.55); box-shadow: 0 0 0 4px rgba(24,183,164,.07); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.switch-row { display: flex !important; align-items: center; justify-content: space-between; min-height: 38px; }
.switch-row input { width: 18px; height: 18px; }
.current-entitlement { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; border: 1px solid #dcefe9; border-radius: 12px; background: #f7fcfa; }
.current-entitlement div { display: grid; gap: 4px; }
.current-entitlement span { color: #6b817d; font-size: 10px; }
.current-entitlement strong { font-size: 12px; font-weight: 600; }
.adjust-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.adjust-options label { display: block; }
.adjust-options input { position: absolute; opacity: 0; pointer-events: none; }
.adjust-options span { display: grid; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: var(--text); cursor: pointer; font-size: 10px; }
.adjust-options input:checked + span { border-color: rgba(24,183,164,.45); background: #edf9f6; color: #0f8f80; font-weight: 600; }
.change-preview { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.change-preview h4 { margin: 0 0 10px; font-size: 11px; }
.preview-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.preview-row strong { color: var(--title); font-size: 11px; }
.drawer-actions { position: sticky; bottom: -28px; display: flex; justify-content: flex-end; gap: 8px; margin: 4px -22px -28px; padding: 14px 22px; border-top: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.form-error { min-height: 16px; margin: 0; color: var(--danger); font-size: 11px; }

.confirm-overlay { position: fixed; inset: 0; z-index: 110; display: grid; padding: 20px; place-items: center; background: rgba(17,24,39,.45); backdrop-filter: blur(5px); }
.confirm-dialog { width: min(100%, 410px); padding: 26px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 28px 80px rgba(15,23,42,.2); text-align: center; }
.danger-symbol { display: grid; width: 45px; height: 45px; margin: 0 auto 14px; place-items: center; border-radius: 14px; background: #fff0f0; color: var(--danger); }
.danger-symbol svg { width: 21px; height: 21px; }
.confirm-dialog h2 { margin: 0; font-size: 19px; }
.confirm-dialog p { margin: 10px 0 22px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.65; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

@media (max-width: 1220px) {
  .user-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .user-table th:nth-child(2), .user-table td:nth-child(2), .user-table th:nth-child(5), .user-table td:nth-child(5) { display: none; }
  .user-table th:nth-child(1) { width: 22%; }.user-table th:nth-child(3) { width: 12%; }.user-table th:nth-child(4) { width: 13%; }.user-table th:nth-child(6) { width: 16%; }.user-table th:nth-child(7) { width: 14%; }.user-table th:nth-child(8) { width: 12%; }.user-table th:nth-child(9) { width: 11%; }
  .stat-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .membership-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .cms-page { padding: 22px 18px 32px; }
  .detail-grid { grid-template-columns: 1fr; }
  .user-table-wrap { display: none; }
  .user-mobile-list { display: grid; gap: 10px; padding: 12px; }
  .user-mobile-card { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
  .mobile-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .mobile-card-info { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
  .mobile-card-info div { display: grid; gap: 4px; min-width: 0; }
  .mobile-card-info span { color: var(--muted); font-size: 9px; }
  .mobile-card-info strong { overflow: hidden; color: var(--text); font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .mobile-card-actions button { height: 34px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); color: var(--text); font-size: 10px; }
  .mobile-card-actions button:first-child { border-color: rgba(24,183,164,.25); background: #edf9f6; color: #0f8f80; }
  .user-profile-hero { align-items: flex-start; flex-direction: column; }
  .profile-actions { width: 100%; }
  .profile-actions button { flex: 1; }
  .stat-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .membership-summary { grid-template-columns: 1fr 1fr; }
  .audit-entry { grid-template-columns: 100px minmax(0, 1fr); }
  .audit-entry > span:last-child { grid-column: 2; }
}

@media (max-width: 640px) {
  .module-heading { align-items: stretch; flex-direction: column; }
  .module-heading h1 { font-size: 29px; }
  .module-heading .action-button { width: 100%; }
  .user-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-meta { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; padding-block: 10px; }
  .pagination { align-items: stretch; flex-direction: column; gap: 8px; }
  .pagination-actions { justify-content: space-between; }
  .profile-identity { align-items: flex-start; }
  .profile-avatar { flex-basis: 52px; width: 52px; height: 52px; border-radius: 16px; }
  .profile-title h1 { font-size: 20px; }
  .info-grid { grid-template-columns: 1fr; }
  .stat-card-grid { grid-template-columns: 1fr 1fr; }
  .membership-summary { grid-template-columns: 1fr; }
  .permission-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .side-drawer { width: 100vw; }
  .record-row { grid-template-columns: 1fr; }
  .record-actions { justify-content: flex-start; }
  .simple-table { min-width: 650px; }
  .detail-card:has(.simple-table) { overflow-x: auto; }
  .audit-entry { grid-template-columns: 1fr; gap: 5px; }
  .audit-entry > span:last-child { grid-column: auto; }
}

/* CMS V1 · Question bank management */
.heading-actions { display: flex; gap: 9px; }
.mobile-question-filter { display: none; }
.question-summary-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.question-summary-strip article { display: flex; align-items: center; gap: 11px; min-height: 67px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.summary-dot { width: 9px; height: 34px; border-radius: 6px; background: #cbd5e1; }
.summary-dot.published { background: var(--primary); }.summary-dot.draft { background: #94a3b8; }.summary-dot.pending_review { background: var(--warning); }.summary-dot.disabled { background: var(--danger); }.summary-dot.real_exam { background: #8b5cf6; }.summary-dot.interview { background: #f97316; }
.question-summary-strip article div { display: grid; gap: 2px; }
.question-summary-strip strong { color: var(--title); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.question-summary-strip article span:last-child { color: var(--muted); font-size: 10px; font-weight: 400; }
.question-toolbar { padding: 14px; }
.question-search { display: flex; align-items: center; height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 11px; color: #64748b; }
.question-search:focus-within { border-color: rgba(24,183,164,.5); box-shadow: 0 0 0 4px rgba(24,183,164,.07); }
.question-search svg { width: 17px; height: 17px; }
.question-search input { flex: 1; height: 100%; padding: 0 0 0 9px; border: 0; outline: 0; background: transparent; color: var(--title); font-size: 12px; }
.question-filter-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.question-filter-row select,
.question-batch-bar select { min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--border); border-radius: 9px; outline: 0; background: var(--surface-soft); color: var(--text); font-size: 10px; }
.question-filter-row select:focus { border-color: rgba(24,183,164,.45); }
.question-filter-advanced { display: grid; grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.question-filter-advanced label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 8px; font-weight: 450; }
.question-filter-advanced input { width: 100%; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--border); border-radius: 9px; outline: 0; background: var(--surface-soft); color: var(--text); font: inherit; }
.question-filter-advanced input:focus { border-color: rgba(24,183,164,.45); }
.question-quick-filters { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.question-quick-filters::-webkit-scrollbar { display: none; }
.question-quick-filters button { flex: 0 0 auto; height: 29px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.question-quick-filters button:hover { background: var(--surface-soft); color: var(--text); }
.question-quick-filters button.is-active { background: #eaf8f5; color: #0f8f80; font-weight: 600; }

.question-workspace { display: grid; grid-template-columns: 220px minmax(400px, 1fr) 410px; gap: 12px; align-items: start; margin-top: 14px; }
.chapter-tree-panel,
.question-list-panel,
.question-preview-panel { min-width: 0; height: calc(100vh - 320px); min-height: 540px; overflow: hidden; }
.chapter-tree-panel { position: sticky; top: 82px; }
.chapter-tree-panel > header,
.question-list-head { display: flex; align-items: center; justify-content: space-between; min-height: 49px; padding: 0 13px; border-bottom: 1px solid var(--border); }
.chapter-tree-panel > header strong,
.question-list-head strong { font-size: 12px; font-weight: 650; }
.chapter-tree-panel > header span,
.question-list-head span { color: var(--muted); font-size: 9px; font-weight: 400; }
.chapter-tree { height: calc(100% - 49px); padding: 7px; overflow-y: auto; }
.tree-all,
.chapter-tree-title,
.section-tree-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.tree-all { height: 37px; padding: 0 9px; border-radius: 9px; font-size: 10px; }
.tree-all:hover,
.tree-all.is-active { background: #edf8f6; color: #0f8f80; }
.tree-all b,
.chapter-tree-title b,
.section-tree-list b { color: var(--muted); font-size: 9px; font-weight: 500; }
.chapter-tree-group { margin-top: 3px; }
.chapter-tree-title-row { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; }
.chapter-tree-title { height: 45px; padding: 0 5px 0 9px; border-radius: 9px; }
.chapter-tree-toggle { display: grid; width: 24px; height: 32px; padding: 0; border: 0; place-items: center; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; transition: transform 160ms ease; }
.chapter-tree-toggle:hover { background: var(--surface-soft); color: var(--title); }
.chapter-tree-group.is-open .chapter-tree-toggle { transform: rotate(180deg); }
.chapter-tree-title:hover,
.chapter-tree-title.is-active { background: var(--surface-soft); color: var(--title); }
.chapter-tree-title > span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.chapter-tree-title i { display: grid; width: 23px; height: 23px; flex: 0 0 23px; place-items: center; border-radius: 7px; background: #edf8f6; color: #0f8f80; font-size: 8px; font-style: normal; }
.chapter-tree-copy { display: grid; gap: 1px; min-width: 0; }
.chapter-tree-title strong { overflow: hidden; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.chapter-tree-copy small { color: var(--muted); font-size: 7px; font-weight: 400; }
.section-tree-list { display: none; padding: 2px 0 5px 30px; }
.chapter-tree-group.is-open .section-tree-list { display: grid; }
.section-tree-list button { min-height: 30px; padding: 5px 7px; border-radius: 8px; font-size: 9px; line-height: 1.35; }
.section-tree-list button:hover { background: var(--surface-soft); }
.section-tree-list button.is-active { background: #edf8f6; color: #0f8f80; font-weight: 600; }
.section-tree-list b.empty { color: #b2bac5; font-size: 8px; }

.question-list-panel { display: flex; flex-direction: column; }
.question-list-head > div { display: grid; gap: 3px; }
.select-all-row { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.select-all-row input,
.question-table input,
.question-mobile-card input { accent-color: var(--primary); }
.question-table-wrap { flex: 1; overflow: auto; }
.question-table { width: 100%; min-width: 1050px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.question-table th { position: sticky; top: 0; z-index: 2; height: 37px; padding: 0 8px; border-bottom: 1px solid var(--border); background: #fbfcfd; color: #7c8797; font-size: 9px; font-weight: 550; text-align: left; }
.question-table td { height: 66px; padding: 8px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 10px; vertical-align: middle; }
.question-table tr:hover,
.question-table tr.is-current { background: #f8fcfb; }
.question-table th:nth-child(1) { width: 34px; }.question-table th:nth-child(2) { width: 230px; }.question-table th:nth-child(3) { width: 105px; }.question-table th:nth-child(4) { width: 62px; }.question-table th:nth-child(5) { width: 62px; }.question-table th:nth-child(6) { width: 78px; }.question-table th:nth-child(7) { width: 78px; }.question-table th:nth-child(8) { width: 105px; }.question-table th:nth-child(9) { width: 68px; }.question-table th:nth-child(10) { width: 110px; }.question-table th:nth-child(11) { width: 108px; }
.question-stem-cell { display: grid; gap: 5px; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.question-stem-cell strong { display: -webkit-box; overflow: hidden; color: var(--title); font-size: 10px; font-weight: 600; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.question-stem-cell span,
.question-category span { overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.question-category { display: grid; gap: 4px; min-width: 0; }
.question-category strong { overflow: hidden; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.question-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.question-tags span { padding: 3px 5px; border-radius: 5px; background: #f2f5f8; color: #64748b; font-size: 8px; }
.light-cell-tag { display: inline-flex; padding: 3px 6px; border-radius: 6px; background: #f2f5f8; color: #64748b; font-size: 8px; white-space: nowrap; }
.answer-state,
.analysis-state { display: inline-flex; color: var(--muted); font-size: 8px; white-space: nowrap; }
.answer-state.is-complete,
.analysis-state.is-complete { color: var(--success); }
.answer-state.is-warning,
.analysis-state.is-warning { color: var(--warning); }
.updated-cell { color: var(--muted); font-size: 8px; line-height: 1.45; }
.question-status { display: inline-flex; align-items: center; min-height: 20px; padding: 0 6px; border-radius: 6px; background: #f1f5f9; color: #64748b; font-size: 8px; font-weight: 600; white-space: nowrap; }
.question-status.published { background: #e8f8f3; color: #118567; }.question-status.pending_review { background: #fff7e6; color: #b56b05; }.question-status.approved { background: #eef5ff; color: #2563eb; }.question-status.disabled { background: #fff0f0; color: #dc2626; }
.quality-ok,
.quality-warning { display: inline-flex; align-items: center; gap: 3px; font-size: 8px; white-space: nowrap; }
.quality-ok { color: var(--success); }.quality-warning { color: var(--warning); }
.quality-ok svg,
.quality-warning svg { width: 11px; height: 11px; }
.duplicate-pill { display: block; width: fit-content; margin-top: 4px; padding: 2px 5px; border-radius: 5px; background: #fff2f2; color: var(--danger); font-size: 7px; }
.source-cell { display: -webkit-box; overflow: hidden; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.question-list-panel .pagination { flex: 0 0 auto; }
.question-mobile-list { display: none; }

.question-preview-panel { position: sticky; top: 82px; display: flex; flex-direction: column; }
.question-preview-empty { display: grid; height: 100%; padding: 30px; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.question-preview-empty svg { width: 28px; height: 28px; margin-bottom: 4px; color: #c1cad5; }
.question-preview-empty strong { color: var(--text); font-size: 12px; }
.question-preview-empty span { max-width: 230px; font-size: 9px; font-weight: 400; line-height: 1.5; }
.question-preview-loading { display: grid; gap: 12px; padding: 18px; }
.question-preview-loading .skeleton { height: 120px; }
.question-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 66px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.question-detail-head > div:first-of-type { display: grid; gap: 4px; min-width: 0; }
.question-detail-head > div > span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.question-detail-head h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; font-weight: 650; }
.question-detail-actions { display: flex; gap: 4px; }
.question-detail-actions button,
.question-detail-footer button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 9px; }
.question-detail-actions button:hover { border-color: rgba(24,183,164,.35); color: #0f8f80; }
.question-detail-actions svg { width: 12px; height: 12px; }
.preview-mobile-close { display: none; }
.question-detail-scroll { flex: 1; padding: 0 14px 15px; overflow-y: auto; }
.detail-category-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 0 4px; color: #667085; font-size: 8px; }
.detail-category-line i { color: #c4cad2; font-style: normal; }.detail-category-line b { padding: 3px 6px; border-radius: 5px; background: #f1f5f9; font-weight: 500; }
.question-detail-section { padding: 14px 0; border-bottom: 1px solid var(--border); }
.question-detail-section:last-child { border-bottom: 0; }
.question-detail-section > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.question-detail-section h3 { margin: 0; color: #667085; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.detail-stem { color: var(--title); font-size: 12px; font-weight: 600; line-height: 1.75; white-space: pre-wrap; }
.detail-rich-text,
.question-reference-answer { color: var(--text); font-size: 10px; font-weight: 400; line-height: 1.75; white-space: pre-wrap; }
.detail-rich-text.is-empty { color: var(--muted); }
.detail-options { display: grid; gap: 6px; }
.detail-options > div { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: start; gap: 7px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; }
.detail-options > div.is-answer { border-color: #b9eadc; background: #f3fcf8; }
.detail-options b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: #f1f5f9; color: #64748b; font-size: 9px; }
.detail-options .is-answer b { background: var(--primary); color: #fff; }
.detail-options span { padding-top: 3px; font-size: 10px; font-weight: 400; line-height: 1.55; }
.detail-options em { padding-top: 4px; color: var(--success); font-size: 8px; font-style: normal; }
.detail-tip { padding: 9px 10px; border-left: 3px solid var(--warning); border-radius: 0 8px 8px 0; background: #fffbeb; color: #8a5b0a; font-size: 9px; font-weight: 400; line-height: 1.6; }
.quality-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quality-grid div { display: grid; gap: 4px; padding: 8px; border-radius: 8px; background: var(--surface-soft); }
.quality-grid span { color: var(--muted); font-size: 7px; }.quality-grid strong { font-size: 9px; font-weight: 600; }
.quality-issue-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }.quality-issue-list span { padding: 4px 6px; border-radius: 6px; background: #fff5e9; color: #a85d05; font-size: 8px; }
.quality-pass { display: flex; align-items: center; gap: 5px; margin: 8px 0 0; color: var(--success); font-size: 8px; font-weight: 400; }.quality-pass svg { width: 12px; height: 12px; }
.detail-meta-list { display: grid; gap: 7px; margin: 0; }.detail-meta-list div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; }.detail-meta-list dt { color: var(--muted); font-size: 8px; }.detail-meta-list dd { margin: 0; color: var(--text); font-size: 9px; font-weight: 400; line-height: 1.5; }
.usage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }.usage-grid div { display: grid; gap: 3px; text-align: center; }.usage-grid strong { font-size: 13px; }.usage-grid span { color: var(--muted); font-size: 7px; }
.detail-empty-data { padding: 14px; border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 9px; text-align: center; }
.version-list { display: grid; gap: 5px; }.version-list article { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; }.version-list article div { display: grid; gap: 2px; }.version-list strong { font-size: 8px; }.version-list span { color: var(--muted); font-size: 7px; }.version-list button { border: 0; background: transparent; color: var(--link); cursor: pointer; font-size: 8px; }
.audit-count { margin: 8px 0 0; color: var(--muted); font-size: 8px; font-weight: 400; }
.question-detail-footer { display: flex; justify-content: flex-end; gap: 6px; min-height: 51px; padding: 10px 14px; border-top: 1px solid var(--border); }
.question-detail-footer .primary-button { border: 0; background: var(--primary); color: #fff; }
.question-detail-footer .danger-link { border-color: #fecaca; color: var(--danger); }

.question-batch-bar { position: fixed; z-index: 70; right: max(24px, calc((100vw - 1440px) / 2 + 24px)); bottom: 20px; left: max(304px, calc((100vw - 1440px) / 2 + 304px)); display: flex; align-items: center; gap: 7px; min-height: 54px; padding: 8px 11px; overflow-x: auto; border: 1px solid var(--border-strong); border-radius: 14px; background: rgba(255,255,255,.97); box-shadow: 0 18px 48px rgba(15,23,42,.14); backdrop-filter: blur(14px); }
.question-batch-bar[hidden] { display: none; }
.question-batch-bar strong { flex: 0 0 auto; padding: 0 7px; font-size: 10px; }
.question-batch-bar button { flex: 0 0 auto; height: 32px; padding: 0 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 9px; }
.question-batch-bar button:hover { background: var(--surface-soft); }.question-batch-bar .danger-link { color: var(--danger); }

.question-editor-page { max-width: 1120px; margin: 0 auto; }
.question-editor-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-bottom: 16px; }
.question-editor-top .back-button { margin: 0; }.question-editor-top > div:nth-child(2) { display: grid; gap: 3px; }.question-editor-top > div > span { color: var(--muted); font-size: 9px; }.question-editor-top h1 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.03em; }
.editor-top-actions { display: flex; gap: 8px; }
.question-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.editor-main-card { padding: 20px; }
.editor-card-head { display: flex; justify-content: space-between; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }.editor-card-head span { color: var(--muted); font-size: 9px; }.editor-card-head h2 { margin: 4px 0 0; font-size: 12px; font-weight: 600; }
.editor-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }.editor-field-grid.compact { grid-template-columns: 1fr 1fr; }
.editor-main-card label,
.editor-side-card label { display: grid; gap: 6px; color: var(--text); font-size: 10px; }
.editor-main-card input,
.editor-main-card select,
.editor-main-card textarea,
.editor-side-card input,
.editor-side-card select,
.editor-side-card textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 9px; outline: 0; background: var(--surface); color: var(--title); font-size: 11px; font-weight: 400; }
.editor-main-card input,
.editor-main-card select,
.editor-side-card input,
.editor-side-card select { height: 38px; padding: 0 9px; }
.editor-main-card textarea,
.editor-side-card textarea { padding: 10px; resize: vertical; line-height: 1.65; }
.editor-main-card :is(input,select,textarea):focus,
.editor-side-card :is(input,select,textarea):focus { border-color: rgba(24,183,164,.5); box-shadow: 0 0 0 4px rgba(24,183,164,.06); }
.editor-wide-field { margin-top: 14px; }
.editor-options-section,
.editor-material-section,
.editor-subjective-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.editor-options-section[hidden] { display: none; }
.editor-subjective-section[hidden] { display: none; }
.editor-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }.editor-section-title h3 { margin: 0; font-size: 12px; }.editor-section-title span { color: var(--muted); font-size: 8px; font-weight: 400; }
.editor-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.editor-option-grid label { position: relative; display: block; }.editor-option-grid b { position: absolute; z-index: 1; left: 9px; top: 10px; color: #64748b; font-size: 10px; }.editor-option-grid input { padding-left: 30px; }
.editor-options-section.is-judgment .editor-option-grid label:nth-child(n+3) { display: none; }
.editor-side-column { display: grid; gap: 12px; position: sticky; top: 82px; }.editor-side-card { display: grid; gap: 12px; padding: 16px; }.editor-side-card h3 { margin: 0 0 2px; font-size: 12px; }.editor-side-card .switch-row { display: flex; }.editor-side-card .switch-row input { width: 17px; height: 17px; accent-color: var(--primary); }
.editor-validation-result { padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.55; }.editor-validation-result.is-valid { border-color: #c8eadc; background: #f4fbf8; color: var(--success); }.editor-validation-result.is-error { border-color: #fecaca; background: #fff5f5; color: var(--danger); }.editor-validation-result svg { width: 12px; height: 12px; vertical-align: -2px; }
.editor-change-preview { display: grid; gap: 6px; padding: 9px; border: 1px solid var(--border); border-radius: 9px; background: #fbfcfd; font-size: 8px; font-weight: 400; }
.editor-change-preview > strong { color: var(--title); font-size: 9px; }
.editor-change-preview > div { display: grid; grid-template-columns: 54px minmax(0, 1fr) 10px minmax(0, 1fr); gap: 4px; align-items: start; }
.editor-change-preview span { color: var(--muted); }.editor-change-preview del { overflow: hidden; color: #94a3b8; text-overflow: ellipsis; white-space: nowrap; }.editor-change-preview ins { overflow: hidden; color: #0f8f80; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }.editor-change-preview b { color: #cbd5e1; }.editor-change-preview p,.editor-change-preview small { margin: 0; color: var(--muted); line-height: 1.5; }
.usage-recent { margin: 8px 0 0; color: var(--muted); font-size: 8px; }

@media (max-width: 1320px) {
  .question-summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .question-workspace { grid-template-columns: 200px minmax(370px, 1fr) 350px; }
  .question-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .question-filter-advanced { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .question-workspace { grid-template-columns: 190px minmax(0, 1fr); }
  .question-preview-panel { position: fixed; inset: 68px 0 0 auto; z-index: 60; width: min(540px, calc(100vw - 64px)); height: calc(100vh - 68px); min-height: 0; border-radius: 0; box-shadow: -20px 0 50px rgba(15,23,42,.14); transform: translateX(105%); transition: transform 180ms ease; }
  .question-preview-panel.is-open { transform: translateX(0); }
  .preview-mobile-close { display: grid; width: 30px; height: 30px; padding: 0; border: 0; place-items: center; background: transparent; }
  .question-preview-panel.is-open::before { position: fixed; inset: 0 100% 0 -100vw; background: rgba(15,23,42,.18); content: ""; }
  .question-batch-bar { left: 90px; }
  .question-editor-layout { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 820px) {
  .question-summary-strip { grid-template-columns: 1fr 1fr; }
  .mobile-question-filter { display: inline-flex; }
  .question-toolbar { display: none; }.question-toolbar.mobile-open { display: block; }
  .question-filter-row { grid-template-columns: 1fr 1fr; }
  .question-filter-advanced { grid-template-columns: 1fr 1fr; }
  .question-workspace { grid-template-columns: 1fr; margin-top: 10px; }
  .chapter-tree-panel { position: fixed; inset: 68px 0 0 0; z-index: 65; display: none; width: 100%; height: calc(100vh - 68px); min-height: 0; border-radius: 0; }
  .question-toolbar.mobile-open + .question-workspace .chapter-tree-panel { display: block; }
  .question-list-panel { height: auto; min-height: 520px; }
  .question-table-wrap { display: none; }
  .question-mobile-list { display: grid; gap: 9px; padding: 10px; }
  .question-mobile-card { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
  .question-mobile-card.is-current { border-color: rgba(24,183,164,.32); background: #f8fcfb; }
  .question-mobile-card header,
  .question-mobile-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .question-mobile-card header label { display: flex; align-items: center; gap: 7px; color: #64748b; font-size: 9px; }
  .mobile-question-stem { display: -webkit-box; padding: 0; overflow: hidden; border: 0; background: transparent; color: var(--title); cursor: pointer; font-size: 12px; font-weight: 600; line-height: 1.6; text-align: left; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .mobile-question-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 8px; }
  .question-mobile-card footer > span { color: var(--muted); font-size: 8px; }.question-mobile-card footer button { border: 0; background: transparent; color: #0f8f80; font-size: 9px; }
  .question-preview-panel { inset: 0; width: 100vw; height: 100vh; }
  .question-detail-head { padding-top: max(12px, env(safe-area-inset-top)); }
  .question-batch-bar { right: 10px; bottom: 10px; left: 10px; }
  .question-editor-top { grid-template-columns: 1fr auto; }.question-editor-top .back-button { grid-column: 1 / -1; }.editor-top-actions .secondary-button { display: none; }
  .question-editor-layout { grid-template-columns: 1fr; }.editor-side-column { position: static; }.editor-field-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .question-heading .heading-actions { width: 100%; }.question-heading .heading-actions button { flex: 1; }
  .question-summary-strip article { min-height: 58px; padding: 10px 12px; }.summary-dot { height: 28px; }.question-summary-strip strong { font-size: 17px; }
  .question-filter-row { grid-template-columns: 1fr; }
  .question-filter-advanced { grid-template-columns: 1fr; }
  .question-editor-page { padding-inline: 12px; }.question-editor-top h1 { font-size: 20px; }.editor-top-actions .action-button { padding-inline: 11px; }
  .editor-main-card { padding: 15px; }.editor-field-grid,
  .editor-field-grid.compact,
  .editor-option-grid { grid-template-columns: 1fr; }
  .question-detail-actions button { width: 30px; padding: 0; font-size: 0; }.question-detail-actions svg { width: 14px; height: 14px; }
}
