@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');
@import "tailwindcss";

/* ═══════════════════════════════════════════
   LUXURY DESIGN SYSTEM — CRESCENT DASHBOARD
   ═══════════════════════════════════════════ */

:root {
  --primary: #8B1A2B;
  --primary-dark: #6B0F1D;
  --primary-light: #B8354A;
  --accent-gold: #C8A96E;
  --accent-gold-light: #E8D5A8;
  --secondary: #1B1B2F;
  --text: #2D2B3D;
  --text-light: #7C7A8A;
  --text-muted: #A8A6B5;
  --bg-body: #F4F2EE;
  --bg-light: #FAF8F5;
  --bg-lighter: #FFFFFF;
  --border: rgba(200, 169, 110, 0.15);
  --border-subtle: rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(139, 26, 43, 0.04);
  --shadow: 0 4px 24px rgba(139, 26, 43, 0.06);
  --shadow-lg: 0 20px 60px rgba(139, 26, 43, 0.10);
  --shadow-gold: 0 8px 30px rgba(200, 169, 110, 0.15);
  --card-bg: #FFFFFF;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --success: #2D8B6F;
  --warning: #C49A3C;
  --info: #4A6FA5;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(200, 169, 110, 0.12);
}

.dark-mode {
  --text: #E8E6EF;
  --text-light: #9B99A8;
  --text-muted: #6D6B7A;
  --bg-body: #0F0E17;
  --bg-light: #1A192A;
  --bg-lighter: #1F1E30;
  --border: rgba(200, 169, 110, 0.10);
  --border-subtle: rgba(255,255,255,0.04);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
  --card-bg: rgba(31, 30, 48, 0.9);
  --glass-bg: rgba(31, 30, 48, 0.72);
  --glass-border: rgba(200, 169, 110, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  min-height: 100vh;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle background texture */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(139, 26, 43, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(200, 169, 110, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.dashboard-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 12px;
  position: relative;
  z-index: 1;
}

/* ═══════════ LUXURY HEADER ═══════════ */
.header {
  background: linear-gradient(145deg, #1B1B2F 0%, #2D1F30 30%, #8B1A2B 70%, #6B0F1D 100%);
  border-radius: var(--radius-xl);
  padding: 0;
  margin-bottom: 32px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 30px 80px rgba(139, 26, 43, 0.20),
    0 0 0 1px rgba(200, 169, 110, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(200, 169, 110, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 169, 110, 0.3), transparent);
}

.header-content { position: relative; z-index: 1; }

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.crescent-logo {
  width: 100px;
  height: 100px;
  background: linear-gradient(145deg, #ffffff, #f5f0e8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 12px 40px rgba(0,0,0,0.25),
    0 0 0 3px rgba(200, 169, 110, 0.25),
    inset 0 2px 4px rgba(255,255,255,0.9);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.crescent-logo svg { width: 100%; height: 100%; }

.header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  letter-spacing: 1.5px;
  color: #FFFFFF;
}

.header .subtitle {
  font-size: 1.05rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--accent-gold-light);
}

.dark-mode-toggle {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(200, 169, 110, 0.15);
  color: var(--accent-gold-light);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.dark-mode-toggle:hover { 
  background: rgba(200, 169, 110, 0.15);
  border-color: rgba(200, 169, 110, 0.3);
}

/* ═══════════ PREMIUM STAT CARDS ═══════════ */
.total-stats {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--glass-border);
}

.total-stats .stat-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 8px 25px rgba(139, 26, 43, 0.25);
}

.total-stats .info h2 {
  font-size: 2.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.total-stats .info p { font-size: 0.95rem; color: var(--text-light); font-weight: 500; }
.total-stats .crescent-watermark { display: none; }

/* ═══════════ DEPARTMENT CARDS ═══════════ */
.departments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.department-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
}

.department-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 1;
}

.department-card:hover::before { opacity: 1; }

.department-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(200, 169, 110, 0.12);
}

.department-card .card-header {
  padding: 32px 24px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.department-card .card-header::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -40%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.department-card .card-header .corner-crescent { display: none; }

.department-card.surgery .card-header { background: linear-gradient(145deg, #8B1A2B 0%, #6B0F1D 100%); }
.department-card.gynecology .card-header { background: linear-gradient(145deg, #6B3A7D 0%, #4E2A5E 100%); }
.department-card.pediatrics .card-header { background: linear-gradient(145deg, #2B5F8B 0%, #1D4366 100%); }
.department-card.graduates .card-header { background: linear-gradient(145deg, #2D7B5E 0%, #1D5640 100%); }
.department-card.suspended .card-header { background: linear-gradient(145deg, #9B7D2F 0%, #7A6224 100%); }
.department-card.recruitment .card-header { background: linear-gradient(145deg, #2D3440 0%, #1B2028 100%); }
.department-card.ambulance .card-header { background: linear-gradient(145deg, #e65100 0%, #bf360c 100%); }

.department-card .card-header .icon { 
  font-size: 2.5rem; 
  margin-bottom: 14px; 
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
  opacity: 0.9;
}

.department-card .card-header h3 { 
  font-size: 1.1rem; 
  font-weight: 700; 
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.department-card .card-header .count { 
  font-size: 3rem; 
  font-weight: 900;
  text-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.department-card .card-header .count-label { 
  font-size: 0.85rem; 
  opacity: 0.8;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.department-card .card-body {
  padding: 16px;
  text-align: center;
  background: var(--bg-lighter);
  border-top: 1px solid var(--border);
}

.department-card .click-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.department-card:hover .click-hint { 
  color: var(--primary); 
  transform: translateX(-4px);
}

/* ═══════════ STUDENTS SECTION ═══════════ */
.students-section { display: none; }
.students-section.visible { display: block; animation: luxuryFadeIn 0.5s ease; }

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

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

.section-header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--glass-border);
  border-bottom: none;
}

.section-header .title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-header .back-btn {
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.section-header .back-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(139, 26, 43, 0.2);
}

.section-header h2 {
  font-size: 1.15rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.section-header .dept-badge {
  padding: 5px 16px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.3px;
}

.section-header .dept-badge.surgery { background: linear-gradient(135deg, #8B1A2B, #6B0F1D); }
.section-header .dept-badge.gynecology { background: linear-gradient(135deg, #6B3A7D, #4E2A5E); }
.section-header .dept-badge.pediatrics { background: linear-gradient(135deg, #2B5F8B, #1D4366); }
.section-header .dept-badge.graduates { background: linear-gradient(135deg, #2D7B5E, #1D5640); }
.section-header .dept-badge.suspended { background: linear-gradient(135deg, #9B7D2F, #7A6224); }

.controls-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box { position: relative; }

.search-box input {
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
  background: var(--bg-lighter);
  color: var(--text);
  width: 240px;
  transition: var(--transition);
}

.search-box input:focus { 
  border-color: var(--accent-gold); 
  outline: none;
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.12);
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  color: white;
  letter-spacing: 0.3px;
}

.action-btn.print { background: linear-gradient(135deg, #2B5F8B, #1D4366); }
.action-btn.export { background: linear-gradient(135deg, #2D7B5E, #1D5640); }
.action-btn.add { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.action-btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* ═══════════ LUXURY TABLE ═══════════ */
.table-container {
  background: var(--bg-lighter);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow);
  border: 1px solid var(--glass-border);
  border-top: none;
}

table { width: 100%; border-collapse: collapse; table-layout: auto; }

thead th {
  background: linear-gradient(135deg, var(--secondary) 0%, #2D1F30 100%);
  padding: 10px 8px;
  text-align: right;
  font-weight: 600;
  color: var(--accent-gold-light);
  font-size: 0.78rem;
  letter-spacing: 0.3px;
  text-transform: none;
  white-space: nowrap;
}

thead th:first-child { border-radius: 0; }
thead th:last-child { border-radius: 0; }

tbody td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: right;
  font-size: 0.82rem;
  color: var(--text);
  transition: var(--transition-fast);
}

tbody tr { transition: var(--transition-fast); }

tbody tr:hover { 
  background: rgba(200, 169, 110, 0.04);
}

tbody tr:hover td {
  color: var(--primary-dark);
}

.phone-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.phone-link:hover { 
  color: var(--accent-gold);
}

/* ═══════════ TABLE ACTION BUTTONS ═══════════ */
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.8rem;
}

.btn-icon.edit { background: linear-gradient(135deg, #2B5F8B, #1D4366); color: white; }
.btn-icon.move { background: linear-gradient(135deg, #6B3A7D, #4E2A5E); color: white; }
.btn-icon.delete { background: linear-gradient(135deg, #8B1A2B, #6B0F1D); color: white; }
.btn-icon:hover { 
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ═══════════ LUXURY MODAL ═══════════ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 14, 23, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 
    0 30px 80px rgba(0,0,0,0.25),
    0 0 0 1px var(--glass-border);
  animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

.modal-header h3 {
  font-size: 1.15rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-light);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { 
  background: var(--primary); 
  color: white;
  border-color: var(--primary);
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  background: var(--bg-light);
  color: var(--text);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.12);
  background: var(--bg-lighter);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.form-actions button {
  flex: 1;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.btn-primary { 
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
  color: white;
  box-shadow: 0 6px 20px rgba(139, 26, 43, 0.2);
}

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

.btn-primary:hover { 
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(139, 26, 43, 0.3);
}

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

/* ═══════════ MOVE DEPARTMENT BUTTONS ═══════════ */
.move-dept-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.move-dept-btn {
  padding: 15px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.move-dept-btn.surgery { background: linear-gradient(135deg, #8B1A2B, #6B0F1D); }
.move-dept-btn.gynecology { background: linear-gradient(135deg, #6B3A7D, #4E2A5E); }
.move-dept-btn.pediatrics { background: linear-gradient(135deg, #2B5F8B, #1D4366); }
.move-dept-btn.graduates { background: linear-gradient(135deg, #2D7B5E, #1D5640); }
.move-dept-btn.suspended { background: linear-gradient(135deg, #9B7D2F, #7A6224); }
.move-dept-btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.move-dept-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ═══════════ LOADING ═══════════ */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(244, 242, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.dark-mode .loading-overlay {
  background: rgba(15, 14, 23, 0.92);
}

.loading-content { text-align: center; color: var(--text); }

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--accent-gold);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-content p { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.loading-content small { color: var(--text-muted); font-size: 0.85rem; }

/* ═══════════ TOAST ═══════════ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, var(--secondary), #2D1F30);
  color: var(--accent-gold-light);
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  z-index: 2000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(200, 169, 110, 0.15);
  letter-spacing: 0.3px;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ═══════════ LUXURY FOOTER ═══════════ */
.footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.footer-logo .crescent-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(145deg, #ffffff, #f5f0e8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(200, 169, 110, 0.1);
}

.footer-logo .crescent-icon svg { width: 100%; height: 100%; }
.footer-logo span { font-size: 0.95rem; font-weight: 700; color: var(--primary); letter-spacing: 0.5px; }
.footer p { color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.3px; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 768px) {
  .dashboard-container { padding: 16px; }
  .header { border-radius: var(--radius-lg); }
  .header h1 { font-size: 1.5rem; }
  .crescent-logo { width: 70px; height: 70px; }
  .dark-mode-toggle { position: static; margin-bottom: 10px; justify-content: center; }
  .section-header { flex-direction: column; text-align: center; padding: 18px; }
  .controls-group { justify-content: center; width: 100%; }
  .search-box input { width: 100%; }
  .total-stats { flex-direction: column; text-align: center; }
  .department-card .card-header { padding: 24px 18px; }
}

/* ═══════════ SCHEDULE STYLES ═══════════ */
.department-card.schedule-generator {
  position: relative;
  overflow: hidden;
}

.department-card.schedule-generator::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent, rgba(200, 169, 110, 0.08), transparent);
  animation: shimmer 4s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.schedule-grid {
  display: grid;
  gap: 3px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 3px;
}

.schedule-cell {
  padding: 12px 8px;
  text-align: center;
  transition: var(--transition-fast);
  cursor: pointer;
  border-radius: 8px;
  font-weight: 600;
  position: relative;
}

.schedule-cell:hover {
  transform: scale(1.02);
  z-index: 10;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.section-a { background: linear-gradient(135deg, #2B5F8B, #1D4366); color: white; }
.section-bc { background: linear-gradient(135deg, #8B1A2B, #6B0F1D); color: white; }
.section-picu { background: linear-gradient(135deg, #6B3A7D, #4E2A5E); color: white; }
.section-nicu { background: linear-gradient(135deg, #2D7B5E, #1D5640); color: white; }
.section-clinic { background: linear-gradient(135deg, #9B7D2F, #7A6224); color: white; }
.section-out { background: var(--bg-light); color: var(--text-muted); }

.friday-shift {
  border: 2px dashed var(--accent-gold) !important;
  animation: friday-glow 2s infinite alternate;
}

@keyframes friday-glow {
  from { box-shadow: inset 0 0 8px rgba(200, 169, 110, 0.2); }
  to { box-shadow: inset 0 0 20px rgba(200, 169, 110, 0.4); }
}

.config-card { transition: var(--transition); }
.config-card:hover { box-shadow: var(--shadow-lg); }

.generate-btn { animation: pulse-button 3s infinite; }

@keyframes pulse-button {
  0%, 100% { box-shadow: 0 10px 30px rgba(139, 26, 43, 0.2); }
  50% { box-shadow: 0 15px 40px rgba(139, 26, 43, 0.35); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.week-nav-btn { transition: var(--transition-fast); }
.week-nav-btn:not(:disabled):hover { transform: scale(1.05); }

.student-row { transition: var(--transition-fast); }
.student-row:hover { background: rgba(200, 169, 110, 0.04); }

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-lighter);
  border-radius: 8px;
  transition: var(--transition-fast);
}
.legend-item:hover { transform: translateX(-4px); }

@media print {
  .schedule-header, .config-card, .back-btn, nav, .toast { display: none !important; }
  .schedule-display { box-shadow: none !important; padding: 0 !important; }
  .schedule-cell { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ═══════════ PREMIUM EFFECTS ═══════════ */
.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.floating { animation: float 4s ease-in-out infinite; }

/* Smooth Focus */
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.12);
  outline: none;
}

/* Luxury Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { 
  background: linear-gradient(180deg, var(--primary-light), var(--accent-gold));
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { 
  background: linear-gradient(180deg, var(--primary), var(--accent-gold));
}

/* Selection */
::selection {
  background: rgba(139, 26, 43, 0.15);
  color: inherit;
}

/* Skeleton Loading */
@keyframes skeleton-loading {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-light) 0%, var(--bg-body) 50%, var(--bg-light) 100%);
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* Dark mode overrides */
.dark-mode .config-card,
.dark-mode .schedule-display { background: var(--card-bg); }
.dark-mode .schedule-cell.section-out { background: #1A192A; color: var(--text-muted); }

/* ═══════════ SIGNATURE BLOCKS: hidden on screen, shown only on print ═══════════ */
.print-only-signatures {
  display: none !important;
}
@media print {
  .print-only-signatures {
    display: block !important;
  }
}
