/**
 * ═══════════════════════════════════════════════
 * NAGALAND AI SCHOOLS — Frontend Styles v2.0
 * Professional design for all pages & states
 * ═══════════════════════════════════════════════
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ─── FULL-WIDTH BREAKOUT (NEW) ─── */
/* Force theme content container to full width when a NAIS dashboard is inside */
body:has(.nais-school-admin) .entry-content,
body:has(.nais-teacher) .entry-content,
body:has(.nais-district-dashboard) .entry-content,
body:has(.nais-school-admin) .site-content,
body:has(.nais-teacher) .site-content,
body:has(.nais-district-dashboard) .site-content,
body:has(.nais-school-admin) .inside-article,
body:has(.nais-teacher) .inside-article,
body:has(.nais-district-dashboard) .inside-article,
body:has(.nais-school-admin) .container,
body:has(.nais-teacher) .container,
body:has(.nais-district-dashboard) .container,
body:has(.nais-school-admin) main,
body:has(.nais-teacher) main,
body:has(.nais-district-dashboard) main {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Hide sidebar when dashboard is present */
body:has(.nais-school-admin) #right-sidebar,
body:has(.nais-school-admin) #left-sidebar,
body:has(.nais-teacher) #right-sidebar,
body:has(.nais-teacher) #left-sidebar,
body:has(.nais-district-dashboard) #right-sidebar,
body:has(.nais-district-dashboard) #left-sidebar,
body:has(.nais-school-admin) .widget-area,
body:has(.nais-teacher) .widget-area,
body:has(.nais-district-dashboard) .widget-area {
  display: none !important;
}

/* Make the dashboard wrappers themselves full-width with breathing room */
.nais-school-admin,
.nais-teacher,
.nais-district-dashboard {
  max-width: 1400px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 24px 32px 40px !important;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .nais-school-admin,
  .nais-teacher,
  .nais-district-dashboard {
    padding: 20px 16px 32px !important;
  }
}

/* ─── GLOBAL OVERRIDE ─── */
.nais-school-admin, .nais-teacher, .nais-parent-register, .nais-parent-view,
.nais-payment-page, .nais-msg, .nais-login-prompt {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  max-width: 100%;
  margin: 0;
  padding: 24px 20px 40px;
  color: #1a1a1a;
}

.entry-content {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ─── HEADINGS ─── */
.nais-school-admin h2, .nais-school-admin h3,
.nais-teacher h2, .nais-teacher h3,
.nais-parent-view h2, .nais-parent-view h3,
.nais-parent-register h2, .nais-parent-register h3,
.nais-payment-page h2, .nais-payment-page h3 {
  font-family: 'DM Serif Display', Georgia, serif !important;
  color: #1a1a1a;
}

/* ─── BUTTONS ─── */
.nais-btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: #0a7558;
  color: #fff !important;
  transition: all 0.2s ease;
  text-decoration: none !important;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(10, 117, 88, 0.15);
}
.nais-btn:hover { background: #085e47; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(10, 117, 88, 0.25); color: #fff !important; }
.nais-btn:active { transform: translateY(0); }
.nais-btn-primary { background: #0a7558; }
.nais-btn-sm { padding: 8px 16px; font-size: 13px; }
.nais-btn-lg { padding: 16px 32px; font-size: 16px; width: 100%; text-align: center; }
.nais-btn-danger { background: #ef4444; color: #fff !important; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15); }
.nais-btn-danger:hover { background: #dc2626; }

/* ─── TABS ─── */
.nais-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding: 4px 4px 0;
}
.nais-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: #f9fafb;
  cursor: pointer;
  color: #6b7280;
  border-bottom: 3px solid transparent;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
}
.nais-tab:hover { color: #0a7558; background: #f0fdf4; }
.nais-tab.active { color: #0a7558; border-bottom-color: #0a7558; background: #fff; }

.nais-tab-content { display: none; animation: naisFadeIn 0.3s ease; }
.nais-tab-content.active { display: block; }

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

/* ─── FORMS ─── */
.nais-form { max-width: 520px; }
.nais-form-row { margin-bottom: 18px; }
.nais-form-row label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: #374151;
}
.nais-form-row input,
.nais-form-row select,
.nais-form-row textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  transition: all 0.2s;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
  color: #1a1a1a;
}
.nais-form-row input:focus,
.nais-form-row select:focus,
.nais-form-row textarea:focus {
  border-color: #0a7558;
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 117, 88, 0.1);
}

.nais-inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.nais-inline-form select, .nais-inline-form input {
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
}

.nais-checkbox { display: block; margin: 6px 0; font-weight: 400; font-size: 14px; }
.nais-checkbox input { width: auto; margin-right: 8px; }

.nais-code-input {
  font-size: 32px !important;
  text-align: center;
  letter-spacing: 10px;
  font-weight: 700;
  font-family: 'DM Serif Display', Georgia, serif !important;
  color: #0a7558;
}

/* ─── TABLES ─── */
.nais-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.nais-table th, .nais-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}
.nais-table th {
  font-weight: 700;
  color: #374151;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}
.nais-table td { border-bottom: 1px solid #f3f4f6; }
.nais-table tr:last-child td { border-bottom: none; }
.nais-table tr:hover td { background: #f0fdf4; }

/* ─── ALERTS ─── */
.nais-alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin: 20px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.nais-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.nais-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.nais-hint { font-size: 13px; color: #9ca3af; margin-top: 14px; }

/* ─── LOGIN PROMPT & MSG ─── */
.nais-msg, .nais-login-prompt {
  text-align: center;
  padding: 60px 24px;
  max-width: 500px;
  margin: 40px auto;
  background: #fff;
  border-radius: 20px;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.nais-msg p, .nais-login-prompt p {
  font-size: 16px;
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 24px;
}

.nais-login-prompt p a,
.nais-msg p a {
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  padding: 14px 32px;
  background: #0a7558;
  border-radius: 12px;
  display: inline-block;
  margin-top: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(10, 117, 88, 0.2);
  font-size: 15px;
}
.nais-login-prompt p a:hover,
.nais-msg p a:hover {
  background: #085e47;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 117, 88, 0.3);
}

/* ─── SCHOOL HEADER ─── */
.nais-school-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f3f4f6;
}
.nais-school-header h2 { margin: 0 0 10px; font-size: 28px; }
.nais-school-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.nais-stat-badge {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  background: #f0fdf4;
  color: #0a7558;
  border-radius: 24px;
  border: 1.5px solid #d1fae5;
}

/* ─── TEACHER ─── */
.nais-teacher-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f3f4f6;
}
.nais-teacher-header h2 { margin: 0 0 6px; font-size: 28px; }
.nais-school-name { color: #6b7280; font-size: 15px; }

.nais-controls {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 14px;
  border: 1.5px solid #e5e7eb;
}
.nais-control-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.nais-control-group select,
.nais-control-group input {
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  min-width: 170px;
  font-family: 'Outfit', sans-serif;
}

.nais-quick-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #fefce8;
  border-radius: 10px;
  border: 1px solid #fef08a;
}
.nais-attendance-summary {
  font-size: 14px;
  font-weight: 600;
  color: #0a7558;
  margin-left: auto;
}

/* ─── CHECKLIST ─── */
.nais-checklist {
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.nais-checklist-row {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #f3f4f6;
  gap: 14px;
  transition: background 0.15s;
}
.nais-checklist-row:last-child { border-bottom: none; }
.nais-checklist-row:hover { background: #f0fdf4; }
.nais-checklist-row:nth-child(even) { background: #fafbfc; }

.nais-student-info { flex: 1; min-width: 0; }
.nais-student-name { font-weight: 600; font-size: 15px; color: #1a1a1a; }
.nais-student-roll { font-size: 12px; color: #9ca3af; }

.nais-status-buttons { display: flex; gap: 5px; }
.nais-status-btn {
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  font-family: 'Outfit', sans-serif;
}
.nais-status-btn:hover { border-color: #9ca3af; }
.nais-status-btn.active-present { background: #10b981; color: #fff; border-color: #10b981; box-shadow: 0 2px 8px rgba(16,185,129,0.3); }
.nais-status-btn.active-absent { background: #ef4444; color: #fff; border-color: #ef4444; box-shadow: 0 2px 8px rgba(239,68,68,0.3); }
.nais-status-btn.active-late { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.nais-status-btn.active-excused { background: #6366f1; color: #fff; border-color: #6366f1; }

.nais-remarks-input {
  width: 120px;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

/* ─── SAVE BAR ─── */
.nais-save-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 18px 0;
  text-align: center;
  border-top: 2px solid #e5e7eb;
  margin-top: 24px;
  z-index: 10;
}
#nais-save-status { display: block; margin-top: 10px; font-size: 14px; font-weight: 600; }

/* ─── REGISTER CARD ─── */
.nais-register-card {
  max-width: 480px;
  margin: 40px auto;
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.nais-register-card h2 { text-align: center; margin-bottom: 8px; font-size: 26px; }
.nais-register-card > p { text-align: center; color: #6b7280; font-size: 14px; margin-bottom: 28px; }

/* ─── CHILD CARD ─── */
.nais-child-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.nais-child-header h3 { margin: 0 0 6px; font-size: 24px; }
.nais-child-header p { color: #6b7280; font-size: 14px; margin: 0 0 20px; }
.nais-parent-code-display { font-size: 13px; color: #374151; margin: -12px 0 20px; }
.nais-parent-code-display .nais-code-highlight { font-size: 14px; padding: 2px 10px; }

.nais-today-status {
  margin-bottom: 24px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 14px;
}
.nais-today-status h4 {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-family: 'Outfit', sans-serif;
}

.nais-status-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}
.nais-status-present { background: #d1fae5; color: #065f46; }
.nais-status-absent { background: #fee2e2; color: #991b1b; }
.nais-status-late { background: #fef3c7; color: #92400e; }
.nais-status-excused { background: #e0e7ff; color: #3730a3; }
.nais-status-pending { background: #f3f4f6; color: #6b7280; }

.nais-periods { margin-top: 12px; }
.nais-period-badge {
  display: inline-block;
  padding: 4px 12px;
  margin: 3px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
}

.nais-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.nais-stat-item {
  text-align: center;
  padding: 20px 10px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
}
.nais-stat-number {
  font-size: 32px;
  font-weight: 800;
  color: #0a7558;
  font-family: 'DM Serif Display', Georgia, serif;
}
.nais-stat-label {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 4px;
}
.nais-stat-present .nais-stat-number { color: #10b981; }
.nais-stat-absent .nais-stat-number { color: #ef4444; }
.nais-stat-late .nais-stat-number { color: #f59e0b; }

.nais-ai-tip {
  margin-top: 24px;
  padding: 20px;
  background: #f0fdf4;
  border-radius: 14px;
  border: 1.5px solid #d1fae5;
  font-size: 14px;
}
.nais-ai-tip p { margin: 0 0 10px; }

.nais-privacy-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  font-size: 12px;
  color: #9ca3af;
}

/* ─── STUDENT CODE LOOKUP ─── */
.nais-code-lookup { margin-bottom: 8px; }
.nais-code-lookup .nais-inline-form { flex-wrap: wrap; }
.nais-code-lookup #nais-code-lookup-name {
  flex: 1;
  min-width: 200px;
}
.nais-code-lookup-table th:last-child,
.nais-code-lookup-table td:last-child { text-align: center; }
.nais-code-highlight {
  display: inline-block;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 3px;
  padding: 4px 14px;
  border-radius: 8px;
  border: 1px solid #a7f3d0;
  font-family: 'Outfit', monospace;
}

/* ─── SLIPS ─── */
.nais-slips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.nais-slip {
  border: 2px dashed #d1d5db;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  background: #fff;
}
.nais-slip-school { font-weight: 700; font-size: 14px; color: #374151; }
.nais-slip-student { font-size: 18px; font-weight: 800; }
.nais-slip-class { font-size: 13px; color: #6b7280; margin-bottom: 12px; }
.nais-slip-code {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 8px;
  font-family: 'DM Serif Display', Georgia, serif;
  color: #0a7558;
  margin: 12px 0;
}
.nais-slip-instructions { font-size: 11px; color: #9ca3af; line-height: 1.5; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nais-controls { flex-direction: column; align-items: stretch; }
  .nais-control-group select, .nais-control-group input { min-width: auto; width: 100%; }
  .nais-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .nais-slips-grid { grid-template-columns: 1fr; }
  .nais-checklist-row { flex-wrap: wrap; }
  .nais-tabs { gap: 0; }
  .nais-tab { padding: 10px 14px; font-size: 13px; }
  .nais-register-card { margin: 20px 16px; padding: 28px 20px; }
}

@media (max-width: 480px) {
  .nais-status-btn { padding: 6px 10px; font-size: 10px; }
  .nais-stat-number { font-size: 24px; }
}

/* ─── HOLIDAY & HALF DAY ─── */
.nais-holiday-banner {
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}

.nais-holiday-banner strong { display: block; font-size: 16px; margin-bottom: 4px; }
.nais-holiday-banner p { margin: 0; opacity: 0.85; }

.nais-holiday-holiday {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.nais-holiday-half_day {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

.nais-day-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.nais-btn-holiday {
  background: #10b981 !important;
  color: #fff !important;
  font-size: 12px !important;
  padding: 8px 14px !important;
}

.nais-btn-halfday {
  background: #f59e0b !important;
  color: #fff !important;
  font-size: 12px !important;
  padding: 8px 14px !important;
}

.nais-holiday-input {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  flex: 1;
  min-width: 150px;
}

.nais-alert-holiday {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.nais-subject-label {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* ─── EMERGENCY ALERTS ─── */
.nais-alert-form textarea {
  width: 100%;
  padding: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  resize: vertical;
}

.nais-alert-preview-card { margin: 12px 0; }

.nais-alert-card {
  padding: 16px;
  border-radius: 10px;
  margin: 8px 0;
}

.nais-alert-card-emergency {
  background: #fef2f2;
  border: 2px solid #ef4444;
  color: #991b1b;
}

.nais-alert-card-announcement {
  background: #eff6ff;
  border: 2px solid #3b82f6;
  color: #1e40af;
}

.nais-alert-card-reminder {
  background: #fffbeb;
  border: 2px solid #f59e0b;
  color: #92400e;
}

.nais-alert-card-holiday {
  background: #ecfdf5;
  border: 2px solid #10b981;
  color: #065f46;
}

.nais-alert-icon { font-size: 20px; }

/* ─── RENEWAL BANNERS ─── */
.nais-renewal-banner {
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}

.nais-banner-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.nais-banner-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.nais-banner-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.nais-banner-urgent {
  background: #fef2f2;
  border: 2px solid #fecaca;
  color: #991b1b;
  animation: naisPulse 2s infinite;
}

@keyframes naisPulse {
  0%, 100% { border-color: #fecaca; }
  50% { border-color: #ef4444; }
}

/* Lock Screen */
.nais-lock-banner {
  text-align: center;
  padding: 60px 24px;
  max-width: 480px;
  margin: 40px auto;
}

.nais-lock-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.nais-lock-banner h2 {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-size: 28px;
  margin: 0 0 12px;
  color: #1a1a1a;
}

.nais-lock-banner p {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin: 0 0 20px;
}

/* ─── HOLIDAY ADMIN ─── */
.nais-holiday-add .nais-inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.nais-holiday-add input[type="date"],
.nais-holiday-add input[type="text"],
.nais-holiday-add select {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
}

.nais-holiday-add input[type="text"] { flex: 1; min-width: 180px; }

.nais-holiday-month-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nais-holiday-month-nav select,
.nais-holiday-month-nav input {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.nais-btn.nais-btn-xs {
  padding: 4px 10px;
  font-size: 11px;
}

/* ─── BULK UPLOAD ─── */
.nais-bulk-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid #e5e7eb;
}

.nais-bulk-section h3 {
  font-family: 'DM Serif Display', Georgia, serif !important;
  margin-bottom: 6px;
}

.nais-bulk-steps { margin-top: 16px; }

.nais-bulk-template {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

#nais-bulk-paste {
  width: 100%;
  padding: 12px;
  font-family: 'Outfit', monospace;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  resize: vertical;
}

#nais-bulk-file {
  padding: 8px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  width: 100%;
  background: #f9fafb;
}

.nais-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ─── ATTENDANCE REPORTS ─── */
.nais-report-header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0A7558;
}

.nais-report-header h4 {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-size: 18px;
  color: #0F2419;
  margin: 0 0 4px;
}

.nais-report-header p {
  color: #666;
  font-size: 13px;
  margin: 0;
}

.nais-report-table th,
.nais-report-table td {
  font-size: 11px;
  padding: 4px 5px;
}

.nais-rpt-name {
  text-align: left !important;
  min-width: 100px;
}

.nais-rpt-day {
  width: 24px;
  font-size: 10px !important;
}

.nais-rpt-stat {
  width: 32px;
}

.nais-rpt-P { background: #D1FAE5; color: #065F46; font-weight: 700; }
.nais-rpt-A { background: #FEE2E2; color: #991B1B; font-weight: 700; }
.nais-rpt-L { background: #FEF3C7; color: #92400E; font-weight: 700; }
.nais-rpt-E { background: #EDE9FE; color: #5B21B6; font-weight: 700; }
.nais-rpt-H { background: #F3F4F6; color: #9CA3AF; }
.nais-rpt-S { background: #F9FAFB; color: #D1D5DB; }

.nais-report-summary {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.nais-rpt-card {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 10px 16px;
  text-align: center;
}

.nais-rpt-num {
  font-size: 22px;
  font-weight: 700;
  color: #0F2419;
}

.nais-rpt-label {
  font-size: 11px;
  color: #666;
}

/* ─── DISTRICT GOVERNMENT DASHBOARD ─── */
.nais-district-dashboard { max-width: 100%; margin: 0; }

.nais-dd-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #0A7558;
}

.nais-dd-header h2 {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-size: 24px;
  color: #0F2419;
  margin: 0 0 6px;
}

.nais-dd-header p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.nais-dd-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.nais-dd-filters select {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
}

.nais-dd-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.nais-dd-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.nais-dd-card-green { background: #ecfdf5; border-color: #a7f3d0; }
.nais-dd-card-red { background: #fef2f2; border-color: #fecaca; }

.nais-dd-num {
  font-size: 28px;
  font-weight: 700;
  color: #0F2419;
  line-height: 1.2;
}

.nais-dd-card-green .nais-dd-num { color: #059669; }
.nais-dd-card-red .nais-dd-num { color: #DC2626; }

.nais-dd-label {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.nais-dd-detail-card {
  background: #f9fafb;
  border: 2px solid #0A7558;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}

.nais-dd-detail-card h4 {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-size: 20px;
  color: #0F2419;
  margin: 0 0 8px;
}

.nais-dd-detail-card h5 {
  font-size: 14px;
  color: #0A7558;
  font-weight: 600;
  margin: 0 0 8px;
}

.nais-dd-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #999;
}

@media (max-width: 768px) {
  .nais-dd-cards { grid-template-columns: repeat(2, 1fr); }
  .nais-dd-filters { flex-direction: column; }
}


/* ─── BUS TRACKING ─── */
.nais-bus-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: box-shadow 0.2s;
}
.nais-bus-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.nais-bus-status { padding: 12px 0; }

.nais-bus-map-wrap {
  border: 2px solid #0A7558;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
}

#nais-bus-map-container {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}


/* ─── HOMEWORK TRACKING ─── */

/* Admin: Homework list items */
.nais-hw-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: box-shadow 0.2s;
}
.nais-hw-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.nais-hw-item-overdue {
  border-color: #fecaca;
  background: #fffbfb;
}

.nais-hw-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.nais-hw-item-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

/* Submissions summary in panel */
.nais-hw-sub-summary {
  font-size: 15px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

/* Parent: Homework cards */
.nais-hw-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nais-hw-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  transition: box-shadow 0.2s;
}
.nais-hw-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.04); }

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

.nais-hw-card-title {
  font-size: 15px;
  color: #0F2419;
}

.nais-hw-card-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

.nais-hw-card-desc {
  font-size: 13px;
  color: #374151;
  margin-top: 10px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
  line-height: 1.5;
}

.nais-hw-card-attach {
  margin-top: 8px;
  font-size: 13px;
}

.nais-hw-card-attach a {
  color: #0a7558;
  font-weight: 600;
  text-decoration: none;
}
.nais-hw-card-attach a:hover { text-decoration: underline; }

/* Homework status badges */
.nais-hw-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.nais-hw-badge-done {
  background: #d1fae5;
  color: #065f46;
}

.nais-hw-badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.nais-hw-badge-overdue {
  background: #fee2e2;
  color: #991b1b;
}

/* Responsive homework */
@media (max-width: 768px) {
  .nais-hw-card-header { flex-direction: column; gap: 6px; }
  .nais-hw-item-top { flex-direction: column; gap: 6px; }
}


/* ─── EXAM RESULTS ─── */
.nais-result-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
}

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

.nais-exam-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: box-shadow 0.2s;
}
.nais-exam-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.nais-exam-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.nais-exam-item-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

/* Dues table */
.nais-dues-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; flex-wrap: wrap; }
.nais-dues-row:last-child { border-bottom: none; }
.nais-dues-name { flex: 1; min-width: 120px; font-weight: 600; font-size: 14px; }
.nais-dues-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.nais-dues-toggle input[type="checkbox"] { width: auto; }
.nais-dues-amount { width: 90px; padding: 4px 8px; font-size: 13px; border: 1px solid #d1d5db; border-radius: 6px; }
.nais-dues-desc { width: 160px; padding: 4px 8px; font-size: 13px; border: 1px solid #d1d5db; border-radius: 6px; }

@media (max-width: 768px) {
  .nais-result-card-header { flex-direction: column; gap: 6px; }
  .nais-exam-item-top { flex-direction: column; gap: 6px; }
}


/* ─── TIMETABLE ─── */
.nais-tt-table th,
.nais-tt-table td {
  text-align: center;
  font-size: 12px;
  padding: 8px 6px;
  min-width: 70px;
}

.nais-tt-cell {
  min-height: 36px;
  vertical-align: middle;
}

.nais-tt-input {
  width: 90px;
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-align: center;
  font-family: 'Outfit', sans-serif;
}

.nais-tt-input:focus {
  border-color: #0a7558;
  outline: none;
  box-shadow: 0 0 0 2px rgba(10, 117, 88, 0.1);
}

.nais-es-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  flex-wrap: wrap;
}
.nais-es-item:last-child { border-bottom: none; }


/* ─── PRINT ─── */
@media print {
  body * { visibility: hidden; }
  .nais-slips-print, .nais-slips-print * { visibility: visible; }
  .nais-slips-print { position: absolute; top: 0; left: 0; width: 100%; }
  .nais-slips-print button { display: none; }
  .nais-slip { border: 2px solid #000; }
}


/* ═══════════════════════════════════════════════
   V2 ADDITIONS — New styles for Schools V2 upgrade
═══════════════════════════════════════════════ */

/* ─── V2: TEACHER CLASS ASSIGNMENT FORM ─── */
.nais-teacher-class-list {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.nais-teacher-class-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  flex-wrap: wrap;
}
.nais-teacher-class-row:last-child { border-bottom: none; }
.nais-teacher-class-row:nth-child(even) { background: #fafbfc; }

.nais-teacher-subject-select {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  min-width: 140px;
}

.nais-ct-label {
  font-size: 12px !important;
  color: #0a7558;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .nais-teacher-class-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nais-teacher-subject-select { min-width: auto; width: 100%; }
}


/* ─── V2: HOMEWORK CHECKLIST (Teacher View) ─── */
.nais-hw-quick-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #eff6ff;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  flex-wrap: wrap;
}

.nais-hw-status-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.nais-hw-status-btn {
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}
.nais-hw-status-btn:hover { border-color: #9ca3af; }

.nais-hw-btn-active {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nais-hw-row {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #f3f4f6;
  gap: 14px;
}

@media (max-width: 480px) {
  .nais-hw-status-btn { padding: 6px 8px; font-size: 10px; }
}


/* ─── V2: EXAM RESULT DOCUMENT UPLOAD ─── */
.nais-result-upload-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nais-result-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  background: #fff;
  flex-wrap: wrap;
}
.nais-result-upload-row:hover { background: #f0fdf4; }

.nais-result-upload-info {
  flex: 1;
  min-width: 160px;
}

.nais-result-upload-status {
  font-size: 12px;
  margin-top: 2px;
}

.nais-result-uploaded {
  color: #059669;
  font-weight: 600;
}

.nais-result-upload-action {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.nais-result-file-input {
  padding: 4px;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  background: #f9fafb;
  max-width: 200px;
}

@media (max-width: 768px) {
  .nais-result-upload-row { flex-direction: column; align-items: flex-start; }
  .nais-result-file-input { max-width: 100%; }
}


/* ─── V2: PARENT RESULT LOCKED STATE ─── */
.nais-result-locked {
  text-align: center;
  padding: 28px 20px;
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 14px;
}

.nais-result-locked-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.nais-result-locked h5 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px;
  color: #991b1b;
  margin: 0 0 8px;
}

.nais-result-locked p {
  font-size: 14px;
  color: #7f1d1d;
  margin: 0 0 6px;
  line-height: 1.5;
}

/* ─── V2: PARENT RESULT LIST ─── */
.nais-result-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


/* ─── V2: PARENT EXAM SCHEDULE LIST ─── */
.nais-exam-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nais-es-parent-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.nais-es-parent-date {
  text-align: center;
  min-width: 48px;
  padding: 8px;
  background: #0a7558;
  border-radius: 8px;
  color: #fff;
}

.nais-es-parent-day {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.nais-es-parent-month {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.nais-es-parent-info {
  flex: 1;
}

@media (max-width: 480px) {
  .nais-es-parent-item { flex-direction: column; align-items: flex-start; gap: 8px; }
}


/* ─── V2: REASSIGN TEACHER PANEL ─── */
#nais-reassign-panel {
  transition: all 0.2s ease;
}
#nais-reassign-panel .nais-teacher-class-list {
  max-height: 320px;
  overflow-y: auto;
}