:root {
  --bg: #eef4ff;
  --bg-deep: #dbe8ff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.58);
  --ink: #15233b;
  --muted: #5f6f8c;
  --muted-soft: #8a97b1;
  --line: rgba(95, 120, 173, 0.18);
  --line-strong: rgba(68, 101, 170, 0.28);
  --primary: #2f6df6;
  --primary-strong: #1847c7;
  --primary-soft: rgba(47, 109, 246, 0.12);
  --accent: #00b7a8;
  --danger: #d33f62;
  --success: #13875d;
  --warning: #d28b11;
  --shadow-xl: 0 28px 80px rgba(44, 74, 132, 0.16);
  --shadow-lg: 0 20px 50px rgba(50, 77, 129, 0.12);
  --shadow-md: 0 12px 30px rgba(59, 79, 122, 0.1);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  background:
    radial-gradient(circle at 10% 15%, rgba(47, 109, 246, 0.18), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(0, 183, 168, 0.16), transparent 18%),
    radial-gradient(circle at 70% 78%, rgba(117, 92, 255, 0.12), transparent 20%),
    linear-gradient(135deg, #f8fbff 0%, var(--bg) 42%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

body.drawer-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(24px);
  opacity: 0.9;
}

body::before {
  width: 340px;
  height: 340px;
  top: -80px;
  right: -70px;
  background: radial-gradient(circle, rgba(47, 109, 246, 0.26) 0%, rgba(47, 109, 246, 0) 70%);
  animation: drift 14s ease-in-out infinite alternate;
}

body::after {
  width: 380px;
  height: 380px;
  left: -120px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(0, 183, 168, 0.2) 0%, rgba(0, 183, 168, 0) 72%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hidden {
  display: none !important;
}

.auth-screen {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.auth-hero,
.auth-panel,
.hero-copy,
.hero-panel,
.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.auth-hero::before,
.auth-panel::before,
.hero-copy::before,
.hero-panel::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), transparent 26%, transparent 70%, rgba(47, 109, 246, 0.05)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 40%);
  pointer-events: none;
}

.auth-hero {
  min-height: 560px;
  padding: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: rise 0.75s ease both;
}

.auth-panel {
  padding: 30px;
  animation: rise 0.9s ease both;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(241, 246, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

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

.tab-button {
  min-height: 44px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  transition: all 0.22s ease;
}

.tab-button.active {
  background: linear-gradient(135deg, var(--primary), #598dff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(47, 109, 246, 0.26);
}

.auth-form,
.controls,
.admin-form {
  display: grid;
  gap: 14px;
}

.feature-strip,
.hero-link-row,
.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.feature-strip {
  margin-top: 22px;
}

.hero-link-row {
  margin-top: 24px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.66);
  color: var(--primary-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy {
  padding: 34px;
  animation: rise 0.7s ease both;
}

.hero-panel {
  padding: 24px;
  display: grid;
  gap: 16px;
  animation: rise 0.9s ease both;
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary-strong);
}

h1,
h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.35rem;
}

.hero-text,
.section-head p,
#quiz-status,
.form-message,
.source-note,
.mini-option,
.question-admin-answer,
.mini-muted {
  color: var(--muted);
}

.hero-text {
  margin-top: 16px;
  max-width: 780px;
  font-size: 1.02rem;
  line-height: 1.8;
}

.muted-label {
  display: block;
  font-size: 0.84rem;
  color: var(--muted-soft);
  margin-bottom: 6px;
}

.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-card {
  position: relative;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 249, 255, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.78;
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  font-size: clamp(1.9rem, 3vw, 3rem);
  color: var(--ink);
}

.metric-card.small strong {
  font-size: 2rem;
}

.source-note {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(247, 250, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  font-size: 0.92rem;
}

.layout {
  display: grid;
  grid-template-columns: 1.04fr 1.34fr 0.96fr;
  gap: 24px;
  align-items: start;
}

.admin-layout {
  grid-template-columns: repeat(3, 1fr);
}

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

.card {
  padding: 24px;
  animation: rise 0.85s ease both;
}

.workspace-card {
  scroll-margin-top: 20px;
}

.workspace-nav-card {
  padding-top: 22px;
  padding-bottom: 22px;
}

.workspace-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(21, 35, 59, 0.06);
  border: 1px solid rgba(68, 101, 170, 0.14);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

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

.workspace-nav-item {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 249, 255, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
}

.workspace-nav-item strong {
  font-size: 1rem;
  line-height: 1.35;
}

.workspace-nav-item small {
  color: var(--muted);
  line-height: 1.6;
}

.workspace-nav-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 109, 246, 0.1);
  border: 1px solid rgba(47, 109, 246, 0.12);
  color: var(--primary-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.workspace-card .section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(132, 160, 218, 0.14);
}

.workspace-card .section-head h2 {
  margin-bottom: 6px;
}

.overview-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 247, 255, 0.82)),
    radial-gradient(circle at top right, rgba(47, 109, 246, 0.09), transparent 30%);
}

.section-head-inline {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.overview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(47, 109, 246, 0.1);
  border: 1px solid rgba(47, 109, 246, 0.14);
  color: var(--primary-strong);
  font-weight: 600;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-stat {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
}

.dashboard-stat-primary {
  background:
    linear-gradient(135deg, rgba(47, 109, 246, 0.9), rgba(79, 132, 255, 0.86)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  color: #fff;
}

.dashboard-stat-primary span,
.dashboard-stat-primary small,
.dashboard-stat-primary strong {
  color: #fff;
}

.dashboard-stat span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.dashboard-stat strong {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.dashboard-stat small {
  display: block;
  color: var(--muted-soft);
  line-height: 1.6;
}

.quick-actions-panel {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 8px;
}

.section-head p {
  margin: 0;
  line-height: 1.7;
}

.controls label,
.admin-form label {
  display: grid;
  gap: 7px;
  font-size: 0.95rem;
  color: var(--ink);
}

.compact-controls {
  grid-template-columns: 180px minmax(180px, 1fr) minmax(180px, 1fr) 180px 180px 160px;
  align-items: end;
}

.user-toolbar-controls {
  grid-template-columns: 220px minmax(260px, 1fr) 160px;
}

.record-controls {
  grid-template-columns: 220px minmax(260px, 1fr);
  align-items: end;
  margin-bottom: 16px;
}

.record-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
}

.toolbar-controls {
  position: sticky;
  top: 14px;
  z-index: 2;
  padding: 14px;
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
  margin-bottom: 6px;
}

.manage-actions {
  display: flex;
  align-items: end;
}

.manage-actions-stack {
  display: grid;
  gap: 10px;
}

.selection-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
}

.selection-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.selection-count {
  color: var(--muted);
  font-size: 0.92rem;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 109, 246, 0.08);
  border: 1px solid rgba(47, 109, 246, 0.12);
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(132, 160, 218, 0.22);
  border-radius: 16px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  padding: 0;
  flex: 0 0 auto;
}

input::placeholder,
textarea::placeholder {
  color: #93a0b8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(47, 109, 246, 0.46);
  box-shadow: 0 0 0 4px rgba(47, 109, 246, 0.12);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
}

.wide {
  width: 100%;
}

.actions,
.quiz-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

button,
.link-button {
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease, opacity 0.22s ease;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
}

button:hover:not(:disabled),
.link-button:hover {
  transform: translateY(-2px);
}

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

.primary {
  background: linear-gradient(135deg, var(--primary), #6396ff);
  color: #fff;
  box-shadow: 0 16px 36px rgba(47, 109, 246, 0.28);
}

.primary:hover:not(:disabled) {
  box-shadow: 0 18px 40px rgba(47, 109, 246, 0.34);
}

.ghost {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  border: 1px solid rgba(133, 157, 204, 0.22);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(133, 157, 204, 0.2);
  box-shadow: var(--shadow-md);
}

.wide-link {
  width: 100%;
}

.small-link {
  min-height: 42px;
}

.danger-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  background: rgba(211, 63, 98, 0.12);
  color: var(--danger);
}

.danger-btn:hover {
  box-shadow: 0 10px 24px rgba(211, 63, 98, 0.16);
}

.small-action-btn {
  min-height: 40px;
  padding: 10px 14px;
}

.quiz-card {
  min-height: 380px;
  padding: 24px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 249, 255, 0.84)),
    radial-gradient(circle at top right, rgba(47, 109, 246, 0.08), transparent 32%);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), var(--shadow-md);
}

.quiz-card.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 109, 246, 0.1);
  border: 1px solid rgba(47, 109, 246, 0.14);
  color: var(--primary-strong);
  font-size: 0.85rem;
}

.question-stem {
  font-size: 1.14rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

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

.option {
  border: 1px solid rgba(132, 160, 218, 0.18);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.option:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 109, 246, 0.24);
  box-shadow: 0 12px 28px rgba(55, 90, 156, 0.08);
}

.option label {
  display: flex;
  gap: 12px;
  align-items: start;
  width: 100%;
}

.option label span {
  flex: 1;
  min-width: 0;
  line-height: 1.7;
  word-break: break-word;
}

.answer-banner {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.7;
  border: 1px solid transparent;
}

.answer-banner.correct {
  background: rgba(19, 135, 93, 0.1);
  color: var(--success);
  border-color: rgba(19, 135, 93, 0.16);
}

.answer-banner.wrong {
  background: rgba(211, 63, 98, 0.1);
  color: var(--danger);
  border-color: rgba(211, 63, 98, 0.16);
}

.score-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.score-line strong {
  font-size: 1.36rem;
}

.history-list {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.history-list::-webkit-scrollbar,
.question-list::-webkit-scrollbar {
  width: 8px;
}

.history-list::-webkit-scrollbar-thumb,
.question-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(122, 145, 191, 0.34);
}

.history-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(132, 160, 218, 0.16);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  line-height: 1.65;
}

.history-item.correct {
  border-color: rgba(19, 135, 93, 0.2);
}

.history-item.wrong {
  border-color: rgba(211, 63, 98, 0.2);
}

.question-list {
  margin-top: 14px;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
}

.pagination-summary {
  color: var(--muted);
  font-size: 0.94rem;
}

.pagination-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.question-table {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(132, 160, 218, 0.16);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-md);
}

.user-table {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(132, 160, 218, 0.16);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-md);
}

.user-table-head,
.user-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 160px 160px 180px minmax(240px, 1.1fr);
  gap: 12px;
  align-items: start;
}

.user-table-head {
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(242, 247, 255, 0.98), rgba(237, 244, 255, 0.94));
  border-bottom: 1px solid rgba(132, 160, 218, 0.16);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.user-table-row {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(132, 160, 218, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.question-table-head,
.question-table-row {
  display: grid;
  grid-template-columns: 90px 170px minmax(0, 1.7fr) 140px minmax(180px, 0.9fr) 140px;
  gap: 12px;
  align-items: start;
}

.question-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(242, 247, 255, 0.98), rgba(237, 244, 255, 0.94));
  border-bottom: 1px solid rgba(132, 160, 218, 0.16);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.question-table-body {
  max-height: 820px;
  overflow: auto;
}

.question-table-body::-webkit-scrollbar {
  width: 8px;
}

.question-table-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(122, 145, 191, 0.34);
}

.question-table-row {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(132, 160, 218, 0.12);
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.question-table-row:hover {
  background: rgba(246, 250, 255, 0.96);
}

.question-col {
  min-width: 0;
}

.select-col {
  display: flex;
  align-items: center;
}

.question-admin-stem {
  font-size: 0.98rem;
  line-height: 1.68;
  color: var(--ink);
}

.question-inline-options {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.issue-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.issue-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(210, 139, 17, 0.1);
  border: 1px solid rgba(210, 139, 17, 0.14);
  color: var(--warning);
  font-size: 0.8rem;
  font-weight: 700;
}

.review-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.review-pending {
  background: rgba(211, 63, 98, 0.1);
  border: 1px solid rgba(211, 63, 98, 0.14);
  color: var(--danger);
}

.review-fixed {
  background: rgba(19, 135, 93, 0.1);
  border: 1px solid rgba(19, 135, 93, 0.14);
  color: var(--success);
}

.type-col,
.source-col,
.action-col,
.answer-col {
  display: grid;
  gap: 8px;
}

.action-col {
  align-content: start;
}

.type-col {
  align-content: start;
}

.row-id {
  font-size: 0.82rem;
  color: var(--muted-soft);
}

.answer-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(19, 135, 93, 0.1);
  border: 1px solid rgba(19, 135, 93, 0.14);
  color: var(--success);
  font-weight: 700;
}

.source-file {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink);
  word-break: break-word;
}

.mini-option,
.question-admin-answer,
.mini-muted {
  font-size: 0.9rem;
  line-height: 1.58;
}

.question-col.action-col .ghost,
.question-col.action-col .danger-btn {
  width: 100%;
  justify-content: center;
}

.question-col.action-col,
.user-table .action-col {
  gap: 10px;
}

.question-table-body {
  max-height: 760px;
  overflow: auto;
}

.upload-hints {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.import-records {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.import-record-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(132, 160, 218, 0.16);
  box-shadow: var(--shadow-md);
}

.import-record-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.import-record-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.record-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.import-record-file {
  color: var(--ink);
  line-height: 1.65;
  word-break: break-word;
  margin-bottom: 8px;
}

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

.import-record-note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-imported,
.status-merged {
  background: rgba(19, 135, 93, 0.1);
  border: 1px solid rgba(19, 135, 93, 0.14);
  color: var(--success);
}

.status-poor,
.status-pdftotext-not-found,
.status-unknown {
  background: rgba(210, 139, 17, 0.1);
  border: 1px solid rgba(210, 139, 17, 0.14);
  color: var(--warning);
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(132, 160, 218, 0.16);
  color: var(--muted);
  font-size: 0.82rem;
}

.edit-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.edit-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 22, 40, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.edit-drawer-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(520px, calc(100vw - 36px));
  padding: 24px;
  overflow: auto;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 247, 255, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 28px 80px rgba(20, 35, 59, 0.22);
  animation: slideInDrawer 0.26s ease both;
}

.edit-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 18px;
}

@keyframes slideInDrawer {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(16px, -18px, 0) scale(1.08);
  }
}

@media (max-width: 1180px) {
  .layout,
  .hero,
  .auth-screen,
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

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

  .user-toolbar-controls {
    grid-template-columns: 1fr;
  }

  .record-summary-bar {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .question-table-head,
  .question-table-row,
  .user-table-head,
  .user-table-row {
    grid-template-columns: 1fr;
  }

  .question-table-head,
  .user-table-head {
    display: none;
  }

  .edit-drawer-panel {
    inset: 12px;
    width: auto;
  }

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

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 18px, 1380px);
    padding-top: 18px;
  }

  .auth-hero,
  .auth-panel,
  .hero-copy,
  .hero-panel,
  .card {
    padding: 18px;
    border-radius: 22px;
  }

  .auth-hero {
    min-height: auto;
  }

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

  .topline,
  .section-head-inline {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    font-size: 2rem;
  }

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

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

  .workspace-card .section-head {
    flex-direction: column;
    align-items: stretch;
  }
}
