body{font-family:'Poppins',sans-serif;background:#f4f7fb;margin:0}
.header{display:flex;justify-content:space-between;align-items:center;padding:18px 28px;background:#fff;border-radius:12px;margin:18px;box-shadow:0 6px 20px rgba(12,38,63,0.06)}
.brand{display:flex;gap:12px;align-items:center}
.school-name{font-weight:700;color:#004aad;font-size:18px}
.tag{font-size:12px;color:#6b7280}
.actions{display:flex;gap:10px;align-items:center}
.container{max-width:1100px;margin:10px auto;padding-bottom:80px}
.card{background:#fff;border-radius:12px;padding:18px;margin:14px 0;box-shadow:0 6px 20px rgba(12,38,63,0.04)}
.controls-row{display:flex;gap:8px;align-items:center;margin-top:8px}
.btn{padding:8px 12px;border-radius:10px;border:none;cursor:pointer;font-weight:600}
.btn.primary{background:#004aad;color:#fff}
.btn.ghost{background:transparent;border:1px solid #dfe8f8;color:#004aad;padding:8px 12px;border-radius:10px}
.btn.success{background:#16a34a;color:#fff}
.form-row{margin-top:10px;display:flex;flex-direction:column}
.form-row label{font-weight:600;margin-bottom:6px}
.form-row input, .form-row select{padding:10px;border-radius:8px;border:1px solid #e6eefb;width:100%;box-sizing:border-box}
.config-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}
.editable-input{transition:all 0.2s ease}
.editable-input:focus{border-color:#004aad;box-shadow:0 0 0 3px rgba(0,74,173,0.1);outline:none}
.table-wrap{margin-top:12px;overflow:auto}
.table{width:100%;border-collapse:collapse}
.table th{background:#f1f5ff;color:#004aad;padding:10px;text-align:left}
.table td{padding:10px;border-top:1px solid #f0f2fa}
.modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(2,6,23,0.35)}
.modal-content{background:#fff;padding:18px;border-radius:12px;min-width:320px}
/* admin_refined.css — Clean Professional Look */
:root {
  --primary: #1976d2;
  --primary-light: #63a4ff;
  --bg: #f9fafc;
  --text: #1a1a1a;
  --border: #e0e0e0;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}
* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
.header.refined {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 12px 24px;
  box-shadow: var(--shadow);
}
.brand.refined {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand.refined .logo {
  font-size: 26px;
}
.brand.refined .school-name {
  font-weight: 700;
  font-size: 18px;
}
.tag {
  font-size: 12px;
  color: #666;
}
.actions.refined .btn {
  margin-left: 10px;
}
.btn {
  border: none;
  border-radius: var(--radius);
  padding: 8px 18px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn.primary {
  background: var(--primary);
  color: white;
}
.btn.primary:hover {
  background: var(--primary-light);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn.full {
  width: 100%;
}
.modal.refined {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal-overlay.refined {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px); 
}
.modal-content.refined {
  position: relative;
  background: white;
  border-radius: var(--radius);
  padding: 24px 28px;
  width: 360px;
  box-shadow: var(--shadow);
  z-index: 1000;
  animation: popIn 0.3s ease forwards;
}
.modal-header.refined {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-header.refined h2 {
  margin: 0;
  font-size: 18px;
}
.close-btn.refined {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}
.close-btn.refined:hover {
  color: var(--primary);
}
.modal-body.refined label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 10px;
}
.modal-body.refined input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border 0.2s ease;
}
.modal-body.refined input:focus {
  border-color: var(--primary);
  outline: none;
}
.password-wrap.refined {
  display: flex;
  align-items: center;
  position: relative;
}
.toggle-pass.refined {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #555;
}
.actions-row.refined {
  margin-top: 18px;
}
.card.refined {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  margin: 20px auto;
  width: 90%;
  max-width: 900px;
  box-shadow: var(--shadow);
}
.card.refined h2 {
  margin-top: 0;
}
.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

/* ============================================
   MODERN SELECT DROPDOWN STYLING - ADMIN
   ============================================ */

.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.select-wrapper::after {
  content: '▼';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #1976d2;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

select:not(.lv-teacher-select) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  color: #1a1a1a;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

select:not(.lv-teacher-select):hover {
  border-color: #63a4ff;
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.12);
  background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

/* Desktop: keep filter selects compact and button-like */
@media (min-width: 769px) {
  .filter-bar .select-wrapper,
  .leave-filter .select-wrapper,
  .form-row .select-wrapper {
    width: auto;
    min-width: 160px;
    max-width: 260px;
    margin-right: 8px;
  }

  .filter-bar .select-wrapper select,
  .leave-filter .select-wrapper select,
  .form-row .select-wrapper select {
    font-size: 13px;
    padding: 8px 12px;
    height: 40px;
    border-radius: 12px;
  }
}

/* Mobile: make selects full-width but centered inside controls */
@media (max-width: 768px) {
  .filter-bar, .leave-filter, .form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .filter-bar .select-wrapper,
  .leave-filter .select-wrapper,
  .form-row .select-wrapper {
    width: 92%;
    max-width: 420px;
    margin: 0 auto;
  }

  .filter-bar .select-wrapper select,
  .leave-filter .select-wrapper select,
  .form-row .select-wrapper select {
    font-size: 15px;
    padding: 10px 14px;
    height: 44px;
    border-radius: 14px;
  }
}

select:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1), 0 4px 16px rgba(25, 118, 210, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

select:active {
  transform: scale(0.99);
}

select:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  border-color: #e0e0e0;
  opacity: 0.6;
}

select option {
  padding: 10px;
  color: #1a1a1a;
  background: #ffffff;
}

select option:hover {
  background: linear-gradient(135deg, #1976d2 0%, #63a4ff 100%);
  color: white;
}

select option:checked {
  background: linear-gradient(135deg, #1976d2 0%, #63a4ff 100%);
  color: white;
}

/* Leave filter styling */
.leave-filter {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.leave-filter label {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
}

/* Teacher select inside header */
.lv-filter-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 50px;
  padding: 0;
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: background 0.2s;
}
.lv-filter-wrap:hover {
  background: rgba(255,255,255,0.28);
}
.lv-filter-icon {
  font-size: 15px;
  padding: 0 0 0 14px;
  pointer-events: none;
  line-height: 1;
  flex-shrink: 0;
}
.lv-teacher-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  outline: none;
  cursor: pointer;
  padding: 10px 40px 10px 8px;
  min-width: 160px;
}
.lv-teacher-select option {
  color: #1e1b4b;
  background: #fff;
  font-weight: 500;
}
/* Custom arrow */
.lv-filter-wrap::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  pointer-events: none;
}

/* Filter chips */
.lv-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.lv-chip {
  padding: 7px 16px;
  border-radius: 20px;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.lv-chip:hover { border-color: #8b5cf6; color: #8b5cf6; }
.lv-chip.active,
.lv-chip[data-filter="all"].active { background: #8b5cf6; color: #fff; border-color: #8b5cf6; }
.lv-chip[data-filter="Pending"].active  { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.lv-chip[data-filter="Approved"].active { background: #10b981; color: #fff; border-color: #10b981; }
.lv-chip[data-filter="Rejected"].active { background: #ef4444; color: #fff; border-color: #ef4444; }

/* Leave cards grid */
.lv-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  width: 100%;
}

/* Leave card */
.lv-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}
.lv-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Colored top stripe */
.lv-card-stripe {
  height: 4px;
  background: #f59e0b;
}
.lv-card.approved .lv-card-stripe { background: linear-gradient(90deg, #10b981, #059669); }
.lv-card.rejected .lv-card-stripe { background: linear-gradient(90deg, #ef4444, #dc2626); }
.lv-card.pending  .lv-card-stripe { background: linear-gradient(90deg, #f59e0b, #d97706); }

.lv-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 10px;
}
.lv-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}
.lv-card-info { flex: 1; min-width: 0; }
.lv-teacher-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lv-dates {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.lv-date-chip {
  font-size: 11.5px;
  background: #f1f5f9;
  color: #475569;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 500;
}
.lv-arrow { color: #9ca3af; font-size: 12px; }
.lv-days-badge {
  font-size: 11px;
  font-weight: 700;
  background: #ede9fe;
  color: #7c3aed;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Status badge */
.lv-status-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.lv-badge-pending  { background: #fef3c7; color: #92400e; }
.lv-badge-approved { background: #d1fae5; color: #065f46; }
.lv-badge-rejected { background: #fee2e2; color: #991b1b; }

/* Reason row */
.lv-card-reason {
  padding: 0 16px 12px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.lv-reason-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.lv-reason-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.4;
}

/* Action buttons */
.lv-card-actions {
  display: flex;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid #f3f4f6;
}
.lv-btn {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.lv-btn-approve {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 2px 6px rgba(16,185,129,0.25);
}
.lv-btn-approve:hover:not(:disabled) { background: linear-gradient(135deg, #059669, #047857); transform: translateY(-1px); }
.lv-btn-reject {
  background: #fee2e2;
  color: #dc2626;
}
.lv-btn-reject:hover:not(:disabled) { background: #fecaca; }
.lv-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* legacy leave-card compat */
.leave-card { border-left: none; }
.leave-card.approved { border-left: none; }
.leave-card.rejected { border-left: none; }

@keyframes popIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@media (max-width: 480px) {
  .modal-content.refined { width: 90%; padding: 20px; }
  .header.refined { flex-direction: column; gap: 10px; text-align: center; }
  .card.refined { width: 95%; }
}
/* ============================================
   📱 MOBILE RESPONSIVE DESIGN - ADMIN
   ============================================ */

/* Mobile Navigation */
.mobile-menu-btn {
  display: none;
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 20px;
  z-index: 1000;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  padding: 80px 20px 20px;
  overflow-y: auto;
  animation: slideInLeft 0.3s ease;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-item {
  display: block;
  padding: 16px 20px;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition-base);
  font-weight: 500;
  border: none;
  width: 100%;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
}

.mobile-menu-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(8px);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Mobile-First Responsive Breakpoints */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  /* Header Mobile */
  .header,
  .header.refined {
    padding: 12px 16px;
    margin: 10px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand,
  .brand.refined {
    flex: 1;
    min-width: 0;
  }

  .school-name {
    font-size: 16px;
  }

  .tag {
    font-size: 11px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .actions,
  .actions.refined {
    display: none;
  }

  /* Container */
  .container {
    padding: 0;
    margin: 0;
  }

  /* Cards */
  .card,
  .card.refined {
    padding: 16px;
    margin: 12px 10px;
    border-radius: 12px;
    width: auto;
    max-width: 100%;
  }

  .card h2 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  /* Forms */
  .form-row {
    margin-top: 12px;
  }

  .form-row input,
  .form-row select,
  .form-row textarea {
    padding: 14px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 12px;
  }

  /* Buttons - Compact */
  .btn {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 36px; /* Reduced but still touchable */
  }

  .controls-row {
    flex-direction: column;
    gap: 10px;
  }

  .controls-row .btn {
    width: 100%;
  }

  /* Tables - Compact */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 550px; /* Reduced from 600px */
    font-size: 12px;
  }

  .table th {
    padding: 8px 6px;
    font-size: 10px;
    white-space: nowrap;
    font-weight: 600;
  }

  .table td {
    padding: 8px 6px;
  }

  /* Modal */
  .modal-content,
  .modal-content.refined {
    width: 90%;
    max-width: 400px;
    padding: 20px;
    margin: 20px;
  }

  /* Leave Panel */
  #leaveCardPanel {
    gap: 12px;
    padding: 8px;
  }

  .leave-card {
    flex: 0 0 90%;
    min-width: 280px;
    padding: 16px;
  }

  .leave-filter {
    margin-bottom: 16px;
  }

  .leave-filter select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
  }

  /* Toast Mobile */
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }

  /* Loading Mobile */
  #loading-overlay .spinner {
    width: 40px;
    height: 40px;
  }
}

/* Small Mobile (320px - 480px) - Extra Compact */
@media (max-width: 480px) {
  body {
    padding: 6px;
  }

  .header,
  .header.refined {
    padding: 8px 10px;
    margin: 6px;
  }

  .school-name {
    font-size: 13px;
  }

  .tag {
    font-size: 10px;
  }

  .card,
  .card.refined {
    padding: 10px;
    margin: 8px 6px;
  }

  .card h2 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 34px;
  }

  .table {
    min-width: 480px;
    font-size: 11px;
  }

  .table th {
    padding: 6px 4px;
    font-size: 9px;
  }

  .table td {
    padding: 6px 4px;
  }

  .form-row input,
  .form-row select,
  .form-row textarea {
    padding: 10px;
    font-size: 16px; /* Keep 16px to prevent zoom */
  }

  .leave-card {
    flex: 0 0 95%;
    padding: 10px;
  }
}

/* Touch Optimizations - Compact but Usable */
@media (hover: none) and (pointer: coarse) {
  /* Compact touch targets - still usable */
  button,
  .btn,
  .tab,
  .class-btn {
    min-height: 36px; /* Reduced from 44px but still touchable */
    min-width: 36px;
  }

  /* Remove hover effects on touch devices */
  .header:hover,
  .card:hover {
    transform: none;
  }

  /* Active states for touch */
  .btn:active {
    transform: scale(0.95);
    opacity: 0.8;
  }

  .leave-card:hover {
    transform: none;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .header {
    padding: 10px 16px;
  }

  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Tablet (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 20px;
  }

  .card {
    width: 100%;
    max-width: 100%;
  }

  .table {
    font-size: 14px;
  }
}

/* Prevent text size adjustment on iOS */
@media screen and (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Smooth scrolling for mobile */
@media (max-width: 768px) {
  * {
    -webkit-tap-highlight-color: rgba(25, 118, 210, 0.2);
  }

  html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
}

/* Editable Table Styles */
.editable-table {
  width: 100%;
}

.editable-cell {
  padding: 8px;
  min-height: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.editable-cell:focus {
  outline: none;
  border-color: #004aad;
  background: #f0f7ff;
  box-shadow: 0 0 0 2px rgba(0, 74, 173, 0.1);
}

.editable-cell:hover {
  background: #f9fafb;
}

.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn.small {
  padding: 6px 12px;
  font-size: 12px;
}

/* No Teacher Selected Message */
.no-teacher-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  color: white;
  margin: 20px 0;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
  animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.no-teacher-message .message-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

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

.no-teacher-message h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
}

.no-teacher-message p {
  margin: 0;
  font-size: 16px;
  opacity: 0.95;
  max-width: 500px;
  line-height: 1.6;
}

/* =============================================
   SCHOOL CONFIG CARD
   ============================================= */
.config-card {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 20px !important;
  box-shadow: 0 8px 32px rgba(99,102,241,0.10), 0 2px 8px rgba(0,0,0,0.05) !important;
}

.config-card-header {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #7c3aed 100%);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.config-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.config-header-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.18);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.config-header-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.config-header-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.72);
  margin-top: 2px;
}

.config-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 28px;
}

.config-field-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #f8f9ff;
  border: 1.5px solid #e8eaf8;
  border-radius: 16px;
  padding: 16px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.config-field-item:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.10);
  background: #fff;
}

.config-field-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.config-field-body {
  flex: 1;
  min-width: 0;
}

.config-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6b7280;
  margin-bottom: 6px;
}

.config-input {
  width: 100%;
  box-sizing: border-box;
  border: none;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  outline: none;
  padding: 0;
}

.config-input::placeholder {
  color: #c4c9d8;
  font-weight: 400;
}

.config-footer {
  padding: 0 28px 24px;
  display: flex;
  justify-content: flex-end;
}

.config-save-btn {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 60%, #7c3aed 100%) !important;
  color: #fff !important;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 32px !important;
  border-radius: 14px !important;
  border: none !important;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(99,102,241,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.2px;
}

.config-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(99,102,241,0.45);
}

.config-save-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

@media (max-width: 640px) {
  .config-fields-grid {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 14px;
  }

  .config-card-header { padding: 18px 20px; }
  .config-footer { padding: 0 20px 20px; }
  .config-save-btn { width: 100%; justify-content: center; }
}

/* =============================================
   SECTION CARDS (Teachers / Class Editor / Publish)
   ============================================= */
.section-card {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 20px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04) !important;
  margin: 20px 0 !important;
}

.section-card-header {
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

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

.section-header-icon {
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.18);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.section-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.section-header-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  margin-top: 2px;
}

.section-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Section action buttons */
.sec-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.sec-btn:hover  { transform: translateY(-1px); opacity: 0.93; }
.sec-btn:active { transform: translateY(0); }

.sec-btn-white   { background: #fff; color: #1e293b; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.sec-btn-outline { background: rgba(255,255,255,0.15); color: #fff; border: 1.5px solid rgba(255,255,255,0.5); }
.sec-btn-danger  { background: rgba(239,68,68,0.18); color: #fff; border: 1.5px solid rgba(255,255,255,0.3); }
.sec-btn-green   { background: #10b981; color: #fff; }
.sec-btn-red     { background: #ef4444; color: #fff; }
.sec-btn-blue    { background: #3b82f6; color: #fff; }

/* Card body */
.section-card-body {
  padding: 24px 28px;
}

/* Class select inline */
.class-select-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 6px 12px;
}

.class-select-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}

.compact-select { display: inline-block; width: auto; }
.compact-select select {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  cursor: pointer;
  padding: 2px 20px 2px 4px;
  -webkit-appearance: none;
  min-width: 70px;
}
.compact-select select option { color: #1e293b; background: #fff; }
.compact-select::after { color: #fff !important; right: 6px !important; font-size: 11px !important; }

/* Editor footer buttons */
.editor-footer-btns {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* Substitution summary box */
.sub-summary-box {
  background: #f8f9ff;
  border: 1.5px dashed #c7d2fe;
  border-radius: 14px;
  padding: 20px 24px;
  min-height: 60px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.sub-summary-empty {
  color: #9ca3af;
  font-style: italic;
  font-size: 13px;
}

/* Table inside card body */
.section-card-body .table th {
  background: #f1f5ff;
  color: #3b82f6;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
}

.section-card-body .table td {
  padding: 12px 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 13.5px;
}

.section-card-body .table tr:hover td {
  background: #f8faff;
}

@media (max-width: 768px) {
  .section-card-header {
    padding: 16px 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header-actions {
    width: 100%;
  }

  .sec-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .section-card-body {
    padding: 16px 18px;
  }

  .editor-footer-btns { gap: 8px; }
}

/* =============================================
   SUBSTITUTION PREVIEW MODAL
   ============================================= */
.sub-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: subFadeIn 0.2s ease;
}

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

.sub-preview-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(2,6,23,0.22), 0 4px 16px rgba(0,0,0,0.08);
  animation: subSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes subSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sub-preview-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 55%, #047857 100%);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.sub-preview-header-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.sub-preview-header-text {
  flex: 1;
  min-width: 0;
}

.sub-preview-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.sub-preview-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.78);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-preview-close-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.sub-preview-close-btn:hover {
  background: rgba(255,255,255,0.28);
}

.sub-preview-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.sub-preview-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #1e40af;
  margin-bottom: 18px;
  line-height: 1.5;
}

.sub-preview-notice-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Assignment cards grid */
.sub-assign-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-assign-card {
  border: 1px solid #e8edf5;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.sub-assign-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.sub-assign-card-header {
  background: #f8faff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e8edf5;
}

.sub-assign-class-badge {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.sub-assign-day-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
}

.sub-assign-period-badge {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}

.sub-assign-card-body {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub-assign-absent {
  flex: 1;
  min-width: 0;
}

.sub-assign-absent-label {
  font-size: 10.5px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.sub-assign-absent-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #ef4444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-assign-arrow {
  font-size: 18px;
  color: #9ca3af;
  flex-shrink: 0;
}

.sub-assign-sub {
  flex: 1;
  min-width: 0;
}

.sub-assign-sub-label {
  font-size: 10.5px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.sub-assign-sub-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #10b981;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-assign-sub-name.unassigned {
  color: #f59e0b;
}

.sub-assign-rule {
  font-size: 10.5px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 8px;
  margin-top: 3px;
  display: inline-block;
}

.sub-preview-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.sub-preview-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.sub-preview-empty-text {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.sub-preview-empty-sub {
  font-size: 13px;
  color: #9ca3af;
}

.sub-preview-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
  background: #fafbfc;
}

/* =============================================
   SUBSTITUTION SUMMARY (Draft & Publish card)
   ============================================= */
.sub-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.sub-summary-table thead th {
  background: #f1f5ff;
  color: #4f46e5;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid #e0e7ff;
}

.sub-summary-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

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

.sub-summary-table tbody tr:hover td {
  background: #f8faff;
}

.sub-summary-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.sub-summary-badge.class {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
}

.sub-summary-badge.period {
  background: #e0f2fe;
  color: #0369a1;
}

.sub-summary-absent-name {
  color: #ef4444;
  font-weight: 600;
}

.sub-summary-sub-name {
  color: #10b981;
  font-weight: 600;
}

.sub-summary-sub-name.unassigned {
  color: #f59e0b;
}

.sub-summary-rule-tag {
  font-size: 10.5px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 8px;
}

@media (max-width: 600px) {
  .sub-preview-modal { border-radius: 16px; }
  .sub-preview-header { padding: 16px 18px; }
  .sub-preview-body { padding: 16px 18px; }
  .sub-preview-footer { padding: 12px 18px; }
  .sub-summary-table thead { display: none; }
  .sub-summary-table tbody td { display: block; padding: 6px 12px; }
  .sub-summary-table tbody tr { border-bottom: 1px solid #e5e7eb; margin-bottom: 10px; }
}

/* =============================================
   CUSTOM DIALOG SYSTEM (replaces browser prompt/confirm/alert)
   ============================================= */
.dlg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.52);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dlg-overlay.dlg-visible {
  opacity: 1;
}

.dlg-overlay.dlg-hiding {
  opacity: 0;
  pointer-events: none;
}

.dlg-box {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 32px 72px rgba(2,6,23,0.22), 0 4px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  transform: scale(0.94) translateY(16px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  opacity: 0;
}

.dlg-overlay.dlg-visible .dlg-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.dlg-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 0 24px;
}

.dlg-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.dlg-icon-wrap.primary { background: #eff6ff; }
.dlg-icon-wrap.danger  { background: #fef2f2; }
.dlg-icon-wrap.warning { background: #fffbeb; }
.dlg-icon-wrap.success { background: #f0fdf4; }

.dlg-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.dlg-message {
  padding: 12px 24px 0 24px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

.dlg-body {
  padding: 16px 24px 0 24px;
}

.dlg-field {
  margin-bottom: 12px;
}

.dlg-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.dlg-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: #111827;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #f9fafb;
}

.dlg-input:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.dlg-input.dlg-input-danger:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.dlg-hint {
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: 5px;
  line-height: 1.4;
}

.dlg-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 20px 24px 22px 24px;
}

.dlg-btn {
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.1px;
}

.dlg-btn:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.dlg-btn-ghost {
  background: #f3f4f6;
  color: #374151;
}

.dlg-btn-ghost:hover {
  background: #e5e7eb;
}

.dlg-btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.28);
}

.dlg-btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.36);
}

.dlg-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,0.28);
}

.dlg-btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239,68,68,0.36);
}

.dlg-btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.28);
}

.dlg-btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

/* Options list inside dialog (for period picker) */
.dlg-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.dlg-option-chip {
  padding: 5px 14px;
  background: #eff6ff;
  color: #3b82f6;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.12s;
  font-family: 'Poppins', sans-serif;
}

.dlg-option-chip:hover,
.dlg-option-chip.selected {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

@media (max-width: 480px) {
  .dlg-box { border-radius: 16px; }
  .dlg-header { padding: 18px 18px 0 18px; }
  .dlg-message { padding: 10px 18px 0 18px; }
  .dlg-body { padding: 14px 18px 0 18px; }
  .dlg-footer { padding: 16px 18px 18px 18px; flex-direction: column-reverse; }
  .dlg-btn { width: 100%; text-align: center; padding: 12px; }
}

/* ═══════════════════════════════════════════════════════
   ADMIN DASHBOARD — 4K BACKGROUND + GLASSMORPHISM CARDS
   ═══════════════════════════════════════════════════════ */

/* Modern sunlit atrium — 4K background */
body {
  background:
    url('https://images.unsplash.com/photo-1771970472779-0614779d821a?w=3840&q=90&auto=format&fit=crop')
    center / cover no-repeat fixed !important;
}

/* Subtle light overlay — keeps white cards readable */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    150deg,
    rgba(240, 245, 255, 0.55) 0%,
    rgba(220, 235, 255, 0.48) 50%,
    rgba(200, 220, 250, 0.40) 100%
  );
  z-index: 0;
  pointer-events: none;
  animation: dashOverlayPulse 16s ease-in-out infinite;
}

@keyframes dashOverlayPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.88; }
}

/* Floating orb — top right */
body::after {
  content: '';
  position: fixed;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 74, 173, 0.10), transparent 70%);
  top: -160px; right: -120px;
  z-index: 0;
  pointer-events: none;
  animation: dashOrbFloat 18s ease-in-out infinite;
}

@keyframes dashOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-25px, 30px) scale(1.06); }
  70%       { transform: translate(15px, -20px) scale(0.94); }
}

/* All main content above the overlays */
.header, .container, .container.refined,
.card, .card.refined, .section-card,
.modal, .mobile-menu,
#mainContent, .blur-overlay {
  position: relative;
  z-index: 1;
}

/* ── Header — frosted glass ─────────────────────── */
.header.refined, .header {
  background: rgba(255, 255, 255, 0.80) !important;
  backdrop-filter: blur(18px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.60) !important;
  box-shadow: 0 4px 24px rgba(0, 74, 173, 0.10) !important;
}

/* ── Cards — glass panels ───────────────────────── */
.card, .card.refined, .section-card {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
  border: 1px solid rgba(255, 255, 255, 0.70) !important;
  box-shadow: 0 8px 32px rgba(0, 50, 130, 0.10), 0 2px 8px rgba(0,0,0,0.04) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

.card:hover, .card.refined:hover {
  box-shadow: 0 16px 48px rgba(0, 50, 130, 0.16), 0 4px 16px rgba(0,0,0,0.06) !important;
  transform: translateY(-2px) !important;
}

/* ── Config item cards (school name, times, etc.) ── */
.config-item, .config-card {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 4px 16px rgba(0, 50, 130, 0.08) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
}

.config-item:hover, .config-card:hover {
  transform: translateY(-3px) scale(1.01) !important;
  box-shadow: 0 10px 28px rgba(0, 50, 130, 0.14) !important;
}

/* ── Table rows — subtle glass ──────────────────── */
.table { background: transparent !important; }
.table th { background: rgba(241, 245, 255, 0.85) !important; }
.table td { background: rgba(255, 255, 255, 0.55) !important; }
.table tr:hover td { background: rgba(240, 247, 255, 0.80) !important; }

/* ── Leave cards grid ───────────────────────────── */
.lv-card {
  background: rgba(255, 255, 255, 0.84) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
}

/* .blur-overlay is now a full hero section — styled in index.html <style> */

/* ── Entrance animations for main sections ──────── */
.container.refined > .card:nth-child(1) { animation: dashCardIn 0.5s ease 0.1s both; }
.container.refined > .card:nth-child(2) { animation: dashCardIn 0.5s ease 0.2s both; }
.container.refined > .card:nth-child(3) { animation: dashCardIn 0.5s ease 0.3s both; }
.container.refined > .card:nth-child(4) { animation: dashCardIn 0.5s ease 0.4s both; }
.container.refined > .card:nth-child(5) { animation: dashCardIn 0.5s ease 0.5s both; }
.section-card               { animation: dashCardIn 0.6s ease 0.15s both; }

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