:root {
  color-scheme: light;
  --bg: #f7f8ff;
  --bg-2: #eef6ff;
  --ink: #111827;
  --muted: #667085;
  --soft: rgba(255, 255, 255, 0.76);
  --line: rgba(17, 24, 39, 0.1);
  --brand: #7c3aed;
  --brand-2: #06b6d4;
  --brand-3: #f97316;
  --good: #059669;
  --bad: #dc2626;
  --warn: #d97706;
  --shadow: 0 24px 80px rgba(31, 41, 55, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 12%, rgba(124, 58, 237, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 6%, rgba(6, 182, 212, 0.18), transparent 24rem),
    radial-gradient(circle at 48% 94%, rgba(249, 115, 22, 0.16), transparent 28rem),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--ink);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.24;
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
}
body::before { background: #8b5cf6; left: -12rem; top: 12rem; }
body::after { background: #22d3ee; right: -13rem; bottom: 2rem; animation-delay: -7s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4rem, -3rem, 0) scale(1.15); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(124, 58, 237, 0.0); }
  50% { box-shadow: 0 0 36px rgba(124, 58, 237, 0.22); }
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; }
a { color: inherit; text-decoration: none; }
textarea { resize: vertical; }

.app-shell { min-height: 100vh; }
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  text-align: center;
}
.boot-screen h1 { margin: 0; font-size: clamp(2rem, 6vw, 4rem); }
.boot-screen p { margin: 0; color: var(--muted); }
.loader-orb {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: conic-gradient(from 120deg, var(--brand), var(--brand-2), var(--brand-3), var(--brand));
  animation: spin 1.1s linear infinite, pulseGlow 2s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}
.navbar {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  margin: 0.75rem auto 0;
  width: min(1180px, calc(100% - 1.5rem));
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.8rem 0.65rem 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}
.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--brand-3));
  display: grid;
  place-items: center;
  color: white;
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.25);
}
.nav-links { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a, .nav-links button {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  color: #344054;
  background: transparent;
  font-weight: 750;
  transition: 0.18s ease;
}
.nav-links a:hover, .nav-links button:hover, .nav-links .active {
  background: rgba(124, 58, 237, 0.1);
  color: var(--brand);
}
.nav-user { color: var(--muted); font-size: 0.9rem; padding: 0 0.6rem; }

.hero {
  padding: 5.5rem 0 4rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
.hero-card, .card, .panel, .stat-card, .note-card, .record-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.hero-copy { animation: fadeUp 0.65s ease both; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand);
  font-weight: 900;
  background: rgba(124, 58, 237, 0.1);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2.7rem, 7vw, 6.6rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  margin: 1.3rem 0 1rem;
}
.gradient-text {
  background: linear-gradient(120deg, var(--brand), var(--brand-2), var(--brand-3));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.hero p { color: var(--muted); font-size: 1.08rem; line-height: 1.8; max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.86rem 1.1rem;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.26);
}
.btn-secondary { background: white; color: var(--ink); border-color: var(--line); }
.btn-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-small { padding: 0.55rem 0.75rem; font-size: 0.9rem; }
.hero-visual { position: relative; min-height: 430px; animation: fadeUp 0.8s ease 0.12s both; }
.floating-card {
  position: absolute;
  border-radius: 28px;
  padding: 1.2rem;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.14);
  animation: floaty 5s ease-in-out infinite;
}
.floating-card h3 { margin: 0 0 0.4rem; }
.floating-card p { margin: 0; color: var(--muted); }
.floating-card.one { width: 72%; left: 3%; top: 8%; }
.floating-card.two { width: 62%; right: 0; top: 42%; animation-delay: -1.5s; }
.floating-card.three { width: 58%; left: 8%; bottom: 2%; animation-delay: -3s; }
.spark-line {
  position: relative;
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  margin-top: 0.9rem;
}
.spark-line span {
  position: absolute;
  inset: 0;
  width: 62%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.section { padding: 2.5rem 0; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-title h2, .page-title h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 3.4rem); letter-spacing: -0.06em; }
.section-title p, .page-title p { color: var(--muted); margin: 0.35rem 0 0; line-height: 1.7; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .panel, .stat-card, .note-card, .record-card { padding: 1.2rem; animation: fadeUp 0.45s ease both; }
.card:hover, .note-card:hover, .record-card:hover { transform: translateY(-3px); transition: 0.18s ease; }
.card h3, .panel h3, .note-card h3 { margin: 0 0 0.5rem; }
.card p, .panel p, .note-card p, .record-card p { color: var(--muted); line-height: 1.65; }
.subject-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
}
.subject-card::before {
  content: "";
  position: absolute;
  inset: -70% -45% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: var(--accent, linear-gradient(135deg, var(--brand), var(--brand-2)));
  opacity: 0.22;
}
.big-icon { font-size: 2.3rem; margin-bottom: 0.8rem; }

.page { padding: 2rem 0 4rem; }
.page-title { margin: 2rem 0 1.5rem; }
.dashboard-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: stretch;
}
.panel.highlight {
  color: white;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(6, 182, 212, 0.95));
  position: relative;
  overflow: hidden;
}
.panel.highlight::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.16) 45%, transparent 62%);
  animation: shimmer 4s ease-in-out infinite;
}
.panel.highlight p { color: rgba(255,255,255,0.82); }
.stat-card strong { display: block; font-size: 2rem; letter-spacing: -0.05em; }
.stat-card span { color: var(--muted); font-weight: 750; }

.form-card {
  width: min(520px, calc(100% - 2rem));
  margin: 3rem auto;
  padding: 1.25rem;
}
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; background: rgba(17, 24, 39, 0.05); border-radius: 999px; padding: 0.3rem; }
.tabs button, .tabs a { flex: 1; padding: 0.75rem 0.85rem; border-radius: 999px; background: transparent; text-align: center; text-decoration: none; border: 0; display: block; font-weight: 900; color: var(--muted); }
.tabs button.active, .tabs a.active { background: white; color: var(--brand); box-shadow: 0 12px 30px rgba(15,23,42,0.08); }
.form { display: grid; gap: 0.85rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 850; color: #344054; font-size: 0.92rem; }
.input, input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.86);
  color: var(--ink);
  border-radius: 16px;
  padding: 0.86rem 0.95rem;
  outline: none;
  transition: 0.18s ease;
}
textarea { min-height: 130px; }
input:focus, textarea:focus, select:focus { border-color: rgba(124, 58, 237, 0.45); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12); }
.helper { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.alert {
  border-radius: 18px;
  padding: 0.85rem 1rem;
  background: rgba(124, 58, 237, 0.1);
  color: #4c1d95;
  border: 1px solid rgba(124, 58, 237, 0.18);
  line-height: 1.55;
}
.alert.good { background: rgba(5, 150, 105, 0.1); color: #065f46; border-color: rgba(5,150,105,0.18); }
.alert.bad { background: rgba(220, 38, 38, 0.1); color: #991b1b; border-color: rgba(220,38,38,0.2); }
.alert.warn { background: rgba(217, 119, 6, 0.1); color: #92400e; border-color: rgba(217,119,6,0.2); }

.table-wrap { overflow-x: auto; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,0.7); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: #344054; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.06em; background: rgba(17,24,39,0.03); }
td { color: #475467; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  background: rgba(124, 58, 237, 0.1);
  color: var(--brand);
  font-weight: 850;
  font-size: 0.82rem;
}
.badge.good { background: rgba(5,150,105,0.1); color: var(--good); }
.badge.warn { background: rgba(217,119,6,0.1); color: var(--warn); }
.badge.bad { background: rgba(220,38,38,0.1); color: var(--bad); }

.note-card { position: relative; overflow: hidden; }
.note-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
}
.note-body { white-space: pre-wrap; color: #475467; line-height: 1.75; }
.controls { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar > * { flex: 1 1 190px; }

.mcq-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.68);
  margin-top: 0.6rem;
  transition: 0.18s ease;
}
.mcq-option:hover { transform: translateX(3px); border-color: rgba(124,58,237,0.35); }
.mcq-option input { width: auto; margin-top: 0.25rem; }
.progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(17,24,39,0.07);
  overflow: hidden;
}
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

.empty-state {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(124,58,237,0.28);
  background: rgba(255,255,255,0.55);
  color: var(--muted);
}
.footer { color: var(--muted); padding: 2rem 0 3rem; text-align: center; }

.hide { display: none !important; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1rem; align-items: start; }
.muted { color: var(--muted); }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(17, 24, 39, 0.07);
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .hero, .dashboard-hero, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
  .hero-visual { min-height: 350px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .navbar { align-items: flex-start; border-radius: 28px; flex-direction: column; gap: 0.7rem; }
  .nav-links { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .container { width: min(100% - 1rem, 1180px); }
  .hero h1 { font-size: 3rem; }
  .hero-visual { min-height: 300px; }
  .floating-card { position: relative; width: auto !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; margin-bottom: 0.75rem; }
  .navbar { width: calc(100% - 0.75rem); top: 0.4rem; }
  .nav-links a, .nav-links button { padding: 0.55rem 0.65rem; }
}

/* v3: clearer page switching and faster perceived navigation */
.route-loading { padding-top: 3rem; }
.loading-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 220px;
  animation: fadeUp 0.25s ease both;
}
.loader-orb.small {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}
.nav-links a.active {
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.12);
}
@media (max-width: 640px) {
  .loading-panel { align-items: flex-start; flex-direction: column; }
}

/* v4: prevent stuck-looking buttons */
button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none !important;
}

/* Speed tuning: keep the design colorful, but avoid heavy repaint work on slower laptops. */
#app { min-height: 100vh; }
.card, .panel, .stat-card, .note-card, .record-card { contain: content; }
.route-loading .loading-panel { animation: none; }
button[disabled] { opacity: 0.72; cursor: wait; }
@media (max-width: 900px) {
  body::before, body::after { animation: none; filter: blur(28px); opacity: 0.18; }
  .floating-card { animation-duration: 8s; }
  .hero-card, .card, .panel, .stat-card, .note-card, .record-card { backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Final performance fix: page shells and skeletons show immediately, so tab switching never looks frozen. */
.skeleton-card {
  min-height: 150px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background:
    linear-gradient(90deg, rgba(255,255,255,.48), rgba(255,255,255,.9), rgba(255,255,255,.48)),
    rgba(255,255,255,.5);
  background-size: 220% 100%;
  box-shadow: var(--shadow);
  animation: skeletonShift 1.25s ease-in-out infinite;
}
@keyframes skeletonShift {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
.toolbar {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.toolbar input { flex: 1 1 260px; }
@media (prefers-reduced-motion: reduce) {
  .skeleton-card { animation: none; }
}

/* Phone-number update */
.required {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}
.soft-divider {
  border: 0;
  height: 1px;
  background: rgba(15, 23, 42, 0.12);
  margin: 1.25rem 0;
}
td a[href^="tel:"] {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

/* Good website feature update: footer, public pages, pricing and messages */
.footer {
  margin: 3rem auto 1.5rem;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.footer-grid p { margin: .35rem 0 0; color: var(--muted); max-width: 58ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: flex-end; }
.footer-links a {
  padding: .55rem .75rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, .08);
  color: var(--brand);
  font-weight: 800;
}
.policy-page { line-height: 1.85; }
.policy-page h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: .95; margin: 1rem 0; letter-spacing: -.06em; }
.policy-page h3 { margin-top: 1.5rem; }
.faq-card p, .contact-aside p { color: var(--muted); line-height: 1.7; }
.check-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .65rem; }
.check-list li {
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  font-weight: 750;
}
.check-list li::before { content: "✓"; color: var(--good); font-weight: 900; margin-right: .5rem; }
.pricing-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.3rem;
  display: grid;
  gap: .85rem;
  align-content: start;
}
.pricing-card.featured { outline: 3px solid rgba(124,58,237,.16); transform: translateY(-4px); }
.pricing-card strong { font-size: 1.35rem; }
.between { display: flex; justify-content: space-between; gap: .75rem; align-items: center; flex-wrap: wrap; }
.message-card .note-body { border-left: 4px solid rgba(124,58,237,.24); padding-left: 1rem; }
.required { color: var(--bad); font-weight: 900; font-size: .84em; }
.soft-divider { border: none; border-top: 1px solid var(--line); margin: 1.4rem 0; }
@media (max-width: 760px) {
  .footer-links { justify-content: flex-start; }
  .pricing-card.featured { transform: none; }
}


/* Question bank and handwritten answer upload polish */
.question-practice-card h3 { line-height: 1.45; }
input[type="file"] { width: 100%; border: 1px dashed rgba(124,58,237,.35); background: rgba(255,255,255,.75); border-radius: 18px; padding: 1rem; }
.note-body + .btn, .record-card .btn { margin-top: .4rem; }

/* Teacher question bank manager */
.option-list {
  margin: .85rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.65;
}
.option-list li { margin: .2rem 0; }
.record-card[data-question-row] h3 { line-height: 1.45; }

/* Profile and account upgrade */
.nav-avatar { padding: 0 !important; background: transparent !important; }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--brand-3));
  color: #fff;
  font-weight: 950;
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.22);
  border: 2px solid rgba(255,255,255,0.75);
  vertical-align: middle;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xs { width: 34px; height: 34px; font-size: 0.76rem; }
.avatar-sm { width: 46px; height: 46px; font-size: 0.9rem; }
.avatar-md { width: 64px; height: 64px; font-size: 1.1rem; }
.avatar-lg { width: 82px; height: 82px; font-size: 1.35rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2rem; }
.avatar-fallback { text-transform: uppercase; letter-spacing: -0.05em; }
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 1.4rem;
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(14,165,233,0.10), rgba(45,212,191,0.12));
}
.profile-hero-body { flex: 1; min-width: 0; }
.profile-hero h2 { margin-bottom: 0.25rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.7rem 0; }
.profile-progress {
  height: 10px;
  background: rgba(17,24,39,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.65rem 0 0.25rem;
}
.profile-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  border-radius: inherit;
  min-width: 6%;
}
.wide-card { width: 100%; margin: 0; }
.student-cell { display: flex; gap: 0.75rem; align-items: flex-start; min-width: 220px; }
.mini-bio { margin: 0.25rem 0 0; max-width: 260px; }
.profile-welcome { display: flex; gap: 1rem; align-items: center; }
.light-helper { color: rgba(255,255,255,0.82); }
.feature-list { display: grid; gap: 0.65rem; }
.feature-list p {
  margin: 0;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.6);
}
.required { color: var(--bad); font-weight: 900; }
@media (max-width: 720px) {
  .profile-hero, .profile-welcome { align-items: flex-start; flex-direction: column; }
  .avatar-xl { width: 92px; height: 92px; }
  .student-cell { min-width: 180px; }
}

/* MCQ pause/test upgrade */
.mcq-test-form { gap: 1.25rem; }
.mcq-sticky-tools {
  position: sticky;
  top: 0.75rem;
  z-index: 5;
  display: grid;
  gap: 0.8rem;
  backdrop-filter: blur(16px);
  border-color: rgba(124, 58, 237, 0.2);
}
.mcq-card { border-left: 5px solid rgba(124, 58, 237, 0.45); }
.dont-know-option { background: rgba(251, 191, 36, 0.12); }
.dont-know-option:has(input:checked) { border-color: rgba(245, 158, 11, 0.65); background: rgba(251, 191, 36, 0.2); }
@supports not selector(:has(*)) {
  .dont-know-option { border-color: rgba(245, 158, 11, 0.35); }
}
@media (max-width: 720px) {
  .mcq-sticky-tools { position: static; }
}

/* Result + chapter-test subjective upgrade */
.result-hero { position: relative; overflow: hidden; }
.result-score { display: flex; gap: 1rem; align-items: baseline; margin-top: 1rem; }
.result-score strong { font-size: clamp(2.2rem, 8vw, 4.5rem); line-height: 1; }
.result-score span { font-size: 1.35rem; font-weight: 800; opacity: .9; }
.result-review-card.correct { border-color: rgba(22, 163, 74, .26); }
.result-review-card.wrong { border-color: rgba(239, 68, 68, .28); }
.subjective-test-card textarea { min-height: 150px; }
.subjective-test-card .dont-know-option { border-style: dashed; }
@media print {
  .navbar, .actions, .btn { display: none !important; }
  .panel, .record-card, .note-card { break-inside: avoid; box-shadow: none; }
}

/* Stream expansion upgrade */
.stream-picker {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.18);
}
.stream-picker::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -60px;
  top: -70px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(14,165,233,.22), transparent 65%);
  pointer-events: none;
}
.stream-block {
  scroll-margin-top: 96px;
  margin-top: 2rem;
}
.subject-card .badge-row {
  justify-content: flex-start;
  margin-bottom: .35rem;
}
.subject-card {
  min-height: 230px;
}
.subject-card:hover .big-icon {
  transform: translateY(-4px) rotate(-3deg) scale(1.04);
}
.subject-card .big-icon {
  transition: transform .24s ease;
}
@media (max-width: 720px) {
  .stream-picker .actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Teacher upload center: stream -> subject -> chapter flow */
.workspace-breadcrumb {
  display: flex;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
  margin: .25rem 0 1.1rem;
  font-weight: 900;
  color: var(--muted);
}
.workspace-breadcrumb a,
.workspace-breadcrumb span:not(.sep) {
  padding: .55rem .85rem;
  border: 1px solid rgba(124, 58, 237, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .74);
  text-decoration: none;
  color: inherit;
}
.workspace-breadcrumb a:hover { color: #6d28d9; transform: translateY(-1px); }
.workspace-breadcrumb .sep { opacity: .55; }
.workspace-guide .steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
}
.workspace-guide .steps span {
  padding: .8rem;
  border-radius: 18px;
  background: rgba(124, 58, 237, .10);
  border: 1px solid rgba(124, 58, 237, .18);
  font-weight: 900;
  text-align: center;
}
.workspace-step-card {
  position: relative;
  overflow: hidden;
  border-top: 6px solid rgba(124, 58, 237, .22);
}
.workspace-step-card::before {
  content: "";
  position: absolute;
  inset: auto -35px -55px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: var(--stream-accent, linear-gradient(135deg,#7c3aed,#06b6d4));
  opacity: .16;
  pointer-events: none;
}
.workspace-step-card:hover {
  transform: translateY(-5px);
}
.workspace-upload-panel {
  border-left: 5px solid rgba(124, 58, 237, .35);
}
@media (max-width: 800px) {
  .workspace-guide .steps { grid-template-columns: 1fr; }
  .workspace-breadcrumb { gap: .4rem; }
}

/* Notifications and teacher message replies */
.reply-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(124, 58, 237, .22);
  background: rgba(124, 58, 237, .08);
}
.highlight-soft {
  border-color: rgba(124, 58, 237, .32) !important;
  box-shadow: 0 16px 40px rgba(124, 58, 237, .12);
}
.notification-card h3,
.message-card h3 {
  margin-top: .75rem;
}

/* Login polish + strong Indian phone validation upgrade */
.auth-scene {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 5rem);
  padding: clamp(2rem, 5vw, 4.5rem) 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(34, 211, 238, 0.24), transparent 30rem),
    radial-gradient(circle at 86% 18%, rgba(168, 85, 247, 0.22), transparent 28rem),
    radial-gradient(circle at 55% 92%, rgba(249, 115, 22, 0.18), transparent 24rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
  color: #f8fafc;
}
.auth-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 45%, black, transparent 72%);
  pointer-events: none;
}
.auth-grid-lines {
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(to top, rgba(6,182,212,.15), transparent);
  transform: skewY(-4deg);
  transform-origin: left bottom;
  opacity: .65;
  pointer-events: none;
}
.auth-orb {
  position: absolute;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  filter: blur(30px);
  opacity: .5;
  animation: authFloat 9s ease-in-out infinite alternate;
}
.auth-orb.orb-a { background: #22d3ee; left: -5rem; top: 8rem; }
.auth-orb.orb-b { background: #8b5cf6; right: -4rem; top: 4rem; animation-delay: -3s; }
.auth-orb.orb-c { background: #f97316; right: 28%; bottom: -8rem; animation-delay: -6s; }
@keyframes authFloat {
  from { transform: translate3d(0, 0, 0) scale(.95); }
  to { transform: translate3d(2.5rem, -2rem, 0) scale(1.1); }
}
.auth-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
}
.auth-copy { animation: fadeUp .65s ease both; }
.auth-copy h1 {
  margin: 1.1rem 0;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: .9;
  letter-spacing: -.08em;
  max-width: 10ch;
}
.auth-copy p { color: rgba(226, 232, 240, .78); line-height: 1.85; max-width: 58ch; }
.dark-eyebrow, .auth-mini {
  color: #cffafe;
  background: rgba(34, 211, 238, .12);
  border: 1px solid rgba(125, 211, 252, .22);
}
.auth-feature-stack { display: grid; gap: .85rem; margin: 1.5rem 0; max-width: 560px; }
.auth-feature {
  display: flex;
  gap: .85rem;
  align-items: center;
  padding: .9rem;
  border-radius: 22px;
  background: rgba(15, 23, 42, .58);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
  backdrop-filter: blur(16px);
}
.auth-feature > span {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(34,211,238,.28), rgba(168,85,247,.25));
}
.auth-feature strong { display: block; color: #fff; }
.auth-feature small { display: block; color: rgba(226,232,240,.68); margin-top: .15rem; }
.auth-stats { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.auth-stats div {
  min-width: 120px;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.11);
}
.auth-stats strong { display: block; font-size: 1.65rem; letter-spacing: -.05em; }
.auth-stats span { color: rgba(226,232,240,.7); font-size: .9rem; }
.auth-panel-shell { position: relative; animation: fadeUp .7s ease .08s both; }
.auth-ring {
  position: absolute;
  inset: -1.4rem;
  border-radius: 38px;
  background: conic-gradient(from 140deg, #22d3ee, #8b5cf6, #f97316, #22d3ee);
  filter: blur(22px);
  opacity: .32;
  animation: spin 12s linear infinite;
}
.auth-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15,23,42,.88), rgba(2,6,23,.92));
  border: 1px solid rgba(255,255,255,.14);
  color: #f8fafc;
  box-shadow: 0 30px 100px rgba(0,0,0,.38);
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.08) 48%, transparent 60%);
  transform: translateX(-110%);
  animation: shimmer 5s ease-in-out infinite;
  pointer-events: none;
}
.auth-card-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.auth-card h2 { margin: .65rem 0 .3rem; font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.06em; }
.auth-card p, .auth-card .helper { color: rgba(226,232,240,.72); }
.auth-lock {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(34,211,238,.2), rgba(124,58,237,.24));
  border: 1px solid rgba(255,255,255,.12);
  animation: floaty 4s ease-in-out infinite;
}
.auth-tabs {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
}
.auth-tabs a { color: rgba(226,232,240,.74); display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.auth-tabs a.active {
  color: #020617;
  background: linear-gradient(135deg, #f8fafc, #bae6fd);
  box-shadow: 0 16px 40px rgba(34,211,238,.18);
}
.auth-card input, .auth-card select, .auth-card textarea {
  background: rgba(15,23,42,.74);
  border-color: rgba(255,255,255,.15);
  color: #f8fafc;
}
.auth-card input::placeholder { color: rgba(226,232,240,.46); }
.auth-card label { color: rgba(248,250,252,.9); }
.auth-safe-note {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: 18px;
  background: rgba(34, 197, 94, .1);
  border: 1px solid rgba(74, 222, 128, .22);
  color: rgba(220, 252, 231, .92);
  line-height: 1.55;
}
input.valid-phone { border-color: rgba(16, 185, 129, .85) !important; box-shadow: 0 0 0 4px rgba(16,185,129,.11); }
input.invalid-phone { border-color: rgba(239, 68, 68, .9) !important; box-shadow: 0 0 0 4px rgba(239,68,68,.12); }
.good-text { color: #059669 !important; }
.bad-text { color: #dc2626 !important; }
.auth-card .good-text { color: #86efac !important; }
.auth-card .bad-text { color: #fca5a5 !important; }
.phone-hint { margin-top: .35rem; }
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-copy h1 { max-width: 12ch; }
  .auth-stats div { flex: 1; }
}


/* =========================================================
   Premium dark blue science theme upgrade - June 2026
   This block intentionally overrides the older light style.
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-2: #07111f;
  --ink: #f8fafc;
  --muted: #a9b7d0;
  --soft: rgba(8, 18, 38, 0.74);
  --line: rgba(125, 211, 252, 0.18);
  --brand: #38bdf8;
  --brand-2: #2563eb;
  --brand-3: #a78bfa;
  --good: #34d399;
  --bad: #fb7185;
  --warn: #fbbf24;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
}
body {
  background:
    radial-gradient(circle at 16% 4%, rgba(56, 189, 248, 0.18), transparent 30rem),
    radial-gradient(circle at 82% 10%, rgba(37, 99, 235, 0.22), transparent 30rem),
    radial-gradient(circle at 50% 90%, rgba(167, 139, 250, 0.14), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #07111f 44%, #08111f 100%) !important;
  color: var(--ink) !important;
}
body::before { background: #2563eb; opacity: .18; }
body::after { background: #38bdf8; opacity: .14; }
.navbar {
  background: rgba(3, 8, 23, 0.72) !important;
  border-color: rgba(125, 211, 252, 0.18) !important;
  box-shadow: 0 18px 80px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255,255,255,.08) !important;
}
.brand { color: #fff; }
.brand-icon { background: linear-gradient(135deg, #38bdf8, #2563eb, #a78bfa) !important; box-shadow: 0 0 34px rgba(56,189,248,.28); }
.nav-links a, .nav-links button { color: rgba(226,232,240,.86) !important; }
.nav-links a:hover, .nav-links button:hover, .nav-links .active {
  color: #fff !important;
  background: rgba(56,189,248,.14) !important;
  box-shadow: inset 0 0 0 1px rgba(125,211,252,.16);
}
.nav-user, .helper, .muted, .boot-screen p { color: var(--muted) !important; }
.card, .panel, .stat-card, .note-card, .record-card, .form-card, .student-card, .workspace-step-card {
  background: linear-gradient(145deg, rgba(15,23,42,.86), rgba(8,13,30,.72)) !important;
  border: 1px solid rgba(125, 211, 252, .16) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.06) !important;
  color: #f8fafc !important;
}
.card:hover, .panel:hover, .workspace-step-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56,189,248,.34) !important;
  box-shadow: 0 30px 88px rgba(2,6,23,.5), 0 0 34px rgba(37,99,235,.12) !important;
}
.card p, .panel p, .record-card p, .note-card p, .section-title p, .hero p { color: rgba(203,213,225,.78) !important; }
h1, h2, h3, h4, label, .big-icon { color: #f8fafc; }
input, textarea, select {
  background: rgba(2, 6, 23, .58) !important;
  border: 1px solid rgba(125, 211, 252, .18) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: rgba(56,189,248,.76) !important;
  box-shadow: 0 0 0 4px rgba(56,189,248,.12), inset 0 1px 0 rgba(255,255,255,.08) !important;
}
input::placeholder, textarea::placeholder { color: rgba(148,163,184,.72) !important; }
.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #2563eb 55%, #7c3aed) !important;
  color: #fff !important;
  box-shadow: 0 18px 42px rgba(37,99,235,.34), inset 0 1px 0 rgba(255,255,255,.22) !important;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(15, 23, 42, .72) !important;
  color: #e0f2fe !important;
  border: 1px solid rgba(125,211,252,.2) !important;
}
.eyebrow, .badge {
  background: rgba(56, 189, 248, .13) !important;
  color: #7dd3fc !important;
  border: 1px solid rgba(125, 211, 252, .18);
}
.gradient-text {
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #c4b5fd) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
.alert { border-color: rgba(251,191,36,.28) !important; background: rgba(251,191,36,.12) !important; color: #fde68a !important; }
.alert.bad { border-color: rgba(251,113,133,.3) !important; background: rgba(251,113,133,.1) !important; color: #fecdd3 !important; }
.alert.good { border-color: rgba(52,211,153,.3) !important; background: rgba(52,211,153,.12) !important; color: #bbf7d0 !important; }

/* Premium login page */
.premium-auth-page {
  position: relative;
  min-height: calc(100vh - 76px);
  overflow: hidden;
  padding: clamp(2.5rem, 5vw, 5rem) 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, .22), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, .18), transparent 30rem),
    radial-gradient(circle at 58% 100%, rgba(124, 58, 237, .16), transparent 34rem),
    linear-gradient(145deg, #020617 0%, #07101f 52%, #0b1224 100%);
}
.premium-space-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .95;
}
.premium-space-bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(56,189,248,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,.09) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(900px) rotateX(62deg) translateY(-8rem);
  animation: premiumGrid 16s linear infinite;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 60%, transparent);
}
@keyframes premiumGrid { to { background-position: 0 56px, 56px 0; } }
.space-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #dffbff;
  box-shadow: 0 0 18px #7dd3fc;
  animation: twinkle 4s ease-in-out infinite;
}
.s1 { left: 14%; top: 12%; } .s2 { left: 72%; top: 18%; animation-delay: -1s; } .s3 { left: 42%; top: 76%; animation-delay: -2s; }
.s4 { left: 88%; top: 70%; animation-delay: -1.6s; } .s5 { left: 24%; top: 54%; animation-delay: -2.5s; }
@keyframes twinkle { 0%,100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.4); } }
.formula-rain {
  position: absolute;
  inset: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: rgba(125,211,252,.36);
  font-weight: 800;
}
.formula-rain span {
  position: absolute;
  top: -3rem;
  animation: formulaDrop 15s linear infinite;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(56,189,248,.34);
}
.formula-rain span:nth-child(1){ left: 8%; animation-delay: 0s; }
.formula-rain span:nth-child(2){ left: 22%; animation-delay: -5s; }
.formula-rain span:nth-child(3){ left: 39%; animation-delay: -2s; }
.formula-rain span:nth-child(4){ left: 58%; animation-delay: -7s; }
.formula-rain span:nth-child(5){ left: 70%; animation-delay: -3s; }
.formula-rain span:nth-child(6){ left: 82%; animation-delay: -9s; }
.formula-rain span:nth-child(7){ left: 48%; animation-delay: -11s; }
@keyframes formulaDrop { 0% { transform: translateY(-10vh); opacity: 0; } 10%, 80% { opacity: .9; } 100% { transform: translateY(112vh); opacity: 0; } }
.premium-auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .82fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.premium-auth-left { animation: fadeUp .7s ease both; }
.premium-badge {
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  padding: .62rem .95rem;
  border-radius: 999px;
  color: #e0f2fe;
  font-weight: 900;
  letter-spacing: -.02em;
  background: rgba(8, 47, 73, .5);
  border: 1px solid rgba(125,211,252,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.badge-pulse {
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
  background: #22d3ee;
  box-shadow: 0 0 0 0 rgba(34,211,238,.6);
  animation: pulseDot 1.8s ease-out infinite;
}
@keyframes pulseDot { to { box-shadow: 0 0 0 13px rgba(34,211,238,0); } }
.premium-auth-left h1 {
  max-width: 12ch;
  font-size: clamp(3.1rem, 7vw, 7rem);
  line-height: .86;
  letter-spacing: -.085em;
  margin: 1.2rem 0;
  color: #fff;
}
.premium-auth-left h1 span {
  background: linear-gradient(90deg, #67e8f9, #60a5fa 50%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.premium-auth-left > p {
  max-width: 64ch;
  color: rgba(226,232,240,.78);
  font-size: 1.08rem;
  line-height: 1.9;
}
.science-stage {
  position: relative;
  min-height: 320px;
  margin: 2rem 0;
}
.atom-model {
  position: absolute;
  left: 1rem;
  top: 2rem;
  width: 230px;
  height: 230px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(56,189,248,.14), transparent 60%);
  filter: drop-shadow(0 0 34px rgba(56,189,248,.18));
  animation: floaty 6s ease-in-out infinite;
}
.atom-core {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  color: white;
  font-weight: 1000;
  box-shadow: 0 0 44px rgba(56,189,248,.55);
  z-index: 2;
}
.orbit {
  position: absolute;
  inset: 36px;
  border-radius: 999px;
  border: 1px solid rgba(125,211,252,.42);
}
.orbit i {
  position: absolute;
  left: 50%;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #e0f2fe;
  box-shadow: 0 0 20px #38bdf8;
}
.orbit-one { animation: orbitSpin 7s linear infinite; }
.orbit-two { transform: rotate(62deg); animation: orbitSpin 9s linear infinite reverse; }
.orbit-three { transform: rotate(-58deg); animation: orbitSpin 11s linear infinite; }
@keyframes orbitSpin { to { rotate: 360deg; } }
.dna-card, .molecule-card {
  position: absolute;
  background: linear-gradient(145deg, rgba(15,23,42,.8), rgba(2,6,23,.56));
  border: 1px solid rgba(125,211,252,.18);
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.08);
}
.dna-card {
  right: 8%;
  top: .6rem;
  width: 250px;
  padding: 1rem;
  animation: floaty 7s ease-in-out infinite reverse;
}
.dna-title { color: #cffafe; font-weight: 900; margin-bottom: .75rem; }
.dna-helix { position: relative; height: 180px; overflow: hidden; }
.dna-helix span {
  position: absolute;
  left: 50%;
  top: calc(var(--i) * 17px);
  width: 130px;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
  transform: translateX(-50%) rotate(calc(var(--i) * 20deg));
  box-shadow: 0 0 16px rgba(56,189,248,.3);
}
.dna-helix span::before, .dna-helix span::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #e0f2fe;
  box-shadow: 0 0 14px #38bdf8;
}
.dna-helix span::before { left: 0; } .dna-helix span::after { right: 0; }
.molecule-card {
  right: 0;
  bottom: .4rem;
  width: 280px;
  height: 170px;
  animation: floaty 8s ease-in-out infinite;
}
.molecule-card svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(125,211,252,.54); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 12 12; animation: dashMove 10s linear infinite; }
@keyframes dashMove { to { stroke-dashoffset: -120; } }
.molecule-card span {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #67e8f9, #2563eb);
  box-shadow: 0 0 24px rgba(56,189,248,.45);
  z-index: 2;
}
.molecule-card span:nth-child(1){ left: 31px; top: 59px; }
.molecule-card span:nth-child(2){ left: 82px; top: 26px; }
.molecule-card span:nth-child(3){ left: 132px; top: 56px; }
.molecule-card span:nth-child(4){ left: 172px; top: 24px; }
.molecule-card span:nth-child(5){ left: 168px; bottom: 48px; }
.premium-metrics { display: flex; gap: .85rem; flex-wrap: wrap; }
.premium-metrics div {
  min-width: 132px;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: rgba(15, 23, 42, .68);
  border: 1px solid rgba(125,211,252,.18);
}
.premium-metrics strong { display: block; color: #fff; font-size: 1.45rem; }
.premium-metrics small { color: rgba(226,232,240,.66); font-weight: 750; }
.premium-login-wrap { position: relative; animation: fadeUp .75s ease .08s both; }
.premium-login-glow {
  position: absolute;
  inset: -2px;
  border-radius: 34px;
  background: conic-gradient(from 180deg, #22d3ee, #2563eb, #7c3aed, #22d3ee);
  filter: blur(18px);
  opacity: .58;
  animation: spin 7s linear infinite;
}
.premium-login-card {
  position: relative;
  border-radius: 34px;
  padding: clamp(1.15rem, 3vw, 2rem);
  background: rgba(2, 6, 23, .82);
  border: 1px solid rgba(125,211,252,.22);
  box-shadow: 0 38px 120px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.1);
  backdrop-filter: blur(28px);
  overflow: hidden;
}
.premium-login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255,255,255,.09) 35%, transparent 68%),
    radial-gradient(circle at 10% 0%, rgba(56,189,248,.16), transparent 18rem);
  transform: translateX(-50%);
  animation: glassSweep 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glassSweep { 0%, 20% { transform: translateX(-70%); } 60%, 100% { transform: translateX(70%); } }
.premium-card-top { position: relative; display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.2rem; }
.premium-mini { color: #67e8f9; text-transform: uppercase; font-size: .72rem; font-weight: 1000; letter-spacing: .16em; }
.premium-card-top h2 { font-size: clamp(1.95rem, 4vw, 3rem); line-height: .98; letter-spacing: -.065em; margin: .55rem 0 .35rem; }
.premium-card-top p { color: rgba(226,232,240,.72); line-height: 1.65; margin: 0; }
.premium-shield {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #e0f2fe;
  background: radial-gradient(circle, rgba(56,189,248,.28), rgba(37,99,235,.12));
  border: 1px solid rgba(125,211,252,.22);
  box-shadow: 0 0 40px rgba(56,189,248,.18);
  animation: pulseGlow 2.8s ease-in-out infinite;
}
.premium-auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: .35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, .88);
  border: 1px solid rgba(125,211,252,.16);
  margin-bottom: 1rem;
}
.premium-auth-tabs a {
  justify-content: center;
  border-radius: 999px;
  padding: .75rem .6rem;
  color: rgba(226,232,240,.72) !important;
  font-weight: 900;
}
.premium-auth-tabs a.active {
  color: #020617 !important;
  background: linear-gradient(135deg, #7dd3fc, #60a5fa) !important;
  box-shadow: 0 12px 30px rgba(56,189,248,.28);
}
.premium-form-area { position: relative; }
.premium-login-card .form { gap: .9rem; }
.premium-login-card button.btn-primary { width: 100%; justify-content: center; min-height: 48px; }
.premium-trust-row {
  display: grid;
  gap: .45rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(125,211,252,.13);
  color: rgba(226,232,240,.66);
  font-size: .86rem;
}

/* Make homepage and dashboards feel premium too */
.hero-visual .floating-card, .floating-card {
  background: linear-gradient(145deg, rgba(15,23,42,.78), rgba(2,6,23,.64)) !important;
  border-color: rgba(125,211,252,.2) !important;
  color: #f8fafc !important;
}
.hero-copy h1, .section-title h2 { color: #fff; text-shadow: 0 0 44px rgba(56,189,248,.10); }
.big-icon {
  background: linear-gradient(135deg, rgba(56,189,248,.16), rgba(37,99,235,.13)) !important;
  border: 1px solid rgba(125,211,252,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.table-wrap table, table { color: #e5e7eb; }
th { color: #bae6fd !important; }
tr { border-color: rgba(125,211,252,.12) !important; }

@media (max-width: 980px) {
  .premium-auth-shell { grid-template-columns: 1fr; }
  .premium-auth-left h1 { max-width: 11ch; }
  .science-stage { min-height: 260px; }
  .dna-card { right: 0; transform: scale(.9); transform-origin: top right; }
  .molecule-card { right: 0; transform: scale(.86); transform-origin: bottom right; }
}
@media (max-width: 640px) {
  .premium-auth-page { padding: 1.4rem 0 2.5rem; }
  .premium-auth-left h1 { font-size: 3.2rem; }
  .science-stage { min-height: 220px; margin: 1rem 0; }
  .atom-model { width: 180px; height: 180px; left: -1rem; }
  .dna-card { width: 205px; top: 1rem; opacity: .86; }
  .molecule-card { width: 210px; height: 135px; opacity: .8; }
  .premium-login-card { border-radius: 26px; padding: 1rem; }
  .premium-card-top { display: block; }
  .premium-shield { margin-top: .8rem; }
  .premium-metrics div { flex: 1 1 30%; min-width: 100px; }
}

/* ===== Cosmic premium refresh vFinal ===== */
:root {
  color-scheme: dark;
  --bg: #050711;
  --bg-2: #0b1020;
  --ink: #f8fafc;
  --muted: #a8b3cf;
  --soft: rgba(10, 16, 32, 0.74);
  --line: rgba(163, 180, 255, 0.16);
  --brand: #8b5cf6;
  --brand-2: #38bdf8;
  --brand-3: #22c55e;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}
body {
  background:
    radial-gradient(circle at 18% 0%, rgba(109,40,217,.42), transparent 35rem),
    radial-gradient(circle at 92% 18%, rgba(56,189,248,.28), transparent 36rem),
    radial-gradient(circle at 55% 100%, rgba(16,185,129,.12), transparent 36rem),
    linear-gradient(145deg, #050711 0%, #080a16 42%, #0c1124 100%) !important;
  color: var(--ink);
}
body::before { background: #6d28d9; opacity: .18; }
body::after { background: #0284c7; opacity: .2; }
.navbar {
  background: rgba(5, 7, 17, .78) !important;
  border-color: rgba(167,139,250,.2) !important;
  box-shadow: 0 22px 80px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
.nav-links a, .nav-links button { color: #dbeafe !important; }
.nav-links a:hover, .nav-links button:hover, .nav-links .active {
  color: white !important;
  background: linear-gradient(135deg, rgba(124,58,237,.28), rgba(56,189,248,.14)) !important;
  box-shadow: 0 12px 34px rgba(124,58,237,.2);
}
.nav-user { color: #a8b3cf !important; }
.card, .panel, .stat-card, .note-card, .record-card, .form-card, .stream-picker {
  background: linear-gradient(145deg, rgba(15, 23, 42, .78), rgba(8, 13, 28, .66)) !important;
  border-color: rgba(148,163,255,.18) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.045) !important;
  color: #f8fafc !important;
}
.card p, .panel p, .form-card p, .record-card p, .helper, .section-title p, .page-title p { color: #a8b3cf !important; }
.card h1, .card h2, .card h3, .panel h1, .panel h2, .panel h3, .page-title h1, .section-title h2 { color: #fff !important; }
input, select, textarea {
  background: rgba(15, 23, 42, .88) !important;
  border-color: rgba(148,163,255,.2) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
input::placeholder, textarea::placeholder { color: rgba(203,213,225,.55) !important; }
option { background: #0b1020; color: #fff; }
.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #2563eb 50%, #06b6d4 100%) !important;
  box-shadow: 0 16px 44px rgba(37,99,235,.34), 0 0 0 1px rgba(255,255,255,.06) inset !important;
}
.btn-secondary {
  background: rgba(255,255,255,.07) !important;
  color: #eef2ff !important;
  border-color: rgba(255,255,255,.12) !important;
}
.btn-secondary:hover { background: rgba(255,255,255,.12) !important; }
.eyebrow {
  background: rgba(139,92,246,.18) !important;
  color: #d8b4fe !important;
  border: 1px solid rgba(216,180,254,.14);
}
.badge {
  background: rgba(56,189,248,.12) !important;
  color: #bae6fd !important;
  border: 1px solid rgba(56,189,248,.15);
}
.badge.good { background: rgba(34,197,94,.12) !important; color: #bbf7d0 !important; border-color: rgba(34,197,94,.18); }
.badge.warn { background: rgba(251,191,36,.12) !important; color: #fde68a !important; border-color: rgba(251,191,36,.18); }

/* sample-inspired landing */
.luxe-home { padding: clamp(1.5rem, 5vw, 4rem) 0 2rem; }
.luxe-browser-frame {
  position: relative;
  overflow: hidden;
  min-height: min(760px, calc(100vh - 9rem));
  border-radius: 34px;
  background: #020205;
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 50px 160px rgba(0,0,0,.55), 0 0 0 24px rgba(124,58,237,.06);
}
.luxe-browser-frame::before {
  content: "";
  position: absolute;
  inset: -10% -20%;
  background: radial-gradient(circle at 50% 20%, rgba(124,58,237,.34), transparent 20rem), radial-gradient(circle at 70% 50%, rgba(56,189,248,.12), transparent 28rem);
  filter: blur(2px);
}
.luxe-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.48);
}
.luxe-topbar strong { color: #fff; }
.luxe-topbar nav { display: flex; gap: .85rem; align-items: center; }
.luxe-topbar nav a { color: #dbeafe; font-size: .92rem; font-weight: 800; }
.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #8b5cf6;
  box-shadow: 0 0 28px #a78bfa;
  display: inline-block;
  margin-right: .5rem;
}
.luxe-hero-stage { position: relative; z-index: 1; min-height: 640px; display: grid; place-items: center; text-align: center; padding: 5rem 1.2rem; }
.luxe-stars, .luxe-stars::before, .luxe-stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#fff 1px, transparent 1.2px);
  background-size: 74px 74px;
  opacity: .32;
  animation: starDrift 26s linear infinite;
}
.luxe-stars::before { background-size: 118px 118px; opacity: .18; animation-duration: 40s; }
.luxe-stars::after { background-size: 48px 48px; opacity: .14; animation-duration: 18s; }
@keyframes starDrift { to { transform: translate3d(-74px, 74px, 0); } }
.luxe-purple-orb {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  background: radial-gradient(circle at 38% 38%, rgba(216,180,254,.82), rgba(124,58,237,.38) 36%, rgba(30,27,75,.16) 64%, transparent 70%);
  filter: blur(1px);
  animation: nebulaPulse 8s ease-in-out infinite;
}
@keyframes nebulaPulse { 0%,100% { transform: scale(.88) rotate(0deg); opacity:.72;} 50% { transform: scale(1.08) rotate(18deg); opacity: .95;} }
.luxe-copy { position: relative; z-index: 3; max-width: 820px; }
.luxe-copy h1 { color: #fff; font-size: clamp(3rem, 8vw, 6.8rem); line-height: .91; letter-spacing: -.085em; margin: 1rem 0; }
.luxe-copy h1 span { display: block; background: linear-gradient(90deg, #fff, #c4b5fd, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.luxe-copy p { color: rgba(226,232,240,.78); font-size: 1.08rem; line-height: 1.8; max-width: 720px; margin-inline: auto; }
.luxe-copy .actions { justify-content: center; }
.luxe-stream-preview { position: absolute; inset: auto 1.5rem 1.5rem; display: flex; justify-content: space-between; gap: 1rem; z-index: 3; pointer-events:none; }
.stream-orbit-card {
  width: min(32%, 260px);
  text-align:left;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(10,14,28,.66);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  animation: floaty 6s ease-in-out infinite;
}
.stream-orbit-card span { font-size: 1.7rem; }
.stream-orbit-card b { display:block; color:#fff; margin-top:.4rem; }
.stream-orbit-card small { color:#a8b3cf; }
.stream-orbit-card.commerce { animation-delay:-2s; }
.stream-orbit-card.arts { animation-delay:-4s; }

/* login with premium glass, but not flat black */
.premium-auth-page {
  background:
    radial-gradient(circle at 16% 16%, rgba(59,130,246,.35), transparent 24rem),
    radial-gradient(circle at 85% 20%, rgba(139,92,246,.34), transparent 26rem),
    radial-gradient(circle at 52% 100%, rgba(6,182,212,.2), transparent 30rem),
    linear-gradient(145deg, #070914 0%, #0b1020 48%, #111827 100%) !important;
}
.premium-auth-left h1 { max-width: 13ch !important; }
.premium-login-card {
  background: linear-gradient(145deg, rgba(8, 12, 27, .86), rgba(17, 24, 39, .7)) !important;
  border-color: rgba(196,181,253,.22) !important;
}
.auth-cosmic-showcase {
  position: relative;
  min-height: 350px;
  margin: 1.8rem 0;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background: radial-gradient(circle at 50% 38%, rgba(96,165,250,.22), transparent 16rem), linear-gradient(145deg, rgba(2,6,23,.64), rgba(15,23,42,.38));
}
.auth-cosmic-showcase::before {
  content:""; position:absolute; inset:0; background-image: radial-gradient(#dbeafe 1px, transparent 1.2px); background-size: 42px 42px; opacity:.18; animation: starDrift 22s linear infinite;
}
.auth-planet { position:absolute; right:8%; top:18%; width:132px; height:132px; border-radius:999px; background: radial-gradient(circle at 30% 25%, #e0f2fe, #60a5fa 32%, #6d28d9 66%, #111827 72%); box-shadow: 0 0 80px rgba(96,165,250,.45); animation: planetFloat 7s ease-in-out infinite; }
@keyframes planetFloat { 0%,100% { transform: translateY(0) rotate(0deg);} 50% { transform: translateY(-16px) rotate(8deg);} }
.auth-astronaut, .astronaut { position:absolute; width:78px; height:98px; animation: astronautFly 8s ease-in-out infinite; }
.auth-astronaut { left:14%; top:30%; }
.astronaut { left:20%; top:34%; transform: scale(.85); }
@keyframes astronautFly { 0%,100% { transform: translate3d(0,0,0) rotate(-8deg);} 50% { transform: translate3d(26px,-28px,0) rotate(8deg);} }
.auth-astronaut .helmet, .astronaut .helmet { position:absolute; left:17px; top:0; width:46px; height:46px; border-radius:50%; background: radial-gradient(circle at 35% 30%, #fff, #bfdbfe 48%, #38bdf8 49%, #0f172a 72%); border:3px solid rgba(255,255,255,.8); box-shadow: 0 0 34px rgba(56,189,248,.45); }
.auth-astronaut .body, .astronaut .body { position:absolute; left:20px; top:43px; width:38px; height:44px; border-radius:16px 16px 20px 20px; background: linear-gradient(135deg, #e0f2fe, #60a5fa); box-shadow: inset 0 -10px 0 rgba(37,99,235,.25); }
.auth-astronaut .pack, .astronaut .pack { position:absolute; left:8px; top:50px; width:16px; height:32px; border-radius:8px; background:#64748b; }
.auth-astronaut .tether { position:absolute; left:-54px; top:58px; width:92px; height:2px; background: linear-gradient(90deg, transparent, rgba(147,197,253,.5)); transform: rotate(-14deg); }
.auth-card { position:absolute; width:156px; padding:.85rem; border-radius:18px; background: rgba(15,23,42,.72); border:1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); box-shadow: 0 20px 50px rgba(0,0,0,.24); }
.auth-card span { font-size:1.4rem; } .auth-card b { display:block; color:#fff; } .auth-card small { color:#a8b3cf; }
.auth-card.science { right:8%; bottom:16%; } .auth-card.commerce { left:31%; bottom:10%; animation: floaty 6s infinite -2s; } .auth-card.arts { right:30%; top:8%; animation: floaty 7s infinite -3s; }

/* stream animations */
.stream-block { position: relative; overflow: hidden; padding: 1.1rem; border-radius: 34px; border: 1px solid rgba(255,255,255,.08); background: linear-gradient(145deg, rgba(15,23,42,.48), rgba(2,6,23,.26)); margin-bottom: 1.6rem; }
.stream-block-head { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.stream-scene { position: relative; min-height: 170px; border-radius: 28px; overflow: hidden; background: linear-gradient(145deg, rgba(2,6,23,.74), rgba(15,23,42,.38)); border: 1px solid rgba(255,255,255,.09); }
.science-scene { background: radial-gradient(circle at 70% 20%, rgba(59,130,246,.5), transparent 7rem), linear-gradient(145deg, #0ea5e9, #1e3a8a 50%, #0f172a); }
.science-planet { position:absolute; right:28px; top:22px; width:70px; height:70px; border-radius:50%; background:radial-gradient(circle at 30% 25%, #fff, #93c5fd 35%, #4f46e5 66%); box-shadow:0 0 46px rgba(147,197,253,.7); }
.science-comet { position:absolute; left:-50px; top:38px; width:110px; height:3px; background:linear-gradient(90deg, transparent, white); transform: rotate(-18deg); animation: comet 4.5s linear infinite; }
@keyframes comet { 0% { transform: translateX(-80px) rotate(-18deg); opacity:0;} 20%,70%{opacity:1;} 100%{ transform: translateX(360px) rotate(-18deg); opacity:0;} }
.commerce-scene { background: radial-gradient(circle at 70% 30%, rgba(34,197,94,.38), transparent 8rem), linear-gradient(145deg, #052e16, #064e3b 55%, #020617); }
.commerce-chart { position:absolute; left:32px; bottom:28px; display:flex; gap:10px; align-items:flex-end; }
.commerce-chart span { width:22px; border-radius:999px 999px 8px 8px; background:linear-gradient(180deg,#86efac,#22c55e); box-shadow:0 0 26px rgba(34,197,94,.36); animation: barGrow 2.4s ease-in-out infinite; }
.commerce-chart span:nth-child(1){height:46px;} .commerce-chart span:nth-child(2){height:82px; animation-delay:-.4s;} .commerce-chart span:nth-child(3){height:66px; animation-delay:-.8s;} .commerce-chart span:nth-child(4){height:112px; animation-delay:-1.2s;}
@keyframes barGrow { 0%,100%{transform:scaleY(.82);} 50%{transform:scaleY(1.08);} }
.commerce-coin { position:absolute; width:46px; height:46px; border-radius:50%; display:grid; place-items:center; font-weight:1000; color:#052e16; background:linear-gradient(135deg,#fde68a,#f59e0b); box-shadow:0 0 30px rgba(245,158,11,.35); animation: coinFloat 5s ease-in-out infinite; }
.commerce-coin.c1{right:32px;top:28px}.commerce-coin.c2{right:88px;bottom:28px;animation-delay:-2s}
@keyframes coinFloat { 50%{transform:translateY(-18px) rotate(14deg);} }
.commerce-line { position:absolute; left:28px; right:28px; top:50%; border-top:2px dashed rgba(187,247,208,.34); }
.arts-scene { background: radial-gradient(circle at 25% 20%, rgba(251,113,133,.34), transparent 8rem), linear-gradient(145deg, #3b0764, #831843 54%, #020617); }
.arts-palette { position:absolute; left:30px; top:28px; width:94px; height:76px; border-radius:50% 50% 46% 54%; background:linear-gradient(135deg,#fff7ed,#fdba74); box-shadow:0 0 40px rgba(251,146,60,.28); animation: floaty 6s ease-in-out infinite; }
.arts-palette::after { content:""; position:absolute; right:18px; top:18px; width:18px; height:18px; border-radius:50%; background:#831843; }
.arts-palette i { position:absolute; width:14px; height:14px; border-radius:50%; }
.arts-palette i:nth-child(1){left:22px;top:20px;background:#ef4444}.arts-palette i:nth-child(2){left:40px;top:38px;background:#3b82f6}.arts-palette i:nth-child(3){left:58px;top:24px;background:#22c55e}.arts-palette i:nth-child(4){left:28px;bottom:14px;background:#a855f7}
.arts-quill { position:absolute; right:48px; top:28px; width:18px; height:112px; border-radius:50% 50% 0 0; background:linear-gradient(180deg,#fdf2f8,#fb7185); transform:rotate(34deg); box-shadow:0 0 28px rgba(251,113,133,.35); animation: quillWrite 4.5s ease-in-out infinite; }
@keyframes quillWrite { 50% { transform: translate(12px, 10px) rotate(42deg); } }
.arts-book { position:absolute; right:20px; bottom:22px; padding:.65rem .8rem; border-radius:12px; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.18); color:#fff; font-weight:1000; font-size:.78rem; }
.security-panel { border-color: rgba(251,191,36,.25) !important; }

@media (max-width: 900px) {
  .luxe-stream-preview { position:relative; inset:auto; margin: 1rem auto 0; flex-wrap:wrap; justify-content:center; }
  .stream-orbit-card { width: min(100%, 260px); }
  .stream-block-head { grid-template-columns: 1fr; }
  .stream-scene { min-height: 150px; }
  .premium-auth-shell { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .luxe-browser-frame { border-radius: 24px; }
  .luxe-topbar nav { display:none; }
  .luxe-hero-stage { min-height: 560px; padding: 3rem 1rem; }
  .luxe-copy h1 { font-size: 3rem; }
  .auth-card { width: 130px; padding:.65rem; }
  .auth-card.arts { display:none; }
  .auth-cosmic-showcase { min-height: 270px; }
}



/* =========================================================
   FINAL READABILITY + LAYOUT REPAIR
   This block intentionally overrides the earlier experimental dark theme.
   Goal: premium black/blue look like the sample, but readable and stable.
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #050816;
  --bg-2: #081426;
  --ink: #f8fafc;
  --muted: #b7c4da;
  --soft: rgba(11, 18, 36, 0.82);
  --line: rgba(148, 163, 184, 0.22);
  --brand: #8b5cf6;
  --brand-2: #38bdf8;
  --brand-3: #22c55e;
}
html, body { max-width: 100%; overflow-x: hidden; }
body {
  background:
    radial-gradient(circle at 18% 4%, rgba(88, 28, 135, .35), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(14, 165, 233, .22), transparent 30rem),
    linear-gradient(140deg, #05070f 0%, #08111f 48%, #0b1d31 100%) !important;
  color: #f8fafc !important;
}
main { position: relative; z-index: 1; padding-top: 1.25rem; }
body::before, body::after { opacity: .12 !important; pointer-events: none; }

.container { width: min(1180px, calc(100% - 2rem)); }
.navbar {
  position: sticky !important;
  top: .9rem !important;
  z-index: 100 !important;
  width: min(1180px, calc(100% - 2rem)) !important;
  margin: .9rem auto 1.3rem !important;
  padding: .62rem .75rem !important;
  border-radius: 28px !important;
  background: rgba(5, 8, 18, .88) !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  backdrop-filter: blur(20px) saturate(1.2) !important;
  box-shadow: 0 18px 70px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08) !important;
}
.brand { color: #ffffff !important; min-width: max-content; }
.brand-icon { background: linear-gradient(135deg, #2563eb, #38bdf8, #8b5cf6) !important; box-shadow: 0 0 34px rgba(56,189,248,.35) !important; }
.nav-links { gap: .35rem !important; max-width: 100%; }
.nav-links a, .nav-links button {
  color: #dbeafe !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  padding: .7rem .86rem !important;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links button:hover, .nav-links .active {
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(124,58,237,.36), rgba(14,165,233,.22)) !important;
  border-color: rgba(125,211,252,.18) !important;
  box-shadow: 0 10px 30px rgba(56,189,248,.16) !important;
}
.nav-user { color: #cbd5e1 !important; }

.luxe-home { padding: .25rem 0 2.5rem !important; }
.luxe-browser-frame {
  min-height: auto !important;
  border-radius: 32px !important;
  background: linear-gradient(180deg, #02030a, #050816) !important;
  overflow: hidden !important;
}
.luxe-hero-stage {
  min-height: auto !important;
  padding: clamp(3rem, 7vw, 5rem) 1.2rem 2rem !important;
  display: block !important;
}
.luxe-copy { margin: 0 auto; max-width: 860px !important; }
.luxe-copy h1 {
  font-size: clamp(2.7rem, 6vw, 5rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.065em !important;
  margin: 1rem auto !important;
  max-width: 11.5ch;
  color: #fff !important;
}
.luxe-copy p { color: #cbd5e1 !important; max-width: 780px !important; }
.luxe-stream-preview {
  position: relative !important;
  inset: auto !important;
  margin: 2rem auto 0 !important;
  width: min(920px, 100%) !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  pointer-events: auto !important;
}
.stream-orbit-card {
  width: auto !important;
  min-height: 132px;
  background: rgba(15, 23, 42, .72) !important;
  border: 1px solid rgba(148, 163, 184, .2) !important;
  color: #f8fafc !important;
}
.stream-orbit-card small { color: #cbd5e1 !important; }

.premium-auth-page { padding: 1rem 0 3rem !important; min-height: auto !important; }
.premium-auth-shell {
  display: grid !important;
  grid-template-columns: minmax(0, .95fr) minmax(360px, .8fr) !important;
  gap: clamp(1rem, 4vw, 2.5rem) !important;
  align-items: center !important;
}
.premium-auth-left h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem) !important;
  line-height: 1.02 !important;
  max-width: 11ch !important;
  margin: 1rem 0 !important;
}
.premium-auth-left > p { color: #cbd5e1 !important; }
.premium-login-card {
  max-width: 520px !important;
  width: 100% !important;
  margin: 0 auto !important;
  background: linear-gradient(145deg, rgba(15,23,42,.92), rgba(13,21,40,.78)) !important;
  color: #f8fafc !important;
}
.premium-card-top h2 { color: #fff !important; line-height: 1.05 !important; }
.premium-card-top p { color: #cbd5e1 !important; }
.premium-auth-tabs { overflow: hidden; }
.premium-auth-tabs a { color: #dbeafe !important; }
.premium-auth-tabs a.active { color: #06111f !important; background: linear-gradient(135deg,#7dd3fc,#60a5fa) !important; }

.card, .panel, .stat-card, .note-card, .record-card, .form-card, .student-card, .workspace-step-card, .stream-picker, .message-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, .88), rgba(9, 16, 33, .78)) !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  color: #f8fafc !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
.card h1, .card h2, .card h3, .panel h1, .panel h2, .panel h3, .note-card h3, .record-card h3, .page-title h1, .section-title h2 {
  color: #ffffff !important;
  text-shadow: none !important;
  line-height: 1.12;
}
.card p, .panel p, .form-card p, .record-card p, .note-card p, .helper, .section-title p, .page-title p, .empty, .note-body {
  color: #cbd5e1 !important;
}
.note-body { background: rgba(255,255,255,.04); border-radius: 16px; padding: .75rem; }
label, .field label { color: #e5edff !important; }
input, select, textarea {
  background: rgba(6, 12, 27, .92) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, .28) !important;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(56,189,248,.35) !important; border-color: rgba(125,211,252,.55) !important; }
input::placeholder, textarea::placeholder { color: #8ea0bd !important; }
option { background: #0b1020 !important; color: #ffffff !important; }
.btn { min-height: 42px; }
.btn-secondary, .btn-ghost {
  background: rgba(255,255,255,.08) !important;
  color: #f8fafc !important;
  border-color: rgba(255,255,255,.14) !important;
}
.badge, .eyebrow { color: #e9d5ff !important; background: rgba(124,58,237,.22) !important; border: 1px solid rgba(216,180,254,.18) !important; }
.alert.bad { background: rgba(127,29,29,.74) !important; color: #fecaca !important; border-color: rgba(248,113,113,.42) !important; }
.alert.good { background: rgba(20,83,45,.74) !important; color: #bbf7d0 !important; border-color: rgba(74,222,128,.38) !important; }
.table-wrap, table { color: #e5edff !important; }
th { color: #ffffff !important; }
td { color: #dbeafe !important; }

.footer {
  margin-top: 2rem !important;
  background: rgba(15,23,42,.82) !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  border-radius: 28px !important;
  color: #cbd5e1 !important;
  text-align: left !important;
  padding: 1.4rem !important;
}
.footer strong { color: #fff !important; }
.footer a { color: #d8b4fe !important; background: rgba(124,58,237,.14) !important; }
.footer p { color: #cbd5e1 !important; }

.stream-block { background: rgba(15,23,42,.58) !important; border-color: rgba(148,163,184,.22) !important; }
.stream-block-head { align-items: stretch !important; }
.workspace-guide .steps span { color: #e0f2fe !important; background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.18); }

@media (max-width: 980px) {
  .premium-auth-shell { grid-template-columns: 1fr !important; }
  .premium-auth-left h1 { max-width: 100% !important; }
  .auth-cosmic-showcase { min-height: 270px !important; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .container { width: min(100% - 1rem, 1180px); }
  main { padding-top: .5rem; }
  .navbar {
    position: relative !important;
    top: auto !important;
    width: calc(100% - 1rem) !important;
    margin: .5rem auto .8rem !important;
    border-radius: 24px !important;
    align-items: flex-start !important;
    flex-direction: column !important;
  }
  .nav-links { justify-content: flex-start !important; overflow-x: auto; width: 100%; padding-bottom: .2rem; }
  .nav-links a, .nav-links button { padding: .6rem .72rem !important; }
  .nav-user { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .luxe-hero-stage { padding: 2.3rem .9rem 1.2rem !important; }
  .luxe-copy h1 { font-size: clamp(2.4rem, 13vw, 3.8rem) !important; max-width: 10ch; }
  .luxe-stream-preview { grid-template-columns: 1fr !important; }
  .grid-4, .grid-3, .grid-2, .split, .dashboard-hero { grid-template-columns: 1fr !important; }
  .page-title { margin: 1.3rem 0 1rem !important; }
  .page-title h1, .section-title h2 { font-size: clamp(1.9rem, 10vw, 3rem) !important; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-links { justify-content: flex-start !important; }
  .auth-card { display: none !important; }
}
