:root {
  /* Apple-inspired lively palette */
  --brand: #0a84ff;
  --brand-amber: #ff9f0a;
  --brand-mint: #30d5c8;
  --brand-dark: #0f172a;
  --surface: #f6f8fc;
  --surface-strong: #eaf1ff;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #5b6475;
  --success: #34c759;
  --danger: #ff3b30;
  --card-bg: rgba(255, 255, 255, 0.9);
  --frost: rgba(255, 255, 255, 0.75);
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(10, 132, 255, 0.18);

  /* Rounded, soft edges */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --sidebar-width: 300px;
  --header-height: 80px;
  --footer-height: 96px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(10, 132, 255, 0.12), transparent 24%),
    radial-gradient(circle at 84% 8%, rgba(48, 213, 200, 0.12), transparent 20%),
    radial-gradient(circle at 70% 82%, rgba(255, 159, 10, 0.12), transparent 26%),
    var(--surface);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

a:hover {
  color: #0063cc;
  text-shadow: 0 4px 20px rgba(10, 132, 255, 0.25);
}


.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.9));
  color: var(--text);
  position: relative;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.site-header__brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.25rem;
  color: var(--brand-dark);
}

.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
  border: none;
  background: transparent;
  cursor: pointer;
}

.site-header__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  display: block;
  border-radius: 2px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header__nav a {
  color: var(--text);
  margin-left: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.site-header__nav a.active,
.site-header__nav a:hover {
  background: linear-gradient(120deg, rgba(10, 132, 255, 0.12), rgba(48, 213, 200, 0.1));
  color: var(--brand-dark);
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.12);
}

.site-header__donate {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  margin-left: 16px;
  background: linear-gradient(120deg, var(--brand), #5ed8ff);
  color: #fff !important;
  font-weight: 700;
  border: 1px solid transparent;
  box-shadow: var(--shadow-strong);
  transition: all 0.15s ease;
}

.site-header__donate:hover {
  text-decoration: none;
  background: linear-gradient(120deg, #0063cc, #36c8e8);
  border-color: transparent;
  transform: translateY(-1px);
  color: #fff !important;
}

@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    padding: 16px 20px;
  }

  .site-header__toggle {
    display: inline-flex;
  }

  .site-header__nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 16px;
    display: none;
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }

  .site-header__nav.is-open {
    display: flex;
  }

  .site-header__nav a {
    margin: 0;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: none;
  }

  .site-header__donate {
    margin-left: 0;
    justify-content: center;
    margin-top: 8px;
  }
}

.container {
  max-width: 1100px;
  margin: 32px auto 120px auto;
  padding: 0 24px 48px 24px;
  position: relative;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 255, 0.9));
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  border: 1px solid rgba(10, 132, 255, 0.08);
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}

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


.card--subdued {
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.review-questions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.review-panel {
  border: 1px solid rgba(10, 132, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.review-panel+.review-panel {
  margin-top: 18px;
}

.review-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.table-topic {
  font-weight: 600;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 24px;
  align-items: start;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.test-builder {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-helper {
  margin-top: 4px;
}

.builder-row {
  display: grid;
  gap: 16px 20px;
  width: 100%;
}

.builder-row--primary {
  grid-template-columns: minmax(220px, 2fr) 0.8fr 1fr 1fr;
  grid-template-areas: "name count status mode";
  align-items: end;
}

.builder-field--name {
  grid-area: name;
}

.builder-field--status {
  grid-area: status;
}

.builder-field--count {
  grid-area: count;
}

.builder-field--mode {
  grid-area: mode;
}

.builder-field--count input {
  max-width: 160px;
  width: 100%;
}

.builder-row--filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.builder-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(10, 132, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(234, 241, 255, 0.72));
  min-width: 0;
}

.builder-column .checkbox-grid {
  width: 100%;
  padding: 0;
}

.builder-collapse {
  border: 1px solid rgba(10, 132, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0 16px 12px;
  margin: 4px 0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.builder-collapse summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 14px 0;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.builder-collapse summary::-webkit-details-marker {
  display: none;
}

.builder-collapse::after {
  content: "";
  display: block;
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin: 0;
  width: 100%;
}

.builder-collapse__content {
  padding-top: 10px;
}

@media (max-width: 960px) {
  .builder-row--primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "name count"
      "status mode";
  }

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

  .builder-field--count input {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .builder-row--primary {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "status"
      "count"
      "mode";
  }
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.input-shell {
  border: 1px solid rgba(10, 132, 255, 0.08);
  border-radius: 12px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  position: relative;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.input-shell select {
  border: none;
  padding: 10px 30px 10px 6px;
  width: 100%;
  font-size: 1rem;
  background: transparent;
  appearance: none;
}

.input-shell select:focus {
  outline: none;
}

.input-shell::after {
  content: '';
  position: absolute;
  right: 12px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(45deg);
  pointer-events: none;
}

/* Update focus state for inputs to be subtle/monochrome */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(10, 132, 255, 0.7);
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.15);
  transform: translateY(-1px);
}

select[multiple] {
  min-height: 200px;
}

small {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.btn:hover {
  background: rgba(234, 241, 255, 0.9);
  border-color: rgba(10, 132, 255, 0.18);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(10, 132, 255, 0.12);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: linear-gradient(120deg, var(--brand) 0%, #5ed8ff 55%, var(--brand-mint) 100%);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-strong);
}

.btn--primary:hover {
  background: linear-gradient(120deg, #0063cc 0%, #36c8e8 60%, #25c4a6 100%);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(10, 132, 255, 0.2);
}

.btn--link {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--text);
  text-decoration: underline;
}

.btn--link:hover {
  background: transparent;
  color: var(--muted);
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.btn--ghost:hover {
  background: rgba(234, 241, 255, 0.9);
  color: var(--brand-dark);
}

.flash-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.flash {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  border: 1px solid transparent;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.flash--success {
  background: linear-gradient(120deg, rgba(52, 199, 89, 0.16), rgba(52, 199, 89, 0.08));
  border-color: rgba(52, 199, 89, 0.25);
  color: #166534;
}

.flash--error {
  background: linear-gradient(120deg, rgba(255, 59, 48, 0.16), rgba(255, 159, 10, 0.12));
  border-color: rgba(255, 59, 48, 0.22);
  color: #b91c1c;
}

.flash--info {
  background: linear-gradient(120deg, rgba(10, 132, 255, 0.18), rgba(48, 213, 200, 0.12));
  border-color: rgba(10, 132, 255, 0.2);
  color: #0f172a;
}

.flash--warning {
  background: linear-gradient(120deg, rgba(255, 159, 10, 0.18), rgba(255, 204, 128, 0.16));
  border-color: rgba(255, 159, 10, 0.25);
  color: #92400e;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.filter-pill:hover {
  background: rgba(10, 132, 255, 0.1);
  box-shadow: 0 10px 20px rgba(10, 132, 255, 0.1);
}

.filter-pill--active {
  background: linear-gradient(120deg, var(--brand), #5ed8ff);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-strong);
}

.chart-container {
  position: relative;
  min-height: 320px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  font-weight: 700;
  background: linear-gradient(120deg, rgba(10, 132, 255, 0.08), rgba(48, 213, 200, 0.08));
  color: var(--brand-dark);
}

.dashboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.dashboard-table-wrapper {
  border: 1px solid rgba(10, 132, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.dashboard-table col:nth-child(1) {
  width: 22%;
}

.dashboard-table col:nth-child(2) {
  width: 20%;
}

.dashboard-table col:nth-child(3) {
  width: 12%;
}

.dashboard-table col:nth-child(4) {
  width: 10%;
}

.dashboard-table col:nth-child(5) {
  width: 22%;
}

.dashboard-table col:nth-child(6) {
  width: 14%;
}

.dashboard-table th,
.dashboard-table td {
  padding: 14px 16px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.dashboard-table thead th {
  background: linear-gradient(120deg, rgba(10, 132, 255, 0.14), rgba(48, 213, 200, 0.12));
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand-dark);
}

.dashboard-table tbody tr:nth-child(even) {
  background: rgba(234, 241, 255, 0.4);
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-table tbody td:first-child {
  font-weight: 600;
}

.dashboard-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.dashboard-table td:nth-child(3),
.dashboard-table td:nth-child(4) {
  text-align: center;
  white-space: nowrap;
}

.dashboard-table td.dashboard-share {
  min-width: 240px;
}

.dashboard-table td.dashboard-actions {
  width: 140px;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.text-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 20px;
  font-size: 0.95rem;
  color: var(--muted);
}

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

.breadcrumb a:hover {
  color: var(--brand);
}

.submission-meta {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
}

.submission-meta li {
  background: rgba(10, 132, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(10, 132, 255, 0.18);
  font-size: 0.95rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.summary-grid+.card {
  margin-top: 18px;
}

.summary-item {
  border: 1px solid rgba(10, 132, 255, 0.12);
  border-radius: 16px;
  padding: 24px;
  background: linear-gradient(150deg, rgba(234, 241, 255, 0.9), rgba(255, 255, 255, 0.92));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.marketing-body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--surface);
  color: var(--text);
}

.marketing-hero {
  background: linear-gradient(135deg, #0a84ff 0%, #5ed8ff 40%, #30d5c8 100%);
  color: #fff;
  padding: 64px 24px 80px;
  text-align: left;
  box-shadow: 0 24px 48px rgba(10, 132, 255, 0.28);
}

.marketing-hero__content {
  max-width: 960px;
  margin: 0 auto;
}

.marketing-hero__brand {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.85);
}

.marketing-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.marketing-hero p {
  margin: 0 0 24px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.marketing-callout {
  margin: 20px 0 28px;
  padding: 20px 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  color: #0b1b38;
  backdrop-filter: blur(6px);
}

.marketing-callout h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  color: #0f172a;
}

.marketing-callout p {
  margin: 0;
  color: rgba(15, 23, 42, 0.86);
  line-height: 1.6;
}

.marketing-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.marketing-main {
  max-width: 1100px;
  margin: -48px auto 0;
  padding: 0 24px 96px;
}

.marketing-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(234, 241, 255, 0.9));
  border-radius: 18px;
  padding: 32px 32px 36px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  margin-bottom: 28px;
}

.marketing-section--alt {
  background: linear-gradient(160deg, rgba(10, 132, 255, 0.08), rgba(48, 213, 200, 0.06));
}

.marketing-section h2 {
  margin-top: 0;
  font-size: 1.75rem;
}

.marketing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.marketing-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.marketing-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 20px 22px;
  border: 1px solid rgba(10, 132, 255, 0.16);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.marketing-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.marketing-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.marketing-list {
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.marketing-cta {
  margin-top: 32px;
  background: linear-gradient(135deg, #0a84ff 0%, #5ed8ff 45%, #30d5c8 100%);
  border-radius: 20px;
  padding: 36px 32px;
  color: #fff;
  box-shadow: 0 28px 54px rgba(10, 132, 255, 0.24);
}

.marketing-cta__content {
  max-width: 720px;
}

.marketing-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.marketing-footer {
  text-align: center;
  padding: 32px 16px 48px;
  color: rgba(63, 42, 31, 0.7);
  font-size: 0.95rem;
}

.site-footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: rgba(15, 23, 42, 0.6);
  font-size: 0.9rem;
}

.site-footer.site-footer--auth {
  color: rgba(15, 23, 42, 0.85);
}

@media (max-width: 640px) {
  .marketing-hero {
    padding: 56px 20px 72px;
    text-align: left;
  }

  .marketing-callout {
    margin: 18px 0 24px;
  }

  .marketing-main {
    margin: -40px auto 0;
    padding: 0 20px 80px;
  }

  .marketing-section {
    padding: 28px 22px 32px;
  }

  .marketing-cta {
    padding: 28px 22px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .summary-item {
    padding: 20px;
  }
}

.summary-value {
  font-size: 1.8rem;
  font-weight: 600;
}



.highlight {
  background: rgba(10, 132, 255, 0.14);
}

.strike,
.answer-option.strike {
  text-decoration: line-through;
  opacity: 0.7;
}

.explanation-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .practice-layout {
    display: block;
    padding-left: 0;
    margin: 0 auto calc(var(--footer-height) + 48px);
  }

  .question-sidebar {
    display: none !important;
  }

  .practice-footer {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
  }

  .practice-footer .footer-group {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
  }

  .practice-footer .footer-group:first-child,
  .practice-footer .footer-group:nth-child(2),
  .practice-footer .footer-group:last-child {
    flex: 1 1 0;
    justify-content: center;
  }

  .practice-footer button {
    width: 100%;
  }
}


.auth-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 20%, rgba(10, 132, 255, 0.25), transparent 25%),
    radial-gradient(circle at 85% 10%, rgba(48, 213, 200, 0.22), transparent 24%),
    radial-gradient(circle at 60% 80%, rgba(255, 159, 10, 0.22), transparent 26%),
    #0b1b38;
  padding: 24px;
}

.auth-card {
  width: 360px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 28px 56px rgba(10, 132, 255, 0.32);
  backdrop-filter: blur(12px);
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 12px;
}

.auth-promo {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--brand-dark);
  background: rgba(10, 132, 255, 0.12);
  padding: 10px 12px;
  border-radius: 12px;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-card label {
  font-weight: 600;
  font-size: 0.95rem;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  padding: 11px 12px;
  font-size: 1rem;
}

.auth-card button {
  margin-top: 8px;
}

.auth-footnote {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}


.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
  padding: 4px 0 8px 0;
}

.checkbox-grid--topics {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  transition: border 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.checkbox-item input {
  width: 16px;
  height: 16px;
}

.checkbox-item:hover {
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(234, 241, 255, 0.85);
  box-shadow: 0 10px 20px rgba(10, 132, 255, 0.12);
}

@media (min-width: 900px) {
  .checkbox-grid--topics {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

.btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 59, 48, 0.2);
}

.btn--danger:hover {
  background: #d22e25;
}

.session-status {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.session-status.is-complete {
  color: var(--success);
  font-weight: 600;
}

.feedback-note {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff4e8;
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  color: var(--muted);
}

.practice-completed .answer-option {
  pointer-events: none;
  cursor: default;
  opacity: 0.9;
}

.practice-completed .answer-option:hover {
  transform: none;
}

.sidebar-btn.is-correct {
  border-color: rgba(111, 179, 111, 0.45);
  background: #eaf6e6;
}

.sidebar-btn.is-incorrect {
  border-color: rgba(233, 138, 128, 0.45);
  background: #fde5e5;
}

.practice-layout {
  position: relative;
  max-width: 1100px;
  margin: 0 auto calc(var(--footer-height) + 40px);
  padding-top: 24px;
  padding-left: calc(var(--sidebar-width) + 48px);
}

.question-sidebar {
  position: fixed;
  top: calc(var(--header-height) + 24px);
  left: max(16px, calc((100vw - 1100px) / 2));
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height) - var(--footer-height) - 96px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  z-index: 10;
}

.sidebar-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-nav {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.question-nav:hover,
.question-nav.is-active {
  border-color: rgba(10, 132, 255, 0.4);
  background: rgba(234, 241, 255, 0.9);
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.12);
  transform: translateY(-1px);
}

.question-nav.is-answered {
  border-color: rgba(48, 213, 200, 0.55);
}

.question-nav.is-flagged::before {
  content: '\1F6A9';
  margin-right: 6px;
}

.question-nav.is-correct {
  border-color: var(--success);
}

.question-nav.is-incorrect {
  border-color: rgba(255, 59, 48, 0.55);
}

.question-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
  width: 100%;
  margin-left: 0;
}

.question-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.question-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.question-actions .btn {
  white-space: nowrap;
}

.question-number {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--brand-dark);
}

.question-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: linear-gradient(120deg, rgba(10, 132, 255, 0.16), rgba(48, 213, 200, 0.16));
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag--muted {
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
}

.question-meta {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.question-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 12px 0;
}

.question-text {
  font-size: 1.05rem;
  line-height: 1.6;
}

.question-labs {
  padding: 16px;
  border-radius: 14px;
  background: rgba(10, 132, 255, 0.06);
  border: 1px solid rgba(10, 132, 255, 0.12);
  font-size: 0.95rem;
}

.question-labs pre {
  margin: 10px 0 0 0;
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.answer-option {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, border 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.answer-option.has-stats {
  grid-template-columns: 44px 1fr auto;
  align-items: center;
}

.answer-option:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 132, 255, 0.36);
  background: rgba(234, 241, 255, 0.9);
  box-shadow: 0 14px 28px rgba(10, 132, 255, 0.12);
}

.answer-option.is-selected {
  border-color: rgba(10, 132, 255, 0.6);
  background: linear-gradient(160deg, rgba(10, 132, 255, 0.12), rgba(48, 213, 200, 0.08));
}

.answer-option.is-saved {
  box-shadow: inset 0 0 0 2px rgba(10, 132, 255, 0.2);
}

.answer-option.is-correct {
  border-color: rgba(52, 199, 89, 0.6);
  background: rgba(52, 199, 89, 0.12);
}

.answer-option.is-incorrect {
  border-color: rgba(255, 59, 48, 0.55);
  background: rgba(255, 59, 48, 0.1);
}

.answer-option.is-struck {
  text-decoration: line-through;
  opacity: 0.6;
}

.answer-option__label {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.answer-option__text {
  line-height: 1.6;
}

.answer-option__stat {
  font-weight: 600;
  color: var(--muted);
  min-width: 68px;
  text-align: right;
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.answer-status {
  margin-top: 4px;
  min-height: 18px;
}

.explanation-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.explanation-card.is-hidden {
  display: none;
}

.feedback-section {
  margin-bottom: 14px;
  line-height: 1.5;
}

.highlight-token {
  background: rgba(10, 132, 255, 0.2);
  padding: 0 2px;
  border-radius: 4px;
}

.practice-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 40px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(234, 241, 255, 0.95));
  border-top: 1px solid rgba(10, 132, 255, 0.08);
  box-shadow: 0 -4px 16px rgba(10, 132, 255, 0.12);
  backdrop-filter: blur(10px);
}

.footer-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.practice-footer .footer-group:first-child {
  justify-content: flex-start;
  flex: 1;
}

.practice-footer .footer-group:nth-child(2) {
  justify-content: center;
}

.practice-footer .footer-group:last-child {
  justify-content: flex-end;
  flex: 1;
}

.footer-group--meta {
  justify-content: flex-end;
  flex: 1;
}

@media (max-width: 1024px) {
  .practice-layout {
    padding-left: 0;
    margin: 0 auto calc(var(--footer-height) + 64px);
    display: block;
  }

  .question-sidebar {
    position: static;
    width: 100%;
    max-height: none;
    min-height: 0;
    overflow: visible;
    margin: 0 0 24px 0;
  }
}

.account-forms {
  display: grid;
  gap: 28px;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-form h2 {
  margin: 0;
}

.donation-note {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(10, 132, 255, 0.08), rgba(48, 213, 200, 0.08));
  border: 1px solid rgba(10, 132, 255, 0.2);
  color: var(--text);
  line-height: 1.5;
}

.donation-note a {
  color: var(--brand-dark);
  font-weight: 600;
}

.donation-note strong {
  color: var(--brand-dark);
}

.settings-form--danger {
  border: 1px solid rgba(255, 59, 48, 0.25);
  border-radius: 12px;
  padding: 20px;
  background: rgba(255, 59, 48, 0.08);
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px 120px 16px;
  }

  .practice-layout {
    gap: 16px;
  }

  .question-main {
    width: 100%;
  }

  .answers {
    gap: 10px;
  }

  .answer-option {
    grid-template-columns: 36px 1fr;
    padding: 12px;
  }

  .practice-footer {
    padding: 14px 16px;
  }
}

.choice-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.choice-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: border 0.2s ease;
}

.choice-item input[type="radio"] {
  margin-top: 0.3rem;
}

.choice-item__title {
  font-weight: 600;
}

.choice-item__help {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.choice-item:hover {
  border-color: var(--brand);
}

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

.practice-meta__mode {
  font-weight: 600;
  background: rgba(10, 132, 255, 0.12);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
}

.practice-meta__timer {
  font-family: monospace;
  font-weight: 600;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: #0f172a;
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.practice-meta__timer--warning {
  background: #ff9f0a;
}

.practice-meta__timer--expired {
  background: #ff3b30;
}

.practice-meta__score {
  font-weight: 600;
  color: var(--brand);
}

.practice-meta__finish {
  margin-left: auto;
}

.answer-option.is-static {
  pointer-events: none;
}

.practice-history-card {
  margin-top: 24px;
}

.practice-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.practice-history-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.practice-history-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(10, 132, 255, 0.1);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.practice-history-row--head {
  background: transparent;
  border: none;
  padding: 0 6px 6px 6px;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.practice-history-row--head span {
  font-weight: 600;
}

.practice-history-name {
  font-weight: 600;
  color: var(--text);
}

.practice-history-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-share {
  min-width: 240px;
}

.dashboard-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.dashboard-actions .btn {
  width: auto;
  padding: 0;
  font-weight: 600;
}

.share-field {
  margin: 0;
}

.share-field__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a5b46;
  margin-bottom: 0.2rem;
}

.share-field__input,
.share-field__textarea {
  width: 100%;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
}

.share-field__input {
  height: 2.25rem;
}

.share-field__textarea {
  resize: none;
  min-height: 3rem;
  word-break: break-word;
  white-space: pre-wrap;
}

@media (max-width: 768px) {
  .practice-history-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
  }

  .practice-history-row span:nth-child(3),
  .practice-history-row span:nth-child(4) {
    color: var(--muted);
  }

  .practice-history-row--head {
    display: none;
  }

  .practice-history-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .practice-layout {
    gap: 12px;
  }

  .question-header,
  .practice-header {
    box-shadow: none;
  }

  .question-number {
    font-size: 1.2rem;
  }

  .tag {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .answer-option {
    font-size: 0.95rem;
  }

  .practice-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.input-group select {
  flex: 1;
  width: auto;
  /* let flex control width */
}

.input-group .btn {
  flex-shrink: 0;
}

/* Ensure inputs fill container in vertical stack */
.settings-form input,
.settings-form select {
  width: 100%;
}

/* Unified Auth Page Styles */

.auth-body-new {
  background: radial-gradient(circle at 12% 20%, rgba(10, 132, 255, 0.1), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(48, 213, 200, 0.1), transparent 22%),
    var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: var(--text);
  padding: 20px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--text);
}

.auth-header p {
  margin: 8px 0 0;
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
}

.auth-header a {
  color: var(--text);
  text-decoration: underline;
  font-weight: 500;
}

.auth-tabs {
  background: rgba(10, 132, 255, 0.1);
  padding: 4px;
  border-radius: var(--radius-lg);
  display: flex;
  width: 100%;
  max-width: 400px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
  user-select: none;
}

.auth-tab.active {
  background: #fff;
  color: #000;
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.14);
}

.auth-card-new {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.auth-card-new label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.9rem;
}

.auth-card-new input[type="text"],
.auth-card-new input[type="email"],
.auth-card-new input[type="password"],
.auth-card-new select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}

.auth-card-new input:focus,
.auth-card-new select:focus {
  outline: none;
  border-color: rgba(10, 132, 255, 0.7);
  background: #fff;
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.16);
}

.btn-auth {
  width: 100%;
  background: linear-gradient(120deg, var(--brand), #5ed8ff);
  color: white;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
  box-shadow: var(--shadow-strong);
}

.btn-auth:hover {
  background: linear-gradient(120deg, #0063cc, #25c4a6);
}

.form-section {
  display: none;
}

.form-section.active {
  display: block;
}

.auth-footer {
  margin-top: 24px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.auth-footer a {
  color: var(--text);
  text-decoration: underline;
  font-weight: 500;
}

.flash-messages {
  margin-bottom: 16px;
}

.flash-error {
  background: linear-gradient(120deg, rgba(255, 59, 48, 0.16), rgba(255, 159, 10, 0.12));
  border: 1px solid rgba(255, 59, 48, 0.22);
  color: #991b1b;
  padding: 10px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.flash-success {
  background: linear-gradient(120deg, rgba(52, 199, 89, 0.14), rgba(52, 199, 89, 0.08));
  border: 1px solid rgba(52, 199, 89, 0.25);
  color: #065f46;
  padding: 10px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

/* Bubbles CSS */
.amount-bubbles {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.amount-bubble-input {
  display: none;
}

.amount-bubble-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  border: 2px solid rgba(10, 132, 255, 0.15);
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.05);
}

.amount-bubble-input:checked+.amount-bubble-label {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  transform: scale(1.1);
  box-shadow: 0 8px 16px rgba(10, 132, 255, 0.25);
}

.amount-bubble-label:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.amount-bubble-custom {
  width: 132px;
  /* Double width + gap */
  border-radius: 30px;
  /* Pillow shape */
  padding: 0 16px;
}

.amount-bubble-custom:hover {
  border-color: var(--brand);
}

.amount-bubble-custom input {
  border: none;
  background: transparent;
  width: 100%;
  height: 100%;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  outline: none;
}

.amount-bubble-custom input:focus {
  box-shadow: none;
  transform: none;
}

/* When custom input has focus, style the wrapper like a selected bubble */
.amount-bubble-custom:focus-within {
  border-color: var(--brand);
  box-shadow: 0 8px 16px rgba(10, 132, 255, 0.25);
}

/* PDF Upload Section */
.pdf-upload-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.pdf-upload-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdf-upload-col--main {
  flex: 0 0 70%;
}

.pdf-upload-col--balance {
  flex: 0 0 30%;
}

.tag--balance {
  display: inline-block;
  font-size: 1rem;
}

@media (max-width: 640px) {
  .pdf-upload-row {
    flex-direction: column;
  }

  .pdf-upload-col--main,
  .pdf-upload-col--balance {
    flex: 1 1 100%;
  }
}

.labs-toggle {
  border-color: rgba(10, 132, 255, 0.18);
  background: rgba(10, 132, 255, 0.08);
  box-shadow: none;
}

.labs-panel {
  position: fixed;
  top: calc(var(--header-height) + 16px);
  right: max(16px, calc((100vw - 1100px) / 2));
  width: 600px;
  max-width: calc(100vw - 32px);
  height: calc(100vh - var(--header-height) - var(--footer-height) - 60px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(234, 241, 255, 0.94));
  border: 1px solid rgba(10, 132, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(10, 132, 255, 0.18);
  padding: 18px;
  overflow: hidden;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 24;
  display: flex;
  flex-direction: column;
}

.labs-panel.is-open {
  transform: translateX(0);
  opacity: 1;
}

.labs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 22;
}

.labs-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

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

.labs-panel__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
}

.labs-panel__title {
  margin: 2px 0 4px 0;
}

.labs-panel__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.labs-panel__controls {
  margin-bottom: 10px;
}

.labs-panel__controls input[type="search"] {
  width: 100%;
  box-shadow: none;
  border-color: rgba(10, 132, 255, 0.16);
}

.labs-panel__content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  margin-top: 4px;
}

.labs-panel__empty {
  padding: 12px;
  border-radius: 12px;
  background: rgba(10, 132, 255, 0.06);
  border: 1px solid rgba(10, 132, 255, 0.12);
  color: var(--muted);
}

.labs-section {
  border: 1px solid rgba(10, 132, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  background: rgba(10, 132, 255, 0.03);
}

.labs-section__title {
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.labs-group+.labs-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(10, 132, 255, 0.16);
}

.labs-group__title {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.labs-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.labs-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  align-items: center;
}

.labs-row--head {
  background: rgba(10, 132, 255, 0.08);
  border-color: rgba(10, 132, 255, 0.2);
  box-shadow: none;
  font-weight: 700;
}

.labs-row__name {
  font-weight: 600;
  color: var(--text);
}

.labs-row__range {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.labs-row__range--si {
  color: var(--muted);
}

@media (max-width: 1024px) {
  .labs-panel {
    right: 12px;
    left: 12px;
    width: auto;
    transform: translateY(18px) scale(0.98);
    height: calc(100vh - var(--header-height) - 36px);
  }

  .labs-panel.is-open {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .labs-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .labs-row__range {
    font-size: 0.95rem;
  }

  .labs-panel {
    padding: 16px;
  }
}

.auth-title-section {
  text-align: center;
  margin-bottom: 24px;
}

.auth-title-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.auth-title-section p {
  color: #6b7280;
}

.auth-footer-text {
  text-align: center;
  margin-top: 16px;
}