/* ==========================================================================
   Ψηφιακό Βαθμολόγιο — Daylight High-Contrast Mobile-First Stylesheet
   60% Crisp Daylight Canvas (#F6F8FA) · 30% White Structural Surfaces · 10% Cobalt Accent
   ========================================================================== */

:root {
  /* Surface & Canvas (60-30-10 Daylight Classroom Theme) */
  --bg-canvas: #F6F8FA;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EDF2F7;
  --bg-hover: #E2E8F0;

  /* Ink & Contrast (WCAG AA+ >= 4.5:1) */
  --ink-primary: #0F172A;
  --ink-secondary: #334155;
  --ink-muted: #526277;

  /* Hairline Borders */
  --border-subtle: #D8E0E8;
  --border-strong: #B8C4D2;

  /* Semantic Accents (10% Budget) */
  --accent: #1D4ED8;
  --accent-hover: #1E40AF;
  --accent-soft: #EFF6FF;
  --accent-border: #BFDBFE;

  --success: #047857;
  --success-soft: #ECFDF5;
  --success-border: #A7F3D0;

  --warning: #B45309;
  --warning-soft: #FFFBEB;
  --warning-border: #FCD34D;

  --danger: #B91C1C;
  --danger-soft: #FEF2F2;
  --danger-border: #FECACA;

  /* Typography */
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radii & Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-sheet: 22px;

  /* Layout Dimensions */
  --header-h: 54px;
  --bottom-nav-h: 60px;
  --rail-w: 236px;

  /* Shadows (Single-level elevation) */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.14);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  font-family: var(--font-sans);
  background: var(--bg-canvas);
  color: var(--ink-primary);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-canvas);
  color: var(--ink-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

/* ==========================================================================
   App Shell & Top Bar (Compact 54px sticky header)
   ========================================================================== */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  padding: 0 12px;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 6px 4px 2px;
  border-radius: var(--radius-sm);
  min-width: 0;
  max-width: 100%;
  transition: background var(--dur-fast) var(--ease-out);
}

.brand-trigger:hover {
  background: var(--bg-subtle);
}

.brand-icon {
  flex-shrink: 0;
  border-radius: 7px;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Term Segmented Control (Α' | Β' | Γ') */
.term-segmented {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
  flex-shrink: 0;
}

.term-btn {
  min-width: 38px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.term-btn[aria-selected="true"] {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.info-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.info-trigger-btn:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.backup-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.backup-btn:active {
  transform: scale(0.97);
}

.backup-btn.is-synced {
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success-border);
}

.backup-btn.is-dirty {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: var(--warning-border);
}

/* Offline Strip */
.offline-banner {
  background: var(--warning-soft);
  color: var(--warning);
  border-bottom: 1px solid var(--warning-border);
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.offline-banner[hidden] {
  display: none;
}

/* Read-Only Archive Preview Banner */
.archive-banner {
  background: #1E293B;
  color: #FFFFFF;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.archive-banner[hidden] {
  display: none;
}

.archive-exit-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

.archive-exit-btn:hover {
  background: #E2E8F0;
}

/* Multi-Class Quick Switcher Bar (shown only when >= 2 classes exist) */
.class-quick-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.class-quick-bar::-webkit-scrollbar {
  display: none;
}

.class-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.class-chip-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.class-chip-btn.is-active {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #FFFFFF;
}

.class-chip-subs {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  opacity: 0.78;
}

/* ==========================================================================
   Navigation: Mobile Bottom Bar -> Desktop Left Side Rail
   ========================================================================== */

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.primary-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-rail-brand,
.nav-rail-footer {
  display: none;
}

.nav-items {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--bottom-nav-h);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 44px;
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color var(--dur-fast) var(--ease-out);
}

.nav-item[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
}

.nav-svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

.nav-label-full {
  display: none;
}

.app-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 14px 14px calc(var(--bottom-nav-h) + 28px + env(safe-area-inset-bottom, 0px));
  max-width: 1280px;
  margin: 0 auto;
}

/* Desktop Breakpoint (>= 960px): Side Rail + Wide Workspace */
@media (min-width: 960px) {
  .top-bar {
    padding: 0 24px;
  }

  .primary-nav {
    position: sticky;
    top: var(--header-h);
    left: auto;
    right: auto;
    bottom: auto;
    width: var(--rail-w);
    flex-shrink: 0;
    height: calc(100dvh - var(--header-h));
    border-top: none;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    background: var(--bg-surface);
  }

  .nav-rail-brand {
    display: block;
    padding: 4px 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 10px;
  }

  .nav-rail-heading {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-muted);
  }

  .nav-items {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 4px;
    flex: 1;
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px;
    min-height: 44px;
    border-radius: var(--radius-sm);
    font-size: 14px;
  }

  .nav-item:hover {
    background: var(--bg-subtle);
    color: var(--ink-primary);
  }

  .nav-item[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .nav-label-short {
    display: none;
  }

  .nav-label-full {
    display: inline;
    white-space: nowrap;
  }

  .nav-rail-footer {
    display: block;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-rail-footer[hidden] {
    display: none;
  }

  .app-main {
    padding: 24px 28px 40px;
  }
}

/* ==========================================================================
   Common Typography, Cards, Surfaces & Controls
   ========================================================================== */

.view-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.view-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-wrap: balance;
}

.view-meta {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.section-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.meta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.meta-sep {
  color: var(--border-strong);
  user-select: none;
}

/* Buttons (padding horizontal ~2x vertical, >= 44px touch targets) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

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

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger:hover {
  background: #FEE2E2;
}

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-icon {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 10px;
  color: var(--ink-secondary);
}

.btn-icon:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.btn-block {
  width: 100%;
}

/* Forms & Inputs */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.field-hint {
  font-size: 12px;
  color: var(--ink-muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink-primary);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

/* ==========================================================================
   Tab 1: Grading (Interactive Horizontal Filter Strips + Assessment List + Entry)
   ========================================================================== */

.selector-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.selector-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.selector-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.scroll-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.scroll-strip::-webkit-scrollbar {
  display: none;
}

.filter-tab-btn {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.filter-tab-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.filter-tab-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  font-weight: 700;
}

.filter-tab-btn.is-secondary-active {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #FFFFFF;
  font-weight: 700;
}

/* Assessment List */
.assessment-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 720px) {
  .assessment-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.assessment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.assessment-card:hover {
  border-color: var(--accent);
}

.assessment-main-btn {
  flex: 1;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  justify-content: center;
}

.assessment-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assessment-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.assessment-avg {
  text-align: right;
}

.assessment-avg-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.assessment-avg-sub {
  display: block;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.weight-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

/* Grade Entry View (Portrait-Optimized Vertical Student List) */
.entry-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.entry-topbar-info {
  flex: 1;
  min-width: 0;
}

.entry-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-input-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}

.grade-rows {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.grade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 62px;
}

.grade-row:last-child {
  border-bottom: none;
}

.grade-row:focus-within {
  background: #F8FBFF;
}

.grade-student-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.grade-student-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.student-aa {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted);
  min-width: 24px;
  flex-shrink: 0;
}

.student-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-name-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.12s ease;
}

.student-name-link:hover,
.student-name-link:focus-visible {
  color: var(--accent);
}

.student-name-link:hover .student-name,
.student-name-link:hover .overview-student-name,
.student-name-link:focus-visible .student-name,
.student-name-link:focus-visible .overview-student-name {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Interactive Previous-Term Comparison Button (Tappable -> Bottom Sheet) */
.prev-term-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 30px;
  padding: 2px 8px;
  margin-left: 28px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  color: var(--ink-secondary);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.prev-term-trigger:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.prev-term-trigger.delta-up {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

.prev-term-trigger.delta-down {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger);
}

.grade-input-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.grade-input {
  width: 96px;
  height: 46px;
  padding: 0 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  background: var(--bg-canvas);
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  color: var(--ink-primary);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.grade-input:focus {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.16);
}

.grade-input.has-value {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

.grade-input.is-invalid {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.grade-input-error {
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
  max-width: 140px;
  text-align: right;
}

/* ==========================================================================
   Tab 2: Summary Table (Sticky Left Column + Horizontal Scroll)
   ========================================================================== */

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.seg-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.seg-btn.is-active {
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
}

.checkbox-inline input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.summary-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.summary-filter-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 2px;
}

.summary-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.summary-filter-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.summary-filter-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.table-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.table-nav-bar[hidden] {
  display: none;
}

.table-jump-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.table-jump-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 2px;
}

.table-jump-btn {
  min-height: 28px;
  padding: 2px 9px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 700;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.table-jump-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.table-scroll-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.table-drag-hint {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-right: 4px;
}

@media (hover: none) {
  .table-drag-hint {
    display: none;
  }
}

.table-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 14px;
  font-weight: 700;
  transition: background-color 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.table-arrow-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.table-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.summary-table-shell {
  position: relative;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
}

.summary-table-shell::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 10px;
  width: 24px;
  pointer-events: none;
  background: linear-gradient(to left, rgba(15, 23, 42, 0.1), transparent);
  opacity: 0;
  transition: opacity 150ms ease;
  z-index: 5;
}

.summary-table-shell.can-scroll-right::after {
  opacity: 1;
}

.table-scroll-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.summary-table-shell .table-scroll-wrap {
  border: none;
  border-radius: 0;
  overflow: auto;
  max-height: min(64dvh, 540px);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg-subtle);
}

@media (min-width: 768px) {
  .summary-table-shell .table-scroll-wrap {
    max-height: clamp(320px, calc(100dvh - 285px), 780px);
  }
}

.summary-table-shell .table-scroll-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.summary-table-shell .table-scroll-wrap::-webkit-scrollbar-track {
  background: var(--bg-subtle);
}

.summary-table-shell .table-scroll-wrap::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 6px;
  border: 2px solid var(--bg-subtle);
}

.summary-table-shell .table-scroll-wrap::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}

.summary-table-shell.is-pannable .table-scroll-wrap,
.summary-table-shell.is-pannable .summary-table th,
.summary-table-shell.is-pannable .summary-table td {
  cursor: grab;
}

.summary-table-shell.is-pannable .summary-table button {
  cursor: pointer;
}

.summary-table-shell.is-dragging .table-scroll-wrap,
.summary-table-shell.is-dragging .table-scroll-wrap * {
  cursor: grabbing !important;
  user-select: none;
}

.summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.summary-table th,
.summary-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--bg-subtle);
  text-align: center;
  white-space: nowrap;
}

.summary-table thead th {
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: inset 0 -1px 0 var(--border-subtle);
}

.summary-table .col-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg-surface);
  text-align: left;
  border-right: 1.5px solid var(--border-subtle);
  min-width: 172px;
  max-width: 230px;
  transition: box-shadow 150ms ease;
}

.summary-table-shell.can-scroll-left .summary-table .col-sticky {
  box-shadow: 4px 0 8px -2px rgba(15, 23, 42, 0.12);
}

.summary-table thead .col-sticky {
  z-index: 6;
  background: var(--bg-subtle);
}

.summary-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: #F1F5F9;
  font-weight: 800;
  border-top: 1.5px solid var(--border-strong);
  border-bottom: none;
  box-shadow: inset 0 1px 0 var(--border-strong);
}

.summary-table tfoot .col-sticky {
  z-index: 6;
  background: #F1F5F9;
}

.summary-table-shell.can-scroll-left .summary-table tfoot .col-sticky {
  box-shadow: inset 0 1px 0 var(--border-strong), 4px 0 8px -2px rgba(15, 23, 42, 0.12);
}

.table-student-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  color: var(--ink-primary);
  font-weight: 700;
  text-align: left;
}

.table-student-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.table-student-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-subject-avg {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-primary);
  background: #FAFBFD;
}

.cell-general-avg {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
}

.cell-report-int {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
}

.cell-muted {
  color: #94A3B8;
  font-family: var(--font-mono);
}

.cell-inc-warn {
  color: var(--warning);
  font-weight: 800;
  font-family: var(--font-mono);
}

.th-sub-legend {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-top: 2px;
  letter-spacing: 0.01em;
}

.inc-breakdown {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-left: 3px;
}

.inc-cell-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 3px 6px;
  border-radius: 6px;
  transition: background var(--dur-fast) var(--ease-out);
}

.inc-cell-btn:hover {
  background: var(--warning-soft);
}

/* ==========================================================================
   Tab 3: Individual Student Report Card & Term Progress Bars
   ========================================================================== */

.student-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.student-nav-bar .select {
  flex: 1;
  font-weight: 700;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 720px) {
  .kpi-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.2;
}

.kpi-value.accent {
  color: var(--accent);
}

.kpi-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Visual Term Comparison Chart (Α' vs Β' vs Γ') */
.term-chart-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.chart-row-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-primary);
}

.chart-bars-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chart-bar-line {
  display: grid;
  grid-template-columns: 28px 1fr 46px;
  align-items: center;
  gap: 8px;
}

.chart-term-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.chart-track {
  height: 12px;
  background: var(--bg-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.chart-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 240ms var(--ease-out);
}

.chart-fill.term-A {
  background: #64748B;
}

.chart-fill.term-B {
  background: #2563EB;
}

.chart-fill.term-C {
  background: #047857;
}

.chart-bar-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  text-align: right;
  color: var(--ink-primary);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 12px;
  height: 8px;
  border-radius: 3px;
}

/* Subject Breakdown inside Student Report */
.report-subject-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 960px) {
  .report-subject-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.crit-block {
  padding: 10px 0;
  border-top: 1px solid var(--border-subtle);
}

.crit-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.crit-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.crit-score {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.subcrit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 10px;
}

.subcrit-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.assess-mini-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 10px;
  margin-top: 2px;
}

.assess-mini-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* ==========================================================================
   Tab 4: Inconsistencies Quick Counter
   ========================================================================== */

.inc-list {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.inc-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inc-row:last-child {
  border-bottom: none;
}

@media (min-width: 780px) {
  .inc-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.inc-student-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.inc-steppers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inc-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-canvas);
  overflow: hidden;
}

.inc-stepper-code {
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-secondary);
}

.inc-step-btn {
  min-width: 38px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-primary);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
}

.inc-step-btn:hover {
  background: var(--bg-subtle);
}

.inc-step-btn.is-plus {
  color: var(--accent);
}

.inc-step-count {
  min-width: 30px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  border-left: 1px solid var(--border-subtle);
  padding: 0 4px;
}

.inc-step-count.has-inc {
  color: var(--warning);
}

/* ==========================================================================
   Tab 5: Settings, Roster, Subjects & Backup/Sync
   ========================================================================== */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 960px) {
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
  }

  .settings-span-2 {
    grid-column: 1 / -1;
  }
}

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

.list-divider {
  display: flex;
  flex-direction: column;
}

.list-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 48px;
}

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

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

.list-item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.list-item-title.is-inactive {
  text-decoration: line-through;
  color: var(--ink-muted);
}

.list-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Subject Tree Editor */
.subject-editor-block {
  border-top: 1px solid var(--border-subtle);
  padding: 12px 0;
}

.subject-editor-block:first-child {
  border-top: none;
  padding-top: 0;
}

.criterion-editor-row {
  margin-left: 16px;
  padding: 8px 0 8px 12px;
  border-top: 1px dashed var(--border-subtle);
}

.subcriterion-editor-row {
  margin-left: 28px;
  padding: 5px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* PWA Install Card */
.pwa-install-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

.empty-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-primary);
}

.empty-desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--ink-muted);
  max-width: 44ch;
  margin-inline: auto;
}

/* ==========================================================================
   Modals & Bottom Sheets
   ========================================================================== */

.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in var(--dur-fast) var(--ease-out);
}

.overlay-backdrop[hidden] {
  display: none;
}

.sheet-backdrop {
  align-items: flex-end;
  padding: 0;
}

@media (min-width: 720px) {
  .sheet-backdrop {
    align-items: center;
    padding: 16px;
  }
}

.modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop-in var(--dur-fast) var(--ease-out);
}

.modal-dialog.is-wide {
  max-width: 720px;
}

.bottom-sheet {
  width: 100%;
  max-width: 580px;
  max-height: 86dvh;
  background: var(--bg-surface);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: slide-up 190ms var(--ease-out);
}

@media (min-width: 720px) {
  .bottom-sheet {
    border-radius: var(--radius-lg);
  }
}

.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: var(--border-strong);
  margin: 10px auto 4px;
  flex-shrink: 0;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.dialog-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-primary);
}

.dialog-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}

.dialog-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  flex-shrink: 0;
}

/* Conflict Resolver Cards */
.conflict-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  background: var(--bg-canvas);
}

.conflict-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.conflict-choice {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  text-align: left;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.conflict-choice.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.conflict-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-primary);
}

.conflict-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Summary Preview Grid inside Import Modal */
.preview-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.preview-stat {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
}

.preview-stat-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-primary);
}

.preview-stat-label {
  font-size: 12px;
  color: var(--ink-muted);
}

.alert-box {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.alert-warning {
  background: var(--warning-soft);
  border: 1px solid var(--warning-border);
  color: var(--warning);
}

.alert-info {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

/* About / Info Modal & Collapsible Install Accordions */
.about-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.about-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.about-app-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.about-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.about-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.about-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 13.5px;
}

.about-meta-key {
  color: var(--ink-muted);
  font-weight: 600;
}

.about-meta-val {
  color: var(--ink-primary);
  font-weight: 700;
}

.about-share-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.info-accordion {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
  margin-bottom: 14px;
}

.info-accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-primary);
  cursor: pointer;
  user-select: none;
  background: var(--bg-canvas);
  transition: background var(--dur-fast) var(--ease-out);
}

.info-accordion-summary::-webkit-details-marker {
  display: none;
}

.info-accordion-summary:hover {
  background: var(--bg-subtle);
}

.accordion-chevron {
  flex-shrink: 0;
  color: var(--ink-muted);
  transition: transform var(--dur-fast) var(--ease-out);
}

.info-accordion[open] > .info-accordion-summary .accordion-chevron,
.browser-accordion[open] > .browser-accordion-summary .accordion-chevron {
  transform: rotate(180deg);
}

.info-accordion-body {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.browser-accordion {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
  overflow: hidden;
}

.browser-accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-primary);
  cursor: pointer;
  user-select: none;
}

.browser-accordion-summary::-webkit-details-marker {
  display: none;
}

.browser-accordion-summary:hover {
  background: var(--bg-canvas);
}

.browser-accordion-body {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.install-platform-block h4 {
  margin: 0 0 4px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-primary);
}

.install-platform-block ol {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.about-copyright {
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

/* Subject Library Picker & Year-End Gate Wizard */
.subject-check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 6px;
}

@media (max-width: 440px) {
  .subject-check-grid {
    grid-template-columns: 1fr;
  }
}

.subject-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-canvas);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.subject-check-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink-primary);
}

.subject-check-item input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.subject-check-code {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.wizard-step-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--bg-canvas);
  margin-bottom: 12px;
}

.wizard-step-card.is-done {
  border-color: var(--success-border);
  background: var(--success-soft);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}

@media (min-width: 960px) {
  .toast-container {
    bottom: 24px;
    left: auto;
    right: 24px;
    transform: none;
  }
}

.toast {
  background: var(--ink-primary);
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: fade-in var(--dur-fast) var(--ease-out);
  pointer-events: auto;
}

.toast.is-error {
  background: var(--danger);
}

.toast.is-success {
  background: var(--success);
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ==========================================================================
   Safe Column Paste (Excel / Google Sheets / LibreOffice Calc)
   ========================================================================== */

.smart-input-tip-text {
  flex: 1 1 240px;
}

.paste-col-trigger {
  flex-shrink: 0;
  white-space: nowrap;
}

.paste-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.paste-controls-row .field-group {
  margin-bottom: 0;
  flex: 1 1 200px;
}

.paste-textarea {
  min-height: 112px;
  max-height: 180px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.paste-alert {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 10px;
  border: 1px solid var(--border-subtle);
}

.paste-alert.is-error {
  background: var(--danger-soft);
  border-color: #FECACA;
  color: #991B1B;
}

.paste-alert.is-error ul {
  margin: 4px 0 0 18px;
  padding: 0;
}

.paste-alert.is-warn {
  background: var(--warn-soft);
  border-color: #FDE68A;
  color: #92400E;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.paste-alert.is-ok {
  background: var(--success-soft);
  border-color: #A7F3D0;
  color: #065F46;
}

.paste-overwrite-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #FDE68A;
  background: var(--warn-soft);
  font-size: 13px;
}

.paste-overwrite-title {
  font-weight: 700;
  color: #92400E;
  margin-bottom: 6px;
}

.paste-overwrite-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.paste-radio-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink-primary);
  cursor: pointer;
}

.paste-radio-opt input {
  accent-color: var(--accent);
}

.paste-preview-wrap {
  margin-top: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  max-height: 230px;
  overflow: auto;
  background: var(--bg-surface);
}

.paste-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.paste-preview-table th,
.paste-preview-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  white-space: nowrap;
}

.paste-preview-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 11.5px;
  font-weight: 700;
  z-index: 1;
}

.paste-preview-table tr.is-row-err td {
  background: #FEF2F2;
  color: #991B1B;
}

.paste-preview-table tr.is-row-kept td {
  color: var(--ink-muted);
}

.paste-val-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-primary);
}

.paste-val-raw {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-left: 4px;
}

.paste-val-err {
  font-weight: 700;
  color: var(--danger);
}

.paste-val-diff {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.paste-val-kept {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

/* ==========================================================================
   Soft Lock Banner (Προστασία Προηγούμενων Τριμήνων)
   ========================================================================== */

.term-lock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  border: 1px solid #FDE68A;
  background: var(--warn-soft);
  color: #78350F;
  font-size: 13px;
  line-height: 1.4;
}

.term-lock-banner.is-unlocked {
  border-color: #BFDBFE;
  background: var(--accent-soft);
  color: #1E3A8A;
}

.term-lock-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
}

.term-lock-banner-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.grade-input.is-term-locked {
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  cursor: pointer;
}

/* ==========================================================================
   SHA-256 Sync Fingerprint Card (Mobile <-> Laptop Verification)
   ========================================================================== */

.sync-fp-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.sync-fp-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sync-fp-identicon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-xs);
}

.sync-fp-main {
  flex: 1 1 170px;
  min-width: 0;
}

.sync-fp-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.sync-fp-code-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.sync-fp-code {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink-primary);
  cursor: help;
  border-bottom: 1px dashed var(--border-strong);
}

.sync-fp-hint {
  font-size: 12px;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.sync-fp-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.sync-fp-counters strong {
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
}

.sync-fp-details {
  margin-top: 8px;
}

.sync-fp-details summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}

.sync-fp-details-body {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sync-fp-fullhash {
  font-family: var(--font-mono);
  font-size: 11px;
  word-break: break-all;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--ink-secondary);
}

.sync-fp-class-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sync-fp-class-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
}

.sync-fp-class-code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-primary);
  margin-left: auto;
}

/* ==========================================================================
   Quick Oral Grades & Sub-Criterion Class Overview Radar (v1.7.0)
   ========================================================================== */

.view-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.grading-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.attention-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #F59E0B;
}

.seg-btn.is-active .attention-dot {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.45);
}

.oral-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  background: #EEF2FF;
  color: #4338CA;
  border: 1px solid #C7D2FE;
  vertical-align: middle;
}

.oral-mini-tag {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  background: #EEF2FF;
  color: #4338CA;
  margin-right: 4px;
}

.oral-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 16px 0 8px;
}

.overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.overview-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.overview-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.overview-stat-pill.is-missing {
  color: #B91C1C;
}

.overview-stat-pill.is-behind {
  color: #B45309;
}

.overview-stat-pill.is-ok {
  color: var(--success);
}

.overview-sort-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.overview-sort-btn {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.overview-sort-btn:hover {
  color: var(--ink-primary);
}

.overview-sort-btn.is-active {
  background: var(--bg-surface);
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}

.overview-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
}

.overview-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) auto minmax(140px, 1.7fr) 56px 36px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.overview-row:last-child {
  border-bottom: 0;
}

.overview-row.is-missing {
  background: #FFFBFB;
}

.overview-row.is-behind {
  background: #FFFDF5;
}

.overview-student {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.overview-student-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  border: 1px solid var(--border-subtle);
}

.overview-count-badge.is-missing {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #FECACA;
}

.overview-count-badge.is-behind {
  background: #FEF3C7;
  color: #B45309;
  border-color: #FDE68A;
}

.overview-count-badge.is-ok {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}

.overview-grades {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.overview-grade-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.overview-grade-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.overview-grade-chip.is-oral {
  background: #EEF2FF;
  border-color: #C7D2FE;
  color: #3730A3;
}

.overview-avg {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  color: var(--ink-primary);
}

.overview-avg.is-empty {
  color: var(--ink-muted);
  font-weight: 500;
}

.overview-add-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.overview-add-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

@media (max-width: 680px) {
  .overview-row {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "student avg add"
      "grades grades count";
    gap: 6px 8px;
    padding: 10px;
  }
  .overview-student { grid-area: student; }
  .overview-avg { grid-area: avg; }
  .overview-add-btn { grid-area: add; }
  .overview-grades { grid-area: grades; }
  .overview-count-badge { grid-area: count; justify-self: end; }
}

/* Quick Oral Modal Rows */
.quick-oral-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.quick-oral-row {
  display: grid;
  grid-template-columns: 1fr 94px 36px;
  gap: 8px;
  align-items: center;
}

.quick-oral-row input[name="grade"] {
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ==========================================================================
   Searchable Student Combobox (ARIA 1.2 · Floating Zero-Clip Listbox)
   ========================================================================== */

.student-combo {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.student-combo-input {
  width: 100%;
  min-height: 44px;
  padding-right: 54px;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 600;
  text-overflow: ellipsis;
}

.student-combo.is-open .student-combo-input {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.student-combo-clear,
.student-combo-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  border-radius: 6px;
  padding: 0;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.student-combo-clear {
  right: 28px;
  font-size: 12px;
  font-weight: 700;
}

.student-combo-clear[hidden] {
  display: none;
}

.student-combo-toggle {
  right: 4px;
  font-size: 13px;
}

.student-combo-clear:hover,
.student-combo-toggle:hover {
  color: var(--ink-primary);
  background: var(--bg-canvas);
}

.student-combo.is-open .student-combo-toggle {
  color: var(--accent);
  transform: translateY(-50%) rotate(180deg);
}

.student-combo-listbox {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10020;
  max-height: 270px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.06);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.student-combo-listbox[hidden] {
  display: none;
}

.student-combo-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.student-combo-option:hover,
.student-combo-option.is-active {
  background: var(--accent-soft);
}

.student-combo-option.is-selected {
  font-weight: 700;
}

.student-combo-option-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.student-combo-aa {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.student-combo-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.student-combo-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.student-combo-option.is-selected .student-combo-meta {
  color: var(--accent);
}

.combo-hl {
  background: #fef08a;
  color: #0f172a;
  border-radius: 2px;
  padding: 0 1px;
  font-weight: 800;
}

.student-combo-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Quick Live Student Filter (Ασυνέπειες & Εποπτεία) */
.quick-filter-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  max-width: 420px;
}

.quick-filter-input {
  width: 100%;
  min-height: 44px;
  padding-right: 40px;
}

.quick-filter-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.quick-filter-clear:hover {
  background: var(--bg-canvas);
  color: var(--ink-primary);
}

.quick-filter-clear[hidden] {
  display: none;
}

/* Floating UI Tooltip (viewport-clamped, zero container clipping) */
.app-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  max-width: 295px;
  padding: 8px 11px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.app-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Print Styles (Parent-Teacher Student Report Card)
   ========================================================================== */

@media print {
  .top-bar,
  .primary-nav,
  .offline-banner,
  .no-print,
  .overlay-backdrop,
  .toast-container,
  .app-tooltip {
    display: none !important;
  }

  body,
  .app-main {
    background: #FFFFFF !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .section-card,
  .kpi-box {
    break-inside: avoid;
    border-color: #CBD5E1 !important;
  }
}
