:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --text-2: #344054;
  --muted: #667085;
  --line: #e5e7eb;
  --line-2: #d0d5dd;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --primary-soft: #eff6ff;
  --cyan: #06b6d4;
  --green: #16a34a;
  --green-soft: #ecfdf3;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --slate: #475467;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 8px 22px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 20px 54px rgba(16, 24, 40, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.16), transparent 33rem),
    radial-gradient(circle at 100% 0%, rgba(6, 182, 212, 0.13), transparent 32rem),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #eef2f7 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
}

h1, h2, h3, p { margin: 0; }

h1 {
  max-width: 820px;
  color: #ffffff;
  font-size: clamp(34px, 4.3vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

h2 {
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.hidden { display: none !important; }
.center { text-align: center; }
.mt { margin-top: 12px; }

.muted {
  color: var(--muted);
  font-size: 13px;
}

.shell {
  width: min(1420px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.95), rgba(30, 64, 175, 0.94) 52%, rgba(8, 145, 178, 0.9)),
    #111827;
  box-shadow: 0 34px 90px rgba(30, 64, 175, 0.24);
  padding: 34px;
}

.hero::before,
.hero::after {
  position: absolute;
  pointer-events: none;
  content: "";
  border-radius: 999px;
}

.hero::before {
  width: 470px;
  height: 470px;
  right: -150px;
  top: -210px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02) 62%, transparent 70%);
}

.hero::after {
  width: 320px;
  height: 320px;
  left: 45%;
  bottom: -225px;
  background: rgba(34, 211, 238, 0.24);
  filter: blur(4px);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero p {
  max-width: 690px;
  margin-top: 14px;
  color: rgba(226, 232, 240, 0.86);
  font-size: 16px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.16);
  content: "";
}

.brand-lockup {
  gap: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.brand-lockup::before {
  display: none;
}

.brand-logo {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e 0%, #06b6d4 45%, #2563eb 100%);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: #fff;
  font-size: 24px;
  font-weight: 1000;
  line-height: 1;
}

.brand-text {
  display: grid;
  gap: 2px;
  line-height: 1.05;
}

.brand-text strong {
  color: inherit;
  font-size: 19px;
  font-weight: 1000;
  letter-spacing: 0.02em;
}

.brand-text em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-side {
  display: flex;
  justify-content: flex-end;
}

.session {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  padding: 10px 14px;
  white-space: nowrap;
}

.session::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #facc15;
  box-shadow: 0 0 0 5px rgba(250, 204, 21, 0.16);
  content: "";
}

.card {
  position: relative;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  padding: 22px;
  margin-bottom: 18px;
}

.card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
}

.login-card {
  max-width: 1040px;
  margin: -34px auto 18px;
  padding: 30px;
}

.login-card h2 {
  font-size: 24px;
}

.toolbar.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: -22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
}

.toolbar strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 17px;
  letter-spacing: -0.02em;
}

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

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

.section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-head h2::before {
  width: 10px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--cyan));
  content: "";
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  margin-top: 22px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  font: inherit;
  padding: 12px 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #93c5fd;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), var(--shadow-xs);
}

.search-input { width: 300px; }

button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  padding: 10px 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

button:hover,
.link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

button:active,
.link-button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

button.secondary,
.link-button.secondary {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
}

button.secondary:hover,
.link-button.secondary:hover {
  border-color: #bfdbfe;
  background: var(--primary-soft);
  color: #1e40af;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.08);
}

.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 18px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.stat::before {
  position: absolute;
  right: -34px;
  top: -34px;
  width: 116px;
  height: 116px;
  border-radius: 999px;
  background: #dbeafe;
  content: "";
}

.stat::after {
  position: absolute;
  left: 18px;
  bottom: 16px;
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.22;
  content: "";
}

.stat:nth-child(2)::before { background: #eef2ff; }
.stat:nth-child(3)::before { background: #fef3c7; }
.stat:nth-child(4)::before { background: #dcfce7; }
.stat:nth-child(5)::before { background: #e2e8f0; }
.stat:nth-child(3)::after { background: var(--amber); }
.stat:nth-child(4)::after { background: var(--green); }
.stat:nth-child(5)::after { background: var(--slate); }

.stat:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.stat span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--text);
  font-size: 36px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.06em;
}

.stat label {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.task-card {
  border-color: #bfdbfe;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.96) 48%, rgba(236, 253, 245, 0.9));
}

.answer-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(37, 99, 235, 0.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.10), transparent 18rem),
    rgba(255, 255, 255, 0.96);
}

.answer-settings .settings-controls {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.answer-settings input[type="number"] {
  width: 150px;
  min-height: 44px;
}

.answer-settings select {
  width: 150px;
  min-height: 44px;
}

.answer-settings #proxyCustomInput {
  width: 260px;
  min-height: 44px;
}

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  padding: 0 14px;
}

.switch-line input {
  width: 18px;
  height: 18px;
  box-shadow: none;
}

.switch-line span {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}

.task-items {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.task-empty {
  margin-top: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.75);
  padding: 16px;
}

.task-item-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  padding: 16px;
}

.task-item-card .section-head h2 {
  font-size: 17px;
}

.task-item-card .section-head h2::before {
  display: none;
}

.progress {
  width: 100%;
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.08);
  margin-top: 13px;
}

.progress-bar {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan), #22c55e);
  transition: width 0.28s ease;
}

.progress-bar::after {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.24) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.24) 50%, rgba(255, 255, 255, 0.24) 75%, transparent 75%, transparent);
  background-size: 22px 22px;
  content: "";
}

.progress-bar.done { background: linear-gradient(90deg, #16a34a, #22c55e); }
.progress-bar.error { background: linear-gradient(90deg, #dc2626, #f97316); }

.progress-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  margin-top: 8px;
}

.final-score,
.task-item-card .task-final-score {
  min-width: 104px;
  text-align: center;
  border: 1px solid #bbf7d0;
  border-radius: 15px;
  background: var(--green-soft);
  color: #166534;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.12);
  padding: 9px 12px;
  font-size: 22px;
  font-weight: 950;
}

.task-result { margin-top: 9px; }

.data-card {
  padding: 0;
  overflow: hidden;
}

.data-card > .section-head {
  padding: 22px 22px 0;
}

.filters button {
  min-height: 36px;
  border-color: var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
  padding: 8px 12px;
}

.filters button.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.2);
}

#syncScoresBtn {
  background: #0f172a;
  color: #ffffff;
}

.table-wrap {
  overflow: auto;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid #edf0f3;
  padding: 15px 16px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

tbody tr {
  transition: background 0.14s ease;
}

tbody tr:hover {
  background: #f8fbff;
}

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

.exam-name {
  min-width: 280px;
  color: var(--text);
  font-weight: 900;
}

.code {
  color: #667085;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.score-cell {
  min-width: 96px;
  white-space: nowrap;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: var(--green-soft);
  color: #166534;
  padding: 6px 10px;
  font-weight: 950;
}

.score-empty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 6px 10px;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  color: #ffffff;
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
}

.badge::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  content: "";
}

.badge.s1 { background: linear-gradient(135deg, var(--amber), #f97316); }
.badge.s2 { background: linear-gradient(135deg, var(--green), #22c55e); }
.badge.s3 { background: linear-gradient(135deg, #64748b, #475569); }
.badge.sx { background: linear-gradient(135deg, #334155, #0f172a); }

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

.row-actions button {
  min-height: 33px;
  border-radius: 11px;
  padding: 7px 10px;
  font-size: 12px;
}

.dashboard-tabs.card {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: -6px;
  padding: 10px;
  border-radius: 22px;
}

.dashboard-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  border-color: transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text-2);
  box-shadow: none;
}

.dashboard-tabs button:hover {
  background: var(--primary-soft);
  color: #1e40af;
  box-shadow: none;
}

.dashboard-tabs button.active {
  background: linear-gradient(135deg, #0f172a, var(--primary));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.dashboard-panel {
  animation: panelIn 0.18s ease both;
}

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

.billing-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.22);
  background:
    radial-gradient(circle at 80% -10%, rgba(34, 211, 238, 0.22), transparent 23rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.95));
  color: #ffffff;
}

.billing-hero h2,
.profile-main h2 {
  color: inherit;
  font-size: 30px;
}

.billing-hero .muted {
  max-width: 720px;
  color: rgba(226, 232, 240, 0.82);
}

.eyebrow {
  margin-bottom: 8px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wallet-card {
  min-width: 250px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  padding: 22px;
}

.wallet-card span,
.wallet-card em {
  display: block;
  color: rgba(226, 232, 240, 0.82);
  font-style: normal;
  font-weight: 800;
}

.wallet-card strong {
  display: block;
  margin: 5px 0 7px;
  color: #ffffff;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.06em;
}

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

.package-card {
  cursor: pointer;
  margin-bottom: 18px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.package-card:hover,
.package-card.active {
  border-color: #60a5fa;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.package-card.active::after {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #ffffff;
  content: "✓";
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 950;
}

.package-card span,
.package-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.package-card strong {
  display: block;
  margin: 8px 0;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.checkout-card {
  border-color: rgba(37, 99, 235, 0.20);
}

.order-box {
  margin-top: 16px;
  border: 1px dashed #bfdbfe;
  border-radius: 18px;
  background: #f8fbff;
  padding: 16px;
}

.order-current {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.order-current div {
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  padding: 12px;
}

.order-current span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.order-current strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text-2);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
}

.status-pill.paid,
.status-pill.done {
  border-color: #bbf7d0;
  background: var(--green-soft);
  color: #166534;
}

.status-pill.pending,
.status-pill.running,
.status-pill.queued {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.status-pill.cancelled,
.status-pill.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.pending-row {
  background: rgba(255, 251, 235, 0.72);
}

.pending-row td:first-child {
  border-left: 4px solid #f59e0b;
}

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

.profile-main {
  min-height: 150px;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.12), transparent 18rem),
    #ffffff;
}

.profile-main .muted {
  margin-top: 12px;
}

.mini-stat {
  min-height: 150px;
}

.mini-stat span {
  display: block;
  color: var(--text);
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
}

.mini-stat label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 900;
}

.error-text {
  max-width: 520px;
  margin-top: 6px;
  color: #b91c1c;
}

.invite-card {
  border-color: rgba(37, 99, 235, 0.18);
}

.invite-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.7fr 0.8fr;
  gap: 14px;
  margin-top: 16px;
}

.invite-code-box,
.invite-bind-box,
.invite-stat-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  padding: 16px;
}

.invite-code-box span,
.invite-stat-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.invite-code-box strong {
  display: block;
  margin: 8px 0 14px;
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 32px;
  letter-spacing: 0.05em;
}

.invite-bind-box h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
}

.invite-bind-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.invite-stat-box strong {
  display: block;
  margin: 5px 0 14px;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.invite-record-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  max-height: 680px;
  overflow: auto;
  padding: 18px 22px 22px;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  padding: 15px;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.question-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

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

.question-index {
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 950;
  padding: 5px 8px;
}

.question-text {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.answer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.answer-list span {
  display: inline-flex;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: var(--green-soft);
  color: #166534;
  font-size: 13px;
  font-weight: 950;
  padding: 6px 9px;
}

button.mini {
  min-height: 30px;
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 12px;
}

textarea {
  min-height: 150px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.output {
  min-height: 82px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  background: #0b1220;
  color: #dbeafe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 15px;
  white-space: pre-wrap;
}

.small-output {
  min-height: 110px;
  max-height: 280px;
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(480px, calc(100% - 48px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(16px);
  padding: 14px 16px;
}

.admin-login-form {
  grid-template-columns: minmax(280px, 420px) auto;
}

.admin-error-cell {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .shell {
    width: min(100% - 22px, 1420px);
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 26px;
    padding: 24px;
  }

  .hero-side {
    justify-content: flex-start;
  }

  .toolbar.card,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions,
  .filters {
    width: 100%;
  }

  .grid-form,
  .admin-login-form {
    grid-template-columns: 1fr;
  }

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

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

  .search-input,
  .toolbar-actions input {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 16px, 1420px);
  }

  h1 {
    font-size: 32px;
  }

  .hero,
  .card {
    border-radius: 20px;
  }

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

  button,
  .link-button {
    width: 100%;
  }

  .filters button,
  .row-actions button {
    width: auto;
  }

  .session {
    max-width: 100%;
    white-space: normal;
  }
}

/* Reference mockup refresh: deep-blue hero, right login card, floating feature cards. */
body {
  background:
    radial-gradient(circle at 20% -10%, rgba(59, 130, 246, 0.20), transparent 34rem),
    radial-gradient(circle at 88% 8%, rgba(14, 165, 233, 0.14), transparent 30rem),
    linear-gradient(180deg, #eef5ff 0%, #f8fbff 42%, #eef3f8 100%);
}

.shell {
  width: min(1440px, calc(100% - 56px));
  padding-top: 44px;
}

.hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 470px);
  align-items: center;
  min-height: 610px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 86% 16%, rgba(56, 189, 248, 0.92), transparent 28rem),
    radial-gradient(circle at 44% 92%, rgba(37, 99, 235, 0.38), transparent 26rem),
    linear-gradient(135deg, #020617 0%, #07194d 48%, #075985 100%);
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.22);
  padding: 56px 68px 170px;
}

.hero::before {
  right: -120px;
  top: -180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 55%, transparent 72%);
}

.hero::after {
  width: 760px;
  height: 340px;
  left: -90px;
  bottom: 6px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at center, rgba(59, 130, 246, 0.32) 0 1px, transparent 1px 44px);
  opacity: 0.72;
  filter: none;
}

.hero-main {
  position: relative;
  z-index: 1;
  max-width: 790px;
}

.hero h1 {
  color: #fff;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}

.hero p {
  max-width: 650px;
  color: rgba(239, 246, 255, 0.88);
  font-size: 18px;
  line-height: 1.75;
}

.hero-kicker {
  margin-bottom: 58px;
  background: transparent;
  border-color: transparent;
  padding: 0;
  letter-spacing: 0.08em;
}

.session {
  position: absolute;
  top: 48px;
  right: 66px;
  z-index: 3;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.hero-actions span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(147, 197, 253, 0.16);
  background: rgba(37, 99, 235, 0.26);
  color: #eff6ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 28px rgba(2, 6, 23, 0.16);
  backdrop-filter: blur(12px);
  padding: 0 20px;
  font-weight: 900;
}

.hero-actions span::before {
  color: #38bdf8;
  font-size: 18px;
  content: "▣";
}

.hero-actions span:nth-child(2)::before { content: "▾"; }
.hero-actions span:nth-child(3)::before { content: "↻"; }
.hero-actions span:nth-child(4)::before { content: "↗"; }

.hero-visual {
  position: absolute;
  left: 78px;
  bottom: -104px;
  width: 520px;
  height: 245px;
  pointer-events: none;
}

.visual-base {
  position: absolute;
  left: 68px;
  bottom: 14px;
  width: 320px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(34, 211, 238, 0.82), rgba(37, 99, 235, 0.28) 58%, transparent 72%);
  box-shadow: 0 0 58px rgba(56, 189, 248, 0.52);
  transform: perspective(600px) rotateX(62deg);
}

.visual-panel {
  position: absolute;
  border: 1px solid rgba(56, 189, 248, 0.68);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.62), rgba(14, 165, 233, 0.24));
  box-shadow: 0 20px 46px rgba(14, 165, 233, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.visual-panel-a {
  left: 70px;
  top: 22px;
  width: 210px;
  height: 122px;
  transform: rotate(-7deg);
}

.visual-panel-b {
  left: 282px;
  top: 58px;
  width: 168px;
  height: 106px;
}

.visual-panel i {
  position: absolute;
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.88);
}

.visual-panel-a i:nth-child(1) { left: 28px; top: 34px; width: 46px; }
.visual-panel-a i:nth-child(2) { left: 28px; top: 52px; width: 82px; opacity: .55; }
.visual-panel-a i:nth-child(3) { left: 28px; top: 70px; width: 64px; opacity: .45; }

.visual-panel-a b {
  position: absolute;
  left: 32px;
  right: 26px;
  bottom: 28px;
  height: 54px;
  background:
    linear-gradient(135deg, transparent 40%, rgba(34, 211, 238, 0.85) 41% 44%, transparent 45%),
    linear-gradient(26deg, transparent 55%, rgba(34, 211, 238, 0.75) 56% 58%, transparent 59%);
}

.visual-panel-b em {
  position: absolute;
  left: 26px;
  top: 30px;
  width: 58px;
  height: 58px;
  border: 14px solid rgba(56, 189, 248, 0.88);
  border-right-color: rgba(59, 130, 246, 0.24);
  border-radius: 50%;
}

.visual-panel-b i:nth-child(2) { left: 104px; top: 34px; width: 48px; }
.visual-panel-b i:nth-child(3) { left: 104px; top: 54px; width: 36px; opacity: .55; }
.visual-panel-b i:nth-child(4) { left: 104px; top: 74px; width: 52px; opacity: .45; }

.hero .login-card {
  width: 100%;
  max-width: none;
  margin: 74px 0 0;
  border: 0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 68px rgba(15, 23, 42, 0.18);
  padding: 42px 38px;
}

.hero .login-card h2 {
  color: #07133b;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.hero .login-card .grid-form {
  grid-template-columns: 1fr;
  margin-top: 26px;
}

.hero .login-card input {
  min-height: 58px;
  border-radius: 14px;
  box-shadow: none;
  padding-left: 18px;
}

.hero .login-card button {
  min-height: 62px;
  border-radius: 14px;
  font-size: 16px;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.30);
}

.feature-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: -112px 54px 22px;
}

.feature-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  min-height: 128px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
  padding: 22px;
}

.feature-card h3 {
  color: #07133b;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.feature-card p {
  margin-top: 8px;
  color: #344054;
  font-size: 15px;
  line-height: 1.65;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 20px;
  color: #fff;
  font-size: 34px;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.20);
}

.icon-blue {
  background: linear-gradient(135deg, #60a5fa, #1d4ed8);
}

.icon-green {
  background: linear-gradient(135deg, #5eead4, #10b981);
}

.icon-purple {
  background: linear-gradient(135deg, #c084fc, #7c3aed);
}

#dashboardView {
  margin-top: 18px;
}

.is-authed .hero {
  grid-template-columns: 1fr;
  min-height: 430px;
  padding-bottom: 150px;
}

.is-authed .hero-main {
  max-width: 920px;
}

.is-authed .hero-side {
  display: none;
}

.is-authed .hero-visual {
  left: auto;
  right: 60px;
  bottom: -98px;
  opacity: 0.88;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 150px;
  }

  .hero .login-card {
    max-width: 560px;
    margin-top: 28px;
  }

  .hero-visual {
    opacity: 0.72;
    right: 12px;
    left: auto;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    margin-left: 24px;
    margin-right: 24px;
  }
}

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

  .hero {
    border-radius: 26px;
    min-height: auto;
    padding: 28px 18px 132px;
  }

  .hero-kicker {
    margin-bottom: 28px;
  }

  .hero p {
    font-size: 15px;
  }

  .session {
    top: 24px;
    right: 18px;
    max-width: 150px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hero-actions span {
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .hero-visual {
    display: none;
  }

  .hero .login-card {
    border-radius: 18px;
    padding: 22px 16px;
  }

  .hero .login-card h2 {
    font-size: 22px;
  }

  .feature-grid {
    display: none;
  }
}

/* Logged-in home page based on the provided dashboard reference. */
.is-authed {
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.15), transparent 34rem),
    linear-gradient(180deg, #eef5ff 0%, #f8fbff 38%, #eef3f8 100%);
}

.is-authed .shell {
  width: min(1720px, calc(100% - 96px));
  padding-top: 14px;
}

.is-authed .hero {
  min-height: 184px;
  border-radius: 16px;
  grid-template-columns: minmax(0, 1fr) 560px;
  align-items: center;
  padding: 32px 42px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.is-authed .hero::before {
  width: 560px;
  height: 280px;
  right: 220px;
  top: -40px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22), transparent 66%);
}

.is-authed .hero::after {
  left: auto;
  right: 250px;
  bottom: -92px;
  width: 620px;
  height: 220px;
  opacity: 0.55;
}

.is-authed .hero-main {
  position: relative;
  z-index: 10;
  max-width: 760px;
}

.is-authed .hero-kicker {
  margin-bottom: 24px;
  font-size: 14px;
}

.is-authed .hero h1 {
  font-size: 44px;
  line-height: 1.08;
}

.is-authed .hero p {
  margin-top: 10px;
  max-width: 740px;
  font-size: 17px;
  line-height: 1.55;
}

.is-authed .hero-actions {
  display: none;
}

.is-authed .hero-side {
  display: none;
}

.is-authed .hero-visual {
  display: block;
  left: auto;
  right: 390px;
  top: 18px;
  bottom: auto;
  z-index: 1;
  width: 260px;
  height: 104px;
  opacity: 0.22;
  pointer-events: none;
}

.is-authed .visual-base {
  left: 42px;
  bottom: -6px;
  width: 190px;
  height: 34px;
}

.is-authed .visual-panel-a {
  left: 48px;
  top: 0;
  width: 104px;
  height: 62px;
}

.is-authed .visual-panel-b {
  left: 162px;
  top: 26px;
  width: 84px;
  height: 52px;
}

.is-authed .hero-kicker,
.is-authed .hero h1,
.is-authed .hero p {
  position: relative;
  z-index: 11;
}

.is-authed .session {
  top: 70px;
  right: 32px;
  max-width: 330px;
  min-height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 0 22px;
  color: #eef6ff;
  font-weight: 900;
}

.is-authed .feature-grid {
  display: none;
}

.is-authed #dashboardView {
  margin-top: 12px;
}

.is-authed .toolbar.card {
  position: relative;
  margin-top: 0;
  min-height: 112px;
  border-radius: 18px;
  border-color: rgba(203, 213, 225, 0.72);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  padding: 26px 30px 26px 112px;
}

.is-authed .toolbar.card::after {
  position: absolute;
  left: 30px;
  top: 28px;
  width: 58px;
  height: 58px;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #0ea5e9 0 9px, transparent 10px),
    radial-gradient(ellipse at 50% 76%, #2563eb 0 18px, transparent 19px),
    #eff6ff;
  box-shadow: inset 0 0 0 8px #fff;
  content: "";
}

.is-authed .toolbar strong {
  color: #0a1f4d;
  font-size: 17px;
  font-weight: 950;
}

.is-authed .toolbar .muted {
  display: inline-flex;
  margin-right: 22px;
  color: #64748b;
  font-size: 14px;
}

.is-authed .toolbar-actions button {
  min-width: 124px;
  min-height: 50px;
  border-radius: 8px;
}

.is-authed #refreshBtn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}

.is-authed .cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 18px;
}

.is-authed .stat {
  min-height: 126px;
  border-radius: 16px;
  padding: 24px 22px 20px 104px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.is-authed .stat::before {
  right: -44px;
  top: -54px;
  width: 140px;
  height: 140px;
}

.is-authed .stat::after {
  left: 22px;
  bottom: 18px;
  width: 58px;
  height: 5px;
  opacity: 0.18;
}

.is-authed .stat span {
  font-size: 30px;
  color: #0a1f4d;
}

.is-authed .stat label {
  margin-top: 6px;
  color: #667085;
  font-size: 14px;
}

.is-authed .stat label::before {
  position: absolute;
  left: -82px;
  top: -42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.20);
  font-size: 22px;
  content: "▣";
}

.is-authed .stat:nth-child(2) label::before {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  content: "↻";
}

.is-authed .stat:nth-child(3) label::before {
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  content: "↙";
}

.is-authed .stat:nth-child(4) label::before {
  background: linear-gradient(135deg, #34d399, #10b981);
  content: "✓";
}

.is-authed .stat:nth-child(5) label::before {
  background: linear-gradient(135deg, #60a5fa, #0284c7);
  content: "◔";
}

.is-authed .task-card,
.is-authed .data-card {
  border-radius: 18px;
  border-color: rgba(203, 213, 225, 0.72);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.is-authed .task-card {
  padding: 20px 28px 18px;
  background: rgba(255, 255, 255, 0.96);
}

.is-authed .section-head h2 {
  color: #0a1f4d;
  font-size: 20px;
  font-weight: 950;
}

.is-authed .section-head h2::before {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.is-authed .task-empty {
  min-height: 56px;
  border-color: #d7e0ef;
  border-radius: 8px;
  background: #fbfdff;
}

.is-authed .data-card > .section-head {
  padding: 20px 28px 0;
}

.is-authed .filters {
  gap: 12px;
}

.is-authed .filters button {
  min-height: 38px;
  border-radius: 10px;
  padding: 8px 18px;
}

.is-authed #syncScoresBtn {
  border-radius: 999px;
  background: #082052;
}

.is-authed table {
  min-width: 1360px;
}

.is-authed th {
  background: #f8fbff;
  color: #667085;
}

.is-authed td {
  padding: 13px 28px;
  color: #102a5c;
}

.is-authed th {
  padding: 13px 28px;
}

.is-authed .exam-name {
  min-width: 380px;
  color: #0a1f4d;
}

.is-authed .badge {
  color: #047857;
  background: #d1fae5;
  box-shadow: none;
}

.is-authed .badge::before {
  background: #10b981;
}

.is-authed .score-empty,
.is-authed .score-pill {
  border-radius: 999px;
  background: #f8fbff;
  color: #102a5c;
}

.is-authed .row-actions button {
  min-height: 34px;
  border-radius: 7px;
  font-weight: 950;
}

.is-authed .row-actions button:first-child {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}

@media (max-width: 1180px) {
  .is-authed .shell {
    width: min(100% - 32px, 1720px);
  }

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

  .is-authed .hero-visual {
    display: none;
  }

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

@media (max-width: 720px) {
  .is-authed .shell {
    width: min(100% - 18px, 1720px);
  }

  .is-authed .hero {
    min-height: 220px;
    padding: 26px 18px;
  }

  .is-authed .session {
    position: static;
    width: fit-content;
    margin-bottom: 18px;
  }

  .is-authed .hero h1 {
    font-size: 30px;
  }

  .is-authed .toolbar.card {
    padding: 22px;
  }

  .is-authed .toolbar.card::after {
    display: none;
  }

  .is-authed .cards {
    grid-template-columns: 1fr;
  }
}

/* Login landing page centering fix. */
body:not(.is-authed) {
  min-height: 100vh;
  overflow-x: hidden;
}

body:not(.is-authed) .shell {
  width: min(1680px, calc(100vw - 96px));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0 44px;
}

body:not(.is-authed) .hero {
  width: 100%;
  min-height: 760px;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 520px);
  gap: 56px;
  align-items: center;
  padding: 72px 78px 190px;
}

body:not(.is-authed) .hero-main {
  max-width: 830px;
  transform: translateY(-8px);
}

body:not(.is-authed) .hero-kicker {
  margin-bottom: 72px;
}

body:not(.is-authed) .hero h1 {
  font-size: clamp(52px, 4.8vw, 76px);
  line-height: 1.05;
}

body:not(.is-authed) .hero p {
  max-width: 760px;
  font-size: 21px;
  line-height: 1.68;
}

body:not(.is-authed) .hero-actions {
  margin-top: 34px;
}

body:not(.is-authed) .hero-actions span {
  min-width: 142px;
  justify-content: center;
}

body:not(.is-authed) .session {
  top: 54px;
  right: 78px;
}

body:not(.is-authed) .hero .login-card {
  margin-top: 0;
  padding: 48px 42px;
}

body:not(.is-authed) .hero .login-card h2 {
  font-size: 34px;
}

body:not(.is-authed) .hero-visual {
  left: 110px;
  bottom: -108px;
  width: 570px;
  height: 285px;
}

body:not(.is-authed) .visual-base {
  left: 76px;
  bottom: 16px;
  width: 390px;
  height: 94px;
}

body:not(.is-authed) .visual-panel-a {
  width: 250px;
  height: 140px;
}

body:not(.is-authed) .visual-panel-b {
  left: 336px;
  width: 190px;
  height: 122px;
}

body:not(.is-authed) .feature-grid {
  width: calc(100% - 100px);
  margin: -142px auto 0;
  gap: 26px;
}

body:not(.is-authed) .feature-card {
  min-height: 126px;
  padding: 22px 26px;
}

body:not(.is-authed) .toast {
  right: 26px;
  bottom: 24px;
}

@media (max-width: 1400px) {
  body:not(.is-authed) .shell {
    width: min(1280px, calc(100vw - 64px));
  }

  body:not(.is-authed) .hero {
    min-height: 660px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 450px);
    gap: 34px;
    padding: 56px 58px 166px;
  }

  body:not(.is-authed) .hero h1 {
    font-size: clamp(42px, 4.6vw, 58px);
  }

  body:not(.is-authed) .hero p {
    font-size: 18px;
  }

  body:not(.is-authed) .hero-kicker {
    margin-bottom: 48px;
  }

  body:not(.is-authed) .feature-grid {
    width: calc(100% - 76px);
    margin-top: -124px;
  }
}

@media (max-width: 980px) {
  body:not(.is-authed) .shell {
    width: min(100vw - 24px, 760px);
    justify-content: flex-start;
    padding-top: 16px;
  }

  body:not(.is-authed) .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 24px;
    padding: 30px 22px 130px;
  }

  body:not(.is-authed) .hero-main {
    transform: none;
  }

  body:not(.is-authed) .hero-kicker {
    margin-bottom: 28px;
  }

  body:not(.is-authed) .hero h1 {
    font-size: 36px;
  }

  body:not(.is-authed) .hero p {
    font-size: 15px;
  }

  body:not(.is-authed) .hero .login-card {
    padding: 22px 18px;
  }

  body:not(.is-authed) .feature-grid {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    margin-top: -104px;
  }
}

/* Landing hard reset v4: clean centered composition, no floating-card layout conflicts. */
body.is-login:not(.is-authed) {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 4%, rgba(37, 99, 235, 0.14), transparent 30rem),
    radial-gradient(circle at 87% 8%, rgba(14, 165, 233, 0.16), transparent 34rem),
    linear-gradient(180deg, #eef6ff 0%, #f8fbff 58%, #edf3fa 100%);
}

body.is-login:not(.is-authed) .shell {
  width: min(1560px, calc(100vw - 80px));
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px 0;
}

body.is-login:not(.is-authed) .hero {
  position: relative;
  width: 100%;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  grid-template-rows: 1fr auto;
  gap: 28px 56px;
  align-items: center;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 18%, rgba(56, 189, 248, 0.70), transparent 27rem),
    radial-gradient(circle at 39% 88%, rgba(37, 99, 235, 0.30), transparent 28rem),
    linear-gradient(135deg, #020717 0%, #07194d 50%, #076985 100%);
  box-shadow: 0 34px 86px rgba(15, 23, 42, 0.24);
  padding: 58px 64px 34px;
}

body.is-login:not(.is-authed) .hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 34% 78%, rgba(56, 189, 248, 0.20), transparent 33%),
    repeating-radial-gradient(ellipse at 31% 75%, rgba(59, 130, 246, 0.28) 0 1px, transparent 1px 48px);
  opacity: 0.65;
  content: "";
}

body.is-login:not(.is-authed) .hero::after {
  display: none;
}

body.is-login:not(.is-authed) .session {
  position: absolute;
  top: 46px;
  right: 56px;
  z-index: 5;
  max-width: 180px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.86);
}

body.is-login:not(.is-authed) .hero-main {
  position: relative;
  z-index: 3;
  max-width: 860px;
  align-self: center;
  transform: none;
}

body.is-login:not(.is-authed) .hero-kicker {
  margin: 0 0 56px;
  color: rgba(255, 255, 255, 0.92);
}

body.is-login:not(.is-authed) .hero h1 {
  max-width: 900px;
  color: #fff;
  font-size: clamp(46px, 4.1vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.06em;
  white-space: nowrap;
}

body.is-login:not(.is-authed) .hero p {
  max-width: 760px;
  margin-top: 16px;
  color: rgba(239, 246, 255, 0.88);
  font-size: 18px;
  line-height: 1.7;
}

body.is-login:not(.is-authed) .hero-actions {
  position: relative;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

body.is-login:not(.is-authed) .hero-actions span {
  min-width: 126px;
  min-height: 46px;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  background: rgba(37, 99, 235, 0.32);
  padding: 0 18px;
  color: #eff6ff;
  font-size: 14px;
}

body.is-login:not(.is-authed) .hero-visual {
  position: absolute;
  z-index: 2;
  left: 270px;
  bottom: 150px;
  width: 440px;
  height: 190px;
  opacity: 0.72;
  pointer-events: none;
}

body.is-login:not(.is-authed) .visual-base {
  left: 54px;
  bottom: 0;
  width: 330px;
  height: 62px;
}

body.is-login:not(.is-authed) .visual-panel-a {
  left: 46px;
  top: 18px;
  width: 194px;
  height: 108px;
}

body.is-login:not(.is-authed) .visual-panel-b {
  left: 264px;
  top: 52px;
  width: 146px;
  height: 92px;
}

body.is-login:not(.is-authed) .hero-side {
  position: relative;
  z-index: 4;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  display: block;
}

body.is-login:not(.is-authed) .hero .login-card {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.20);
  padding: 36px;
}

body.is-login:not(.is-authed) .hero .login-card h2 {
  color: #07133b;
  font-size: 30px;
  line-height: 1.2;
}

body.is-login:not(.is-authed) .hero .login-card .muted {
  margin-top: 10px;
  color: #667085;
  font-size: 14px;
  line-height: 1.7;
}

body.is-login:not(.is-authed) .hero .login-card .grid-form {
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 24px;
}

body.is-login:not(.is-authed) .hero .login-card input {
  min-height: 54px;
  border-radius: 12px;
}

body.is-login:not(.is-authed) .hero .login-card button {
  min-height: 58px;
  border-radius: 12px;
}

body.is-login:not(.is-authed) .feature-grid {
  position: relative;
  z-index: 4;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
}

body.is-login:not(.is-authed) .feature-card {
  min-height: 112px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  padding: 20px 24px;
}

body.is-login:not(.is-authed) .feature-icon {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  font-size: 27px;
}

body.is-login:not(.is-authed) .feature-card h3 {
  color: #07133b;
  font-size: 20px;
  line-height: 1.2;
}

body.is-login:not(.is-authed) .feature-card p {
  margin-top: 7px;
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1280px) {
  body.is-login:not(.is-authed) .shell {
    width: min(1180px, calc(100vw - 48px));
  }

  body.is-login:not(.is-authed) .hero {
    grid-template-columns: minmax(0, 1fr) 390px;
    min-height: 650px;
    gap: 28px;
    padding: 46px 48px 30px;
  }

  body.is-login:not(.is-authed) .hero h1 {
    font-size: clamp(40px, 4vw, 54px);
  }

  body.is-login:not(.is-authed) .hero p {
    font-size: 16px;
  }

  body.is-login:not(.is-authed) .hero-visual {
    left: 190px;
  }
}

@media (max-width: 900px) {
  body.is-login:not(.is-authed) .shell {
    width: min(100vw - 20px, 760px);
    display: block;
    padding: 12px 0 28px;
  }

  body.is-login:not(.is-authed) .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 26px 18px;
  }

  body.is-login:not(.is-authed) .hero h1 {
    font-size: 34px;
    white-space: normal;
  }

  body.is-login:not(.is-authed) .hero-visual {
    display: none;
  }

  body.is-login:not(.is-authed) .hero-side,
  body.is-login:not(.is-authed) .feature-grid {
    grid-column: 1;
    grid-row: auto;
  }

  body.is-login:not(.is-authed) .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* Fullscreen landing: remove outer white canvas. */
body.is-login:not(.is-authed) {
  background:
    radial-gradient(circle at 78% 12%, rgba(56, 189, 248, 0.72), transparent 31rem),
    radial-gradient(circle at 36% 82%, rgba(37, 99, 235, 0.36), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #07194d 52%, #075985 100%);
}

body.is-login:not(.is-authed)::before {
  display: none;
}

body.is-login:not(.is-authed) .shell {
  width: 100vw;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

body.is-login:not(.is-authed) .hero {
  width: 100vw;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(34px, 4.2vw, 76px) clamp(42px, 6vw, 110px) clamp(30px, 4vw, 58px);
  background:
    radial-gradient(circle at 78% 12%, rgba(56, 189, 248, 0.70), transparent 31rem),
    radial-gradient(circle at 36% 82%, rgba(37, 99, 235, 0.36), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #07194d 52%, #075985 100%);
}

body.is-login:not(.is-authed) .hero::before {
  opacity: 0.72;
}

body.is-login:not(.is-authed) .session {
  top: clamp(28px, 3vw, 54px);
  right: clamp(32px, 5.2vw, 96px);
}

body.is-login:not(.is-authed) .hero-main {
  align-self: center;
}

body.is-login:not(.is-authed) .hero-side {
  align-self: center;
}

body.is-login:not(.is-authed) .feature-grid {
  align-self: end;
}

body.is-login:not(.is-authed) .toast {
  right: 24px;
  bottom: 24px;
}

@media (max-width: 900px) {
  body.is-login:not(.is-authed) .hero {
    width: 100vw;
    min-height: 100vh;
    padding: 24px 16px 28px;
  }
}

/* Enlarge login form card. */
body.is-login:not(.is-authed) .hero {
  grid-template-columns: minmax(0, 1fr) minmax(520px, 580px);
  column-gap: clamp(52px, 6vw, 110px);
}

body.is-login:not(.is-authed) .hero-side {
  width: 100%;
  justify-self: end;
}

body.is-login:not(.is-authed) .hero .login-card {
  max-width: 580px;
  min-height: 430px;
  border-radius: 28px;
  padding: 48px 46px;
}

body.is-login:not(.is-authed) .hero .login-card h2 {
  font-size: 36px;
  letter-spacing: -0.04em;
}

body.is-login:not(.is-authed) .hero .login-card .muted {
  margin-top: 12px;
  font-size: 15px;
}

body.is-login:not(.is-authed) .hero .login-card .grid-form {
  gap: 18px;
  margin-top: 30px;
}

body.is-login:not(.is-authed) .hero .login-card label span {
  margin-bottom: 9px;
  font-size: 13px;
}

body.is-login:not(.is-authed) .hero .login-card input {
  min-height: 64px;
  border-radius: 15px;
  font-size: 15px;
  padding: 0 18px;
}

body.is-login:not(.is-authed) .hero .login-card button {
  min-height: 68px;
  border-radius: 15px;
  font-size: 17px;
}

@media (max-width: 1280px) {
  body.is-login:not(.is-authed) .hero {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 500px);
  }

  body.is-login:not(.is-authed) .hero .login-card {
    max-width: 500px;
    padding: 40px;
  }
}

@media (max-width: 900px) {
  body.is-login:not(.is-authed) .hero {
    grid-template-columns: 1fr;
  }

  body.is-login:not(.is-authed) .hero .login-card {
    max-width: none;
    min-height: auto;
  }
}

/* Landing polish v3: reduce empty space, keep title on one line, avoid visual overlap. */
body:not(.is-authed) {
  background:
    radial-gradient(circle at 14% 2%, rgba(37, 99, 235, 0.13), transparent 32rem),
    radial-gradient(circle at 88% 4%, rgba(14, 165, 233, 0.18), transparent 34rem),
    linear-gradient(180deg, #f0f6ff 0%, #f8fbff 52%, #eef4fb 100%);
}

body:not(.is-authed) .shell {
  width: min(1760px, calc(100vw - 72px));
  min-height: auto;
  display: block;
  padding: 42px 0 54px;
}

body:not(.is-authed) .hero {
  min-height: 660px;
  grid-template-columns: minmax(0, 1fr) 470px;
  gap: 46px;
  align-items: center;
  border-radius: 28px;
  padding: 58px 72px 156px;
}

body:not(.is-authed) .hero-main {
  max-width: 940px;
  transform: none;
}

body:not(.is-authed) .hero-kicker {
  position: relative;
  z-index: 4;
  margin-bottom: 46px;
}

body:not(.is-authed) .hero h1 {
  position: relative;
  z-index: 4;
  max-width: 980px;
  font-size: clamp(44px, 3.65vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

body:not(.is-authed) .hero p {
  position: relative;
  z-index: 4;
  max-width: 790px;
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.72;
}

body:not(.is-authed) .hero-actions {
  position: relative;
  z-index: 5;
  margin-top: 28px;
  gap: 14px;
}

body:not(.is-authed) .hero-actions span {
  min-width: 126px;
  min-height: 48px;
  border-radius: 14px;
  padding: 0 18px;
  justify-content: center;
  background: rgba(37, 99, 235, 0.30);
}

body:not(.is-authed) .session {
  top: 46px;
  right: 66px;
}

body:not(.is-authed) .hero-side {
  align-self: center;
}

body:not(.is-authed) .hero .login-card {
  margin-top: 10px;
  border-radius: 26px;
  padding: 40px 38px;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.18);
}

body:not(.is-authed) .hero .login-card h2 {
  font-size: 30px;
}

body:not(.is-authed) .hero .login-card .muted {
  margin-top: 10px;
  color: #667085;
  line-height: 1.7;
}

body:not(.is-authed) .hero .login-card .grid-form {
  margin-top: 24px;
  gap: 16px;
}

body:not(.is-authed) .hero .login-card input {
  min-height: 54px;
}

body:not(.is-authed) .hero .login-card button {
  min-height: 58px;
}

body:not(.is-authed) .hero-visual {
  z-index: 2;
  left: 250px;
  bottom: -86px;
  width: 520px;
  height: 230px;
  opacity: 0.86;
}

body:not(.is-authed) .visual-base {
  left: 72px;
  bottom: 8px;
  width: 360px;
  height: 78px;
}

body:not(.is-authed) .visual-panel-a {
  left: 68px;
  top: 18px;
  width: 220px;
  height: 122px;
  opacity: 0.92;
}

body:not(.is-authed) .visual-panel-b {
  left: 300px;
  top: 52px;
  width: 168px;
  height: 106px;
  opacity: 0.92;
}

body:not(.is-authed) .feature-grid {
  width: calc(100% - 92px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: -118px auto 0;
}

body:not(.is-authed) .feature-card {
  min-height: 126px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
  padding: 22px 24px;
}

body:not(.is-authed) .feature-card h3 {
  font-size: 21px;
}

body:not(.is-authed) .feature-card p {
  font-size: 14px;
}

body:not(.is-authed) .feature-icon {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  font-size: 30px;
}

@media (min-width: 1700px) {
  body:not(.is-authed) .hero {
    min-height: 680px;
  }
}

@media (max-width: 1320px) {
  body:not(.is-authed) .hero {
    grid-template-columns: minmax(0, 1fr) 410px;
    padding-left: 48px;
    padding-right: 48px;
  }

  body:not(.is-authed) .hero h1 {
    font-size: clamp(38px, 3.8vw, 54px);
  }

  body:not(.is-authed) .hero p {
    font-size: 16px;
  }
}

@media (max-width: 980px) {
  body:not(.is-authed) .shell {
    width: min(100vw - 24px, 780px);
    padding-top: 16px;
  }

  body:not(.is-authed) .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 24px;
    padding: 30px 22px 132px;
  }

  body:not(.is-authed) .hero h1 {
    font-size: 34px;
    white-space: normal;
  }

  body:not(.is-authed) .hero-visual {
    display: none;
  }

  body:not(.is-authed) .feature-grid {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    margin-top: -104px;
  }
}

@media (max-width: 980px) {
  .billing-hero,
  .toolbar.card,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-tabs.card {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .recharge-grid,
  .profile-grid,
  .invite-grid {
    grid-template-columns: 1fr;
  }

  .invite-bind-form {
    grid-template-columns: 1fr;
  }

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

  .wallet-card {
    min-width: 0;
  }
}
