:root {
  color-scheme: light;
  --navy: #061b3d;
  --navy-2: #092955;
  --blue: #1677ff;
  --blue-2: #0d62e7;
  --cyan: #08c7ff;
  --text: #111b3f;
  --muted: #667390;
  --line: #dce5f4;
  --bg: #f6f9fe;
  --card: #ffffff;
  --green: #21a95b;
  --orange: #ff9b25;
  --purple: #7c4dff;
  --red: #ec4d5d;
  --shadow: 0 14px 34px rgba(26, 52, 98, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 14%, rgba(8, 199, 255, 0.22), transparent 24%),
    linear-gradient(135deg, #061b3d, #0b3976);
}

.login-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: white;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.login-brand,
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.login-brand {
  margin-bottom: 24px;
}

.brand-network {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 12%, var(--cyan) 0 5px, transparent 6px),
    radial-gradient(circle at 12% 48%, var(--cyan) 0 4px, transparent 5px),
    radial-gradient(circle at 86% 48%, var(--cyan) 0 4px, transparent 5px),
    radial-gradient(circle at 50% 86%, var(--cyan) 0 5px, transparent 6px),
    linear-gradient(145deg, rgba(8, 199, 255, 0.12), rgba(22, 119, 255, 0.1));
  border: 2px solid rgba(8, 199, 255, 0.45);
}

.login-brand h1,
.brand h1,
.brand p,
.welcome-copy h2,
.welcome-copy p,
.work-header h2,
.work-header p {
  margin: 0;
}

.login-brand h1 {
  font-size: 1.75rem;
}

.login-brand p {
  margin: 6px 0 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 14px;
}

label,
fieldset {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 750;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
  color: var(--text);
  outline: none;
}

select {
  appearance: auto;
  -webkit-appearance: menulist;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: rgba(22, 119, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-weight: 700;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

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

.app-shell.is-sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  color: white;
  background:
    radial-gradient(circle at 12% 82%, rgba(8, 199, 255, 0.18), transparent 28%),
    linear-gradient(180deg, var(--navy), #03142d);
  overflow-y: auto;
  transition: transform 180ms ease, opacity 180ms ease;
}

.app-shell.is-sidebar-collapsed .sidebar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.brand {
  margin-bottom: 42px;
}

.brand h1 {
  font-size: 1.9rem;
  line-height: 0.98;
}

.brand p {
  color: white;
  font-size: 1.55rem;
}

.app-nav {
  display: grid;
  gap: 12px;
}

.nav-btn {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  min-height: 64px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #f1f7ff;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 800;
}

.nav-btn span {
  font-size: 1.35rem;
}

.nav-btn.is-active {
  background: linear-gradient(135deg, #1d83ff, #115bcf);
  box-shadow: 0 18px 34px rgba(0, 73, 174, 0.38);
}

.premium-card {
  margin-top: 70px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(15, 70, 134, 0.38);
}

.premium-card strong {
  display: block;
  margin-bottom: 12px;
}

.premium-card p {
  margin: 0 0 18px;
  line-height: 1.55;
}

.premium-card button,
.primary-btn,
.upcoming-row button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 0 20px;
  color: white;
  background: linear-gradient(135deg, #1d83ff, #0d62e7);
  font-weight: 850;
  box-shadow: 0 12px 26px rgba(22, 119, 255, 0.22);
}

.premium-card button {
  width: 100%;
}

.workspace {
  min-width: 0;
  overflow-x: hidden;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 48px minmax(190px, auto);
  gap: 18px;
  align-items: center;
  min-height: 92px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.notification-wrap {
  position: relative;
}

.menu-btn,
.bell-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #edf5ff;
  color: var(--blue);
  font-size: 1.25rem;
}

.bell-btn {
  position: relative;
  background: white;
  color: var(--text);
}

.bell-btn.has-unread {
  box-shadow: 0 0 0 5px rgba(22, 119, 255, 0.08);
}

.bell-btn span {
  position: absolute;
  top: -4px;
  right: -2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: min(380px, 86vw);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 22px 48px rgba(26, 52, 98, 0.18);
}

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

.notification-head h3 {
  margin: 0;
  font-size: 1rem;
}

.notification-head button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

.notification-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  cursor: pointer;
}

.notification-item.is-read {
  opacity: 0.72;
}

.notification-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
}

.notification-info { background: var(--blue); }
.notification-success { background: var(--green); }
.notification-warning { background: var(--orange); }

.notification-copy strong,
.notification-copy p {
  display: block;
}

.notification-copy strong {
  line-height: 1.25;
}

.notification-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.notification-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--muted);
  text-align: center;
}

.notification-empty strong {
  color: var(--text);
}

.search-box {
  position: relative;
  display: block;
}

.search-box span {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text);
  font-size: 1.4rem;
}

.search-box input {
  min-height: 54px;
  padding-left: 56px;
  border-radius: 999px;
  background: #fbfdff;
  font-weight: 650;
}

.profile-chip {
  display: grid;
  grid-template-columns: 48px auto 30px;
  gap: 12px;
  align-items: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d62e7, #08c7ff);
  color: white;
  font-weight: 900;
}

.profile-chip strong,
.profile-chip span {
  display: block;
}

.profile-chip span {
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-chip button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
}

.view {
  padding: 28px 34px;
}

.welcome-copy {
  margin-bottom: 28px;
}

.welcome-copy h2,
.work-header h2,
.placeholder-view h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
}

.welcome-copy p,
.work-header p,
.placeholder-view p {
  color: var(--muted);
  font-size: 1.05rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.95fr);
  grid-auto-flow: dense;
  gap: 18px;
  align-items: start;
}

.journey-card,
.metric-grid,
.scores-card,
.topics-panel {
  grid-column: 1;
}

.goal-card,
.upcoming-card {
  grid-column: 2;
}

.journey-card,
.goal-card {
  grid-row: 1;
}

.metric-grid {
  grid-row: 2;
}

.scores-card {
  grid-row: 3;
}

.upcoming-card {
  grid-row: 2;
}

.topics-panel {
  grid-row: 4;
}

.journey-card,
.goal-card,
.scores-card,
.upcoming-card,
.topics-panel,
.metric-card,
.work-view,
.placeholder-view {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.journey-card {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 78% 42%, rgba(8, 199, 255, 0.55), transparent 28%),
    linear-gradient(135deg, #061b3d, #063a86);
}

.journey-content {
  position: relative;
  z-index: 1;
  max-width: 460px;
  padding: 28px;
}

.hero-icon,
.icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--blue);
  color: white;
  font-size: 2rem;
  font-weight: 900;
}

.journey-card h3 {
  margin: 18px 0 16px;
  font-size: 1.55rem;
}

.journey-card p {
  margin: 0 0 26px;
  line-height: 1.55;
}

.journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.outline-btn,
.ghost-btn {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--text);
  font-weight: 850;
}

.journey-card .outline-btn {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.globe-art {
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 480px;
  height: 330px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(8, 199, 255, 0.95) 1px, transparent 2px) 0 0 / 18px 18px,
    radial-gradient(circle at 50% 50%, rgba(8, 199, 255, 0.28), transparent 65%);
  opacity: 0.92;
}

.goal-card,
.scores-card,
.upcoming-card {
  padding: 22px;
}

.card-title,
.section-head,
.files-heading,
.flashcard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-title h3,
.section-head h3,
.files-heading h2,
.flashcard-toolbar h2 {
  margin: 0;
}

.card-title button,
.section-head button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 850;
}

.goal-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 22px;
  font-weight: 800;
}

.goal-row i,
.topic-grid i {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) var(--value), #e8eef8 0);
}

.goal-card p {
  margin: 22px 0 0;
  color: var(--muted);
}

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

.metric-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 122px;
  padding: 16px;
}

.metric-card small,
.metric-card strong,
.metric-card em {
  display: block;
}

.metric-card small {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.metric-card strong {
  font-size: 1.55rem;
  line-height: 1.05;
}

.metric-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.ring {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) 72%, #e8eef8 0);
  color: var(--text);
  font-weight: 900;
}

.green { background: #e6f8ef; color: var(--green); }
.yellow { background: #fff4da; color: var(--orange); }
.purple { background: #eee8ff; color: var(--purple); }

.topics-panel {
  padding: 20px;
  min-width: 0;
}

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

.topic-grid article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px 12px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.topic-grid article span,
.file-row span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d83ff, #08c7ff);
  color: white;
  font-weight: 900;
}

.topic-grid strong,
.topic-grid em,
.topic-grid i {
  grid-column: 2;
}

.topic-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.18;
}

.topic-grid em {
  color: var(--muted);
  font-style: normal;
}

.score-chart {
  height: 210px;
  padding-top: 12px;
}

.chart-empty {
  display: grid;
  place-items: center;
  align-content: center;
  height: 100%;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--muted);
  text-align: center;
}

.chart-empty strong {
  color: var(--text);
  font-size: 1.1rem;
}

.score-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.grid-lines line {
  stroke: #e7edf7;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.chart-area {
  fill: url(#scoreFill);
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-points circle {
  fill: var(--blue);
  stroke: white;
  stroke-width: 3;
}

.chart-labels text {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.chart-badge rect {
  fill: var(--blue);
}

.chart-badge text {
  fill: white;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
}

.upcoming-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
}

.upcoming-row span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e5f1ff;
  color: var(--blue);
  font-weight: 900;
}

.upcoming-row strong,
.upcoming-row em {
  display: block;
}

.upcoming-row em {
  color: var(--muted);
  font-style: normal;
}

.work-view,
.placeholder-view {
  margin: 28px 34px;
  padding: 24px;
}

.quiz-builder {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) 1.1fr 150px 1.1fr auto;
  gap: 14px;
  align-items: end;
  margin: 22px 0;
  position: relative;
}

.segmented,
.mode-grid {
  display: grid;
  gap: 6px;
}

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

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

.builder-field {
  position: relative;
  min-width: 0;
}

.builder-field select,
.builder-field input[type="number"] {
  position: relative;
  z-index: 2;
}

.choice-chip {
  position: relative;
  min-height: 46px;
  overflow: hidden;
  min-width: 0;
}

.choice-chip input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-chip span {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #f8fbff;
  pointer-events: none;
  user-select: none;
}

.choice-chip input:checked + span {
  border-color: var(--blue);
  color: white;
  background: var(--blue);
}

.choice-chip input:focus-visible + span {
  border-color: rgba(22, 119, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

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

.stats-strip div,
.question-card,
.empty-state,
.result-panel,
.flashcard-card,
.file-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 22px rgba(26, 52, 98, 0.08);
}

.stats-strip div {
  padding: 16px;
}

.stats-strip span,
.question-index,
.flashcard-card span,
.files-heading span,
.flashcard-toolbar span {
  color: var(--blue);
  font-weight: 900;
}

.stats-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 1.5rem;
}

.quiz-area,
.choice-list,
.file-list {
  display: grid;
  gap: 12px;
}

.question-card,
.empty-state,
.result-panel {
  padding: 20px;
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.question-card h3 {
  margin: 14px 0;
}

.choice {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  color: var(--text);
  text-align: left;
}

.choice .key {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e8f2ff;
  color: var(--blue);
  font-weight: 900;
}

.choice.selected,
.choice.correct {
  border-color: var(--blue);
  background: #eaf4ff;
}

.choice.incorrect {
  border-color: var(--red);
  background: #fff0f2;
}

.explanation {
  margin-top: 12px;
  padding: 14px;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff8ec;
}

.card-actions,
.flashcard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.flashcard-panel {
  margin: 28px 34px;
}

.flashcard-toolbar {
  margin-bottom: 18px;
}

.flashcard-card {
  display: grid;
  gap: 12px;
  width: 100%;
  min-height: 230px;
  padding: 26px;
  text-align: left;
}

.flashcard-card strong {
  white-space: pre-line;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1.4;
}

#flashcardMedia {
  display: grid;
  justify-items: start;
}

#flashcardMedia img {
  max-width: min(320px, 100%);
  max-height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  object-fit: contain;
}

.flashcard-answer-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.flashcard-feedback-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flashcard-feedback {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.flashcard-feedback.is-correct {
  color: var(--green);
}

.flashcard-feedback.is-incorrect {
  color: var(--red);
}

.files-panel {
  margin: 28px 34px;
}

.files-heading {
  margin-bottom: 18px;
}

.progress-view {
  margin: 28px 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.progress-header {
  margin-bottom: 22px;
}

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

.progress-stat-card,
.progress-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 22px rgba(26, 52, 98, 0.08);
}

.progress-stat-card {
  display: grid;
  gap: 6px;
  min-height: 126px;
  padding: 18px;
}

.progress-stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.progress-stat-card strong {
  font-size: 1.9rem;
  line-height: 1.05;
}

.progress-stat-card em {
  color: var(--muted);
  font-style: normal;
}

.progress-card {
  padding: 18px;
}

.progress-chart-card,
.progress-activity-card {
  grid-column: span 2;
}

.progress-topic-card,
.progress-flash-card {
  grid-column: span 2;
}

.progress-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #edf2fb;
}

.progress-list > :first-child {
  border-top: 0;
  padding-top: 0;
}

.progress-row strong,
.progress-row em,
.progress-row b,
.progress-row-time {
  display: block;
}

.progress-row strong {
  line-height: 1.25;
}

.progress-row em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
}

.progress-row-meta {
  min-width: 132px;
  text-align: right;
}

.progress-row-meta b {
  margin-bottom: 8px;
  font-size: 1rem;
}

.progress-row-meta i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) var(--value), #e8eef8 0);
}

.progress-row-time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.progress-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 180px;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--muted);
  text-align: center;
}

.progress-empty strong {
  color: var(--text);
  font-size: 1.05rem;
}

.file-list {
  max-height: 68vh;
  overflow: auto;
}

.file-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  color: var(--text);
  text-decoration: none;
}

.file-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.json-output {
  display: none;
}

@media (max-width: 1180px) {
  .dashboard-grid,
  .quiz-builder {
    grid-template-columns: 1fr;
  }

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

  .progress-chart-card,
  .progress-activity-card,
  .progress-topic-card,
  .progress-flash-card {
    grid-column: span 2;
  }
}

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

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

  .topbar {
    grid-template-columns: 48px 1fr;
  }

  .bell-btn,
  .profile-chip {
    display: none;
  }

  .dashboard-grid,
  .metric-grid,
  .topic-grid,
  .progress-grid,
  .stats-strip,
  .file-row,
  .upcoming-row {
    grid-template-columns: 1fr;
  }

  .view,
  .work-view,
  .progress-view,
  .flashcard-panel,
  .files-panel {
    margin: 0;
    padding: 18px;
  }

  .progress-chart-card,
  .progress-activity-card,
  .progress-topic-card,
  .progress-flash-card {
    grid-column: span 1;
  }

  .progress-row {
    grid-template-columns: 1fr;
  }

  .progress-row-meta {
    min-width: 0;
    text-align: left;
  }
}
