/* ==========================================================================
   GradePulse - Modern GPA & CGPA Calculator
   Comprehensive Design System & Responsive Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Theme Variables
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Vibrant Indigo & Modern Tech Slate */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.12);
  --primary-glow: rgba(79, 70, 229, 0.25);

  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  /* Light Theme */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);
  
  --border-light: #e2e8f0;
  --border-focus: #818cf8;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --modal-backdrop: rgba(15, 23, 42, 0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-alt: #1a2234;
  --bg-surface-glass: rgba(17, 24, 39, 0.85);

  --border-light: #1f293d;
  --border-focus: #6366f1;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 16px 32px rgba(0, 0, 0, 0.45);
  --modal-backdrop: rgba(3, 7, 18, 0.75);
}

/* --------------------------------------------------------------------------
   2. Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   3. Layout & Header
   -------------------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-surface-glass);
  border-bottom: 1px solid var(--border-light);
  padding: 0.85rem 1.5rem;
  transition: var(--transition);
}

.header-container {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-info h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--primary), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   4. Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow);
}

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

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

.btn-outline {
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-surface-alt);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-danger {
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.05);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--accent-rose);
}

.scale-badge-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(79, 70, 229, 0.25);
  cursor: pointer;
  transition: var(--transition);
}

.scale-badge-btn:hover {
  background: rgba(79, 70, 229, 0.2);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   5. Overview Hero / Real-Time CGPA Stats Strip
   -------------------------------------------------------------------------- */
.overview-section {
  max-width: 1380px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 1.25rem;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.metric-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.metric-card.highlight {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%), var(--bg-surface);
  border-color: rgba(79, 70, 229, 0.3);
}

.metric-card .header-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.metric-card .title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-icon-bubble {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.metric-main-value {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.metric-number {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.metric-scale-tag {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-footer {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-standing {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.standing-distinction {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.standing-good {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.standing-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.standing-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* --------------------------------------------------------------------------
   6. Main Content Area & Tab Navigation
   -------------------------------------------------------------------------- */
.app-body {
  max-width: 1380px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
  flex: 1;
}

.tab-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-nav-wrapper::-webkit-scrollbar {
  display: none;
}

.tab-list {
  display: flex;
  gap: 0.35rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-pane.active {
  display: block;
}

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

/* --------------------------------------------------------------------------
   7. Glass Panels & Section Cards
   -------------------------------------------------------------------------- */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.panel-title-area h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title-area p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   8. Course Table & Dynamic Rows
   -------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.course-table th {
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.775rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.course-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

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

.course-table tr:hover {
  background: rgba(79, 70, 229, 0.02);
}

/* Form Controls inside Table */
.input-control, .select-control {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.875rem;
  transition: var(--transition);
}

.input-control:focus, .select-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.select-control option {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.course-row-index {
  font-weight: 700;
  color: var(--text-light);
  font-size: 0.85rem;
  text-align: center;
  width: 40px;
}

.pts-cell {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.925rem;
  font-variant-numeric: tabular-nums;
}

.table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  transition: var(--transition);
}

.table-action-btn:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

/* --------------------------------------------------------------------------
   9. Semester Block (for Multi-Semester CGPA tab)
   -------------------------------------------------------------------------- */
.semester-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.semester-card-header {
  padding: 1rem 1.5rem;
  background: var(--bg-surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-light);
}

.semester-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sem-title-input {
  font-size: 1.05rem;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  max-width: 200px;
}

.sem-title-input:hover, .sem-title-input:focus {
  border-color: var(--border-light);
  background: var(--bg-surface);
}

.sem-quick-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.sem-quick-badge {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sem-quick-badge span {
  font-weight: 800;
  color: var(--primary);
}

.semester-card-body {
  padding: 1.5rem;
}

.semester-actions-footer {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   10. Quick CGPA & Target Planner Forms
   -------------------------------------------------------------------------- */
.planner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-hint {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.result-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(6, 182, 212, 0.05));
  border: 1px dashed var(--border-focus);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.result-gpa-big {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin: 0.75rem 0;
  letter-spacing: -0.04em;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   11. Grading Scale Settings Table
   -------------------------------------------------------------------------- */
.scale-selection-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.scale-pill {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  transition: var(--transition);
  cursor: pointer;
}

.scale-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.scale-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* --------------------------------------------------------------------------
   12. Analytics & Visualizations (SVG Charts)
   -------------------------------------------------------------------------- */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
}

.chart-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.chart-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.svg-chart-wrapper {
  width: 100%;
  height: 240px;
  position: relative;
}

.donut-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   13. Official Academic Report / Transcript View
   -------------------------------------------------------------------------- */
.transcript-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  position: relative;
}

.transcript-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.transcript-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  background: var(--bg-surface-alt);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.meta-field label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.meta-field input {
  background: transparent;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  width: 100%;
}

.meta-field input:focus {
  outline: none;
  border-bottom: 1px solid var(--primary);
}

/* --------------------------------------------------------------------------
   14. Modal Dialogs & Toast Notifications
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 550px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface-alt);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.toast.toast-success {
  border-left: 4px solid var(--accent-emerald);
}

.toast.toast-error {
  border-left: 4px solid var(--accent-rose);
}

.toast.toast-info {
  border-left: 4px solid var(--accent-cyan);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.app-footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
  padding: 2rem 1.5rem;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-content {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-links a:hover {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   16. Print Stylesheet (@media print)
   Immaculate academic report formatting when user clicks "Print / PDF"
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .app-header,
  .tab-nav-wrapper,
  .header-actions,
  .scale-badge-btn,
  .semester-actions-footer,
  .table-action-btn,
  .app-footer,
  .toast-container,
  .modal-overlay,
  .btn-no-print {
    display: none !important;
  }

  .app-body {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .transcript-card, .panel, .semester-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 2rem !important;
  }

  .course-table th {
    background: #f1f5f9 !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .badge-standing {
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
}

/* --------------------------------------------------------------------------
   17. Responsive Design Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .planner-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

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

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

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .sem-quick-stats {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .transcript-card {
    padding: 1.25rem;
  }

  .metric-number {
    font-size: 2rem;
  }
}
