/* ===============================================================
   CSS VARIABLES - Accessible color palette
   =============================================================== */
:root {
  /* Light mode - Soft, warm neutrals */
  --bg-color: #fdfcfb;
  --surface-1: #f9f8f7;
  --surface-2: #f3f1ef;
  --surface-3: #ebe8e5;
  --border-color: #e0ddd9;
  --text-color: #2a2826;
  --text-muted: #5f5d59;
  --text-light: #8b8884;

  /* Brand colors - Muted and accessible */
  --primary-color: #5b6b8a;
  --primary-hover: #4a5a78;
  --primary-soft: rgba(91, 107, 138, 0.08);
  --primary-light: #7c8ba6;

  /* Header specific */
  --header-bg: #6b7b95;
  --header-text: #ffffff;
  --header-hover: rgba(255, 255, 255, 0.1);

  /* Status colors - Colorblind friendly palette */
  --success-color: #2e7d5e;
  --success-bg: rgba(46, 125, 94, 0.08);
  --warning-color: #b08438;
  --warning-bg: rgba(176, 132, 56, 0.08);
  --danger-color: #c05856;
  --danger-bg: rgba(192, 88, 86, 0.08);
  --info-color: #5b6b8a;
  --info-bg: rgba(91, 107, 138, 0.08);

  /* Accent colors for badges */
  --purple-color: #7c3aed;
  --purple-bg: rgba(124, 58, 237, 0.1);
  --purple-text: #ffffff;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.08);

  /* Focus states */
  --focus-ring: 0 0 0 3px rgba(91, 107, 138, 0.2);

  /* Common transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Dark mode */
body.dark {
  --bg-color: #1a1917;
  --surface-1: #242220;
  --surface-2: #2e2b28;
  --surface-3: #3a3633;
  --border-color: #453f3b;
  --text-color: #e8e6e3;
  --text-muted: #a8a29e;
  --text-light: #78716c;
  --primary-color: #8b9dc3;
  --primary-hover: #9eafd0;
  --primary-soft: rgba(139, 157, 195, 0.12);
  --primary-light: #a5b5d4;
  --header-bg: #2e2b28;
  --header-text: #e8e6e3;
  --header-hover: rgba(232, 230, 227, 0.08);
  --success-color: #4ade80;
  --success-bg: rgba(74, 222, 128, 0.12);
  --warning-color: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.12);
  --danger-color: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --info-color: #8b9dc3;
  --info-bg: rgba(139, 157, 195, 0.12);
  --purple-color: #a78bfa;
  --purple-bg: rgba(167, 139, 250, 0.15);
  --purple-text: #1a1917;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.4);
  --focus-ring: 0 0 0 3px rgba(139, 157, 195, 0.3);
}

/* ===============================================================
   BASE STYLES
   =============================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

body.sidebar-open {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  line-height: 1.2;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.15s ease;
  position: relative;
}

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

a:not(.btn):not(.nav-link):hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

/* ===============================================================
   REUSABLE COMPONENT BASE CLASSES
   =============================================================== */

/* Base Card Component */
.card {
  background: var(--surface-1);
  border-radius: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color, #dee2e6);
  transition: box-shadow 0.2s ease, border-color 0.15s ease, transform 0.15s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}
.card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-color: var(--border-color);
}

/* Card variations that inherit from .card */
.metric-card,
.request-card,
.info-card,
.status-card,
.compact-request-card,
.school-header,
.calendar-section,
.teachers-panel,
.default-teacher-section,
.empty-state,
.group-card {
  background: var(--surface-1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.metric-card:hover,
.request-card:hover,
.compact-request-card:hover,
.group-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Card Modifiers */
.card--compact {
  padding: 1rem;
}

.card--no-hover:hover {
  transform: none;
  box-shadow: none;
}

.card--bordered-left,
.request-card.status-pending,
.request-card.status-accepted,
.request-card.status-declined,
.request-card.status-timeout,
.compact-request-card.status-pending,
.compact-request-card.status-accepted,
.compact-request-card.status-declined,
.compact-request-card.status-timeout {
  border-left-width: 4px;
}

/* Base Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
/* Badge variations that inherit base styles */
.status-badge,
.tab-count,
.nav-badge,
.week-badge,
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

/* Badge Style Modifiers - Calmer, more refined */
.badge-primary {
  background: var(--primary-soft);
  color: var(--primary-color);
  border: 1px solid var(--primary-light);
}
.badge-success,
.status-badge.status-accepted {
  background: var(--success-bg);
  color: var(--success-color);
  border: 1px solid var(--success-color);
  opacity: 0.9;
}

.badge-warning,
.status-badge.status-pending,
.tab-count.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-color);
  border: 1px solid var(--warning-color);
  opacity: 0.9;
}

.badge-danger,
.status-badge.status-declined,
.tab-count.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
  opacity: 0.9;
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-color);
  border: 1px solid var(--info-color);
  opacity: 0.9;
}
/* Qualification badges for teachers */
.qualification-badge {
  display: inline-flex;
  align-items: center;
  padding: 3.2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 19.2px;
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 2px;
  background: rgba(52, 152, 219, 0.1);
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: rgba(52, 152, 219, 0.9);
}

/* Role/Function badges */
.role-badge {
  display: inline-block;
  padding: 3.2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 19.2px;
  border-radius: 4px;
  background: rgba(155, 89, 182, 0.1);
  color: rgba(155, 89, 182, 0.9);
}

/* Type badges */
.type-badge {
  display: inline-block;
  padding: 3.2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 19.2px;
  border-radius: 4px;
  margin-right: 4px;
}

.type-badge.invaller {
  background: rgba(52, 211, 153, 0.1);
  color: rgba(16, 185, 129, 0.9);
}

/* Base Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  text-decoration: none;
  line-height: 1.5;
  min-height: 36px;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}
/* Button Style Modifiers */
.btn-primary {
  background: var(--primary-color);
  color: var(--surface-1);
  border: 2px solid var(--primary-color);
  font-weight: 500;
  padding: 6px 14px; /* Reduced by 2px to compensate for 2px border */
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--surface-1);
  border-color: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(91, 107, 138, 0.25);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  padding: 6px 14px; /* Reduced by 2px to compensate for 2px border */
}
.btn-secondary:hover {
  background: var(--surface-3);
  color: var(--text-color);
  border-color: var(--border-color);
}
.btn-success {
  background: var(--success-color);
  color: var(--surface-1);
  border: 2px solid var(--success-color);
  font-weight: 500;
  padding: 6px 14px; /* Reduced by 2px to compensate for 2px border */
}
.btn-success:hover {
  background: var(--success-color);
  color: var(--surface-1);
  x-transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  opacity: 0.8;
  border-color: var(--success-color);
}
.btn-info {
  background: var(--info-color);
  color: var(--surface-1);
  border: 2px solid var(--info-color);
  padding: 6px 14px; /* Reduced by 2px to compensate for 2px border */
}

.btn-info:hover {
  background: var(--info-color);
  color: var(--surface-1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  opacity: 0.8;
}
.btn-danger {
  background: var(--danger-color);
  color: var(--text-color);
  border: 2px solid var(--danger-color);
  padding: 6px 14px; /* Reduced by 2px to compensate for 2px border */
}
.btn-danger:hover {
  background: var(--danger-color);
  color: var(--text-color);
  transform: translateY(-1px);
  opacity: 0.8;
  border-color: var(--danger-color);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--text-color);
  color: var(--text-color);
  padding: 6px 14px; /* Reduced by 2px to compensate for 2px border */
}
.btn-outline:hover {
  background: var(--text-color);
  color: var(--bg-color);
}
/* Button Size Modifiers */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  min-height: 32px;
}
.btn-icon-only {
  width: 44px;
  padding: 0;
  justify-content: center;
}

.btn-action-small {
  width: 32px;
  height: 32px;
  min-height: 32px !important;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
}

/* Common hover effects */
.hover-lift:hover,
.teacher-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===============================================================
   LAYOUT
   =============================================================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
  background-color: var(--bg-color);
  border-radius: 8px;
}
/* Top Header */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--header-bg);
  color: var(--header-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
}

.header-brand {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.brand-link {
  color: var(--header-text);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.025em;
}

.brand-link:hover {
  opacity: 0.9;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Sidebar Toggle Button */
.sidebar-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--header-text);
  border-radius: 2px;
  transition: all var(--transition-normal);
  transform-origin: 1px;
}

.sidebar-toggle:hover .hamburger-line {
  opacity: 0.8;
}

/* Main Navigation Sidebar */
.main-navigation {
  position: fixed;
  top: 60px;
  left: 0;
  width: 280px;
  height: calc(100vh - 60px);
  background: var(--surface-1);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 100;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.main-navigation.collapsed {
  width: 60px;
}

.main-navigation.collapsed .nav-text,
.main-navigation.collapsed .user-details,
.main-navigation.collapsed .nav-section-title,
.main-navigation.collapsed .nav-badge,
.main-navigation.collapsed .nav-arrow,
.main-navigation.collapsed .nav-description {
  display: none;
}

.main-navigation.collapsed .nav-header {
  padding: 1rem 0.5rem;
  text-align: center;
}

.main-navigation.collapsed .user-avatar {
  margin: 0 auto;
}

.main-navigation.collapsed .nav-link {
  justify-content: center;
  padding: 0.75rem;
}

.main-navigation.collapsed .nav-icon {
  margin: 0;
}

/* Main Content Area */
.main-content {
  margin-left: 280px;
  margin-top: 60px;
  padding: 2rem;
  min-height: calc(100vh - 60px);
  width: calc(100% - 280px);
  transition: all var(--transition-normal);
}

.sidebar-collapsed .main-content {
  margin-left: 60px;
  width: calc(100% - 60px);
}

/* Footer */
.footer {
  margin-left: 0;
  background: var(--surface-2);
  border-top: 1px solid #e0e0e0;
  padding: 2rem;
  width: 100%;
  transition: all var(--transition-normal);
  display: none !important;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}
.sidebar-collapsed .footer {
  margin-left: 60px;
  width: calc(100% - 60px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin: 0 0 1rem 0;
  color: var(--text-color);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

/* ===============================================================
   NAVIGATION
   =============================================================== */

.nav-header {
  padding: 1.5rem;
  background: var(--surface-2);
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-info-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background-color var(--transition-fast);
  border-radius: 8px;
  padding: 4px;
  margin: -4px;
}

.user-info-link:hover {
  background-color: var(--surface-2);
}

.user-info-link:hover .user-details strong {
  color: var(--primary-color);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  border: 2px solid var(--primary-light);
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-details strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-content {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 0;
}

.nav-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.nav-section:last-child {
  border-bottom: none;
}

.nav-section-title {
  padding: 0 1.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.nav-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-color);
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
  position: relative;
}

.nav-link:hover {
  background: var(--surface-2);
  border-left-color: var(--primary-color);
  text-decoration: none;
  color: var(--text-color);
}

.nav-item.active .nav-link {
  background: var(--primary-soft);
  border-left-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 500;
}

.nav-arrow {
  margin-left: auto;
  transition: transform var(--transition-fast);
  font-size: 0.75rem;
}

.nav-subitems {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--surface-2);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.nav-item.submenu-open .nav-subitems {
  max-height: 300px;
}

.nav-sublink {
  display: block;
  padding: 0.5rem 1.5rem 0.5rem 3rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.nav-sublink:hover {
  background: var(--surface-3);
  color: var(--text-color);
  text-decoration: none;
}

.nav-description {
  display: block;
  padding: 0.25rem 1.5rem 0.5rem 3rem;
  color: var(--text-light);
  font-size: 0.75rem;
}

.nav-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-text {
  flex: 1;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--header-hover);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--header-text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--surface-3);
  transform: scale(1.05);
}

.theme-icon {
  font-size: 1.25rem;
}

/* User Menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-greeting {
  color: var(--header-text);
  font-size: 0.875rem;
  opacity: 0.9;
}

.logout-form {
  margin: 0;
}

.logout-btn,
.login-btn {
  background: var(--header-hover);
  border: 1px solid var(--border-color);
  color: var(--header-text);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.logout-btn:hover,
.login-btn:hover {
  background: var(--surface-3);
  text-decoration: none;
  color: var(--header-text);
}

/* ===============================================================
   COMMON COMPONENTS
   =============================================================== */

/* Metric Cards */
.metric-card {
  position: relative;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
  border-radius: 0.75rem 0.75rem 0 0;
}

.metric-card.urgent::before {
  background: var(--danger-color);
}

.metric-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.metric-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

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

.metric-action {
  margin-top: 0.75rem;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Messages/Alerts */
.message {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  padding-right: 3rem;
  color: #6c757d;
  font-size: 16px;
  line-height: 1.6;
}
.message-success {
  background: var(--success-bg);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.message-error {
  background: var(--danger-bg);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

.message-warning {
  background: var(--warning-bg);
  color: var(--warning-color);
  border-left: 4px solid var(--warning-color);
}

.message-info {
  background: var(--info-bg);
  color: var(--info-color);
  border-left: 4px solid var(--info-color);
}

.message-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: currentColor;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.message-close:hover {
  opacity: 1;
}

/* Special message styles */
.message-warning.safe {
  background: linear-gradient(135deg, #fff4e5, #ffe8cc);
  border-left: 4px solid #f39c12;
  padding: 15px 20px;
  font-size: 1.05rem;
}

.message-warning.safe strong {
  color: #e67e22;
}

.message-warning.safe a {
  color: #e67e22;
  font-weight: 600;
  text-decoration: underline;
  margin-left: 5px;
}

.message-warning.safe a:hover {
  color: #d35400;
}

body.dark .message-warning.safe {
  background: linear-gradient(135deg, #3d2f1f, #4a3a1a);
  color: #ffa500;
}

body.dark .message-warning.safe a {
  color: #ff8c00;
}

body.dark .message-warning.safe a:hover {
  color: #ffa500;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}
.form-input,
.form-select,
.form-textarea,
.form-control {
  width: 100%;
  padding: 6px 14px; /* Match button padding */
  border: 2px solid #ddd;
  border-radius: 6px;
  background: #e8f0fe;
  color: var(--text-color);
  font-size: 14px; /* Match button font-size */
  transition: all var(--transition-fast);
  box-sizing: border-box;
  display: inline-block;
  min-height: 36px; /* Match button min-height */
}

.form-input,
.form-select,
.form-textarea,
.form-control {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(91, 107, 138, 0.08);
}

/* ===============================================================
   TABLES
   =============================================================== */

.table-container,
.data-table-container {
  background: var(--surface-1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  margin: 1rem 0;
}

table,
.data-table {
  width: 100%;
  border-collapse: collapse;
}

thead,
.data-table thead {
  background: var(--surface-2);
  border-bottom: 2px solid var(--border-color);
}

th,
.data-table th {
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

tbody tr,
.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}

tbody tr:hover,
.data-table tbody tr:hover,
.table-hover tbody tr:hover {
  background: var(--surface-2);
  background-color: var(--secondary-color, rgba(0,0,0,0.03));
}
tbody tr:last-child,
.data-table tbody tr:last-child {
  border-bottom: none;
}

td,
.data-table td {
  padding: 1rem;
  vertical-align: middle;
}

/* ===============================================================
   DASHBOARD & PAGE SECTIONS
   =============================================================== */

.school-header {
  padding: 2rem;
  margin-bottom: 2rem;
}

.school-header h1 {
  margin: 0 0 1rem 0;
  font-size: 2rem;
  color: var(--text-color);
}

.week-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  flex-direction: column;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color, #333);
}
.week-badge {
  background: var(--primary-soft);
  color: var(--primary-color);
  padding: 0.375rem 1rem;
  border: 1px solid var(--primary-light);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border-color);
  padding: 0 0 16px;
  flex-direction: row;
  gap: normal;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}
/* ===============================================================
   CALENDAR/SCHEDULE STYLES
   =============================================================== */

.calendar-section {
  margin-bottom: 2rem;
}

.calendar-section h3 {
  margin: 0 0 0.5rem 0;
}

.calendar-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

#calendar {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--bg-color);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  table-layout: fixed;
}

#calendar thead tr:first-child th {
  background: var(--surface-2);
  color: var(--text-color);
  padding: 1rem;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

#calendar thead tr:first-child th.class-header {
  width: 150px;
  text-align: left;
  padding-left: 1rem;
  border-right: 2px solid var(--border-color);
  background: var(--surface-2);
}

#calendar thead tr:first-child th.week-header {
  background: var(--primary-color);
  color: var(--text-color);
  font-weight: 600;
  padding: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#calendar thead tr:nth-child(2) th {
  background: var(--surface-1);
  color: var(--text-color);
  padding: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  text-align: center;
  border-bottom: 2px solid var(--border-color);
}

#calendar thead tr:nth-child(2) th.day-header {
  width: auto;
  border-right: 1px solid var(--border-color);
}

#calendar tbody td {
  border: 1px solid var(--border-color);
  padding: 0;
  vertical-align: top;
  background: var(--surface-1);
}

#calendar tbody td.class-name {
  background: var(--surface-2);
  padding: 0.75rem;
  font-weight: 600;
  width: 150px;
  border-right: 2px solid var(--border-color);
}

.day-cell {
  min-height: 60px;
  padding: 0.5rem;
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.day-cell:hover {
  background: var(--primary-soft);
}

.day-cell.has-unavailability {
  background: var(--danger-bg);
  border: 1px solid var(--danger-color);
}

.teacher-info {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  color: var(--text-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}
.teacher-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-color);
  font-size: 0.875rem;
  font-weight: 500;
}

.teacher-badge-small {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-color);
  font-size: 0.75rem;
  font-weight: 500;
  margin: 2px;
  cursor: pointer;
  transition: transform 0.2s;
}
.unavailable-marker,
.absence-marker,
.absence-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 600;
  display: inline-block;
}

.unavailable-marker {
  background: var(--danger-color);
  color: var(--text-color);
}

.absence-marker,

/* ===============================================================
   SCHEDULE EDITOR & CLASS MANAGEMENT
   =============================================================== */

.schedule-editor {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.schedule-grid,
.schedule-grid-days {
  display: grid;
  gap: 10px;
  margin: 2rem 0;
}

.schedule-grid {
  grid-template-columns: 150px repeat(5, 1fr);
}

.schedule-grid-days {
  grid-template-columns: repeat(5, 1fr);
}

.schedule-header {
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  background: var(--surface-2);
  border-radius: 6px;
  color: var(--text-color);
}

.schedule-cell {
  min-height: 100px;
  border: 2px solid var(--border-color, #dee2e6);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--surface-1, #fff);
  transition: all 0.3s;
  position: relative;
}
.schedule-cell.has-teacher {
  border-style: solid;
  border-color: var(--primary-light);
  background: var(--surface-1);
}

.schedule-cell.drag-over {
  background: var(--primary-light, #e3f2fd);
  border-color: var(--primary-color);
  transform: scale(1.02);
}
.teacher-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  color: var(--text-color);
  font-weight: 500;
  cursor: move;
  user-select: none;
  position: relative;
  justify-content: space-between;
  margin-top: 10px;
}
.teacher-card .teacher-name {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.teacher-card .teacher-type {
  font-size: 0.75rem;
  opacity: 0.9;
}

.teacher-card .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--surface-1);
  border: none;
  color: var(--danger-color);
  padding: 2px 6px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.7rem;
  opacity: 0;
  transition: background 0.2s;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.teacher-card:hover .remove-btn {
  opacity: 1;
}

.teacher-card .remove-btn:hover {
  background: var(--surface-2);
}
.teachers-panel {
  margin-bottom: 20px;
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 8px;
  padding: 15px;
  background: var(--surface-1, #fff);
}
.teachers-grid {
  display: flex;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background: var(--secondary-bg, #f8f9fa);
  border-radius: 4px;
}
.teacher-item {
  padding: 0.75rem;
  border-radius: 6px;
  text-align: center;
  color: var(--text-color);
  font-weight: 500;
  cursor: move;
  transition: transform var(--transition-fast);
  user-select: none;
}

.teacher-item.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.default-teacher-section {
  background: var(--surface-2);
  margin-bottom: 2rem;
}

.default-teacher-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.default-teacher-badge {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: var(--text-color);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.empty-cell {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
}

.schedule-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  background: var(--bg-color);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: 30px;
}
.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.5;
  min-height: 36px;
}

.quick-action-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Legend styles - consolidated */
.schedule-legend,
.legend-items,
.network-legend {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-1);
  border-radius: 6px;
  font-size: 0.875rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--secondary-color);
  border-radius: 8px;
}
.legend-dot,
.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-color.regular {
  background: var(--success-bg);
  border: 2px solid var(--success-color);
}

.legend-color.deployment {
  background: rgba(59, 130, 246, 0.2);
  border-left: 3px solid #3b82f6;
}

.legend-color.absent {
  background: rgba(239, 68, 68, 0.2);
}

.legend-color.unavailable {
  background: var(--warning-bg);
  border: 2px solid var(--warning-color);
}

.legend-color.teacher-box {
  background: var(--primary-bg, var(--primary-soft));
  border: 2px solid var(--primary-color);
}

/* ===============================================================
   MODALS
   =============================================================== */

.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}
.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  max-width: 500px;
}
.modal-content {
  position: relative;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  background: var(--bg-color);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0.5rem 0.5rem 0 0;
  background: var(--surface-1);
  color: var(--text-color);
}
.modal-header.bg-danger {
  background-color: var(--danger-color);
  color: var(--text-color);
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-color);
}
.modal-header .close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  margin: -0.5rem -0.5rem -0.5rem auto;
}

.modal-header.bg-danger .close {
  color: var(--text-color);
  opacity: 0.8;
}

.modal-header .close:hover {
  opacity: 1;
}

.modal-body {
  position: relative;
  padding: 1.5rem;
  background: var(--bg-color);
  color: var(--text-color);
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 0.5rem 0.5rem;
  background: var(--surface-1);
}
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-backdrop.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.modal-backdrop.show {
  opacity: 1;
}

.modal .form-group {
  margin-bottom: 1rem;
}

.modal .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.modal .form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.modal .alert {
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.modal .alert-warning {
  color: var(--warning-color);
  background-color: var(--warning-bg);
  border-color: var(--warning-border);
}

.modal .text-danger {
  color: var(--danger-color) !important;
}

/* ===============================================================
   EXTERNAL CONTACT STATUS PAGE
   =============================================================== */

.status-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.status-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border-radius: 0;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.status-tab:hover {
  color: var(--text-color);
  background: var(--surface-1);
  text-decoration: none;
}

.status-tab.active {
  color: var(--primary-color);
  font-weight: 500;
  border-bottom-color: var(--primary-color);
  background: transparent;
}

.tab-count {
  min-width: 20px;
  background: var(--surface-2);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.status-tab.active .tab-count {
  background: var(--primary-soft);
  color: var(--primary-color);
}

.tab-count.badge-muted {
  background: var(--surface-3);
  color: var(--text-muted);
}

.requests-container {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.request-card {
  overflow: hidden;
  background: var(--bg-color);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
.request-card.status-pending {
  border-left-color: var(--warning-color);
}

.request-card.status-accepted {
  border-left-color: var(--success-color);
}

.request-card.status-declined {
  border-left-color: var(--danger-color);
}

.request-card.status-timeout {
  border-left-color: var(--text-muted);
}

.request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-color), #34495e);
  border-bottom: 1px solid var(--border-color);
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text-color);
}
.status-badge {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 14px;
  display: inline-block;
  font-weight: bold;
  background-color: var(--success-bg, #d4edda);
  color: var(--success-color, #155724);
}
.status-badge.status-timeout {
  background: var(--surface-3);
  color: var(--text-muted);
}

.request-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.time-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.time-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
}

.request-body {
  padding: 30px;
}
.request-section {
  margin-bottom: 30px;
  padding: 20px;
  background: var(--secondary-color);
  border-radius: 8px;
}
.request-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--text-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}
.info-item.full-width {
  grid-column: 1 / -1;
}
.info-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted, #666);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 120px;
}
.info-value {
  font-size: 0.875rem;
  color: var(--text-primary, #333);
  flex: 1;
}
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.info-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-color);
  opacity: 0.7;
}
.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.empty-state p {
  color: var(--text-muted);
  font-size: 0.875rem;
}
/* ===============================================================
   COMPACT REQUEST CARDS
   =============================================================== */

.compact-requests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.compact-request-card {
  overflow: hidden;
  position: relative;
}

.compact-request-card.status-pending {
  border-left-color: var(--warning-color);
}

.compact-request-card.status-accepted {
  border-left-color: var(--success-color);
}

.compact-request-card.status-declined {
  border-left-color: var(--danger-color);
}

.compact-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-color);
}

.card-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-icon {
  font-size: 1.25rem;
  display: inline-block;
  margin-right: 5px;
}
.status-icon.pending {
  color: var(--warning-color);
}

.status-icon.success {
  color: var(--success-color);
}

.status-icon.danger {
  color: var(--danger-color);
}

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

.status-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  display: block;
  margin-bottom: 5px;
}
.compact-card-body {
  padding: 1rem;
}

.primary-info {
  margin-bottom: 0.75rem;
}

.contact-name {
  color: var(--primary-color);
  font-size: 1rem;
  display: block;
  margin-bottom: 0.25rem;
}

.teacher-name {
  color: var(--text-color, #2c3e50);
  font-size: 0.875rem;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 2px;
}
.secondary-info {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.date-info,
.time-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.classes-info {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.5rem;
  background: var(--surface-2);
  border-radius: 6px;
}

.classes-label {
  font-weight: 600;
  margin-right: 0.5rem;
}

.compact-card-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border-color);
}

.btn-action-small:hover {
  background: var(--surface-2);
  border-color: rgba(52, 152, 219, 0.3);
  transform: translateY(-1px);
}
.btn-action-small.action-edit:hover {
  background: rgba(243, 156, 18, 0.1);
  border-color: rgba(243, 156, 18, 0.3);
}

.btn-action-small.action-save:hover {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.3);
}

.btn-action-small.action-cancel:hover {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.3);
}

.btn-action-small.action-remind:hover {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.3);
}

.btn-action-small.action-view:hover,
.btn-action-small.action-info:hover {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(52, 152, 219, 0.3);
}

.btn-action-small.action-log:hover {
  background: rgba(155, 89, 182, 0.1);
  border-color: rgba(155, 89, 182, 0.3);
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-direction: row;
  align-items: center;
}
.actions-cell {
  white-space: nowrap;
}

.compact-card-actions .btn-action-small {
  flex: 1;
  max-width: 40px;
}

/* ===============================================================
   UTILITIES
   =============================================================== */

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted {
  color: var(--text-muted, #999);
  font-style: italic;
}
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-flex {
  display: flex;
}
.d-grid { display: grid; }

/* Flexbox utilities */
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between {
  justify-content: space-between;
}
/* Gap utilities */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Spacing utilities */
.mt-1 { margin-top: 0.25rem; }
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 { margin-top: 0.75rem; }
.mt-4 {
  margin-top: 1.5rem;
}
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 {
  margin-bottom: 1.5rem;
}
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* Grid utilities */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Border utilities */
.border { border: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }

/* Shadow utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ===============================================================
   ANIMATIONS
   =============================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
.animate-fadeIn { animation: fadeIn 0.3s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
}
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ===============================================================
   SPECIAL COMPONENTS
   =============================================================== */

/* WhatsApp preview */
.whatsapp-preview {
  white-space: pre-wrap;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #e3f2e1;
  padding: 15px;
  border-radius: 10px;
}

body.dark .whatsapp-preview {
  background: #005c4b;
  color: #e9edef;
}

/* Button icons - no extra margin needed, using gap in flexbox */
.btn-icon {
  font-size: 1em;
  line-height: 1;
}

/* Urgency badges */

.urgency-badge i {
  font-size: 1rem;
}

.urgency-badge.urgent {
  background: var(--danger-bg);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 4px 8px;
  animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.urgency-badge.normal {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Status cards */
.status-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.status-card.status-success {
  border-left: 4px solid var(--success-color);
  background: linear-gradient(90deg, rgba(46, 125, 94, 0.05), transparent);
}

.status-card.status-info {
  border-left: 4px solid var(--info-color);
  background: linear-gradient(90deg, rgba(91, 107, 138, 0.05), transparent);
}

/* Status indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  background: var(--info-bg);
  color: var(--info-color);
}
.status-indicator::before {
  font-size: 0.9em;
}

.status--pending::before { content: "⏱️ "; }
.status--accepted::before { content: "✓ "; font-weight: bold; }
.status--declined::before { content: "✗ "; font-weight: bold; }
.status--timeout::before { content: "⏰ "; }

/* Section headers */
.section-header h3 {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  gap: 0.75rem;
}
.section-header h3 i {
  color: var(--primary-color);
}

/* Toast notifications */
.toast-notification {
  display: flex;
  align-items: center;
  min-width: 300px;
  max-width: 400px;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  margin-bottom: 10px;
  gap: 12px;
  pointer-events: all;
  animation: slideIn 0.3s ease-out;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.toast-icon i {
  font-size: 1.5rem;
}

.toast-success {
  background: var(--success-bg);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.toast-error {
  background: var(--danger-bg);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

.toast-warning {
  background: var(--warning-bg);
  color: var(--warning-color);
  border-left: 4px solid var(--warning-color);
}

.toast-info {
  background: var(--info-bg);
  color: var(--info-color);
  border-left: 4px solid var(--info-color);
}

/* ===============================================================
   ACCESSIBILITY
   =============================================================== */

*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

*:focus:not(:focus-visible) {
  outline: none;
}

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

.main-content a:not(.btn):not(.nav-link) {
  text-decoration: underline;
  text-decoration-color: var(--primary-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.main-content a:not(.btn):not(.nav-link):hover {
  text-decoration-thickness: 2px;
}

::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

/* ===============================================================
   DOCUMENTATION SYSTEM
   =============================================================== */

/* Documentation Highlight System - Used for screenshots */
.doc-highlight {
  outline: 3px solid #ff6b6b !important;
  outline-offset: 2px;
  position: relative;
  z-index: 1000;
  animation: doc-pulse 2s ease-in-out infinite;
}

@keyframes doc-pulse {
  0%, 100% {
    outline-color: #ff6b6b;
  }
  50% {
    outline-color: #ff8787;
  }
}

/* Documentation annotations for numbered callouts */
.doc-annotation {
  position: absolute;
  background: #ff6b6b;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
  border: 2px solid white;
}

/* Callout boxes for important information */
.doc-callout {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning-color);
  padding: 16px;
  margin: 20px 0;
  border-radius: 4px;
  position: relative;
}

.doc-callout::before {
  content: "ℹ️";
  position: absolute;
  left: -12px;
  top: 16px;
  background: white;
  padding: 2px;
  border-radius: 50%;
}

/* Privacy blur for sensitive data */
.doc-blur {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

/* Documentation screenshot container */
.doc-screenshot {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px;
  margin: 20px auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  background: white;
}

.doc-screenshot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Documentation-specific info badges */
.doc-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 4px;
}

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

.doc-badge.updated {
  background: var(--info-bg);
  color: var(--info-color);
}

.doc-badge.deprecated {
  background: var(--danger-bg);
  color: var(--danger-color);
}

/* Documentation navigation breadcrumbs */
.doc-breadcrumbs {
  padding: 12px 0;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.doc-breadcrumbs a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.doc-breadcrumbs a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.doc-breadcrumbs .separator {
  margin: 0 8px;
  color: var(--text-light);
}

/* Documentation table of contents */
.doc-toc {
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.doc-toc h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 16px;
  color: var(--text-color);
}

.doc-toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.doc-toc li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.doc-toc li:last-child {
  border-bottom: none;
}

.doc-toc a {
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.doc-toc a:hover {
  color: var(--primary-color);
}

.doc-toc .doc-status {
  margin-left: auto;
  font-size: 12px;
}

/* Documentation search highlight */
.doc-search-highlight {
  background: #ffeb3b;
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: 500;
}

/* Documentation version indicator */
.doc-version {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface-2);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  z-index: 100;
}

/* Documentation step indicator */
.doc-steps {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}

.doc-steps li {
  counter-increment: step-counter;
  margin-bottom: 24px;
  position: relative;
  padding-left: 50px;
}

.doc-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Documentation code blocks */
.doc-code {
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
}

/* Documentation role indicators */
.doc-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin: 8px 4px;
}

.doc-role.director {
  background: var(--purple-bg);
  color: var(--purple-color);
}

.doc-role.teacher {
  background: var(--success-bg);
  color: var(--success-color);
}

.doc-role.planner {
  background: var(--info-bg);
  color: var(--info-color);
}

/* Documentation keyboard shortcuts */
.doc-kbd {
  display: inline-block;
  padding: 3px 6px;
  font-size: 11px;
  line-height: 10px;
  color: var(--text-color);
  vertical-align: middle;
  background-color: var(--surface-2);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 var(--border-color);
  font-family: monospace;
}

/* ===============================================================
   RESPONSIVE STYLES
   =============================================================== */

/* ===============================================================
   COOKIE NOTICE
   =============================================================== */

#cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-color);
  color: var(--text-color);
  padding: 20px;
  z-index: 9999;
  display: none;
}

.cookie-notice-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.inline-style-27 {
  flex: 1;
}

.cookie-notice-text {
  flex: 1;
}

.cookie-notice-text p {
  margin: 0;
}

.cookie-notice-link {
  color: var(--text-color);
  text-decoration: underline;
}

.cookie-notice-link:hover {
  color: var(--text-color);
  opacity: 0.9;
}

.cookie-accept-btn {
  background: white;
  color: var(--primary-color);
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cookie-accept-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* ===============================================================
   PRINT STYLES
   =============================================================== */

/* Inline style extractions */
/* Calendar specific styles */
.week-type-indicator {
  border-radius: 3px;
  color: var(--text-color);
  font-size: 0.85em;
  margin-left: 8px;
  padding: 2px 6px;
}

.week-type-indicator.week-a {
  background: var(--primary-color, #3498db);
}

.week-type-indicator.week-b {
  background: #9b59b6;
}

.json-output-hidden {
  display: none;
}

.alternating-indicator {
  background: var(--danger-color, #e74c3c);
  border-radius: 3px;
  color: var(--text-color);
  font-size: 0.75em;
  margin-left: 4px;
  padding: 1px 4px;
}

.absence-marker {
  background: var(--warning-color, #f59e0b);
  border-radius: 3px;
  color: var(--text-color);
  font-size: 10px;
  padding: 2px 4px;
}

.error-page {
    text-align: center;
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
  }

  .error-emoji {
    font-size: 100px;
    margin-bottom: 20px;
    animation: wobble 1s ease-in-out infinite;
  }

  @keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
  }

  .error-code {
    font-size: 120px;
    font-weight: bold;
    color: var(--danger-color);
    margin: 0;
    line-height: 1;
  }

  .error-title {
    font-size: 32px;
    margin: 20px 0;
    color: var(--text-color);
  }

.error-message {
  font-size: 0.9rem;
  color: #e74c3c;
  margin: 20px 0 40px;
  line-height: 1.6;
  background: #fee;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border-left: 3px solid #e74c3c;
  border: 1px solid #f5c6cb;
  margin-top: 5px;
}
  .error-detail {
    background: var(--danger-bg);
    border-left: 4px solid var(--danger-color);
    padding: 20px;
    margin: 30px auto;
    border-radius: 8px;
    max-width: 600px;
    text-align: left;
  }

  .error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
  }

/* ==========================================
   ENHANCED SMART HEADER STYLES
   ========================================== */

.smart-header {
  background: var(--surface-1);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  gap: 2rem;
  min-height: 3.5rem;
}

.school-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.school-icon {
  font-size: 1.25rem;
}

.temporal-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  justify-content: center;
}

.temporal-info > span {
  padding: 0.25rem 0.75rem;
  background: var(--surface-2);
  border-radius: 1rem;
  font-size: 0.825rem;
  font-weight: 500;
  white-space: nowrap;
}

.week-badge {
  background: var(--primary-bg) !important;
  color: var(--primary-color);
}

.date-today {
  background: rgba(var(--text-rgb), 0.1) !important;
  font-weight: 600 !important;
}

.cycle-badge {
  background: var(--info-bg) !important;
  color: var(--info-color);
}

.status-indicators {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.825rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-item i {
  font-size: 0.9rem;
}

.status-item.absent {
  background: rgba(239, 68, 68, 0.1);
  color: rgb(239, 68, 68);
}

.status-item.urgent {
  background: rgba(245, 158, 11, 0.1);
  color: rgb(245, 158, 11);
  animation: pulse 2s infinite;
}

.status-item.success {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Insight Bar Styles */
.insight-bar {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
  color: white;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  animation: slideDown 0.3s ease-out;
  min-height: 3rem;
}

.insight-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.insight-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.insight-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.insight-action {
  color: white !important;
  background: rgba(255,255,255,0.2);
  padding: 0.3rem 0.75rem;
  border-radius: 1rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.insight-action:hover {
  background: rgba(255,255,255,0.3);
  color: white !important;
  text-decoration: none;
}

.insight-controls {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.insight-rotate,
.insight-dismiss {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.85rem;
}

.insight-rotate:hover,
.insight-dismiss:hover {
  background: rgba(255,255,255,0.3);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

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

/* Dark mode adjustments for smart header */
body.dark .smart-header {
  background: var(--surface-1);
  border-color: var(--border-color);
}

body.dark .temporal-info > span {
  background: var(--surface-2);
}

body.dark .status-item.absent {
  background: rgba(239, 68, 68, 0.15);
}

body.dark .status-item.urgent {
  background: rgba(245, 158, 11, 0.15);
}

body.dark .status-item.success {
  background: rgba(34, 197, 94, 0.15);
}

/* Responsive Design for Smart Header */
@media (max-width: 1024px) {
  .header-main {
    padding: 0.75rem 1rem;
    gap: 1rem;
  }

  .temporal-info > span {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }

  .status-item {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }
}

@media (max-width: 768px) {
  .header-main {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    align-items: stretch;
  }

  .school-info {
    justify-content: center;
  }

  .temporal-info {
    width: 100%;
    justify-content: space-between;
  }

  .status-indicators {
    justify-content: center;
  }

  .insight-bar {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    padding: 1rem;
  }

  .insight-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .insight-controls {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .temporal-info {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .temporal-info > span {
    font-size: 0.7rem;
  }

  .school-name {
    font-size: 0.9rem;
  }

  .insight-text {
    font-size: 0.85rem;
  }
}

  .error-suggestions {
    background: var(--surface-1);
    border-radius: 12px;
    padding: 30px;
    margin: 40px auto;
    max-width: 600px;
  }

  .suggestion-list {
    text-align: left;
    margin: 20px 0;
  }

  .suggestion-list li {
    margin: 12px 0;
    list-style: none;
    padding-left: 30px;
    position: relative;
  }

  .suggestion-list li::before {
    content: "❓";
    position: absolute;
    left: 0;
  }

  .technical-info {
    margin-top: 40px;
    padding: 20px;
    background: var(--surface-3);
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    color: var(--text-light);
  }

  .common-causes {
    background: var(--info-bg);
    border-radius: 8px;
    padding: 20px;
    margin: 30px auto;
    max-width: 600px;
    text-align: left;
  }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
        /* Removed duplicate body declaration - styles consolidated in main body selector at line 87 */

        /* Animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        /* Navigation */
        nav {
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border);
            padding: 20px 0;
            position: sticky;
            top: 0;
            z-index: 1000;
        }

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 36px;
  font-weight: bold;
  background: var(--primary-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #007bff;
  margin-bottom: 10px;
  max-width: 200px;
  height: auto;
}
        .nav-links {
            display: flex;
            gap: 20px;
            align-items: center;
        }

        .nav-links a {
            color: var(--text-light);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s;
        }

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

        /* Landing page button styles moved to main button definitions */

        /* Landing Page Hero Section */
        .hero {
            padding: 100px 0 80px;
            background: linear-gradient(180deg, var(--bg-color) 0%, var(--surface-1) 100%);
        }

        .hero-content {
            text-align: center;
            max-width: 900px;
            margin: 0 auto;
        }

        .hero h1 {
            font-size: 3rem;
            font-weight: 800;
            color: var(--text-color);
            margin-bottom: 24px;
            line-height: 1.2;
        }

        .hero .subtitle {
            font-size: 1.25rem;
            color: var(--text-muted);
            margin-bottom: 40px;
            line-height: 1.8;
        }

        .hero-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            margin-bottom: 60px;
        }

        .trust-indicators {
            display: flex;
            justify-content: center;
            gap: 40px;
            flex-wrap: wrap;
            padding-top: 30px;
            border-top: 1px solid var(--border-color);
        }

        .trust-item {
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--text-muted);
            font-weight: 500;
        }

        .trust-item .icon {
            color: var(--success-color);
            font-size: 1.2rem;
        }

        /* Landing Page Responsive */

                /* Modern Navigation */
        .nav {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .nav-actions {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        /* Landing page gradient button styles */
        .btn-gradient {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: var(--text-color);
        }

        .btn-gradient:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
        }

        /* Removed duplicate body declaration - styles consolidated in main body selector at line 87 */

        /* Header */
.header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
  color: var(--text-color);
  border-radius: 8px 8px 0 0;
  margin: -30px -30px 20px -30px;
}
        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-cta {
            background: var(--primary);
            color: var(--text-color);
            padding: 12px 24px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s;
        }

        .header-cta:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        }

        /* Removed duplicate body declaration - styles consolidated in main body selector at line 87 */

        /* Header */

        .header-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-info {
            color: #6b7280;
        }

        .back-btn {
            background: #2563eb;
            color: var(--text-color);
            padding: 10px 20px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s;
        }

        .back-btn:hover {
            background: #1d4ed8;
        }

        /* Main Container */

        .intro {
            background: white;
            padding: 30px;
            border-radius: 12px;
            margin-bottom: 40px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .intro h1 {
            font-size: 2rem;
            color: #1f2937;
            margin-bottom: 15px;
        }

        .intro p {
            color: #6b7280;
            line-height: 1.6;
        }

        /* Comparison Grid */
        .comparison-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
            margin-bottom: 40px;
        }

        .version-card {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            transition: all 0.3s;
        }

        .version-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        }

        .version-header {
            padding: 20px;
            background: var(--primary-color);
            color: var(--text-color);
        }

        .version-a .version-header {
            background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
        }

        .version-b .version-header {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        }

        .version-c .version-header {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
        }

        .version-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 10px;
        }

        .version-subtitle {
            opacity: 0.9;
            font-size: 0.95rem;
        }

        .version-body {
            padding: 25px;
        }

        .feature-list {
            list-style: none;
            margin-bottom: 25px;
        }

        .feature-list li {
            padding: 10px 0;
            border-bottom: 1px solid #e5e7eb;
            color: #4b5563;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .feature-list li:last-child {
            border-bottom: none;
        }

.feature-icon {
  color: #10b981;
  font-size: 24px;
  margin-right: 15px;
  flex-shrink: 0;
}
        .view-buttons {
            display: flex;
            gap: 10px;
        }

        /* Button styles removed - using main .btn definition */

        /* Iframe Container */
.iframe-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: none;
}
        .iframe-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #e5e7eb;
        }

        .iframe-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: #1f2937;
        }

        .close-preview {
            background: #ef4444;
            color: var(--text-color);
            padding: 8px 16px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
        }

        .close-preview:hover {
            background: #dc2626;
        }

        iframe {
            width: 100%;
            height: 800px;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
        }

        /* Characteristics Table */
        .characteristics-table {
            background: white;
            border-radius: 12px;
            padding: 30px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        }

        .table-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: #1f2937;
            margin-bottom: 20px;
        }


        .badge-blue {
            background: var(--info-bg);
            color: var(--info-color);
        }

.badge-green {
  background: var(--success-color);
  color: var(--header-text);
}
body.dark .badge-green {
  background: var(--success-color);
  color: var(--surface-3);
}

.badge-purple {
  background: var(--purple-color);
  color: var(--purple-text);
}
        /* Hidden by default */

        /* Responsive */


.password-reset-confirm-form input[type="password"] {
    width: 100%;
    padding: 6px 14px; /* Match button padding */
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.password-reset-confirm-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}


.helptext {
    display: none;
}

.register-container input[type="text"],
.register-container input[type="email"],
.register-container input[type="password"] {
    width: 100%;
    padding: 6px 14px; /* Match button padding */
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.register-container input[type="checkbox"] {
    margin-right: 5px;
}

.register-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.error {
    color: #dc2626;
    font-size: 0.9rem;
    margin-top: 5px;
}

.login-container {
        max-width: 900px;
        margin: 0 auto;
        padding: 60px 20px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
    }

    .login-card {
        background: var(--bg-color);
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        overflow: hidden;
    }

    /* Login form specific styles to ensure proper sizing */
    .login-card .form-input {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
        display: block;
    }

    .login-card .btn-primary {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
        display: block;
        padding: 12px 30px;
        min-height: 48px;
        font-size: 16px;
        font-weight: 600;
    }

.card-header {
  background: var(--surface-2);
  color: var(--text-color);
  padding: 1rem 1.5rem;
  text-align: center;
  border-radius: 0.5rem 0.5rem 0 0;
  border-bottom: 2px solid var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-header h2 {
  margin: 0;
  font-size: 1.8rem;
}
.card-header p {
  margin: 10px 0 0 0;
  opacity: 0.9;
}

.card-body {
  padding: 1.5rem;
}

/* Login Card Header Styling */
.login-card .card-header {
  background: linear-gradient(135deg, #5b6b8a, #34495e);
  color: var(--text-color);
  padding: 30px;
  text-align: center;
  border-radius: 0;
  border-bottom: none;
  display: block;
}

.login-card .card-header h2 {
  color: var(--header-text);
  margin: 0;
}

.login-card .card-header p {
  color: var(--primary-light);
  opacity: 0.9;
}

    /* Button styles removed - using main .btn definition at line 235 */

    .form-footer {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--secondary-color);
        text-align: center;
    }

    .form-footer a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
    }

    .form-footer a:hover {
        text-decoration: underline;
    }

    .school-registration-card {
        background: linear-gradient(135deg, #2ecc71, #27ae60);
        color: var(--text-color);
        border-radius: 12px;
        padding: 30px;
        text-align: center;
        position: relative;
        overflow: hidden;
    }
    .registration-card .card-header {
        display: flex;
        flex-direction: column;
    }

    .school-icon {
        font-size: 4rem;
        margin-bottom: 20px;
    }

    .school-registration-card h3 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .school-registration-card p {
        font-size: 1.1rem;
        opacity: 0.95;
        margin-bottom: 25px;
        line-height: 1.6;
    }

.benefits-list {
  text-align: left;
  margin: 25px 0;
  padding: 20px;
  background: var(--surface-2);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
    .benefit-item:last-child {
        margin-bottom: 0;
    }

.benefit-icon {
  width: 30px;
  height: 30px;
  background: rgba(46, 204, 113, 0.8);
  color: var(--text-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: bold;
}

/* School Registration Card Button */
.school-registration-card .btn {
  width: 100%;
  max-width: 350px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  display: inline-block;
  margin: 0 auto;
  text-decoration: none;
  transition: all 0.3s ease;
}

.school-registration-card .btn-success {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color);
}

.school-registration-card .btn-success:hover {
  background: linear-gradient(135deg, #27ae60, #229954);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}
.info-message {
  background: var(--info-bg);
  color: var(--text-color);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 3px solid #1976d2;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--info-color);
}
    body.dark .login-card {
        background: #1a1a1a;
    }

body.dark .form-input {
  background: #2a2a2a;
}

/* ===============================================================
   LOGIN PAGE - MOBILE OPTIMIZATIONS
   =============================================================== */

@media (max-width: 768px) {
    /* Convert two-column grid to single column on mobile */
    .login-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px 15px;
        max-width: 100%;
    }

    /* Adjust card padding for mobile */
    .login-card {
        margin: 0 auto;
        width: 100%;
        max-width: 400px;
    }

    .login-card .card-header {
        padding: 20px 15px;
    }

    .login-card .card-header h2 {
        font-size: 1.5rem;
    }

    .login-card .card-header p {
        font-size: 0.9rem;
    }

    .login-card .card-body {
        padding: 20px 15px;
    }

    /* Full width form inputs on mobile */
    .login-card .form-input {
        max-width: 100%;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .login-card .btn-primary {
        max-width: 100%;
        font-size: 16px;
        padding: 14px 20px;
    }

    /* Form footer links */
    .form-footer {
        margin-top: 20px;
    }

    .form-footer p {
        margin: 10px 0;
        font-size: 0.9rem;
    }

    /* School registration card mobile adjustments */
    .school-registration-card {
        padding: 25px 20px;
        margin: 0 auto;
        width: 100%;
        max-width: 400px;
    }

    .school-registration-card h3 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .school-registration-card p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .school-registration-card .school-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    /* Benefits list mobile optimization */
    .benefits-list {
        text-align: left;
        padding: 0 10px;
        margin-bottom: 25px;
    }

    .benefit-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 12px;
        font-size: 0.9rem;
    }

    .benefit-icon {
        flex-shrink: 0;
        margin-right: 10px;
        font-size: 1rem;
    }

    .school-registration-card .btn-success {
        max-width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }

    /* Error and info messages */
    .error-message, .info-message {
        font-size: 0.85rem;
        padding: 10px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .login-container {
        padding: 15px 10px;
    }

    .login-card,
    .school-registration-card {
        border-radius: 8px;
    }

    .login-card .card-header h2 {
        font-size: 1.3rem;
    }

    /* Adjust form spacing */
    .form-group {
        margin-bottom: 15px;
    }

    .form-label {
        font-size: 0.9rem;
    }

    /* Stack the "Setup in 3 steps" text */
    .school-registration-card .inline-style-88 {
        margin-top: 15px;
        font-size: 0.85rem;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap target sizes for touch devices */
    .login-card .form-input {
        min-height: 48px;
    }

    .login-card .btn-primary,
    .school-registration-card .btn-success {
        min-height: 48px;
    }

    .form-footer a {
        display: inline-block;
        padding: 5px;
        margin: -5px;
    }
}

/* ===============================================================
   HEADER - MOBILE OPTIMIZATIONS
   =============================================================== */

@media (max-width: 768px) {
    /* Fix header layout for mobile */
    .top-header {
        padding: 0 10px;
        gap: 10px;
        position: fixed; /* Ensure it stays fixed */
        z-index: 1000; /* Above other content */
    }

    /* Hamburger menu button */
    .sidebar-toggle {
        flex-shrink: 0;
        margin-right: 10px;
    }

    /* Brand name - make responsive */
    .header-brand {
        flex: 1;
        justify-content: flex-start;
        min-width: 0; /* Allow text to shrink */
    }

    .brand-link {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* Header actions - prevent overlap */
    .header-actions {
        flex-shrink: 0;
        gap: 5px;
        margin-left: auto;
    }

    /* Theme toggle button */
    .theme-toggle {
        width: 36px;
        height: 36px;
        padding: 0;
    }

    .theme-icon {
        font-size: 1.1rem;
    }

    /* User menu adjustments */
    .user-menu {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .user-greeting {
        display: none; /* Hide name on mobile to save space */
    }

    .logout-btn,
    .login-btn {
        font-size: 0.85rem;
        padding: 6px 10px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    /* Extra small devices - further adjustments */
    .top-header {
        padding: 0 8px;
    }

    .brand-link {
        font-size: 1rem;
    }

    /* Show only "Edith" on very small screens */
    @media (max-width: 360px) {
        .brand-link {
            font-size: 0.95rem;
        }

        .header-brand::after {
            content: '';
        }
    }

    /* Even smaller theme toggle */
    .theme-toggle {
        width: 34px;
        height: 34px;
    }

    .theme-icon {
        font-size: 1rem;
    }

    /* Compact logout button */
    .logout-btn,
    .login-btn {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
}

/* Show user greeting on hover/focus for mobile */
@media (max-width: 768px) {
    .user-menu:hover .user-greeting,
    .user-menu:focus-within .user-greeting {
        display: block;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--header-bg);
        padding: 8px 12px;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        white-space: nowrap;
        z-index: 1000;
        margin-top: 5px;
    }

    /* ========== PAGE HEADER - MOBILE OPTIMIZATIONS ========== */
    /* Stack header elements vertically on mobile */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding-bottom: 20px;
    }

    .page-header h1 {
        font-size: 1.5rem;
        text-align: left;
        margin-bottom: 0;
    }

    /* Button container in page header */
    .page-header .header-actions,
    .page-header .page-actions,
    .page-header > div:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    /* Buttons in page header */
    .page-header .btn,
    .page-header a[class*="btn"] {
        flex: 1 1 calc(50% - 5px); /* Two buttons per row */
        min-width: 140px;
        text-align: center;
        padding: 10px 15px;
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Single button should take full width */
    .page-header .btn:only-child,
    .page-header a[class*="btn"]:only-child {
        flex: 1 1 100%;
    }

    /* Three or more buttons */
    .page-header .header-actions:has(.btn:nth-child(3)) .btn,
    .page-header .page-actions:has(.btn:nth-child(3)) .btn,
    .page-header > div:last-child:has(a:nth-child(3)) a {
        flex: 1 1 calc(50% - 5px);
    }
}

@media (max-width: 480px) {
    /* Even smaller screens for page header */
    .page-header h1 {
        font-size: 1.3rem;
    }

    .page-header .btn,
    .page-header a[class*="btn"] {
        flex: 1 1 100%; /* Full width buttons */
        min-width: 100%;
    }
}

/* ===============================================================
   TEACHERS TABLE - MOBILE CARD LAYOUT
   =============================================================== */

@media (max-width: 768px) {
    /* Hide table headers on mobile */
    .teachers-table thead {
        display: none;
    }

    /* Convert table rows to cards */
    .teachers-table tbody tr {
        display: block;
        margin-bottom: 15px;
        background: var(--bg-color);
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        padding: 15px;
        position: relative;
        border-left: 4px solid var(--primary-color);
    }

    /* Reset table cells to block display */
    .teachers-table tbody td {
        display: block;
        border: none;
        padding: 5px 0;
        text-align: left;
        position: relative;
    }

    /* Hide color indicator column */
    .teachers-table .color-indicator {
        display: none;
    }

    /* Teacher name as card header */
    .teachers-table .teacher-name-cell {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border-color);
    }

    .teachers-table .teacher-name-cell a {
        color: var(--primary-color);
        text-decoration: none;
    }

    /* Add labels before each field */
    .teachers-table .role-cell:before {
        content: "Functie: ";
        font-weight: 600;
        color: var(--text-muted);
        display: inline-block;
        width: 100px;
    }

    .teachers-table .qualifications-cell:before {
        content: "Bevoegd: ";
        font-weight: 600;
        color: var(--text-muted);
        display: inline-block;
        width: 100px;
        vertical-align: top;
    }

    .teachers-table .type-cell:before {
        content: "Type: ";
        font-weight: 600;
        color: var(--text-muted);
        display: inline-block;
        width: 100px;
        vertical-align: top;
    }

    /* Qualifications badges inline */
    .teachers-table .qualifications-badges {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .teachers-table .qualification-badge {
        font-size: 0.8rem;
        padding: 2px 8px;
    }

    /* Type badges inline */
    .teachers-table .type-badges {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .teachers-table .type-badges .badge {
        font-size: 0.8rem;
        padding: 3px 8px;
    }

    /* Actions cell */
    .teachers-table td:last-child {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
    }

    .teachers-table td:last-child:before {
        content: "Acties: ";
        font-weight: 600;
        color: var(--text-muted);
        display: inline-block;
        width: 100px;
    }

    .teachers-table .action-buttons {
        display: inline-flex;
        gap: 15px;
    }

    .teachers-table .action-buttons a,
    .teachers-table .action-buttons button {
        padding: 5px 10px;
        font-size: 1.2rem;
    }

    /* Hide edit mode on mobile */
    .teachers-table .edit-mode {
        display: none !important;
    }

    /* Adjust filter form for mobile */
    .filter-form {
        flex-direction: column;
        gap: 10px;
    }

    .filter-form .form-group {
        width: 100%;
    }

    .filter-form input,
    .filter-form select {
        width: 100%;
    }
}
  border-color: #444;
  color: #e0e0e0;
}
.password-reset-form input[type="email"] {
    width: 100%;
    padding: 6px 14px; /* Match button padding */
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.password-reset-form input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
    }
    50% {
        transform: scale(1.2) rotate(45deg);
    }
    100% {
        transform: scale(1) rotate(45deg);
    }
}
.success-icon span {
    animation: checkmark 0.5s ease-in-out;
}

.container-narrow {
    max-width: 600px;
    margin: 50px auto;
}

.verification-steps {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.verification-steps ol {
    margin-bottom: 0;
}

.info-box {
  background-color: #e8f5e9;
  border-left: 4px solid var(--info-color);
  padding: 15px;
  border-radius: 6px;
  background: var(--info-bg);
  margin-bottom: 20px;
  color: var(--info-color);
}
.info-box ul {
    margin-bottom: 0;
}

.bg-success {
  background: var(--success-color) !important;
  color: var(--text-color);
}
.next-steps {
  background-color: #e8f5e9;
  padding: 20px;
  border-radius: 0 4px 4px 0;
  margin: 25px 0;
  background: #f8f9fa;
  margin-top: 20px;
  text-align: left;
  border-left: 4px solid #28a745;
}
.next-steps ul {
  margin-bottom: 0;
  margin: 0;
  padding-left: 20px;
  color: #6c757d;
}
.registration-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 40px 20px;
    }

.registration-header {
  text-align: center;
  margin-bottom: 40px;
}
.registration-header h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  opacity: 0.85;
}
.registration-header p {
  font-size: 1.1rem;
  color: var(--text-color);
  opacity: 0.8;
}
.progress-bar {
  background: var(--secondary-color);
  border-radius: 10px;
  height: 10px;
  margin-bottom: 40px;
  overflow: hidden;
}
.progress-fill {
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.75), rgba(46, 204, 113, 0.75));
  height: 100%;
  transition: width 0.3s ease;
}
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}
.step {
  flex: 1;
  text-align: center;
  position: relative;
  display: flex;
  align-items: flex-start;
  margin: 15px 0;
}
.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--success-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 10px;
  transition: all 0.3s;
  margin-right: 15px;
  flex-shrink: 0;
  background-color: #25D366;
  font-size: 14px;
}
.step.active .step-number {
  background: rgba(52, 152, 219, 0.8);
  color: var(--text-color);
  transform: scale(1.1);
}
.step.completed .step-number {
  background: rgba(46, 204, 113, 0.8);
  color: var(--text-color);
}
.step-title {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.6;
}
.step.active .step-title {
  opacity: 1;
  font-weight: 600;
}
.registration-card {
  background: var(--bg-color);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
    .form-group.full-width {
        grid-column: 1 / -1;
    }

.form-label .required {
  color: rgba(231, 76, 60, 0.85);
}
.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.6;
  margin-top: 0.375rem;
  display: block;
}
.form-error {
  color: var(--danger-color);
  font-size: 0.8rem;
  margin-top: 0.375rem;
  display: block;
  font-weight: 500;
}
    .password-strength {
        margin-top: 10px;
    }

    .strength-bar {
        height: 5px;
        background: var(--secondary-color);
        border-radius: 3px;
        overflow: hidden;
    }

    .strength-fill {
        height: 100%;
        transition: all 0.3s;
    }

    .strength-weak {
        background: rgba(231, 76, 60, 0.85);
        width: 33%;
    }

    .strength-medium {
        background: rgba(243, 156, 18, 0.8);
        width: 66%;
    }

    .strength-strong {
        background: rgba(46, 204, 113, 0.8);
        width: 100%;
    }

.form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  gap: 15px;
  flex-direction: column-reverse;
  padding: 30px;
  background: var(--secondary-color);
  border-radius: 0 0 12px 12px;
  x-margin: -30px -30px 0 -30px;
}
    /* Button styles removed - using main .btn definition */

    .icon-user {
        width: 80px;
        height: 80px;
        background: var(--text-color);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 20px;
        font-size: 2.5rem;
    }

.info-box h4 {
  margin: 0 0 8px 0;
  color: #27ae60;
  font-size: 1rem;
}
.info-box p {
  margin: 0;
  color: #1e7e34;
  font-size: 0.9rem;
  opacity: 0.9;
}
body.dark .registration-card {
  background: #1a1a1a;
}
    body.dark .info-box {
        background: #1a3d1a;
        color: #90ee90;
    }

    body.dark .info-box h4 {
        color: #90ee90;
    }

    body.dark .info-box p {
        color: #7dd87d;
    }

.help-section {
  background-color: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  margin-top: 30px;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.85), rgba(230, 126, 34, 0.85));
  color: var(--text-color);
  text-align: center;
}
.faq-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item p {
    margin-bottom: 0;
    color: #6c757d;
}

    /* Button styles removed - using main .btn definition */

    .icon-school {
        width: 80px;
        height: 80px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 20px;
        font-size: 2.5rem;
    }

    body.dark .benefits-list {
        background: var(--surface-2);
    }

    .config-section {
        margin-bottom: 35px;
        padding: 25px;
        background: var(--secondary-color);
        border-radius: 10px;
    }

    .radio-group {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .radio-option {
        display: flex;
        align-items: flex-start;
        padding: 15px;
        background: var(--bg-color);
        border: 2px solid transparent;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s;
    }

    .radio-option:hover {
        border-color: var(--primary-color);
        transform: translateX(5px);
    }

    .radio-option.selected {
        border-color: var(--primary-color);
        background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(52, 152, 219, 0.1));
    }

    .radio-option input[type="radio"] {
        margin-right: 15px;
        margin-top: 3px;
    }

    .radio-content {
        flex: 1;
    }

    .radio-label {
        font-weight: 600;
        color: var(--text-color);
        margin-bottom: 5px;
        display: block;
    }

    .radio-desc {
        font-size: 0.9rem;
        color: var(--text-color);
        opacity: 0.7;
    }

    .number-input-group {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-top: 20px;
    }

    .number-input-group label {
        font-weight: 600;
        color: var(--text-color);
    }

    .number-input-group input[type="number"] {
        width: 80px;
        padding: 6px 14px; /* Match button padding */
        border: 2px solid #ddd;
        border-radius: 6px;
        font-size: 1rem;
        text-align: center;
    }

    .checkbox-group {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .checkbox-option {
        display: flex;
        align-items: flex-start;
        padding: 15px;
        background: var(--bg-color);
        border: 2px solid transparent;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s;
    }

    .checkbox-option:hover {
        border-color: var(--primary-color);
        transform: translateX(5px);
    }

    .checkbox-option.checked {
        border-color: rgba(46, 204, 113, 0.8);
        background: linear-gradient(135deg, rgba(46, 204, 113, 0.05), rgba(46, 204, 113, 0.1));
    }

    .checkbox-option input[type="checkbox"] {
        margin-right: 15px;
        margin-top: 3px;
        width: 20px;
        height: 20px;
    }

    .feature-badge {
        display: inline-block;
        background: rgba(243, 156, 18, 0.8);
        color: var(--text-color);
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
        margin-left: 10px;
    }

    /* Button styles removed - using main .btn definition */

    .icon-settings {
        width: 80px;
        height: 80px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 20px;
        font-size: 2.5rem;
    }

    .tip-box {
        background: #fff4e5;
        border-left: 4px solid rgba(243, 156, 18, 0.8);
        padding: 15px;
        border-radius: 8px;
        margin-top: 25px;
    }

    .tip-box h4 {
        margin: 0 0 10px 0;
        color: #e67e22;
    }

    .tip-box p {
        margin: 0;
        color: #d68910;
        font-size: 0.9rem;
    }

    body.dark .config-section {
        background: #2a2a2a;
    }

    body.dark .radio-option,
    body.dark .checkbox-option {
        background: #1a1a1a;
    }

    body.dark .tip-box {
        background: #3d2f1f;
        color: #ffa500;
    }

    body.dark .tip-box h4 {
        color: #ffa500;
    }

    body.dark .tip-box p {
        color: #ff8c00;
    }

/* Consent Form Styles */
.consent-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.consent-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.consent-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 10px;
}

.consent-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.consent-info {
    background: var(--surface-1);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.consent-section {
    margin-bottom: 30px;
}

.consent-section-description {
    color: var(--text-light);
    font-size: 0.9rem;
}

.consent-checkbox {
    display: flex;
    align-items: start;
    gap: 10px;
    cursor: pointer;
}

.consent-checkbox-wrapper {
    flex: 1;
}

.consent-checkbox-label {
    font-weight: 600;
}

.consent-checkbox-help {
    margin: 5px 0 0 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.consent-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Privacy Dashboard Styles */
.privacy-dashboard .consent-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.privacy-dashboard .consent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface-2, #f8f9fa);
    border-radius: 0.375rem;
    border-left: 3px solid var(--primary-color, #007bff);
    margin-bottom: 0;
}

.privacy-dashboard .consent-details {
    flex: 1;
}

.privacy-dashboard .consent-status {
    margin-left: 1rem;
}

.privacy-dashboard .rights-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.privacy-dashboard .rights-link {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--surface-2, #f8f9fa);
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--text-color, #212529);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.privacy-dashboard .rights-link:hover {
    background: var(--surface-1, #ffffff);
    border-color: var(--border-color, #dee2e6);
    text-decoration: none;
    transform: translateX(4px);
}

.privacy-dashboard .rights-link.danger {
    border-left: 3px solid var(--danger-color, #dc3545);
}

.privacy-dashboard .rights-link.danger:hover {
    background: rgba(220, 53, 69, 0.05);
}

.privacy-dashboard .consent-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.privacy-dashboard .history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface-2, #f8f9fa);
    border-radius: 0.375rem;
    border-left: 3px solid var(--info-color, #17a2b8);
}

.privacy-dashboard .history-details {
    flex: 1;
}

.privacy-dashboard .history-status {
    margin-left: 1rem;
}

/* Dark mode adjustments for privacy dashboard */
body.dark .privacy-dashboard .consent-item,
body.dark .privacy-dashboard .rights-link,
body.dark .privacy-dashboard .history-item {
    background: var(--surface-2, #2a2a2a);
}

body.dark .privacy-dashboard .rights-link:hover {
    background: var(--surface-3, #3a3a3a);
}

/* Privacy dashboard responsive adjustments */
@media (max-width: 768px) {
    .privacy-dashboard .consent-item,
    .privacy-dashboard .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .privacy-dashboard .consent-status,
    .privacy-dashboard .history-status {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* Bootstrap Utility Classes that are missing */
.my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}


.mt-3 {
    margin-top: 1rem;
}

.py-3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}


.gap-2 {
    gap: 0.5rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted, #6c757d);
}

.small {
    font-size: 0.875rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

.consent-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.consent-history {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.consent-history-table {
    width: 100%;
    margin-top: 20px;
}

.consent-history-header {
    background: var(--surface-1);
}

.consent-history-cell {
    padding: 10px;
    text-align: left;
}

.consent-history-row-cell {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Button styles consolidated with main definitions */

.onboarding-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px 20px;
    }

    .welcome-header {
        background: linear-gradient(135deg, rgba(52, 152, 219, 0.85), rgba(46, 204, 113, 0.85));
        color: var(--text-color);
        padding: 50px 40px;
        border-radius: 15px;
        text-align: center;
        margin-bottom: 40px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    }

    .welcome-header h1 {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .welcome-header p {
        font-size: 1.3rem;
        opacity: 0.95;
    }

    .progress-overview {
        background: var(--bg-color);
        border-radius: 12px;
        padding: 30px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin-bottom: 30px;
    }

    .progress-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .progress-title {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text-color);
    }

    .progress-percentage {
        font-size: 2rem;
        font-weight: bold;
        color: rgba(52, 152, 219, 0.85);
    }

    .progress-bar-container {
        background: var(--secondary-color);
        border-radius: 10px;
        height: 20px;
        overflow: hidden;
        margin-bottom: 30px;
    }

    .progress-bar-fill {
        background: linear-gradient(90deg, rgba(52, 152, 219, 0.8), rgba(46, 204, 113, 0.8));
        height: 100%;
        transition: width 0.5s ease;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 10px;
    }

    .checklist-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 25px;
    }

    .checklist-item {
        background: var(--bg-color);
        border-radius: 12px;
        padding: 25px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transition: all 0.3s;
        border: 2px solid transparent;
        position: relative;
        overflow: hidden;
    }

    .checklist-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .checklist-item.completed {
        border-color: rgba(46, 204, 113, 0.75);
        background: linear-gradient(135deg, rgba(46, 204, 113, 0.04), rgba(46, 204, 113, 0.08));
    }

    .checklist-item.pending {
        border-color: rgba(243, 156, 18, 0.75);
    }

    .item-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 15px;
    }

    .item-icon {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        background: var(--secondary-color);
    }

    .item-status {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        color: var(--text-color);
    }

    .status-complete {
        background: rgba(46, 204, 113, 0.85);
    }

.status-pending {
  background: var(--warning-bg);
  color: var(--warning-color);
}
    .item-content h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
        color: var(--text-color);
    }

    .item-content p {
        color: var(--text-color);
        opacity: 0.7;
        margin-bottom: 15px;
        font-size: 0.95rem;
    }

    .item-action {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        background: rgba(52, 152, 219, 0.85);
        color: var(--text-color);
        text-decoration: none;
        border-radius: 6px;
        font-weight: 600;
        transition: all 0.3s;
    }

    .item-action:hover {
        transform: translateX(5px);
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
        background: rgba(52, 152, 219, 0.95);
    }

    .item-action.completed {
        background: rgba(46, 204, 113, 0.85);
    }

    .quick-actions h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        color: var(--text-color);
    }

    /* Quick Actions Section for Onboarding */
    .quick-actions-section {
        background: var(--surface-bg);
        border-radius: 12px;
        padding: 30px;
        margin: 30px 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .quick-actions-section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        color: var(--text-color);
    }

    .quick-actions-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .quick-action-card {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 18px;
        background: var(--surface-2);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .quick-action-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-color: var(--primary-color);
        text-decoration: none;
    }

    .quick-action-card .action-icon {
        font-size: 1.8rem;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-color);
        border-radius: 10px;
    }

    .quick-action-card .action-content {
        flex: 1;
    }

    .quick-action-card .action-content strong {
        display: block;
        color: var(--text-color);
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .quick-action-card .action-content small {
        color: var(--text-muted);
        font-size: 0.875rem;
    }

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: var(--surface-2);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s;
  border: 1px solid var(--border-color);
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}
.action-btn:hover {
  border-color: rgba(52, 152, 219, 0.3);
  transform: scale(1.1);
  background: rgba(52, 152, 219, 0.1);
}
    .action-btn-icon {
        font-size: 1.5rem;
    }

    .help-section h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .help-section p {
        margin-bottom: 20px;
        opacity: 0.95;
    }

    .help-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 25px;
        background: white;
        color: rgba(230, 126, 34, 0.9);
        text-decoration: none;
        border-radius: 6px;
        font-weight: 600;
        transition: all 0.3s;
    }

    .help-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    body.dark .onboarding-container .checklist-item,
    body.dark .progress-overview,
    body.dark .quick-actions {
        background: #1a1a1a;
    }

    body.dark .quick-actions-section {
        background: #1a1a1a;
    }

    body.dark .quick-action-card {
        background: #2a2a2a;
        border-color: #333;
    }

    body.dark .quick-action-card:hover {
        border-color: rgba(52, 152, 219, 0.5);
        background: #333;
    }

    body.dark .quick-action-card .action-icon {
        background: #1a1a1a;
    }

body.dark .action-btn {
  background: #2a2a2a;
  border-color: #333;
}
    body.dark .item-icon {
        background: #2a2a2a;
    }

/* Button styles consolidated with main definitions */

.bg-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
}

.action-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.help-section ul {
    margin-bottom: 0;
}

.form-container {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--surface-1);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.form-col {
    display: flex;
    flex-direction: column;
}


.alert {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid transparent;
}
.alert-danger {
    background: var(--danger-bg);
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.status-card h5 {
    margin: 0 0 0.75rem 0;
    color: var(--info-color);
    font-size: 1rem;
    font-weight: 600;
}

.status-card p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* Contact Type Toggle Styles */
.contact-type-toggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.75rem;
}

.contact-type-option {
    position: relative;
}

.contact-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.contact-type-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-1);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
}

.contact-type-card:hover {
    border-color: var(--primary-color);
    background: var(--primary-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-type-option.selected .contact-type-card {
    border-color: var(--primary-color);
    background: var(--primary-soft);
    box-shadow: var(--shadow-md);
}

.contact-type-option[data-value="freelance"].selected .contact-type-card {
    border-color: var(--success-color);
    background: var(--success-bg);
}

.contact-type-option[data-value="agency"].selected .contact-type-card {
    border-color: var(--warning-color);
    background: var(--warning-bg);
}

.contact-type-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.contact-type-option.selected .contact-type-icon {
    transform: scale(1.1);
}

.contact-type-info {
    flex: 1;
}

.contact-type-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.contact-type-subtitle {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.contact-type-description {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Priority Slider Styles */
.priority-slider-container {
    margin-top: 0.75rem;
}

.priority-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.priority-low {
  color: var(--text-color);
  background-color: #17a2b8;
}
.priority-current {
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-soft);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--primary-color);
}

.priority-high {
  color: var(--text-color);
  background-color: #fd7e14;
}
.form-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--surface-2);
    outline: none;
    margin: 0.5rem 0;
    cursor: pointer;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 3px solid var(--bg-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.form-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 3px solid var(--bg-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: var(--focus-ring);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: var(--focus-ring);
}

.priority-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.priority-ticks span {
    flex: 1;
    text-align: center;
}

.priority-ticks span:first-child {
    text-align: left;
}

.priority-ticks span:last-child {
    text-align: right;
}

/* Responsive */

.contact-details-box {
    background: var(--surface-2);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.contact-details-box h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
}

.detail-table {
    width: 100%;
}

.detail-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.detail-table td:first-child {
    width: 35%;
    color: var(--text-muted);
}

/* Period Filter */
.period-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: var(--surface-2);
    border-radius: 8px;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.filter-btn:hover {
    background: var(--surface-3);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--text-color);
    font-weight: 600;
}

/* Statistics Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--surface-1);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border-color);
  transition: transform 0.3s;
  text-align: center;
  box-shadow: none;
  color: var(--text-color);
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}
/* Performance Table */
.performance-table-container {
    background: var(--surface-1);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.performance-table {
    width: 100%;
    border-collapse: collapse;
}

.performance-table thead {
    background: var(--surface-2);
}

.performance-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-muted);
}

.performance-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.performance-table tbody tr:hover {
    background: var(--surface-2);
}

.performance-table td {
    padding: 1rem;
}

/* Contact Info */
.contact-info {
  min-width: 200px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 16px;
  margin: 15px 0;
}
.contact-details {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Status Indicators */

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

/* Request Stats */
.request-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-main {
    font-weight: 600;
}

.stat-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Success Rate */
.success-rate {
    font-weight: 600;
    font-size: 1.1rem;
}

.success-rate.high {
    color: var(--success-color);
}

.success-rate.medium {
    color: var(--warning-color);
}

.success-rate.low {
    color: var(--danger-color);
}

.success-details {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.speed-badge {
    font-size: 1rem;
    vertical-align: middle;
}

/* Response Time */
.response-time {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.response-time.fast {
    background: var(--success-bg);
    color: var(--success-color);
}

.response-time.medium {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.response-time.slow {
    background: var(--danger-bg);
    color: var(--danger-color);
}

/* Performance Score */
.performance-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-bar {
    width: 60px;
    height: 8px;
    background: var(--surface-3);
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(to right, var(--danger-color), var(--warning-color), var(--success-color));
    width: var(--score);
    transition: width 0.3s;
}

.score-text {
    font-weight: 600;
    font-size: 0.875rem;
}

/* Trend Indicators */
.trend-indicator {
    font-size: 1.25rem;
}

.trend-indicator.up {
    color: var(--success-color);
}

.trend-indicator.down {
    color: var(--danger-color);
}

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

/* Action Buttons */

/* Empty State */
.empty-state-inline {
    padding: 3rem 2rem;
}

.empty-state-inline p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Detail Table in Modal */

/* Communication Log */
.log-entries {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.log-entry {
    background: var(--surface-2);
    border-radius: 8px;
    padding: 0.75rem;
    border-left: 3px solid var(--primary-color);
}

.log-entry-header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.log-entry-body {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.log-entry-body p {
    margin: 0.5rem 0 0;
}

/* Process List */
.process-list {
    margin: 0;
    padding-left: 1.5rem;
}

.process-list li {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}
/* Layer Badges */
.layer-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
    cursor: help;
}

.layer-badge.layer-3 {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(52, 152, 219, 0.3);
}

.layer-badge.layer-4 {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(243, 156, 18, 0.3);
}

/* Autocomplete dropdown styles */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface-1, #fff);
  border: 1px solid var(--border-color, #dee2e6);
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1000;
  display: none;
}
.autocomplete-dropdown.show {
  display: block;
}
.autocomplete-item {
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
  border-bottom: 1px solid var(--border-color);
}
.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--primary-soft);
}

.autocomplete-item .color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}
.autocomplete-item .teacher-role {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.125rem 0.5rem;
    background: var(--surface-2);
    border-radius: 4px;
}

.autocomplete-no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Period toggle styles */
.period-toggle-group {
    display: inline-flex;
    background: var(--surface-2);
    border-radius: 8px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.period-toggle-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.period-toggle-btn:hover:not(.active) {
    background: var(--surface-3);
}

.period-toggle-btn.active {
    background: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.period-icon {
    font-size: 1.1rem;
}

/* Make teacher autocomplete input position relative for dropdown */
.form-group:has(#teacher-autocomplete) {
    position: relative;
}

/* Enhanced date input */
input[type="date"].form-input {
    cursor: pointer;
}

input[type="date"].form-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
}

input[type="date"].form-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Dark mode adjustments */
body.dark .autocomplete-dropdown {
  background: #2a2a2a;
  border-color: #444;
}
body.dark .autocomplete-item:hover,
body.dark .autocomplete-item.selected {
    background: var(--surface-2);
}

body.dark .period-toggle-group {
    background: var(--surface-1);
}

body.dark .period-toggle-btn:hover:not(.active) {
    background: var(--surface-2);
}

/* Availability status display */
.availability-status {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.availability-status.status-warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(230, 126, 34, 0.1));
    border: 1px solid var(--warning-color);
    color: var(--text-color);
}

.availability-status.status-success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.1));
    border: 1px solid var(--success-color);
    color: var(--text-color);
}

.status-content {
    flex: 1;
    line-height: 1.5;
}

.status-content strong {
    color: var(--text-color);
}

.internal-list {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

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

/* Dark mode adjustments for status */
body.dark .availability-status.status-warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15), rgba(230, 126, 34, 0.15));
}

body.dark .availability-status.status-success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(39, 174, 96, 0.15));
}


.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Ensure checkbox groups display properly */
.form-group ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.form-group ul li {
    padding: 0.375rem 0;
}

.form-group ul li label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

/* Responsive */

.request-details {
  background: #f8f9fa;
  border-radius: 4px;
  padding: 20px;
  margin: 20px 0;
  border-left: 4px solid #007bff;
}
.log-detail-content .detail-row {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  flex-direction: column;
}
.inline-style-86 {
    width: 100%;
}
.inline-style-118 {
    display: flex; align-items: start; gap: 10px;
}
.inline-style-119 {
    font-weight: 600; cursor: pointer;
}
.inline-style-120 {
    margin: 5px 0 0 0; color: var(--text-light); font-size: 0.9rem;
}
.inline-style-125 {
    width: 100%; margin-top: 20px;
}
.inline-style-126 {
    background: var(--surface-1);
}
.inline-style-127 {
    padding: 10px; text-align: left;
}
.inline-style-128 {
    padding: 10px; border-bottom: 1px solid var(--border-color);
}
.inline-style-152 {
    width: 100%;
    background: #25D366;
    color: white;
}
.inline-style-151 {
    width: 100%;
    margin-bottom: 10px;
}
.inline-style-153 {
    width: 100%;
    background: #dc2626;
    color: white;
}
.inline-style-150 {
    background: #ef4444;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}
.inline-style-149 {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}
.inline-style-148 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.inline-style-36 {
    margin-top: 20px;
}
.inline-style-147 {
    background: var(--surface-1); padding: 20px; border-radius: 8px;
}
.inline-style-191 {
  position: relative;
  margin-bottom: 2rem;
}

.inline-style-192 {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.inline-style-193 {
  padding: 3rem;
  border: 3px dashed var(--border-color);
  border-radius: 12px;
  background: var(--surface-2);
  transition: all 0.3s;
}
.inline-style-194 {
  font-size: 3rem;
  color: var(--text-muted);
 }
.inline-style-195 {
    margin-top: 1rem; color: var(--text-muted);
}
.inline-style-196 {
    display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.inline-style-279 {
  background: var(--surface-2);
  padding: 1rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  white-space: pre-wrap;
  color: var(--text-muted);
  font-style: italic;
}
.detail-label {
  font-weight: bold;
  width: 120px;
  color: #6c757d;
  min-width: 120px;
}
.detail-value {
  flex: 1;
  color: var(--text-color);
}
        .form-check {
            padding: 15px;
            margin: 10px 0;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            transition: all 0.3s;
        }
        .form-check:hover {
            border-color: var(--warning-color);
            background: var(--border-color);
        }
        .form-check-input:checked ~ .form-check-label {
            font-weight: 600;
            color: var(--header-text);
        }
        .btn-accept {
            background: linear-gradient(135deg, #28a745 0%, #218838 100%);
            border: none;
            padding: 12px 30px;
            font-size: 16px;
            font-weight: 600;
            border-radius: 8px;
            transition: transform 0.2s;
        }
        .btn-accept:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
        }

        .substitute-fields {
            display: none;
            animation: slideDown 0.3s ease-out;
        }
        .substitute-fields.show {
            display: block;
        }
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 40px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -29px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    background: var(--primary-color);
}

.timeline-content {
    background: var(--surface-2);
    padding: 1rem;
    border-radius: 8px;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.message-content {
  background: var(--surface-1);
  padding: 15px;
  border-radius: 4px;
  white-space: pre-wrap;
  word-wrap: break-word;
  background-color: var(--bg-color);
  border-left: 4px solid #667eea;
  margin: 20px 0;
}
.message-preview {
    background: var(--surface-1);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.response-message {
    padding: 1rem;
    background: var(--surface-2);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Breadcrumb styling */
.breadcrumb {
    background: var(--surface-2);
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

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

/* Search History Styles */
.search-history {
    display: none;
    padding: 0.5rem 0;
}

.search-history.expanded {
    display: block;
}

.card-header.collapsible {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.card-header.collapsible:hover {
    background-color: var(--surface-2);
}

.card-header.collapsible h3::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s;
    font-size: 0.8em;
}

.card-header.collapsible.expanded h3::before {
    transform: rotate(90deg);
}

/* Inline collapsible header for search history */
.search-history-header.collapsible-inline {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    padding: 0.5rem;
    border-radius: 4px;
}

.search-history-header.collapsible-inline:hover {
    background-color: var(--surface-2);
}

.search-history-header .collapse-arrow {
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s;
    font-size: 0.9em;
}

.layer-section {
    background: var(--surface-2);
    padding: 1rem;
    border-radius: 8px;
}

.layer-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-attempts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-attempt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--surface-1);
    border-radius: 6px;
    border-left: 3px solid var(--border-color);
}

.search-attempt.success {
    border-left-color: var(--success-color);
    background: linear-gradient(to right, rgba(46, 204, 113, 0.05), transparent);
}

.search-attempt.failed {
    border-left-color: var(--danger-color);
    background: linear-gradient(to right, rgba(231, 76, 60, 0.05), transparent);
}

.search-attempt .status-icon {
    font-size: 1.1rem;
}

.search-attempt .entity-name {
    flex: 1;
    min-width: 200px;
}

.search-attempt .reason {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-attempt .details {
    width: 100%;
    padding-left: 2rem;
}

/* Card improvements */

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Badge styles */

}
/* Table styling */
.table {
  margin-bottom: 0;
  color: var(--text-color);
  width: 100%;
  border-collapse: collapse;
}
.table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}
.table-sm td {
    padding: 0.375rem 0.5rem;
}

/* Button styling */
.btn-outline-primary {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
  border-color: var(--primary-color);
}
.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--text-color);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}
/* Date Sections */
.date-section {
    margin-bottom: 2rem;
}

.date-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border-bottom: 2px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.date-header.collapsible {
    cursor: pointer;
    user-select: none;
}

.date-header.collapsible:hover {
  background: var(--surface-3);
}
.collapse-icon {
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.count-badge {
    margin-left: auto;
    background: var(--primary-color);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

/* Absence Cards - Refined with subtle hierarchy */
.absence-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.15s ease, transform 0.1s ease;
    border-left: 3px solid transparent;
}

.absence-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    border-color: var(--border-color);
}

.absence-card.urgent {
    border-left-color: var(--danger-color);
    background: var(--surface-1);
}

.absence-card.urgent::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--danger-color);
    opacity: 0.8;
}

.absence-card.resolved {
    border-left-color: var(--success-color);
    opacity: 0.85;
    background: var(--surface-1);
}

.absence-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.absence-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.absence-info strong {
    font-weight: 500;
    color: var(--text-color);
}

/* Contact Requests */
.contact-requests {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 2rem;
}

.contact-request-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border-radius: 4px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

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

.contact-request-item:hover {
    background: var(--surface-2);
}

.contact-name-btn {
    font-weight: 500;
    min-width: 150px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 2px 4px;
    text-align: left;
    text-decoration: none;
    transition: all 0.15s ease;
    border-radius: 3px;
    font-size: 0.9rem;
}

.contact-name-btn:hover {
    color: var(--primary-color);
    background: var(--primary-soft);
    text-decoration: none;
}

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

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

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

.status-badge.timeout {
    background: var(--muted-bg);
    color: var(--text-muted);
}

/* Compact Views */
.contact-requests.compact {
    flex-direction: row;
    flex-wrap: wrap;
    padding-left: 1rem;
}

.compact-status {
    background: var(--surface-2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.absence-card.compact {
    padding: 0.75rem;
}

.absence-info-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

/* Use button styles from main style.css */
.contact-request-item .btn-action-small {
    width: 28px;
    height: 28px;
    min-height: 28px !important;
    margin-left: 0.25rem;
}

/* Compact view for older sections */
.contact-request-item.compact {
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.absence-card.expanded {
    background: var(--surface-2);
}

/* Empty State */

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Info Cards */

/* Summary Card - Subtle and informative */
.summary-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.summary-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
  opacity: 0.9;
}
.stat-item.urgent .stat-value {
    color: var(--danger-color);
    opacity: 1;
}

.stat-item.success .stat-value {
    color: var(--success-color);
    opacity: 1;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 500;
}

/* Period Groups */
.period-group {
    margin-bottom: 1.5rem;
}

.period-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface-2);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Date Sections */

/* Absence Cards */

.absence-card.vakdocent {
    border-left: 4px solid var(--info-color);
    background: var(--surface-1) linear-gradient(to right, rgba(52, 152, 219, 0.05), transparent);
}

.absence-card.no-classes {
    border-left: 4px solid var(--muted-color);
    background: var(--surface-1) linear-gradient(to right, rgba(128, 128, 128, 0.03), transparent);
    opacity: 0.9;
}

.absence-card.cancelled {
    opacity: 0.7;
    border-left: 4px solid var(--muted-color);
    background: var(--surface-1) linear-gradient(to right, rgba(128, 128, 128, 0.05), transparent);
    cursor: pointer;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.absence-card.cancelled:hover {
    opacity: 0.85;
    background: var(--surface-2);
}

.absence-card.cancelled.collapsed {
    min-height: auto;
    padding: 0.75rem 1.25rem;
}

.absence-card.cancelled .absence-info strong {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Collapse indicator for cancelled cards */
.absence-card .collapse-indicator {
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
    color: var(--text-muted);
    user-select: none;
}

.absence-card:not(.collapsed) .collapse-indicator {
    transform: rotate(90deg);
}

/* Hide details when collapsed */
.absence-card.collapsed .collapsible-content {
    display: none;
}

/* Show cancelled status inline when collapsed */
.absence-card.cancelled.collapsed .absence-header::after {
    content: " - Geannuleerd";
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-left: 0.5rem;
}

/* Add separator before first cancelled card in a group */
.absence-card:not(.cancelled) + .absence-card.cancelled {
    margin-top: 1.5rem;
    position: relative;
}

.absence-card:not(.cancelled) + .absence-card.cancelled::before {
    content: "";
    position: absolute;
    top: -0.75rem;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-light);
    opacity: 0.5;
}

.teacher-type {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

.teacher-type-compact {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Absence Details */
.absence-details {
    padding-left: 2rem;
}

.absence-details.compact {
    padding-left: 1.5rem;
}

.notification-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--surface-2);
    border-radius: 6px;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.message-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Status Badges */

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

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

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

.status-badge.muted {
    background: var(--muted-bg);
    color: var(--text-muted);
}

/* Compact Views */

/* Tomorrow section - slightly more compact while preserving hierarchy */
.date-section[data-group="tomorrow"] .absence-card {
    padding: 1rem 1.15rem;  /* Reduced from 1.25rem, but not as compact as 0.75rem */
}

.date-section[data-group="tomorrow"] .absence-header {
    margin-bottom: 0.75rem;  /* Slightly reduced from 1rem */
}

.date-section[data-group="tomorrow"] .absence-details {
    padding-left: 1.75rem;  /* Slightly reduced from 2rem */
}

/* Text Colors */
.text-blue {
    color: var(--info-color);
}

.ml-2 {
    margin-left: 0.5rem;
}

/* Empty State */

/* Info Cards */
.process-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.process-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.process-item small {
    display: block;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Mobile Responsive */

.success-card {
            max-width: 500px;
            margin: 20px;
            background: var(--primary-color);
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            padding: 40px;
            text-align: center;
        }
.success-icon {
  font-size: 28px;
  margin-bottom: 20px;
  animation: checkmark 0.5s ease-in-out;
  display: inline-block;
  margin-right: 10px;
}
        @keyframes checkmark {
            0% {
                transform: scale(0);
                opacity: 0;
            }
            50% {
                transform: scale(1.2);
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

h1 {
  color: #2c3e50;
  font-size: 24px;
  margin-bottom: 10px;
  margin: 0;
}
        .next-steps h5 {
            color: #495057;
            margin-bottom: 15px;
        }

        .next-steps li {
            margin-bottom: 8px;
        }
        .footer-text {
            color: #adb5bd;
            font-size: 14px;
            margin-top: 30px;
        }

.whatsapp-alert {
        background: linear-gradient(135deg, #25d366, #128c7e);
        color: var(--text-color);
        border: none;
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    }

    .whatsapp-alert h4 {
        margin-top: 0;
        font-size: 1.4rem;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .whatsapp-alert ul {
        margin: 15px 0;
        padding-left: 20px;
    }

    .whatsapp-alert li {
        margin: 8px 0;
        list-style: none;
    }

    .whatsapp-alert .btn-light {
        background: var(--primary-color);
        color: #128c7e;
        border: none;
        padding: 10px 20px;
        border-radius: 25px;
        font-weight: 600;
        text-decoration: none;
        display: inline-block;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .whatsapp-alert .btn-light:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .success-alert {
        background: linear-gradient(135deg, #27ae60, #2ecc71);
        color: var(--text-color);
        border: none;
        border-radius: 10px;
        padding: 15px 20px;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.form-section {
  background: var(--bg-color);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
    .form-section h2 {
        color: var(--text-color);
        font-size: 1.5rem;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--primary-color);
    }

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: var(--text-color);
    }

    .form-group input,
    .form-group select {
        width: 100%;
        padding: 10px;
        border: 2px solid #ddd;
        border-radius: 6px;
        font-size: 1rem;
        background: var(--bg-color);
        color: var(--text-color);
    }

    .form-group input:focus,
    .form-group select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

.help-text {
  display: block;
  margin-top: 5px;
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.6;
  font-style: italic;
}
    /* Button styles removed - using main .btn definition */

.info-section {
  background: var(--secondary-color);
  border-radius: 4px;
  padding: 15px;
  margin-top: 30px;
  background-color: var(--surface-1);
  border-left: 4px solid #28a745;
  margin: 20px 0;
}
.info-section h3 {
  color: var(--header-text);
  font-size: 1.3rem;
  margin-bottom: 15px;
  margin-top: 0;
}
    .info-section ul {
        padding-left: 20px;
        line-height: 1.8;
    }

    .info-section li {
        color: var(--text-color);
        margin: 8px 0;
    }

/* Upload area styling */
.upload-area:hover .upload-display {
    border-color: var(--primary-color) !important;
    background: var(--surface-1) !important;
}

.upload-area.dragover .upload-display {
    border-color: var(--success-color) !important;
    background: var(--success-bg) !important;
}

.upload-display {
    cursor: pointer;
}

/* Modal styling */
#formatModal .modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}

#formatModal .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

#formatModal .modal-dialog {
    max-width: 600px;
    width: 100%;
    z-index: 1060;
    position: relative;
}

#formatModal .modal-content {
    background: var(--surface-1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

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

#formatModal .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

#formatModal .close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#formatModal .close:hover {
    color: var(--text-color);
}

#formatModal .table {
    margin-bottom: 0;
}

#formatModal .table td {
    padding: 0.5rem;
    border-color: var(--border-color);
}

/* Compact process list */

.process-list li strong {
    color: var(--primary-color);
}

/* File selected state */
.file-selected .upload-display {
    border-color: var(--success-color);
    background: var(--success-bg);
}

.file-selected .bi-cloud-upload {
    color: var(--success-color) !important;
}

    .form-select {
        padding: 6px 14px; /* Match button padding */
        border: 2px solid #ddd;
        border-radius: 6px;
        font-size: 14px; /* Match button font-size */
        background: var(--bg-color);
        color: var(--text-color);
        cursor: pointer;
        width: 100%;
        min-height: 36px; /* Match button min-height */
    }

    .checkbox-wrapper {
        display: flex;
        align-items: center;
        padding: 15px;
        background: var(--bg-color);
        border-radius: 6px;
        border: 2px solid transparent;
        transition: all 0.3s;
        cursor: pointer;
    }

    .checkbox-wrapper:hover {
        border-color: var(--primary-color);
        transform: translateX(5px);
    }

    .checkbox-wrapper input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 12px;
        cursor: pointer;
    }

.checkbox-label {
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
}
    .color-picker-wrapper {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .color-preview {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        border: 3px solid #ddd;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    }

    input[type="color"] {
        width: 80px;
        height: 40px;
        border: 2px solid #ddd;
        border-radius: 6px;
        cursor: pointer;
    }

    .multi-select-wrapper {
        position: relative;
    }

    .multi-select-display {
        padding: 10px 15px;
        border: 2px solid #ddd;
        border-radius: 6px;
        background: var(--bg-color);
        cursor: pointer;
        min-height: 45px;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        align-items: center;
    }

    .multi-select-display:hover {
        border-color: var(--primary-color);
    }

    .selected-badge {
        background: var(--primary-color);
        color: var(--text-color);
        padding: 4px 10px;
        border-radius: 15px;
        font-size: 0.85rem;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .selected-badge .remove {
        cursor: pointer;
        font-weight: bold;
        margin-left: 5px;
    }

    .multi-select-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        border: 2px solid var(--primary-color);
        border-radius: 6px;
        margin-top: 5px;
        max-height: 300px;
        overflow-y: auto;
        z-index: 100;
        display: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .multi-select-dropdown.show {
        display: block;
    }

    .multi-select-option {
        padding: 10px 15px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: background 0.2s;
    }

    .multi-select-option:hover {
        background: var(--secondary-color);
    }

    .multi-select-option.selected {
        background: var(--primary-color);
        color: var(--text-color);
    }

    .multi-select-option input[type="checkbox"] {
        pointer-events: none;
    }

    /* Button styles removed - using main .btn definition */

    .info-card {
        background: var(--surface-1);
        border-radius: 12px;
        padding: 24px;
        border: 1px solid var(--border-color);
        color: var(--text-color);
    }

    body.dark .request-card {
        background: #1a1a1a;
    }

    body.dark .request-section {
        background: #2a2a2a;
    }


    body.dark .checkbox-wrapper {
        background: #2a2a2a;
    }

    body.dark .multi-select-display {
        background: #2a2a2a;
        border-color: #444;
    }

    body.dark .multi-select-dropdown {
        background: #2a2a2a;
        border-color: var(--primary-color);
    }


    /* Button styles removed - using main .btn definition */

    .privacy-notice {
        background: linear-gradient(135deg, #f39c12, #e67e22);
        color: var(--text-color);
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 30px;
        display: flex;
        align-items: center;
        gap: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .availability-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

.stat-card:nth-child(1) {
  border-top-color: #3498db;
}
.stat-card:nth-child(2) {
  border-top-color: #2ecc71;
}
.stat-card:nth-child(3) {
  border-top-color: #f39c12;
}
    .availability-calendar {
        margin-bottom: 30px;
    }

    .week-section {
        background: var(--bg-color);
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        overflow: hidden;
        margin-bottom: 20px;
    }

    .week-section h3 {
        background: linear-gradient(135deg, var(--primary-color), #34495e);
        color: var(--surface-3);
        margin: 0;
        padding: 15px 20px;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .week-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
        padding: 20px;
    }

    .day-card {
        background: var(--bg-color);
        border: 2px solid;
        border-radius: 10px;
        padding: 15px;
        text-align: center;
        transition: all 0.3s;
        position: relative;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .day-card.available {
        border-color: #2ecc71;
        background: linear-gradient(135deg, rgba(46, 204, 113, 0.05), rgba(46, 204, 113, 0.1));
    }

    .day-card.available:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    }

    .day-card.unavailable {
        border-color: #e74c3c;
        background: linear-gradient(135deg, rgba(231, 76, 60, 0.05), rgba(231, 76, 60, 0.1));
    }

    .day-card.unavailable:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    }

    .day-card.unknown {
        border-color: #95a5a6;
        background: linear-gradient(135deg, rgba(149, 165, 166, 0.05), rgba(149, 165, 166, 0.1));
    }

    .day-card .day-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

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

    .day-date {
        background: var(--primary-color);
        color: var(--text-color);
        padding: 4px 10px;
        border-radius: 15px;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .day-status {
        margin: 15px 0;
    }

    .available .status-indicator {
        background: linear-gradient(135deg, #2ecc71, #27ae60);
        color: var(--text-color);
    }

    .unavailable .status-indicator {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
    }

    .unknown .status-indicator {
        background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    }

    .day-reason {
        font-size: 0.85rem;
        color: var(--text-color);
        opacity: 0.7;
        margin-top: 5px;
        padding: 5px 10px;
        background: rgba(0,0,0,0.05);
        border-radius: 6px;
    }

.legend-card {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}
.legend-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-color);
}
.legend-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.legend-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-weight: bold;
}
    .legend-available {
        background: linear-gradient(135deg, #2ecc71, #27ae60);
    }

    .legend-unavailable {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
    }

.legend-text {
  flex: 1;
}
.legend-label {
  font-weight: 600;
  color: var(--text-color);
  display: block;
}
.legend-desc {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.7;
}
    /* Dark mode */
    body.dark .week-section {
        background: #1a1a1a;
    }

    body.dark .day-card {
        background: #1a1a1a;
    }

body.dark .legend-card {
  background: #1a1a1a;
}
body.dark .legend-item {
  background: #2a2a2a;
}
    body.dark .day-reason {
        background: rgba(255,255,255,0.05);
    }

/* Teacher badge styling */

    .teacher-badge-small:hover {
        transform: scale(1.05);
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    .teacher-badge-small.unavailable {
        opacity: 0.5;
        text-decoration: line-through;
        cursor: not-allowed;
    }

    .teacher-badge-small.unavailable:hover {
        transform: none;
        box-shadow: none;
    }

    /* Card styling */

    .card-header h5 {
        margin: 0;
        color: var(--text-color, #333);
    }

    /* Table styling */

    .table thead th {
        border-bottom: 2px solid var(--primary-color);
        font-weight: 600;
        background-color: var(--secondary-color, #f8f9fa);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    /* Filter section */
.filter-section {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}
    .filter-section h5 {
        margin-bottom: 15px;
        color: var(--text-color, #333);
    }

    /* Week navigation */
    .week-navigation {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding: 15px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    /* Day column headers - scoped to avoid conflicts */
    .schedule-table .day-header {
        text-align: center;
        min-width: 120px;
    }

    .schedule-table .day-header.today {
        background-color: var(--primary-color);
        color: var(--text-color);
    }

    /* Empty state */

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 15px;
        display: block;
    }

    /* Badge styling */

    /* Deployment info */
    .deployment-info {
        font-size: 0.75rem;
        color: #666;
        margin-top: 2px;
    }

    /* Dark mode adjustments */
    body.dark .filter-section,
    body.dark .week-navigation,
    body.dark .card {
        background-color: #1a1a1a;
        border-color: #333;
    }

body.dark .card-header {
  background-color: #2a2a2a;
  border-bottom-color: var(--primary-color);
}
body.dark .table {
  color: #e0e0e0;
}
body.dark .table thead th {
  background-color: var(--surface-2);
  border-bottom-color: var(--border-color);
}
    body.dark .empty-state {
        color: #666;
    }

.filters-section {
    background: var(--surface-1);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 0 0 auto;
  min-width: 150px;
}
.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.teachers-table-container {
    background: var(--surface-1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.teachers-table {
    width: 100%;
    border-collapse: collapse;
}

.teachers-table thead {
    background: var(--surface-2);
    border-bottom: 2px solid var(--border-color);
}

.teachers-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.teachers-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.teachers-table tbody tr:hover {
    background: var(--surface-2);
}

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

.teachers-table td {
    padding: 0.15rem;
    vertical-align: middle;
}

.color-indicator {
    padding: 0 !important;
    width: 5px;
}

.color-bar {
    width: 5px;
    height: 60px;
}

.teacher-name-cell {
    font-weight: 600;
}

.teacher-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

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

.qualifications-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.type-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.whatsapp-status-cell {
    font-size: 0.875rem;
}

.status-badge.status-active {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border-color: rgba(46, 204, 113, 0.3);
}

.status-badge.status-pending {
    background: rgba(243, 156, 18, 0.1);
    color: #e67e22;
    border-color: rgba(243, 156, 18, 0.3);
}

.status-badge.status-none {
    background: var(--surface-2);
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Edit, Save, Cancel buttons - match action button height */
.btn-edit,
.btn-save,
.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-height: 32px; /* Override global button min-height */
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
    padding: 0;
}

.btn-edit:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.3);
    transform: scale(1.1);
}

.btn-save:hover {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
    transform: scale(1.1);
}

.btn-cancel:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
    transform: scale(1.1);
}

/* WhatsApp opt-in button */
.optin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-height: 28px;
    border-radius: 6px;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
}

.optin-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: scale(1.1);
}

.action-btn.action-edit:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.3);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.page-link {
    padding: 0.5rem 1rem;
    background: var(--surface-1);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
    transition: background-color 0.2s;
}

.page-link:hover {
    background: var(--surface-2);
}

/* Dark mode pagination */
body.dark .pagination {
    background: transparent;
}

body.dark .page-link {
    background: var(--surface-1);
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark .page-link:hover {
    background: var(--surface-2);
    border-color: var(--primary-color);
}

/* Dark mode adjustments */
body.dark .teachers-table-container {
    background: #1a1a1a;
}

body.dark .teachers-table thead {
    background: var(--surface-2);
}

body.dark .teachers-table tbody tr:hover {
    background: var(--surface-2);
}

body.dark .role-badge {
    background: #2a2a2a;
}

/* Mobile Responsive Design */

/* Inline editing styles */
.edit-field-group {
    display: flex;
    gap: 0.5rem;
}

.edit-field-group input {
    flex: 1;
    min-width: 100px;
}

.teacher-row.editing {
    background: var(--surface-2) !important;
}

.teacher-row input:disabled,
.teacher-row select:disabled {
    background: transparent;
    border: 1px solid transparent;
    cursor: default;
}

.teacher-row.editing input:enabled,
.teacher-row.editing select:enabled {
    background: var(--bg-color, white);
    border: 1px solid var(--border-color, #ddd);
    cursor: text;
}

.type-checkboxes,
.qualification-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

/* Button styles for header actions */

    .stats-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

    .stat-card:nth-child(4) { border-top-color: #9b59b6; }

    .availability-card {
        background: var(--bg-color);
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        overflow: hidden;
        margin-bottom: 30px;
    }

    .availability-header {
        background: linear-gradient(135deg, var(--primary-color), #34495e);
        color: var(--text-color);
        padding: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .availability-header h2 {
        margin: 0;
        font-size: 1.3rem;
    }

    .week-selector {
        display: flex;
        gap: 10px;
        background: rgba(255,255,255,0.1);
        padding: 5px;
        border-radius: 8px;
    }

    .week-btn {
        padding: 8px 16px;
        background: transparent;
        color: var(--text-color);
        border: 2px solid transparent;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s;
        font-size: 0.9rem;
    }

    .week-btn:hover {
        background: rgba(255,255,255,0.1);
    }

    .week-btn.active {
        background: rgba(255,255,255,0.2);
        border-color: white;
    }

    .availability-body {
        padding: 0;
        overflow-x: auto;
    }

    .availability-table {
        width: 100%;
        border-collapse: collapse;
    }

    .availability-table thead {
        background: var(--secondary-color);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .availability-table th {
        padding: 15px 10px;
        text-align: center;
        font-weight: 600;
        color: var(--text-color);
        font-size: 0.9rem;
        border-bottom: 2px solid var(--primary-color);
    }

    .availability-table th.teacher-col {
        text-align: left;
        padding-left: 20px;
        min-width: 250px;
        position: sticky;
        left: 0;
        background: var(--secondary-color);
        z-index: 11;
    }

    .availability-table .week-header {
        background: var(--primary-color);
        color: var(--text-color);
        font-weight: 600;
        padding: 10px !important;
    }

    .availability-table .day-header {
        font-size: 0.85rem;
        color: var(--text-color);
        opacity: 0.8;
        padding: 8px !important;
    }

    .availability-table tbody tr {
        border-bottom: 1px solid var(--secondary-color);
        transition: background 0.2s;
    }

    .availability-table tbody tr:hover {
        background: var(--secondary-color);
    }

.teacher-cell {
  padding: 15px 20px;
  position: sticky;
  left: 0;
  z-index: 5;
  border-right: 2px solid var(--secondary-color);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
    .availability-table tbody tr:hover .teacher-cell {
        background: var(--secondary-color);
    }

    .teacher-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        color: var(--text-color);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .teacher-details {
        flex: 1;
    }

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

    .teacher-meta {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .badge-ambulant {
        background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
        color: var(--text-color);
    }

    .badge-school {
        background: #e0e7ff;
        color: #4338ca;
    }

    .availability-cell {
        padding: 8px;
        text-align: center;
        position: relative;
        cursor: pointer;
    }

    .availability-dot {
        width: 12px;
        height: 12px;
        margin: 0 auto;
        border-radius: 50%;
        transition: all 0.3s;
    }

    .availability-dot:hover {
        transform: scale(1.5);
        box-shadow: 0 0 0 8px rgba(0,0,0,0.05);
    }

    .available .availability-dot {
        background: #2ecc71;
        box-shadow: 0 2px 4px rgba(46, 204, 113, 0.3);
    }

    .unavailable .availability-dot {
        background: #e74c3c;
        box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
    }

    .partial .availability-dot {
        background: #f39c12;
        box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
    }

    .date-tooltip {
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: #333;
        color: var(--text-color);
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 0.8rem;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
        z-index: 100;
    }

    .availability-cell:hover .date-tooltip {
        opacity: 1;
    }

    .legend-dot.legend-available {
        background: #2ecc71;
    }

    .legend-dot.legend-unavailable {
        background: #e74c3c;
    }

    .legend-dot.legend-partial {
        background: #f39c12;
    }

    .filter-row {
        display: flex;
        gap: 15px;
        align-items: center;
        flex-wrap: wrap;
    }

    .filter-label {
        font-weight: 600;
        color: var(--text-color);
        font-size: 0.9rem;
    }

    .filter-select {
        padding: 8px 15px;
        border: 2px solid #ddd;
        border-radius: 6px;
        background: var(--bg-color);
        color: var(--text-color);
        cursor: pointer;
        font-size: 0.9rem;
    }

    /* Button styles removed - using main .btn definition */

    /* Dark mode adjustments */

    body.dark .availability-card {
        background: #1a1a1a;
    }


    body.dark .availability-table tbody tr:hover .teacher-cell {
        background: var(--surface-2);
    }

    body.dark .filter-section {
        background: #1a1a1a;
    }

    body.dark .filter-select {
        background: #2a2a2a;
        border-color: #444;
    }

    body.dark .badge-school {
        background: #4338ca;
        color: #e0e7ff;
    }

.step-card {
        border-left: 4px solid var(--success-color);
        margin-bottom: 15px;
        transition: all 0.3s ease;
        background: var(--surface-1);
        border-radius: 4px;
        border: 1px solid var(--border-color);
    }
    .step-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .flow-arrow {
        text-align: center;
        color: var(--success-color);
        font-size: 24px;
        margin: 10px 0;
    }
    .step-content {
        display: flex;
        align-items: flex-start;
    }
    .step-details {
        flex: 1;
    }
    /* Custom styling that inherits from main theme */

    .alert ul {
        margin-bottom: 0;
        padding-left: 1.5rem;
    }
.alert-info {
  background: var(--info-bg);
  color: #0c5460;
  border-left: 4px solid var(--info-color);
  background-color: #d1ecf1;
  border-color: #bee5eb;
}
    .alert-warning {
        background: var(--warning-bg);
        color: var(--warning-color);
        border-left: 4px solid var(--warning-color);
    }
    .alert-success {
        background: var(--success-bg);
        color: var(--success-color);
        border-left: 4px solid var(--success-color);
    }
    .alert-light {
        background: var(--surface-2);
        color: var(--text-color);
        border: 1px solid var(--border-color);
    }

    .card-header.bg-primary {
        background: var(--primary-color);
        color: var(--text-color);
    }

.table th {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--text-color);
}
    .table-responsive {
        overflow-x: auto;
    }

    .table-light {
        background: var(--surface-2);
    }
    .table-sm td, .table-sm th {
        padding: 0.5rem;
    }
    .sticky-top {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--surface-2);
    }

    .bg-opacity-10 {
        opacity: 0.1;
    }
    /* Button styles removed - using main .btn definition */
    .btn-warning {
        background: var(--warning-color);
        color: var(--text-color);
        border: 2px solid var(--warning-color);
        padding: 6px 14px; /* Reduced by 2px to compensate for 2px border */
    }
    .btn-warning:hover {
        opacity: 0.9;
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

    .btn-close {
        background: transparent;
        border: none;
        font-size: 1.5rem;
        line-height: 1;
        color: var(--text-muted, #5f5d59);
        cursor: pointer;
        padding: 0;
    }
    .btn-close-white {
        filter: brightness(0) invert(1);
    }
    .w-100 {
        width: 100%;
    }
    .text-white {
        color: white !important;
    }

    .me-3 {
        margin-right: 1rem;
    }

    .mb-0 {
        margin-bottom: 0;
    }

    .align-items-start {
        align-items: flex-start;
    }

    .flex-grow-1 {
        flex-grow: 1;
    }
    .row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -0.75rem;
        margin-left: -0.75rem;
    }
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }
    .col-md-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }
    .offset-md-1 {
        margin-left: 8.333333%;
    }
    .bi {
        display: inline-block;
        vertical-align: -0.125em;
    }
    .bi-envelope::before { content: "✉️"; }
    .bi-info-circle::before { content: "ℹ️"; }
    .bi-diagram-3::before { content: "📊"; }
    .bi-eye::before { content: "👁️"; }
    .bi-flask::before { content: "🧪"; }
    .bi-send::before { content: "📤"; }
    .bi-send-check::before { content: "✅"; }
    .bi-envelope-fill::before { content: "📧"; }
    .bi-arrow-left::before { content: "←"; }
    .bi-clock::before { content: "🕐"; }

    /* Modal styles */

    .modal-dialog.modal-lg {
        max-width: 800px;
    }

.import-preview-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 20px;
    }

    .preview-header {
        background: linear-gradient(135deg, rgba(52, 152, 219, 0.85), rgba(46, 204, 113, 0.85));
        color: var(--text-color);
        padding: 30px;
        border-radius: 12px;
        margin-bottom: 30px;
        text-align: center;
    }

    .preview-header h1 {
        margin: 0 0 10px 0;
        font-size: 2rem;
    }

    .preview-header p {
        margin: 0;
        opacity: 0.95;
        font-size: 1.1rem;
    }

    .preview-table-container {
        background: var(--bg-color);
        border-radius: 12px;
        box-shadow: var(--shadow-md);
        overflow-x: auto;  /* Allow horizontal scroll if needed */
        overflow-y: visible;  /* Allow tooltips to overflow vertically */
    }

    .table-header {
        background: var(--surface-2);
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .table-header h2 {
        margin: 0;
        font-size: 1.3rem;
        color: var(--text-color);
    }

    .preview-table {
        width: 100%;
        border-collapse: collapse;
    }

    .preview-table th {
        background: var(--surface-2);
        padding: 12px;
        text-align: left;
        font-weight: 600;
        color: var(--text-color);
        border-bottom: 2px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .preview-table td {
        padding: 10px 12px;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-color);
        position: relative;  /* For tooltip positioning */
    }

    /* Allow overflow for cells containing tooltips */
    .preview-table td:first-child {
        overflow: visible;
    }

    .preview-table tbody tr:hover {
        background: var(--surface-1);
    }

    .preview-table input[type="text"],
    .preview-table input[type="email"],
    .preview-table input[type="tel"] {
        width: 100%;
        padding: 6px 10px;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        background: var(--bg-color);
        color: var(--text-color);
        font-size: 0.9rem;
    }

    .preview-table input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
    }

    .preview-table input.error {
        border-color: var(--danger-color);
        background: rgba(255, 0, 0, 0.05);
    }

    .whatsapp-input {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .whatsapp-input input {
        flex: 1;
    }

    .whatsapp-indicator {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        flex-shrink: 0;
    }

    .whatsapp-indicator.valid {
        background: rgba(46, 204, 113, 0.2);
        color: var(--success-color);
    }

    .whatsapp-indicator.invalid {
        background: rgba(231, 76, 60, 0.2);
        color: var(--danger-color);
    }

    .action-column {
        text-align: center;
    }

    .remove-btn {
        background: transparent;
        border: none;
        color: var(--danger-color);
        cursor: pointer;
        font-size: 1.2rem;
        padding: 5px;
        border-radius: 4px;
        transition: all 0.2s;
    }

    .remove-btn:hover {
        background: var(--surface-2);
        x-transform: scale(1.1);
    }

    .validation-errors {
        background: var(--danger-bg);
        border: 1px solid var(--danger-color);
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 20px;
        color: var(--danger-color);
    }

    .validation-errors h3 {
        margin: 0 0 10px 0;
        font-size: 1.1rem;
    }

    .validation-errors ul {
        margin: 0;
        padding-left: 20px;
    }

    .btn-group {
        display: flex;
        gap: 10px;
    }

    /* Button styles removed - using main .btn definition */

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

    .row-error {
        background: rgba(231, 76, 60, 0.05) !important;
    }

    .row-error td {
        opacity: 0.8;
    }

    .row-warning {
        background: rgba(243, 156, 18, 0.05) !important;
    }

    .row-warning td {
        text-decoration: line-through;
        opacity: 0.6;
    }

    .row-warning input {
        text-decoration: none !important;
        opacity: 1 !important;
    }

    .tooltip {
        position: relative;
        display: inline-block;
    }

    .tooltip .tooltiptext {
        visibility: hidden;
        width: 220px;
        background-color: rgba(0, 0, 0, 0.9);  /* Dark background for better contrast */
    }

    /* Add arrow pointing down to the element */
    .tooltip .tooltiptext::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
    }

    .tooltip:hover .tooltiptext {
        visibility: visible;
    }

    .existing-indicator {
        display: inline-block;
        background: var(--warning-bg);
        color: var(--warning-color);
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        margin-left: 5px;
        font-weight: 600;
    }

    .skip-notice {
        display: inline-block;
        background: rgba(243, 156, 18, 0.2);
        color: var(--warning-color);
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        margin-left: 5px;
        font-weight: 600;
    }

    .duplicate-indicator {
        display: inline-block;
        background: var(--danger-bg);
        color: var(--danger-color);
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        margin-left: 5px;
        font-weight: 600;
    }

    /* Spinner animation */
    .spinner-border {
        display: inline-block;
        width: 1rem;
        height: 1rem;
        vertical-align: text-bottom;
        border: 0.25em solid currentColor;
        border-right-color: transparent;
        border-radius: 50%;
        animation: spinner-border 0.75s linear infinite;
    }

    .spinner-border-sm {
        width: 0.875rem;
        height: 0.875rem;
        border-width: 0.2em;
    }

    @keyframes spinner-border {
        to { transform: rotate(360deg); }
    }
.profile-section {
    background: var(--surface-1);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.profile-section h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-item label {
  font-weight: 600;
  color: #666;
  font-size: 0.875rem;
  min-width: 140px;
  margin-right: 15px;
}
.consent-status.granted {
    color: #10b981;
}

.consent-status.denied {
    color: #ef4444;
}

.availability-item, .deployment-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.status.available {
    color: #10b981;
}

.status.unavailable {
    color: #ef4444;
}

.form-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.info-item:last-child {
  border-bottom: none;
}
.edit-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.edit-link:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: var(--text-color);
}

.edit-icon {
    font-size: 0.875rem;
}

.teacher-detail-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }

.subtitle {
  color: #7f8c8d;
  font-size: 16px;
  margin-top: 5px;
  display: block;
}
    /* Removed duplicate .detail-grid - using the one in TEACHER DETAIL PAGE section */

    .detail-section {
        background: var(--bg-color);
        padding: 25px;
        border-radius: 8px;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border-color);
    }

    .detail-section.full-width {
        grid-column: 1 / -1;
    }

    /* Teacher info card spans 2 columns on desktop */
    .teacher-info-card {
        grid-column: span 2;
    }

    .detail-section h2 {
        margin-top: 0;
        margin-bottom: 20px;
        color: var(--text-color);
        font-size: 1.3rem;
        border-bottom: 2px solid var(--border-color);
        padding-bottom: 10px;
    }

    .detail-section h3 {
        margin-top: 20px;
        margin-bottom: 15px;
        color: var(--text-muted);
        font-size: 1.1rem;
    }

    .info-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .info-item span {
        color: var(--text-color);
    }

    .color-badge {
        display: inline-block;
        width: 60px;
        height: 24px;
        border-radius: 4px;
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
    }

    .qualifications-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .qualification-item {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .activity-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 10px;
    }

    .activity-table th {
        background: #f8f9fa;
        padding: 10px;
        text-align: left;
        font-weight: 600;
        color: #666;
        border-bottom: 2px solid #dee2e6;
    }

    .activity-table td {
        padding: 10px;
        border-bottom: 1px solid #f0f0f0;
    }

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

    .notes-content {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 6px;
        color: #333;
        line-height: 1.6;
    }

.legal-container h2 {
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.5rem;
  text-transform: uppercase;
}
.legal-container h3 {
  color: var(--text-dark);
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.2rem;
}
.legal-container h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.legal-container ul {
  margin-left: 20px;
  margin-bottom: 15px;
}
.legal-container li {
  margin-bottom: 5px;
}
.legal-container a {
  color: var(--primary-color);
  text-decoration: none;
}
.legal-container a:hover {
  text-decoration: underline;
}
.legal-download {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.legal-container table {
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cookie-settings {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Pending Invitations Section */
.pending-invitations-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 243, 224, 0.3), rgba(255, 237, 199, 0.3));
    border: 2px solid var(--warning-color, #f0ad4e);
    border-radius: 12px;
}

.invitation-icon {
    font-size: 1.75rem;
}

/* Invitation Grid */
.invitation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Invitation Card */
.invitation-card {
    background: var(--surface-1);
    border: 2px solid var(--warning-color, #f0ad4e);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.invitation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(240, 173, 78, 0.2);
}

.invitation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--warning-color, #f0ad4e), #f5b968);
    color: var(--text-color);
}

.invitation-badge {
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.invitation-date {
    font-size: 0.875rem;
}

.invitation-body {
    padding: 1.5rem;
}

.invitation-group-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.invitation-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.invitation-details {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--surface-2);
    border-radius: 8px;
}

.invitation-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.invitation-detail:last-child {
    margin-bottom: 0;
}

.detail-school {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.invitation-message {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-2);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    font-style: italic;
}

.invitation-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--surface-2);
    border-top: 1px solid var(--border-color);
}

.invitation-actions .btn {
    flex: 1;
    font-size: 0.875rem;
}

/* Section Divider */
.section-divider {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid var(--border-color);
}

/* Responsive adjustments */

/* Dark mode adjustments */
body.dark .status-card {
    background: var(--surface-2);
    border-color: var(--border-color);
}

body.dark .status-card.status-success {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(74, 222, 128, 0.05));
}

body.dark .status-card.status-info {
    background: linear-gradient(135deg, rgba(139, 157, 195, 0.1), rgba(139, 157, 195, 0.05));
}

body.dark .settings-section {
    background: var(--surface-2);
    border-color: var(--border-color);
}

body.dark .option-card {
    background: var(--surface-1);
}

body.dark .preference-item {
    background: var(--surface-1);
}

body.dark .time-selector {
    background: var(--surface-2);
}

body.dark .quick-link-card {
    background: var(--surface-1);
}

/* Modern Settings Page Styles */
.status-banner {
    margin-bottom: 2rem;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--surface-1);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-card.status-success {
    background: linear-gradient(135deg, var(--success-bg), rgba(46, 125, 94, 0.05));
    border-left: 4px solid var(--success-color);
}

.status-card.status-info {
    background: linear-gradient(135deg, var(--info-bg), rgba(91, 107, 138, 0.05));
    border-left: 4px solid var(--info-color);
}

.status-icon {
    flex-shrink: 0;
    font-size: 2.5rem;
}

.status-content {
    flex: 1;
}

.status-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.status-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Settings Sections */
.settings-section {
    background: var(--surface-1);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.section-header {
    padding: 1.25rem 1.5rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-color);
}

.section-icon {
    font-size: 1.5rem;
}

.section-content {
    padding: 1.5rem;
}

.section-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Channel Options */
.channel-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.channel-option {
    display: block;
    cursor: pointer;
}

.channel-option input[type="radio"] {
    display: none;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: var(--bg-color);
}

.channel-option input[type="radio"]:checked + .option-card {
    border-color: var(--primary-color);
    background: var(--primary-soft);
}

.option-icon {
    font-size: 1.5rem;
}

.option-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.option-content small {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Preference Items */
.preference-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preference-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: var(--surface-2);
}

.preference-toggle {
    flex-shrink: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-light);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--success-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.preference-info {
    flex: 1;
}

.preference-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.preference-icon {
    font-size: 1.25rem;
}

.preference-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.time-selector {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.time-icon {
    font-size: 1.25rem;
}

.time-input {
    max-width: 150px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.time-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring);
    background: var(--surface-1);
}

/* Style the time input for better browser compatibility */
.time-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    /* Use brightness instead of invert for better control */
    filter: brightness(0.4);
}

.time-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Ensure clock icon is visible in dark mode */
body.dark .time-input::-webkit-calendar-picker-indicator {
    /* Brighten the icon in dark mode */
    filter: brightness(1.5);
    opacity: 0.8;
}

/* Test Buttons */
.test-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.test-button-wrapper {
    flex: 1;
    min-width: 180px;
    max-width: 250px;
}

.test-button-wrapper .btn {
    width: 100%;
    justify-content: center;
}

.test-form {
    display: contents;
}

.btn-icon {
    font-size: 1.25rem;
}

.test-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Page Header with Actions */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

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

.header-actions .btn {
    white-space: nowrap;
}

/* Quick Links */
.quick-links {
    display: grid;
    gap: 1rem;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-2);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.quick-link-card:hover {
    background: var(--surface-3);
    transform: translateX(4px);
    text-decoration: none;
    color: inherit;
}

.quick-link-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 8px;
}

.quick-link-content {
    flex: 1;
}

.quick-link-content h5 {
    margin: 0 0 0.25rem 0;
    color: var(--text-color);
}

.quick-link-content small {
    color: var(--text-muted);
}

.quick-link-arrow {
    color: var(--text-light);
    font-size: 1.25rem;
}

/* Info Message */

.info-icon {
    font-size: 1.5rem;
}

.info-content p {
    margin: 0;
}

/* Form Actions */

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Responsive */

/* Week toggle styling */
  .week-toggle-section {
    background: var(--surface-1, #fff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .week-toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 28px;
  }

  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
  }

  .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
  }

  input:checked + .slider {
    background-color: var(--primary-color, #3498db);
  }

  input:checked + .slider:before {
    transform: translateX(32px);
  }

  /* Week tabs */
  .week-tabs {
    display: none;
    margin-bottom: 20px;
  }

  .week-tabs.active {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .week-tab {
    padding: 10px 20px;
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    background: var(--surface-1, #fff);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
  }

  .week-tab:hover {
    background: var(--secondary-bg, #f8f9fa);
  }

  .week-tab.active {
    background: var(--primary-color, #3498db);
    color: var(--text-color);
    border-color: var(--primary-color, #3498db);
  }

  .week-copy-btn {
    margin-left: auto;
    padding: 8px 16px;
    background: var(--secondary-color, #6c757d);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
  }

  .week-copy-btn:hover {
    background: var(--secondary-dark, #5a6268);
  }

  /* Collapsible teacher panel */

  .teachers-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
  }

  .teachers-panel-header h5 {
    margin: 0;
  }

  .collapse-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s;
    color: var(--text-color, #333);
  }

  .teachers-panel.collapsed .collapse-btn {
    transform: rotate(-90deg);
  }

  .teachers-panel.collapsed .teachers-grid {
    display: none;
  }

  /* Schedule cells with autocomplete */

  .teacher-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 4px;
    font-size: 14px;
  }

  .teacher-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  }

  /* Autocomplete dropdown */

  .autocomplete-item:hover,
  .autocomplete-item.selected {
    background: var(--primary-light, #e3f2fd);
  }

  /* Teacher card in schedule */

  /* Dark mode adjustments */
  body.dark .teachers-panel {
    background: #1a1a1a;
    border-color: #333;
  }

  body.dark .teachers-grid {
    background: #2a2a2a;
  }

  body.dark .schedule-cell {
    background: #1a1a1a;
    border-color: #333;
  }

  body.dark .teacher-input {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
  }

  body.dark .autocomplete-item:hover,
  body.dark .autocomplete-item.selected {
    background: #333;
  }

/* Form styling */

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.form-label.required::after {
    content: " *";
    color: var(--danger-color);
}

/* Ensure Django form widgets have proper styling */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--surface-1);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Checkbox styling */

.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
}

.form-checkbox label {
    flex: 1;
    cursor: pointer;
}

.checkbox-help {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: normal;
    margin-top: 0.25rem;
}

/* Form actions */

/* Responsive adjustments */

/* Warning card styling */
.warning-card {
    border: 2px solid var(--warning-color);
    background: var(--surface-1);
}

.warning-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.warning-title {
    color: var(--danger-color);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Delete details */
.delete-details {
    background: var(--surface-2);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

/* Warning message */
.warning-message {
    margin: 1.5rem 0;
}

.warning-message h3 {
    color: var(--danger-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.warning-message ul {
    margin-left: 1.5rem;
    color: var(--text-color);
}

.warning-message li {
    margin-bottom: 0.5rem;
}

.extra-warning {
    background: rgba(var(--warning-rgb), 0.1);
    border: 1px solid var(--warning-color);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Delete form */
.delete-form {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

/* Danger button styling */

/* Responsive */

/* Tab Navigation */
.comm-tabs-container {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
    padding: 0;
}

.comm-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0;
}

.comm-tab {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    position: relative;
    margin-bottom: -1px;
}

.comm-tab:hover {
    color: var(--primary-color);
    background: var(--surface-hover);
}

.comm-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
    font-weight: 600;
}

.comm-tab i {
    font-size: 0.95rem;
    opacity: 0.8;
}

.comm-tab:hover i,
.comm-tab.active i {
    opacity: 1;
}

.comm-tab .tab-count {
    background: var(--surface-3);
    color: var(--text-muted);
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.comm-tab.active .tab-count {
    background: var(--primary-soft);
    color: var(--primary-color);
}

/* Tab Panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Settings Cards - Refined calm style with consistent collapsing */
.settings-card {
    background: var(--surface-1);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.15s ease;
    margin-bottom: 1.5rem;
}

.settings-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    border-color: var(--border-color);
}

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

.settings-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.settings-card-header h3 i {
    color: var(--primary-color);
    font-size: 0.9rem;
    opacity: 0.7;
}

.settings-card-header.collapsible {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.settings-card-header.collapsible::after {
    content: '▼';
    position: absolute;
    right: 1.25rem;
    transition: transform 0.2s ease;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.settings-card.collapsed .settings-card-header.collapsible::after {
    transform: rotate(-90deg);
}

.settings-card-header.collapsible:hover {
    background: var(--surface-3);
}

.settings-card-body {
    padding: 1.5rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.settings-card.collapsed .settings-card-body {
    max-height: 0;
    padding: 0 1.5rem;
}

/* Channel Selector */
.channel-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.channel-option input[type="radio"] {
    display: none;
}

.channel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--surface-2);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.channel-option input[type="radio"]:checked + .channel-card {
    background: var(--primary-soft);
    border-color: var(--primary-color);
}

.channel-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.channel-card:hover i,
.channel-option input[type="radio"]:checked + .channel-card i {
    opacity: 1;
}

.channel-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.channel-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.setting-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-3);
    border-radius: 24px;
    transition: var(--transition-fast);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.setting-switch input:checked + .switch-slider {
    background: var(--primary-color);
}

.setting-switch input:checked + .switch-slider:before {
    transform: translateX(24px);
}

.setting-info {
    flex: 1;
}

.setting-label {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.setting-label i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.setting-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.time-input-inline,
.number-input-inline {
    display: inline-block;
    width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0 0.25rem;
}

/* Make clock icon visible for inline time inputs in both themes */
.time-input-inline::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    /* Use brightness for better control */
    filter: brightness(0.4);
}

.time-input-inline::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Dark mode adjustments for inline time input */
body.dark .time-input-inline::-webkit-calendar-picker-indicator {
    /* Brighten the icon in dark mode */
    filter: brightness(1.5);
    opacity: 0.8;
}

/* Advanced Settings */

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section h4 i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.settings-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Settings Dividers and Organization */
.settings-divider {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: var(--surface-2);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-divider i {
    font-size: 1.1rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.settings-divider strong {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.settings-divider small {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* Personal Settings Section */
.personal-settings {
    background: rgba(59, 130, 246, 0.03);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* School-wide Settings Section */
.school-settings {
    background: rgba(34, 197, 94, 0.03);
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Advanced Settings - Collapsible */
.advanced-settings {
    background: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.advanced-settings-header {
    padding: 1rem 1.5rem;
    background: rgba(239, 68, 68, 0.05);
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.advanced-settings-header:hover {
    background: rgba(239, 68, 68, 0.08);
}

.advanced-settings-header h3 {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.advanced-settings-header .collapse-arrow {
    transition: transform 0.2s ease;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.advanced-settings.collapsed .collapse-arrow {
    transform: rotate(-90deg);
}

.advanced-settings-body {
    padding: 1.5rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.advanced-settings.collapsed .advanced-settings-body {
    max-height: 0;
    padding: 0 1.5rem;
}

.setting-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-input-group label {
    font-weight: 500;
    font-size: 0.875rem;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-unit {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Teacher Management */
.teacher-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Modern Table */
.modern-table-container {
    background: var(--surface-1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: var(--surface-2);
}

.modern-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.modern-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.modern-table tbody tr:hover {
    background: var(--surface-2);
}

.modern-table td {
    padding: 1rem;
}

.teacher-school {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.phone-number {
    font-family: monospace;
}

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

.status-inactive {
    background: var(--surface-2);
    color: var(--text-muted);
}

.btn-icon:hover {
    background: var(--primary-soft);
    border-color: var(--surface-1);
    color: var(--text-muted);
}

/* Activity Timeline - Fixed overlapping icons */
.activity-timeline {
    position: relative;
    padding-left: 4rem;
    max-width: 900px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 1rem;
    bottom: 1rem;
    width: 2px;
    background: var(--border-light);
    opacity: 0.5;
}

.activity-timeline .timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

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

.activity-timeline .timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--surface-1);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    z-index: 2;
}

.activity-timeline .timeline-marker i {
    font-size: 0.75rem;
}

.timeline-marker.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    border-color: #25d366;
    color: #25d366;
}

.timeline-marker.email {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.timeline-marker.sent {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.timeline-content {
    background: var(--surface-1);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.timeline-type {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.timeline-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.timeline-info > span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    transition: all var(--transition-fast);
}

.btn-text:hover {
    text-decoration: underline;
}

/* Form Actions */

/* Responsive */

.log-detail-content { font-size: 0.875rem; }

                .detail-row strong { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.025em; }

  .btn-outline-secondary {
    color: var(--text-muted, #6c757d);
    border-color: var(--text-muted, #6c757d);
    background: transparent;
    border: 2px solid;
  }

  .btn-outline-secondary:hover {
    background-color: var(--text-muted, #6c757d);
    border-color: var(--text-muted, #6c757d);
    color: var(--text-color);
    transform: translateY(-1px);
  }

  .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background: transparent;
  }

  .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: var(--text-color);
    transform: translateY(-1px);
  }

  /* Ensure button groups have proper styling */
  .btn-group .btn {
    border-radius: 0;
  }

  .btn-group .btn:first-child {
    border-radius: 0.25rem 0 0 0.25rem;
  }

  .btn-group .btn:last-child {
    border-radius: 0 0.25rem 0.25rem 0;
  }

  /* Group letter buttons styling */
  .group-letter-btn {
    min-width: 40px;
    font-weight: 600;
  }

  .group-letter-btn.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-color) !important;
  }

  /* Teacher badge styling */
  .teacher-badge,

  /* Card styling */

  /* Table styling */

  .table thead th {
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
  }

  /* Badge styling */

  /* Alert styling */

  /* Dark mode adjustments */
  body.dark .btn-outline-primary,
  body.dark .btn-outline-secondary,
  body.dark .btn-outline-danger {
    border-width: 2px;
  }

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

  body.dark .card {
    background-color: var(--surface-1);
    border-color: var(--border-color);
  }

  body.dark .table-hover tbody tr:hover {
    background-color: rgba(255,255,255,0.05);
  }

  body.dark .modal-content {
    background-color: var(--surface-1);
    color: var(--text-color);
  }

  body.dark .modal-header {
    border-bottom-color: var(--border-color);
  }

  body.dark .modal-footer {
    border-top-color: var(--border-color);
  }

  body.dark .form-control {
    background-color: var(--surface-2);
    border-color: var(--border-color);
    color: var(--text-color);
  }

  body.dark .alert-info {
    background-color: #1a3d4a;
    border-color: #2a5d6a;
    color: #7dd8e8;
  }

  body.dark .alert-warning {
    background-color: #4a3a1a;
    border-color: #6a5a2a;
    color: #e8d87d;
  }

  /* Toast notification styles */
  .toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
  }

  @keyframes slideIn {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
}
    .toast-icon {
    font-size: 24px;
    flex-shrink: 0;
  }

  .toast-content {
    flex: 1;
  }

  .toast-title {
    font-weight: 600;
    margin-bottom: 4px;
  }

  .toast-message {
    font-size: 14px;
    line-height: 1.4;
  }

  .toast-close {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
  }

  .toast-close:hover {
    opacity: 1;
  }

  .toast-notification.fade-out {
    opacity: 0;
    transform: translateX(100%);
  }

  /* Dark mode toast adjustments */
  body.dark .toast-notification {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }

        .header h1 {
            color: #4CAF50;
            margin: 0;
            font-size: 28px;
        }
.content {
  margin-bottom: 30px;
}
        .invitation-box {
            background-color: #f0f8ff;
            border-left: 4px solid #4CAF50;
            padding: 20px;
            margin: 20px 0;
            border-radius: 4px;
        }
        .invitation-box h2 {
            margin-top: 0;
            color: #2c5282;
        }
        .details {
            background-color: var(--bg-color);
            padding: 15px;
            border-radius: 4px;
            margin: 20px 0;
        }
        .details p {
            margin: 8px 0;
        }
        .details strong {
            color: #2c5282;
        }
        /* Button styles removed - using main .btn definition */
        .center {
            text-align: center;
        }

        .warning {
            background-color: #fff3cd;
            border-left: 4px solid #ffc107;
            padding: 10px;
            margin: 20px 0;
            border-radius: 4px;
        }
        .emoji {
            font-size: 20px;
            margin-right: 5px;
        }

        .alert-icon {
            display: inline-block;
            margin-right: 10px;
            font-size: 28px;
        }

.info-row {
  margin: 10px 0;
}
.label {
  font-weight: bold;
  color: #666;
  display: inline-block;
  width: 120px;
}
.value {
  color: #333;
}
        .status-replacement {
            background-color: #fff3cd;
            color: #856404;
            border: 1px solid #ffc107;
        }
        .status-no-replacement {
            background-color: #d1ecf1;
            color: #0c5460;
            border: 1px solid #17a2b8;
        }

.greeting {
  font-size: 18px;
  margin-bottom: 20px;
  color: #2c3e50;
  font-weight: 500;
}
        .intro-section {
            background: var(--primary-color);
            color: var(--text-color);
            padding: 25px;
            border-radius: 8px;
            margin: 25px 0;
        }
        .intro-section h2 {
            margin-top: 0;
            font-size: 22px;
        }
        .intro-section p {
            margin-bottom: 0;
            line-height: 1.7;
        }
.benefits {
  background-color: #f8f9fa;
  border-left: 4px solid #28a745;
  padding: 15px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
}
.benefits h3 {
  margin-top: 0;
  color: #28a745;
  font-size: 20px;
}
.benefits ul {
  margin: 10px 0;
  padding-left: 20px;
}
        .benefits li {
            margin: 10px 0;
            line-height: 1.6;
        }
        .benefits li strong {
            color: #2c3e50;
        }
        .how-it-works {
            background-color: #e8f5e9;
            border-radius: 8px;
            padding: 25px;
            margin: 25px 0;
        }
        .how-it-works h3 {
            color: #2e7d32;
            margin-top: 0;
            font-size: 20px;
        }
        .work-step {
            display: flex;
            align-items: flex-start;
            margin: 15px 0;
        }
        .work-step-icon {
            background-color: #2e7d32;
            color: var(--text-color);
            width: 35px;
            height: 35px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-right: 15px;
            flex-shrink: 0;
        }
        .cta-section {
            background-color: #f0f2f5;
            border-radius: 8px;
            padding: 30px;
            margin: 30px 0;
            text-align: center;
        }
.cta-button {
  display: inline-block;
  padding: 15px 30px;
  background-color: #25D366;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
  box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  background: var(--primary-color);
}
.cta-button:hover {
  background-color: #1fb855;
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}
.steps {
  background-color: #f0f2f5;
  border: 2px solid #25D366;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}
.steps h3 {
  margin-top: 0;
  color: #2c3e50;
  font-size: 20px;
}
.privacy-note {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  padding: 10px;
  margin: 20px 0;
  font-size: 14px;
}
        .privacy-note strong {
            color: #856404;
        }

.footer a {
  color: #667eea;
  text-decoration: none;
}


        .verification-box {
            background: var(--primary-color);
            color: var(--text-color);
            padding: 25px;
            border-radius: 8px;
            margin: 25px 0;
            text-align: center;
        }
        .verification-box h2 {
            margin: 0 0 15px 0;
            font-size: 24px;
        }

        .warning-box {
            background-color: #fff3cd;
            border: 1px solid #ffc107;
            border-radius: 4px;
            padding: 15px;
            margin: 20px 0;
        }
        .warning-box p {
            margin: 5px 0;
            color: #856404;
        }
        .url-display {
            background-color: #f0f2f5;
            padding: 10px;
            border-radius: 4px;
            word-break: break-all;
            font-family: monospace;
            font-size: 12px;
            color: #666;
            margin: 15px 0;
        }



        .highlight-box {
            background-color: #d4edda;
            border: 1px solid #c3e6cb;
            border-radius: 6px;
            padding: 15px;
            margin: 20px 0;
        }
        .highlight-box h3 {
            margin-top: 0;
            color: #155724;
        }

.action-required {
  background-color: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 4px;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
  font-weight: bold;
}
        .action-required strong {
            color: #1565c0;
        }

        .welcome-banner {
            background: var(--primary-color);
            color: var(--text-color);
            padding: 25px;
            border-radius: 8px;
            margin: 25px 0;
            text-align: center;
        }
        .welcome-banner h2 {
            margin: 0;
            font-size: 24px;
        }
        .account-info {
            background-color: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            margin: 25px 0;
        }
        .account-info h3 {
            color: #2c3e50;
            margin-top: 0;
        }

        .next-steps h3 {
            margin-top: 0;
            color: #28a745;
        }
        .step-list {
            margin: 15px 0;
            padding-left: 0;
            list-style: none;
        }
        .step-list li {
            display: flex;
            align-items: flex-start;
            margin: 12px 0;
        }

        .button-container {
            text-align: center;
            margin: 30px 0;
        }
        .features {
            background-color: #f0f2f5;
            border-radius: 8px;
            padding: 25px;
            margin: 25px 0;
        }
        .features h3 {
            color: #2c3e50;
            margin-top: 0;
        }
        .feature-item {
            display: flex;
            align-items: flex-start;
            margin: 15px 0;
        }

        .support-section {
            background-color: #fff3cd;
            border: 1px solid #ffc107;
            border-radius: 4px;
            padding: 20px;
            margin: 25px 0;
        }
        .support-section h4 {
            color: #856404;
            margin-top: 0;
        }



        .recovery-icon {
            display: inline-block;
            margin-right: 10px;
            font-size: 28px;
        }

        .action-note {
            background-color: #fff3cd;
            border: 1px solid #ffc107;
            border-radius: 4px;
            padding: 15px;
            margin: 20px 0;
        }
        .action-note-title {
            font-weight: bold;
            color: #856404;
            margin-bottom: 5px;
        }

        .header-critical {
            background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
        }
        .header-high {
            background: linear-gradient(135deg, #fd7e14 0%, #e67e22 100%);
        }
        .header-medium {
            background: linear-gradient(135deg, #ffc107 0%, #f39c12 100%);
        }
        .header-low {
            background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
        }

        .priority-icon {
            display: inline-block;
            margin-right: 10px;
            font-size: 28px;
        }
        .message-section {
            background-color: #f9f9f9;
            padding: 20px;
            margin: 20px 0;
            border-radius: 4px;
        }
        .message-section-critical {
            background-color: #f8d7da;
            border-left: 4px solid #dc3545;
        }
        .message-section-high {
            background-color: #fff3cd;
            border-left: 4px solid #fd7e14;
        }
        .message-section-medium {
            background-color: #fff3cd;
            border-left: 4px solid #ffc107;
        }
        .message-section-low {
            background-color: #d1ecf1;
            border-left: 4px solid #17a2b8;
        }
        .subject-line {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #e0e0e0;
        }

        .metadata {
            background-color: #f9f9f9;
            padding: 15px;
            margin: 20px 0;
            border-radius: 4px;
            font-size: 14px;
        }
        .metadata-row {
            margin: 5px 0;
        }
        .metadata-label {
            font-weight: bold;
            color: #666;
            display: inline-block;
            width: 100px;
        }
        .metadata-value {
            color: #333;
        }
        .priority-badge {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: bold;
            text-transform: uppercase;
        }
        .priority-critical {
            background-color: #dc3545;
            color: var(--text-color);
        }

        .priority-medium {
            background-color: #ffc107;
            color: #212529;
        }



        .urgent-badge {
            display: inline-block;
            background: #ff6b6b;
            color: var(--text-color);
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: bold;
            margin-bottom: 20px;
        }

        .whatsapp-section {
            background: #25D366;
            color: var(--text-color);
            padding: 25px;
            border-radius: 8px;
            margin: 30px 0;
            text-align: center;
        }
        .whatsapp-section h2 {
            margin: 0 0 15px 0;
            font-size: 20px;
        }
        .whatsapp-number {
            font-size: 28px;
            font-weight: bold;
            margin: 15px 0;
            display: block;
        }
        .whatsapp-icon {
            font-size: 48px;
            margin-bottom: 10px;
        }
        .response-instructions {
            background: #fff3cd;
            border: 2px solid #ffc107;
            padding: 20px;
            border-radius: 8px;
            margin: 20px 0;
        }
        .response-instructions h3 {
            color: #856404;
            margin-top: 0;
        }
        .response-option {
            background: white;
            padding: 12px;
            margin: 10px 0;
            border-radius: 4px;
            border: 1px solid #ffeaa7;
        }
        .response-option strong {
            color: #28a745;
        }
        .response-option.decline strong {
            color: #dc3545;
        }
        .note-section {
            background: #e3f2fd;
            border: 1px solid #90caf9;
            padding: 15px;
            border-radius: 4px;
            margin: 20px 0;
        }
        .note-section p {
            margin: 5px 0;
        }

        .footer-logo {
            font-weight: bold;
            color: #007bff;
        }

        .date-badge {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 14px;
            margin-top: 10px;
        }
        .section {
            margin: 25px 0;
            padding: 15px;
            background-color: #f9f9f9;
            border-radius: 8px;
        }
        .section h2 {
            margin-top: 0;
            font-size: 18px;
            color: #2c3e50;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .absent-list,
        .replacement-list,
        .unresolved-list {
            list-style: none;
            padding: 0;
            margin: 10px 0;
        }
        .absent-list li,
        .replacement-list li,
        .unresolved-list li {
            padding: 8px 12px;
            background: white;
            margin-bottom: 8px;
            border-radius: 6px;
            border-left: 3px solid;
        }
        .absent-list li {
            border-color: #f39c12;
        }
        .replacement-list li {
            border-color: #27ae60;
        }
        .unresolved-list li {
            border-color: #e74c3c;
        }

        .period {
            color: #7f8c8d;
            font-size: 14px;
        }
        .replacement-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .no-changes {
            background: #d4edda;
            border: 1px solid #c3e6cb;
            border-radius: 8px;
            padding: 15px;
            text-align: center;
            color: #155724;
        }
        .no-changes-icon {
            font-size: 32px;
            margin-bottom: 10px;
        }

/* ===============================================================
   TEACHER DETAIL PAGE - MOBILE OPTIMIZATIONS
   =============================================================== */

/* Teacher detail container layout */
.teacher-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.detail-section {
  background: var(--surface-1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.detail-section.full-width {
  grid-column: span 2;
}

/* Info list styling */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

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

.info-item label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Row/col layout for cards */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: -0.5rem;
}

.col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Section titles */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Week availability grid */
.week-availability-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

.day-availability {
  text-align: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.day-availability.available {
  background: var(--success-bg);
  border-color: var(--success-color);
}

.day-availability.unavailable {
  background: var(--danger-bg);
  border-color: var(--danger-color);
}

.day-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.day-date {
  font-size: 0.875rem;
  color: var(--text-color);
  margin: 0.25rem 0;
}

.availability-status {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

/* Activity tables */
.activity-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.activity-table thead {
  background: var(--surface-2);
}

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

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

/* Notes content */
.notes-content {
  background: var(--surface-2);
  padding: 1rem;
  border-radius: 0.5rem;
  line-height: 1.6;
}

/* ===============================================================
   TEACHER DETAIL - MOBILE SPECIFIC
   =============================================================== */

@media (max-width: 768px) {
  /* Prevent horizontal overflow */
  .main-content {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Adjust container padding */
  .teacher-detail-container {
    padding: 0;
    max-width: 100%;
    width: 100%;
  }

  /* Stack detail grid on mobile - more specific selector */
  .teacher-detail-container .detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-width: calc(100vw - 3.5rem); /* Viewport width minus margins */
  }

  /* Override inline grid-column styles for cards - use attribute selector for specificity */
  .teacher-detail-container .detail-grid > [style*="grid-column"],
  .teacher-detail-container .detail-grid > .card,
  .teacher-detail-container .detail-grid > .detail-section {
    grid-column: 1 / -1;
    max-width: calc(100vw - 3.5rem); /* Account for page margins */
    width: auto;
    margin: 0 0 1rem 0;
  }

  /* Ensure cards are responsive */
  .teacher-detail-container .card,
  .teacher-detail-container .detail-section {
    padding: 1rem;
    width: auto;
    max-width: 100%;
  }

  /* Stack row columns on mobile */
  .teacher-detail-container .row {
    display: flex;
    flex-direction: column;
    margin: 0;
    width: 100%;
  }

  .teacher-detail-container .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    padding: 0.5rem 0;
  }

  .card-header {
    padding: 0.75rem 1rem;
  }

  .card-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Info item layout for mobile */
  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.75rem 0;
  }

  .info-item label {
    min-width: auto;
    font-size: 0.875rem;
    color: var(--text-muted);
  }

  .info-item span {
    font-size: 0.95rem;
    margin-left: 0;
  }

  /* Section titles on mobile */
  .section-title {
    font-size: 0.95rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
  }

  .section-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  /* Week availability grid - make scrollable */
  .week-availability-grid {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .day-availability {
    flex: 0 0 80px;
    padding: 0.5rem;
  }

  .day-name {
    font-size: 0.75rem;
  }

  .day-date {
    font-size: 0.75rem;
  }

  .availability-status {
    font-size: 1rem;
  }

  /* Activity tables - make responsive */
  .activity-table {
    font-size: 0.875rem;
  }

  .activity-table thead {
    display: none;
  }

  .activity-table tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--surface-2);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
  }

  .activity-table td {
    display: block;
    padding: 0.25rem 0;
    border: none;
    position: relative;
    padding-left: 40%;
  }

  .activity-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 35%;
    font-weight: 600;
    color: var(--text-muted);
  }

  /* Add data labels for mobile (requires HTML update) */
  .activity-table tbody tr td:nth-child(1):before { content: "Datum:"; }
  .activity-table tbody tr td:nth-child(2):before { content: "Periode:"; }
  .activity-table tbody tr td:nth-child(3):before { content: "Status:"; }

  /* For deployment table */
  .activity-table:last-of-type tbody tr td:nth-child(2):before { content: "Klas:"; }
  .activity-table:last-of-type tbody tr td:nth-child(3):before { content: "Voor:"; }

  /* Badges in mobile view */
  .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  /* Deployment stats */
  .deployment-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
  }

  /* Notes section */
  .notes-content {
    font-size: 0.875rem;
    padding: 0.75rem;
  }

  /* Availability preferences link */
  .availability-preferences-link {
    margin-top: 1rem;
  }

  .availability-preferences-link .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .teacher-detail-container h1 {
    font-size: 1.3rem;
  }

  .teacher-detail-container .subtitle {
    font-size: 0.875rem;
  }

  /* Even more compact cards */
  .card,
  .detail-section {
    padding: 0.75rem;
    border-radius: 0.5rem;
  }

  .card-header {
    padding: 0.5rem 0.75rem;
  }

  .card-header h3 {
    font-size: 1rem;
  }

  .card-body {
    padding: 0.75rem;
  }

  /* Smaller availability grid items */
  .day-availability {
    flex: 0 0 65px;
    padding: 0.4rem;
  }

  /* Compact activity cards */
  .activity-table tbody tr {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }

  /* Smaller section headings */
  .detail-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .detail-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  /* Badge adjustments */
  .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }

  /* Color indicator on mobile */
  .info-item span[style*="background-color"] {
    margin-left: 0.5rem !important;
  }
}

/* Touch-friendly adjustments for teacher detail */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets */
  .availability-preferences-link .btn,
  .header-actions .btn,
  .badge {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Better spacing for touch */
  .day-availability {
    min-height: 60px;
  }

  .activity-table tbody tr {
    min-height: 60px;
  }
}

/* ===============================================================
   CONSOLIDATED MEDIA QUERIES
   Mobile-first approach with standardized breakpoints
   =============================================================== */

/* Mobile */
@media (max-width: 480px) {
  .header-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* Small Tablet */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .test-badge {
    display: inline-block;
    background-color: #ffc107;
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
  }
}

/* Tablet */
@media (max-width: 768px) {
  .main-navigation {
    transform: translateX(-100%);
    top: 60px;
    z-index: 101;
  }

  .main-navigation.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }

  .header-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .dashboard-grid,
  .grid-2,
  .grid-3,
  .grid-4,


  #calendar {
    font-size: 0.75rem;
    overflow-x: auto;
    display: block;
  }

  .hide-mobile {
    display: none;
  }

  .status-tabs {
    padding: 0.375rem;
    gap: 0.375rem;
  }

  .status-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .request-time {
    align-items: flex-start;
  }

  .schedule-grid {
    grid-template-columns: 80px repeat(5, 1fr);
    gap: 5px;
    padding: 1rem;
  }

  .schedule-grid-days {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 1rem;
  }

  .teacher-card .teacher-name {
    font-size: 0.8rem;
  }

  .teacher-card .teacher-type {
    display: none;
  }

  .compact-requests-grid {
    grid-template-columns: 1fr;
  }

  .data-table-container {
    overflow-x: auto;
  }

  .data-table {
    min-width: 700px;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .btn-action-small {
    width: 28px;
    height: 28px;
    min-height: 28px !important;
    font-size: 0.75rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .trust-indicators {
    gap: 20px;
  }

  .nav-links {
    display: none;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .contact-type-toggles {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .contact-type-card {
    padding: 1rem;
  }

  .contact-type-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
  }

  .priority-labels {
    font-size: 0.8rem;
  }

  .priority-current {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
  }

  .summary-stats {
    gap: 1rem;
  }

  .stat-item {
    min-width: 80px;
  }

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

  .teachers-table th,
    .teachers-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .invitation-grid {
    grid-template-columns: 1fr;
  }

  .invitation-actions {
    flex-direction: column;
  }

  .invitation-actions .btn {
    width: 100%;
  }

  .channel-options {
    grid-template-columns: 1fr;
  }

  .test-buttons {
    grid-template-columns: 1fr;
  }

  .preference-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .comm-tabs {
    flex-direction: column;
  }

  .channel-selector {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .teacher-management-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .modern-table {
    font-size: 0.875rem;
  }

  .modern-table th,
    .modern-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* Desktop */
@media (min-width: 769px) {
  body.sidebar-open {
    overflow: auto;
  }

  .hide-desktop {
    display: none;
  }
}

/* Large Screen */
@media (max-width: 1024px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .teachers-table-container {
    overflow-x: auto;
  }

  .teachers-table {
    min-width: 900px;
  }
}

/* Print */
@media print {
  .no-print,
  .sidebar,
  .main-navigation,
  .top-header,
  .nav-section,
  .btn,
  .btn-base,
  footer,

  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .legal-actions, .legal-download, .legal-footer {
    display: none;
  }

  .legal-content {
    font-size: 0.9rem;
  }

  .legal-actions, .legal-footer {
    display: none;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High Contrast */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-color: #000000;
    --bg-color: #ffffff;
    --primary-color: #0040a0;
  }

}

/* Dark Mode Preference */
@media (prefers-color-scheme: dark) {
  .pending-invitations-section {
    background: linear-gradient(135deg, rgba(139, 109, 0, 0.2), rgba(184, 145, 0, 0.2));
  }

  .invitation-card {
    border-color: #d58512;
  }

  .invitation-header {
    background: linear-gradient(135deg, #d58512, #e89622);
  }
}
.contact-selection-item {
    display: flex;
    flex-direction: row-reverse;
}

/* ===============================================================
   Teacher Schedule Styles
   =============================================================== */

.teacher-calendar-container {
  margin: 2rem 0;
  background: var(--surface-1);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.teacher-calendar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.teacher-calendar .week-header {
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px 8px 0 0;
}

.teacher-calendar .week-number {
  opacity: 0.9;
  font-size: 0.9rem;
  margin-left: 1rem;
}

.teacher-calendar .day-header {
  background: var(--surface-2);
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 2px solid var(--border-color);
}

.teacher-calendar .day-header.today {
  background: var(--primary-soft);
  color: var(--primary-color);
  font-weight: 700;
}

/* Availability Row */
.availability-row {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-color);
}

.availability-cell {
  padding: 0.5rem;
  text-align: center;
  vertical-align: middle;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.availability-badge.available-full {
  background: var(--success-bg);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.availability-badge.available-morning {
  background: rgba(251, 191, 36, 0.1);
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.availability-badge.available-afternoon {
  background: rgba(251, 146, 60, 0.1);
  color: #fb923c;
  border: 1px solid #fb923c;
}

.availability-badge.not-available {
  background: var(--danger-bg);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

/* Schedule Row */
.schedule-row {
  background: var(--bg-color);
}

.schedule-cell {
  padding: 1rem;
  vertical-align: top;
  border: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
  position: relative;
}

.schedule-cell:hover {
  background: var(--surface-1);
}

.schedule-cell.today {
  background: var(--primary-soft);
  border-color: var(--primary-color);
}

/* Teacher Schedule Specific Cells */
.teacher-schedule-cell {
  padding: 1rem;
  vertical-align: top;
  border: 1px solid var(--border-color);
  min-width: 150px;
  transition: background-color var(--transition-fast);
  position: relative;
}

.teacher-schedule-cell:hover {
  background: var(--surface-1);
}

.teacher-schedule-cell.today {
  background: var(--primary-soft);
  border-color: var(--primary-color);
}

.day-schedule {
  min-height: 150px;
}

.day-schedule.day-absent {
  opacity: 0.7;
  background: var(--danger-bg);
  padding: 0.5rem;
  border-radius: 8px;
}

.date-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-align: center;
}

.absence-notice {
  background: var(--danger-color);
  color: white;
  padding: 0.5rem;
  border-radius: 6px;
  text-align: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Schedule Sections */
.schedule-section {
  margin-bottom: 1rem;
}

.schedule-section:last-child {
  margin-bottom: 0;
}

.schedule-section .section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Class Items */
.class-item {
  background: var(--surface-2);
  padding: 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.class-info {
  flex: 1;
}

.class-edit-link {
  color: var(--primary-color);
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  padding: 0.25rem;
  margin-left: 0.5rem;
}

.class-edit-link:hover {
  opacity: 1;
  color: var(--primary-hover);
}

.class-item.class-cancelled {
  text-decoration: line-through;
  opacity: 0.6;
}

.class-name {
  font-weight: 600;
  color: var(--text-color);
}

.class-bouw {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* Deployment Items */
.deployment-item {
  background: var(--info-bg);
  padding: 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--info-color);
}

.original-teacher {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.period-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.period-badge.morning {
  background: rgba(251, 191, 36, 0.2);
  color: #f59e0b;
}

.period-badge.afternoon {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}

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

/* Empty Day */
.empty-day {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Week Navigation */
.week-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem;
  background: var(--surface-1);
  border-radius: 8px;
}

.current-week {
  text-align: center;
}

.week-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  display: block;
}

.date-range {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--surface-1);
  padding: 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-soft);
  color: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-content {
  flex: 1;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Calendar Wrapper */
.calendar-wrapper {
  margin: 2rem 0;
}

.calendar-wrapper .section-title {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
}

/* Schedule Legend */
.schedule-legend {
  background: var(--surface-1);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.schedule-legend h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.legend-color.regular {
  background: var(--surface-2);
  border-left: 3px solid var(--primary-color);
}

.legend-color.deployment {
  background: var(--info-bg);
  border-left: 3px solid var(--info-color);
}

.legend-color.absent {
  background: var(--danger-bg);
  border-color: var(--danger-color);
}

.legend-color.available {
  background: var(--success-bg);
  border-color: var(--success-color);
}

.legend-color.unavailable {
  background: var(--danger-bg);
  border-color: var(--danger-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .teacher-calendar-container {
    padding: 1rem;
    margin: 1rem -0.5rem;
  }

  .teacher-calendar {
    font-size: 0.85rem;
  }

  .availability-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }

  .schedule-cell {
    padding: 0.5rem;
  }

  .teacher-schedule-cell {
    padding: 0.5rem;
    min-width: 100px;
    font-size: 0.85rem;
  }

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

  .week-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .legend-items {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Dark mode adjustments */
body.dark .teacher-calendar-container {
  background: var(--surface-1);
}

body.dark .teacher-calendar .week-header {
  background: var(--header-bg);
}

body.dark .schedule-cell:hover {
  background: var(--surface-2);
}

body.dark .teacher-schedule-cell:hover {
  background: var(--surface-2);
}

body.dark .class-item {
  background: var(--surface-3);
}

body.dark .deployment-item {
  background: rgba(139, 157, 195, 0.15);
}

body.dark .stat-card {
  background: var(--surface-2);
  border-color: var(--border-color);
}

/* Teacher Detail Availability Summary */
.week-availability-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

.day-availability {
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--surface-1);
  transition: transform var(--transition-fast);
}

.day-availability:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.day-availability.available {
  border-color: var(--success-color);
  background: var(--success-bg);
}

.day-availability.unavailable {
  border-color: var(--danger-color);
  background: var(--danger-bg);
}

.day-availability .day-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.day-availability .day-date {
  font-size: 0.9rem;
  color: var(--text-color);
  margin: 0.25rem 0;
}

.day-availability .availability-status {
  font-size: 1.25rem;
  margin-top: 0.25rem;
}

.availability-preferences-link {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.deployment-stats {
  padding: 0.75rem;
  background: var(--surface-1);
  border-radius: 6px;
  border-left: 3px solid var(--info-color);
}

.email-preview-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--surface-1);
    color: var(--text-color);
}
.inline-style-226 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.inline-style-227 {
  background: var(--surface-2);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  color: var(--text-color);
}
.inline-style-228 {
  color: var(--text-color);
}
.inline-style-229 {
  background: var(--success-bg);
  border-left: 4px solid var(--success-color);
  padding: 15px;
  margin: 20px 0;
  color: var(--success-color);
}
.inline-style-230 {
  text-align: center;
  margin: 30px 0;
}
.inline-style-231 {
  display: inline-block;
  padding: 15px 30px;
  background: var(--success-color);
  color: white;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
}
.inline-style-232 {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  color: var(--text-color);
}
.inline-style-233 {
   background: var(--warning-bg);
   border: 1px solid var(--warning-color);
   border-radius: 4px;
   padding: 10px;
   margin: 20px 0;
   color: var(--warning-color);
}
.inline-style-234 {
  margin: 30px 0;
  border-color: var(--border-color);
}
.inline-style-232 {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* ===============================================================
   TEACHER DETAIL PAGE - MOBILE FIX (Must be at end for cascade)
   =============================================================== */

@media (max-width: 768px) {
  /* Override the base detail-grid with single column on mobile */
  .detail-grid {
    grid-template-columns: 1fr;
  }

  /* Ensure cards don't span multiple columns on mobile */
  .detail-grid > *,
  .teacher-info-card {
    grid-column: 1 / -1;
  }
}

/* ===============================================================
   EXTERNAL REQUEST RESPONSE CONFIRMATION
   =============================================================== */

.response-confirmation {
  text-align: center;
  padding: 20px;
}

.response-confirmation .success-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.response-confirmation .request-details {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: left;
}

.response-confirmation .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.response-confirmation .detail-row:last-child {
  border-bottom: none;
}

.response-confirmation .detail-label {
  font-weight: 600;
  color: #495057;
}

.response-confirmation .detail-value {
  color: #212529;
}

/* ===============================================================
   MULTIPLE TEACHER DISPLAY IN CLASS MANAGEMENT
   =============================================================== */

/* Container for multiple teachers in a day cell */
.teacher-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

/* Individual teacher item */
.teacher-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.2;
  transition: all var(--transition-fast);
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
}

/* Primary teacher styling */
.teacher-item.teacher-primary {
  background: linear-gradient(135deg, var(--primary-soft), transparent);
  border-color: var(--primary-color);
  font-weight: 500;
}

.teacher-item.teacher-primary::before {
  content: '★';
  position: absolute;
  left: 0.25rem;
  color: var(--primary-color);
  font-size: 0.625rem;
}

/* Co-teacher styling */
.teacher-item.teacher-co {
  opacity: 0.85;
  background: var(--surface-3);
  border-style: dashed;
  padding-left: 1.25rem;
}

/* Teacher name and badge container */
.teacher-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-color);
}

/* Teacher role badge */
.teacher-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.teacher-badge.badge-primary {
  background: var(--primary-color);
  color: white;
}

.teacher-badge.badge-co {
  background: var(--text-light);
  color: white;
}

/* Color indicator dot */
.teacher-color-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Multiple teachers indicator */
.multiple-teachers-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--warning-bg);
  color: var(--warning-color);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: bold;
  margin-left: 0.25rem;
}

/* Hover effects */
.teacher-item:hover {
  background: var(--primary-soft);
  transform: translateX(2px);
}

.teacher-item.teacher-primary:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-soft));
  color: white;
}

.teacher-item.teacher-primary:hover .teacher-name {
  color: white;
}

/* Dark mode adjustments */
body.dark .teacher-item {
  background: var(--surface-2);
  border-color: var(--border-color);
}

body.dark .teacher-item.teacher-primary {
  background: linear-gradient(135deg, rgba(139, 157, 195, 0.2), transparent);
  border-color: var(--primary-color);
}

body.dark .teacher-item.teacher-co {
  background: var(--surface-3);
  opacity: 0.8;
}

body.dark .teacher-item:hover {
  background: var(--primary-soft);
}

body.dark .teacher-item.teacher-primary:hover {
  background: linear-gradient(135deg, var(--primary-color), rgba(139, 157, 195, 0.3));
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .teacher-item {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
  }

  .teacher-badge {
    font-size: 0.5rem;
    padding: 0.1rem 0.25rem;
  }

  .teacher-color-dot {
    width: 0.5rem;
    height: 0.5rem;
  }
}

/* Compact view for schedule grid */
.schedule-cell .teacher-list {
  gap: 0.125rem;
}

.schedule-cell .teacher-item {
  padding: 0.125rem 0.25rem;
  font-size: 0.75rem;
}

.schedule-cell .teacher-badge {
  display: none; /* Hide badges in compact view */
}

/* Tooltip for full teacher names on hover */
.teacher-item[title] {
  cursor: help;
}

/* ===============================================================
   PROFILE PAGE - Section Header with Action
   =============================================================== */
.section-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.section-header-with-action h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-color);
}

.section-header-with-action .btn {
  white-space: nowrap;
}

.section-header-with-action .btn i {
  margin-right: 0.5rem;
}

/* WhatsApp Status Icon */
.whatsapp-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.whatsapp-status-icon {
  font-size: 1.25rem;
}

.whatsapp-status-icon.active {
  color: var(--success-color);
}

.whatsapp-status-icon.inactive {
  color: var(--text-muted);
  opacity: 0.5;
}

.whatsapp-status-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
  .section-header-with-action {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .section-header-with-action .btn {
    width: 100%;
    text-align: center;
  }
}

/* ===============================================================
   TEACHER PROFILE EDIT PAGE STYLES
   =============================================================== */

/* Form Card Styling */
.form-card {
  background: var(--surface-1);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  background: var(--surface-2);
  color: var(--text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.help-text {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--error-bg, rgba(231, 76, 60, 0.1));
  border-radius: 6px;
  border-left: 3px solid var(--error-color);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* Info Card */
.info-card {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface-1);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.info-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.info-content h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.info-content p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.info-content ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
}

.info-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Info Section */
.info-section {
  padding: 1.5rem;
  background: var(--surface-1);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.info-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.info-section ul {
  margin: 0;
  padding-left: 1.5rem;
}

.info-section li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Page Header */
.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Section header with action button (profile pages) */
.section-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.section-header-with-action h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.section-header-with-action .btn {
  white-space: nowrap;
}

.section-header-with-action .btn i {
  margin-right: 0.5rem;
}

/* Info Section Warning Variant */
.info-section-warning {
  border-left: 4px solid var(--warning-color);
  background-color: var(--warning-bg);
}
