/* ========================================================== */
/* CSS Variables & Design System                             */
/* ========================================================== */
:root {
  /* HSL Color Tokens */
  --primary-hue: 340; /* Ruby/Deep Red college theme */
  --accent-hue: 45;   /* Gold theme */
  
  --primary: hsl(var(--primary-hue), 75%, 45%);
  --primary-light: hsl(var(--primary-hue), 75%, 95%);
  --primary-hover: hsl(var(--primary-hue), 80%, 38%);
  
  --accent: hsl(var(--accent-hue), 95%, 50%);
  --accent-hover: hsl(var(--accent-hue), 100%, 42%);
  
  --success: hsl(145, 65%, 45%);
  --success-bg: hsl(145, 65%, 95%);
  --warning: hsl(30, 95%, 50%);
  --warning-bg: hsl(30, 95%, 95%);
  --danger: hsl(0, 75%, 50%);
  --danger-bg: hsl(0, 75%, 96%);
  
  /* Neutral Color Tokens (Light Theme Default) */
  --bg-app: hsl(210, 20%, 98%);
  --bg-sidebar: hsl(0, 0%, 100%);
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --bg-input: hsl(0, 0%, 100%);
  
  --text-main: hsl(220, 15%, 15%);
  --text-muted: hsl(220, 10%, 45%);
  --text-inverse: hsl(0, 0%, 100%);
  
  --border-color: hsl(210, 14%, 90%);
  --border-focus: var(--primary);
  
  /* Glassmorphism Details */
  --glass-blur: 12px;
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
  --glass-border: 1px solid rgba(255, 255, 255, 0.4);
  
  /* Typography */
  --font-heading: 'Kanit', 'Sarabun', sans-serif;
  --font-body: 'Sarabun', sans-serif;
  --font-numbers: 'Outfit', sans-serif;
  
  /* Spacing & Borders */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Dark Theme Overrides */
.dark-theme {
  --bg-app: hsl(220, 15%, 8%);
  --bg-sidebar: hsl(220, 15%, 11%);
  --bg-card: rgba(30, 41, 59, 0.5);
  --bg-card-hover: rgba(30, 41, 59, 0.7);
  --bg-input: hsl(220, 13%, 16%);
  
  --text-main: hsl(210, 20%, 95%);
  --text-muted: hsl(215, 15%, 65%);
  --text-inverse: hsl(220, 15%, 8%);
  
  --border-color: hsl(220, 13%, 20%);
  
  --primary-light: hsl(var(--primary-hue), 40%, 15%);
  --success-bg: hsl(145, 50%, 12%);
  --warning-bg: hsl(30, 60%, 12%);
  --danger-bg: hsl(0, 60%, 14%);
  
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --glass-border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ========================================================== */
/* Resets & Base Styles                                       */
/* ========================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.3;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ========================================================== */
/* Header Component                                           */
/* ========================================================== */
.app-header {
  height: 90px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(var(--glass-blur));
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.college-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.system-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: -2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Role Switcher */
.role-switcher {
  display: flex;
  background-color: var(--bg-app);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.role-btn {
  border: none;
  background: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

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

.role-btn.active {
  background-color: var(--bg-sidebar);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* General Button Styles */
.btn {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.primary-btn {
  background-color: var(--primary);
  color: white;
}
.primary-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

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

.success-btn {
  background-color: var(--success);
  color: white;
}
.success-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.warning-btn {
  background-color: var(--warning);
  color: white;
}
.warning-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.danger-btn {
  background-color: var(--danger);
  color: white;
}
.danger-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-sidebar);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* ========================================================== */
/* App Layout (Sidebar + Main)                                */
/* ========================================================== */
.app-layout {
  display: flex;
  flex: 1;
}

.app-sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 90px;
  height: calc(100vh - 90px);
  z-index: 90;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  width: 100%;
  border: none;
  background: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  background-color: var(--bg-app);
  color: var(--text-main);
}

.nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background-color: var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.badge {
  background-color: var(--danger);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: auto;
  font-family: var(--font-numbers);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.footer-version {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  font-family: var(--font-numbers);
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Main Content Area */
.app-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.content-panel {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.content-panel.active {
  display: block;
}

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

/* ========================================================== */
/* Typography & Common Layout Elements                       */
/* ========================================================== */
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 24px;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.panel-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-main);
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: -8px;
  margin-bottom: 20px;
}

.text-gradient {
  background: linear-gradient(90deg, var(--primary), hsl(var(--primary-hue), 90%, 60%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mt-6 { margin-top: 24px; }
.text-center { text-align: center; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--text-muted) !important; }

/* ========================================================== */
/* Glassmorphic Cards                                         */
/* ========================================================== */
.glass-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform var(--transition-fast), background-color var(--transition-normal);
}

.glass-card:hover {
  background-color: var(--bg-card-hover);
}

/* ========================================================== */
/* Scholarship Database / Grid View                          */
/* ========================================================== */
.search-container {
  min-width: 300px;
  max-width: 450px;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

#catalog-search {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

#catalog-search:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Filters Bar */
.filters-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
  background-color: var(--bg-sidebar);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 80px;
}

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

.chip {
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.chip.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Grid of Scholarships */
.scholarships-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.scholarship-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

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

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-blue {
  background-color: hsl(210, 80%, 95%);
  color: hsl(210, 80%, 40%);
}
.dark-theme .badge-blue {
  background-color: hsl(210, 40%, 15%);
  color: hsl(210, 80%, 60%);
}

.badge-purple {
  background-color: hsl(270, 80%, 95%);
  color: hsl(270, 80%, 45%);
}
.dark-theme .badge-purple {
  background-color: hsl(270, 40%, 15%);
  color: hsl(270, 80%, 65%);
}

.badge-green {
  background-color: var(--success-bg);
  color: var(--success);
}

.card-meta-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
  font-size: 0.85rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.meta-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.meta-val {
  font-family: var(--font-numbers);
  font-weight: 500;
  color: var(--text-main);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

/* ========================================================== */
/* Multi-step Form Wizard                                     */
/* ========================================================== */
.back-link-btn {
  border: none;
  background: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}

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

.form-wizard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto 32px auto;
  padding: 0 16px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--bg-sidebar);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-numbers);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-normal);
  white-space: nowrap;
}

.wizard-step-line {
  flex: 1;
  height: 2px;
  background-color: var(--border-color);
  margin-top: -20px;
  z-index: 1;
  transition: background-color var(--transition-normal);
}

/* Active and Completed States */
.wizard-step.active .step-num {
  border-color: var(--primary);
  background-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.wizard-step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.wizard-step.completed .step-num {
  border-color: var(--success);
  background-color: var(--success);
  color: white;
}

.wizard-step.completed .step-label {
  color: var(--success);
}

.form-wizard-completed-line {
  background-color: var(--success);
}

/* Wizard Form Content Animation */
.wizard-content {
  display: none;
  animation: slideIn 0.3s ease forwards;
}

.wizard-content.active {
  display: block;
}

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

.form-container-card {
  max-width: 800px;
  margin: 0 auto;
}

/* Form Layout Elements */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 16px;
  margin-bottom: 28px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.span-full {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-field.span-full {
    grid-column: span 1;
  }
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.required {
  color: var(--danger);
}

/* Form Input Elements */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

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

textarea {
  resize: vertical;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Native Input Validation CSS Guide Hook */
input:not(:placeholder-shown):user-invalid, 
select:not(:placeholder-shown):user-invalid,
textarea:not(:placeholder-shown):user-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}

input:not(:placeholder-shown):user-valid,
select:not(:placeholder-shown):user-valid,
textarea:not(:placeholder-shown):user-valid {
  border-color: var(--success);
}

/* Wizard Buttons Group */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Drag-and-drop document upload simulator styles */
.upload-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 28px;
}

.upload-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px dashed var(--border-color);
  background-color: var(--bg-app);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.upload-box:hover {
  border-color: var(--primary);
}

.upload-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-info svg {
  color: var(--text-muted);
  margin-bottom: 4px;
}

.upload-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.upload-status {
  font-size: 0.75rem;
}

.hidden-file-input {
  display: none;
}

.upload-btn-label {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ========================================================== */
/* Student Track Status & Grades Layout                       */
/* ========================================================== */
.tracker-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}

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

.tracker-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tracker-list-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Timeline status tracker */
.timeline-card {
  overflow: hidden;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-color);
  background-color: var(--bg-card);
  z-index: 2;
  transition: all var(--transition-normal);
}

.timeline-item.completed .timeline-dot {
  background-color: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 0 3px var(--success-bg);
}

.timeline-item.active .timeline-dot {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.timeline-info {
  display: flex;
  flex-direction: column;
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-numbers);
}

.timeline-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Active Scholarship Recipient Card */
.active-scholarship-card {
  border-left: 4px solid var(--success);
}

.recipient-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.85rem;
}

/* SVG Grade Trends Graph styles */
.trend-card {
  border-left: 4px solid var(--primary);
}

.trend-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grade-badge {
  font-family: var(--font-numbers);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-md);
  border: 1px solid hsla(var(--primary-hue), 75%, 45%, 0.1);
}

.chart-wrapper {
  margin: 16px 0;
  width: 100%;
  overflow: visible;
}

.svg-chart {
  width: 100%;
  height: 150px;
  overflow: visible;
}

.svg-grid-line {
  stroke: var(--border-color);
  stroke-dasharray: 4,4;
  stroke-width: 1;
}

.svg-axis-line {
  stroke: var(--text-muted);
  stroke-width: 1.5;
}

.svg-target-line {
  stroke: var(--warning);
  stroke-width: 1.5;
  stroke-dasharray: 2,2;
}

.svg-trend-path {
  stroke: var(--primary);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: drawPath 1.2s ease forwards;
}

.svg-point {
  fill: var(--primary);
  stroke: var(--bg-card);
  stroke-width: 2.5;
  cursor: pointer;
  transition: r var(--transition-fast);
}

.svg-point:hover {
  r: 7;
}

.chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.target-dot { background-color: var(--warning); }
.actual-dot { background-color: var(--primary); }

@keyframes drawPath {
  from { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

/* ========================================================== */
/* Staff Dashboard Overview Panels                            */
/* ========================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.metric-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.primary-bg { background: linear-gradient(135deg, var(--primary), hsl(var(--primary-hue), 90%, 55%)); }
.warning-bg { background: linear-gradient(135deg, var(--warning), hsl(30, 95%, 60%)); }
.success-bg { background: linear-gradient(135deg, var(--success), hsl(145, 65%, 55%)); }
.danger-bg { background: linear-gradient(135deg, var(--danger), hsl(0, 75%, 60%)); }

.metric-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.metric-value {
  font-family: var(--font-numbers);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

/* Quick Actions Cards */
.quick-actions-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.action-card {
  border: var(--glass-border);
  background-color: var(--bg-card);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  border-left: 4px solid var(--primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition-fast);
}

.action-card:hover {
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.action-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.action-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.arrow-indicator {
  align-self: flex-end;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.warning-card { border-left-color: var(--warning); }
.warning-card .arrow-indicator { color: var(--warning); }
.success-card { border-left-color: var(--success); }
.success-card .arrow-indicator { color: var(--success); }

/* ========================================================== */
/* Data Tables (Selection & Grade Tracking)                    */
/* ========================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  margin-top: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background-color: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 500;
  white-space: nowrap;
}

.dark-theme .data-table th {
  background-color: hsl(var(--primary-hue), 40%, 12%);
  color: hsl(var(--primary-hue), 80%, 70%);
}

.data-table tbody tr {
  transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.dark-theme .data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

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

/* Status Badges */
.status-badge {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-pending {
  background-color: var(--warning-bg);
  color: var(--warning);
}

.status-approved {
  background-color: var(--success-bg);
  color: var(--success);
}

.status-interview {
  background-color: hsl(200, 85%, 95%);
  color: hsl(200, 85%, 40%);
}
.dark-theme .status-interview {
  background-color: hsl(200, 45%, 15%);
  color: hsl(200, 85%, 65%);
}

.status-rejected {
  background-color: var(--danger-bg);
  color: var(--danger);
}

.status-suspended {
  background-color: hsl(0, 0%, 90%);
  color: hsl(0, 0%, 40%);
}
.dark-theme .status-suspended {
  background-color: hsl(0, 0%, 20%);
  color: hsl(0, 0%, 70%);
}

/* Select in Filter Group Custom Layout Hook */
.select-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-filter-group select {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 12px;
}

/* ========================================================== */
/* Native Dialog Modals (Overlay System)                      */
/* ========================================================== */
.native-dialog {
  display: none;
  border: none;
  margin: auto;
  outline: none;
  max-height: calc(100vh - 40px);
  width: 90%;
  max-width: 550px;
}

.native-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: dialogScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.native-dialog.large-dialog {
  max-width: 800px;
}

.native-dialog::backdrop {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: backdropFadeIn 0.25s ease forwards;
}

@keyframes dialogScaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.glass-dialog {
  background-color: var(--bg-sidebar);
  border: var(--glass-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dialog-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
}

.close-dialog-btn {
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.close-dialog-btn:hover {
  color: var(--danger);
}

.dialog-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(100vh - 180px);
}

.dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-app);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.footer-actions {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

/* Applicant Review Modal Specific Grid */
.review-profile {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid var(--border-color);
  padding-right: 24px;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-family: var(--font-heading);
  font-weight: 500;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.profile-dept {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-gpa-card {
  background-color: var(--bg-app);
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  margin-top: 16px;
  border: 1px solid var(--border-color);
}

.gpa-num {
  font-family: var(--font-numbers);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.gpa-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-row-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.info-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  margin-top: 2px;
}

.doc-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-app);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.doc-item svg {
  color: var(--primary);
}

.link-action {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.link-action:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .review-profile {
    grid-template-columns: 1fr;
  }
  .profile-sidebar {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
  }
}

/* ========================================================== */
/* Toast Notification Box                                     */
/* ========================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  max-width: 380px;
  width: 100%;
}

.toast {
  background-color: var(--bg-sidebar);
  color: var(--text-main);
  border: var(--glass-border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--primary);
  animation: toastSlideIn 0.3s ease forwards, toastFadeOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

.toast-success { border-left-color: var(--success); }
.toast-danger { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

.toast-msg {
  font-size: 0.85rem;
  font-weight: 500;
  flex: 1;
}

.toast-icon {
  flex-shrink: 0;
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

/* ========================================================== */
/* Mobile Responsive Adapters                                 */
/* ========================================================== */
@media (max-width: 768px) {
  .app-sidebar {
    display: none; /* In a real product we would use a drawer, but for this desktop-dashboard hybrid we can hide or make sticky */
  }
  
  .app-layout {
    flex-direction: column;
  }
  
  .app-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .app-content {
    padding: 16px;
  }
}

/* ========================================================== */
/* Login Screen Style                                         */
/* ========================================================== */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(circle at 10% 20%, hsl(var(--primary-hue), 75%, 93%) 0%, transparent 50%),
              radial-gradient(circle at 90% 80%, hsl(var(--accent-hue), 95%, 92%) 0%, transparent 50%),
              var(--bg-app);
  padding: 20px;
  box-sizing: border-box;
}

.dark-theme .login-screen {
  background: radial-gradient(circle at 10% 20%, hsl(var(--primary-hue), 35%, 12%) 0%, transparent 50%),
              radial-gradient(circle at 90% 80%, hsl(var(--accent-hue), 25%, 8%) 0%, transparent 50%),
              var(--bg-app);
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: loginFadeIn 0.5s ease-out;
}

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

.login-logo {
  color: var(--primary);
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 10px hsla(var(--primary-hue), 75%, 45%, 0.3));
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.login-form {
  width: 100%;
  text-align: left;
}

.login-field {
  margin-bottom: 20px;
}

.login-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.login-field input {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.login-field input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px hsla(var(--primary-hue), 75%, 45%, 0.15);
}

.login-btn {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, hsl(var(--primary-hue), 80%, 35%) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px hsla(var(--primary-hue), 75%, 45%, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px hsla(var(--primary-hue), 75%, 45%, 0.4);
}

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

.login-helper {
  margin-top: 25px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  background-color: rgba(0, 0, 0, 0.02);
  padding: 10px;
  border-radius: var(--radius-sm);
  width: 100%;
}
.dark-theme .login-helper {
  background-color: rgba(255, 255, 255, 0.02);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 15px;
  padding-right: 15px;
  border-right: 1px solid var(--border-color);
}

.user-profile-info {
  text-align: right;
}

.user-profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.user-profile-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.btn-logout {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
  background-color: var(--danger-bg);
}

