/* ============================================================
   unhomeschool — Design System
   Inspired by PrintablePrompts & Learning and Discerning
   White-dominant with warm pastel accents
   ============================================================ */

/* ---------- Vendored Fonts ---------- */

/* Open Sans — variable weight, latin */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/opensans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Open Sans — variable weight, latin-ext */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/opensans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Poppins 600 — latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/poppins-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Poppins 600 — latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/poppins-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Poppins 700 — latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/poppins-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Poppins 700 — latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/poppins-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --color-rose:            #e6809b;
  --color-rose-hover:      #d4708a;
  --color-rose-light:      #fdf2f5;
  --color-rose-ring:       rgba(230, 128, 155, 0.25);

  /* Secondary */
  --color-dusty-blue:      #7aaec4;
  --color-dusty-blue-hover:#5e96ae;

  /* Neutrals (warm) */
  --color-text:            #2d2a27;
  --color-text-secondary:  #6b6560;
  --color-text-muted:      #9a948e;
  --color-bg:              #ffffff;
  --color-bg-page:         #faf9f7;
  --color-bg-subtle:       #f5f2ee;
  --color-border:          #e8e4de;
  --color-border-input:    #d1cdc5;

  /* Semantic — pastel */
  --color-success-bg:      #e8f5e9;
  --color-success-border:  #a5d6a7;
  --color-success-text:    #2e7d32;

  --color-error-bg:        #fce4ec;
  --color-error-border:    #ef9a9a;
  --color-error-text:      #c62828;

  --color-warning-bg:      #fff8e1;
  --color-warning-border:  #ffcc80;
  --color-warning-text:    #e65100;

  --color-info-bg:         #e3f2fd;
  --color-info-border:     #90caf9;
  --color-info-text:       #1565c0;

  /* Calendar */
  --color-lesson-bg:       #ede7f6;
  --color-lesson-text:     #4527a0;
  --color-completed-bg:    #e8f5e9;
  --color-completed-text:  #2e7d32;
  --color-skipped-bg:      #fce4ec;
  --color-skipped-text:    #c62828;
  --color-today-bg:        #e3f2fd;
  --color-weekend-bg:      #f5f2ee;

  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body:    'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Radii */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:   0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg:   0 4px 16px rgba(0,0,0,0.12);
}


/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg-page);
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-dusty-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-dusty-blue-hover);
  text-decoration: underline;
}


/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.3;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--color-border);
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
}

small, .text-small {
  font-size: 0.85rem;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-error {
  color: var(--color-error-text);
}


/* ---------- Navigation ---------- */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border);
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.nav-brand:hover {
  color: var(--color-rose);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--color-rose);
  text-decoration: none;
}


/* ---------- Flash Messages ---------- */
.flash {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.flash-success {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success-text);
}

.flash-error {
  background: var(--color-error-bg);
  border-color: var(--color-error-border);
  color: var(--color-error-text);
}

.flash-info {
  background: var(--color-info-bg);
  border-color: var(--color-info-border);
  color: var(--color-info-text);
}

.flash-warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning-text);
}


/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--color-rose);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.4;
}

.btn:hover {
  background: var(--color-rose-hover);
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.btn-danger {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border: 1px solid var(--color-error-border);
}

.btn-danger:hover {
  background: #f8d0d7;
  color: var(--color-error-text);
}

.btn-small {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

.btn-ghost {
  background: transparent;
  color: var(--color-dusty-blue);
  border: 1px solid var(--color-dusty-blue);
}

.btn-ghost:hover {
  background: var(--color-info-bg);
  color: var(--color-dusty-blue-hover);
}


/* ---------- Forms ---------- */
form {
  max-width: 500px;
}

label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-rose);
  box-shadow: 0 0 0 3px var(--color-rose-ring);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Checkbox groups */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: normal;
  margin-top: 0;
  cursor: pointer;
}

.checkbox-group-column {
  flex-direction: column;
}

/* Honeypot */
.honeypot {
  display: none;
}


/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th, td {
  padding: 0.6rem 0.75rem;
  text-align: left;
}

th {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  background: var(--color-bg-subtle);
  border-bottom: 2px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

td {
  border-bottom: 1px solid var(--color-border);
}

tr:last-child td {
  border-bottom: none;
}


/* ---------- Cards ---------- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
}

.card p {
  margin: 0 0 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}


/* ---------- Info Table (key-value) ---------- */
.info-table {
  box-shadow: none;
  max-width: 500px;
}

.info-table th {
  background: transparent;
  border-bottom: 1px solid var(--color-border);
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-muted);
  width: 140px;
}

.info-table td {
  border-bottom: 1px solid var(--color-border);
}


/* ---------- Dashboard ---------- */
.dashboard-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}


/* ---------- Inline Form (side-by-side) ---------- */
.inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}


/* ---------- Calendar Grid ---------- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1rem 0;
}

.calendar-day {
  background: var(--color-bg);
  padding: 0.5rem;
  min-height: 85px;
}

.calendar-day-header {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.calendar-day-header a {
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

.calendar-day-header a:hover {
  color: var(--color-rose);
}

.calendar-day.today {
  background: var(--color-today-bg);
}

.calendar-day.weekend {
  background: var(--color-weekend-bg);
}

.calendar-day.day-off {
  background: var(--color-bg-subtle);
}

.calendar-day.holiday {
  background: var(--color-rose-light);
}

.day-off-label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.mini-month-day.day-off {
  background: var(--color-bg-subtle);
}

.mini-month-day.holiday {
  background: var(--color-rose-light);
}

/* Lesson items */
.lesson-item {
  font-size: 0.75rem;
  padding: 3px 5px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  background: var(--color-lesson-bg);
  color: var(--color-lesson-text);
  line-height: 1.3;
}

.lesson-item a {
  color: inherit;
  text-decoration: none;
}

.lesson-item a:hover {
  text-decoration: none;
  opacity: 0.85;
}

.lesson-item.completed {
  background: var(--color-completed-bg);
  color: var(--color-completed-text);
}

.lesson-item.skipped {
  background: var(--color-skipped-bg);
  color: var(--color-skipped-text);
  text-decoration: line-through;
}


/* ---------- Calendar Navigation ---------- */
.calendar-nav {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}


/* ---------- View Switcher ---------- */
.view-switcher {
  display: inline-flex;
  gap: 0;
  margin-left: 0.5rem;
}

.view-switcher .btn {
  border-radius: 0;
  border: 1px solid var(--color-border);
  border-right-width: 0;
  background: var(--color-bg);
  color: var(--color-text-secondary);
}

.view-switcher .btn:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.view-switcher .btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-right-width: 1px;
}

.view-switcher .btn.active {
  background: var(--color-rose);
  color: #fff;
  border-color: var(--color-rose);
}

.view-switcher .btn:hover:not(.active) {
  background: var(--color-bg-subtle);
  color: var(--color-text);
}


/* ---------- Month Grid ---------- */
.month-grid .calendar-day {
  min-height: 65px;
}

.month-grid .calendar-day.other-month {
  opacity: 0.4;
}

.month-grid .calendar-day-header a {
  font-size: 0.75rem;
  font-weight: 600;
}

.calendar-day-label {
  background: var(--color-bg-subtle);
  padding: 0.3rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.03em;
}


/* ---------- Year Grid ---------- */
.year-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1rem 0;
}

.mini-month-title {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  padding: 0;
  border: none;
}

.mini-month-title a {
  color: var(--color-text);
}

.mini-month-title a:hover {
  color: var(--color-rose);
  text-decoration: none;
}

.mini-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.7rem;
  text-align: center;
}

.mini-month-header {
  background: var(--color-bg-subtle);
  padding: 2px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.mini-month-day {
  background: var(--color-bg);
  padding: 3px 2px;
  line-height: 1.4;
}

.mini-month-day a {
  color: var(--color-text);
  text-decoration: none;
}

.mini-month-day a:hover {
  color: var(--color-rose);
}

.mini-month-day.other-month {
  opacity: 0.3;
}

.mini-month-day.today {
  background: var(--color-today-bg);
  font-weight: 700;
}

.mini-month-day.has-lessons {
  background: var(--color-lesson-bg);
}

.mini-month-day.has-lessons a {
  color: var(--color-lesson-text);
}

.mini-month-day.busy {
  background: #d1c4e9;
}

.mini-month-day.busy a {
  color: #311b92;
}

.mini-month-day.today.has-lessons {
  background: var(--color-today-bg);
  box-shadow: inset 0 0 0 2px var(--color-lesson-text);
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 640px) {
  /* Nav stacks */
  .main-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  /* Typography scales down */
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.15rem; }

  /* Calendar nav wraps tighter */
  .calendar-nav {
    gap: 0.3rem;
  }

  .calendar-nav .btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }

  /* View switcher stays inline but shrinks */
  .view-switcher {
    margin-left: 0;
  }

  .view-switcher .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }

  /* Week + Month grids: horizontal scroll */
  .calendar-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: grid;
    grid-template-columns: repeat(7, minmax(100px, 1fr));
    min-width: 700px;
  }

  /* Scroll wrapper for week/month grids */
  .calendar-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem -1rem;
    padding: 0 1rem;
  }

  .calendar-scroll .calendar-grid {
    min-width: 700px;
    margin: 0;
  }

  /* Month grid day cells shorter on mobile */
  .month-grid .calendar-day {
    min-height: 55px;
  }

  /* Year grid: 2-col, then 1-col on very narrow */
  .year-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Tables: horizontal scroll */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem -1rem;
    padding: 0 1rem;
  }

  .table-scroll table {
    min-width: 500px;
    margin: 0;
  }

  /* Inline forms stack */
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  /* Form actions wrap */
  .form-actions {
    flex-wrap: wrap;
  }

  /* Cards fill width */
  .card-stack {
    max-width: 100%;
  }

  /* Action button rows wrap */
  .sg-component-row {
    gap: 0.5rem;
  }
}

@media (max-width: 400px) {
  .year-grid {
    grid-template-columns: 1fr;
  }

  /* Hide Generate Schedule on very small screens */
  .calendar-nav [href="/schedule/generate"] {
    display: none;
  }
}


/* ---------- Footer ---------- */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 2px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}


/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: -0.5rem 0 0.5rem;
  padding: 0;
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-rose);
}

.breadcrumbs .sep {
  margin: 0 0.35rem;
  color: var(--color-border-input);
}


/* ---------- Utility ---------- */
.no-print {
  /* marker class for print styles */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}


/* ---------- Styleguide-specific ---------- */
.sg-section {
  margin: 2.5rem 0;
}

.sg-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.sg-swatch {
  width: 80px;
  text-align: center;
}

.sg-swatch-color {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: 0.3rem;
}

.sg-swatch-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.sg-component-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0.75rem 0;
}

.sg-example {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 0.75rem 0;
}


/* ---------- Print Styles ---------- */
@media print {
  .main-nav,
  .site-footer,
  .no-print,
  .flash {
    display: none !important;
  }

  body {
    max-width: 100%;
    padding: 0;
    background: #fff;
    font-size: 0.9rem;
  }

  table {
    box-shadow: none;
  }

  .btn {
    display: none !important;
  }
}

/* ---------- Checklists ---------- */

.checklist {
  max-width: 500px;
  margin: 0.5rem 0 1rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  margin-top: 0;
  font-weight: normal;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--color-rose);
  flex-shrink: 0;
}

.checklist-done {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.checklist-text {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0.25rem 0;
}

/* ---------- Submissions ---------- */

.submission-list {
  max-width: 500px;
}

.submission-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.submission-item:last-child {
  border-bottom: none;
}

input[type="file"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--color-bg);
}

.lesson-notes {
  white-space: pre-wrap;
  background: var(--color-bg-subtle);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  max-width: 500px;
}

/* ---------- RTL Support (Arabic) ---------- */

[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .main-nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .form-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumbs .sep {
  transform: scaleX(-1);
}

[dir="rtl"] th {
  text-align: right;
}

/* ---------- Language Picker ---------- */

.lang-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
  padding: 0.75rem 0 0.25rem;
  font-size: 0.75rem;
  line-height: 1;
}

.lang-picker a,
.lang-picker .lang-active {
  display: inline-block;
  padding: 0.35rem 0;
  text-decoration: none;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lang-picker a:hover {
  color: var(--color-text);
  text-decoration: none;
  border-bottom-color: var(--color-border);
}

.lang-picker .lang-active {
  color: var(--color-rose);
  font-weight: 600;
  border-bottom-color: var(--color-rose);
}

.lang-picker span.lang-sep {
  color: var(--color-border);
  padding: 0.35rem 0.4rem;
  user-select: none;
}

/* ---------- Progress Bar ---------- */

.progress-bar {
  display: inline-block;
  width: 80px;
  height: 12px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.progress-fill {
  height: 100%;
  background: var(--color-success-text);
  border-radius: var(--radius-sm);
  transition: width 0.3s ease;
}
