:root {
  color-scheme: light;
  --bg: #fffaf2;
  --surface: rgba(255, 254, 250, 0.88);
  --surface-strong: #fffefa;
  --text: #294451;
  --muted: #5e7479;
  --line: rgba(69, 112, 119, 0.14);
  --primary: #5f9fb0;
  --primary-strong: #397486;
  --accent: #6bb797;
  --atlas-blue: #b9d5e8;
  --atlas-blue-strong: #5f8fb0;
  --atlas-peach: #f6b27d;
  --atlas-gold: #f5b84b;
  --atlas-ink: #26384a;
  --warning: #b56a00;
  --success: #178253;
  --cream: #fff0d8;
  --peach: #f5ba91;
  --pastel-blue: #dceff5;
  --pastel-green: #e2f3e9;
  --pastel-pink: #fbe2ea;
  --pastel-lilac: #eee6fb;
  --shadow: 0 16px 42px rgba(63, 104, 111, 0.09);
  --shadow-soft: 0 8px 24px rgba(63, 104, 111, 0.07);
  --radius: 24px;
  --font-scale: 1;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #182b2e;
  --surface: rgba(35, 56, 59, 0.84);
  --surface-strong: #253b3e;
  --text: #f4f7fb;
  --muted: #a9b3c5;
  --line: rgba(255, 255, 255, 0.12);
  --primary: #9bcbd5;
  --primary-strong: #c4e5eb;
  --accent: #8dd3b5;
  --atlas-blue: #8fb4d0;
  --atlas-blue-strong: #c5def0;
  --atlas-peach: #ffc08e;
  --atlas-gold: #ffd36b;
  --atlas-ink: #172033;
  --warning: #ffc266;
  --success: #6fe0a7;
  --cream: #4b4034;
  --peach: #d99d78;
  --pastel-blue: #314f54;
  --pastel-green: #304d42;
  --shadow: 0 16px 42px rgba(6, 18, 20, 0.24);
  --shadow-soft: 0 8px 24px rgba(6, 18, 20, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(220, 239, 245, 0.95), transparent 27rem),
    radial-gradient(circle at 94% 18%, rgba(255, 225, 198, 0.7), transparent 24rem),
    linear-gradient(135deg, var(--bg), #f8fcf9 55%, #fff7ed);
  color: var(--text);
  font-family: "Nunito", "Quicksand", ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  font-size: calc(16px * var(--font-scale));
  line-height: 1.5;
  min-height: 100vh;
}

[data-theme="dark"] body,
body[data-theme="dark"] {
  background:
    radial-gradient(circle at top left, rgba(125, 190, 197, 0.14), transparent 28rem),
    linear-gradient(135deg, #182b2e, #21383b 58%, #152528);
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  font-size: 1rem;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, white);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0.7rem 1rem;
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
}

.api-key-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at top left, rgba(15, 159, 143, 0.22), transparent 30rem),
    linear-gradient(135deg, #f7f8fb, #e8eef8);
}

.api-key-card {
  width: min(100%, 31rem);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(31, 45, 75, 0.18);
}

.api-key-card .brand-mark {
  margin-bottom: 1.25rem;
}

.api-key-card h1 {
  margin: 0.2rem 0 0.6rem;
}

.api-key-card > p:not(.eyebrow) {
  color: #647084;
}

.api-key-card .field {
  margin: 1.4rem 0 0.75rem;
}

.privacy-consent {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  margin: 0.2rem 0 0.8rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
  cursor: pointer;
}

.privacy-consent input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.17rem 0 0;
  accent-color: var(--primary);
}

.privacy-consent a {
  color: #253ba8;
  font-weight: 800;
  text-underline-offset: 0.18rem;
}

.api-key-card .primary-button {
  width: 100%;
  margin: 0.4rem 0 1rem;
}

.api-key-card .primary-button:disabled {
  background: #aab5cf;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.api-key-card small {
  display: block;
  color: #647084;
}

.api-key-error {
  margin: 0 0 0.5rem;
  color: #b42318 !important;
  font-weight: 700;
}

.privacy-sticker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(23, 32, 51, 0.28);
  backdrop-filter: blur(5px);
}

.privacy-sticker {
  position: relative;
  width: min(100%, 27rem);
  padding: 2rem;
  border: 1px solid rgba(161, 126, 35, 0.18);
  border-radius: 6px 18px 18px 18px;
  background: #fff6bf;
  box-shadow: 0 22px 55px rgba(62, 50, 15, 0.22);
  color: #283548;
  transform: rotate(-0.7deg);
}

.privacy-sticker::before {
  content: "";
  position: absolute;
  top: -0.7rem;
  left: 50%;
  width: 7rem;
  height: 1.4rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 2px 5px rgba(62, 50, 15, 0.08);
  transform: translateX(-50%) rotate(1.8deg);
}

.privacy-sticker h2 {
  margin: 0.25rem 0 0.85rem;
  color: #1e3a5f;
}

.privacy-sticker p:not(.eyebrow) {
  color: #465568;
}

.privacy-sticker-close {
  position: absolute;
  top: 0.75rem;
  right: 0.8rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(30, 58, 95, 0.08);
  color: #1e3a5f;
  font-size: 1.4rem;
}

.privacy-sticker-accept {
  min-height: 42px;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 10px;
  background: #1e3a5f;
  color: #fff;
  font-weight: 800;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1rem;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}

.sidebar-brand,
.topbar,
.card-header,
.filter-grid,
.profile-top,
.hero-actions,
.toolbar,
.row,
.form-row,
.mood-picker,
.report-actions {
  display: flex;
  align-items: center;
}

.sidebar-brand {
  gap: 0.75rem;
  padding: 0.55rem 0.65rem 1rem;
}

.sidebar-brand span,
.activity-list span,
.tool-card small,
.mini-tool small {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.brand-mark.small {
  display: none;
}

.nav-list {
  display: grid;
  gap: 0.25rem;
}

.nav-button {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.72rem;
  min-height: 44px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  transition: 180ms ease;
}

.nav-button span:first-child {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--primary);
  font-weight: 800;
}

.nav-button:hover,
.nav-button.active {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--text);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 0.85rem;
  min-height: 76px;
  padding: 0.8rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.title-block {
  min-width: 12rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 1.2rem;
}

h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.1;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
}

.search-shell {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.6rem;
  min-width: 12rem;
  max-width: 48rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.search-shell input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.menu-toggle {
  display: none;
}

main {
  padding: clamp(1rem, 3vw, 2rem);
  padding-bottom: clamp(7rem, 15vw, 11rem);
}

.view-root {
  display: grid;
  gap: 1.2rem;
}

.hero-panel,
.glass-card,
.stat-card,
.tool-card,
.profile-card,
.material-card,
.chat-shell,
.settings-panel,
.search-results,
.modal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 0.8fr);
  gap: 1.2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.hero-panel p {
  max-width: 60ch;
  color: var(--muted);
}

.dashboard-welcome {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-block: clamp(1.5rem, 3.5vw, 2.4rem);
  border-color: rgba(30, 58, 95, 0.08);
  box-shadow: 0 8px 24px -12px rgba(15, 35, 65, 0.22);
}

.dashboard-welcome h2 {
  margin: 0;
  color: #1e3a5f;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.dashboard-welcome-copy {
  display: grid;
  gap: 0.55rem;
}

.dashboard-welcome-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-welcome-copy > p {
  margin: 0;
  color: #526174;
  font-size: 1rem;
  font-weight: 650;
}

.welcome-icon {
  display: grid;
  place-items: center;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  border-radius: 0.8rem;
  background: #eef3f8;
  box-shadow: inset 0 0 0 1px rgba(30, 58, 95, 0.06);
}

.welcome-icon svg {
  width: 2.35rem;
  height: 2.35rem;
  overflow: visible;
}

.wave-palm {
  fill: #ffd166;
  stroke: #a86122;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.wave-detail {
  fill: none;
  stroke: #d49432;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.wave-motion {
  fill: none;
  stroke: #5f8fb0;
  stroke-width: 2.1;
  stroke-linecap: round;
}

.dashboard-teacher-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 4.6rem;
  width: 4.6rem;
  height: 4.6rem;
  aspect-ratio: 1;
  padding: 0.18rem;
  border: 4px solid #fff;
  border-radius: 999px;
  outline: 2px solid rgba(95, 143, 176, 0.2);
  background: #e8f1f8;
  box-shadow: 0 8px 22px rgba(30, 58, 95, 0.16), 0 0 0 6px rgba(185, 213, 232, 0.16);
  overflow: hidden;
}

.dashboard-teacher-avatar svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.teacher-avatar-bg { fill: #d9ebf5; }
.teacher-hair,
.teacher-hair-front { fill: #5d4336; }
.teacher-face { fill: #f3c6a5; }
.teacher-eye { fill: #26384a; }
.teacher-smile {
  fill: none;
  stroke: #9d5d55;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.teacher-shirt { fill: #5f8fb0; }
.teacher-collar {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-actions,
.toolbar,
.report-actions {
  flex-wrap: wrap;
  gap: 0.7rem;
}

.primary-button,
.secondary-button,
.text-button,
.danger-button {
  border: 0;
  border-radius: 14px;
  padding: 0.72rem 1rem;
  font-weight: 800;
  min-height: 44px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

.text-button {
  padding: 0.45rem 0.65rem;
  background: transparent;
  color: var(--primary);
}

.danger-button {
  background: #fff0f0;
  color: #a32020;
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover,
.danger-button:hover,
.tool-card:hover,
.profile-card:hover,
.mini-tool:hover {
  transform: translateY(-2px);
}

.weekly-chart {
  display: flex;
  align-items: end;
  gap: 0.7rem;
  min-height: 12rem;
  padding: 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 10%, transparent), color-mix(in srgb, var(--accent) 10%, transparent));
}

.weekly-chart span {
  flex: 1;
  min-width: 1.6rem;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  animation: rise 700ms ease both;
}

.stats-grid,
.dashboard-grid,
.profile-grid,
.tools-grid,
.materials-grid,
.settings-grid {
  display: grid;
  gap: 1rem;
}

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

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

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.view-root:has(.dashboard-welcome) {
  padding-right: clamp(10.5rem, 16vw, 13.5rem);
}

.dashboard-summary-grid .stat-card,
.dashboard-grid .glass-card {
  border-color: rgba(30, 58, 95, 0.08);
  background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
  box-shadow: 0 4px 6px -1px rgba(15, 35, 65, 0.05), 0 2px 4px -1px rgba(15, 35, 65, 0.03);
}

.wide-card {
  grid-column: 1 / -1;
}

.edit-hint {
  margin: 0.2rem 0 0;
  color: #526174;
  font-size: 0.9rem;
  line-height: 1.45;
}

.editable-goals [contenteditable="true"] {
  flex: 1;
  min-width: 0;
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
}

.editable-goals [contenteditable="true"]:hover,
.editable-goals [contenteditable="true"]:focus {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  outline: 2px solid color-mix(in srgb, var(--primary) 28%, transparent);
}

.goal-check {
  position: relative;
  flex: 0 0 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.3rem;
  padding: 0;
  border: 1px solid #66b99a;
  border-radius: 0.35rem;
  background: #e6f5ef;
  box-shadow: 0 2px 5px rgba(45, 116, 89, 0.16);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.goal-check::after {
  content: "";
  position: absolute;
  left: 0.37rem;
  top: 0.18rem;
  width: 0.27rem;
  height: 0.5rem;
  border: solid #fff;
  border-width: 0 0.13rem 0.13rem 0;
  opacity: 0;
  transform: rotate(45deg);
}

.goal-check[aria-pressed="true"] {
  background: #4da982;
}

.goal-check[aria-pressed="true"]::after {
  opacity: 1;
}

.goal-check:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(45, 116, 89, 0.2);
}

.editable-goals li.is-complete [contenteditable="true"] {
  color: #718096;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.stat-card,
.glass-card,
.tool-card,
.profile-card,
.material-card,
.settings-panel {
  padding: 1rem;
}

.dashboard-summary-grid .stat-card,
.dashboard-grid .glass-card {
  padding: clamp(1.15rem, 2.3vw, 1.5rem);
}

.dashboard-summary-grid .stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 9rem;
}

.stat-card p,
.stat-card span {
  margin: 0;
  color: var(--muted);
}

.dashboard-summary-grid .stat-card p,
.dashboard-summary-grid .stat-card-copy > span,
.dashboard-grid .activity-list span {
  color: #526174;
}

.stat-card strong {
  display: block;
  margin: 0.25rem 0;
  font-size: 2rem;
}

.dashboard-summary-grid .stat-card strong {
  margin: 0.3rem 0 0.2rem;
  color: #1e3a5f;
  font-size: clamp(2.65rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.stat-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: #eef3f8;
}

.stat-card-icon svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: none;
  stroke: #334e68;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] .dashboard-welcome h2,
[data-theme="dark"] .dashboard-summary-grid .stat-card strong {
  color: #d8e7f7;
}

[data-theme="dark"] .dashboard-welcome-copy > p {
  color: #b7c4d3;
}

[data-theme="dark"] .welcome-icon {
  background: rgba(143, 180, 208, 0.13);
}

[data-theme="dark"] .dashboard-summary-grid .stat-card p,
[data-theme="dark"] .dashboard-summary-grid .stat-card-copy > span,
[data-theme="dark"] .dashboard-grid .activity-list span,
[data-theme="dark"] .edit-hint {
  color: #b7c4d3;
}

[data-theme="dark"] .stat-card-icon {
  background: rgba(143, 180, 208, 0.13);
}

[data-theme="dark"] .stat-card-icon svg {
  stroke: #b9d5e8;
}

.card-header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.dashboard-action {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.55rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 6%, var(--surface-strong));
  box-shadow: 0 2px 5px rgba(15, 35, 65, 0.04);
}

.clean-list,
.activity-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.clean-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.status-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  margin-top: 0.45rem;
  background: var(--accent);
}

.activity-list li {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.recommendation-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.mini-tool {
  display: grid;
  gap: 0.35rem;
  min-height: 8.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: var(--surface-strong);
  color: var(--text);
  text-align: left;
  transition: 180ms ease;
}

.mini-tool span,
.tool-image {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  font-weight: 900;
}

.student-list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.15rem;
}

.student-list-heading h2,
.student-list-heading p {
  margin: 0.2rem 0 0;
}

.student-list-heading > div > p:last-child {
  color: #526174;
}

.privacy-badge {
  flex: 0 0 auto;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(23, 130, 83, 0.16);
  border-radius: 999px;
  background: #eaf7f1;
  color: #176b4a;
  font-size: 0.85rem;
  font-weight: 800;
}

.student-list-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.student-add-button {
  min-height: 42px;
  padding: 0.6rem 0.9rem;
  border: 0;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 5px 12px rgba(52, 84, 209, 0.18);
}

.student-add-button:hover {
  transform: translateY(-1px);
}

.student-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.student-preview-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.25rem 0.9rem;
  align-items: center;
  min-height: 10.5rem;
  padding: 1.15rem;
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-strong) 97%, transparent);
  box-shadow: 0 4px 6px -1px rgba(15, 35, 65, 0.05), 0 2px 4px -1px rgba(15, 35, 65, 0.03);
  color: var(--text);
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.student-preview-card:hover,
.student-preview-card:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  box-shadow: 0 12px 28px -12px rgba(30, 58, 95, 0.24);
  transform: translateY(-2px);
}

.student-preview-card .animal-avatar {
  grid-row: 1 / span 2;
}

.student-preview-name {
  align-self: end;
  color: #1e3a5f;
  font-size: 1.08rem;
  font-weight: 900;
}

.student-preview-initials {
  align-self: end;
  justify-self: end;
  color: #526174;
  font-size: 0.88rem;
  font-weight: 800;
}

.student-preview-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.student-preview-facts > span {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface-strong));
  color: #34475d;
  font-size: 0.82rem;
}

.student-preview-facts strong {
  color: #526174;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.animal-avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1.25rem;
  background: #eef5f8;
  box-shadow: inset 0 0 0 1px rgba(30, 58, 95, 0.06);
  overflow: hidden;
}

.animal-avatar-large {
  flex: 0 0 6rem;
  width: 6rem;
  height: 6rem;
  border-radius: 1.75rem;
}

.animal-avatar svg {
  width: 88%;
  height: 88%;
}

.animal-ear,
.animal-face { fill: #b9875b; }
.animal-muzzle { fill: #efd0a9; }
.animal-eye,
.animal-nose,
.rabbit-nose { fill: #26384a; }
.animal-smile {
  fill: none;
  stroke: #26384a;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.lion-mane { fill: #d49239; }
.rabbit-ear { fill: #e5b7c4; }
.fox-head { fill: #e78645; }
.fox-cheek { fill: #fff1df; }
.cat-head { fill: #9aa9b8; }
.owl-body { fill: #8a6f58; }
.owl-eye-bg { fill: #f8e7bd; }
.owl-beak { fill: #e3a63b; }
.panda-ear,
.panda-patch,
.panda-eye { fill: #26384a; }
.panda-face { fill: #f7f8fb; }
.turtle-shell { fill: #66b99a; }
.turtle-head,
.turtle-leg { fill: #8bca9f; }
.turtle-pattern {
  fill: none;
  stroke: #327b61;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.student-add-form {
  display: grid;
  gap: 1rem;
}

.student-add-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.animal-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.animal-picker legend {
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.animal-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.animal-choice {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.animal-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.animal-choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  background: color-mix(in srgb, var(--primary) 7%, var(--surface-strong));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 12%, transparent);
}

.animal-choice .animal-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
}

.student-add-note {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #eef6fb;
  color: #42566d;
  font-size: 0.86rem;
}

.evaluation-track-picker {
  display: grid;
  gap: .7rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.evaluation-track-picker legend { padding: 0 .35rem; font-weight: 800; }
.evaluation-track-option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem;
  border-radius: 14px;
  background: rgba(220, 239, 245, .42);
  cursor: pointer;
}
.evaluation-track-option input { margin-top: .25rem; accent-color: var(--primary); }
.evaluation-track-option strong,
.evaluation-track-option small { display: block; }
.evaluation-track-option small { margin-top: .2rem; color: var(--muted); }

.student-profile-edit-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.student-profile-edit-form .profile-edit-note,
.student-profile-edit-form .primary-button { grid-column: 1 / -1; }
.student-profile-edit-form textarea { min-height: 7rem; resize: vertical; }
.profile-edit-note { margin: 0; color: var(--muted); }

.teaching-material-manager { margin-bottom: 1.2rem; }
.teaching-material-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.teaching-material-form .primary-button { align-self: end; }
.teaching-material-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.material-library-heading { margin-bottom:1rem; }
.material-library-filters { display:grid; grid-template-columns:minmax(0,2fr) repeat(2,minmax(9rem,1fr)); gap:.8rem; margin:1rem 0; }
.empty-material-library { grid-column:1 / -1; padding:1.2rem; color:var(--muted); text-align:center; }
.teaching-material-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgba(52, 78, 92, .08);
}
.teaching-material-card .badge + .badge { margin-left: .4rem; }
.material-video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: #dceff5; }
.document-preview { display: flex; flex-direction: column; gap: .25rem; padding: 1.2rem; border-radius: 16px; background: #eef7fb; }
.document-preview small { color: var(--muted); }
.teaching-material-card a.secondary-button { display: inline-flex; align-items: center; text-decoration: none; }

@media (max-width: 760px) {
  .student-profile-edit-form,
  .teaching-material-form,
  .teaching-material-grid,
  .material-library-filters { grid-template-columns: 1fr; }
}

.student-back-button {
  justify-self: start;
  min-height: 42px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-strong);
  color: var(--primary);
  font-weight: 850;
  box-shadow: 0 3px 8px rgba(15, 35, 65, 0.05);
}

.private-profile-header {
  align-items: center;
}

.private-profile-copy h2 {
  margin: 0.15rem 0 0.35rem;
  color: #1e3a5f;
}

.private-profile-copy h2 span {
  color: #64748b;
  font-size: 0.68em;
}

.private-profile-copy > p:not(.eyebrow) {
  margin: 0 0 0.75rem;
  color: #526174;
}

.profile-top {
  gap: 1rem;
  align-items: flex-start;
}

.avatar {
  display: grid;
  place-items: center;
  width: 5.5rem;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 22px;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

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

.profile-card {
  min-height: 10rem;
}

.timeline {
  display: grid;
  gap: 0.8rem;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 0.8rem;
}

.timeline-item::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--primary);
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 13rem;
  border: 2px dashed color-mix(in srgb, var(--primary) 38%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  text-align: center;
  padding: 1.5rem;
  transition: 180ms ease;
}

.upload-zone.drag-over {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  transform: scale(1.01);
}

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

.field {
  display: grid;
  gap: 0.35rem;
}

.field span,
.field label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: var(--surface-strong);
  color: var(--text);
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

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

.tool-card {
  display: grid;
  gap: 0.8rem;
  transition: 180ms ease;
}

.tool-meta,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.material-card {
  display: grid;
  gap: 0.7rem;
}

.communication-module-shell {
  width: 100%;
  min-height: calc(100vh - 9rem);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.communication-module-frame {
  display: block;
  width: 100%;
  height: auto;
  min-height: calc(100vh - 9rem);
  overflow: hidden;
  border: 0;
  background: transparent;
}

.view-root:has(.cute-schedule-shell) {
  padding-right: clamp(9rem, 14vw, 11rem);
}

.cute-schedule-shell {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.6vw, 1.7rem);
  border: 1px solid rgba(77, 143, 119, 0.13);
  border-radius: 26px;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 216, 168, 0.42), transparent 17rem),
    radial-gradient(circle at 95% 85%, rgba(185, 213, 232, 0.38), transparent 19rem),
    #fffdf7;
  box-shadow: 0 14px 38px -20px rgba(53, 79, 74, 0.28);
  overflow: hidden;
  isolation: isolate;
}

.schedule-heading,
.schedule-goal-bank,
.schedule-day-panel {
  position: relative;
  z-index: 2;
}

.schedule-heading {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: flex-start;
  gap: .65rem 1.25rem;
}

.schedule-heading h2,
.schedule-heading p {
  margin: 0.15rem 0 0;
}

.schedule-heading h2 {
  color: #294c62;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.schedule-heading-lower > p {
  color: #526b72;
}

.schedule-week-control {
  display: grid;
  justify-items: stretch;
  gap: .45rem;
  min-width: 12rem;
}

.schedule-heading-lower { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:1.25rem; }
.schedule-week-buttons { display:flex; flex-direction:row; align-items:center; gap:.75rem; flex:0 0 auto; }

.schedule-week-control span {
  color: #52716a;
  font-size: 0.82rem;
  font-weight: 850;
}

.schedule-week-control button {
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(95, 143, 176, 0.2);
  border-radius: 12px;
  background: #eaf4fa;
  color: #315d78;
  font-weight: 850;
}

.schedule-days {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}

.schedule-days button {
  min-height: 42px;
  padding: 0.5rem 0.4rem;
  border: 1px solid rgba(95, 143, 176, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: #4b6470;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.schedule-days button:hover {
  transform: translateY(-1px);
}

.schedule-days button[aria-current="date"] {
  border-color: rgba(77, 169, 130, 0.22);
  background: #dff4ea;
  color: #276f55;
  box-shadow: 0 5px 12px rgba(77, 169, 130, 0.13);
}

.schedule-student-picker {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(10rem, 0.25fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(95, 143, 176, 0.14);
  border-radius: 18px;
  background: rgba(237, 247, 252, 0.78);
}

.schedule-student-picker h3,
.schedule-student-picker p {
  margin: 0;
}

.schedule-student-picker p {
  color: #607985;
  font-size: 0.82rem;
}

.schedule-student-options {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.1rem 0.1rem 0.25rem;
}

.schedule-student-options > button {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.5rem;
  min-width: 9.5rem;
  min-height: 54px;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(95, 143, 176, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: #36566a;
  text-align: left;
}

.schedule-student-options > button[aria-pressed="true"] {
  border-color: rgba(77, 169, 130, 0.38);
  background: #e4f6ed;
  box-shadow: 0 5px 12px rgba(77, 169, 130, 0.13);
}

.schedule-student-options strong,
.schedule-student-options small {
  display: block;
}

.schedule-student-options small {
  margin-top: 0.1rem;
  color: #6a7f86;
}

.schedule-student-animal {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;
  border-radius: 0.8rem;
  background: #fff7e9;
  overflow: hidden;
}

.schedule-student-animal svg {
  width: 90%;
  height: 90%;
}

.schedule-goal-bank {
  display: grid;
  grid-template-columns: minmax(12rem, 0.35fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px dashed rgba(77, 169, 130, 0.3);
  border-radius: 18px;
  background: rgba(236, 248, 240, 0.82);
}

.schedule-goal-bank h3,
.schedule-goal-bank p {
  margin: 0;
}

.schedule-goal-bank p {
  color: #587269;
  font-size: 0.84rem;
}

.schedule-goal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.schedule-goal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(77, 169, 130, 0.2);
  border-radius: 999px;
  background: #fff;
  color: #365c51;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: grab;
}

.schedule-goal-chip span {
  color: #e5a83e;
}

.schedule-day-panel {
  padding: 1rem;
  border: 1px solid rgba(95, 143, 176, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 18px -12px rgba(30, 58, 95, 0.2);
}

.schedule-day-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.schedule-day-title p,
.schedule-day-title h3 {
  margin: 0;
}

.schedule-day-title p {
  color: #688077;
  font-size: 0.78rem;
  font-weight: 750;
}

.schedule-day-title h3 {
  color: #294c62;
  font-size: 1.25rem;
}

.schedule-animal {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1.1rem;
  background: #f9edd8;
  overflow: hidden;
}

.schedule-animal svg {
  width: 90%;
  height: 90%;
}

.schedule-slots {
  display: grid;
  gap: 0.65rem;
}

.schedule-slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 6.2rem;
  padding: 0.75rem;
  border: 1px solid rgba(30, 58, 95, 0.07);
  border-radius: 16px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.schedule-pastel-1 { background: #edf7fc; }
.schedule-pastel-2 { background: #edf8f1; }
.schedule-pastel-3 { background: #fff3df; }

.schedule-slot:hover,
.schedule-slot.drag-over {
  border-color: rgba(77, 169, 130, 0.4);
  box-shadow: 0 8px 18px -12px rgba(49, 93, 120, 0.28);
  transform: translateY(-1px);
}

.schedule-slot.drag-over {
  outline: 3px dashed rgba(77, 169, 130, 0.35);
  outline-offset: 2px;
}

.schedule-complete {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 3px 10px rgba(49, 93, 120, 0.09);
}

.schedule-complete svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: #cad7db;
  transition: fill 180ms ease, transform 180ms ease;
}

.schedule-complete[aria-pressed="true"] svg {
  fill: #f1b84b;
  transform: scale(1.12) rotate(8deg);
}

.schedule-slot-main {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.35rem;
  border: 0;
  background: transparent;
  color: #294c62;
  text-align: left;
}

.schedule-time {
  color: #607985;
  font-size: 0.78rem;
  font-weight: 850;
}

.schedule-slot-main strong {
  font-size: 1rem;
}

.schedule-linked-goal {
  color: #70838a;
  font-size: 0.82rem;
}

.schedule-linked-goal.has-goal {
  color: #277358;
  font-weight: 750;
}

.schedule-edit-hint {
  color: #71878b;
  font-size: 0.73rem;
  font-weight: 700;
}

.schedule-decoration {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.flower-one {
  top: -1rem;
  right: 18%;
  width: 5.5rem;
  fill: #f7c9b2;
  opacity: 0.48;
  transform: rotate(12deg);
}

.flower-one circle { fill: #f1b84b; }

.leaf-sprig {
  right: -1.25rem;
  bottom: 1rem;
  width: 6.5rem;
  fill: #abd8bd;
  opacity: 0.54;
}

.leaf-sprig path {
  fill: none;
  stroke: #73b493;
  stroke-width: 3;
  stroke-linecap: round;
}

.schedule-slot-form {
  display: grid;
  gap: 1rem;
}

.schedule-time-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.board-cell {
  display: grid;
  place-items: center;
  min-height: 4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  text-align: center;
  font-weight: 800;
}

.chat-shell {
  display: grid;
  grid-template-rows: minmax(25rem, 62vh) auto;
  overflow: hidden;
}

.atlas-welcome {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--atlas-blue-strong) 24%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--atlas-blue) 34%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface-strong) 76%, transparent);
}

.atlas-welcome h2 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
}

.atlas-welcome p:last-child {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
}

.suggestions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--atlas-blue-strong) 20%, var(--line));
  background: color-mix(in srgb, var(--atlas-blue) 7%, transparent);
}

.chat-log {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 1rem;
  overflow-y: auto;
}

.message {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.7rem;
  max-width: 74ch;
}

.message.teacher {
  justify-self: end;
}

.message-bubble {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.atlas-bubble {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--atlas-blue) 26%, var(--surface-strong)), var(--surface-strong));
  border-color: color-mix(in srgb, var(--atlas-blue-strong) 30%, var(--line));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--atlas-blue-strong) 14%, transparent);
}

.message.teacher .message-bubble {
  background: var(--primary);
  color: #fff;
}

.message time {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.message.teacher time {
  color: rgba(255, 255, 255, 0.78);
}

.teacher-avatar {
  width: 2.4rem;
  border-radius: 12px;
  background: var(--primary);
}

.atlas-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.7rem;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 50%;
  background: color-mix(in srgb, var(--atlas-blue) 28%, var(--surface-strong));
  border: 2px solid color-mix(in srgb, var(--atlas-gold) 64%, var(--surface-strong));
  box-shadow: 0 0.65rem 1.3rem color-mix(in srgb, var(--atlas-blue-strong) 30%, transparent);
  overflow: hidden;
}

.atlas-avatar-large {
  width: clamp(4.4rem, 9vw, 6.4rem);
}

.atlas-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
}

.schedule-week-buttons button { min-height:40px; padding:.55rem .85rem; border:1px solid rgba(95,143,176,.2); border-radius:12px; background:#eaf4fa; color:#315d78; font-weight:800; white-space:nowrap; }

.schedule-days button span,.schedule-days button small { display:block; white-space:nowrap; }
.schedule-days button small { margin-top:.18rem; color:var(--muted); font-size:.68rem; }
.schedule-date-picker { display:grid; gap:.15rem; color:#52716a; font-size:.68rem; font-weight:850; }
.schedule-date-picker input { min-height:40px; padding:.45rem .6rem; border:1px solid rgba(95,143,176,.2); border-radius:12px; background:var(--surface-strong); color:var(--text); font:inherit; }
.schedule-empty-day { display:grid; gap:.25rem; padding:1.25rem; border:1px dashed var(--line); border-radius:18px; color:var(--muted); text-align:center; }
.schedule-selected-events { margin-top:1rem; }
.calendar-view-schedule { margin:0 0 .85rem; }

.message-bubble p { margin: 0 0 .65rem; }
.message-bubble p:last-of-type { margin-bottom: 0; }
.message-bubble ul { margin: .45rem 0 .65rem; padding-left: 1.25rem; }
.message-bubble li + li { margin-top: .35rem; }
.streaming-cursor {
  display: inline-block;
  width: .55rem;
  height: 1rem;
  margin-left: .2rem;
  border-radius: 2px;
  background: currentColor;
  vertical-align: -.12rem;
  animation: atlas-cursor 1s steps(2, start) infinite;
}
@keyframes atlas-cursor { 50% { opacity: 0; } }

.progress-layout {
  display: grid;
  grid-template-columns: minmax(19rem, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.progress-results-layout {
  display: grid;
  gap: 1rem;
  max-width: 58rem;
}

.progress-result-form {
  display: grid;
  gap: 0.9rem;
}

.progress-result-form > p:not(.eyebrow) {
  margin: -0.35rem 0 0.25rem;
  color: #526174;
}

.recorded-results h2,
.recorded-results p {
  margin: 0;
}

.result-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  display: grid;
  grid-template-columns: 6.8rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: 13px;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface-strong));
}

.result-list time {
  color: #607985;
  font-size: 0.82rem;
  font-weight: 800;
}

.result-list strong {
  color: #294c62;
}

.result-list p {
  margin-top: 0.2rem;
  color: #526174;
}

.report-student-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.report-student-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.35rem 0.8rem;
  align-items: center;
  min-height: 8.5rem;
  padding: 1rem;
  border: 1px solid rgba(30, 58, 95, 0.09);
  border-radius: 17px;
  background: var(--surface-strong);
  color: var(--text);
  text-align: left;
  box-shadow: 0 5px 14px -8px rgba(30, 58, 95, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.report-student-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -14px rgba(30, 58, 95, 0.28);
}

.report-student-card > span:nth-child(2) strong,
.report-student-card > span:nth-child(2) small {
  display: block;
}

.report-student-card > span:nth-child(2) strong {
  color: #294c62;
  font-size: 1.05rem;
}

.report-student-card > span:nth-child(2) small {
  color: #64748b;
}

.report-ready-badge {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #e6f5ef;
  color: #277358;
  font-size: 0.76rem;
  font-weight: 850;
}

.report-result-count {
  grid-column: 2 / -1;
  color: #607985;
  font-size: 0.83rem;
}

.report-preview-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0;
}

.report-preview-toolbar h2,
.report-preview-toolbar p {
  margin: 0.15rem 0 0;
}

.report-paper {
  display: grid;
  gap: 1rem;
  padding: clamp(1.3rem, 3vw, 2.25rem);
  border: 1px solid rgba(30, 58, 95, 0.1);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 15px 38px -22px rgba(30, 58, 95, 0.3);
  color: #24364a;
}

.report-paper-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e6edf2;
}

.report-paper-header h2,
.report-paper-header p {
  margin: 0;
}

.report-paper-header p {
  color: #52716a;
  font-size: 0.8rem;
  font-weight: 900;
}

.report-paper-header span:last-child {
  color: #6b7d8c;
  font-size: 0.82rem;
}

.report-intro {
  margin: 0;
  color: #526174;
}

.report-paper-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.report-paper .profile-card {
  border-color: #e7edf2;
  background: #fbfcfd;
  box-shadow: none;
}

.progress-history-header {
  margin-bottom: 0.75rem;
}

.recorded-results > .field {
  margin-bottom: 1rem;
}

.result-entry-meta {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.result-student-name {
  display: inline-flex;
  width: fit-content;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #e6f5ef;
  color: #276a57;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.result-list .empty-result-history {
  display: block;
  color: var(--muted);
  text-align: center;
}

.report-edit-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.report-edit-form[hidden],
.report-paper[hidden] {
  display: none !important;
}

.report-edit-form textarea {
  min-height: 7rem;
  resize: vertical;
}

.button-spinner {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.plan-save-status {
  margin: 1rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  color: #52716a;
  font-size: 0.85rem;
  font-weight: 750;
}

.modal-choice-copy {
  margin: 0 0 1rem;
  color: var(--muted);
}

.modal-choice-actions {
  justify-content: flex-end;
}

.plan-student-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.plan-student-choice {
  min-height: 7rem;
  text-align: center;
}

@media print {
  @page { size: A4 portrait; margin: 14mm; }
  html,
  body {
    width: 100%;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }
  body * { visibility: hidden !important; }
  #parentReport,
  #parentReport * { visibility: visible !important; }
  #parentReport {
    display: block !important;
    position: absolute !important;
    inset: 0 auto auto 0 !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  #parentReport::before,
  #parentReport::after { display: none !important; }
  #parentReport .report-paper-header,
  #parentReport .report-intro,
  #parentReport .profile-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  #parentReport .report-paper-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8mm !important;
  }
  #parentReport .profile-card {
    margin: 0 !important;
    box-shadow: none !important;
  }
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.7rem;
}

.slider-row output {
  min-width: 3rem;
  text-align: right;
  font-weight: 800;
}

.mood-picker {
  gap: 0.45rem;
  flex-wrap: wrap;
}

.mood-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.7rem;
  min-height: 44px;
  background: var(--surface-strong);
  color: var(--text);
}

.mood-button.active {
  background: var(--primary);
  color: #fff;
}

.progress-bar {
  height: 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 18%, transparent);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

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

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toggle input {
  width: 1.25rem;
  height: 1.25rem;
}

.search-results {
  position: sticky;
  top: 88px;
  z-index: 9;
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.search-result {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  min-height: 44px;
  background: var(--surface-strong);
  color: var(--text);
  text-align: left;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 14, 22, 0.52);
}

.modal {
  width: min(46rem, 100%);
  max-height: min(84vh, 48rem);
  overflow-y: auto;
  padding: 1.25rem;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
}

.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: grid;
  gap: 0.6rem;
}

.atlas-guide-widget {
  position: fixed;
  right: clamp(0.5rem, 2vw, 1.35rem);
  bottom: clamp(0.4rem, 1.8vw, 1rem);
  z-index: 65;
  width: clamp(8.5rem, 12vw, 10.75rem);
  border: 0;
  padding: 0;
  background: transparent;
  filter: drop-shadow(0 1.2rem 1.35rem rgba(31, 45, 75, 0.28));
  transform-origin: 50% 100%;
  animation: atlasWidgetPop 620ms cubic-bezier(0.2, 1.35, 0.35, 1) both, atlasImageIdle 4.8s ease-in-out 900ms infinite;
  transition: opacity 220ms ease, visibility 220ms ease, transform 260ms ease, filter 220ms ease;
}

.atlas-guide-widget.is-chat-open {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  animation: none;
  transform: translateY(1rem) scale(.88);
}

.atlas-guide-widget:hover {
  filter: drop-shadow(0 1.45rem 1.6rem rgba(31, 45, 75, 0.34)) saturate(1.08);
}

.atlas-corner-bubble {
  position: absolute;
  right: 0;
  top: -4.65rem;
  z-index: 2;
  width: min(10.5rem, 52vw);
  padding: 0.72rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--atlas-blue-strong) 34%, var(--line));
  border-radius: 18px 18px 6px 18px;
  background: color-mix(in srgb, var(--surface-strong) 94%, var(--atlas-blue));
  box-shadow: 0 16px 38px rgba(31, 45, 75, 0.16);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.25;
  pointer-events: none;
  animation: atlasBubblePulse 2.8s ease-in-out infinite;
}

.atlas-corner-bubble::after {
  content: "";
  position: absolute;
  right: 1.65rem;
  bottom: -0.42rem;
  width: 0.8rem;
  height: 0.8rem;
  border-right: 1px solid color-mix(in srgb, var(--atlas-blue-strong) 34%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--atlas-blue-strong) 34%, var(--line));
  background: inherit;
  transform: rotate(45deg);
}

.atlas-standing-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 0 1px rgba(86, 53, 28, 0.95))
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.92));
  pointer-events: none;
  user-select: none;
}

.toast {
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.loading-state {
  display: grid;
  place-items: center;
  gap: 0.65rem;
  min-height: 16rem;
  text-align: center;
}

.analysis-progress {
  width: min(20rem, 82%);
  height: 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  overflow: hidden;
}

.analysis-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  animation: analysisProgress 1.15s ease-in-out infinite;
}

.plan-summary {
  display: grid;
  gap: 1rem;
}

.plan-summary h3 {
  margin: 0.15rem 0 0;
}

.plan-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.tool-access-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0.25rem 0 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: #eaf7f1;
  color: #176b4a;
  font-size: 0.88rem;
  font-weight: 800;
}

.plan-summary-card {
  min-height: 10rem;
  padding: 1rem;
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface-strong));
}

.plan-summary-card h4 {
  margin: 0 0 0.6rem;
  color: #1e3a5f;
}

.plan-summary-card ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.1rem;
  color: #42566d;
}

.parser-error {
  border-color: rgba(180, 35, 24, 0.15);
  background: color-mix(in srgb, #fff0f0 72%, var(--surface-strong));
}

@keyframes analysisProgress {
  0% { transform: translateX(-120%); }
  50% { transform: translateX(95%); }
  100% { transform: translateX(240%); }
}

.spinner {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-top-color: var(--primary);
  animation: spin 800ms linear infinite;
}

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 320ms ease both;
}

.slide-up {
  animation: slideUp 360ms ease both;
}

.app-footer {
  padding: 0 2rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes rise {
  from {
    height: 10%;
  }
}

@keyframes atlasWidgetPop {
  0% {
    opacity: 0;
    transform: translateY(2rem) scale(0.74) rotate(4deg);
  }
  62% {
    opacity: 1;
    transform: translateY(-0.45rem) scale(1.04) rotate(-1.5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes atlasImageIdle {
  0%,
  100% {
    transform: translateY(0) scaleY(1);
  }
  42% {
    transform: translateY(-0.28rem) scaleY(1.012);
  }
  72% {
    transform: translateY(-0.08rem) scaleY(0.996);
  }
}

@keyframes atlasBubblePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 16px 38px rgba(31, 45, 75, 0.16);
  }
  50% {
    transform: scale(1.035);
    box-shadow: 0 20px 46px rgba(31, 45, 75, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(88vw, 292px);
    transform: translateX(-104%);
    transition: 220ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle,
  .brand-mark.small {
    display: grid;
  }

  .stats-grid,
  .tools-grid,
  .profile-grid,
  .student-preview-grid,
  .plan-summary-grid,
  .progress-layout,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    min-width: 0;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 0.65rem;
    min-height: auto;
    padding: 0.72rem;
  }

  .title-block {
    min-width: 0;
  }

  .title-block h1 {
    font-size: 1rem;
  }

  main {
    padding: 0.85rem;
    padding-bottom: 11rem;
  }

  .search-shell {
    grid-column: 1 / -1;
    max-width: none;
  }

  .hero-panel,
  .dashboard-grid,
  .stats-grid,
  .student-preview-grid,
  .plan-summary-grid,
  .recommendation-row,
  .profile-grid,
  .tools-grid,
  .materials-grid,
  .form-grid,
  .filter-grid,
  .progress-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .student-list-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-list-actions {
    width: 100%;
    justify-content: space-between;
  }

  .student-add-fields {
    grid-template-columns: 1fr;
  }

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

  .student-preview-facts {
    grid-template-columns: 1fr;
  }

  .view-root:has(.dashboard-welcome) {
    padding-right: 0;
  }

  .view-root:has(.cute-schedule-shell) {
    padding-right: 0;
  }

  .cute-schedule-shell {
    margin-bottom: 10rem;
    border-radius: 20px;
  }

  .schedule-heading,
  .schedule-goal-bank,
  .schedule-student-picker {
    grid-template-columns: 1fr;
  }

  .schedule-heading {
    flex-direction: column;
  }

  .schedule-week-control {
    width: 100%;
    justify-items: start;
  }

  .schedule-days {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .schedule-days button {
    flex: 0 0 7rem;
  }

  .schedule-slot {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .schedule-edit-hint {
    grid-column: 2;
  }

  .schedule-time-fields {
    grid-template-columns: 1fr;
  }

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

  .report-student-grid,
  .report-paper-grid {
    grid-template-columns: 1fr;
  }

  .report-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-welcome {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .dashboard-welcome-title {
    align-items: flex-start;
  }

  .dashboard-teacher-avatar {
    width: 3.6rem;
    height: 3.6rem;
  }

  .view-root:has(.dashboard-welcome) .dashboard-grid {
    margin-bottom: 10rem;
  }

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

  .hero-panel,
  .glass-card,
  .stat-card,
  .tool-card,
  .profile-card,
  .material-card,
  .settings-panel {
    padding: 0.9rem;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button,
  .toolbar .primary-button,
  .toolbar .secondary-button,
  .report-actions .primary-button,
  .report-actions .secondary-button {
    width: 100%;
    justify-content: center;
  }

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

  .chat-shell {
    grid-template-rows: minmax(20rem, 68vh) auto;
  }

  .communication-module-shell,
  .communication-module-frame {
    min-height: calc(100vh - 6rem);
  }

  .message {
    grid-template-columns: 2.4rem minmax(0, 1fr);
    max-width: 100%;
  }

  .message.teacher {
    max-width: 92%;
  }

  .atlas-welcome {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .atlas-guide-widget {
    width: 7.75rem;
    right: max(0.2rem, env(safe-area-inset-right));
    bottom: max(0.2rem, env(safe-area-inset-bottom));
  }

  .atlas-corner-bubble {
    right: 0;
    top: -4.15rem;
    width: min(11.5rem, 66vw);
    font-size: 0.78rem;
  }
}

/* Hyrja sipas rolit, duke ruajtur gjuhën vizuale ekzistuese */
.role-gate { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:2rem; overflow:auto; background:radial-gradient(circle at 8% 14%,rgba(199,230,245,.96),transparent 27rem),radial-gradient(circle at 88% 10%,rgba(249,180,207,.86),transparent 29rem),radial-gradient(circle at 78% 88%,rgba(255,209,224,.78),transparent 25rem),linear-gradient(145deg,#fff1f6,#f7fbff 54%,#ffe7f0); }
.role-welcome { width:min(980px,100%); text-align:center; }
.role-welcome>.brand-mark { margin:auto; }
.role-welcome h1,.role-login-card h1 { margin:.45rem 0; font-size:clamp(2.2rem,5vw,4rem); }
.role-lead { color:var(--muted); font-size:1.08rem; }
.role-choice-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1.2rem; margin-top:2.3rem; }
.role-choice { padding:2rem 1.3rem; border:1px solid var(--line); border-radius:var(--radius); color:var(--text); background:rgba(255,254,249,.96); box-shadow:var(--shadow); transition:transform .2s,border-color .2s; }
.role-choice.role-parent { background:linear-gradient(155deg,#fff,#fbe2ea); }
.role-choice.role-teacher { background:linear-gradient(155deg,#fff,#dceff5); }
.role-choice.role-admin { background:linear-gradient(155deg,#fff,#eee6fb); }
.role-choice:hover { transform:translateY(-6px); border-color:var(--primary); }
.role-choice strong,.role-choice small { display:block; }
.role-choice strong { margin:.8rem 0 .35rem; font-size:1.25rem; }
.role-choice small { color:var(--muted); }
.role-figure { display:grid; place-items:center; width:5.8rem; height:5.8rem; margin:auto; border:3px solid rgba(255,255,255,.9); border-radius:42% 58% 55% 45%; color:#fff; background:linear-gradient(145deg,#b9dff0,#f4b9ca); box-shadow:0 8px 20px rgba(92,120,145,.16); font-size:2.45rem; }
.role-login-card { width:min(460px,100%); padding:2rem; border:1px solid var(--line); border-radius:var(--radius); background:rgba(255,254,249,.97); box-shadow:var(--shadow); }
.role-login-actions { display:grid; grid-template-columns:1fr 1fr; gap:.7rem; margin-top:1rem; }
.role-login-card input { pointer-events:auto; user-select:text; }
.role-logout { width:calc(100% - 2rem); margin:1.5rem 1rem 0; padding:.7rem; border:1px solid rgba(255,255,255,.3); border-radius:12px; color:inherit; background:transparent; }
.admin-role-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.2rem; margin:1.2rem 0; }
.admin-person-row,.admin-link-row { display:grid; grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) auto; gap:.7rem; align-items:center; padding:.8rem 0; border-bottom:1px solid var(--line); }
.admin-person-row { grid-template-columns:1fr auto; }
.admin-person-row small { display:block; color:var(--muted); }
.admin-link-row { grid-template-columns:minmax(130px,1fr) minmax(150px,1fr) minmax(150px,1fr) auto auto; }
.admin-link-row select { width:100%; padding:.7rem; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.admin-student-summary { display:flex; flex-direction:column; gap:.25rem; }
.admin-student-summary small { color:var(--muted); font-weight:700; line-height:1.3; }
.admin-email-note { padding:.8rem; border-radius:12px; color:#79502f; background:#fff0d7; }
.progress-student-picker { margin-bottom:1.2rem; }
@media (max-width:760px) { .role-choice-grid,.admin-role-grid,.role-login-actions { grid-template-columns:1fr; } .admin-link-row { grid-template-columns:1fr; } }

.year-calendar {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.4vw, 1.6rem);
  border: 1px solid rgba(70, 128, 132, 0.14);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface-strong) 90%, #e9f7f5);
  box-shadow: 0 12px 30px -24px rgba(32, 80, 88, 0.35);
}
.year-calendar-header,.important-dates-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.year-calendar-header h3,.year-calendar-header p { margin:.12rem 0; }
.year-calendar-actions { display:flex; gap:.45rem; }
.year-calendar-actions button,.important-dates-heading button,.calendar-event-actions button { border:1px solid var(--line); border-radius:999px; padding:.5rem .75rem; background:var(--surface-strong); color:var(--text); font-weight:800; }
.schedule-calendar-button { border-color:color-mix(in srgb,var(--primary) 34%,var(--line))!important; background:color-mix(in srgb,var(--primary) 10%,var(--surface-strong))!important; color:var(--primary)!important; }
.modal:has(.year-calendar) { width:min(78rem,100%); max-height:92vh; }
.calendar-month-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem; }
.calendar-month { padding:.8rem; border:1px solid rgba(70,128,132,.12); border-radius:18px; background:var(--surface-strong); }
.calendar-month h4 { margin:0 0 .55rem; color:#315c67; }
.calendar-weekdays,.calendar-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.18rem; }
.calendar-weekdays { margin-bottom:.25rem; color:var(--muted); font-size:.67rem; font-weight:900; text-align:center; }
.calendar-date { position:relative; aspect-ratio:1; min-width:0; border:0; border-radius:9px; background:transparent; color:var(--text); font-size:.72rem; }
.calendar-date:hover,.calendar-date:focus-visible { background:#e7f5f2; }
.calendar-date.is-today { outline:2px solid var(--primary); outline-offset:-2px; font-weight:900; }
.calendar-date.is-selected { box-shadow:inset 0 0 0 2px #315f68; }
.calendar-date.has-events { background:#fff0d9; color:#74491f; font-weight:900; }
.calendar-date small { position:absolute; right:1px; top:1px; display:grid; place-items:center; width:13px; height:13px; border-radius:50%; background:#e28a54; color:white; font-size:.54rem; }
.calendar-event-list { display:grid; gap:.65rem; margin-bottom:1.2rem; }
.calendar-event-list article { display:grid; grid-template-columns:auto 1fr auto; gap:.7rem; align-items:center; padding:.75rem; border:1px solid var(--line); border-radius:16px; background:color-mix(in srgb,var(--surface-strong) 92%,#e8f6f3); }
.calendar-event-list strong,.calendar-event-list small { display:block; }
.calendar-event-list small { margin-top:.2rem; color:var(--muted); }
.calendar-event-type { padding:.35rem .55rem; border-radius:999px; background:#fff0d9; color:#7b4c21; font-size:.72rem; font-weight:900; }
.calendar-event-actions { display:flex; gap:.35rem; }
.calendar-event-form { display:grid; gap:.8rem; padding-top:1rem; border-top:1px solid var(--line); }
.calendar-event-form h3 { margin:0; }
.calendar-event-form-row { display:grid; grid-template-columns:1fr 1fr; gap:.7rem; }
.calendar-no-events { margin:0; padding:.8rem; border-radius:14px; background:var(--surface); color:var(--muted); }
.dashboard-summary-grid .important-dates-card { display:block; min-width:0; min-height:9rem; padding:1rem 1.1rem; overflow:hidden; }
.dashboard-summary-grid .important-dates-heading { display:flex; align-items:baseline; justify-content:space-between; gap:.75rem; }
.dashboard-summary-grid .important-dates-heading h3 { margin:0; overflow:hidden; color:var(--text); font-size:1rem; font-weight:800; line-height:1.2; letter-spacing:0; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-summary-grid .important-dates-heading span { flex:0 0 auto; color:var(--muted); font-size:.7rem; line-height:1.2; }
.important-dates-heading button { color:var(--primary); white-space:nowrap; }
.dashboard-summary-grid .important-dates-card ul { display:grid; gap:0; width:100%; margin:.65rem 0 0; padding:0; list-style:none; }
.dashboard-summary-grid .important-dates-card li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.65rem; align-items:center; width:100%; padding:.42rem 0; border-bottom:1px solid color-mix(in srgb,var(--line) 70%,transparent); line-height:1.2; }
.dashboard-summary-grid .important-dates-card li:last-child { border-bottom:0; }
.important-dates-card time { min-width:3.3rem; padding:.3rem .4rem; border-radius:10px; background:#fff0d9; color:#7b4c21; font-size:.7rem; font-weight:900; text-align:center; }
.dashboard-summary-grid .important-dates-card li strong { display:block; min-width:0; margin:0; overflow:hidden; color:var(--text); font-size:.82rem; font-weight:700; line-height:1.25; letter-spacing:0; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-summary-grid .important-dates-card li small { color:var(--muted); font-size:.72rem; font-weight:650; line-height:1.2; white-space:nowrap; }
.calendar-automatic-badge { padding:.35rem .55rem; border-radius:999px; background:#e8f6ef; color:#267052; font-size:.72rem; font-weight:900; }
.important-date-empty { display:block!important; color:var(--muted); font-size:.82rem; }
@media (max-width:1000px) { .calendar-month-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .calendar-month-grid,.calendar-event-form-row { grid-template-columns:1fr; } .year-calendar-header { flex-direction:column; } .calendar-event-list article { grid-template-columns:1fr; } .dashboard-summary-grid .important-dates-heading { align-items:flex-start; flex-direction:column; gap:.2rem; } .dashboard-summary-grid .important-dates-card li { grid-template-columns:1fr; gap:.18rem; } }

@media (max-width:760px) { .schedule-heading { grid-template-columns:1fr; } .schedule-week-control,.schedule-heading-lower { grid-column:1; width:100%; } .schedule-heading-lower { align-items:flex-start; flex-direction:column; } .schedule-week-buttons { width:100%; } .schedule-week-buttons button { flex:1 1 0; } }

.schedule-read-only-badge { display:inline-flex; align-items:center; min-height:2rem; padding:.35rem .7rem; border-radius:999px; background:#e9f5f4; color:#315f68; font-size:.75rem; font-weight:900; white-space:nowrap; }

/* Ilustrime te sfondit: pa emoji dhe pa penguar permbajtjen */
.workspace,
main,
.view-root {
  position: relative;
}

main::before {
  content: "";
  position: fixed;
  right: 1.5rem;
  bottom: 1.2rem;
  width: clamp(10rem, 18vw, 17rem);
  aspect-ratio: 300 / 170;
  background: url("../assets/images/animal-friends.svg") center / contain no-repeat;
  opacity: 0.095;
  pointer-events: none;
  z-index: 0;
}

main::after {
  content: "";
  position: fixed;
  left: calc(var(--sidebar-width, 17rem) + 1rem);
  bottom: 0.2rem;
  width: clamp(9rem, 16vw, 15rem);
  aspect-ratio: 260 / 150;
  background: url("../assets/images/meadow-corner.svg") center / contain no-repeat;
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}

.view-root,
.search-results {
  z-index: 1;
}

.sidebar::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  bottom: 1rem;
  width: 96%;
  aspect-ratio: 260 / 150;
  background: url("../assets/images/meadow-corner.svg") bottom center / contain no-repeat;
  opacity: 0.22;
  pointer-events: none;
}

.hero-panel::before,
.tool-card::before,
.student-preview-card::before,
.report-student-card::before,
.settings-panel::before {
  content: "";
  position: absolute;
  right: -1.7rem;
  bottom: -1.25rem;
  width: 8rem;
  aspect-ratio: 230 / 180;
  background: url("../assets/images/bunny-cloud.svg") center / contain no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

.tool-card:nth-child(even)::before,
.student-preview-card:nth-child(even)::before,
.report-student-card:nth-child(even)::before {
  width: 9rem;
  aspect-ratio: 300 / 170;
  background-image: url("../assets/images/animal-friends.svg");
  opacity: 0.085;
}

.cute-schedule-shell {
  background-image:
    url("../assets/images/meadow-corner.svg"),
    linear-gradient(145deg, rgba(255, 254, 250, 0.96), rgba(230, 245, 241, 0.86));
  background-repeat: no-repeat;
  background-position: right bottom, center;
  background-size: min(22rem, 42%) auto, cover;
}

.report-paper {
  background-image:
    url("../assets/images/bunny-cloud.svg"),
    linear-gradient(var(--surface-strong), var(--surface-strong));
  background-repeat: no-repeat;
  background-position: right 1rem bottom 1rem, center;
  background-size: 8rem auto, cover;
}

.api-key-card::before {
  content: "";
  position: absolute;
  right: -1rem;
  top: -1.5rem;
  width: 9rem;
  aspect-ratio: 230 / 180;
  background: url("../assets/images/bunny-cloud.svg") center / contain no-repeat;
  opacity: 0.16;
  pointer-events: none;
}

.api-key-card {
  position: relative;
  overflow: hidden;
}

@media (max-width: 760px) {
  main::before {
    width: 9rem;
    opacity: 0.075;
  }

  main::after,
  .sidebar::after {
    display: none;
  }

  .hero-panel::before,
  .tool-card::before,
  .student-preview-card::before,
  .report-student-card::before {
    width: 6.5rem;
    opacity: 0.075;
  }
}

@media (prefers-reduced-motion: reduce) {
  main::before,
  main::after,
  .sidebar::after {
    transform: none;
  }
}

/* PlanifikoMeAtlas: sistemi i ngrohte vizual ne gjithe aplikacionin */
.workspace {
  background:
    radial-gradient(circle at 88% 7%, rgba(247, 185, 207, 0.38), transparent 28rem),
    radial-gradient(circle at 18% 42%, rgba(255, 214, 181, 0.28), transparent 30rem),
    radial-gradient(circle at 78% 82%, rgba(190, 224, 239, 0.3), transparent 26rem),
    linear-gradient(145deg, #fff9f5 0%, #fff5f8 48%, #f6fbfd 100%);
}

.sidebar {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 222, 194, 0.94), transparent 12rem),
    radial-gradient(circle at 95% 48%, rgba(248, 193, 212, 0.4), transparent 15rem),
    linear-gradient(180deg, rgba(255, 250, 245, 0.97), rgba(238, 247, 249, 0.95));
  border-right-color: rgba(95, 159, 176, 0.16);
  box-shadow: 10px 0 34px rgba(72, 120, 128, 0.05);
}

.topbar {
  background: linear-gradient(90deg, rgba(255, 249, 243, 0.88), rgba(255, 238, 245, 0.82), rgba(245, 251, 253, 0.84));
  border-bottom-color: rgba(95, 159, 176, 0.13);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .workspace,
body[data-theme="dark"] .workspace {
  background:
    radial-gradient(circle at 88% 8%, rgba(183, 103, 139, 0.15), transparent 28rem),
    radial-gradient(circle at 18% 45%, rgba(192, 124, 82, 0.12), transparent 30rem),
    linear-gradient(145deg, #182b2e, #21383b 58%, #17282b);
}

.brand-mark {
  border-radius: 18px;
  background: linear-gradient(145deg, var(--atlas-blue), #dff2ef 56%, var(--atlas-peach));
  color: var(--atlas-ink);
  box-shadow: 0 7px 18px rgba(72, 120, 128, 0.12);
}

.sidebar-brand strong,
.title-block h1,
h1,
h2,
h3 {
  font-family: "Nunito", "Quicksand", ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  letter-spacing: -0.018em;
}

.nav-list a,
.nav-list button,
.nav-item {
  border-radius: 18px;
}

.nav-list > :nth-child(3n + 1) .nav-icon { background: var(--pastel-blue); }
.nav-list > :nth-child(3n + 2) .nav-icon { background: var(--cream); }
.nav-list > :nth-child(3n) .nav-icon { background: var(--pastel-green); }

.nav-list a:hover,
.nav-list button:hover,
.nav-item:hover {
  background: rgba(220, 239, 245, 0.72);
}

.nav-list .active,
.nav-item.active {
  background: linear-gradient(135deg, var(--pastel-blue), var(--pastel-green));
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px rgba(95, 159, 176, 0.13), var(--shadow-soft);
}

.hero-panel,
.glass-card,
.stat-card,
.tool-card,
.profile-card,
.material-card,
.settings-panel,
.student-preview-card,
.report-student-card,
.report-paper,
.chat-shell,
.search-results,
.cute-schedule-shell,
.api-key-card,
.modal,
[class*="-panel"] {
  border-color: var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.hero-panel,
.glass-card,
.stat-card,
.tool-card,
.profile-card,
.material-card,
.settings-panel,
.student-preview-card,
.report-student-card {
  position: relative;
  overflow: hidden;
  background-color: var(--surface);
}

.hero-panel::after,
.glass-card::after,
.stat-card::after,
.profile-card::after,
.settings-panel::after,
.student-preview-card::after,
.report-student-card::after {
  content: "";
  position: absolute;
  top: 0.72rem;
  right: 0.78rem;
  width: 2.15rem;
  height: 2.15rem;
  pointer-events: none;
  opacity: 0.26;
  background:
    radial-gradient(circle at 50% 50%, #f3ac70 0 13%, transparent 15%),
    radial-gradient(ellipse at 50% 12%, #f8c8a6 0 18%, transparent 20%),
    radial-gradient(ellipse at 88% 50%, #c5e7df 0 18%, transparent 20%),
    radial-gradient(ellipse at 50% 88%, #f8c8a6 0 18%, transparent 20%),
    radial-gradient(ellipse at 12% 50%, #c5e7df 0 18%, transparent 20%);
}

.tool-card:nth-child(3n + 1),
.student-preview-card:nth-child(3n + 1),
.report-student-card:nth-child(3n + 1) { background: linear-gradient(145deg, var(--surface-strong), rgba(220, 239, 245, 0.55)); }
.tool-card:nth-child(3n + 2),
.student-preview-card:nth-child(3n + 2),
.report-student-card:nth-child(3n + 2) { background: linear-gradient(145deg, var(--surface-strong), rgba(255, 240, 216, 0.58)); }
.tool-card:nth-child(3n),
.student-preview-card:nth-child(3n),
.report-student-card:nth-child(3n) { background: linear-gradient(145deg, var(--surface-strong), rgba(226, 243, 233, 0.58)); }

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
button,
.button {
  border-radius: 18px;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), #78b5ad);
  box-shadow: 0 8px 18px rgba(72, 129, 139, 0.14);
}

.secondary-button,
.ghost-button {
  border-color: rgba(95, 159, 176, 0.2);
  background: color-mix(in srgb, var(--pastel-blue) 54%, var(--surface-strong));
  color: var(--primary-strong);
}

input,
select,
textarea,
.search-shell,
.field input,
.field select,
.field textarea {
  border-radius: 18px;
  border-color: rgba(95, 159, 176, 0.2);
  background-color: color-mix(in srgb, var(--surface-strong) 92%, var(--pastel-blue));
}

.eyebrow {
  color: var(--primary-strong);
  letter-spacing: 0.075em;
}

.api-key-gate {
  background:
    radial-gradient(circle at 12% 12%, rgba(205, 235, 241, 0.92), transparent 24rem),
    radial-gradient(circle at 90% 12%, rgba(255, 218, 188, 0.82), transparent 22rem),
    linear-gradient(145deg, #fffaf2, #f2fbf8);
}

.api-key-card {
  background: rgba(255, 254, 249, 0.95);
  box-shadow: 0 20px 60px rgba(64, 108, 115, 0.12);
}

.app-footer {
  color: var(--muted);
  background: linear-gradient(90deg, rgba(220, 239, 245, 0.45), rgba(255, 240, 216, 0.45));
}

[data-theme="dark"] .sidebar,
body[data-theme="dark"] .sidebar,
[data-theme="dark"] .topbar,
body[data-theme="dark"] .topbar {
  background: rgba(31, 52, 55, 0.94);
}

@media (max-width: 760px) {
  .hero-panel,
  .glass-card,
  .stat-card,
  .tool-card,
  .profile-card,
  .material-card,
  .settings-panel {
    border-radius: 21px;
  }
}
