:root {
  color-scheme: dark;
  --bg: #070a12;
  --bg-soft: #0c111d;
  --panel: rgba(17, 23, 39, 0.9);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.34);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --mint: #5eead4;
  --rose: #f472b6;
  --violet: #a78bfa;
  --solar: #facc15;
  --blue: #60a5fa;
  --coral: #fb7185;
  --success: #34d399;
  --danger: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.11), transparent 32%),
    linear-gradient(315deg, rgba(244, 114, 182, 0.11), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: rgba(7, 10, 18, 0.86);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(94, 234, 212, 0.45);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.24), rgba(167, 139, 250, 0.14)),
    #0b1220;
  color: var(--mint);
  font-weight: 800;
}

.brand h1,
.topbar h2,
.panel h3,
.hero-panel h3,
.modal h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.nav-link,
.primary-button,
.ghost-button,
.icon-button,
.segment,
.chip,
.danger-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
}

.nav-link:hover,
.nav-link.active {
  border-color: var(--line-strong);
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
}

.nav-link.active {
  box-shadow: inset 3px 0 0 var(--mint);
}

.nav-link svg,
.primary-button svg,
.ghost-button svg,
.icon-button svg,
.danger-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.icon-fallback {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  color: inherit;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.72);
}

.sidebar-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.sidebar-card span,
.muted {
  color: var(--muted);
  font-size: 0.87rem;
}

.main-panel {
  min-width: 0;
  padding: 26px;
}

.view,
.panel,
.topbar,
.topbar-actions,
.week-strip {
  min-width: 0;
}

.topbar,
.tool-row,
.panel-header,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 2px 0 22px;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(7, 10, 18, 0.88) 72%, transparent 100%);
}

.topbar h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.65rem);
}

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

.user-pill {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 42px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  white-space: nowrap;
}

.primary-button {
  border-color: rgba(94, 234, 212, 0.35);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.95), rgba(96, 165, 250, 0.9));
  color: #061016;
  font-weight: 800;
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.danger-button:hover,
.segment:hover {
  transform: translateY(-1px);
}

.ghost-button,
.icon-button {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.danger-button {
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 270px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(12, 17, 29, 0.92)),
    radial-gradient(circle at 86% 24%, rgba(250, 204, 21, 0.22), transparent 28%);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}

.hero-copy h3 {
  max-width: 780px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 10px;
  max-width: 820px;
  margin-top: 24px;
}

.stat-tile,
.mini-card,
.task-card,
.course-card,
.timeline-item,
.tracker-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.stat-tile {
  padding: 14px;
}

.stat-tile strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1.5rem;
}

.stat-tile span,
.mini-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.focus-visual {
  position: relative;
  min-height: 270px;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
}

.orbit {
  position: absolute;
  inset: 54px 42px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.orbit-two {
  inset: 82px 76px;
  transform: rotate(28deg);
}

.planet {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.planet-a {
  top: 46px;
  right: 78px;
  background: var(--mint);
  box-shadow: 0 0 45px rgba(94, 234, 212, 0.45);
}

.planet-b {
  right: 164px;
  bottom: 52px;
  width: 34px;
  height: 34px;
  background: var(--rose);
  box-shadow: 0 0 34px rgba(244, 114, 182, 0.44);
}

.planet-c {
  top: 132px;
  right: 34px;
  width: 26px;
  height: 26px;
  background: var(--solar);
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.4);
}

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

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.panel-header {
  margin-bottom: 16px;
}

.week-strip {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-column {
  flex: 1 0 96px;
  min-height: 190px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 10, 18, 0.32);
}

.day-column.today {
  border-color: rgba(94, 234, 212, 0.55);
}

.day-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.mini-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  margin-bottom: 8px;
}

.mini-card strong {
  font-size: 0.86rem;
}

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

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.course-progress-grid,
.course-grid,
.exam-grid,
.activity-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.course-card,
.activity-card,
.exam-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.course-top,
.task-top,
.timeline-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.course-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.color-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: 0 0 18px currentColor;
}

.course-title h4,
.task-card h4,
.timeline-item h4,
.activity-card h4,
.exam-card h4 {
  margin: 0;
  overflow-wrap: anywhere;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, currentColor, rgba(255, 255, 255, 0.78));
  transition: width 220ms ease;
}

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

.metric {
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(148, 163, 184, 0.08);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.metric strong {
  display: block;
  margin-top: 4px;
}

.tool-row {
  margin-bottom: 18px;
}

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

.date-tool {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-tool input {
  width: 170px;
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.segment {
  padding: 0 14px;
  background: transparent;
  color: var(--muted-strong);
}

.segment.active {
  border-color: rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.13);
  color: var(--text);
}

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

.kanban-column {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 17, 29, 0.72);
}

.kanban-column h3 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
  font-size: 0.95rem;
}

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

.task-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.note-text {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.5;
}

.task-card.done {
  opacity: 0.68;
}

.task-card.done h4 {
  text-decoration: line-through;
}

.task-actions,
.course-actions,
.session-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-color: var(--line);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.chip.high {
  border-color: rgba(251, 113, 133, 0.45);
  color: #fecdd3;
}

.chip.medium {
  border-color: rgba(250, 204, 21, 0.38);
  color: #fef3c7;
}

.chip.low {
  border-color: rgba(94, 234, 212, 0.36);
  color: #ccfbf1;
}

.session-timeline {
  display: grid;
  gap: 12px;
}

.session-advisor-panel {
  margin-bottom: 18px;
}

.advisor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.advisor-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.timeline-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.timeline-time {
  display: grid;
  gap: 2px;
  color: var(--muted-strong);
  font-weight: 800;
}

.timeline-time span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.inline-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-strong);
}

.daily-grid {
  display: grid;
  gap: 8px;
}

.day-stat {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  text-align: left;
}

.day-stat.active {
  border-color: rgba(94, 234, 212, 0.58);
  box-shadow: inset 3px 0 0 var(--mint);
}

.day-stat span,
.day-stat em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.day-stat strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-pill {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.donut-wrap {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.donut {
  --pct: 0%;
  position: relative;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: conic-gradient(var(--mint) var(--pct), rgba(148, 163, 184, 0.13) 0);
}

.grade-dial {
  --grade: 0%;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: conic-gradient(var(--rose) var(--grade), rgba(148, 163, 184, 0.13) 0);
  position: relative;
}

.grade-dial::before {
  content: "";
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--panel-strong);
}

.grade-dial span {
  position: relative;
  font-size: 2rem;
  font-weight: 900;
}

.grade-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.grade-line strong {
  font-size: 2rem;
}

.donut::before {
  content: "";
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--panel-strong);
}

.timeline-item.done {
  opacity: 0.68;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.donut span {
  position: relative;
  font-size: 2rem;
  font-weight: 900;
}

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

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 74px;
  gap: 12px;
  align-items: center;
}

.bar-label {
  overflow: hidden;
  color: var(--muted-strong);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-value {
  color: var(--muted);
  text-align: right;
}

.tracker-table {
  display: grid;
  gap: 10px;
}

.tracker-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) repeat(5, minmax(80px, 1fr));
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.tracker-row.header {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(14px);
}

.modal {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

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

.modal-form label {
  display: grid;
  gap: 7px;
}

.modal-form label span {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 10, 18, 0.6);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(94, 234, 212, 0.62);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

textarea {
  min-height: 88px;
  padding: 12px;
  resize: vertical;
}

.inline-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 10, 18, 0.35);
}

.inline-check input {
  width: 18px;
  min-height: 18px;
}

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

.full {
  width: 100%;
  margin-top: 4px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(340px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid rgba(94, 234, 212, 0.42);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.auth-page {
  display: flex;
  min-height: 100vh;
  min-height: 100lvh;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  overflow-x: hidden;
  scroll-padding-top: 24px;
}

.auth-card {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-page input,
.auth-page select,
.auth-page textarea {
  font-size: 16px;
}

.auth-brand {
  margin-bottom: 22px;
}

.auth-switch {
  margin: 16px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: var(--mint);
  font-weight: 800;
}

.form-error {
  padding: 12px;
  border: 1px solid rgba(251, 113, 133, 0.42);
  border-radius: var(--radius);
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
}

.focus-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 16;
}

.focus-toggle {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(94, 234, 212, 0.45);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--blue));
  color: #061016;
  box-shadow: var(--shadow);
}

.focus-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(340px, calc(100vw - 28px));
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.focus-time {
  margin: 8px 0 14px;
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
}

.focus-modes {
  width: 100%;
  margin-bottom: 12px;
}

.focus-panel label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.focus-panel label span {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.install-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.install-banner div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

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

.install-banner button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(94, 234, 212, 0.12);
  color: var(--text);
  padding: 0 12px;
}

.install-banner #installApp {
  background: var(--mint);
  color: #061016;
  font-weight: 900;
}

.home-page {
  min-height: 100vh;
  padding: 24px;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto 42px;
}

.home-main {
  max-width: 1180px;
  margin: 0 auto;
}

.home-hero {
  max-width: 760px;
  margin-bottom: 24px;
}

.home-hero h2 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1;
}

.home-snapshot {
  margin-bottom: 18px;
}

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

.home-snapshot-grid .stat-tile strong {
  overflow-wrap: anywhere;
  font-size: 1.15rem;
}

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

.app-tile {
  display: grid;
  gap: 18px;
  min-height: 270px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.app-tile h3 {
  margin: 0 0 8px;
}

.app-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.app-tile > span {
  align-self: end;
  color: var(--mint);
  font-weight: 900;
}

.placeholder-app {
  opacity: 0.7;
}

.app-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(94, 234, 212, 0.36);
  border-radius: var(--radius);
  background: rgba(94, 234, 212, 0.1);
  color: var(--mint);
}

.app-icon svg {
  width: 22px;
  height: 22px;
}

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

  .sidebar {
    padding: 18px 12px;
    align-items: center;
  }

  .brand {
    justify-content: center;
  }

  .brand div:last-child,
  .nav-link span,
  .sidebar-card {
    display: none;
  }

  .nav-link {
    justify-content: center;
    width: 52px;
    height: 48px;
    padding: 0;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .focus-visual {
    display: none;
  }

  .dashboard-grid,
  .progress-layout,
  .daily-layout,
  .exam-layout {
    grid-template-columns: 1fr 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: span 2;
  }

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    width: 100vw;
    max-width: 100vw;
    height: auto;
    flex-direction: row;
    justify-content: center;
    padding: 8px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .brand {
    display: none;
  }

  .nav-list {
    display: flex;
    gap: 4px;
    width: calc(100vw - 16px);
  }

  .nav-link {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }

  .main-panel {
    padding: 18px 14px 88px;
  }

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

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

  .topbar-actions {
    display: grid;
    grid-template-columns: 42px 42px minmax(96px, 1fr) 42px 42px;
    justify-content: initial;
  }

  .topbar-actions .primary-button {
    min-width: 0;
    width: 100%;
  }

  .user-pill {
    grid-column: 1 / -1;
    max-width: none;
    width: 100%;
  }

  .date-tool {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .date-tool input {
    width: 100%;
  }

  .hero-copy {
    padding: 22px;
  }

  .hero-stats,
  .dashboard-grid,
  .progress-layout,
  .daily-layout,
  .exam-layout,
  .course-progress-grid,
  .course-grid,
  .exam-grid,
  .activity-list {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: auto;
  }

  .tool-row,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .segmented-control {
    grid-auto-flow: initial;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .timeline-item,
  .tracker-row,
  .tracker-row.header,
  .bar-row,
  .donut-wrap,
  .day-stat,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .tracker-row.header {
    display: none;
  }

  .day-column {
    flex: 0 0 min(320px, 82vw);
  }

  .focus-dock {
    right: 14px;
    bottom: 84px;
  }

  .focus-actions,
  .home-snapshot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .home-page {
    padding: 18px 14px;
  }

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

  .home-topbar {
    margin-bottom: 28px;
  }

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

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

  .app-tile {
    min-height: 210px;
  }
}
