/* ==========================================================================
   Academic Weapon — Modern Academic Advising Center UI Design System
   AUCA Academic Advising Center (AAC)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Light Mode (Scholarly Navy & Warm Amber) */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Primary Brand (Deep Academic Navy / Royal Blue) */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  --primary-950: #0f172a;

  /* Accent (Academic Gold / Warm Amber) */
  --accent-50: #fffbeb;
  --accent-100: #fef3c7;
  --accent-200: #fde68a;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --accent-700: #b45309;

  /* Semantic UI Tokens */
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --panel: #ffffff;
  --panel-alt: #f8fafc;
  --sidebar: #0f172a;
  --sidebar-border: #1e293b;
  --sidebar-text: #f8fafc;
  --sidebar-muted: #94a3b8;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active: #2563eb;

  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --subtle: #94a3b8;

  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border2: #cbd5e1;
  --border-strong: #b6c2d1;
  --border-focus: #2563eb;

  --ink: #0f172a;
  --ink-hover: #1e293b;

  /* Status Colors */
  --green: #059669;
  --green-soft: #ecfdf5;
  --green-border: #a7f3d0;

  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --blue-border: #bfdbfe;

  --amber: #d97706;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;

  --red: #dc2626;
  --red-soft: #fef2f2;
  --red-border: #fecaca;

  --purple: #7c3aed;
  --purple-soft: #f5f3ff;
  --purple-border: #ddd6fe;

  /* Component Shadows & Glows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Dark Mode Tokens (Obsidian Slate & Luminescent Accents)
   -------------------------------------------------------------------------- */
[data-theme='dark'] {
  --bg: #090d16;
  --bg-subtle: #0f1626;
  --panel: #111827;
  --panel-alt: #162032;
  --sidebar: #0b101c;
  --sidebar-border: #1e293b;
  --sidebar-text: #f8fafc;
  --sidebar-muted: #94a3b8;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: #3b82f6;

  --text: #f8fafc;
  --text-secondary: #e2e8f0;
  --muted: #94a3b8;
  --subtle: #64748b;

  --border: #1e293b;
  --border-subtle: #162032;
  --border2: #334155;
  --border-strong: #475569;
  --border-focus: #60a5fa;

  --ink: #f8fafc;
  --ink-hover: #e2e8f0;

  --green: #34d399;
  --green-soft: rgba(5, 150, 105, 0.18);
  --green-border: rgba(52, 211, 153, 0.3);

  --blue: #60a5fa;
  --blue-soft: rgba(37, 99, 235, 0.18);
  --blue-border: rgba(96, 165, 250, 0.3);

  --amber: #fbbf24;
  --amber-soft: rgba(217, 119, 6, 0.18);
  --amber-border: rgba(251, 191, 36, 0.3);

  --red: #f87171;
  --red-soft: rgba(220, 38, 38, 0.18);
  --red-border: rgba(248, 113, 113, 0.3);

  --purple: #a78bfa;
  --purple-soft: rgba(124, 58, 237, 0.18);
  --purple-border: rgba(167, 139, 250, 0.3);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.45), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);

  color-scheme: dark;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.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;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

h1 {
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.35rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.25rem;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.small {
  font-size: 0.825rem;
}

.eyebrow, .section-overline, .nav-caption {
  font-size: 0.685rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-600);
}

[data-theme='dark'] .eyebrow,
[data-theme='dark'] .section-overline {
  color: var(--accent-500);
}

.eyebrow.dark {
  color: var(--muted);
}

.section-overline {
  color: var(--muted);
  margin-bottom: 0.35rem;
  display: block;
}

/* --------------------------------------------------------------------------
   3. Shell, Sidebar & Navigation
   -------------------------------------------------------------------------- */
.shell {
  display: flex;
  min-height: 100vh;
}

/* Modern Dark Collegiate Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 270px;
  background-color: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  padding: 1.5rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform var(--transition-normal);
  color: var(--sidebar-text);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  margin-bottom: 1.25rem;
}

.aac-logo {
  display: block;
  max-width: 100%;
  overflow: visible;
}

.sidebar-brand-logo {
  width: 210px;
  height: 78px;
}

.sidebar-divider {
  height: 1px;
  background-color: var(--sidebar-border);
  margin: 0.5rem 0.5rem 1rem;
}

/* Workspace Identity Pill in Sidebar */
.workspace-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin: 0 0.25rem 1.25rem;
}

.workspace-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.workspace-lines {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.workspace-lines strong {
  font-size: 0.85rem;
  font-weight: 650;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-lines small {
  font-size: 0.7rem;
  color: var(--sidebar-muted);
}

.workspace-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.nav-caption {
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--sidebar-muted);
  font-size: 0.65rem;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--sidebar-muted);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.nav-link:hover {
  background-color: var(--sidebar-hover);
  color: #ffffff;
}

.nav-link.active {
  background-color: var(--sidebar-active);
  color: #ffffff;
  font-weight: 650;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.nav-count {
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 0.35rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-500);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
}

.support-note {
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.support-emoji {
  color: var(--accent-500);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.support-note strong {
  font-size: 0.8rem;
  color: #ffffff;
  font-weight: 650;
}

.support-note span:last-child {
  font-size: 0.725rem;
  color: var(--sidebar-muted);
  line-height: 1.4;
}

.nav-link.logout {
  width: 100%;
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.15);
  font-size: 0.825rem;
  padding: 0.55rem 0.85rem;
}

.nav-link.logout:hover {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
}

.sidebar-footer {
  font-size: 0.675rem;
  color: var(--sidebar-muted);
  text-align: center;
  padding-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   4. Main Content Area & Topbar
   -------------------------------------------------------------------------- */
.main-area {
  margin-left: 270px;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: 64px;
  background-color: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.breadcrumb {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.crumb-sep {
  color: var(--subtle);
  margin: 0 0.5rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.demo-chip {
  background-color: var(--accent-50);
  border: 1px solid var(--accent-200);
  color: var(--accent-700);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.725rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}

[data-theme='dark'] .demo-chip {
  background-color: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-600);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background-color: var(--panel);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border2);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.notification-center {
  position: relative;
}

.notification-button {
  position: relative;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 0.28rem;
  border-radius: var(--radius-full);
  background: var(--red);
  color: #fff;
  border: 2px solid var(--panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  line-height: 1;
  font-weight: 800;
}

.notification-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: min(390px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 90px));
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 80;
}

.notification-center.open .notification-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.notification-menu-header > div {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.notification-menu-header strong {
  color: var(--text);
  font-size: 0.95rem;
}

.notification-read-all {
  color: var(--primary-600);
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.notification-read-all:hover {
  text-decoration: underline;
}

.notification-list {
  max-height: 420px;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 8px;
  align-items: start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item:hover,
.notification-item.unread {
  background: color-mix(in srgb, var(--primary-500) 6%, var(--panel));
}

.notification-kind {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-700);
  background: var(--primary-50);
}

.notification-kind.appointment {
  color: var(--accent-700);
  background: var(--accent-50);
}

[data-theme='dark'] .notification-kind {
  color: var(--blue);
  background: var(--blue-soft);
}

[data-theme='dark'] .notification-kind.appointment {
  color: var(--accent);
  background: var(--accent-soft);
}

.notification-kind svg {
  width: 17px;
  height: 17px;
}

.notification-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.notification-copy strong {
  color: var(--text);
  font-size: 0.8rem;
}

.notification-copy > span,
.notification-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.notification-copy small {
  font-size: 0.65rem;
}

.notification-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-600);
  margin-top: 0.35rem;
}

.notification-empty {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.top-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: 0.75rem;
  border: 2px solid var(--panel);
  box-shadow: var(--shadow-xs);
}

.content-area {
  width: min(1300px, 100%);
  margin: 0 auto;
  padding: 2rem 2rem 2.5rem;
  flex: 1;
}

.app-footer {
  margin-top: 3.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.app-footer span {
  margin: 0 0.4rem;
}

/* --------------------------------------------------------------------------
   5. Headings, Buttons & Badges
   -------------------------------------------------------------------------- */
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.staff-greeting {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--amber-soft) 0%, var(--panel) 72%);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
  box-shadow: var(--shadow-xs);
}

.staff-greeting-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: var(--radius-full);
  color: var(--accent-600);
  background: var(--accent-100);
}

[data-theme='dark'] .staff-greeting {
  background: linear-gradient(90deg, var(--amber-soft) 0%, var(--panel) 72%);
}

[data-theme='dark'] .staff-greeting-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.page-heading h1 {
  margin-top: 0.2rem;
}

.page-heading p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0;
  max-width: 650px;
}

.wave {
  display: inline-block;
  color: var(--accent-500);
}

.primary-btn, .secondary-btn, .dark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-md);
  font-weight: 650;
  font-size: 0.85rem;
  padding: 0.65rem 1.15rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}

.primary-btn {
  background-color: var(--primary-600);
  border: 1px solid var(--primary-600);
  color: #ffffff;
}

.primary-btn:hover {
  background-color: var(--primary-700);
  border-color: var(--primary-700);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.primary-btn:active {
  transform: translateY(0);
}

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

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

.dark-btn {
  background-color: var(--sidebar);
  border: 1px solid var(--sidebar-border);
  color: #ffffff;
}

.dark-btn:hover {
  background-color: #1e293b;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--panel);
  border: 1px solid var(--border2);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 650;
  transition: all var(--transition-fast);
}

.mini-btn:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  background-color: var(--primary-50);
}

[data-theme='dark'] .mini-btn:hover {
  background-color: var(--primary-900);
  color: var(--primary-200);
  border-color: var(--primary-500);
}

.outline-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

.count-bubble {
  padding: 0.2rem 0.55rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--muted);
}

.text-link {
  color: var(--primary-600);
  font-weight: 650;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.text-link:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

[data-theme='dark'] .text-link {
  color: var(--blue);
}

.arrow-link {
  color: var(--primary-600);
  font-weight: 750;
  font-size: 1.1rem;
  line-height: 1;
}

[data-theme='dark'] .arrow-link {
  color: var(--blue);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.back-link:hover {
  color: var(--primary-600);
}

/* --------------------------------------------------------------------------
   6. Statistics Cards & KPI Grids
   -------------------------------------------------------------------------- */
.stats-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stats-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme='dark'] .stat-icon {
  background-color: var(--blue-soft);
  color: var(--blue);
}

.stat-icon svg {
  width: 16px;
  height: 16px;
}

.stat-big {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0.65rem 0 0.4rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-big .slash {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--subtle);
}

.stat-foot {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.subtle-pill {
  font-size: 0.675rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--subtle);
}

.mini-track {
  height: 6px;
  background-color: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.65rem;
}

.mini-track > span {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--primary-500), #10b981);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Feature Hero Banner (Student Recovery Plan) */
.feature-banner {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.feature-banner .eyebrow {
  color: var(--accent-500);
}

.feature-stat {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.35rem 0;
  color: #ffffff;
}

.feature-stat span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary-200);
}

.feature-banner p {
  color: #cbd5e1;
  margin: 0;
  font-size: 0.85rem;
}

.feature-track {
  height: 12px;
  width: 200px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.feature-track-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-500), #34d399);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* --------------------------------------------------------------------------
   7. Panels, Layout Grids & Cards
   -------------------------------------------------------------------------- */
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.two-columns.wide-left {
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.panel {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.panel.section-margin {
  margin-top: 1.5rem;
}

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

.panel.warm {
  background: linear-gradient(135deg, var(--accent-50), var(--panel));
  border-color: var(--accent-200);
}

[data-theme='dark'] .panel.warm {
  background: linear-gradient(135deg, var(--accent-soft), var(--panel));
  border-color: var(--accent-border);
}

.panel.warm h2 {
  color: var(--text);
}

.panel.warm p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0.75rem 0 1.25rem;
}

.tip-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #a7f3d0;
  padding: 1.35rem 1.5rem;
  color: #065f46;
}

[data-theme='dark'] .tip-card {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.25), rgba(6, 78, 59, 0.2));
  border-color: rgba(52, 211, 153, 0.25);
  color: #d1fae5;
}

.tip-icon {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: #059669;
}

.tip-card strong {
  display: block;
  font-size: 0.95rem;
  color: inherit;
  margin-bottom: 0.25rem;
}

.tip-card p {
  font-size: 0.825rem;
  line-height: 1.6;
  margin: 0;
  color: inherit;
  opacity: 0.9;
}

.insight-card {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.insight-card .section-overline {
  color: var(--accent-500);
}

.insight-card h2 {
  font-size: 1.15rem;
  line-height: 1.4;
  margin: 0.75rem 0 0.5rem;
  color: #ffffff;
}

.insight-card p {
  font-size: 0.825rem;
  color: #94a3b8;
  line-height: 1.6;
}

.insight-card a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-500);
  font-size: 0.825rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   8. Task Lists, Goals & Meetings
   -------------------------------------------------------------------------- */
.task-list {
  display: flex;
  flex-direction: column;
}

.task-line {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.task-line:first-child {
  border-top: none;
  padding-top: 0;
}

.task-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #ffffff;
  margin-top: 0.15rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.task-check.is-done {
  background-color: var(--green);
  border-color: var(--green);
}

.task-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.task-body strong {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text);
}

.task-body span {
  font-size: 0.8rem;
  color: var(--muted);
}

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

.task-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.date-small {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Goals */
.goal-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.goal-item {
  display: flex;
  flex-direction: column;
  position: relative;
}

.goal-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 3.7rem 1rem 1rem;
  background-color: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.goal-card:hover {
  border-color: var(--border2);
}

.goal-spark {
  color: var(--accent-600);
  font-size: 1.1rem;
  line-height: 1;
}

.goal-card > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.goal-card strong {
  font-size: 0.9rem;
  font-weight: 650;
}

.goal-card > div span {
  font-size: 0.8rem;
  color: var(--muted);
}

.goal-card > div .tag-soft {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.goal-edit-panel {
  padding: 0;
}

.goal-edit-panel summary {
  align-items: center;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  color: var(--primary-600);
  cursor: pointer;
  display: inline-flex;
  height: 2.15rem;
  justify-content: center;
  list-style: none;
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  width: 2.15rem;
  z-index: 1;
}

.goal-edit-panel summary:hover,
.goal-edit-panel summary:focus-visible,
.goal-edit-panel[open] summary {
  background-color: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-700);
}

[data-theme='dark'] .goal-edit-panel summary {
  color: var(--blue);
}

[data-theme='dark'] .goal-edit-panel summary:hover,
[data-theme='dark'] .goal-edit-panel summary:focus-visible,
[data-theme='dark'] .goal-edit-panel[open] summary {
  background-color: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.45);
}

.goal-edit-panel summary::-webkit-details-marker {
  display: none;
}

.goal-edit-panel .inset-form {
  margin-top: 0.65rem;
}

.goal-edit-panel .form-row {
  grid-template-columns: minmax(0, 1fr);
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.goal-tile {
  background-color: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tile-icon {
  color: var(--primary-600);
  font-size: 1.25rem;
}

[data-theme='dark'] .tile-icon {
  color: var(--blue);
}

.goal-tile strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.goal-tile p {
  font-size: 0.825rem;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.goal-tile .tag-soft {
  align-self: flex-start;
}

/* Meetings */
.meeting-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}

.meeting-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.meeting-calendar {
  width: 44px;
  height: 48px;
  background-color: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary-700);
  flex-shrink: 0;
}

[data-theme='dark'] .meeting-calendar {
  background-color: var(--primary-900);
  border-color: var(--primary-700);
  color: var(--primary-200);
}

.meeting-calendar b {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 800;
}

.meeting-calendar small {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meeting-item > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meeting-item strong {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--text);
}

.meeting-item > div span {
  font-size: 0.775rem;
  color: var(--muted);
}

.meeting-wide {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  column-gap: 1rem;
  row-gap: 0.7rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.meeting-wide:first-child {
  border-top: none;
}

.meeting-wide > div {
  grid-column: 2;
  min-width: 0;
}

.meeting-wide strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.meeting-wide p {
  font-size: 0.825rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}

.meeting-time-form {
  grid-column: 2;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-left: 0;
  min-width: 0;
}

.meeting-time-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 130px;
  min-width: 0;
}

.meeting-time-form label span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meeting-time-form input[type='time'] {
  width: 100%;
  padding: 0.38rem 0.5rem;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
}

.meeting-time-form .mini-btn {
  min-height: 35px;
  flex: 0 0 auto;
}

.meeting-wide > .status {
  grid-column: 2;
  justify-self: start;
}

/* Follow-ups */
.followup-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  align-items: flex-start;
}

.followup-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.followup-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background-color: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.followup-icon.high {
  background-color: var(--red-soft);
  color: var(--red);
}

.followup-item > div {
  flex: 1;
  min-width: 0;
}

.followup-item strong {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text);
}

.followup-item p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.2rem 0;
  line-height: 1.4;
}

.followup-item > div span {
  font-size: 0.725rem;
  color: var(--subtle);
}

.side-followup {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.side-followup > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.side-followup strong {
  font-size: 0.85rem;
}

.side-followup > div span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   9. Tables, Badges & Indicators
   -------------------------------------------------------------------------- */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.data-table th {
  padding: 0.75rem 1rem;
  font-size: 0.725rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background-color: var(--panel-alt);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th:first-child {
  border-top-left-radius: var(--radius-sm);
}

.data-table th:last-child {
  border-top-right-radius: var(--radius-sm);
}

.data-table td {
  padding: 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
  transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover td {
  background-color: var(--bg-subtle);
}

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

.data-table td strong {
  font-weight: 650;
  color: var(--text);
}

.table-subtext {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.table-bottom {
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
  margin-top: 0.5rem;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 160px;
}

.person-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
  color: var(--primary-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}

[data-theme='dark'] .person-avatar {
  background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
  color: var(--primary-200);
}

.person-cell > div {
  display: flex;
  flex-direction: column;
}

.person-cell > div strong {
  font-size: 0.875rem;
}

.person-cell > div span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Status Badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 700;
  white-space: nowrap;
}

.status.completed,
.status.on-track {
  background-color: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.status.active-plan,
.status.to-do {
  background-color: var(--blue-soft);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}

.status.in-progress {
  background-color: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.status.needs-review {
  background-color: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.status.initial-assessment {
  background-color: var(--purple-soft);
  color: var(--purple);
  border: 1px solid var(--purple-border);
}

.status.academic-leave {
  background-color: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.status.dismissed {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

[data-theme='dark'] .status.academic-leave {
  background-color: #7c2d12;
  color: #fed7aa;
  border-color: #9a3412;
}

[data-theme='dark'] .status.dismissed {
  background-color: #3f3f46;
  color: #e4e4e7;
  border-color: #52525b;
}

.status.semester-review {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

[data-theme='dark'] .status.semester-review {
  background-color: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

/* Priority Badges */
.priority {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.725rem;
  font-weight: 700;
  white-space: nowrap;
  background-color: var(--blue-soft);
  color: var(--blue);
}

.priority.high {
  background-color: var(--red-soft);
  color: var(--red);
}

.priority.low {
  background-color: var(--green-soft);
  color: var(--green);
}

/* Attention Indicator */
.attention {
  font-size: 0.775rem;
  font-weight: 650;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.attention::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--subtle);
  flex-shrink: 0;
}

.attention.regular::before {
  background-color: #10b981;
}

.attention.follow-up-needed::before {
  background-color: #f59e0b;
}

.attention.priority-attention::before {
  background-color: #ef4444;
}

.tag-soft {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   10. Forms, Inputs & Filters
   -------------------------------------------------------------------------- */
input, select, textarea {
  background-color: var(--panel);
  color: var(--text);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

input::placeholder, textarea::placeholder {
  color: var(--subtle);
}

.filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar select {
  min-width: 145px;
  max-width: 220px;
}

.filter-bar select[name='faculty'] {
  min-width: 190px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background-color: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 0 0.85rem;
  flex: 1;
  min-width: 240px;
}

.search-wrap > span {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.search-wrap input {
  border: none;
  background: transparent;
  padding: 0.65rem 0;
  box-shadow: none;
  width: 100%;
}

.search-wrap input:focus {
  box-shadow: none;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-stack label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.825rem;
  font-weight: 650;
  color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.add-section {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.add-section summary {
  color: var(--primary-600);
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

[data-theme='dark'] .add-section summary {
  color: var(--blue);
}

.add-section summary::-webkit-details-marker {
  display: none;
}

.inset-form {
  background-color: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 0.85rem;
}

.tiny-select {
  padding: 0.35rem 0.5rem;
  font-size: 0.775rem;
  border-radius: var(--radius-sm);
}

.inline-edit {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  margin-bottom: 0.5rem;
}

.inline-edit select {
  flex: 1 1 180px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.inline-edit .secondary-btn {
  flex: 1 1 130px;
  max-width: 100%;
  white-space: nowrap;
}

/* Weekly Check-in Form */
.padded-form {
  max-width: 680px;
}

.checkin-window-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  margin-bottom: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.checkin-window-note svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary-600);
}

.checkin-window-note div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.checkin-window-note strong {
  color: var(--text);
  font-size: 0.8rem;
}

.checkin-window-note span {
  color: var(--muted);
  font-size: 0.73rem;
}

.checkin-state-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.checkin-state-card.complete {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green-border);
}

.checkin-state-card.locked {
  color: var(--primary-700);
  background: var(--primary-50);
  border-color: var(--primary-200);
}

[data-theme='dark'] .checkin-state-card.locked {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue-border);
}

.checkin-state-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, currentColor 12%, transparent);
  font-weight: 850;
}

.checkin-state-icon svg {
  width: 17px;
  height: 17px;
}

.checkin-state-card h3 {
  color: currentColor;
  font-size: 0.95rem;
  margin: 0 0 0.3rem;
}

.checkin-state-card p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.field-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.radio-chips {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.radio-chips label {
  position: relative;
  cursor: pointer;
}

.radio-chips input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.radio-chips span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  background-color: var(--panel);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.radio-chips input:checked + span {
  border-color: var(--primary-600);
  background-color: var(--primary-50);
  color: var(--primary-700);
  box-shadow: 0 0 0 1px var(--primary-600);
}

[data-theme='dark'] .radio-chips input:checked + span {
  background-color: var(--blue-soft);
  color: var(--blue);
  border-color: var(--blue);
}

.radio-chips span:hover {
  border-color: var(--subtle);
  background-color: var(--bg-subtle);
}

/* History Items & Mood Dots */
.history-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

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

.history-item > div {
  flex: 1;
}

.history-item strong {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--text);
}

.history-item > div > span {
  font-size: 0.75rem;
  color: var(--muted);
}

.history-item p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.mood-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.mood-dot.good {
  background-color: #10b981;
}

.mood-dot.okay {
  background-color: #f59e0b;
}

.mood-dot.difficult {
  background-color: #ef4444;
}

.alert-text {
  color: var(--red);
  font-weight: 700;
}

/* Alerts */
.alert {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 550;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   11. Student Profile & Plans Grid
   -------------------------------------------------------------------------- */
.profile-heading {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.profile-identity {
  flex: 1;
}

.profile-identity h1 {
  margin: 0.15rem 0 0.25rem;
}

.profile-identity > span {
  font-size: 0.875rem;
  color: var(--muted);
}

.profile-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.profile-heading-actions .secondary-btn {
  white-space: nowrap;
}

.profile-info {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.profile-info > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-info > div span {
  font-size: 0.725rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-info > div strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

.last-seen-value {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}

.last-seen-value::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 0.45rem;
  border-radius: 999px;
  background: var(--muted);
  opacity: 0.55;
}

.last-seen-value.online {
  color: var(--green);
}

.last-seen-value.online::before {
  background: var(--green);
  opacity: 1;
  box-shadow: 0 0 0 3px var(--green-soft);
}

.data-table .student-action-cell {
  width: 1%;
  min-width: 8.5rem;
  text-align: right;
  white-space: nowrap;
}

.student-action-button {
  min-width: 7.5rem;
  white-space: nowrap;
}

.advisor-assignment {
  margin-top: 0.2rem;
}

.advisor-assignment summary {
  width: fit-content;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
  list-style-position: inside;
}

.advisor-assignment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.advisor-assignment-form select {
  min-width: 0;
  width: 100%;
}

.advisor-assignment-form .secondary-btn {
  padding-inline: 0.8rem;
}

.attention-level-editor {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 6rem;
}

.attention-level-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.attention-level-heading h3 {
  margin: 0.12rem 0 0;
  font-size: 1rem;
}

.attention-level-readonly {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Advising Team Events
   -------------------------------------------------------------------------- */
.events-metrics {
  margin-bottom: 1.5rem;
}

.event-create-form {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(145px, 1fr) 115px 115px minmax(120px, 1fr) minmax(130px, 1fr) auto;
  align-items: end;
  gap: 0.8rem;
}

.event-add-button {
  min-height: 44px;
  white-space: nowrap;
}

.event-form-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.events-table-heading {
  gap: 1rem;
  flex-wrap: wrap;
}

.events-help {
  margin: -0.15rem 0 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.events-table {
  min-width: 1120px;
}

.events-table th:last-child,
.events-table td:last-child {
  text-align: right;
}

.events-table td {
  padding: 0.85rem 0.7rem;
}

.events-table tr:target td {
  background: var(--primary-50);
}

[data-theme='dark'] .events-table tr:target td {
  background: var(--blue-soft);
}

.event-name-column {
  min-width: 285px;
}

.event-row td:first-child {
  border-left: 3px solid transparent;
}

.event-row--planned td:first-child { border-left-color: var(--primary-500); }
.event-row--confirmed td:first-child { border-left-color: #8b5cf6; }
.event-row--done td:first-child { border-left-color: var(--green); }
.event-row--cancelled td:first-child { border-left-color: var(--red); }

.event-row--editing td {
  background: var(--blue-soft);
}

.event-name {
  display: block;
  color: var(--text);
  line-height: 1.4;
}

.event-date,
.event-time,
.event-room {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.event-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.3rem 0.68rem;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.event-status--planned {
  color: var(--primary-700);
  border-color: color-mix(in srgb, var(--primary-500) 28%, transparent);
  background: var(--blue-soft);
}

.event-status--confirmed {
  color: #7c3aed;
  border-color: color-mix(in srgb, #8b5cf6 30%, transparent);
  background: color-mix(in srgb, #8b5cf6 10%, var(--panel));
}

.event-status--done {
  color: var(--green);
  border-color: var(--green-border);
  background: var(--green-soft);
}

.event-status--cancelled {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-soft);
}

[data-theme='dark'] .event-status--confirmed { color: #c4b5fd; }

.event-cell-input {
  width: 100%;
  min-height: 40px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-strong, var(--border2));
  border-radius: var(--radius-sm);
  background: var(--panel-alt);
  color: var(--text);
}

.event-cell-input:hover {
  border-color: color-mix(in srgb, var(--border-focus) 50%, var(--border-strong));
}

.event-cell-input:focus {
  border-color: var(--border-focus);
  background: var(--panel);
}

.event-date-input {
  min-width: 145px;
}

.event-room-input {
  min-width: 105px;
}

.event-status-select {
  min-width: 125px;
  font-weight: 700;
}

.event-time-pair {
  display: grid;
  grid-template-columns: 105px auto 105px;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
}

.event-action-cell {
  width: 1%;
  min-width: 105px;
  white-space: nowrap;
}

.event-action-cell .secondary-btn,
.event-action-cell .primary-btn {
  min-height: 40px;
  padding-inline: 0.9rem;
}

.event-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.event-edit-button {
  min-width: 82px;
}

@media (max-width: 1250px) {
  .event-create-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .event-create-name {
    grid-column: span 2;
  }

  .event-form-actions {
    grid-column: span 3;
    justify-content: flex-end;
  }
}

@media (max-width: 700px) {
  .event-create-form {
    grid-template-columns: 1fr 1fr;
  }

  .event-create-name,
  .event-form-actions {
    grid-column: 1 / -1;
  }

  .event-form-actions > * {
    flex: 1;
  }
}

/* Plans Directory Grid */
.plan-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.index-card {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.index-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-500);
  box-shadow: var(--shadow-md);
}

.index-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.index-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.index-card p {
  font-size: 0.825rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.index-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
  margin-top: auto;
}

.index-footer > span:first-child {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

/* Activity Log */
.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  align-items: center;
}

.activity-item:first-of-type {
  border-top: none;
}

.activity-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background-color: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme='dark'] .activity-mark {
  background-color: var(--blue-soft);
  color: var(--blue);
}

.activity-mark svg {
  width: 16px;
  height: 16px;
}

.activity-item > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.activity-item strong {
  font-size: 0.875rem;
  font-weight: 650;
}

.activity-item span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   12. Login Portal Layout
   -------------------------------------------------------------------------- */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 46% 54%;
  background-color: var(--panel);
}

.login-art {
  background: linear-gradient(135deg, #090d16 0%, #0f172a 45%, #1e3a8a 100%);
  color: #ffffff;
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-art::after {
  content: '';
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.03), 0 0 0 160px rgba(255, 255, 255, 0.015);
  pointer-events: none;
}

.login-brand {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.login-brand-logo {
  width: 250px;
  height: 96px;
}

.login-art-center {
  margin: auto 0;
  position: relative;
  z-index: 1;
}

.login-art-center .eyebrow {
  color: var(--accent-500);
}

.login-art-center h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 1.25rem 0 1rem;
}

.orange-period {
  color: var(--accent-500);
}

.login-art-center p {
  font-size: 1.05rem;
  color: #94a3b8;
  max-width: 420px;
  line-height: 1.65;
}

.art-lines {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
}

.art-lines span {
  height: 4px;
  border-radius: var(--radius-full);
}

.art-lines span:nth-child(1) {
  width: 60px;
  background-color: var(--accent-500);
}

.art-lines span:nth-child(2) {
  width: 30px;
  background-color: #3b82f6;
}

.art-lines span:nth-child(3) {
  width: 15px;
  background-color: rgba(255, 255, 255, 0.25);
}

.login-art-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  color: #64748b;
  font-size: 0.75rem;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  position: relative;
}

.login-top-actions {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.login-box {
  width: min(420px, 100%);
}

.login-box h2 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.login-intro {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.google-signin-block {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  width: 100%;
}

.google-signin-block #googleSignInButton {
  width: 100%;
  min-height: 44px;
  display: flex;
  justify-content: center;
}

.google-access-note {
  margin: 0;
  max-width: 360px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

.google-signin-error {
  margin: 0;
  max-width: 360px;
  color: var(--danger);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

.google-setup-note {
  display: grid;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  background: var(--panel-alt);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.google-setup-note span {
  color: var(--muted);
}

.google-setup-note code {
  color: var(--primary-700);
  font-weight: 700;
}

.signin-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.35rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.signin-divider::before,
.signin-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--border);
}

.signin-divider span {
  white-space: nowrap;
}

.primary-btn.large {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.demo-signin {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.demo-account-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.demo-account {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 1rem;
  text-align: left;
  border: 1px solid var(--border2);
  background-color: var(--panel-alt);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: all var(--transition-fast);
}

.demo-account:hover,
.demo-account.selected {
  border-color: var(--primary-600);
  background-color: var(--primary-50);
  box-shadow: 0 0 0 1px var(--primary-600);
}

[data-theme='dark'] .demo-account:hover,
[data-theme='dark'] .demo-account.selected {
  background-color: var(--blue-soft);
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.demo-account-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--panel);
  border: 1px solid var(--border);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

[data-theme='dark'] .demo-account-icon {
  color: var(--blue);
}

.demo-account > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.demo-account strong {
  font-size: 0.875rem;
  font-weight: 700;
}

.demo-account small {
  font-size: 0.75rem;
  color: var(--muted);
}

.login-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   13. Responsive Breakpoints & Mobile Nav
   -------------------------------------------------------------------------- */
.mobile-menu,
.mobile-screen {
  display: none;
}

@media (max-width: 1100px) {
  .content-area {
    padding: 1.5rem;
  }

  .stats-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-columns.wide-left {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  }

  .goal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-screen.show {
    display: block;
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 35;
  }

  .mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background-color: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
  }

  .main-area {
    margin-left: 0;
  }

  .topbar {
    padding: 0 1rem;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }

  .two-columns {
    grid-template-columns: 1fr !important;
  }

  .stats-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .content-area {
    padding: 1rem;
  }

  .stats-grid.three,
  .stats-grid.four {
    grid-template-columns: 1fr;
  }

  .plan-index-grid,
  .goal-grid {
    grid-template-columns: 1fr;
  }

  .page-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .page-heading .primary-btn {
    width: 100%;
  }

  .feature-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
  }

  .feature-track {
    width: 100%;
  }

  .profile-info {
    grid-template-columns: 1fr;
  }

  .advisor-assignment-form {
    grid-template-columns: 1fr;
  }

  .advisor-assignment-form .secondary-btn {
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .demo-chip {
    display: none;
  }

  .filter-bar .search-wrap,
  .filter-bar select,
  .filter-bar .secondary-btn {
    width: 100%;
    min-width: 100%;
    max-width: none;
    flex: 1 1 100%;
  }
}

/* --------------------------------------------------------------------------
   25. Native AAC Tracker
   -------------------------------------------------------------------------- */
.tracker-root {
  position: relative;
}

.tracker-heading {
  align-items: flex-end;
}

.tracker-alert {
  margin: -0.5rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  background: var(--warning-soft);
  color: var(--warning-text);
  font-weight: 650;
}

.tracker-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding: 0.35rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.tracker-tabs button,
.tracker-filter-tabs button {
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.tracker-tabs button {
  min-height: 44px;
  padding: 0.65rem 1rem;
}

.tracker-tabs button:hover,
.tracker-filter-tabs button:hover {
  color: var(--text);
  background: var(--surface);
}

.tracker-tabs button.active,
.tracker-filter-tabs button.active {
  color: #fff;
  background: var(--primary-600);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--primary-600) 23%, transparent);
}

.tracker-view {
  display: none;
}

.tracker-view.active {
  display: block;
  animation: tracker-enter 160ms ease-out;
}

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

.tracker-metrics .stat-card span,
.tracker-metrics .stat-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.tracker-metrics .stat-card span {
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.tracker-metrics .stat-card strong {
  margin: 0.55rem 0 0.2rem;
  color: var(--text);
  font-size: 2.2rem;
  line-height: 1;
}

.tracker-metrics .stat-card:nth-child(1) {
  border-color: var(--green-border);
  background: linear-gradient(135deg, var(--green-soft), var(--panel));
}

.tracker-metrics .stat-card:nth-child(2) {
  border-color: var(--amber-border);
  background: linear-gradient(135deg, var(--amber-soft), var(--panel));
}

.tracker-metrics .stat-card:nth-child(3) {
  border-color: var(--red-border);
  background: linear-gradient(135deg, var(--red-soft), var(--panel));
}

.tracker-metrics .stat-card:nth-child(4) {
  border-color: var(--blue-border);
  background: linear-gradient(135deg, var(--blue-soft), var(--panel));
}

.tracker-dashboard-columns,
.tracker-report-grid {
  align-items: stretch;
}

.tracker-dashboard-columns > .panel,
.tracker-report-grid > .panel,
.tracker-report-grid > .stack {
  min-width: 0;
}

.tracker-bars {
  display: flex;
  min-height: 200px;
  align-items: end;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 1.15rem 0.25rem 0;
}

.tracker-bars.compact {
  min-height: 150px;
}

.tracker-bar-item {
  display: grid;
  flex: 1 0 78px;
  min-width: 78px;
  grid-template-rows: auto 1fr auto;
  align-items: end;
  gap: 0.4rem;
  text-align: center;
}

.tracker-bar-item strong {
  color: var(--text);
  font-size: 0.86rem;
}

.tracker-bar-item i {
  display: block;
  width: 100%;
  min-height: 5px;
  border-radius: 8px 8px 2px 2px;
  border: 1px solid color-mix(in srgb, var(--primary-500) 30%, transparent);
  background: linear-gradient(180deg, var(--primary-500) 0%, var(--primary-200) 62%, #ffffff 100%);
}

[data-advisor-bars] .tracker-bar-item i {
  border: 1px solid color-mix(in srgb, var(--accent-500) 35%, transparent);
  background: linear-gradient(180deg, var(--accent-500) 0%, var(--accent-200) 58%, #ffffff 100%);
}

.tracker-bar-item span {
  min-height: 2.3em;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.15;
}

.tracker-ranked-list {
  display: grid;
}

.tracker-ranked-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.74rem 0;
  border-bottom: 1px solid var(--border);
}

.tracker-ranked-list > div:last-child {
  border-bottom: 0;
}

.tracker-ranked-list strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tracker-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.tracker-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.tracker-table th,
.tracker-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.tracker-table th {
  color: var(--muted);
  background: var(--surface);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.tracker-table td {
  color: var(--text);
  font-size: 0.84rem;
}

.tracker-table td small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
}

.tracker-status {
  display: inline-flex;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
  white-space: nowrap;
}

.tracker-status.open {
  color: var(--warning-text);
  background: var(--warning-soft);
}

.tracker-status.closed {
  color: var(--success-text);
  background: var(--success-soft);
}

.tracker-search {
  position: relative;
}

.tracker-search input {
  width: 100%;
}

.tracker-search-results {
  position: absolute;
  z-index: 12;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.tracker-search-results button {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.tracker-search-results button:hover {
  background: var(--surface);
}

.tracker-search-results button:last-child {
  border-bottom: 0;
}

.tracker-search-results span {
  color: var(--muted);
  font-size: 0.77rem;
}

.tracker-selected-student,
.tracker-profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tracker-selected-student {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  background: var(--primary-50);
}

[data-theme='dark'] .tracker-selected-student {
  background: var(--blue-soft);
}

.tracker-selected-student .profile-avatar {
  flex: 0 0 auto;
}

.tracker-selected-student > div {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.tracker-selected-student span,
.tracker-selected-student small {
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.38rem;
}

.form-field label,
.tracker-topic-fieldset legend {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 750;
}

.form-field input,
.form-field select,
.form-field textarea,
.tracker-search input,
.tracker-visit-form textarea {
  width: 100%;
  border: 1px solid var(--border-strong, var(--border2));
  border-radius: var(--radius-md);
  background: var(--panel-alt);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.tracker-visit-form input:hover:not(:disabled),
.tracker-visit-form select:hover:not(:disabled),
.tracker-visit-form textarea:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--border-focus) 55%, var(--border-strong));
}

.tracker-visit-form input:focus,
.tracker-visit-form select:focus,
.tracker-visit-form textarea:focus {
  border-color: var(--border-focus);
  background: var(--panel);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--border-focus) 16%, transparent);
}

.tracker-visit-form input:disabled,
.tracker-visit-form select:disabled,
.tracker-visit-form textarea:disabled {
  border-style: dashed;
  background: var(--bg-subtle);
  color: var(--subtle);
  cursor: not-allowed;
  opacity: 0.78;
}

.form-field input,
.form-field select,
.tracker-search input {
  min-height: 44px;
  padding: 0 0.8rem;
}

.form-field textarea,
.tracker-visit-form textarea {
  min-height: 112px;
  padding: 0.75rem 0.8rem;
  resize: vertical;
}

.tracker-topic-fieldset {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.tracker-topic-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.tracker-topic-options label {
  cursor: pointer;
}

.tracker-topic-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tracker-topic-options span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  font-size: 0.78rem;
  font-weight: 700;
}

.tracker-topic-options input:checked + span {
  border-color: var(--primary-500);
  color: var(--primary-700);
  background: var(--primary-50);
}

[data-theme='dark'] .tracker-topic-options input:checked + span {
  color: var(--blue);
  background: var(--blue-soft);
}

.tracker-topic-options input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--primary-500) 25%, transparent);
  outline-offset: 2px;
}

.tracker-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.tracker-filter-row,
.tracker-report-form {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tracker-filter-tabs {
  display: flex;
  flex: 1;
  gap: 0.25rem;
  overflow-x: auto;
}

.tracker-filter-tabs button {
  min-height: 38px;
  padding: 0.45rem 0.75rem;
}

.tracker-advisor-filter {
  width: min(240px, 100%);
}

.tracker-profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 0.75rem;
}

.tracker-profile-facts span {
  display: flex;
  min-width: 90px;
  flex-direction: column;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.tracker-profile-facts small {
  color: var(--muted);
}

.tracker-report-form .form-field {
  flex: 1 1 155px;
}

.tracker-report-form .primary-btn {
  min-height: 44px;
}

.tracker-report-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 1.25rem;
}

.tracker-report-metrics,
.tracker-report-grid,
.tracker-year-grid {
  margin-top: 1.5rem;
}

.tracker-year-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.tracker-report-grid .stack {
  display: grid;
  gap: 1.25rem;
}

.tracker-report-metrics .stat-card:first-child {
  border-color: var(--blue-border);
  background: linear-gradient(135deg, var(--blue-soft), var(--panel));
}

.tracker-report-metrics .stat-card:last-child {
  border-color: var(--green-border);
  background: linear-gradient(135deg, var(--green-soft), var(--panel));
}

.tracker-chart-note {
  margin: -0.3rem 0 0.3rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.tracker-bars-unique .tracker-bar-item i {
  border-color: color-mix(in srgb, var(--green) 30%, transparent);
  background: linear-gradient(180deg, var(--green) 0%, var(--green-border) 62%, #ffffff 100%);
}

.tracker-report-summary {
  display: flex;
  flex-direction: column;
}

.tracker-report-summary > strong {
  margin: 0.4rem 0 0.1rem;
  color: var(--text);
  font-size: 3rem;
  line-height: 1;
}

.tracker-report-summary h2 {
  margin: 1.4rem 0 0.55rem;
}

.tracker-empty {
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

.tracker-toast {
  position: fixed;
  z-index: 90;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--success-600, #08785b);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
}

.tracker-toast.error {
  background: var(--danger-600, #b42318);
}

.tracker-loading::after {
  content: '';
  position: fixed;
  z-index: 80;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: tracker-spin 700ms linear infinite;
  background: var(--panel);
}

@keyframes tracker-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .tracker-metrics.stats-grid.four,
  .form-grid.three-col,
  .tracker-report-grid,
  .tracker-year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracker-report-grid > .stack {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .tracker-heading,
  .tracker-profile-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .tracker-metrics.stats-grid.four,
  .form-grid.two-col,
  .form-grid.three-col,
  .tracker-report-grid,
  .tracker-year-grid,
  .tracker-profile-facts {
    grid-template-columns: 1fr;
  }

  .tracker-tabs {
    margin-right: -0.6rem;
    margin-left: -0.6rem;
    border-radius: 0;
  }

  .tracker-form-actions,
  .tracker-form-actions .primary-btn,
  .tracker-form-actions .secondary-btn,
  .tracker-report-form .primary-btn {
    width: 100%;
  }

  .tracker-form-actions {
    flex-direction: column-reverse;
  }

  .tracker-filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .tracker-advisor-filter {
    width: 100%;
  }

  .tracker-toast {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
  }
}

/* --------------------------------------------------------------------------
   14. Student Deadlines & Advisor Booking Modal
   -------------------------------------------------------------------------- */
.course-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 700;
  background-color: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
  white-space: nowrap;
}

[data-theme='dark'] .course-badge {
  background-color: var(--blue-soft);
  color: var(--blue);
  border-color: var(--blue-border);
}

.weight-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 800;
  background-color: var(--accent-50);
  color: var(--accent-700);
  border: 1px solid var(--accent-200);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

[data-theme='dark'] .weight-badge {
  background-color: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

.time-badge {
  color: var(--muted);
  font-size: 0.825rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

/* Modal Window for Advisor Follow-up (AUCA Booking Link) */
.advisor-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.advisor-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.advisor-modal-box {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  max-width: 490px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.advisor-modal.open .advisor-modal-box {
  transform: scale(1);
}

.advisor-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

[data-theme='dark'] .advisor-modal-icon {
  background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
  color: var(--primary-200);
}

.advisor-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.advisor-modal-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.advisor-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.advisor-callout {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background-color: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

[data-theme='dark'] .advisor-callout {
  background-color: var(--blue-soft);
  border-color: var(--blue-border);
}

.advisor-callout p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-800);
}

[data-theme='dark'] .advisor-callout p {
  color: var(--primary-100);
}

/* --------------------------------------------------------------------------
   15. Stacked Course Grade Accumulator Styles
   -------------------------------------------------------------------------- */
.course-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.course-progress-card {
  background-color: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.course-progress-card:hover {
  border-color: var(--primary-500);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.course-progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.course-name-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.course-tasks-count {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 550;
}

.course-score-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background-color: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--green);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  line-height: 1.1;
  flex-shrink: 0;
}

.course-score-badge strong {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.course-score-badge small {
  font-size: 0.675rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stacked-progress-track {
  height: 10px;
  background-color: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
  position: relative;
}

.stacked-fill {
  height: 100%;
  transition: width 0.4s ease;
}

.stacked-fill.earned {
  background: linear-gradient(90deg, #10b981, #059669);
}

.stacked-fill.pending {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.course-progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.775rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  flex-wrap: wrap;
}

.progress-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.progress-legend-item strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.earned {
  background-color: #10b981;
}

.legend-dot.pending {
  background-color: #3b82f6;
}

.legend-dot.total {
  background-color: var(--subtle);
}


/* ── TASK CRUD ─────────────────────────────────────────────── */

/* Source badges */
.task-source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  font-size: 0.65rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.task-source-badge.self {
  background: var(--accent-amber);
  color: #1a1200;
}
.task-source-badge.aac {
  background: var(--accent-blue, #2563eb);
  color: #fff;
}

/* Row styling for completed tasks */
.task-row-done td {
  opacity: 0.6;
}

/* Inline select dropdowns in table */
.inline-field-form {
  margin: 0;
  display: inline;
}
.inline-select {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  transition: background 0.15s;
}
.inline-select:hover, .inline-select:focus {
  outline: 2px solid var(--accent-navy);
}

/* Priority colors */
.inline-select.priority-select.low    { background: #dcfce7; color: #166534; }
.inline-select.priority-select.medium { background: #fef9c3; color: #854d0e; }
.inline-select.priority-select.high   { background: #fee2e2; color: #991b1b; }
[data-theme="dark"] .inline-select.priority-select.low    { background: #14532d; color: #bbf7d0; }
[data-theme="dark"] .inline-select.priority-select.medium { background: #713f12; color: #fef08a; }
[data-theme="dark"] .inline-select.priority-select.high   { background: #7f1d1d; color: #fecaca; }

/* Status colors */
.inline-select.status-select.to-do       { background: var(--subtle); color: var(--text-secondary); }
.inline-select.status-select.in-progress { background: #dbeafe; color: #1e40af; }
.inline-select.status-select.completed   { background: #dcfce7; color: #166534; }
[data-theme="dark"] .inline-select.status-select.to-do       { background: var(--subtle); color: var(--text-secondary); }
[data-theme="dark"] .inline-select.status-select.in-progress { background: #1e3a8a; color: #bfdbfe; }
[data-theme="dark"] .inline-select.status-select.completed   { background: #14532d; color: #bbf7d0; }

/* Icon-only mini buttons */
.mini-btn.icon-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mini-btn.icon-btn.danger {
  color: var(--danger, #dc2626);
  border-color: var(--danger, #dc2626);
}
.mini-btn.icon-btn.danger:hover {
  background: #fee2e2;
}
[data-theme="dark"] .mini-btn.icon-btn.danger:hover {
  background: #7f1d1d;
}

/* Task legend */
.task-legend {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* btn-sm variant */
.btn-primary.btn-sm, .btn-secondary.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  gap: 0.35rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1rem;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0;
}
.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--text-primary);
}
.modal-close {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  line-height: 1;
}
.modal-close:hover {
  background: var(--subtle);
}
.modal-form {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-group label .req {
  color: #dc2626;
}
.form-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-navy);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.12);
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

/* ── AAC READ-ONLY TASK VIEW ──────────────────────────────── */
.readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.advisor-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--subtle);
  border-left: 3px solid var(--accent-amber);
  border-radius: 0 0.4rem 0.4rem 0;
  padding: 0.6rem 0.85rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.advisor-note svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.7;
}

/* ── STUDENT WEEKLY SCHEDULE ─────────────────────────────── */
/* Private advising chat */
.chat-page-heading { margin-bottom: 1.25rem; }

.chat-secure-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--green-border);
  border-radius: var(--radius-full);
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.chat-contact-picker {
  margin-bottom: 1.25rem;
  padding: 1rem;
}

.chat-contact-picker-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.chat-contact-picker-heading h2 {
  margin: 0.15rem 0 0;
  font-size: 1rem;
}

.chat-contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem;
}

.chat-contact {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

a.chat-contact:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
}

.chat-contact.selected {
  border-color: var(--primary-600);
  background: var(--primary-50);
  box-shadow: 0 0 0 1px var(--primary-600);
}

[data-theme='dark'] a.chat-contact:hover,
[data-theme='dark'] .chat-contact.selected {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.chat-contact.unavailable {
  opacity: 0.62;
  cursor: not-allowed;
  background: var(--bg-subtle);
}

.chat-contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.chat-contact-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.chat-contact-copy strong,
.chat-contact-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-contact-copy strong {
  color: var(--text);
  font-size: 0.78rem;
}

.chat-contact-copy small {
  color: var(--muted);
  font-size: 0.67rem;
}

.contact-role-badge {
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-full);
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green-border);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.contact-role-badge.muted-badge {
  background: var(--bg-subtle);
  color: var(--muted);
  border-color: var(--border);
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}

.chat-panel { padding: 0; overflow: hidden; }

.chat-participant {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.profile-avatar.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  box-shadow: none;
}

.chat-participant > div {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.chat-participant strong { color: var(--text); font-size: 0.9rem; }

.chat-participant span:not(.profile-avatar):not(.workspace-dot) {
  color: var(--muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.chat-thread {
  min-height: 430px;
  height: min(58vh, 680px);
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--primary-500) 6%, transparent), transparent 30%), var(--panel-alt);
  scrollbar-color: var(--border2) transparent;
}

.chat-message-row {
  width: min(76%, 620px);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.chat-message-row.own { align-self: flex-end; align-items: flex-end; }
.chat-message-row.other { align-self: flex-start; align-items: flex-start; }

.chat-message-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.2rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.chat-message-meta span { color: var(--text-secondary); font-weight: 700; }

.chat-bubble {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem var(--radius-md) var(--radius-md) var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-xs);
}

.chat-message-row.own .chat-bubble {
  border-color: var(--primary-600);
  border-radius: var(--radius-md) 0.25rem var(--radius-md) var(--radius-md);
  background: var(--primary-600);
  color: #fff;
}

.chat-empty {
  margin: auto;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--muted);
}

.chat-empty-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-700);
}

[data-theme='dark'] .chat-empty-icon { background: var(--primary-900); color: var(--primary-200); }
.chat-empty strong { color: var(--text); }
.chat-empty p { margin: 0.25rem 0 0; font-size: 0.8rem; }

.chat-composer {
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.chat-composer textarea {
  width: 100%;
  min-height: 70px;
  max-height: 180px;
  resize: vertical;
}

.chat-composer-footer {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.chat-composer-footer > span { color: var(--muted); font-size: 0.68rem; }

.chat-context-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.chat-context-card h2 { margin: 0.35rem 0 0.9rem; }
.chat-context-card > p { color: var(--muted); font-size: 0.8rem; line-height: 1.6; }
.chat-facts { margin: 0; display: flex; flex-direction: column; }
.chat-facts > div { padding: 0.65rem 0; border-top: 1px solid var(--border); }
.chat-facts.compact { margin-top: 0.75rem; }

.chat-facts dt {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-facts dd {
  margin: 0.15rem 0 0;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.chat-context-link { width: 100%; margin-top: 0.8rem; }

.chat-guidance {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px solid var(--accent-200);
  border-radius: var(--radius-md);
  background: var(--accent-50);
  color: var(--accent-800);
}

[data-theme='dark'] .chat-guidance {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-200);
}

.chat-guidance strong { font-size: 0.78rem; }
.chat-guidance span, .chat-privacy-note { font-size: 0.72rem !important; line-height: 1.5; }

.chat-privacy-note {
  margin: 1rem 0 0 !important;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.messages-panel { padding: 0; overflow: hidden; }
.staff-messages-panel { margin-bottom: 1.25rem; }

.messages-panel > .panel-heading {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.collapsible-message-list > summary.panel-heading {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.collapsible-message-list > summary.panel-heading::-webkit-details-marker { display: none; }
.collapsible-message-list:not([open]) > summary.panel-heading { border-bottom: 0; }
.collapsible-message-list > summary.panel-heading:hover { background: var(--panel-alt); }

.message-directory-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.message-directory-chevron {
  color: var(--muted);
  transition: transform var(--transition-fast);
}

.collapsible-message-list[open] .message-directory-chevron { transform: rotate(90deg); }

.message-list-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel-alt);
}

.message-list-tools .search-wrap { min-width: 0; background: var(--panel); }
.message-list-tools [data-message-result-count] { white-space: nowrap; }

.message-thread-list { display: flex; flex-direction: column; }

.message-thread-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  transition: background var(--transition-fast);
}

.message-thread-item[hidden] { display: none !important; }
.message-thread-list > .empty-state[hidden] { display: none !important; }

.message-thread-item:last-child { border-bottom: 0; }
.message-thread-item:hover { background: var(--panel-alt); }
.message-thread-item.unread { background: color-mix(in srgb, var(--primary-500) 6%, var(--panel)); }

.message-thread-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.message-thread-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.message-thread-title strong { color: var(--text); font-size: 0.88rem; }
.message-thread-title time, .message-thread-copy small { color: var(--muted); font-size: 0.67rem; }

.message-thread-preview {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-unread {
  min-width: 23px;
  height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-600);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
}

.message-thread-arrow { color: var(--muted); flex-shrink: 0; }

@media (max-width: 1100px) {
  .chat-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .chat-contact-list { grid-template-columns: 1fr; }
  .chat-contact-picker-heading { align-items: flex-start; }
  .chat-contact { width: 100%; }
  .chat-message-row { width: 88%; }
  .chat-thread { min-height: 360px; height: 52vh; padding: 0.85rem; }
  .chat-composer, .chat-participant { padding-left: 0.85rem; padding-right: 0.85rem; }
  .chat-composer-footer { align-items: stretch; flex-direction: column; }
  .chat-composer-footer .primary-btn { width: 100%; }
  .message-thread-item { gap: 0.65rem; padding: 0.85rem; }
  .message-thread-title { align-items: flex-start; flex-direction: column; gap: 0; }
  .message-thread-arrow { display: none; }
  .message-list-tools { align-items: stretch; flex-direction: column; gap: 0.45rem; }
  .message-directory-summary .muted { display: none; }
}

.schedule-heading-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.credit-load-chip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 118px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-xs);
}

.credit-load-chip small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.09em;
}

.credit-load-chip strong {
  color: var(--text);
  font-size: 0.9rem;
}

.schedule-panel {
  overflow: visible;
}

.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.schedule-week-title {
  text-align: center;
}

.schedule-week-title h2 {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
}

.schedule-nav-group {
  display: flex;
  gap: 0.55rem;
}

.schedule-nav-btn {
  width: 42px;
  padding-left: 0;
  padding-right: 0;
}

.schedule-legend {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.2rem 0 1rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

.course-dot { background: var(--primary-500); }
.meeting-dot { background: var(--accent-500); }

.schedule-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-alt);
  scrollbar-color: var(--border2) transparent;
}

.schedule-timetable {
  display: grid;
  grid-template-columns: 112px repeat(7, minmax(155px, 1fr));
  min-width: 1220px;
}

.schedule-time-corner,
.schedule-column-header,
.schedule-time-cell,
.schedule-table-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.schedule-time-corner {
  position: sticky;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.schedule-column-header {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 68px;
  padding: 0.75rem;
  background: var(--panel);
}

.schedule-column-header strong {
  color: var(--text);
  font-size: 0.8rem;
}

.schedule-column-header span {
  color: var(--muted);
  font-size: 0.7rem;
}

.schedule-column-header small {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.schedule-column-header.today,
.schedule-table-cell.today {
  background: color-mix(in srgb, var(--primary-500) 5%, var(--panel));
}

.schedule-time-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  min-height: 104px;
  padding: 0.8rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  background: var(--panel);
}

.schedule-time-cell strong {
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.schedule-time-cell small {
  margin-top: 0.3rem;
  color: var(--accent-600);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.25;
}

.schedule-time-cell.custom,
.schedule-table-cell.custom {
  min-height: 82px;
  background: color-mix(in srgb, var(--accent-500) 4%, var(--panel));
}

.schedule-time-cell.unscheduled,
.schedule-table-cell.unscheduled {
  min-height: 88px;
  background: color-mix(in srgb, var(--muted) 5%, var(--panel));
}

.schedule-table-cell {
  min-width: 0;
  min-height: 104px;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--panel-alt);
}

.schedule-table-cell .schedule-entry {
  padding: 0.55rem;
}

.schedule-table-cell .schedule-entry > strong {
  overflow-wrap: anywhere;
}

.schedule-mobile {
  display: none;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 0.65rem;
  min-width: 1120px;
}

.schedule-day {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-alt);
  overflow: hidden;
}

.schedule-day.today {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-500) 14%, transparent);
}

.schedule-day-header {
  min-height: 58px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.schedule-day-header div {
  display: flex;
  flex-direction: column;
}

.schedule-day-header strong {
  color: var(--text);
  font-size: 0.82rem;
}

.schedule-day-header span {
  color: var(--muted);
  font-size: 0.72rem;
}

.schedule-day-header small {
  padding: 0.18rem 0.35rem;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

[data-theme='dark'] .schedule-day-header small {
  background: var(--primary-900);
  color: var(--primary-200);
}

.schedule-day-body {
  min-height: 220px;
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.schedule-entry {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary-500);
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: var(--shadow-xs);
}

.schedule-entry.meeting-entry {
  border-left-color: var(--accent-500);
  background: color-mix(in srgb, var(--accent-500) 7%, var(--panel));
}

.schedule-entry-time {
  color: var(--primary-600);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.meeting-entry .schedule-entry-time { color: var(--accent-500); }

.schedule-entry > strong {
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.3;
}

.schedule-entry > span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.schedule-entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding-top: 0.35rem;
  margin-top: 0.2rem;
  border-top: 1px solid var(--border);
}

.schedule-entry-footer small {
  color: var(--text-secondary);
  font-weight: 700;
}

.schedule-entry-footer form { margin: 0; }

.schedule-delete {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--danger, #dc2626);
  font-size: 0.65rem;
  font-weight: 650;
  cursor: pointer;
}

.schedule-empty {
  margin: auto 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
}

.schedule-modal-box {
  max-width: 680px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.form-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}

.weekday-picker label {
  position: relative;
  cursor: pointer;
}

.weekday-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.weekday-picker span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.weekday-picker input:checked + span {
  border-color: var(--primary-600);
  background: var(--primary-600);
  color: #fff;
}

.weekday-picker input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--primary-500) 25%, transparent);
  outline-offset: 1px;
}

.schedule-form-note {
  margin: -0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 1100px) {
  .schedule-table-wrap {
    display: none;
  }

  .schedule-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .schedule-day-body {
    min-height: 80px;
  }
}

@media (max-width: 600px) {
  .profile-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .schedule-heading-actions,
  .schedule-heading-actions .primary-btn,
  .schedule-heading-actions .secondary-btn,
  .schedule-readonly-badge,
  .credit-load-chip {
    width: 100%;
  }

  .schedule-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
  }

  .schedule-week-title h2 { font-size: 0.95rem; }
  .schedule-nav-group .secondary-btn:first-child { display: none; }
  .schedule-legend { justify-content: flex-start; }
  .form-row-2 { grid-template-columns: 1fr; }
  .weekday-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal-header,
  .modal-form { padding-left: 1rem; padding-right: 1rem; }

  .meeting-wide {
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 0.8rem;
  }

  .meeting-time-form {
    padding-left: 0;
  }

  .meeting-time-form label {
    flex: 1;
  }

  .meeting-time-form input[type='time'] {
    width: 100%;
  }
}
