:root {
  color-scheme: light;
  --bg: #f3ede4;
  --sidebar-top: #172538;
  --sidebar-bottom: #165b53;
  --surface: rgba(255, 252, 248, 0.92);
  --surface-soft: #f6f1e8;
  --surface-strong: #fffdfa;
  --ink: #1f2430;
  --ink-soft: #58606c;
  --line: rgba(31, 36, 48, 0.08);
  --brand: #0f7062;
  --brand-strong: #0d584f;
  --warning: #996315;
  --danger: #c24b43;
  --shadow-large: 0 28px 70px rgba(18, 24, 40, 0.16);
  --shadow-card: 0 16px 36px rgba(18, 24, 40, 0.08);
  --radius-panel: 30px;
  --radius-card: 24px;
  --radius-control: 15px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font: 14px/1.6 "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at left top, rgba(218, 154, 95, 0.18), transparent 26%),
    radial-gradient(circle at right top, rgba(15, 112, 98, 0.12), transparent 28%),
    linear-gradient(135deg, #f7f2ea 0%, var(--bg) 46%, #ede4d7 100%);
}

body.editor-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

code {
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(15, 112, 98, 0.08);
  color: var(--brand-strong);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 440px);
  gap: 22px;
}

.login-copy,
.login-form,
.sidebar,
.main {
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-large);
}

.login-copy,
.sidebar {
  color: #f7f1e9;
  background:
    radial-gradient(circle at top right, rgba(255, 212, 154, 0.16), transparent 22%),
    linear-gradient(180deg, var(--sidebar-top), #163247 45%, var(--sidebar-bottom) 100%);
}

.login-copy {
  padding: 34px;
}

.login-form {
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 245, 239, 0.96));
}

.login-copy h1,
.sidebar-brand h1,
.page-header h2,
.toolbar h3,
.card h4,
.login-form h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "PingFang SC", serif;
  font-weight: 700;
}

.eyebrow,
.sidebar-label,
.section-tag,
.section-kicker,
.side-label {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}

.eyebrow,
.sidebar-label,
.side-label {
  color: rgba(247, 241, 233, 0.68);
}

.section-tag,
.section-kicker {
  color: rgba(15, 112, 98, 0.62);
}

.login-copy h1 {
  margin-top: 10px;
  font-size: 38px;
  line-height: 1.12;
}

.login-copy p,
.sidebar-brand p:last-child {
  margin: 10px 0 0;
  color: rgba(247, 241, 233, 0.88);
}

.login-tips,
.sidebar-links,
.nav,
.list,
.preview,
.form-grid {
  display: grid;
  gap: 12px;
}

.tip-card,
.side-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

.tip-card strong,
.side-card strong {
  display: block;
  font-size: 18px;
}

.tip-card span,
.side-card span {
  display: block;
  margin-top: 6px;
  color: rgba(247, 241, 233, 0.82);
}

.sub,
.page-sub,
.hint,
.pagination {
  color: var(--ink-soft);
}

.sub,
.page-sub {
  margin: 8px 0 0;
}

.alert-banner {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
}

.alert-banner.warning {
  border: 1px solid rgba(153, 99, 21, 0.22);
  background: rgba(153, 99, 21, 0.08);
  color: var(--warning);
}

.alert-banner.danger {
  border: 1px solid rgba(194, 75, 67, 0.22);
  background: rgba(194, 75, 67, 0.08);
  color: var(--danger);
}

label {
  display: block;
  margin-bottom: 8px;
  color: #474f5c;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-radius: var(--radius-control);
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
}

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

button {
  padding: 11px 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  background: #ece3d4;
  color: #473b31;
}

button.danger {
  background: linear-gradient(135deg, var(--danger), #a73a36);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.shell {
  width: min(1640px, calc(100vw - 32px));
  margin: 16px auto;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 16px;
  min-height: calc(100vh - 32px);
  padding: 22px 18px;
}

.sidebar-brand {
  padding: 16px 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand h1 {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.18;
}

.sidebar-group {
  margin-top: 18px;
}

.nav-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #f7f1e9;
  text-align: left;
  cursor: pointer;
}

.nav-btn.active {
  transform: translateX(6px);
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(225, 152, 88, 0.18));
}

.nav-btn strong {
  display: block;
  font-size: 16px;
}

.nav-btn span {
  display: block;
  margin-top: 4px;
  color: rgba(247, 241, 233, 0.82);
  font-size: 12px;
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.side-link.secondary {
  background: linear-gradient(135deg, #fff7ed, #f3dfc5);
  color: #22303d;
}

.main {
  min-height: calc(100vh - 32px);
  padding: 22px;
  background: var(--surface);
  backdrop-filter: blur(14px);
}

.page-header,
.toolbar,
.toolbar-actions,
.filters,
.form-actions,
.list-actions,
.batch-bar,
.page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.page-header,
.toolbar {
  justify-content: space-between;
  align-items: flex-start;
}

.page-header {
  margin-bottom: 18px;
}

.page-header h2 {
  margin-top: 8px;
  font-size: clamp(30px, 2vw, 38px);
}

.summary-strip {
  margin-bottom: 18px;
}

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

.stat,
.card,
.metric {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdf9, #f7f1e8);
  box-shadow: var(--shadow-card);
}

.stat {
  min-height: 110px;
  padding: 18px;
}

.stat small,
.metric small {
  display: block;
  color: var(--ink-soft);
}

.stat strong {
  display: block;
  margin-top: 18px;
  font-size: 34px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  gap: 18px;
  align-items: start;
}

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

.metrics-card {
  grid-column: 1 / -1;
}

.full-card {
  grid-column: 1 / -1;
}

.questions-single-grid {
  grid-template-columns: 1fr;
}

.full-width-card {
  grid-column: 1 / -1;
  width: 100%;
}

.card {
  padding: 20px;
}

.card h4 {
  font-size: 24px;
  line-height: 1.15;
}

.detail-card {
  position: sticky;
  top: 20px;
}

.question-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.question-editor-overlay.is-open {
  display: block;
}

.question-editor-mask {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 34, 0.38);
  backdrop-filter: blur(4px);
}

.question-editor-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(1120px, 100vw);
  height: 100vh;
  padding: 22px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(248, 243, 235, 0.98));
  box-shadow: -30px 0 70px rgba(18, 24, 40, 0.18);
}

.question-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 112, 98, 0.1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.detail-form {
  gap: 16px;
}

.detail-list {
  display: grid;
  gap: 14px;
}

.detail-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-item {
  padding: 14px;
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.detail-item-block {
  padding: 16px;
}

.detail-item label {
  margin-bottom: 10px;
}

.detail-item input,
.detail-item select,
.detail-item textarea {
  background: #fff;
}

.detail-options {
  min-height: 140px;
}

.upload-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.upload-inline input {
  flex: 1;
}

.option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.option-head label {
  margin: 0;
}

.option-editor-list {
  display: grid;
  gap: 12px;
}

.option-editor-item {
  padding: 14px;
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.option-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: end;
}

.option-preview {
  margin-top: 10px;
  min-height: 34px;
  font-size: 12px;
  color: var(--ink-soft);
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.metric-grid,
.row,
.row.three {
  display: grid;
  gap: 12px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.metric {
  padding: 18px;
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
}

.row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filters input {
  flex: 1 1 280px;
}

.filters select {
  flex: 0 0 220px;
}

.select-all,
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 112, 98, 0.07);
  color: var(--brand);
  font-weight: 700;
}

.select-all input,
.switch input,
.question-check {
  width: auto;
}

.item {
  padding: 18px;
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #faf5ee);
}

.item h4,
.item h5 {
  margin: 0 0 8px;
  font-size: 18px;
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 112, 98, 0.08);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.pill.warn {
  background: rgba(153, 99, 21, 0.12);
  color: var(--warning);
}

.pill.danger {
  background: rgba(194, 75, 67, 0.1);
  color: var(--danger);
}

.status {
  min-height: 20px;
  color: var(--brand);
}

.status.error {
  color: var(--danger);
}

.divider {
  height: 1px;
  margin: 14px 0 4px;
  background: var(--line);
}

.top-gap {
  margin-top: 14px;
}

.question-table {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.question-row {
  display: grid;
  grid-template-columns: 72px 96px 108px 120px minmax(0, 1fr) 86px 102px;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.question-row-head {
  background: #f4f6f8;
}

.question-cell {
  min-width: 0;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
}

.question-cell:last-child {
  border-right: 0;
}

.question-row-head .question-cell {
  color: #5a6270;
  font-size: 12px;
  font-weight: 700;
}

.question-cell-check,
.question-cell-id,
.question-cell-answer,
.question-cell-actions {
  justify-content: center;
}

.question-cell-stem {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.question-stem {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.question-meta {
  font-size: 12px;
  color: var(--ink-soft);
}

.empty {
  padding: 26px 16px;
  text-align: center;
  border: 1px dashed rgba(31, 36, 48, 0.14);
  border-radius: 18px;
  color: var(--ink-soft);
  background: rgba(247, 241, 232, 0.72);
}

@media (max-width: 1360px) {
  .stats,
  .metric-grid,
  .grid,
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .detail-card {
    position: static;
  }

  .question-editor-panel {
    width: min(920px, 100vw);
  }
}

@media (max-width: 980px) {
  .layout,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 18px, 100%);
    margin: 10px auto 18px;
  }

  .sidebar,
  .main,
  .card,
  .login-copy,
  .login-form {
    padding: 16px;
  }

  .stats,
  .metric-grid,
  .row,
  .row.three,
  .detail-item-grid {
    grid-template-columns: 1fr;
  }

  .question-row-head {
    display: none;
  }

  .question-editor-panel {
    width: 100vw;
    padding: 16px;
  }

  .question-table {
    border: 0;
    background: transparent;
  }

  .question-row {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }

  .question-cell {
    padding: 0;
    border-right: 0;
    justify-content: flex-start;
  }

  .question-cell::before {
    content: attr(data-label);
    width: 84px;
    flex: 0 0 84px;
    color: #5a6270;
    font-size: 12px;
    font-weight: 700;
  }
}

/* Dashboard redesign */
:root {
  --page-bg: #eef1f7;
  --page-grad-top: #f9fbff;
  --sidebar-bg: #182338;
  --sidebar-edge: #233450;
  --main-surface: #ffffff;
  --main-border: #eef1f7;
  --soft-surface: #f6f8fd;
  --soft-surface-strong: #f2f4fb;
  --brand-blue: #2f6bff;
  --brand-blue-strong: #2358da;
  --brand-cyan: #53d5f3;
  --brand-amber: #ffca62;
  --text-main: #171d2f;
  --text-soft: #7c869b;
  --line-soft: #e8edf7;
  --success: #2eb875;
  --warning-strong: #f29c38;
  --danger-strong: #f06b6f;
  --radius-shell: 34px;
  --radius-card: 24px;
  --radius-control: 16px;
  --shadow-shell: 0 32px 70px rgba(44, 60, 103, 0.12);
  --shadow-card: 0 16px 34px rgba(61, 92, 163, 0.1);
}

body {
  color: var(--text-main);
  font: 14px/1.6 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(72, 129, 255, 0.08), transparent 22%),
    linear-gradient(180deg, var(--page-grad-top), var(--page-bg));
}

.login-panel {
  width: min(1080px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
  gap: 22px;
}

.login-copy,
.sidebar {
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(100, 150, 255, 0.22), transparent 28%),
    linear-gradient(180deg, #1f2b43, var(--sidebar-bg));
}

.login-copy,
.login-form,
.sidebar,
.main {
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
}

.login-copy,
.main {
  padding: 32px;
}

.login-brand,
.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #66a5ff, #2f6bff);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.login-copy h1,
.sidebar-brand h1 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.2;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.login-copy > p {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.login-preview {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.login-preview-card,
.side-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.login-preview-card span,
.side-card span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.login-preview-card strong,
.side-card strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.login-form {
  padding: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), #f8faff);
}

.eyebrow,
.sidebar-label,
.section-kicker,
.side-label {
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.08em;
  font-size: 11px;
}

.section-kicker {
  color: #93a1bb;
}

label {
  margin-bottom: 7px;
  color: #4d5870;
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  border: 1px solid #dfe6f2;
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--text-main);
  padding: 12px 14px;
  box-shadow: inset 0 1px 1px rgba(20, 33, 61, 0.03);
}

button,
.action-link,
.table-link {
  border-radius: 14px;
  font-weight: 700;
}

button {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-strong));
}

button.secondary {
  background: #edf2fb;
  color: #4e5a71;
}

button.danger {
  background: linear-gradient(135deg, #ff7f84, #ed5d65);
}

.shell {
  width: min(1460px, calc(100vw - 28px));
  margin: 18px auto;
}

.layout {
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 36px);
  padding: 18px 14px;
  border-radius: 28px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 22px 44px rgba(21, 31, 54, 0.22);
  background:
    radial-gradient(circle at top left, rgba(91, 131, 255, 0.14), transparent 26%),
    linear-gradient(180deg, #1e2940, var(--sidebar-bg));
}

.sidebar-brand {
  padding: 8px 8px 16px;
}

.brand-copy h1 {
  font-size: 22px;
}

.brand-copy .eyebrow {
  margin: 0;
}

.sidebar-group {
  margin-top: 8px;
}

.nav {
  gap: 6px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  position: relative;
  background: transparent;
  color: #f6f8fc;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.nav-btn::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7fb1ff, #4a83ff);
  opacity: 0;
  transition: opacity 160ms ease;
}

.nav-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(75, 126, 255, 0.13), rgba(255, 255, 255, 0.025) 58%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.nav-btn:hover,
.nav-btn.active {
  border-color: rgba(112, 150, 255, 0.28);
  background: linear-gradient(90deg, rgba(53, 108, 255, 0.17), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 20px rgba(21, 40, 86, 0.13);
  transform: translateX(1px);
}

.nav-btn:hover::before,
.nav-btn.active::before,
.nav-btn:hover::after,
.nav-btn.active::after {
  opacity: 1;
}

.nav-btn.active .nav-copy strong {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(113, 167, 255, 0.12);
}

.nav-btn.active .nav-arrow {
  color: rgba(255, 255, 255, 0.82);
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.nav-icon[data-icon="settings"]::before {
  inset: 4px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 6px;
}

.nav-icon[data-icon="settings"]::after {
  left: 6px;
  right: 6px;
  top: 9px;
  height: 2px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 -5px 0 rgba(255, 255, 255, 0.86), 0 5px 0 rgba(255, 255, 255, 0.86);
}

.nav-icon[data-icon="question"]::before {
  left: 4px;
  right: 4px;
  top: 4px;
  bottom: 4px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 5px;
}

.nav-icon[data-icon="question"]::after {
  left: 8px;
  top: 6px;
  width: 6px;
  height: 8px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
  box-shadow: -1px 8px 0 -1px rgba(255, 255, 255, 0.86);
}

.nav-icon[data-icon="orders"]::before {
  left: 4px;
  top: 5px;
  width: 14px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 4px;
}

.nav-icon[data-icon="orders"]::after {
  left: 6px;
  top: 9px;
  width: 10px;
  height: 2px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 -4px 0 rgba(255, 255, 255, 0.86), 0 4px 0 rgba(255, 255, 255, 0.86);
}

.nav-icon[data-icon="payment"]::before {
  left: 3px;
  top: 7px;
  width: 16px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 10px;
}

.nav-icon[data-icon="payment"]::after {
  left: 7px;
  top: 9px;
  width: 8px;
  height: 6px;
  border-left: 2px solid rgba(255, 255, 255, 0.86);
  border-right: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 2px;
}

.nav-icon[data-icon="config"]::before {
  left: 5px;
  top: 4px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
}

.nav-icon[data-icon="config"]::after {
  left: 10px;
  top: 1px;
  width: 2px;
  height: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: -7px 7px 0 -0.5px rgba(255, 255, 255, 0.86), 7px 7px 0 -0.5px rgba(255, 255, 255, 0.86);
}

.nav-icon[data-icon="users"]::before {
  left: 7px;
  top: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
}

.nav-icon[data-icon="users"]::after {
  left: 4px;
  top: 12px;
  width: 14px;
  height: 6px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom: 0;
}

.nav-icon[data-icon="logic"]::before {
  left: 3px;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 10px 0 0 rgba(255, 255, 255, 0.86), 5px 10px 0 rgba(255, 255, 255, 0.86);
}

.nav-icon[data-icon="logic"]::after {
  left: 8px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-left: 2px solid rgba(255, 255, 255, 0.86);
  border-top: 2px solid rgba(255, 255, 255, 0.86);
  transform: rotate(45deg);
}

.nav-icon[data-icon="base"]::before {
  left: 4px;
  top: 4px;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 4px;
}

.nav-icon[data-icon="base"]::after {
  left: 7px;
  top: 8px;
  width: 8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.86);
}

.nav-icon[data-icon="vip"]::before {
  left: 4px;
  top: 4px;
  width: 14px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-top: 0;
  border-radius: 0 0 6px 6px;
}

.nav-icon[data-icon="vip"]::after {
  left: 5px;
  top: 3px;
  width: 12px;
  height: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.86) 0 18%, transparent 18% 32%, rgba(255, 255, 255, 0.86) 32% 68%, transparent 68% 82%, rgba(255, 255, 255, 0.86) 82% 100%);
  clip-path: polygon(0 100%, 20% 0, 50% 70%, 80% 0, 100% 100%);
}

.nav-copy {
  display: grid;
  flex: 1;
  text-align: left;
}

.nav-copy strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.nav-copy small {
  display: none;
}

.nav-arrow {
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  line-height: 1;
}

.sidebar-links {
  margin-top: 18px;
  gap: 10px;
}

.side-link {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.side-link.secondary {
  background: linear-gradient(135deg, #f7fbff, #dfe9ff);
  color: #20314d;
}

.main {
  min-height: calc(100vh - 36px);
  padding: 18px;
  border: 1px solid var(--main-border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 28px 56px rgba(57, 83, 152, 0.11),
    0 8px 18px rgba(57, 83, 152, 0.05);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.topbar-search {
  width: min(100%, 520px);
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(57, 83, 152, 0.08);
}

.topbar-search input {
  border: 0;
  padding: 8px 2px;
  box-shadow: none;
}

.search-icon {
  width: 18px;
  height: 18px;
  border: 2px solid #c2cad9;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #c2cad9;
  transform: rotate(45deg);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.search-action {
  width: 42px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(135deg, #4f84ff, #2f6bff);
}

.search-action::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 11px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.search-action::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 11px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(45deg);
}

.topbar-alert {
  width: 24px;
  height: 24px;
  border: 2px solid #182338;
  border-radius: 8px 8px 10px 10px;
  position: relative;
  display: inline-block;
}

.topbar-alert::before {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff575d;
  box-shadow: 0 0 0 3px #fff;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border: 1px solid #edf1f8;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f8faff);
  box-shadow: 0 8px 20px rgba(57, 83, 152, 0.06);
}

.topbar-avatar-wrap {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff2e8, #edf4ff);
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffd3ba, #fff7f1);
  color: #24344f;
  font-size: 13px;
  font-weight: 800;
}

.topbar-user-copy {
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.topbar-user-copy strong {
  color: #222b40;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.topbar-user-copy span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.topbar-user-exit {
  display: grid;
  justify-items: start;
  gap: 1px;
  padding-left: 10px;
  border-left: 1px solid #e9eef7;
  line-height: 1.1;
}

.topbar-user-exit span {
  color: #2b3244;
  font-size: 12px;
  font-weight: 700;
}

.topbar-user-exit a {
  color: var(--text-soft);
  font-size: 11px;
}

.alert-banner {
  margin-bottom: 16px;
  border-radius: 18px;
}

.alert-banner.success {
  border: 1px solid rgba(46, 184, 117, 0.2);
  background: rgba(46, 184, 117, 0.08);
  color: #27945f;
}

.admin-toast-container {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 120;
  display: grid;
  gap: 10px;
}

.admin-toast {
  min-width: 220px;
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(42, 59, 105, 0.16);
  color: #22304b;
  background: #ffffff;
  border: 1px solid #e6ecf7;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.admin-toast-success {
  border-color: rgba(46, 184, 117, 0.18);
  background: linear-gradient(180deg, #ffffff, #f4fff8);
}

.admin-toast-error {
  border-color: rgba(240, 107, 111, 0.18);
  background: linear-gradient(180deg, #ffffff, #fff5f6);
}

.admin-toast.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.dashboard-stack {
  display: grid;
  gap: 16px;
}

.board-panel,
.card,
.question-editor-panel {
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow:
    0 14px 28px rgba(61, 92, 163, 0.06),
    0 3px 8px rgba(61, 92, 163, 0.03);
}

.board-panel,
.card {
  padding: 16px 18px;
}

.panel-head,
.toolbar,
.toolbar-actions,
.filters,
.form-actions,
.batch-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-copy h3,
.toolbar h3,
.card h4 {
  margin: 2px 0 0;
  font-size: 17px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.sub,
.hint,
.pagination,
.panel-copy p,
.section-copy p:last-child {
  color: var(--text-soft);
}

.panel-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 7px 12px;
  border-radius: 10px;
  background: #eef3ff;
  color: #566682;
  font-size: 12px;
  font-weight: 700;
}

.panel-chip-primary {
  background: linear-gradient(135deg, #4f84ff, #2f6bff);
  color: #fff;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  background: #edf2fb;
  color: #4f5f7b;
}

.action-link-primary {
  background: linear-gradient(135deg, #4e83ff, #2f6bff);
  color: #fff;
}

.overview-cards,
.micro-stats {
  display: grid;
  gap: 16px;
}

.overview-cards {
  grid-template-columns: minmax(0, 1.14fr) repeat(2, minmax(0, 0.93fr));
  margin-top: 14px;
}

.overview-card {
  min-height: 126px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  box-shadow:
    0 10px 20px rgba(53, 82, 145, 0.07),
    0 2px 6px rgba(53, 82, 145, 0.03);
}

.overview-card-primary {
  color: #fff;
  border-color: rgba(61, 108, 255, 0.14);
  background: linear-gradient(135deg, #4f84ff, #2e65ef);
}

.overview-card p,
.overview-card span {
  margin: 0;
}

.overview-card p {
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.overview-card strong {
  display: block;
  margin-top: 6px;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.overview-card span {
  display: block;
  margin-top: 10px;
  color: rgba(23, 29, 47, 0.6);
  line-height: 1.25;
}

.overview-card-primary span {
  color: rgba(255, 255, 255, 0.8);
}

.overview-card em {
  font-style: normal;
  font-weight: 800;
}

.overview-icon {
  width: 34px;
  height: 34px;
  margin-left: auto;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 208, 90, 0.95));
}

.overview-icon-cyan {
  background: linear-gradient(135deg, rgba(83, 213, 243, 0.2), var(--brand-cyan));
}

.overview-icon-amber {
  background: linear-gradient(135deg, rgba(255, 202, 98, 0.24), var(--brand-amber));
}

.micro-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.micro-stat {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.micro-stat span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.micro-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.flow-layout {
  position: relative;
  margin-top: 16px;
  padding: 54px 8px 2px 12px;
}

.flow-layout::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 26px;
  width: 2px;
  height: 26px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(122, 162, 255, 0.72), rgba(122, 162, 255, 0.14));
}

.flow-layout::after {
  content: "";
  position: absolute;
  left: calc(12.5% + 32px);
  right: calc(12.5% + 32px);
  top: 52px;
  height: 2px;
  background: linear-gradient(90deg, rgba(122, 162, 255, 0.16), rgba(122, 162, 255, 0.72), rgba(122, 162, 255, 0.16));
}

.flow-entry {
  position: absolute;
  left: 50%;
  top: 0;
  min-width: 82px;
  padding: 10px 16px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: linear-gradient(135deg, #4f84ff, #2f6bff);
  color: #fff;
  text-align: center;
  font-weight: 700;
  box-shadow:
    0 8px 18px rgba(47, 107, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
}

.flow-card {
  position: relative;
  padding: 12px;
  min-height: 176px;
  border-radius: 14px;
  background: #f7f9ff;
  border: 1px solid #e3eaf9;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 8px 18px rgba(73, 105, 182, 0.05),
    0 2px 4px rgba(73, 105, 182, 0.02);
}

.flow-card::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 2px;
  height: 14px;
  transform: translateX(-50%);
  background: rgba(122, 162, 255, 0.78);
}

.flow-card:first-child::after,
.flow-card:last-child::after {
  content: "";
  position: absolute;
  top: -14px;
  width: calc(50% - 4px);
  height: 2px;
  background: rgba(122, 162, 255, 0.78);
}

.flow-card:first-child::after {
  left: 50%;
}

.flow-card:last-child::after {
  right: 50%;
}

.flow-card-title {
  padding: 9px 10px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f84ff, #2f6bff);
  color: #fff;
  font-weight: 700;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.01em;
  line-height: 1.15;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.flow-card-soft .flow-card-title {
  background: linear-gradient(135deg, #6f84c8, #8799d8);
}

.flow-card-light .flow-card-title {
  background: linear-gradient(135deg, #8ba6ff, #6e87ff);
}

.flow-card-muted .flow-card-title {
  background: linear-gradient(135deg, #a5b1cb, #8d9ab7);
}

.flow-card-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  flex: 1;
  align-content: start;
}

.flow-item {
  position: relative;
  padding: 10px 10px 10px 26px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e8eef9;
  color: #33415d;
  line-height: 1.45;
  font-size: 12px;
  letter-spacing: 0.01em;
  box-shadow: 0 3px 8px rgba(84, 108, 164, 0.03);
}

.flow-item::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #56d6bb, #32b171);
}

.mini-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-filters input {
  width: 124px;
  color: #667690;
  background: #fff;
}

.mini-filter-btn {
  padding: 9px 12px;
  border: 1px solid #e0e6f4;
  border-radius: 12px;
  background: #f7f9ff;
  color: #566682;
}

.mini-filter-btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #4e83ff, #2f6bff);
  color: #fff;
}

.dashboard-table {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #edf1f8;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 16px rgba(61, 92, 163, 0.04);
}

.dashboard-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1.6fr) 132px minmax(0, 1fr) 120px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid #eef2f8;
  font-size: 13px;
}

.dashboard-row:last-child {
  border-bottom: 0;
}

.dashboard-row > div {
  padding: 10px 14px;
}

.dashboard-row-head {
  min-height: 46px;
  background: #f7f9ff;
  color: #7f8aa1;
  font-size: 11px;
  letter-spacing: 0.045em;
  line-height: 1.1;
  font-weight: 700;
}

.dashboard-cell-strong {
  display: grid;
}

.dashboard-cell-strong span {
  color: #28334a;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.dashboard-cell-strong small {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.dashboard-amount {
  color: #d28d42;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
}

.dashboard-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--text-soft);
}

.table-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1;
  font-weight: 700;
}

.table-status-success {
  background: rgba(46, 184, 117, 0.12);
  color: var(--success);
}

.table-status-warning {
  background: rgba(242, 156, 56, 0.14);
  color: var(--warning-strong);
}

.table-status-danger {
  background: rgba(240, 107, 111, 0.14);
  color: var(--danger-strong);
}

.table-status-info {
  background: rgba(79, 132, 255, 0.14);
  color: var(--brand-blue);
}

.table-status-muted {
  background: rgba(124, 134, 155, 0.14);
  color: #7c869b;
}

.toolbar {
  margin-bottom: 16px;
}

.grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.questions-single-grid {
  grid-template-columns: 1fr;
}

.card h4 {
  font-size: 20px;
}

.order-list-card {
  width: 100%;
  min-height: 420px;
}

.membership-card {
  width: 100%;
}

.membership-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
}

.membership-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 6px;
}

.membership-plan {
  min-height: 228px;
  padding: 22px 20px;
  border-radius: 22px;
  border: 1px solid #e8eef9;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 22px rgba(61, 92, 163, 0.05);
  display: flex;
  flex-direction: column;
}

.membership-editor-card {
  position: sticky;
  top: 20px;
}

.membership-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.membership-plan-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf3ff;
  color: #5a72a7;
  font-size: 12px;
  font-weight: 700;
}

.membership-plan-tag-hot {
  background: linear-gradient(135deg, #ffb157, #ff8a1d);
  color: #fff;
}

.membership-plan strong {
  display: block;
  margin-top: 18px;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #1f2940;
}

.membership-plan p {
  margin: 14px 0 0;
  color: #5f6d83;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}

.membership-plan-foot {
  margin-top: auto;
  padding-top: 18px;
  color: #8a95a9;
  font-size: 13px;
  line-height: 1.5;
}

.membership-plan-link {
  margin-top: 16px;
  min-width: 88px;
  align-self: flex-start;
}

.inline-form {
  margin: 0;
}

.membership-plan-month {
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
}

.membership-plan-year {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.membership-plan-lifetime {
  border-color: rgba(255, 166, 55, 0.28);
  background: linear-gradient(180deg, #fffdf7, #fff5df);
  box-shadow: 0 14px 28px rgba(255, 168, 63, 0.1);
}

.order-filters {
  align-items: center;
}

.order-filters input {
  flex: 1 1 420px;
}

.order-filters select {
  flex: 0 0 200px;
}

.order-list-shell {
  min-height: 220px;
  align-content: start;
}

.order-list-shell .empty {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-pagination-bar {
  margin-top: 18px;
  align-items: center;
}

.redeem-table {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.redeem-table-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1.2fr) 110px 150px 120px 160px 180px;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line-soft);
}

.user-table-row {
  grid-template-columns: minmax(0, 1.3fr) 150px 110px 170px 90px 90px 90px;
}

.redeem-table-row-highlight {
  background: linear-gradient(90deg, rgba(255, 226, 167, 0.22), rgba(255, 255, 255, 0));
}

.redeem-table-row:last-child {
  border-bottom: 0;
}

.redeem-table-row > div {
  padding: 12px 14px;
}

.redeem-table-head {
  background: #f7f9ff;
  color: #7f8aa1;
  font-size: 12px;
  font-weight: 700;
}

.redeem-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.redeem-actions .table-link {
  min-width: 72px;
}

.redeem-status-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.redeem-flag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.redeem-flag-auto {
  background: rgba(79, 132, 255, 0.12);
  color: #3f6fdc;
}

.redeem-user-link {
  min-width: auto;
  padding: 0 12px;
}

.redeem-delete-btn {
  background: #fff4f4;
  color: #d45f67;
}

.filters input {
  flex: 1 1 260px;
}

.filters select,
.batch-bar select {
  flex: 0 0 210px;
}

.select-all,
.switch {
  border-radius: 16px;
  background: #eef4ff;
  color: #4a6598;
}

.question-table {
  border-color: var(--line-soft);
  border-radius: 18px;
}

.question-row {
  grid-template-columns: 72px 82px 108px 132px minmax(0, 1fr) 86px 104px;
}

.question-row-head {
  background: #f7f9ff;
}

.question-cell {
  border-right-color: var(--line-soft);
}

.question-row-head .question-cell {
  color: #7f8aa1;
}

.table-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 72px;
  padding: 0 12px;
  background: #edf2fb;
  color: #4b5a74;
}

.item,
.detail-item,
.option-editor-item {
  border-color: var(--line-soft);
  background: linear-gradient(180deg, #fff, #fbfcff);
}

.pill {
  background: rgba(47, 107, 255, 0.1);
  color: var(--brand-blue);
}

.question-editor-mask {
  background: rgba(19, 29, 51, 0.4);
}

.question-editor-panel {
  width: min(980px, 100vw);
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: -20px 0 60px rgba(38, 57, 101, 0.18);
}

@media (max-width: 1320px) {
  .overview-cards,
  .micro-stats,
  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-row {
    grid-template-columns: 64px minmax(0, 1.5fr) 122px minmax(0, 1fr) 100px;
  }

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

  .membership-grid {
    grid-template-columns: 1fr;
  }

  .membership-layout {
    grid-template-columns: 1fr;
  }

  .membership-editor-card {
    position: static;
  }

  .flow-layout::after,
  .flow-card:first-child::after,
  .flow-card:last-child::after {
    display: none;
  }
}

@media (max-width: 980px) {
  .layout,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

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

  .topbar-actions {
    justify-content: flex-end;
  }

  .topbar-user {
    padding-right: 10px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 12px, 100%);
  }

  .login-copy,
  .login-form,
  .sidebar,
  .main,
  .board-panel,
  .card {
    padding: 16px;
  }

  .overview-cards,
  .micro-stats,
  .flow-grid,
  .row,
  .row.three,
  .detail-item-grid {
    grid-template-columns: 1fr;
  }

  .order-filters input,
  .order-filters select {
    flex: 1 1 100%;
  }

  .redeem-table {
    overflow-x: auto;
  }

  .redeem-table-row {
    min-width: 980px;
  }

  .topbar-user {
    width: 100%;
    justify-content: flex-start;
    border-radius: 22px;
  }

  .topbar-user-exit {
    margin-left: auto;
  }

  .flow-layout {
    padding: 68px 0 0;
  }

  .flow-layout::before,
  .flow-layout::after,
  .flow-card::before,
  .flow-card:first-child::after,
  .flow-card:last-child::after {
    display: none;
  }

  .flow-entry {
    position: static;
    margin-bottom: 12px;
  }

  .dashboard-table {
    overflow-x: auto;
  }

  .dashboard-row {
    min-width: 680px;
  }
}
