/* ═══════════════════════════════════════════════════════════════════════════
   Anandi Field Projects Platform — Design System
   Brand: anandi.org  ─  Fonts: Parkinsans (headings), DM Sans (body)
   Palette: deep indigo / royal purple / warm coral / cream / gold
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts (loaded via <link> in HTML — Google Fonts CSS API) ────────────── */

/* ── Custom Properties ──────────────────────────────────────────────────── */

:root {
  /* palette */
  --ink-deep:       oklch(0.12 0.04 290);   /* #160926  deep indigo/navy bg   */
  --purple:         oklch(0.28 0.14 295);   /* #491b8a  royal purple         */
  --purple-bright:  oklch(0.38 0.18 295);   /* #8a37eb  vibrant purple hover  */
  --coral:          oklch(0.62 0.20 30);    /* #f96a50  warm coral CTAs       */
  --coral-hover:    oklch(0.55 0.22 30);    /*         darker coral hover     */
  --cream:          oklch(0.93 0.015 45);   /* #f4e9e1  warm cream surface    */
  --gold:           oklch(0.88 0.15 98);    /* #ffe266  accent gold           */
  --white:          oklch(1.000 0.000 0);
  --ink-body:       oklch(0.22 0.01 290);   /* #312f36  body text on light    */
  --ink-muted:      oklch(0.48 0.005 290);  /*          secondary text        */
  --ink-subtle:     oklch(0.70 0.003 290);  /*          placeholder/border    */

  /* surfaces */
  --bg-app:         var(--ink-deep);
  --bg-content:     var(--cream);
  --bg-card:        var(--white);
  --bg-sidebar:     var(--ink-deep);
  --bg-input:       oklch(0.98 0.002 90);

  /* semantic */
  --success:        oklch(0.55 0.16 150);
  --warning:        var(--coral);
  --info:           var(--purple);

  /* radii */
  --radius-card:    24px;
  --radius-sm:      14px;
  --radius-btn:     100px;
  --radius-input:   14px;

  /* typography */
  --font-heading:   'Parkinsans', 'Parkinsans Placeholder', sans-serif;
  --font-body:      'DM Sans', 'DM Sans Placeholder', sans-serif;

  /* spacing */
  --space-xs:       4px;
  --space-sm:       8px;
  --space-md:       16px;
  --space-lg:       24px;
  --space-xl:       32px;
  --space-2xl:      48px;
  --space-3xl:      64px;

  /* motion */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --fast:           150ms;
  --normal:         250ms;
  --slow:           400ms;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--ink-body);
  background: var(--ink-deep);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea { font: inherit; }

/* ── App Shell ──────────────────────────────────────────────────────────── */

.app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */

.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-lg);
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2xl);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo .logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--white);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-nav-label {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.55 0.01 290);
  padding: var(--space-md) var(--space-sm) var(--space-xs);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  color: oklch(0.65 0.01 290);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--fast) var(--ease-out), color var(--fast) var(--ease-out);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: oklch(0.20 0.03 290);
  color: var(--white);
}

.sidebar-nav-item.active {
  background: var(--purple);
  color: var(--white);
}

.sidebar-nav-item .nav-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
  flex-shrink: 0;
}

.sidebar-nav-item.active .nav-icon {
  opacity: 1;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-md) 12px;
  border-top: 1px solid oklch(0.25 0.02 290);
  margin-top: auto;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--white);
  flex-shrink: 0;
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.sidebar-user-role {
  font-size: 0.6875rem;
  color: oklch(0.55 0.01 290);
  line-height: 1.2;
}

/* ── Main Content ───────────────────────────────────────────────────────── */

.main {
  flex: 1;
  background: var(--bg-content);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ────────────────────────────────────────────────────────────── */

.topbar {
  background: var(--white);
  border-bottom: 1px solid oklch(0.88 0.01 290);
  padding: var(--space-md) var(--space-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.hamburger { display: none; }
.sidebar-backdrop { display: none; }
.sidebar-close { display: none; }
.sidebar-role-switcher {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid oklch(0.25 0.02 290);
  margin-top: var(--space-md);
}

.topbar-breadcrumb {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.topbar-breadcrumb span {
  color: var(--ink-body);
  font-weight: 600;
}

.topbar-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.02em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar-badge {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
}

.topbar-badge.arts {
  background: oklch(0.93 0.03 295);
  color: var(--purple);
}

/* ── Content Area ───────────────────────────────────────────────────────── */

.content {
  flex: 1;
  padding: var(--space-2xl);
  max-width: 1100px;
  width: 100%;
}

.screen {
  display: none;
  animation: screenIn var(--normal) var(--ease-out);
}

.screen.active {
  display: block;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Screen 1: Landing ──────────────────────────────────────────────────── */

.landing-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  gap: var(--space-xl);
}

.landing-greeting {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.03em;
  text-align: center;
}

.landing-subtitle {
  font-size: 1rem;
  color: var(--ink-muted);
  text-align: center;
  max-width: 380px;
}

.google-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: 1.5px solid oklch(0.85 0.005 290);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-body);
  transition: border-color var(--fast) var(--ease-out), box-shadow var(--fast) var(--ease-out);
}

.google-btn:hover {
  border-color: oklch(0.70 0.005 290);
  box-shadow: 0 2px 12px oklch(0 0 0 / 0.06);
}

.google-btn svg {
  width: 20px;
  height: 20px;
}

/* ── Project Card ───────────────────────────────────────────────────────── */

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  box-shadow: 0 2px 16px oklch(0 0 0 / 0.05);
  transition: box-shadow var(--normal) var(--ease-out);
  cursor: pointer;
}

.project-card:hover {
  box-shadow: 0 4px 24px oklch(0 0 0 / 0.10);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.project-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.stream-badge {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: var(--radius-btn);
  white-space: nowrap;
  flex-shrink: 0;
}

.stream-badge.arts-culture {
  background: oklch(0.93 0.04 295);
  color: var(--purple);
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.project-card-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-card-meta-label {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.project-card-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-body);
}

.project-card-progress {
  margin-bottom: var(--space-md);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.progress-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-body);
}

.progress-pct {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple);
}

.progress-bar {
  height: 8px;
  border-radius: var(--radius-btn);
  background: oklch(0.91 0.005 290);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--purple);
  transition: width var(--slow) var(--ease-out);
}

.project-card-next {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--coral);
  font-weight: 500;
}

.project-card-next svg {
  width: 16px;
  height: 16px;
}

/* ── Screen 2: Dashboard ────────────────────────────────────────────────── */

.dashboard-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid oklch(0.88 0.01 290);
  margin-bottom: var(--space-xl);
}

.dashboard-tab {
  padding: 12px 20px;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: color var(--fast) var(--ease-out), border-color var(--fast) var(--ease-out);
  letter-spacing: -0.01em;
}

.dashboard-tab:hover {
  color: var(--ink-body);
}

.dashboard-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.dashboard-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  box-shadow: 0 1px 8px oklch(0 0 0 / 0.04);
}

.dashboard-card.full {
  grid-column: 1 / -1;
}

.dashboard-card-label {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: var(--space-md);
}

.dashboard-card h3 {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.dashboard-card p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.mentor-card {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.mentor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  flex-shrink: 0;
}

.mentor-info h4 {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.01em;
}

.mentor-info .mentor-role {
  font-size: 0.75rem;
  color: var(--purple);
  font-weight: 500;
  margin-bottom: 4px;
}

.mentor-info p {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ── Timeline ───────────────────────────────────────────────────────────── */

.timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: var(--space-lg) 0;
  position: relative;
}

.timeline-phase {
  flex: 1;
  text-align: center;
  position: relative;
  padding-top: 28px;
}

.timeline-phase::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  z-index: 1;
  transition: background var(--slow) var(--ease-out), box-shadow var(--slow) var(--ease-out);
}

.timeline-phase.completed::before {
  background: var(--purple);
  box-shadow: 0 0 0 4px oklch(0.93 0.03 295);
}

.timeline-phase.current::before {
  background: var(--coral);
  box-shadow: 0 0 0 4px oklch(0.95 0.02 30);
}

.timeline-phase.upcoming::before {
  background: var(--ink-subtle);
  box-shadow: 0 0 0 4px oklch(0.95 0.001 290);
}

.timeline-line {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: oklch(0.91 0.005 290);
}

.timeline-line-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--purple);
  transition: width var(--slow) var(--ease-out);
}

.timeline-phase-label {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.01em;
}

.timeline-phase-weeks {
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.timeline-phase.completed .timeline-phase-label { color: var(--purple); }
.timeline-phase.current .timeline-phase-label { color: var(--coral); }
.timeline-phase.upcoming .timeline-phase-label { color: var(--ink-subtle); }

/* ── Department Cards ───────────────────────────────────────────────────── */

.dept-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.dept-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  box-shadow: 0 1px 6px oklch(0 0 0 / 0.03);
  border: 1.5px solid oklch(0.92 0.003 290);
}

.dept-card h4 {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-body);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.dept-card .dept-lead {
  font-size: 0.6875rem;
  color: var(--ink-muted);
  margin-bottom: var(--space-sm);
}

.dept-status {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dept-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dept-status.on-track { color: var(--success); }
.dept-status.on-track::before { background: var(--success); }

.dept-status.caution { color: var(--warning); }
.dept-status.caution::before { background: var(--warning); }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border-radius: var(--radius-btn);
  background: var(--purple);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  transition: background var(--fast) var(--ease-out), transform var(--fast) var(--ease-out);
  margin-top: var(--space-lg);
}

.cta-btn:hover {
  background: var(--purple-bright);
}

.cta-btn:active {
  transform: scale(0.98);
}

/* ── Screen 3: Submission ───────────────────────────────────────────────── */

.submission-form {
  max-width: 700px;
}

.submission-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  background: oklch(0.95 0.02 30);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--coral);
  margin-bottom: var(--space-lg);
}

.submission-form h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.submission-form .submission-context {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.upload-zone {
  border: 2px dashed oklch(0.82 0.005 290);
  border-radius: var(--radius-card);
  padding: var(--space-2xl);
  text-align: center;
  background: oklch(0.98 0.002 90);
  margin-bottom: var(--space-xl);
  transition: border-color var(--fast) var(--ease-out), background var(--fast) var(--ease-out);
}

.upload-zone:hover {
  border-color: var(--purple);
  background: oklch(0.96 0.008 295);
}

.upload-zone.has-file {
  border-color: var(--success);
  background: oklch(0.96 0.02 150);
  border-style: solid;
  padding: var(--space-md);
  text-align: left;
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.upload-preview-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.upload-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-info h4 {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.01em;
}

.upload-preview-info span {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--ink-subtle);
  margin: 0 auto var(--space-md);
}

.upload-text {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.reflection-field {
  margin-bottom: var(--space-xl);
}

.reflection-field label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.reflection-field textarea {
  width: 100%;
  min-height: 140px;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  border: 1.5px solid oklch(0.85 0.005 290);
  background: var(--bg-input);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-body);
  resize: vertical;
  transition: border-color var(--fast) var(--ease-out);
}

.reflection-field textarea:focus {
  outline: none;
  border-color: var(--purple);
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 36px;
  border-radius: var(--radius-btn);
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  transition: background var(--fast) var(--ease-out), transform var(--fast) var(--ease-out);
}

.submit-btn:hover {
  background: var(--coral-hover);
}

.submit-btn:active {
  transform: scale(0.98);
}

/* Toast */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink-deep);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--slow) var(--ease-out), opacity var(--normal) var(--ease-out);
  z-index: 100;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast svg {
  width: 18px;
  height: 18px;
  color: var(--success);
  flex-shrink: 0;
}

/* ── Screen 4: AI Tutor ────────────────────────────────────────────────── */

.chat-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
}

.chat-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1.5px solid oklch(0.88 0.01 290);
}

.chat-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.chat-header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.chat-header-info h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.02em;
}

.chat-header-info p {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.safety-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  background: oklch(0.94 0.02 150);
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  background: oklch(0.94 0.02 30);
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.phase-toggle {
  display: flex;
  background: oklch(0.94 0.003 290);
  border-radius: var(--radius-btn);
  padding: 3px;
}

.phase-toggle-btn {
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  border: none;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all var(--fast) var(--ease-out);
  white-space: nowrap;
}

.phase-toggle-btn:hover {
  color: var(--ink-body);
}

.phase-toggle-btn.active {
  background: var(--white);
  color: var(--purple);
  box-shadow: 0 1px 4px oklch(0 0 0 / 0.08);
}

/* ── Typing indicator ─────────────────────────────────────────────────── */

.typing-indicator {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 14px 18px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 6px oklch(0 0 0 / 0.04);
}
.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-subtle);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-right: var(--space-sm);
}

.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.6;
}

.chat-bubble.student {
  align-self: flex-end;
  background: var(--purple);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.chat-bubble.tutor {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--ink-body);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 6px oklch(0 0 0 / 0.04);
}

.chat-bubble-sender {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  opacity: 0.7;
}

.chat-input-area {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1.5px solid oklch(0.88 0.01 290);
}

.chat-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  border: 1.5px solid oklch(0.85 0.005 290);
  background: var(--bg-input);
  font-size: 0.875rem;
  color: var(--ink-body);
  transition: border-color var(--fast) var(--ease-out);
}

.chat-input:focus {
  outline: none;
  border-color: var(--purple);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--fast) var(--ease-out);
}

.chat-send-btn:hover {
  background: var(--purple-bright);
}

.chat-send-btn svg {
  width: 20px;
  height: 20px;
}

/* ── Screen 5: Mentor Review ────────────────────────────────────────────── */

.review-layout {
  display: flex;
  gap: var(--space-xl);
}

.review-main {
  flex: 1;
  min-width: 0;
}

.review-sidebar {
  width: 280px;
  min-width: 280px;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  box-shadow: 0 1px 8px oklch(0 0 0 / 0.04);
  margin-bottom: var(--space-lg);
}

.review-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.review-meta {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.review-meta-item span:first-child {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.review-meta-item span:last-child {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-body);
}

.feedback-block {
  background: oklch(0.97 0.01 90);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--purple);
  margin: var(--space-lg) 0;
}

.feedback-block .feedback-label {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  margin-bottom: var(--space-sm);
}

.feedback-block p {
  font-size: 0.875rem;
  color: var(--ink-body);
  line-height: 1.7;
}

.status-toggles {
  display: flex;
  gap: var(--space-md);
}

.status-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1.5px solid oklch(0.85 0.005 290);
  background: var(--white);
  color: var(--ink-body);
  transition: all var(--fast) var(--ease-out);
}

.status-toggle.active {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

.status-toggle.caution {
  border-color: var(--coral);
  color: var(--coral);
}

.status-toggle.caution:hover {
  background: var(--coral);
  color: var(--white);
}

.submission-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--fast) var(--ease-out);
}

.submission-list-item:hover {
  background: oklch(0.97 0.008 290);
}

.submission-list-item.active {
  background: oklch(0.94 0.02 295);
}

.submission-list-item .dept-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.submission-list-item .dept-dot.marketing { background: var(--coral); }
.submission-list-item .dept-dot.programming { background: var(--purple); }
.submission-list-item .dept-dot.production { background: var(--gold); }
.submission-list-item .dept-dot.guest { background: var(--success); }

.submission-list-info {
  min-width: 0;
}

.submission-list-info h5 {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.01em;
}

.submission-list-info span {
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

/* ── Screen 6: Parent View ──────────────────────────────────────────────── */

.parent-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.parent-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.parent-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.03em;
}

.parent-header .parent-student-info {
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  box-shadow: 0 1px 8px oklch(0 0 0 / 0.04);
}

.summary-card.full-width {
  grid-column: 1 / -1;
}

.summary-card-label {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: var(--space-sm);
}

.summary-card-value {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-body);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.summary-card-detail {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

.quote-block {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.875rem;
  color: var(--ink-body);
  line-height: 1.7;
  font-style: italic;
}

/* ── Role Switcher ──────────────────────────────────────────────────────── */

.sidebar-role-switcher .role-label {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.55 0.01 290);
  margin-bottom: 2px;
}

.sidebar-role-switcher .role-btn {
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  background: transparent;
  border: 1.5px solid oklch(0.30 0.02 290);
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: oklch(0.55 0.01 290);
  transition: all var(--fast) var(--ease-out);
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.sidebar-role-switcher .role-btn:hover {
  border-color: var(--purple);
  color: var(--white);
}

.sidebar-role-switcher .role-btn.active {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}

/* ── Reduced Motion ─────────────────────────────────────────────────────── */

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

/* ── Responsive (tablet) ────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .sidebar {
    width: 200px;
    min-width: 200px;
    padding: var(--space-md);
  }
  .content {
    padding: var(--space-lg);
  }
  .dept-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .review-layout {
    flex-direction: column;
  }
  .review-sidebar {
    width: 100%;
    min-width: 100%;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  /* ── Hamburger menu ────────────────────────────────────────────────── */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
  }
  .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background: var(--ink-body);
    transition: all var(--normal) var(--ease-out);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: oklch(0 0 0 / 0.5);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--normal) var(--ease-out);
  }
  .sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    min-width: 280px;
    max-width: 85vw;
    height: 100dvh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform var(--normal) var(--ease-out);
    padding-top: var(--space-2xl);
    overflow-y: auto;
    display: flex;
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: oklch(0.55 0.01 290);
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--fast) var(--ease-out), color var(--fast) var(--ease-out);
  }
  .sidebar-close:hover {
    background: oklch(0.20 0.03 290);
    color: var(--white);
  }

  /* Role switcher inside sidebar */
  .sidebar-role-switcher {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid oklch(0.25 0.02 290);
    margin-top: var(--space-md);
  }

  /* ── Touch targets ─────────────────────────────────────────────────── */
  .chat-send-btn,
  .chat-page-send {
    min-width: 44px;
    min-height: 44px;
  }

  /* ── Chat: keyboard-aware height ───────────────────────────────────── */
  .chat-container {
    height: calc(100dvh - 320px);
    min-height: 360px;
  }
  .chat-header {
    flex-shrink: 0;
  }

  /* ── Phase toggle compact ──────────────────────────────────────────── */
  .phase-toggle-btn {
    padding: 5px 10px;
    font-size: 0.625rem;
  }
  .milestone-badge {
    padding: 4px 10px;
    font-size: 0.5625rem;
    gap: 4px;
  }
  .milestone-badge svg {
    width: 12px;
    height: 12px;
  }
  .chat-header-controls {
    flex-wrap: wrap;
  }

  /* ── Vertical timeline ─────────────────────────────────────────────── */
  .timeline {
    flex-direction: column;
    gap: 0;
    margin: var(--space-md) 0;
    padding-left: 24px;
    border-left: 3px solid oklch(0.91 0.005 290);
    position: relative;
  }
  .timeline-line {
    display: none;
  }
  .timeline-phase {
    padding: 10px 0 10px 20px;
    text-align: left;
    position: relative;
    flex: none;
  }
  .timeline-phase::before {
    left: -30px;
    top: 16px;
    transform: none;
  }
  .timeline-phase-label {
    font-size: 0.75rem;
  }
  .timeline-phase-weeks {
    font-size: 0.625rem;
  }

  /* ── Department cards: compact rows ────────────────────────────────── */
  .dept-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  .dept-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px var(--space-md);
  }
  .dept-card h4 {
    font-size: 0.75rem;
    margin-bottom: 0;
  }
  .dept-card .dept-lead {
    margin-bottom: 0;
    margin-left: auto;
  }
  .dept-status {
    width: 100%;
  }

  /* ── Radii & spacing reduction ─────────────────────────────────────── */
  .project-card,
  .dashboard-card,
  .review-card,
  .summary-card {
    border-radius: 16px;
    padding: var(--space-md);
  }
  .content {
    padding: var(--space-md);
  }
  .dashboard-grid {
    gap: var(--space-sm);
  }
  .cta-btn {
    padding: 12px 20px;
    font-size: 0.75rem;
  }
  .submit-btn {
    padding: 12px 28px;
    font-size: 0.8125rem;
  }

  /* ── Mentor sidebar: horizontal scrollable pills ───────────────────── */
  .review-sidebar {
    width: 100%;
    min-width: 100%;
    order: -1;
  }
  .review-sidebar .review-card {
    padding: var(--space-sm);
  }
  .submission-list-item {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: var(--radius-btn);
    border: 1.5px solid oklch(0.88 0.01 290);
    margin-right: 6px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    gap: 6px;
  }
  .submission-list-item.active {
    border-color: var(--purple);
    background: oklch(0.94 0.02 295);
  }
  .submission-list-info h5 {
    font-size: 0.6875rem;
  }
  .submission-list-info span {
    display: none;
  }

  /* ── Parent grid ───────────────────────────────────────────────────── */
  .summary-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  .summary-card-value {
    font-size: 0.9375rem;
  }
  .parent-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.125rem;
  }
  .parent-header h2 {
    font-size: 1.25rem;
  }

  /* ── Submission form ───────────────────────────────────────────────── */
  .submission-form h2 {
    font-size: 1.25rem;
  }
  .upload-zone {
    padding: var(--space-lg) var(--space-md);
  }
  .status-toggles {
    flex-direction: column;
  }
  .review-meta {
    gap: var(--space-sm);
  }

  /* ── Topbar compact ────────────────────────────────────────────────── */
  .topbar {
    padding: var(--space-sm) var(--space-md);
  }
  .topbar-breadcrumb {
    display: none;
  }
  .topbar-title {
    font-size: 0.9375rem;
  }
  .topbar-badge {
    font-size: 0.5625rem;
    padding: 4px 10px;
  }

  /* ── Toast ─────────────────────────────────────────────────────────── */
  .toast {
    left: var(--space-md);
    right: var(--space-md);
    transform: translateY(100px);
    text-align: center;
    justify-content: center;
  }
  .toast.show {
    transform: translateY(0);
  }
}
