:root {
  --bg: #08111f;
  --bg-soft: #0f1b2e;
  --panel: #f7fafc;
  --panel-2: #ffffff;
  --line: #d8e1eb;
  --text: #102036;
  --muted: #5c6d82;
  --brand: #0f766e;
  --brand-2: #2563eb;
  --accent: #f59e0b;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --sidebar: #07101d;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(8, 17, 31, 0.14);
  --font-heading: "Manrope", "Noto Sans", "Segoe UI", sans-serif;
  --font-ui: "Manrope", "Noto Sans", "Segoe UI Symbol", "Cambria Math", "DejaVu Sans", sans-serif;
  --font-content: "Times New Roman", "Cambria", "Cambria Math", "Georgia", "Segoe UI Symbol", "Noto Serif", serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 22%),
    linear-gradient(180deg, #edf3f8 0%, #e9f0f6 100%);
  color: var(--text);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  margin: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
  font-family: var(--font-ui);
}

.hidden {
  display: none !important;
}

.auth-shell {
  min-height: 100vh;
  padding: 14px;
  display: grid;
  align-items: center;
}

.auth-layout {
  width: min(1600px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(460px, 0.92fr);
  gap: 16px;
  align-items: stretch;
  margin: 0 auto;
}

.auth-shell-single {
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.2), transparent 24%),
    linear-gradient(180deg, #eefaf8 0%, #e9f4ff 52%, #f6fbff 100%);
}

.auth-shell-single .auth-layout {
  width: min(1180px, calc(100vw - 28px));
  grid-template-columns: minmax(0, 1fr);
}

.auth-shell-single .auth-card-premium {
  min-height: min(720px, calc(100vh - 28px));
  padding: 30px 42px 28px;
  justify-content: center;
}

.auth-shell-single .auth-card {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 24%),
    radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 252, 255, 0.94) 100%);
  color: var(--text);
  border: 1px solid rgba(173, 216, 230, 0.55);
  box-shadow: 0 30px 80px rgba(56, 88, 126, 0.14);
  backdrop-filter: blur(22px);
}

.auth-login-premium {
  isolation: isolate;
}

.auth-login-premium::after {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(34, 211, 238, 0.18), transparent 18%),
    radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.16), transparent 20%),
    radial-gradient(circle at 78% 78%, rgba(45, 212, 191, 0.16), transparent 18%),
    radial-gradient(circle at 24% 84%, rgba(250, 204, 21, 0.12), transparent 16%);
  animation: authAuroraShift 18s ease-in-out infinite alternate;
}

.auth-premium-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.auth-content-layer {
  position: relative;
  z-index: 2;
}

.auth-premium-orb,
.auth-premium-line,
.auth-premium-spark {
  position: absolute;
  display: block;
}

.auth-premium-orb {
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.7;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88) 0%, rgba(125, 211, 252, 0.28) 42%, rgba(59, 130, 246, 0.02) 74%);
  animation: authFloatOrb 16s ease-in-out infinite;
}

.auth-premium-line {
  height: 10px;
  border-radius: 999px;
  opacity: 0.6;
  filter: blur(0.5px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 42%, rgba(93, 211, 255, 0.75) 70%, rgba(255, 255, 255, 0));
  box-shadow: 0 0 22px rgba(103, 232, 249, 0.22);
  animation: authSweepLine 14s ease-in-out infinite;
}

.auth-premium-spark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.08),
    0 0 18px rgba(103, 232, 249, 0.45),
    0 0 34px rgba(59, 130, 246, 0.22);
  animation: authTwinkleSpark 7.8s ease-in-out infinite;
}

.auth-premium-spark::before,
.auth-premium-spark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.auth-premium-spark::before {
  width: 2px;
  height: 22px;
}

.auth-premium-spark::after {
  width: 22px;
  height: 2px;
}

.auth-premium-orb.orb-a {
  top: 8%;
  left: 3%;
  width: 190px;
  height: 190px;
  animation-duration: 17s;
}

.auth-premium-orb.orb-b {
  top: 22%;
  right: 6%;
  width: 140px;
  height: 140px;
  animation-duration: 13s;
  animation-delay: -4s;
}

.auth-premium-orb.orb-c {
  bottom: -2%;
  left: 24%;
  width: 220px;
  height: 220px;
  opacity: 0.58;
  animation-duration: 19s;
  animation-delay: -9s;
}

.auth-premium-line.line-a {
  top: 16%;
  right: 10%;
  width: 220px;
  --line-angle: -14deg;
  animation-delay: -3s;
}

.auth-premium-line.line-b {
  bottom: 18%;
  left: 7%;
  width: 180px;
  --line-angle: 18deg;
  animation-delay: -10s;
}

.auth-premium-line.line-c {
  top: 54%;
  right: 20%;
  width: 140px;
  --line-angle: -28deg;
  animation-duration: 12s;
  animation-delay: -6s;
}

.auth-premium-spark.spark-a {
  top: 16%;
  left: 22%;
}

.auth-premium-spark.spark-b {
  top: 32%;
  right: 19%;
  animation-delay: -2.5s;
}

.auth-premium-spark.spark-c {
  bottom: 24%;
  left: 16%;
  animation-delay: -5s;
}

.auth-premium-spark.spark-d {
  bottom: 15%;
  right: 12%;
  animation-delay: -3.5s;
}

.auth-premium-spark.spark-e {
  top: 48%;
  left: 9%;
  animation-delay: -6.2s;
}

@keyframes authAuroraShift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(1.5%, -2%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(-2%, 1.5%, 0) scale(1);
  }
}

@keyframes authFloatOrb {
  0% {
    transform: translate3d(0, 0, 0) scale(0.96);
  }
  50% {
    transform: translate3d(22px, -26px, 0) scale(1.08);
  }
  100% {
    transform: translate3d(-14px, 18px, 0) scale(0.98);
  }
}

@keyframes authSweepLine {
  0% {
    opacity: 0.16;
    transform: translate3d(-22px, 18px, 0) scaleX(0.9) rotate(var(--line-angle, 0deg));
  }
  50% {
    opacity: 0.72;
    transform: translate3d(8px, -8px, 0) scaleX(1.02) rotate(var(--line-angle, 0deg));
  }
  100% {
    opacity: 0.22;
    transform: translate3d(24px, -24px, 0) scaleX(1.08) rotate(var(--line-angle, 0deg));
  }
}

@keyframes authTwinkleSpark {
  0%, 100% {
    opacity: 0.36;
    transform: translate3d(0, 0, 0) scale(0.82);
  }
  50% {
    opacity: 1;
    transform: translate3d(12px, -18px, 0) scale(1.28);
  }
}

.auth-shell-single .auth-card-premium::before {
  top: -60px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: rgba(59, 130, 246, 0.1);
}

.auth-showcase {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 28px);
  border-radius: 30px;
  padding: 40px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.14), transparent 28%),
    linear-gradient(145deg, #07101d 0%, #0e1e34 52%, #12396d 100%);
  color: #fff;
  box-shadow: 0 34px 90px rgba(7, 16, 29, 0.24);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-showcase::after {
  content: "";
  position: absolute;
  inset: auto -70px -90px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  filter: blur(10px);
}

.auth-showcase-copy {
  max-width: 700px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(7, 16, 29, 0.82);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 30px 80px rgba(7, 16, 29, 0.28);
  backdrop-filter: blur(18px);
}

.auth-card-premium {
  max-width: none;
  min-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 40px;
}

.auth-card-premium::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.16);
  filter: blur(10px);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d8e8ff;
  font-size: 13px;
  margin-bottom: 18px;
}

.auth-title {
  font-size: clamp(34px, 4.4vw, 66px);
  line-height: 1.08;
  margin-bottom: 14px;
}

.auth-title-compact {
  font-size: clamp(34px, 4vw, 54px);
  max-width: 840px;
  margin: 0 0 16px;
}

.auth-clean-brand {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 196, 233, 0.42);
  color: #1d4f79;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.08);
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 28px;
  max-width: 840px;
  line-height: 1.8;
  font-size: 18px;
}

.auth-kicker {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.auth-feature-card {
  position: relative;
  z-index: 1;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
}

.auth-feature-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.auth-feature-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.6;
  font-size: 16px;
}

.auth-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  margin-bottom: 18px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 13px;
}

.auth-metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-metric-card {
  position: relative;
  z-index: 1;
  padding: 22px 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-metric-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
}

.auth-metric-card span {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  font-size: 16px;
}

.auth-panel-top,
.topbar-meta,
.topbar-user-panel {
  display: flex;
  align-items: center;
}

.auth-panel-top {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.auth-form-title {
  font-size: 42px;
  margin-top: 4px;
}

.auth-form-note {
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 28px;
  line-height: 1.7;
  font-size: 17px;
}

.auth-clean-caption {
  margin: 0 0 24px;
  color: #5b748f;
  line-height: 1.7;
  font-size: 15px;
  max-width: 760px;
}

.auth-mini-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-mini-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-inline-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 4px 0 24px;
}

.auth-inline-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-inline-card strong {
  font-size: 18px;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
}

.auth-inline-card span {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  font-size: 14px;
}

.auth-submit-btn {
  margin-top: 4px;
}

.auth-footer-clean {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 196, 233, 0.24);
  color: #5f7c98;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(157, 201, 237, 0.38);
  color: #55779b;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 18px 38px rgba(120, 170, 214, 0.16);
}

.auth-channel-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #27a7e7, #1f6ff0);
  color: #fff;
  box-shadow: 0 12px 24px rgba(39, 127, 232, 0.25);
  flex: 0 0 auto;
}

.auth-channel-pill__icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.auth-submit-btn[disabled] {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.auth-footer-line {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.auth-shell-single .auth-panel-top {
  margin-bottom: 14px;
  justify-content: center;
  text-align: center;
}

.auth-shell-single .auth-kicker {
  color: #4d7599;
  margin-bottom: 10px;
}

.auth-shell-single .auth-form-title {
  color: #102036;
  font-size: 34px;
}

.auth-shell-single .auth-title-compact {
  color: #14304a;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.auth-shell-single .auth-form-note {
  color: #50687f;
  margin: 0 auto 14px;
  max-width: 760px;
  text-align: center;
}

.auth-shell-single .auth-clean-caption,
.auth-shell-single .auth-footer-clean {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.auth-shell-single .stack {
  width: min(100%, 920px);
  margin: 0 auto;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cfe0ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 8px 20px rgba(37, 99, 235, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-card .field input,
.auth-card .field select,
.auth-card .field textarea {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.auth-shell-single .field label {
  color: #1a3652;
}

.auth-shell-single .notice {
  border: 1px solid transparent;
  font-weight: 800;
}

.auth-shell-single .notice.error {
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fda4af;
  color: #b91c1c;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.08);
}

.auth-shell-single .notice.success {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #6ee7b7;
  color: #047857;
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.08);
}

.auth-shell-single .field input,
.auth-shell-single .field select,
.auth-shell-single .field textarea {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(148, 196, 233, 0.38);
  color: #102036;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.auth-shell-single .field input::placeholder,
.auth-shell-single .field textarea::placeholder {
  color: #7d93a8;
}

.auth-shell-single .auth-submit-btn {
  min-height: 58px;
  font-size: 20px;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
}

.auth-shell-single .auth-submit-btn:hover {
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .auth-login-premium::after,
  .auth-premium-orb,
  .auth-premium-line,
  .auth-premium-spark {
    animation: none !important;
  }
}

.access-register-page .auth-shell-single .auth-layout {
  width: min(920px, calc(100vw - 18px));
}

.access-register-page .auth-shell-single .auth-card-premium {
  min-height: auto;
  padding: 10px 24px 12px;
  border-radius: 24px;
}

.access-register-page .auth-shell-single .auth-form-title {
  font-size: 16px;
}

.access-register-page .auth-shell-single .auth-title-compact {
  font-size: clamp(15px, 1.7vw, 21px);
  max-width: 700px;
  margin-bottom: 2px;
}

.access-register-page .auth-shell-single .auth-form-note {
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 4px;
  max-width: 700px;
}

.access-register-page .auth-shell-single .notice {
  padding: 8px 11px;
  font-size: 12px;
  border-radius: 16px;
  text-align: center;
  justify-content: center;
}

.access-register-page .auth-shell-single .stack {
  width: min(100%, 760px);
}

.access-register-page .auth-shell-single .field input,
.access-register-page .auth-shell-single .field select {
  min-height: 46px;
}

.access-register-page .auth-shell-single .auth-submit-btn {
  min-height: 46px;
  font-size: 16px;
}

.access-register-page .auth-shell-single .auth-panel-top {
  margin-bottom: 6px;
}

.access-register-page .auth-shell-single .auth-kicker {
  margin-bottom: 2px;
}

.access-register-page .auth-shell-single .field label {
  font-size: 12px;
}

.access-register-page #accessLinkMeta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto 6px;
  text-align: center;
}

.access-register-page #accessLinkMeta strong {
  color: #047857;
  font-size: 13px;
  font-weight: 900;
}

.access-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #0f5132;
  font-weight: 700;
}

.access-meta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.access-meta-link:hover {
  color: #fff;
  text-decoration: none;
}

.access-register-success .auth-card-premium {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
}

.access-register-success #accessLinkMeta {
  flex-direction: column;
  gap: 14px;
  max-width: 540px;
  margin: 12px auto 0;
  padding: 22px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  box-shadow: 0 20px 40px rgba(34, 197, 94, 0.14);
}

.access-register-success #accessLinkMeta strong {
  font-size: 22px;
  color: #047857;
}

.access-register-success .access-meta-chip {
  font-size: 14px;
  padding: 10px 14px;
  justify-content: center;
  text-align: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.84);
}

.access-register-success .access-meta-link {
  min-width: 240px;
  padding: 13px 22px;
  font-size: 18px;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.remember-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 20, 35, 0.36);
  backdrop-filter: blur(8px);
  z-index: 1200;
}

.remember-modal.show {
  display: flex;
}

.remember-modal-card {
  width: min(100%, 420px);
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  border: 1px solid rgba(148, 196, 233, 0.42);
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.16);
  text-align: center;
}

.remember-modal-kicker {
  margin-bottom: 10px;
  color: #4d7599;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.remember-modal-card h3 {
  margin: 0 0 10px;
  color: #12233a;
  font-size: 28px;
  font-weight: 800;
}

.remember-modal-card p {
  margin: 0;
  color: #5b7087;
  font-size: 15px;
  line-height: 1.7;
}

.remember-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.remember-modal-actions .btn {
  min-width: 120px;
  min-height: 46px;
  border-radius: 16px;
  font-size: 16px;
}

.remember-no {
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  border: 1px solid #b7cde5;
  color: #18324b !important;
  box-shadow: inset 0 0 0 1px rgba(183, 205, 229, 0.45), 0 8px 18px rgba(15, 23, 42, 0.06);
}

.remember-no:hover,
.remember-no:focus {
  color: #102036 !important;
  border-color: #8fb3d9;
  background: linear-gradient(180deg, #ffffff 0%, #e6f0fb 100%);
}

.remember-yes {
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-2);
  background: linear-gradient(180deg, #ffffff 0%, #f1f8ff 100%);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 14px 28px rgba(37, 99, 235, 0.08);
}

.auth-card .field input:focus,
.auth-card .field select:focus,
.auth-card .field textarea:focus {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.btn {
  border: none;
  border-radius: 14px;
  cursor: pointer;
  padding: 13px 18px;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.01em;
  will-change: transform, box-shadow;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.035);
  filter: saturate(1.06);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.18);
}

.btn-primary:hover {
  box-shadow: 0 20px 32px rgba(15, 118, 110, 0.22), 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.btn-secondary {
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.16);
}

.btn-secondary:hover {
  box-shadow: 0 22px 34px rgba(37, 99, 235, 0.22), 0 0 0 4px rgba(96, 165, 250, 0.12);
}

.btn-ghost-dark {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.9));
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.26);
}

.btn-ghost-dark:hover {
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.32), 0 0 0 4px rgba(96, 165, 250, 0.08);
}

.btn-edit-accent {
  min-width: 138px;
  padding: 12px 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.18);
}

.btn-edit-accent:hover {
  box-shadow: 0 22px 36px rgba(37, 99, 235, 0.22), 0 0 0 4px rgba(96, 165, 250, 0.12);
}

.question-list-top {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
  padding-top: 4px;
  border-top: 1px solid #d9ebff;
}

.question-list-edit {
  min-width: 156px;
  padding: 12px 18px;
  border-radius: 18px;
}

.question-list-text {
  line-height: 1.7;
  color: #24364d;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

.question-list-image-wrap {
  display: flex;
  justify-content: center;
}

.question-list-thumb {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #d7e7f7;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
  background: #fff;
}

.question-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fcff, #ffffff);
  color: #214266;
  text-decoration: none;
  font-weight: 700;
}

.question-preview-image {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #d7e7f7;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
  background: #fff;
}

.question-image-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px dashed #c8dcf0;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  color: #6482a3;
}

.btn-danger {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: var(--danger);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.12);
}

.btn-danger:hover {
  box-shadow: 0 18px 30px rgba(220, 38, 38, 0.18), 0 0 0 4px rgba(248, 113, 113, 0.10);
}

.btn-success {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: var(--success);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.12);
}

.btn-success:hover {
  box-shadow: 0 18px 30px rgba(5, 150, 105, 0.16), 0 0 0 4px rgba(52, 211, 153, 0.10);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.notice {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
}

.notice.error {
  background: rgba(220, 38, 38, 0.14);
  color: #fecaca;
}

.notice.success {
  background: rgba(5, 150, 105, 0.14);
  color: #bbf7d0;
}

.toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.premium-toast {
  min-width: 320px;
  max-width: 420px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 22px 50px rgba(8, 17, 31, 0.16);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  animation: toastIn 0.28s ease;
}

.premium-toast.success {
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(209, 250, 229, 0.96));
  color: #065f46;
}

.premium-toast.error {
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.96), rgba(255, 228, 230, 0.96));
  color: #b91c1c;
}

.premium-toast-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.premium-toast strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.premium-toast small {
  display: block;
  margin-top: 4px;
  opacity: 0.88;
  font-size: 12px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.18), transparent 30%),
    linear-gradient(180deg, #050d18 0%, #08111f 100%);
  color: #fff;
  padding: 24px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
  font-family: "Space Grotesk", sans-serif;
}

.brand p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.brand-channel {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 14px 28px rgba(0, 0, 0, 0.18);
  transform: translateX(3px) scale(1.015);
}

.main {
  padding: 22px;
}

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

.topbar-copy {
  max-width: 760px;
}

.topbar-copy h1 {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  margin: 0;
  padding: 10px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, #172334 0%, #111a28 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #f8fbff;
  box-shadow: 0 18px 40px rgba(8, 17, 31, 0.18);
  font-family: var(--font-heading);
  font-size: clamp(20px, 1.9vw, 25px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.topbar p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 720px;
  font-family: var(--font-ui);
  font-weight: 500;
}

.topbar-meta {
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-date-card {
  min-width: 180px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(216, 225, 235, 0.92);
  box-shadow: 0 16px 40px rgba(8, 17, 31, 0.08);
}

.topbar-date-card strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-family: "Space Grotesk", sans-serif;
}

.topbar-date-label {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-user-panel {
  gap: 12px;
  padding: 14px 16px;
}

.topbar-user-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.2);
}

.panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(216, 225, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-head {
  padding: 18px 20px;
  border-bottom: 1px solid #e6edf4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-body {
  padding: 20px;
}

.panel-note {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #eff6ff 0%, #f0fdfa 100%);
  border: 1px solid #d6ecf8;
  color: #33516d;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

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

.stat-card {
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 35%),
    linear-gradient(180deg, #ffffff, #f6fafc);
  border: 1px solid #e6edf4;
  box-shadow: 0 18px 46px rgba(8, 17, 31, 0.06);
}

.stat-card .label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.stat-card .value {
  font-size: 30px;
  font-weight: 900;
  font-family: "Space Grotesk", sans-serif;
}

.stat-card .meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.12), transparent 26%),
    linear-gradient(135deg, #07101d 0%, #0c1d34 55%, #11315f 100%);
  color: #fff;
}

.dashboard-kicker {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.dashboard-hero h2 {
  font-size: 36px;
  line-height: 1.1;
  max-width: 760px;
  margin-bottom: 10px;
}

.dashboard-hero p {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
  max-width: 720px;
  margin: 0;
}

.dashboard-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

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

.quick-admin-card {
  text-align: left;
  border: 1px solid #d9e7f2;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 20px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(8, 17, 31, 0.06);
}

.quick-admin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(37, 99, 235, 0.12);
}

.quick-admin-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  color: #0f4c81;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 14px;
}

.quick-admin-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
  color: #14304a;
  font-family: "Space Grotesk", sans-serif;
}

.quick-admin-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.dashboard-hero-side {
  display: grid;
  gap: 14px;
}

.dashboard-hero-highlight {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dashboard-hero-highlight strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 42px;
  font-family: "Space Grotesk", sans-serif;
}

.dashboard-hero-label,
.dashboard-hero-highlight small {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.dashboard-hero-stats {
  display: grid;
  gap: 12px;
}

.hero-mini-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-mini-card span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-mini-card strong {
  font-size: 24px;
  font-family: "Space Grotesk", sans-serif;
}

.hero-mini-card small {
  color: rgba(255, 255, 255, 0.74);
  text-align: right;
  line-height: 1.45;
}

.dashboard-insight-panel {
  overflow: hidden;
}

.insight-stack,
.focus-list,
.monitor-grid {
  display: grid;
  gap: 12px;
}

.insight-item,
.monitor-card,
.focus-item {
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid #e2eaf2;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.insight-item strong,
.monitor-card strong,
.focus-item strong {
  display: block;
  font-size: 18px;
  margin-top: 6px;
  font-family: "Space Grotesk", sans-serif;
}

.insight-label,
.monitor-label,
.focus-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.insight-item p,
.monitor-card p,
.focus-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ranking-summary {
  display: grid;
  gap: 16px;
}

.ranking-hero {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  border: 1px solid #d7e6f7;
}

.ranking-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ranking-hero strong {
  font-size: 28px;
  font-family: "Space Grotesk", sans-serif;
  color: #14304a;
}

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

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #e3ebf3;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.ranking-row.current {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #eff6ff, #ecfeff);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
}

.ranking-place {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
  font-family: "Space Grotesk", sans-serif;
}

.ranking-user {
  display: grid;
  gap: 4px;
}

.ranking-user strong {
  color: #14304a;
  font-size: 16px;
}

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

.ranking-score {
  text-align: right;
  font-size: 26px;
  font-weight: 900;
  color: #0f766e;
  font-family: "Space Grotesk", sans-serif;
}

.toolbar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar input,
.toolbar select {
  min-width: 160px;
  border: 1px solid #cfe0ef;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 10px 24px rgba(37, 99, 235, 0.04);
}

.toolbar input:focus,
.toolbar select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16), 0 16px 28px rgba(37, 99, 235, 0.08);
}

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

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

.checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

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

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6edf4;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.badge.success {
  background: #dcfce7;
  color: var(--success);
}

.badge.warning {
  background: #fef3c7;
  color: var(--warning);
}

.badge.danger {
  background: #fee2e2;
  color: var(--danger);
}

.badge.info {
  background: #dbeafe;
  color: var(--brand-2);
}

.section {
  display: none;
}

.section.active {
  display: grid;
  gap: 18px;
}

.catalog {
  display: grid;
  gap: 16px;
}

.subject-card {
  background: #fff;
  border: 1px solid #e6edf4;
  border-radius: 22px;
  overflow: hidden;
}

.subject-card-head {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: linear-gradient(180deg, #f7fbfd, #ffffff);
  border-bottom: 1px solid #e6edf4;
}

.folder-stack,
.test-stack {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.folder-card,
.test-card {
  border: 1px solid #e6edf4;
  border-radius: 16px;
  background: #fbfdff;
  padding: 14px;
}

.catalog-test-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.catalog-test-inline strong,
.catalog-test-inline .muted,
.catalog-test-inline .badge {
  white-space: nowrap;
}

.catalog-test-inline .muted {
  margin: 0;
}

.question-shell,
.result-shell {
  display: grid;
  gap: 16px;
}

.creator-flow {
  display: grid;
  gap: 22px;
}

.creator-top-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(320px, 1fr);
  gap: 14px;
}

.creator-time-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.creator-time-grid-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inline-action-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.btn-inline-action {
  white-space: nowrap;
}

.creator-import-block {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 54%, #f7fffd 100%);
  border: 1px solid #dbeaf7;
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.06);
}

.creator-import-block h3 {
  font-size: 20px;
  color: #14304a;
}

.creator-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d9e7f2, transparent);
}

.result-folder-card,
.result-test-card {
  display: grid;
  gap: 14px;
}

.result-folder-toggle,
.result-test-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-radius: 22px;
  border: 1px solid #d9e4ee;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #102036;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(8, 17, 31, 0.05);
}

.result-test-toggle {
  margin-left: 18px;
  width: calc(100% - 18px);
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #34d399;
  color: #0f5132;
}

.result-folder-arrow {
  font-size: 18px;
  font-weight: 900;
}

.result-folder-content,
.result-test-content {
  display: none;
}

.result-folder-content.open,
.result-test-content.open {
  display: grid;
  gap: 14px;
}

.result-test-content {
  margin-left: 18px;
}

.result-test-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px 0;
}

.result-legacy-table th,
.result-legacy-table td {
  font-size: 15px;
}

.result-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 900;
}

.result-score-pill.info {
  background: #dbeafe;
  color: #1d4ed8;
}

.result-score-pill.success {
  background: #dcfce7;
  color: #047857;
}

.result-score-pill.warning {
  background: #ffedd5;
  color: #c2410c;
}

.result-score-pill.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(620px, 1.04fr);
  gap: 18px;
  align-items: start;
}

.admin-editor {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid #dce8f3;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.admin-sidepanel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 150px);
  overflow: hidden;
}

.admin-sidepanel .table-wrap {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.admin-sidepanel table {
  table-layout: fixed;
}

.admin-sidepanel th:nth-child(1),
.admin-sidepanel td:nth-child(1) {
  width: 52px;
}

.admin-sidepanel th:nth-child(2),
.admin-sidepanel td:nth-child(2) {
  width: 58%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.6;
}

.admin-sidepanel th:nth-child(3),
.admin-sidepanel td:nth-child(3) {
  width: 88px;
  text-align: center;
}

.admin-sidepanel th:nth-child(4),
.admin-sidepanel td:nth-child(4) {
  width: 112px;
  text-align: center;
}

#questionText {
  min-height: 140px;
}

#questionExplanation {
  min-height: 190px;
  line-height: 1.7;
}

input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #d7e4f0;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 12px 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.question-card {
  padding: 20px;
  background: #fff;
  border: 1px solid #e6edf4;
  border-radius: 22px;
}

.test-shell {
  display: grid;
  gap: 18px;
}

body.taking-mode {
  background:
    radial-gradient(circle at top right, rgba(110, 231, 183, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(52, 211, 153, 0.16), transparent 28%),
    linear-gradient(180deg, #f3fff7 0%, #e9fbf1 48%, #f2fff6 100%);
  color: #102036;
}

body.taking-mode .app-shell {
  grid-template-columns: 1fr;
}

body.taking-mode .sidebar,
body.taking-mode .topbar {
  display: none;
}

body.taking-mode .main {
  padding: 0;
  min-height: 100vh;
}

body.taking-mode .section[data-section="taking"].active {
  display: grid;
  min-height: 100vh;
  padding: 8px 10px 10px;
}

body.taking-mode .test-shell {
  min-height: calc(100vh - 36px);
  gap: 8px;
  padding: 8px;
  border-radius: 34px;
  border: 1px solid rgba(74, 222, 128, 0.48);
  background:
    radial-gradient(circle at top, rgba(110, 231, 183, 0.14), transparent 24%),
    radial-gradient(circle at bottom right, rgba(52, 211, 153, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(248, 255, 250, 0.96) 0%, rgba(236, 252, 242, 0.98) 100%);
  box-shadow: 0 32px 90px rgba(34, 197, 94, 0.12);
}

.test-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: stretch;
  padding: 24px;
  position: sticky;
  top: 12px;
  z-index: 40;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 25%),
    linear-gradient(135deg, #08111f 0%, #0f1b2e 55%, #11315f 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(8, 17, 31, 0.24);
}

body.taking-mode .test-hero {
  top: 0;
  padding: 3px 8px;
  border: 1px solid rgba(125, 211, 252, 0.7);
  background:
    radial-gradient(circle at top right, rgba(186, 230, 253, 0.2), transparent 30%),
    radial-gradient(circle at bottom left, rgba(219, 234, 254, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.98) 52%, rgba(233, 248, 255, 0.98) 100%);
  color: #102036;
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.09);
  align-items: center;
  gap: 4px;
}

body.taking-mode .test-hero > div:first-child {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 7px;
  min-width: 0;
}

.test-kicker {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

body.taking-mode .test-kicker {
  background: rgba(186, 230, 253, 0.28);
  color: #52708d;
  margin-bottom: 0;
  padding: 2px 7px;
  font-size: 8px;
  order: 1;
}

.test-hero h2 {
  font-size: 34px;
  margin-bottom: 8px;
}

body.taking-mode .test-hero h2 {
  font-size: clamp(14px, 1.2vw, 19px);
  margin: 0;
  line-height: 1.15;
  order: 2;
}

.test-hero .muted {
  color: rgba(255, 255, 255, 0.74);
}

body.taking-mode .test-hero .muted {
  color: #6a8097;
  margin: 0;
  font-size: 9px;
  white-space: nowrap;
  order: 3;
}

.test-timer-card {
  min-width: 220px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  align-content: center;
  gap: 8px;
}

body.taking-mode .test-timer-card {
  min-width: 182px;
  max-width: 182px;
  padding: 6px 12px;
  background: linear-gradient(180deg, #ffe9ec 0%, #ffd2d9 100%);
  border: 1px solid rgba(239, 68, 68, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 14px 28px rgba(239, 68, 68, 0.18);
  align-self: center;
  gap: 2px;
}

body.taking-mode .test-timer-value {
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #7f1d1d;
}

body.taking-mode .test-timer-label,
body.taking-mode .test-timer-meta {
  font-size: 10px;
  color: #b91c1c;
}

.test-timer-card.warning {
  background: rgba(217, 119, 6, 0.16);
}

.test-timer-card.danger {
  background: rgba(220, 38, 38, 0.18);
}

.test-timer-label,
.test-timer-meta {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
}

.test-timer-value {
  font-size: 34px;
  font-weight: 900;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.05em;
}

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

body.taking-mode .taking-layout {
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 10px;
  align-items: stretch;
}

.taking-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 22px;
}

body.taking-mode .taking-sidebar {
  top: 0;
}

body.taking-mode .taking-main-panel,
body.taking-mode .taking-side-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 244, 0.98));
  border: 1px solid rgba(74, 222, 128, 0.48);
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.07);
  backdrop-filter: blur(18px);
}

body.taking-mode .taking-side-panel .panel-head {
  border-bottom-color: rgba(96, 165, 250, 0.52);
}

body.taking-mode .taking-side-panel .panel-head h3,
body.taking-mode .taking-side-panel strong,
body.taking-mode .question-index-title,
body.taking-mode .test-timer-value {
  color: #102036;
}

body.taking-mode .taking-side-panel .muted,
body.taking-mode .question-progress-card .muted {
  color: #5c6d82;
}

body.taking-mode .brand-signature {
  background: rgba(37, 99, 235, 0.06);
  color: #6b7f95;
  border: 1px solid rgba(96, 165, 250, 0.52);
  margin-top: 4px !important;
  padding: 3px 8px;
  font-size: 9px;
  white-space: nowrap;
  order: 4;
}

.question-progress-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  border: 1px solid #dbe6f1;
}

body.taking-mode .question-progress-card {
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
  border-color: rgba(74, 222, 128, 0.5);
  padding: 5px 8px;
  gap: 4px;
}

body.taking-mode .question-index-title {
  font-size: 12px;
}

body.taking-mode #questionProgressText {
  font-size: 9px;
}

body.taking-mode #answeredCountBadge,
body.taking-mode #remainingCountBadge {
  padding: 4px 7px;
  font-size: 8px;
}

body.taking-mode .question-progress-bar {
  height: 4px;
}

.question-index-title {
  font-size: 24px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

.question-progress-bar {
  height: 12px;
  border-radius: 999px;
  background: #e7eef6;
  overflow: hidden;
}

body.taking-mode .question-progress-bar {
  background: rgba(173, 216, 230, 0.34);
}

.question-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.25s ease;
}

.question-stage {
  min-height: 420px;
}

body.taking-mode .question-stage {
  min-height: 420px;
  padding: 12px;
  background: #ffffff;
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 14px 26px rgba(34, 197, 94, 0.05);
}

body.taking-mode .question-stage-pills {
  align-items: center;
  gap: 5px;
}

body.taking-mode .question-inline-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.56);
  background: rgba(255, 255, 255, 0.92);
  color: #163324;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

body.taking-mode .question-title-row {
  gap: 5px;
  margin-bottom: 3px;
}

body.taking-mode .question-title-row .badge,
body.taking-mode .question-title-row .question-inline-index {
  flex: 0 0 auto;
}

body.taking-mode .question-text-frame {
  margin-top: 5px;
  min-height: 180px;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid rgba(74, 222, 128, 0.56);
  background: linear-gradient(180deg, #ffffff 0%, #fbfffd 100%);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.05);
  display: grid;
  gap: 16px;
  align-content: start;
}

body.taking-mode #questionTextView {
  margin: 0;
  color: #000000;
  font-family: "Times New Roman", "Cambria", "Cambria Math", "Georgia", "Segoe UI Symbol", "Noto Serif", serif !important;
  font-size: clamp(21px, 1.45vw, 27px);
  font-weight: 400;
  line-height: 1.76;
  letter-spacing: 0.002em;
  text-align: justify;
  text-justify: inter-word;
  text-wrap: pretty;
}

body.taking-mode #questionImageView {
  display: grid;
  justify-items: center;
}

body.taking-mode .question-image-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 760px);
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #dbe6f1;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.taking-mode .question-image {
  display: block;
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
}

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

body.taking-mode .question-grid {
  gap: 6px;
}

.q-grid-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 2px solid #d8e1eb;
  background: #f8fbff;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

body.taking-mode .q-grid-btn {
  background: #ffffff;
  border-color: rgba(96, 165, 250, 0.66);
  color: #33506e;
  border-radius: 10px;
  font-size: 12px;
}

.q-grid-btn:hover {
  transform: translateY(-1px);
}

.q-grid-btn.current {
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
  border-color: #1e3a8a;
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(29, 78, 216, 0.18);
}

body.taking-mode .q-grid-btn.current {
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a) !important;
  border-color: #1e3a8a !important;
  color: #ffffff !important;
  box-shadow: 0 10px 18px rgba(29, 78, 216, 0.18) !important;
}

.q-grid-btn.answered {
  background: #dcfce7;
  border-color: #10b981;
  color: #047857;
}

body.taking-mode .q-grid-btn.answered {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #0f766e;
}

.q-grid-btn.marked:not(.current) {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #9a6700;
}

body.taking-mode .q-grid-btn.marked:not(.current) {
  background: rgba(250, 204, 21, 0.12);
  border-color: #facc15;
  color: #9a6700;
}

.q-grid-btn.unanswered {
  background: #fff7ed;
  border-color: #f59e0b;
  color: #b45309;
}

body.taking-mode .q-grid-btn.unanswered {
  background: #ffffff !important;
  border-color: #111827 !important;
  color: #111827 !important;
  box-shadow: none !important;
}

.legend-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

body.taking-mode .legend-item {
  color: #5c6d82;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.current {
  background: #2563eb;
}

.legend-dot.answered {
  background: #10b981;
}

.legend-dot.unanswered {
  background: #ffffff;
  border: 2px solid #111827;
}

.legend-dot.marked {
  background: #facc15;
}

.review-legend-current {
  color: #2563eb;
}

.review-legend-answered {
  color: #059669;
}

.review-legend-unanswered {
  color: #d97706;
}

.review-legend-marked {
  color: #b91c1c;
}

.review-legend-marked .legend-dot.marked {
  background: #b91c1c;
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

body.taking-mode .option-list {
  gap: 8px;
  margin-top: 10px;
}

.option-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 16px;
  border: 1px solid #d9e5f0;
  background: #f8fbff;
  padding: 14px;
  cursor: pointer;
}

body.taking-mode .option-item {
  min-height: 62px;
  padding: 13px 16px;
  border-color: rgba(96, 165, 250, 0.58);
  background: #ffffff;
  color: #102036;
  border-radius: 12px;
}

body.taking-mode .option-item:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.58);
  background: rgba(239, 246, 255, 0.96);
}

.option-item.selected {
  border-color: var(--brand-2);
  background: #edf4ff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.1);
}

body.taking-mode .option-item.selected {
  background: linear-gradient(180deg, rgba(6, 95, 70, 0.12), rgba(6, 78, 59, 0.08));
  border-color: #065f46;
  box-shadow: inset 0 0 0 1px rgba(6, 95, 70, 0.08);
}

body.taking-mode .option-item.selected .option-pill {
  background: #065f46;
  color: #ffffff;
}

.option-item.correct {
  border-color: var(--success);
  background: #ecfdf5;
}

.option-item.wrong {
  border-color: var(--danger);
  background: #fef2f2;
}

.option-pill {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #dbeafe;
  color: var(--brand-2);
  font-weight: 900;
}

body.taking-mode .option-pill {
  background: #dbeafe;
  color: #2563eb;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 18px;
}

body.taking-mode .taking-actionbar {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

body.taking-mode .taking-actionbar .btn {
  min-height: 36px;
  border-radius: 12px;
  padding: 8px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  line-height: 1;
  min-width: 150px;
}

body.taking-mode #prevQuestionBtn,
body.taking-mode #nextQuestionBtn {
  min-width: 230px;
}

body.taking-mode #markQuestionBtn {
  min-width: 190px;
  background: linear-gradient(135deg, #7f1d1d, #b91c1c);
  color: #fff;
  box-shadow: 0 14px 24px rgba(185, 28, 28, 0.18);
}

body.taking-mode #markQuestionBtn:hover {
  box-shadow: 0 18px 28px rgba(185, 28, 28, 0.22);
}

body.taking-mode #submitTestBtn {
  min-width: 190px;
  background: linear-gradient(135deg, #14532d, #166534);
  color: #fff;
  box-shadow: 0 14px 24px rgba(22, 101, 52, 0.18);
}

body.taking-mode #submitTestBtn:hover {
  box-shadow: 0 18px 28px rgba(22, 101, 52, 0.22);
}

body.taking-mode .option-item > div:last-child {
  font-size: 21px;
  line-height: 1.6;
}

body.taking-mode .option-copy {
  font-family: "Times New Roman", "Cambria", "Cambria Math", "Georgia", "Segoe UI Symbol", "Noto Serif", serif !important;
  color: #000000;
  font-weight: 500;
  letter-spacing: 0.003em;
  font-size: 18px;
  line-height: 1.55;
  text-align: justify;
  text-justify: inter-word;
  text-wrap: pretty;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.review-hero + .result-grid {
  margin-top: 16px;
}

.result-box {
  border-radius: 18px;
  padding: 18px;
  color: #fff;
}

.result-box strong {
  display: block;
  font-size: 30px;
  font-family: "Space Grotesk", sans-serif;
}

.result-box.success {
  background: linear-gradient(135deg, #059669, #0f766e);
}

.result-box.info {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.result-box.warning {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.result-box.danger {
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
}

.review-modal-card .result-box.warning {
  background: #ffffff;
  border: 2px solid #111827;
  color: #111827;
  box-shadow: none;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}

.admin-user-top {
  align-items: start;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
  font-family: var(--font-ui);
  font-weight: 500;
}

.brand-signature {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-signature.light {
  background: #eef5ff;
  color: var(--brand-2);
  border: 1px solid #d8e6fb;
}

.text-right {
  text-align: right;
}

.tests-list-table {
  table-layout: fixed;
}

.tests-list-table th:nth-child(1),
.tests-list-table td:nth-child(1) {
  width: 16%;
}

.tests-list-table th:nth-child(2),
.tests-list-table td:nth-child(2) {
  width: 11%;
}

.tests-list-table th:nth-child(3),
.tests-list-table td:nth-child(3),
.tests-list-table th:nth-child(4),
.tests-list-table td:nth-child(4) {
  width: 8%;
}

.tests-list-table th:nth-child(5),
.tests-list-table td:nth-child(5) {
  width: 28%;
}

.tests-list-table th:nth-child(6),
.tests-list-table td:nth-child(6) {
  width: 11%;
}

.tests-list-table th:nth-child(7),
.tests-list-table td:nth-child(7) {
  width: 16%;
}

.test-token-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.test-token-cell .badge {
  white-space: nowrap;
}

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

.test-token-actions {
  justify-content: flex-start;
}

.test-row-actions {
  justify-content: flex-end;
}

.test-token-actions .btn,
.test-row-actions .btn {
  min-width: 64px;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 18px;
}

.test-status-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-status-cell .badge {
  white-space: nowrap;
}

.tests-list-table .text-right {
  text-align: right;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.result-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 17, 31, 0.68);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1200;
}

.review-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 17, 31, 0.62);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 20px);
  z-index: 1190;
}

.review-modal.show {
  display: flex;
}

.review-modal-card {
  width: min(920px, calc(100vw - clamp(16px, 4vw, 40px)));
  max-width: none;
  height: min(760px, calc(100dvh - clamp(16px, 4vw, 40px)));
  max-height: none;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(8, 17, 31, 0.26);
  animation: resultModalIn 0.28s ease;
}

.review-grid {
  grid-template-columns: repeat(auto-fit, minmax(clamp(35px, 4vw, 58px), 1fr));
  gap: 6px;
  align-content: start;
}

.review-modal-card .panel-head {
  padding: 16px 20px 10px;
}

.review-modal-card .panel-head h3 {
  font-size: 26px;
}

.review-modal-card .panel-head .muted {
  font-size: 13px;
}

.review-modal-card .panel-body {
  padding: 14px 20px 18px;
  gap: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
  overflow: hidden;
}

.review-modal-card .result-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.review-modal-card .result-box {
  border-radius: 14px;
  padding: 12px 14px;
}

.review-modal-card .result-box span {
  font-size: 12px;
}

.review-modal-card .result-box strong {
  font-size: 22px;
}

.review-modal-card .q-grid-btn {
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  border-width: 2px;
  font-size: clamp(12px, 0.85vw, 14px);
}

.review-grid-wrap {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.review-grid-wrap::-webkit-scrollbar {
  width: 8px;
}

.review-grid-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.review-modal-card .legend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 4px;
}

.review-modal-card .legend-item {
  font-size: 13px;
}

.review-modal-card .toolbar {
  gap: 10px;
}

.review-modal-card .btn {
  min-height: 46px;
  padding: 0 18px;
}

.review-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(135deg, #08111f 0%, #13305d 100%);
  box-shadow: 0 24px 56px rgba(8, 17, 31, 0.22);
}

.review-hero.passed {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 26%),
    linear-gradient(135deg, #064e3b 0%, #0f766e 100%);
}

.review-hero.failed {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 26%),
    linear-gradient(135deg, #3f0b12 0%, #7f1d1d 100%);
}

.review-kicker {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.review-meta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  font-size: 12px;
}

.review-summary-line {
  margin-top: 12px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
  font-weight: 700;
}

.review-score-orb {
  min-width: 168px;
  min-height: 168px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  border: 10px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
}

.review-score-orb strong {
  display: block;
  font-size: 46px;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1;
}

.review-score-orb span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.review-jump-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  border: 1px solid #dbe6f1;
}

.review-jump-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.review-jump-btn {
  width: 100%;
  min-height: 56px;
  border-radius: 12px;
  border: none;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
}

.review-jump-btn.correct {
  background: linear-gradient(135deg, #059669, #0f766e);
  color: #ffffff;
}

.review-jump-btn.wrong {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
}

.review-jump-btn.unanswered {
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  color: #ffffff;
}

.review-question-card {
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #dbe6f1;
  box-shadow: 0 18px 42px rgba(8, 17, 31, 0.08);
}

.review-question-card.flash {
  animation: reviewFlash 1.2s ease;
}

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

.review-answer-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.review-question-text {
  font-family: "Times New Roman", "Cambria", "Cambria Math", "Georgia", "Segoe UI Symbol", "Noto Serif", serif !important;
  font-size: 20px;
  line-height: 1.72;
  letter-spacing: 0.002em;
  margin-bottom: 18px;
}

.review-question-text strong {
  font-family: "Times New Roman", "Cambria", "Cambria Math", "Georgia", "Segoe UI Symbol", "Noto Serif", serif !important;
  color: #000000;
  font-weight: 400;
}

.review-image-frame {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    border: 1px solid #e4edf6;
  }

h1,
h2,
h3,
h4,
h5,
.auth-title,
.auth-title-compact,
.auth-clean-brand,
.panel-head h3,
.dashboard-hero-copy h2,
.stat-card .value,
.quick-admin-card h3,
.dashboard-hero-label,
.hero-mini-card strong,
.insight-label,
.monitor-label,
.focus-kicker,
.question-index-title,
.review-score-orb,
.result-ring-score,
.result-ring-label {
  font-family: var(--font-heading) !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

strong {
  font-family: inherit;
}

.brand,
.topbar-copy,
.topbar-date-card,
.topbar-user-avatar,
.muted,
.review-modal-card .panel-head .muted,
.test-hero .muted,
body.taking-mode .taking-side-panel .muted,
body.taking-mode .question-progress-card .muted {
  font-family: var(--font-ui);
}

.review-options {
  display: grid;
  gap: 10px;
}

.review-option {
  cursor: default;
}

.review-option-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.review-option-text {
  font-family: "Times New Roman", "Cambria", "Cambria Math", "Georgia", "Segoe UI Symbol", "Noto Serif", serif !important;
  color: #000000;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.58;
}

.review-explanation {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
  border: 1px solid #bbf7d0;
  color: #000000;
  font-family: "Times New Roman", "Cambria", "Cambria Math", "Georgia", "Segoe UI Symbol", "Noto Serif", serif !important;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  letter-spacing: 0.002em;
  text-align: justify;
  text-justify: inter-word;
  text-wrap: pretty;
}

.review-explanation strong {
  font-family: "Times New Roman", "Cambria", "Cambria Math", "Georgia", "Segoe UI Symbol", "Noto Serif", serif !important;
  color: #000000;
  font-weight: 700;
}

@keyframes reviewFlash {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.24); }
  35% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0.14); }
  100% { box-shadow: 0 18px 42px rgba(8, 17, 31, 0.08); }
}

.result-modal.show {
  display: flex;
}

.result-modal-card {
  width: 100%;
  max-width: 640px;
  border-radius: 34px;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.42), transparent 30%),
    linear-gradient(180deg, #ffffff, #f5f9ff);
  box-shadow: 0 34px 90px rgba(8, 17, 31, 0.28);
  animation: resultModalIn 0.38s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-modal-card > * {
  position: relative;
  z-index: 1;
}

.result-modal-card.passed {
  border-top: 10px solid #059669;
}

.result-modal-card.failed {
  border-top: 10px solid #dc2626;
}

.result-modal-card.oliy {
  border-top: 10px solid #2563eb;
}

.result-modal-card.gold {
  border-top: 10px solid #facc15;
}

.result-modal-card.orange {
  border-top: 10px solid #fb923c;
}

.result-modal-card.fail {
  border-top: 10px solid #dc2626;
}

.result-modal-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.result-ring {
  width: 156px;
  height: 156px;
  margin: 18px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 10px solid #2563eb;
  background: radial-gradient(circle, #ffffff 0%, #eef5ff 100%);
}

.result-ring.passed {
  border-color: #059669;
  background: radial-gradient(circle, #ffffff 0%, #ecfdf5 100%);
}

.result-ring.failed {
  border-color: #dc2626;
  background: radial-gradient(circle, #ffffff 0%, #fef2f2 100%);
}

.result-ring.oliy {
  border-color: #2563eb;
  background: radial-gradient(circle, #ffffff 0%, #eff6ff 100%);
}

.result-ring.gold {
  border-color: #facc15;
  background: radial-gradient(circle, #fffdf4 0%, #fef9c3 100%);
}

.result-ring.orange {
  border-color: #fb923c;
  background: radial-gradient(circle, #fff7ed 0%, #ffedd5 100%);
}

.result-ring.fail {
  border-color: #dc2626;
  background: radial-gradient(circle, #ffffff 0%, #fef2f2 100%);
}

.result-ring-score {
  font-size: 36px;
  font-weight: 1000;
  font-family: "Space Grotesk", sans-serif;
}

.result-ring-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
}

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

.result-mini-card {
  padding: 13px;
  border-radius: 16px;
  color: #fff;
}

.result-mini-card-wide {
  grid-column: 2 / span 2;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  padding-top: 10px;
  padding-bottom: 10px;
}

.result-mini-card span {
  display: block;
  font-size: 11px;
  opacity: 0.82;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
}

.result-mini-card-wide span {
  line-height: 1.35;
  margin-bottom: 2px;
}

.result-mini-card-wide strong {
  margin-top: 4px;
}

.result-mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  font-weight: 1000;
  font-family: "Space Grotesk", sans-serif;
}

.result-mini-card.success {
  background: linear-gradient(135deg, #059669, #0f766e);
}

.result-mini-card.warning {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.result-mini-card.danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.result-mini-card.info {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.result-mini-card.gold {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #3a2500;
}

.result-modal-card .toolbar .btn {
  min-width: 190px;
  padding-left: 26px;
  padding-right: 26px;
}

.result-modal-note {
  margin: 10px auto 18px;
  max-width: 520px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.result-celebration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.result-celebration-piece {
  position: absolute;
  top: -22px;
  width: 12px;
  height: 18px;
  opacity: 0;
  animation: celebrationBurst 2.9s ease-out forwards;
  will-change: transform, opacity;
}

.result-celebration-piece.rect {
  border-radius: 4px;
}

.result-celebration-piece.tri {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 16px solid currentColor;
  background: transparent !important;
}

@keyframes celebrationBurst {
  0% {
    opacity: 0;
    transform: translate3d(var(--x-start, 0), -20px, 0) rotate(0deg) scale(0.8);
  }
  8% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--x-end, 0), var(--y-end, 320px), 0) rotate(var(--rotate-end, 360deg)) scale(1);
  }
}

@keyframes resultModalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

canvas {
  width: 100% !important;
  max-height: 320px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .auth-layout,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    width: min(1200px, calc(100vw - 24px));
  }

  .auth-showcase,
  .auth-card-premium {
    min-height: auto;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .grid-2,
  .grid-3,
  .quick-admin-grid,
  .split,
  .admin-workspace,
  .creator-top-grid,
  .creator-time-grid,
  .taking-layout,
  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .taking-sidebar {
    position: static;
  }

  .admin-sidepanel {
    position: static;
  }

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

@media (max-width: 900px) {
  .auth-showcase-grid,
  .auth-metric-row,
  .auth-inline-features,
  .monitor-grid {
    grid-template-columns: 1fr;
  }

  .taking-sidebar {
    display: none;
  }

  .sidebar {
    padding: 14px 14px 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .brand {
    margin-bottom: 12px;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    gap: 12px;
    margin-bottom: 14px;
  }

  .topbar > .panel {
    width: 100%;
  }

  .subject-card-head,
  .folder-card .toolbar,
  .test-card .toolbar {
    display: grid;
    gap: 10px;
    align-items: start;
  }

  .catalog-test-inline {
    display: grid;
    gap: 6px;
  }

  .catalog-test-inline strong,
  .catalog-test-inline .muted,
  .catalog-test-inline .badge {
    white-space: normal;
  }

  .test-card .btn,
  .folder-card .btn {
    width: 100%;
    justify-content: center;
  }

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

  body.taking-mode .taking-sidebar {
    display: grid;
  }

  body.taking-mode .section[data-section="taking"].active {
    padding: 12px;
  }

  body.taking-mode .test-shell {
    min-height: calc(100vh - 24px);
    padding: 12px;
    border-radius: 24px;
  }

  body.taking-mode .taking-layout {
    grid-template-columns: 1fr;
  }

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

  .review-jump-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 12px 12px 8px;
  }

  .brand {
    gap: 10px;
    margin-bottom: 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .brand h3 {
    font-size: 16px;
  }

  .brand p,
  .brand-channel {
    font-size: 11px;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .nav button {
    width: auto;
    min-width: max-content;
    white-space: nowrap;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
  }

  .nav button.active,
  .nav button:hover {
    transform: none;
  }

  .main {
    padding: 12px;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .topbar-copy h1 {
    min-height: auto;
    padding: 8px 12px;
    font-size: 18px;
  }

  .topbar p {
    margin-top: 6px;
    font-size: 13px;
  }

  .panel-head {
    padding: 12px 14px;
  }

  .panel-body {
    padding: 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 12px;
    border-radius: 16px;
  }

  .stat-card .value {
    font-size: 24px;
  }

  .grid-2 {
    gap: 12px;
  }

  .ranking-row {
    grid-template-columns: 54px minmax(0, 1fr) 70px;
    gap: 10px;
    padding: 12px;
  }

  .ranking-score {
    font-size: 22px;
  }

  .auth-shell {
    padding: 16px;
  }

  .auth-shell-single .auth-layout {
    width: min(100%, calc(100vw - 32px));
  }

  .auth-shell-single .auth-card-premium {
    padding: 28px 24px;
    min-height: auto;
  }

  .auth-card-premium {
    border-radius: 28px;
  }

  #studentDailyChart,
  #studentSubjectChart {
    max-height: 220px;
  }

  body.taking-mode .test-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  body.taking-mode .test-timer-card {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    justify-items: center;
    text-align: center;
  }

  body.taking-mode .question-stage {
    min-height: 320px;
    padding: 12px;
  }

  body.taking-mode #questionTextView {
    font-size: 20px;
    line-height: 1.4;
  }

  body.taking-mode .question-text-frame {
    min-height: 130px;
    padding: 12px 14px;
  }

  body.taking-mode .question-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(48px, 48px);
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  body.taking-mode .legend-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-top: 10px;
  }

  body.taking-mode .legend-item {
    font-size: 12px;
  }

  body.taking-mode .option-list {
    gap: 10px;
  }

  body.taking-mode .option-item {
    min-height: 58px;
    padding: 12px 14px;
    gap: 10px;
  }

  body.taking-mode .option-pill {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  body.taking-mode .option-item > div:last-child {
    font-size: 18px;
    line-height: 1.4;
  }

  body.taking-mode .taking-actionbar {
    position: sticky;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    margin-top: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(96, 165, 250, 0.24);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
  }

  body.taking-mode .taking-actionbar .btn,
  body.taking-mode #prevQuestionBtn,
  body.taking-mode #nextQuestionBtn,
  body.taking-mode #markQuestionBtn,
  body.taking-mode #submitTestBtn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  body.taking-mode #closeTestViewBtn,
  body.taking-mode #markQuestionBtn {
    grid-column: span 2;
  }

  .auth-premium-orb.orb-a {
    width: 140px;
    height: 140px;
  }

  .auth-premium-orb.orb-c,
  .auth-premium-line.line-b,
  .auth-premium-spark.spark-e {
    display: none;
  }

  .auth-showcase,
  .auth-card-premium {
    min-height: auto;
    padding: 24px;
  }

  .auth-title,
  .dashboard-hero h2 {
    font-size: 28px;
  }

  .auth-form-title {
    font-size: 32px;
  }

  .auth-subtitle,
  .auth-form-note {
    font-size: 15px;
  }

  .auth-panel-top,
  .topbar,
  .topbar-meta {
    display: grid;
  }

  .test-hero {
    display: grid;
    position: static;
  }

  .test-timer-card {
    min-width: 0;
  }

  .result-ring {
    width: 150px;
    height: 150px;
  }

  .result-ring-score {
    font-size: 34px;
  }

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

  .review-hero {
    display: grid;
  }

  .review-score-orb {
    min-width: 0;
    min-height: 160px;
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }

  .review-jump-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .review-question-top {
    display: grid;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 10px;
  }

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

  .ranking-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .ranking-score {
    grid-column: 2;
    text-align: left;
    font-size: 20px;
  }

  .topbar-copy h1 {
    font-size: 17px;
  }

  .topbar > .panel {
    padding: 12px 14px !important;
  }

  .auth-shell {
    padding: 12px;
  }

  .auth-shell-single .auth-layout {
    width: min(100%, calc(100vw - 20px));
  }

  .auth-shell-single .auth-card-premium {
    padding: 22px 16px;
  }

  .auth-form-title {
    font-size: 26px;
  }

  .auth-subtitle,
  .auth-form-note {
    font-size: 13px;
  }

  .auth-card-premium .field input,
  .auth-card-premium .field select,
  .auth-card-premium .field textarea {
    min-height: 52px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .catalog,
  .folder-stack,
  .test-stack {
    gap: 8px;
  }

  .subject-card-head,
  .folder-stack,
  .test-stack {
    padding-left: 12px;
    padding-right: 12px;
  }

  .subject-card-head {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .test-card,
  .folder-card {
    padding: 12px;
  }

  body.taking-mode .section[data-section="taking"].active {
    padding: 6px;
  }

  body.taking-mode .test-shell {
    min-height: calc(100vh - 12px);
    padding: 6px;
    border-radius: 18px;
  }

  body.taking-mode .test-kicker,
  body.taking-mode .brand-signature {
    display: none;
  }

  body.taking-mode .test-hero > div:first-child {
    display: grid;
    gap: 4px;
  }

  body.taking-mode .test-hero h2 {
    font-size: 15px;
    line-height: 1.2;
  }

  body.taking-mode .test-hero .muted {
    font-size: 10px;
    white-space: normal;
  }

  body.taking-mode .test-timer-card {
    padding: 8px 10px;
    border-radius: 16px;
  }

  body.taking-mode .test-timer-value {
    font-size: 22px;
  }

  body.taking-mode .test-timer-label,
  body.taking-mode .test-timer-meta {
    font-size: 11px;
  }

  body.taking-mode .question-stage {
    min-height: 260px;
    padding: 10px;
  }

  body.taking-mode .question-title-row {
    display: flex;
    flex-wrap: wrap;
  }

  body.taking-mode .question-inline-index,
  body.taking-mode .question-title-row .badge {
    min-height: 26px;
    font-size: 11px;
  }

  body.taking-mode .question-text-frame {
    min-height: 110px;
    padding: 10px 12px;
    border-radius: 14px;
  }

  body.taking-mode #questionTextView {
    font-size: 18px;
  }

  body.taking-mode .option-item {
    min-height: 54px;
    padding: 11px 12px;
    border-radius: 10px;
  }

  body.taking-mode .option-pill {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  body.taking-mode .option-item > div:last-child {
    font-size: 16px;
  }

  body.taking-mode .taking-side-panel .panel-head {
    padding: 10px 12px;
  }

  body.taking-mode .taking-side-panel .panel-body {
    padding: 10px 12px;
  }

  body.taking-mode .legend-grid {
    grid-template-columns: 1fr;
  }

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

  .review-jump-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .sidebar {
    padding: 10px 10px 6px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .brand h3 {
    font-size: 15px;
  }

  .nav {
    gap: 6px;
  }

  .nav button {
    padding: 9px 11px;
    font-size: 13px;
  }

  .topbar-copy h1 {
    font-size: 16px;
    padding: 7px 10px;
  }

  body.taking-mode .taking-actionbar {
    grid-template-columns: 1fr;
  }

  body.taking-mode #closeTestViewBtn,
  body.taking-mode #markQuestionBtn {
    grid-column: auto;
  }

  body.taking-mode .taking-actionbar .btn,
  body.taking-mode #prevQuestionBtn,
  body.taking-mode #nextQuestionBtn,
  body.taking-mode #markQuestionBtn,
  body.taking-mode #submitTestBtn {
    min-height: 42px;
    font-size: 13px;
  }

  body.taking-mode #questionTextView {
    font-size: 17px;
  }

  body.taking-mode .option-item > div:last-child {
    font-size: 15px;
  }
}
