:root {
  --bg: #fbf5ef;
  --bg-soft: #fffdfa;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-strong: #ffffff;
  --surface-admin: #f7f7ff;
  --line: #e4e2f2;
  --line-strong: #cfd3f1;
  --text: #252446;
  --text-soft: #727494;
  --text-inverse: #ffffff;
  --brand: #4e67ff;
  --brand-strong: #3450eb;
  --brand-soft: #eef0ff;
  --accent: #8f67ff;
  --accent-strong: #734ce7;
  --sun: #ffd96c;
  --coral: #ffc1d9;
  --pink: #ff9fe8;
  --violet: #9c68ff;
  --sky: #77edff;
  --lime: #54db00;
  --success: #30bc6c;
  --warning: #ffbb4d;
  --danger: #ff6f9f;
  --admin-ink: #2f355c;
  --shadow-soft: 0 16px 34px rgba(106, 102, 161, 0.10);
  --shadow-strong: 0 24px 44px rgba(93, 86, 156, 0.16);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --touch: 48px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 7% 8%, rgba(221, 220, 247, 0.78) 0 5%, transparent 5.2%),
    radial-gradient(circle at 8% 74%, rgba(204, 242, 238, 0.88) 0 4.5%, transparent 4.7%),
    radial-gradient(circle at 94% 20%, rgba(237, 216, 255, 0.42) 0 5.8%, transparent 6.1%),
    radial-gradient(circle at 12% 96%, rgba(255, 215, 229, 0.42) 0 5%, transparent 5.2%),
    linear-gradient(180deg, #fffaf6 0%, #fcf5ef 54%, #faf7f4 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 52% 22%, rgba(155, 119, 255, 0.10) 0%, transparent 18%),
    radial-gradient(circle at 56% 54%, rgba(119, 237, 255, 0.08) 0%, transparent 22%);
  opacity: 1;
}

body::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 22%);
}

h1,
h2,
h3,
h4,
button {
  font-family: "Baloo 2", cursive;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  z-index: 1;
}

.shell {
  width: min(1200px, calc(100vw - 24px));
  margin: 0 auto;
}

.main-shell {
  padding: 28px 0 56px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(78, 103, 255, 0.10);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

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

.hero-stage,
.focus-grid,
.dashboard-layout,
.lesson-layout,
.admin-layout {
  display: grid;
  gap: 28px;
}

.hero-stage-layout {
  display: grid;
  gap: 28px;
}

@media (min-width: 1024px) {
  .hero-stage-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .focus-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  }

  .dashboard-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  }

  .lesson-layout {
    grid-template-columns: 290px minmax(0, 1fr);
    align-items: start;
  }

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

  .admin-layout > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1023px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .topbar-actions,
  .topbar-center {
    width: 100%;
  }

  .topbar-actions {
    justify-content: space-between;
  }
}

@media (max-width: 779px) {
  .main-shell {
    padding-top: 14px;
  }
}
