/* school_workflow — premium dashboard design system */

:root {
  /* Global theme tokens (aligned with theme.css; wine/burgundy primary) */
  --primary: #8B2F2F;
  --accent: #5C3A2E;
  /* Global page background (white canvas) */
  --background: #FFFFFF;
  --card: #FFFFFF;
  --text: #1F2937;
  /* Neutral subtle borders */
  --border: #E5E7EB;

  /* Backwards-compatible aliases used across existing CSS */
  --bg: var(--background);

  /* Bootstrap theme variables */
  --bs-primary: var(--primary);
  --bs-primary-rgb: 139, 47, 47;
  --bs-link-color: var(--primary);
  --bs-link-hover-color: color-mix(in srgb, var(--primary) 85%, black);
  --bs-border-color: var(--border);
  --bs-body-bg: var(--background);
  --bs-body-color: var(--text);

  /* Map existing design-system vars */
  --sw-indigo: var(--primary);
  --sw-teal: var(--accent);
  --sw-bg: var(--background);
  --sw-slate-900: var(--text);
  --sw-card-border: color-mix(in srgb, var(--border) 70%, transparent);
  --sw-focus-ring: color-mix(in srgb, var(--primary) 45%, transparent);

  --sw-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sw-card-radius: 16px;
  --sw-card-radius-sm: 12px;
  --sw-card-border: color-mix(in srgb, var(--border) 75%, transparent);
  --sw-shadow-sm: 0 4px 18px rgba(15, 23, 42, 0.06);
  --sw-shadow-md: 0 12px 40px rgba(15, 23, 42, 0.1);
  --sw-shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;

  /* Extended palette used by dashboard widgets */
  --sw-indigo-dark: color-mix(in srgb, var(--primary) 70%, black);
  --sw-amber: #b45309;
  --sw-rose: #be123c;
  --sw-slate-700: color-mix(in srgb, var(--text) 78%, #ffffff);
  --sw-slate-500: color-mix(in srgb, var(--text) 58%, #ffffff);
  --sw-slate-100: color-mix(in srgb, var(--background) 40%, #ffffff);

  --sw-bg-mesh:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 50%),
    linear-gradient(180deg, color-mix(in srgb, var(--background) 70%, #ffffff) 0%, var(--background) 100%);
}

body.sw-body {
  font-family: var(--sw-font);
  background: var(--background);
  color: var(--text);
  letter-spacing: -0.01em;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

/* Override school.css font choice for authenticated portals */
body.sw-body.school-app {
  font-family: var(--sw-font) !important;
}

/* Note: main padding is density-controlled in olive.css */

button,
a,
input,
select,
textarea,
.card,
.btn {
  transition: all 0.2s ease-in-out;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary) 20%, transparent) !important;
}

table thead th {
  background: color-mix(in srgb, var(--border) 35%, var(--bg));
}
table tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--bg));
}

/* Student add/edit (students/form.html) */
.sw-student-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

.sw-student-page-header h1 {
  font-size: 26px;
  margin-bottom: 5px;
  color: #1e293b;
}

.sw-student-page-header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.sw-student-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  margin-top: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.sw-student-section {
  margin-bottom: 40px;
}

/* Extra separation between main blocks */
.sw-student-section + .sw-student-section {
  margin-top: 10px;
}

.sw-student-section h2 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #0f172a;
  border-left: 4px solid #3b82f6;
  padding-left: 10px;
}

.sw-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.sw-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

.sw-field {
  display: flex;
  flex-direction: column;
}

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

.sw-student-form .sw-field-address {
  margin-top: 10px;
}

/* Label sits higher; textarea position unchanged (wrapper margin preserved). */
.sw-student-form .sw-field-address .form-label {
  position: relative;
  top: -10px;
}

.sw-student-form label,
.sw-student-form .form-label {
  font-size: 13px;
  margin-bottom: 6px;
  color: #334155;
}

/* Show "Label:" styling for add/edit student fields */
.sw-student-form label:not(.form-check-label)::after,
.sw-student-form .form-label::after {
  content: ":";
  margin-left: 2px;
  color: inherit;
  font-weight: inherit;
}

/* Match faculty add/edit input styling (.sw-faculty-add-page) */
.sw-student-form input,
.sw-student-form select,
.sw-student-form textarea,
.sw-student-form .form-control,
.sw-student-form .form-select {
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 14px;
}

.sw-student-form textarea,
.sw-student-form .form-control textarea {
  height: 110px;
}

.sw-student-form input:focus,
.sw-student-form select:focus,
.sw-student-form textarea:focus,
.sw-student-form .form-control:focus,
.sw-student-form .form-select:focus {
  border-color: #3b82f6;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.sw-student-form .form-check-input {
  height: 1em;
  width: 1em;
  min-height: 0;
  padding: 0;
  margin-top: 0.2em;
  border-radius: 0.25em;
  flex-shrink: 0;
}

.sw-student-form .form-check {
  margin-top: 10px;
}

.sw-student-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sw-btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sw-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.sw-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.sw-btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.sw-btn-secondary:hover {
  color: #1e293b;
}

@media (max-width: 768px) {
  .sw-grid-2,
  .sw-grid-3 {
    grid-template-columns: 1fr;
  }
  .sw-field-full {
    grid-column: span 1;
  }
}

/* Skip link (WCAG 2.4.1) */
.sw-skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 1080;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #fff;
  background: var(--sw-slate-900);
  border-radius: 8px;
  text-decoration: none;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.sw-skip-link:focus {
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  outline: 3px solid var(--sw-focus-ring);
  outline-offset: 2px;
}

a:has(> .sw-hub-card):focus-visible {
  outline: 3px solid var(--sw-focus-ring);
  outline-offset: 3px;
  border-radius: var(--sw-card-radius-sm);
}

/* Django default error list — align with Bootstrap invalid styling */
ul.errorlist {
  list-style: none;
  padding-left: 0;
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #b02a37;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* —— Navbar —— */
.sw-admin-navbar {
  position: sticky;
  top: 0;
  z-index: 1030; /* bootstrap sticky-top default */
}

.sw-navbar {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 48%, #1e3a8a 100%) !important;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.22);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sw-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.1rem;
}

.sw-navbar .nav-link {
  border-radius: 8px;
  padding: 0.4rem 0.65rem !important;
  margin: 0 0.1rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.sw-navbar .nav-link:hover,
.sw-navbar .nav-link:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

.sw-navbar .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
  font-size: 0.8rem;
}

.sw-navbar .text-white.text-opacity-75 {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— Cards —— */
.card {
  border-radius: var(--sw-card-radius);
  border-color: var(--sw-card-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.card.shadow-sm {
  box-shadow: var(--sw-shadow-sm) !important;
}

.card.sw-card-elevated {
  box-shadow: var(--sw-shadow-md) !important;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.card-header.bg-white {
  border-top-left-radius: var(--sw-card-radius);
  border-top-right-radius: var(--sw-card-radius);
  border-bottom: 1px solid var(--sw-card-border);
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%) !important;
}

.sw-dash-shell {
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
}

/* Admin home grid (dashboard/admin.html) */
.sw-admin-grid {
  /* remove extra top whitespace since admin_navbar is included inside content */
  margin-top: 0.75rem;
  /* stretch to full viewport width (escape sw-dash-shell max-width) */
  width: calc(100vw - 20px);
  margin-left: calc(50% - 50vw + 10px);
  margin-right: calc(50% - 50vw + 10px);
  /* you can tweak this to tighten/loosen the spacing between sidebar and content */
  --bs-gutter-x: 1.25rem;
  --bs-gutter-y: 1.25rem;
}

/* Admin home: Django admin call-to-action */
.sw-admin-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.92) 100%);
  box-shadow: var(--sw-shadow-sm);
  color: var(--sw-slate-900);
  text-decoration: none;
  min-height: 56px;
}

.sw-date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--sw-shadow-sm);
  color: var(--sw-slate-700);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.sw-date-pill:focus-visible {
  outline: 3px solid var(--sw-focus-ring);
  outline-offset: 3px;
}

.sw-welcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sw-date-pill--welcome {
  margin-left: auto;
}

@media (max-width: 576px) {
  .sw-welcome-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .sw-date-pill--welcome {
    margin-left: 0;
  }
}

.sw-admin-cta:hover {
  color: var(--sw-slate-900);
  transform: translateY(-1px);
  box-shadow: var(--sw-shadow-md);
  border-color: rgba(79, 70, 229, 0.28);
}

.sw-admin-cta:focus-visible {
  outline: 3px solid var(--sw-focus-ring);
  outline-offset: 3px;
}

.sw-admin-cta__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(80px 40px at 0% 0%, rgba(79, 70, 229, 0.22), rgba(79, 70, 229, 0.06));
  color: var(--sw-indigo);
  font-size: 1.2rem;
  flex: 0 0 auto;
}

.sw-admin-cta__text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.sw-admin-cta__title {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Finance overview (dashboard/admin.html) */
.sw-finance-split.my-5 {
  margin-top: 20px !important;
  margin-bottom: 20px !important;
}

.sw-finance-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

@media (min-width: 768px) {
  .sw-finance-split {
    grid-template-columns: 58% 40%;
    align-items: stretch;
  }
}

.sw-finance-spacer {
  /* Intentionally empty column to preserve layout spacing */
  min-height: 1px;
}

/* Master Data card (dashboard/admin.html — beside Finance Overview) */
.sw-master-data-aside {
  min-width: 0;
}

.sw-master-data-card {
  border-radius: 0 !important;
  overflow: hidden;
}

.sw-master-data-card > .card-body {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.sw-master-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.sw-master-data-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 5.5rem;
  padding: 0.85rem 0.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--sw-slate-900);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--sw-card-radius-sm);
  box-shadow: var(--sw-shadow-sm);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.sw-master-data-tile:hover {
  color: var(--sw-indigo);
  border-color: rgba(79, 70, 229, 0.35);
  background: rgba(79, 70, 229, 0.06);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.sw-master-data-tile:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.55);
  outline-offset: 2px;
}

.sw-master-data-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--sw-indigo);
  font-size: 1.1rem;
}

.sw-master-data-tile:hover .sw-master-data-tile__icon {
  background: rgba(79, 70, 229, 0.16);
}

.sw-master-data-tile__label {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Master data hub (templates/masterdata/hub.html) */
.masterdata-hub-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.masterdata-hub-card:hover {
  border-color: rgba(79, 70, 229, 0.35) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(-1px);
}
.masterdata-hub-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--sw-indigo);
  font-size: 1.1rem;
}

/* Marks & Results — reference panel links (enter_marks.html) */
.sw-marks-ref-link {
  border-color: var(--sw-card-border) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.sw-marks-ref-link:hover {
  border-color: rgba(79, 70, 229, 0.35) !important;
  box-shadow: var(--sw-shadow-sm) !important;
  transform: translateY(-1px);
  color: var(--sw-indigo) !important;
}
.sw-marks-ref-link__icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--sw-indigo);
  font-size: 1.1rem;
}

.sw-finance-overview > .card {
  border-radius: 0 !important;
  overflow: hidden;
}

.sw-finance-overview > .card > .card-body {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.sw-finance-overview > .card > .card-body:first-child {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.sw-finance-summary-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--sw-card-radius-sm);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--sw-shadow-sm);
  height: 100%;
}

.sw-finance-summary-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sw-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.sw-finance-summary-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--sw-slate-900);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.sw-finance-summary-sub {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sw-slate-500);
  margin-left: 0.25rem;
}

.sw-finance-summary-meta {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--sw-slate-500);
}

.sw-finance-overview .progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  margin-top: 0.65rem;
}

.sw-finance-overview .progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sw-indigo), rgba(13, 148, 136, 0.9));
}

.sw-finance-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.08);
  color: var(--sw-indigo);
  font-size: 1.25rem;
}

.sw-finance-view-all {
  color: var(--sw-indigo);
}

.sw-finance-view-all:hover {
  color: var(--sw-indigo);
  text-decoration: underline !important;
}

.sw-finance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
}

.sw-finance-actions .btn {
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.05rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  color: #fff !important;
  text-decoration: none !important;
  border: 1px solid transparent;
}

.sw-finance-actions .btn i {
  opacity: 0.9;
}

.sw-finance-actions .btn:hover,
.sw-finance-actions .btn:focus {
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.sw-finance-actions .btn:active {
  transform: translateY(0);
}

.sw-finance-actions .btn-primary {
  background: linear-gradient(90deg, var(--sw-indigo), rgba(13, 148, 136, 0.92));
  border-color: rgba(255, 255, 255, 0.0);
}

.sw-finance-actions .btn-primary:hover,
.sw-finance-actions .btn-primary:focus {
  filter: brightness(0.98);
}

.sw-finance-actions .btn-outline-primary {
  background: rgba(79, 70, 229, 0.78);
  border-color: rgba(79, 70, 229, 0.22);
}

.sw-finance-actions .btn-outline-primary:hover,
.sw-finance-actions .btn-outline-primary:focus {
  background: rgba(79, 70, 229, 0.9);
  border-color: rgba(79, 70, 229, 0.3);
}

.sw-finance-actions .btn-outline-warning {
  background: rgba(245, 158, 11, 0.78);
  border-color: rgba(245, 158, 11, 0.22);
}

.sw-finance-actions .btn-outline-warning:hover,
.sw-finance-actions .btn-outline-warning:focus {
  background: rgba(245, 158, 11, 0.9);
  border-color: rgba(245, 158, 11, 0.3);
}

.sw-finance-panel {
  border-color: rgba(15, 23, 42, 0.08) !important;
  border-radius: var(--sw-card-radius-sm);
  background: rgba(255, 255, 255, 0.96);
}

.sw-finance-payments-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--sw-slate-500);
}

/* Recent payments: two compact tiles (dashboard) */
.sw-finance-payment-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.04), rgba(255, 255, 255, 0.9));
}

.sw-finance-payment-tile__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  line-height: 1.15;
}

.sw-finance-payment-tile__day {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--sw-slate-900);
}

.sw-finance-payment-tile__monyr {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sw-finance-payment-tile__rupee {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sw-slate-900);
  margin-bottom: 0.25rem;
}

.sw-finance-payment-tile__badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.35em 0.65em;
}

@media (max-width: 575.98px) {
  .sw-finance-payment-tile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .sw-finance-payment-tile__date {
    flex-direction: row;
    gap: 0.35rem;
  }

  .sw-finance-payment-tile__amt {
    text-align: center !important;
  }
}

.sw-finance-pending-badge {
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.35em 0.75em;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.sw-finance-outstanding-scroll {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.sw-finance-outstanding-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.sw-finance-outstanding-item:last-child {
  border-bottom: none;
}

.sw-finance-due {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #c2410c;
}

.sw-finance-footer-note {
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.sw-admin-cta__sub {
  font-size: 0.8rem;
  color: var(--sw-slate-500);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 26ch;
}

.sw-admin-cta__chev {
  color: var(--sw-slate-500);
  margin-left: 0.1rem;
  flex: 0 0 auto;
}

@media (max-width: 575.98px) {
  .sw-admin-cta__sub {
    display: none;
  }
}

/* —— Module tiles (faculty / student quick actions) —— */
a.sw-mod-tile {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.sw-mod-tile-inner {
  border: 1px solid var(--sw-card-border);
  border-radius: var(--sw-card-radius-sm);
  padding: 1.15rem 1.2rem;
  height: 100%;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.sw-mod-tile-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px 120px at 0% 0%, rgba(79, 70, 229, 0.07), transparent 60%);
  pointer-events: none;
}

.sw-mod-tile:hover .sw-mod-tile-inner {
  transform: translateY(-3px);
  box-shadow: var(--sw-shadow-md);
  border-color: rgba(79, 70, 229, 0.28);
}

.sw-mod-tile:focus-visible .sw-mod-tile-inner {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

.sw-mod-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.sw-mod-icon--indigo {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(79, 70, 229, 0.05));
  color: var(--sw-indigo);
}
.sw-mod-icon--teal {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.18), rgba(13, 148, 136, 0.05));
  color: #0f766e;
}
.sw-mod-icon--amber {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.18), rgba(217, 119, 6, 0.05));
  color: #b45309;
}
.sw-mod-icon--rose {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.14), rgba(225, 29, 72, 0.04));
  color: #be123c;
}
.sw-mod-icon--slate {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.12), rgba(51, 65, 85, 0.04));
  color: var(--sw-slate-700);
}
.sw-mod-icon--violet {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(139, 92, 246, 0.05));
  color: #6d28d9;
}

.sw-mod-title {
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.sw-mod-desc {
  font-size: 0.82rem;
  color: var(--sw-slate-500);
  line-height: 1.45;
}

/* —— Hero strip —— */
.sw-hero {
  border-radius: var(--sw-card-radius);
  padding: 1.5rem 1.75rem;
  background: linear-gradient(125deg, #1e1b4b 0%, #4338ca 42%, #0e7490 100%);
  color: #fff;
  box-shadow: var(--sw-shadow-md);
  position: relative;
  overflow: hidden;
}

.sw-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.sw-hero h1,
.sw-hero .sw-hero-title {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  position: relative;
  z-index: 1;
}

.sw-hero .sw-hero-meta {
  opacity: 0.88;
  font-size: 0.88rem;
  position: relative;
  z-index: 1;
}

.sw-hero-faculty {
  background: linear-gradient(125deg, #134e4a 0%, #0d9488 45%, #1e3a8a 100%);
}

.sw-hero-student {
  background: linear-gradient(125deg, #4c1d95 0%, #7c3aed 40%, #db2777 100%);
}

/* —— Stat pills —— */
.sw-stat-pill {
  border-radius: var(--sw-card-radius-sm);
  padding: 1rem 1.15rem;
  border: 1px solid var(--sw-card-border);
  background: rgba(255, 255, 255, 0.95);
  height: 100%;
  box-shadow: var(--sw-shadow-sm);
}

.sw-stat-pill .sw-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sw-slate-500);
  font-weight: 700;
}

.sw-stat-pill .sw-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-top: 0.2rem;
}

.sw-stat-pill .sw-stat-sub {
  font-size: 0.78rem;
  color: var(--sw-slate-500);
  margin-top: 0.15rem;
}

/* —— Admin KPI row —— */
.sw-kpi-row {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap; /* keep single row */
  align-items: stretch;
  overflow-x: auto; /* small screens: scroll instead of stacking */
  padding-bottom: 0.25rem;
  margin-bottom: 3.25rem !important; /* ensure visible gap before next section */
}

.sw-kpi-item {
  flex: 0 0 240px; /* visible boxes + spacing, even on small screens */
}

@media (min-width: 992px) {
  .sw-kpi-row {
    overflow-x: visible;
  }

  .sw-kpi-item {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* —— Admin quick actions —— */
.sw-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Exams overview + Latest notices: two equal columns from md up.
   Grid avoids flex quirks with wide table/list content; stack below 768px. */
@media (min-width: 768px) {
  .sw-exams-notices-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem; /* match Bootstrap g-4 */
    margin-left: 0;
    margin-right: 0;
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
  }

  .sw-exams-notices-row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    flex: none;
    min-width: 0;
  }
}

/* Exams overview (dashboard/admin.html) — reference layout */
.exam-section {
  margin-top: 20px;
  background: #f8fafc;
  padding: 14px;
}

.exam-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
  padding-right: 140px; /* reserve space for top-right button */
}

.exam-section .section-header h2 {
  font-size: 18px;
  color: #1e293b;
  margin-bottom: 3px;
}

.exam-section .section-header p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 0;
}

.exam-section .btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.exam-section .btn.primary {
  background: #3b82f6;
  color: #fff;
}

.exam-section .btn.primary:hover,
.exam-section .btn.primary:focus {
  background: #2563eb;
  color: #fff;
}

.exam-section .exam-hub-btn {
  position: absolute;
  top: 0;
  right: 0;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.25);
}

.exam-section .card {
  margin-top: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

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

.exam-section th,
.exam-section td {
  padding: 10px;
  text-align: left;
}

.exam-section th {
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
}

.exam-section tr {
  border-bottom: 1px solid #e2e8f0;
}

.exam-section tbody tr:last-child {
  border-bottom: none;
}

.exam-section .sub {
  font-size: 12px;
  color: #94a3b8;
}

.exam-section .empty {
  text-align: center;
  padding: 20px;
  color: #94a3b8;
}

/* Latest notices (dashboard/admin.html) — requested layout */
.latest-notices-section {
  margin-top: 20px;
  background: #f8fafc;
  padding: 14px;
}

.latest-notices-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
  padding-right: 120px;
}

.latest-notices-section .section-header h2 {
  font-size: 18px;
  color: #1e293b;
  margin-bottom: 3px;
}

.latest-notices-section .section-header p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 0;
}

.latest-notices-section .btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.latest-notices-section .btn.primary {
  background: #3b82f6;
  color: #fff;
}

.latest-notices-section .btn.primary:hover,
.latest-notices-section .btn.primary:focus {
  background: #2563eb;
  color: #fff;
}

.latest-notices-section .notices-manage-btn {
  position: absolute;
  top: 0;
  right: 0;
}

.latest-notices-section .card {
  margin-top: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.latest-notices-section .notice-list {
  display: flex;
  flex-direction: column;
}

.latest-notices-section .notice-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.latest-notices-section .notice-item:last-child {
  border-bottom: none;
}

.latest-notices-section .notice-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}

.latest-notices-section .notice-preview {
  font-size: 13px;
  color: #64748b;
  max-width: 52ch;
}

.latest-notices-section .notice-meta {
  text-align: right;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.latest-notices-section .notice-date {
  font-size: 12px;
  color: #94a3b8;
}

.latest-notices-section .badge-unread {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  color: #2563eb;
}

.latest-notices-section .empty {
  text-align: center;
  padding: 20px;
  color: #94a3b8;
}

/* Public notice board (/notices/) */
.sw-notice-board {
  max-width: 1100px;
  margin: 0 auto;
}

.sw-notice-board__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.sw-notice-board__title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.sw-notice-board__sub {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.sw-notice-board__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sw-notice-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.sw-notice-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sw-notice-card__title {
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.sw-notice-card__dt {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

.sw-notice-card__preview {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 12px;
}

.sw-notice-card__actions {
  display: flex;
  justify-content: flex-end;
}

.sw-notice-card__details {
  display: block;
}

.sw-notice-card__summary {
  list-style: none;
}

.sw-notice-card__summary::-webkit-details-marker {
  display: none;
}

.sw-notice-card__full {
  color: #0f172a;
}

.sw-notice-board__empty {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  color: #94a3b8;
  border: 1px dashed rgba(148, 163, 184, 0.6);
}

@media (max-width: 768px) {
  .sw-notice-board__grid {
    grid-template-columns: 1fr;
  }
}

/* In-app notices feed (templates/notifications/list.html) */
.nt-feed-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 4px;
}

.nt-feed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.nt-feed-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.nt-feed-header-actions {
  flex-shrink: 0;
}

.nt-feed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.2;
}

.nt-feed-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.nt-feed-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.nt-feed-btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.nt-feed-btn-ghost:hover {
  background: #f8fafc;
  color: #0f172a;
}

.nt-feed-btn-outline {
  background: #fff;
  color: #2563eb;
  border: 1px solid #93c5fd;
  list-style: none;
}

.nt-feed-btn-outline:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.nt-feed-btn-outline::-webkit-details-marker {
  display: none;
}

.nt-feed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nt-feed-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.nt-feed-card--read {
  opacity: 0.92;
}

.nt-feed-card__head {
  margin-bottom: 6px;
}

.nt-feed-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.nt-feed-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 6px;
  vertical-align: middle;
}

.nt-feed-badge--pinned {
  background: #fef3c7;
  color: #b45309;
}

.nt-feed-badge--new {
  background: #dbeafe;
  color: #1d4ed8;
}

.nt-feed-card__meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.nt-feed-card__meta-sep {
  margin: 0 0.35em;
  color: #cbd5e1;
}

.nt-feed-card__visibility {
  color: #475569;
  font-weight: 500;
}

.nt-feed-card__preview {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 14px;
}

.nt-feed-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid #f1f5f9;
}

.nt-feed-mark-form {
  margin: 0;
}

.nt-feed-card__actions--admin {
  border-top: 1px dashed #e2e8f0;
  padding-top: 10px;
  margin-top: 2px;
}

.nt-feed-btn-danger {
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
}

.nt-feed-btn-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.nt-feed-read-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
}

.nt-feed-details {
  margin-left: auto;
}

.nt-feed-details[open] .nt-feed-btn-outline {
  background: #eff6ff;
}

.nt-feed-card__full {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 14px;
  color: #1e293b;
  line-height: 1.55;
}

.nt-feed-empty {
  background: #fff;
  border-radius: 14px;
  padding: 36px 24px;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.55);
}

.nt-feed-empty__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #64748b;
}

.nt-feed-empty__text {
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.nt-feed-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  font-size: 14px;
}

.nt-feed-page-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.nt-feed-page-link:hover {
  text-decoration: underline;
}

.nt-feed-page-info {
  color: #64748b;
}

@media (max-width: 576px) {
  .nt-feed-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nt-feed-details {
    margin-left: 0;
    width: 100%;
  }

  .nt-feed-details .nt-feed-btn-outline {
    width: 100%;
  }
}

/* Student messages / admin inbox (templates/messaging/inbox.html) */
.sm-inbox-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 4px;
}

.sm-inbox-header {
  margin-bottom: 20px;
}

.sm-inbox-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.sm-inbox-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.sm-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sm-inbox-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.sm-inbox-card--unread {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
}

.sm-inbox-card__main {
  flex: 1;
  min-width: 0;
}

.sm-inbox-card__subject {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.sm-inbox-card__subject a {
  color: #0f172a;
  text-decoration: none;
}

.sm-inbox-card__subject a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.sm-inbox-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 6px;
  vertical-align: middle;
}

.sm-inbox-badge--priority {
  background: #fee2e2;
  color: #b91c1c;
}

.sm-inbox-badge--new {
  background: #dbeafe;
  color: #1d4ed8;
}

.sm-inbox-card__meta {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.sm-inbox-card__meta-sep {
  margin: 0 0.35em;
  color: #cbd5e1;
}

.sm-inbox-card__from {
  font-weight: 500;
  color: #475569;
}

.sm-inbox-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sm-inbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  line-height: 1.2;
}

.sm-inbox-btn-outline {
  background: #fff;
  color: #2563eb;
  border-color: #93c5fd;
}

.sm-inbox-btn-outline:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.sm-inbox-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #e2e8f0;
}

.sm-inbox-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.sm-inbox-empty {
  background: #fff;
  border-radius: 14px;
  padding: 36px 24px;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.55);
}

.sm-inbox-empty__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #64748b;
}

.sm-inbox-empty__text {
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.sm-inbox-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  font-size: 14px;
}

.sm-inbox-page-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.sm-inbox-page-link:hover {
  text-decoration: underline;
}

.sm-inbox-page-info {
  color: #64748b;
}

@media (max-width: 576px) {
  .sm-inbox-card {
    flex-direction: column;
  }

  .sm-inbox-card__actions {
    width: 100%;
    justify-content: stretch;
  }

  .sm-inbox-card__actions .sm-inbox-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Audit log (templates/core/audit_log.html) */
.alog-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 32px;
}

.alog-header {
  margin-bottom: 20px;
}

.alog-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.alog-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.alog-filter {
  margin-bottom: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.alog-filter-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
}

.alog-filter-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  flex: 1;
  min-width: 0;
}

.alog-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.alog-field label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.alog-field input,
.alog-field select {
  width: 100%;
  height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 14px;
  color: #0f172a;
}

.alog-field input:focus,
.alog-field select:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.alog-filter-submit {
  flex-shrink: 0;
  padding-bottom: 1px;
}

.alog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.alog-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.alog-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.alog-table-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.alog-table-wrap {
  overflow-x: auto;
}

.alog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.alog-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.alog-table tbody td {
  padding: 12px 16px;
  vertical-align: top;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

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

.alog-cell-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #475569;
  font-size: 13px;
}

.alog-cell-user {
  word-break: break-word;
  max-width: 220px;
}

.alog-cell-action {
  white-space: nowrap;
  font-weight: 600;
  color: #0f172a;
}

.alog-cell-detail {
  max-width: 360px;
  line-height: 1.45;
}

.alog-detail-model {
  display: inline;
  font-weight: 600;
  color: #475569;
}

.alog-detail-id {
  display: inline;
  margin-left: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.alog-detail-text {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.alog-muted {
  color: #94a3b8;
}

.alog-cell-status {
  white-space: nowrap;
}

.alog-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.alog-badge--success {
  background: #dcfce7;
  color: #166534;
}

.alog-badge--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.alog-badge--muted {
  background: #f1f5f9;
  color: #64748b;
}

.alog-badge--neutral {
  background: #e0e7ff;
  color: #3730a3;
}

.alog-empty {
  text-align: center;
  padding: 28px 16px !important;
  color: #94a3b8;
  font-size: 14px;
}

.alog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 14px;
}

.alog-page-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.alog-page-link:hover {
  text-decoration: underline;
}

.alog-page-info {
  color: #64748b;
}

@media (max-width: 992px) {
  .alog-filter-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .alog-filter-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .alog-filter-fields {
    grid-template-columns: 1fr;
  }

  .alog-filter-submit {
    width: 100%;
  }

  .alog-filter-submit .alog-btn {
    width: 100%;
  }
}

/* Create notice (templates/notifications/form.html) */
.cn-notice-page {
  max-width: 720px;
  margin: 30px auto;
  padding: 0 20px;
}

.cn-notice-header-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.cn-notice-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.cn-notice-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 22px 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.cn-notice-errors {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.cn-notice-section {
  margin-bottom: 22px;
}

.cn-notice-section:last-of-type {
  margin-bottom: 0;
}

.cn-notice-section-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.cn-notice-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cn-notice-grid {
  display: grid;
  gap: 14px 18px;
}

.cn-notice-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cn-notice-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.cn-notice-field label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.cn-notice-field-toggle .cn-notice-switch {
  margin-top: 4px;
  margin-bottom: 0;
  padding-left: 0;
}

.cn-notice-field-toggle .form-check-input {
  width: 2.5em;
  margin-left: 0;
  cursor: pointer;
}

.cn-notice-input,
.cn-notice-page select.cn-notice-input,
.cn-notice-page input.cn-notice-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
}

.cn-notice-textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.45;
}

.cn-notice-file {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
}

.cn-notice-field-error {
  margin-top: 4px;
  font-size: 12px;
  color: #b91c1c;
}

.cn-notice-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}

.cn-notice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.cn-notice-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.cn-notice-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.cn-notice-btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.cn-notice-btn-secondary:hover {
  background: #cbd5e1;
  color: #0f172a;
}

@media (max-width: 640px) {
  .cn-notice-grid--2 {
    grid-template-columns: 1fr;
  }
}

/* Modules (60%) + Finance overview (40%) side by side on large screens */
@media (min-width: 992px) {
  .sw-modules-finance-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 1.5rem;
    margin-left: 0;
    margin-right: 0;
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
  }

  .sw-modules-finance-row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    flex: none;
    min-width: 0;
  }

  /* Align finance card top with modules table card (below “Modules” heading) */
  .sw-modules-finance-col-finance {
    padding-top: 2.375rem;
  }
}

/* Quick actions heading: keep clear separation from KPI row above */
.sw-quick-actions-title {
  margin-top: 2.5rem !important; /* distance from upper section (override utilities) */
  clear: both; /* defensive: prevents accidental overlaps */
}

@media (min-width: 576px) {
  .sw-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .sw-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sw-action-card {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: var(--sw-card-radius);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  box-shadow: var(--sw-shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.sw-action-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--sw-shadow-md);
  border-color: rgba(59, 130, 246, 0.35);
}

.sw-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(59, 130, 246, 0.10);
  color: #1d4ed8;
  flex: 0 0 auto;
}

.sw-action-title {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sw-action-sub {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--sw-slate-500);
}

.sw-kpi-card {
  border-radius: var(--sw-card-radius);
  /* Stronger "boxed" border like the dashboard wireframe */
  border: 1px solid rgba(15, 23, 42, 0.18);
  padding: 1.15rem 1.25rem;
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  box-shadow: var(--sw-shadow-sm);
  position: relative;
  overflow: hidden;
}

.sw-kpi-card:hover {
  border-color: rgba(15, 23, 42, 0.28);
  box-shadow: var(--sw-shadow-md);
}

.sw-kpi-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: #3b82f6;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.sw-kpi-btn:hover,
.sw-kpi-btn:focus {
  background: #2563eb;
  color: #fff;
  text-decoration: none;
}

.sw-kpi-btn--violet {
  background: #8b5cf6;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}

.sw-kpi-btn--violet:hover,
.sw-kpi-btn--violet:focus {
  background: #6d28d9;
  color: #fff;
}

.sw-kpi-btn--emerald {
  background: #10b981;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

.sw-kpi-btn--emerald:hover,
.sw-kpi-btn--emerald:focus {
  background: #047857;
  color: #fff;
}

.sw-kpi-btn--amber {
  background: #f59e0b;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}

.sw-kpi-btn--amber:hover,
.sw-kpi-btn--amber:focus {
  background: #d97706;
  color: #fff;
}

.sw-kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.sw-kpi-card--blue::before {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}
.sw-kpi-card--violet::before {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
}
.sw-kpi-card--emerald::before {
  background: linear-gradient(180deg, #10b981, #047857);
}
.sw-kpi-card--amber::before {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.sw-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.sw-kpi-card--blue .sw-kpi-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}
.sw-kpi-card--violet .sw-kpi-icon {
  background: rgba(139, 92, 246, 0.12);
  color: #6d28d9;
}
.sw-kpi-card--emerald .sw-kpi-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
.sw-kpi-card--amber .sw-kpi-icon {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.sw-kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.sw-kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sw-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sw-kpi-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--sw-slate-700);
}

/* —— Admin sidebar —— */
.sw-sidebar {
  border-radius: var(--sw-card-radius) !important;
  overflow: hidden;
  border: 1px solid var(--sw-card-border) !important;
  background: rgba(255, 255, 255, 0.96) !important;
}

.sw-sidebar .list-group-item {
  border-left: 0;
  border-right: 0;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sw-slate-700);
}

.sw-sidebar .list-group-item:hover {
  background: rgba(79, 70, 229, 0.05);
  color: var(--sw-indigo);
}

.sw-sidebar .list-group-item.active {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.12), rgba(79, 70, 229, 0.03));
  color: var(--sw-indigo-dark);
  border-color: var(--sw-card-border);
  font-weight: 700;
}

.sw-nav-group {
  letter-spacing: 0.1em;
  font-size: 0.65rem !important;
  font-weight: 700;
  color: var(--sw-slate-500) !important;
}

/* Core modules grid cards (admin sidebar) */
.sw-core-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--sw-card-border);
  border-radius: 14px;
  background: #fff;
  padding: 0.65rem 0.7rem;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.sw-core-card:hover,
.sw-core-card:focus {
  transform: translateY(-1px);
  box-shadow: var(--sw-shadow-sm);
  border-color: rgba(79, 70, 229, 0.25);
  text-decoration: none;
}

.sw-core-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.08);
  color: var(--sw-indigo);
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.sw-core-card__title {
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sw-core-card__desc {
  margin-top: 0.15rem;
  font-size: 0.76rem;
  color: var(--sw-slate-500);
  line-height: 1.25;
}

.sw-header {
  border-radius: var(--sw-card-radius) !important;
  border: 1px solid var(--sw-card-border) !important;
}

.sw-header .form-control:focus {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
}

/* —— Tables —— */
.sw-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--sw-slate-500);
  border-bottom-width: 1px;
}

.sw-table tbody td {
  font-size: 0.875rem;
  vertical-align: middle;
}

.sw-linklike {
  color: var(--sw-indigo);
  font-weight: 600;
}

/* —— Timeline —— */
.sw-timeline {
  width: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sw-timeline__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95);
}

.sw-timeline__line {
  width: 2px;
  flex: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.04));
  margin-top: 6px;
}

/* —— Sparkline placeholder —— */
.sw-sparkline {
  border-color: var(--sw-card-border) !important;
  border-radius: calc(var(--sw-card-radius) - 4px) !important;
  background: linear-gradient(180deg, #f8fafc, #ffffff) !important;
}

.sw-spark-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 72px;
}

.sw-spark-bars > span {
  flex: 1;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.35), rgba(79, 70, 229, 0.12));
  min-height: 12%;
  transition: opacity 0.2s ease;
}

.sw-spark-bars > span:hover {
  opacity: 0.85;
}

/* —— Module hub grid (admin) —— */
.sw-hub-card {
  border: 1px solid var(--sw-card-border);
  border-radius: var(--sw-card-radius-sm);
  padding: 1rem 1rem 1rem 1rem;
  height: 100%;
  background: #fff;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

a:hover .sw-hub-card {
  transform: translateY(-2px);
  box-shadow: var(--sw-shadow-md);
  border-color: rgba(79, 70, 229, 0.22);
}

.sw-hub-card .bi {
  font-size: 1.35rem;
  color: var(--sw-indigo);
  margin-bottom: 0.25rem;
}

.sw-hub-title {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.sw-hub-desc {
  font-size: 0.78rem;
  color: var(--sw-slate-500);
  line-height: 1.4;
  flex: 1;
}

a.sw-hub-tile {
  text-decoration: none;
  color: inherit;
  height: 100%;
  display: block;
}

a.sw-hub-tile:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.45);
  outline-offset: 3px;
  border-radius: calc(var(--sw-card-radius-sm) + 2px);
}

.sw-hub-card__glyph {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.sw-hub-card__glyph .bi {
  margin-bottom: 0;
  color: inherit;
  font-size: 1.35rem;
}

.sw-hub-card__glyph--indigo {
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.14), rgba(79, 70, 229, 0.06));
  color: #4338ca;
}
.sw-hub-card__glyph--blue {
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0.05));
  color: #1d4ed8;
}
.sw-hub-card__glyph--teal {
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.16), rgba(13, 148, 136, 0.05));
  color: #0f766e;
}
.sw-hub-card__glyph--emerald {
  background: linear-gradient(145deg, rgba(5, 150, 105, 0.16), rgba(5, 150, 105, 0.05));
  color: #047857;
}
.sw-hub-card__glyph--amber {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.06));
  color: #b45309;
}
.sw-hub-card__glyph--violet {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.14), rgba(124, 58, 237, 0.05));
  color: #6d28d9;
}
.sw-hub-card__glyph--rose {
  background: linear-gradient(145deg, rgba(219, 39, 119, 0.14), rgba(219, 39, 119, 0.05));
  color: #be185d;
}
.sw-hub-card__glyph--sky {
  background: linear-gradient(145deg, rgba(3, 105, 161, 0.14), rgba(3, 105, 161, 0.05));
  color: #0369a1;
}
.sw-hub-card__glyph--slate {
  background: linear-gradient(145deg, rgba(51, 65, 85, 0.12), rgba(51, 65, 85, 0.04));
  color: #334155;
}
.sw-hub-card__glyph--stone {
  background: linear-gradient(145deg, rgba(68, 64, 60, 0.12), rgba(68, 64, 60, 0.04));
  color: #44403c;
}

/* —— Exam row / notice row —— */
.sw-list-row {
  border: 1px solid var(--sw-card-border);
  border-radius: var(--sw-card-radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.sw-list-row:last-child {
  margin-bottom: 0;
}

/* —— Text —— */
.text-muted.small {
  letter-spacing: 0.02em;
}

/* —— Legacy KPI (keep compatibility) —— */
.sw-kpi {
  border-top: 4px solid transparent;
}

.sw-kpi--students {
  border-top-color: #3b82f6;
}
.sw-kpi--faculty {
  border-top-color: #8b5cf6;
}
.sw-kpi--fees {
  border-top-color: #10b981;
}
.sw-kpi--attendance {
  border-top-color: #f59e0b;
}

.sw-exam-highlight {
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.06), rgba(255, 255, 255, 0.9));
}

/* —— Dev / API panel —— */
.sw-dev-panel code {
  font-size: 0.7rem;
  word-break: break-all;
}

/* —— Module hub heroes —— */
.sw-module-hero {
  border-radius: var(--sw-card-radius);
  padding: 1.5rem 1.75rem;
  color: #fff;
  box-shadow: var(--sw-shadow-md);
  position: relative;
  overflow: hidden;
}

.sw-module-hero .sw-hero-title {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
}

.sw-module-hero .sw-hero-meta {
  opacity: 0.9;
  font-size: 0.9rem;
  max-width: 40rem;
}

.sw-module-hero--students {
  background: linear-gradient(125deg, #1e3a8a 0%, #4f46e5 45%, #0e7490 100%);
}
.sw-module-hero--faculty {
  background: linear-gradient(125deg, #134e4a 0%, #0d9488 42%, #3730a3 100%);
}
.sw-module-hero--fees {
  background: linear-gradient(125deg, #14532d 0%, #059669 40%, #0f766e 100%);
}
.sw-module-hero--attendance {
  background: linear-gradient(125deg, #9a3412 0%, #ea580c 45%, #ca8a04 100%);
}
.sw-module-hero--exams {
  background: linear-gradient(125deg, #4c1d95 0%, #7c3aed 42%, #2563eb 100%);
}
.sw-module-hero--notices {
  background: linear-gradient(125deg, #831843 0%, #db2777 40%, #7c3aed 100%);
}
.sw-module-hero--messages {
  background: linear-gradient(125deg, #0c4a6e 0%, #0369a1 45%, #4f46e5 100%);
}
.sw-module-hero--timetable {
  background: linear-gradient(125deg, #312e81 0%, #4338ca 42%, #0f766e 100%);
}
.sw-module-hero--reports {
  background: linear-gradient(125deg, #0f172a 0%, #334155 48%, #0e7490 100%);
}
.sw-module-hero--accounts {
  background: linear-gradient(125deg, #1c1917 0%, #44403c 45%, #1d4ed8 100%);
}

.sw-module-aside {
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.06), #fff);
  border: 1px solid var(--sw-card-border) !important;
  border-radius: var(--sw-card-radius) !important;
}

.sw-kpi-value--blue {
  color: #1d4ed8;
}
.sw-kpi-value--violet {
  color: #6d28d9;
}
.sw-kpi-value--emerald {
  color: #047857;
}
.sw-kpi-value--amber {
  color: #b45309;
}
.sw-kpi-value--rose {
  color: #be123c;
}
.sw-kpi-value--slate {
  color: var(--sw-slate-700);
}
.sw-kpi-value--teal {
  color: #0f766e;
}

/* —— Tabular dashboard panels —— */
.sw-dash-panel {
  border-radius: var(--sw-card-radius);
  border: 1px solid var(--sw-card-border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--sw-shadow-sm);
  overflow: hidden;
}

.sw-dash-panel.sw-card-elevated {
  box-shadow: var(--sw-shadow-md) !important;
  border-color: rgba(255, 255, 255, 0.65);
}

.sw-dash-panel__head {
  padding: 0.85rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--sw-card-border);
}

.sw-dash-panel__head .sw-dash-panel__title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.sw-dash-panel__head .sw-dash-panel__sub {
  font-size: 0.78rem;
  color: var(--sw-slate-500);
  margin: 0.15rem 0 0;
}

.sw-dash-table {
  font-size: 0.875rem;
  --bs-table-bg: transparent;
}

.sw-dash-table thead th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--sw-slate-500);
  background: #f1f5f9 !important;
  border-bottom: 1px solid var(--sw-card-border) !important;
  padding: 0.7rem 1.1rem;
  white-space: nowrap;
  vertical-align: middle;
}

.sw-dash-table tbody td {
  padding: 0.8rem 1.1rem;
  vertical-align: middle;
  border-color: rgba(15, 23, 42, 0.07) !important;
}

.sw-dash-table tbody tr:last-child td {
  border-bottom: 0;
}

.sw-dash-table.table-hover tbody tr:hover td {
  background: rgba(79, 70, 229, 0.04);
}

.sw-dash-table .sw-dash-metric {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
}

.sw-dash-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--sw-slate-700);
}

.sw-dash-row-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sw-slate-500);
  font-variant-numeric: tabular-nums;
  width: 2.5rem;
}

/* —— Post-login landing (role dashboards) —— */
.sw-landing-hero {
  border-radius: var(--sw-card-radius);
  padding: 1.75rem 1.85rem 1.9rem;
  color: #fff;
  box-shadow: var(--sw-shadow-md);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sw-landing-hero::after {
  content: "";
  position: absolute;
  right: -20%;
  top: -40%;
  width: 55%;
  height: 140%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

.sw-landing-hero > .row,
.sw-landing-hero > div {
  position: relative;
  z-index: 1;
}

.sw-landing-hero--admin {
  background: linear-gradient(125deg, #020617 0%, #1e1b4b 38%, #312e81 68%, #1d4ed8 100%);
}

.sw-landing-hero--faculty {
  background: linear-gradient(125deg, #042f2e 0%, #0f766e 45%, #1e3a8a 100%);
}

.sw-landing-hero--student {
  background: linear-gradient(125deg, #3b0764 0%, #6d28d9 42%, #be185d 100%);
}

.sw-landing-hero__eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.8;
  margin-bottom: 0.4rem;
}

.sw-landing-hero__title {
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.12;
  margin-bottom: 0.45rem;
}

.sw-landing-hero__meta {
  opacity: 0.9;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 40rem;
}

.sw-landing-hero__actions .btn {
  border-radius: 10px;
}

.sw-stat-card {
  border-radius: var(--sw-card-radius-sm);
  border: 1px solid var(--sw-card-border);
  background: linear-gradient(165deg, #ffffff 0%, #fafbfc 100%);
  padding: 1.15rem 1.2rem 1.2rem;
  height: 100%;
  box-shadow: var(--sw-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.sw-stat-card:hover {
  box-shadow: var(--sw-shadow-md);
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.18);
}

.sw-stat-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.22rem;
  margin-bottom: 0.85rem;
}

.sw-stat-card__icon--blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.06));
  color: #1d4ed8;
}
.sw-stat-card__icon--violet {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0.06));
  color: #6d28d9;
}
.sw-stat-card__icon--emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.06));
  color: #047857;
}
.sw-stat-card__icon--amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.07));
  color: #b45309;
}
.sw-stat-card__icon--rose {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.14), rgba(225, 29, 72, 0.05));
  color: #be123c;
}
.sw-stat-card__icon--slate {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.12), rgba(51, 65, 85, 0.04));
  color: var(--sw-slate-700);
}

.sw-stat-card__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sw-slate-500);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.sw-stat-card__value {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sw-stat-card__hint {
  font-size: 0.75rem;
  color: var(--sw-slate-500);
  margin-top: 0.4rem;
  line-height: 1.35;
}

.sw-search-strip {
  border-radius: var(--sw-card-radius) !important;
  border: 1px solid var(--sw-card-border) !important;
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: var(--sw-shadow-sm) !important;
}

.sw-label-caps {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sw-slate-500);
  margin-bottom: 0.35rem;
}

.sw-search-input-group .input-group-text {
  border-radius: 12px 0 0 12px;
  border-color: var(--sw-card-border);
  background: #f8fafc;
}

.sw-search-input-group .form-control {
  border-radius: 0 12px 12px 0;
  border-color: var(--sw-card-border);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.sw-search-input-group .form-control:focus {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
}

.sw-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sw-status-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--sw-card-border);
  min-width: 0;
}

.sw-status-pill__k {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sw-slate-500);
}

.sw-status-pill__v {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sw-slate-900);
  line-height: 1.25;
}

.sw-section-heading {
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--sw-card-border);
}

.sw-section-heading h2 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.2rem;
  color: var(--sw-slate-900);
}

.sw-section-heading p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--sw-slate-500);
}

.sw-dash-panel__head--prominent {
  padding: 1rem 1.35rem;
  background: linear-gradient(180deg, #f1f5f9 0%, #ffffff 100%);
}

.sw-dash-panel__head--prominent .sw-dash-panel__title {
  font-size: 1.05rem;
  font-weight: 800;
}

/* —— Auth (login / password flows) —— minimal layout */
body.sw-body--auth-simple {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.sw-body--auth-simple main.sw-auth-simple-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Auth landing (login / reset): align with public school page rhythm */
body.sw-body--auth-simple main.sw-auth-landing-main {
  background: linear-gradient(180deg, #e8eef6 0%, #f1f5f9 35%, #f8fafc 70%, #ffffff 100%);
}

body.sw-body--auth-simple .sw-auth-card {
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08) !important;
}
/* —— Authenticated portal chrome (header + footer) —— */
.navbar-school-app.navbar-school-app--portal {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 42%, #1a365d 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 40px rgba(15, 23, 42, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
}

.navbar-school-app--portal .navbar-brand-mark {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.18);
}

.navbar-school-app--portal .sw-portal-nav .nav-link {
  border-radius: 8px;
  padding: 0.4rem 0.6rem !important;
}

.navbar-school-app--portal .sw-portal-nav .nav-link:hover,
.navbar-school-app--portal .sw-portal-nav .nav-link:focus {
  background: rgba(255, 255, 255, 0.1);
}

.sw-portal-toolbar-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 992px) {
  .sw-portal-toolbar-divider {
    border-top: none;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
}

.sw-portal-toolbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.82) !important;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sw-portal-toolbar-link:hover,
.sw-portal-toolbar-link:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

.sw-portal-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.65rem 0.3rem 0.35rem !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.2;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.sw-portal-user-toggle:hover,
.sw-portal-user-toggle:focus,
.sw-portal-user-toggle.show {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
}

.sw-portal-user-toggle::after {
  margin-left: 0.1rem;
  opacity: 0.65;
}

.sw-portal-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(69, 125, 228, 0.95), rgba(196, 30, 58, 0.88));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sw-portal-user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  max-width: 148px;
}

.sw-portal-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  font-weight: 700;
  font-size: 0.8125rem;
}

.sw-portal-user-role {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.72;
}

@media (max-width: 575.98px) {
  .sw-portal-user-text {
    max-width: 120px;
  }
}

.sw-portal-user-menu {
  min-width: 15.5rem;
  border-radius: 14px !important;
  border: 1px solid var(--sw-card-border) !important;
  padding: 0.4rem !important;
  margin-top: 0.5rem !important;
  box-shadow: var(--sw-shadow-md) !important;
}

.sw-portal-user-menu-head {
  list-style: none;
}

.sw-portal-menu-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--sw-slate-500);
  margin-bottom: 0.2rem;
}

.sw-portal-user-menu-head .text-truncate {
  color: var(--sw-slate-900);
}

.sw-portal-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--sw-indigo-dark);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.footer-school.footer-school--portal {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.sw-portal-footer-brand {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.sw-portal-footer-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.2rem;
  line-height: 1.4;
}

.sw-portal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
  justify-content: center;
}

.sw-portal-footer-nav a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.sw-portal-footer-nav a:hover,
.sw-portal-footer-nav a:focus {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.sw-portal-footer-legal {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.sw-portal-footer-credit {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.sw-portal-footer-credit:hover,
.sw-portal-footer-credit:focus {
  color: rgba(255, 255, 255, 0.75);
}

/* Attendance module (attendance/mark.html) — scoped styles */
.attendance-page {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.attendance-header h2 {
  margin-bottom: 5px;
  color: #1e293b;
}

.attendance-header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.filter-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 20px;
  align-items: end;
}

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

.field label {
  font-size: 13px;
  margin-bottom: 6px;
  color: #334155;
}

.attendance-page input,
.attendance-page select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.attendance-page input:focus,
.attendance-page select:focus {
  border-color: #3b82f6;
  background: #fff;
  outline: none;
}

.btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.btn.primary {
  background: #3b82f6;
  color: #fff;
}

.btn.primary:hover {
  background: #2563eb;
}

.btn.secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.attendance-content {
  margin-top: 25px;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: #94a3b8;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 15px;
}

.attendance-table th,
.attendance-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.attendance-table th {
  background: #f1f5f9;
  font-size: 13px;
  color: #475569;
}

.actions {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.attendance-footer-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .filters {
    grid-template-columns: 1fr;
  }
}

/* Fee payment add (fees/payment_form.html) — scoped styles */
.sw-fee-payment-page {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.sw-fee-payment-header {
  margin-bottom: 1.5rem;
}

.sw-fee-payment-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sw-slate-900);
  margin: 0 0 0.35rem;
}

.sw-fee-payment-header__sub {
  font-size: 0.95rem;
  color: var(--sw-slate-500);
  margin: 0;
  max-width: 42rem;
  line-height: 1.5;
}

.sw-fee-payment-card {
  border-radius: var(--sw-card-radius) !important;
  padding: 1.75rem 1.5rem 1.5rem;
}

@media (min-width: 768px) {
  .sw-fee-payment-card {
    padding: 2rem 2rem 1.75rem;
  }
}

.sw-fee-payment-form .sw-fee-pay-group {
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.sw-fee-payment-form .sw-fee-pay-group--last {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sw-fee-pay-group__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sw-slate-700);
  margin: 0 0 0.35rem;
}

.sw-fee-pay-optional {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  color: var(--sw-slate-500);
}

.sw-fee-pay-group__hint {
  font-size: 0.875rem;
  color: var(--sw-slate-500);
  margin: 0 0 1.1rem;
  line-height: 1.45;
}

/* Kill double spacing: sw_field wraps in .mb-3 inside our field shell */
.sw-fee-pay-field .mb-3 {
  margin-bottom: 0 !important;
}

.sw-fee-pay-field label.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sw-slate-700);
  margin-bottom: 0.4rem;
}

.sw-fee-payment-page .form-control,
.sw-fee-payment-page .form-select {
  min-height: 2.75rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--sw-slate-900);
  background-color: #fff;
  border: 1px solid var(--sw-card-border);
  border-radius: var(--sw-card-radius-sm);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sw-fee-payment-page .form-control:not(textarea) {
  padding: 0.625rem 1.25rem;
}

.sw-fee-payment-page .form-select {
  padding: 0.625rem 2.75rem 0.625rem 1.25rem;
  background-position: right 0.85rem center;
  background-size: 1rem 0.75rem;
}

.sw-fee-payment-page .form-control:hover,
.sw-fee-payment-page .form-select:hover {
  border-color: rgba(15, 23, 42, 0.18);
}

.sw-fee-payment-page .form-control:focus,
.sw-fee-payment-page .form-select:focus {
  border-color: rgba(79, 70, 229, 0.55);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  outline: none;
}

.sw-fee-payment-page textarea.form-control {
  min-height: 5.5rem;
  height: auto;
  resize: vertical;
  padding: 0.75rem 1.25rem;
}

.sw-fee-payment-page .form-control.is-invalid,
.sw-fee-payment-page .form-select.is-invalid {
  border-color: rgba(225, 29, 72, 0.55);
}

.sw-fee-payment-page .invalid-feedback {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
}

.sw-fee-payment-page .form-text {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
}

.sw-fee-payment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.sw-fee-payment-actions .btn {
  min-height: 2.75rem;
  font-weight: 600;
  border-radius: var(--sw-card-radius-sm);
}

.sw-fee-payment-actions a.btn.sw-fee-payment-btn-cancel,
.sw-fee-payment-actions a.btn.sw-fee-payment-btn-cancel:hover,
.sw-fee-payment-actions a.btn.sw-fee-payment-btn-cancel:focus {
  text-decoration: none;
}

/* Payment history (fees/payment_list.html) — scoped styles */
.sw-payment-history-page {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.sw-payment-history-page .ph-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sw-payment-history-page .ph-header h1 {
  margin: 0 0 5px 0;
  color: #1e293b;
  font-size: 26px;
}

.sw-payment-history-page .ph-header p {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.sw-payment-history-page .ph-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sw-payment-history-page .btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-weight: 700;
}

.sw-payment-history-page .btn.primary {
  background: #3b82f6;
  color: #fff;
}

.sw-payment-history-page .btn.primary:hover {
  background: #2563eb;
  color: #fff;
}

.sw-payment-history-page .btn.secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.sw-payment-history-page .btn.secondary:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.sw-payment-history-page .btn.btn-sm {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.sw-payment-history-page .ph-summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sw-payment-history-page .ph-summary-item {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.sw-payment-history-page .ph-summary-item .k {
  font-size: 13px;
  color: #64748b;
  font-weight: 700;
}

.sw-payment-history-page .ph-summary-item .v {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.sw-payment-history-page .ph-filters {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.9fr 0.7fr auto;
  gap: 10px;
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.sw-payment-history-page .ph-filters input,
.sw-payment-history-page .ph-filters select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  min-width: 0;
}

.sw-payment-history-page .ph-table-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  overflow: auto;
}

.sw-payment-history-page table {
  width: 100%;
  border-collapse: collapse;
}

.sw-payment-history-page th,
.sw-payment-history-page td {
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.sw-payment-history-page th {
  background: #f1f5f9;
  font-size: 13px;
  color: #475569;
  white-space: nowrap;
}

.sw-payment-history-page tr {
  border-bottom: 1px solid #e2e8f0;
}

.sw-payment-history-page .ph-empty {
  text-align: center;
  padding: 20px;
  color: #94a3b8;
}

.sw-payment-history-page .ph-pagination {
  margin-top: 10px;
  text-align: right;
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 900px) {
  .sw-payment-history-page .ph-summary {
    grid-template-columns: 1fr;
  }
  .sw-payment-history-page .ph-filters {
    grid-template-columns: 1fr;
  }
  .sw-payment-history-page .ph-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Faculty add/edit (faculty/form.html) — scoped styles */
.sw-faculty-add-page .page {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.sw-faculty-add-page .page-header h1 {
  font-size: 26px;
  color: #1e293b;
  margin-bottom: 5px;
}

.sw-faculty-add-page .page-header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.sw-faculty-add-page .card {
  background: #fff;
  padding: 25px;
  border-radius: 14px;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.sw-faculty-add-page .section {
  margin-bottom: 30px;
}

.sw-faculty-add-page .section h2 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #0f172a;
  border-left: 4px solid #3b82f6;
  padding-left: 10px;
}

.sw-faculty-add-page .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.sw-faculty-add-page .grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

.sw-faculty-add-page .field {
  display: flex;
  flex-direction: column;
}

.sw-faculty-add-page .field.full {
  grid-column: span 3;
}

.sw-faculty-add-page label,
.sw-faculty-add-page .form-label {
  font-size: 13px;
  margin-bottom: 6px;
  color: #334155;
}

.sw-faculty-add-page input,
.sw-faculty-add-page select,
.sw-faculty-add-page textarea,
.sw-faculty-add-page .form-control,
.sw-faculty-add-page .form-select {
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 14px;
}

.sw-faculty-add-page textarea,
.sw-faculty-add-page .form-control textarea {
  height: 110px;
}

.sw-faculty-add-page input:focus,
.sw-faculty-add-page select:focus,
.sw-faculty-add-page textarea:focus,
.sw-faculty-add-page .form-control:focus,
.sw-faculty-add-page .form-select:focus {
  border-color: #3b82f6;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.sw-faculty-add-page .inline-add {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.sw-faculty-add-page .inline-add input {
  flex: 1;
}

.sw-faculty-add-page .checkbox {
  justify-content: center;
}

.sw-faculty-add-page .actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sw-faculty-add-page .btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sw-faculty-add-page .btn.primary {
  background: #3b82f6;
  color: #fff;
}

.sw-faculty-add-page .btn.primary:hover {
  background: #2563eb;
}

.sw-faculty-add-page .btn.secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.sw-faculty-add-page .btn.small {
  padding: 8px 12px;
  background: #3b82f6;
  color: #fff;
}

@media (max-width: 768px) {
  .sw-faculty-add-page .grid-2,
  .sw-faculty-add-page .grid-3 {
    grid-template-columns: 1fr;
  }
  .sw-faculty-add-page .field.full {
    grid-column: span 1;
  }
}

/* Students list (templates/students/list.html) — scoped styles */
.students-page {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.students-page .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.students-page .header h1 {
  margin-bottom: 5px;
  color: #1e293b;
}

.students-page .header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.students-page .btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.students-page .btn.primary {
  background: #3b82f6;
  color: #fff;
}

.students-page .btn.secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.students-page .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.students-page .filter-bar {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.students-page .filter-bar input,
.students-page .filter-bar select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  min-width: 0;
}

.students-page .filter-bar input {
  flex: 1 1 auto;
}

.students-page .table-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

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

.students-page th,
.students-page td {
  padding: 12px;
  text-align: left;
}

.students-page th {
  background: #f1f5f9;
  font-size: 13px;
  color: #475569;
}

.students-page tr {
  border-bottom: 1px solid #e2e8f0;
}

.students-page .status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  display: inline-block;
}

.students-page .status.active {
  background: #dcfce7;
  color: #166534;
}

.students-page .status.inactive {
  background: #e2e8f0;
  color: #334155;
}

.students-page .link {
  background: none;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  margin-right: 8px;
  text-decoration: none;
  font-weight: 600;
}

.students-page .pagination {
  margin-top: 10px;
  text-align: right;
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 768px) {
  .students-page .filter-bar {
    flex-direction: column;
  }

  .students-page .header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* User directory (templates/accounts/user_list.html) */
.user-directory-page {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.user-directory-page .ud-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.user-directory-page .ud-header-text h1 {
  margin: 0 0 5px;
  font-size: 26px;
  color: #1e293b;
}

.user-directory-page .ud-header-text p {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.user-directory-page .ud-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-directory-page .ud-filter-bar {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.user-directory-page .ud-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.user-directory-page .ud-filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.user-directory-page .ud-filter-field-grow {
  flex: 1 1 220px;
}

.user-directory-page .ud-filter-field select,
.user-directory-page .ud-filter-field input[type="search"] {
  min-width: 0;
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
}

.user-directory-page .ud-filter-submit {
  flex-shrink: 0;
}

.user-directory-page .ud-table-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.user-directory-page .table-responsive {
  overflow-x: auto;
}

.user-directory-page .ud-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.user-directory-page .ud-table th,
.user-directory-page .ud-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}

.user-directory-page .ud-table th {
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.user-directory-page .ud-th-actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.user-directory-page .ud-cell-email {
  font-weight: 600;
  color: #0f172a;
}

.user-directory-page .ud-cell-muted {
  color: #64748b;
  font-size: 13px;
}

.user-directory-page .ud-cell-lock {
  font-size: 13px;
  color: #475569;
  max-width: 200px;
}

.user-directory-page .ud-lock-empty {
  color: #94a3b8;
}

.user-directory-page .ud-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.user-directory-page .ud-status-active {
  background: #dcfce7;
  color: #166534;
}

.user-directory-page .ud-status-inactive {
  background: #e2e8f0;
  color: #334155;
}

.user-directory-page .ud-cell-actions {
  text-align: right;
  white-space: nowrap;
}

.user-directory-page .ud-inline-form {
  display: inline;
}

.user-directory-page .ud-inline-form + .ud-inline-form {
  margin-left: 6px;
}

.user-directory-page .ud-muted {
  color: #94a3b8;
  font-size: 13px;
}

.user-directory-page .ud-empty {
  text-align: center;
  padding: 36px 20px !important;
  color: #64748b;
  font-size: 14px;
  border-bottom: none !important;
}

.user-directory-page .ud-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  font-size: 13px;
  color: #64748b;
}

.user-directory-page .ud-page-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
}

.user-directory-page .ud-page-link:hover {
  text-decoration: underline;
}

.user-directory-page .ud-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.user-directory-page .ud-btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.user-directory-page .ud-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.user-directory-page .ud-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.user-directory-page .ud-btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.user-directory-page .ud-btn-secondary:hover {
  background: #cbd5e1;
  color: #1e293b;
}

.user-directory-page .ud-btn-outline {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.user-directory-page .ud-btn-outline:hover {
  background: #f8fafc;
}

.user-directory-page .ud-btn-primary-soft {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.user-directory-page .ud-btn-primary-soft:hover {
  background: #dbeafe;
}

@media (max-width: 768px) {
  .user-directory-page .ud-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-directory-page .ud-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .user-directory-page .ud-filter-submit {
    align-self: stretch;
  }

  .user-directory-page .ud-filter-submit .ud-btn {
    width: 100%;
  }

  .user-directory-page .ud-cell-actions {
    white-space: normal;
  }
}

/* Mark attendance (templates/attendance/mark.html, _mark_content.html) */
.mark-att-page {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.mark-att-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.mark-att-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.mark-att-filter-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.mark-att-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.mark-att-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.mark-att-filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.mark-att-filter-field .mark-att-input,
.mark-att-input {
  min-width: 0;
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
}

.mark-att-filter-field:first-child {
  flex: 1 1 260px;
}

.mark-att-filter-field:nth-child(2) {
  flex: 0 0 auto;
}

.mark-att-filter-submit {
  flex-shrink: 0;
}

.mark-att-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.mark-att-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.mark-att-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.mark-att-btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.mark-att-btn-secondary:hover {
  background: #f8fafc;
}

.mark-att-alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 14px;
}

.mark-att-table-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.mark-att-empty {
  text-align: center;
  padding: 28px 16px;
  color: #64748b;
  font-size: 14px;
}

.mark-att-action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.mark-att-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}

.mark-att-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.mark-att-table th,
.mark-att-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.mark-att-table th {
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.mark-att-cell-roll {
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mark-att-cell-name {
  font-weight: 600;
  color: #0f172a;
}

.mark-att-adm {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #94a3b8;
  margin-top: 2px;
}

.mark-att-cell-status {
  min-width: 160px;
}

.mark-att-status-select {
  width: 100%;
  max-width: 220px;
  height: 36px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  background: #fff;
}

.mark-att-cell-remarks {
  min-width: 200px;
}

.mark-att-remarks-input {
  width: 100%;
  min-width: 160px;
  height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
}

.mark-att-footnote {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #94a3b8;
}

#sw-attendance-mark .alert {
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .mark-att-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .mark-att-filter-submit .mark-att-btn {
    width: 100%;
  }

  .mark-att-action-bar {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .mark-att-action-bar .mark-att-btn {
    width: 100%;
  }
}

/* Attendance reports (templates/attendance/reports.html) */
.att-reports-page {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.att-reports-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.att-reports-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.att-reports-filter-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.att-reports-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.att-reports-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.att-reports-filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.att-reports-input {
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
  min-width: 0;
}

.att-reports-filter-section {
  flex: 1 1 220px;
}

.att-reports-filter-threshold {
  flex: 0 0 120px;
  max-width: 140px;
}

.att-reports-filter-submit {
  flex-shrink: 0;
}

.att-reports-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.att-reports-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.att-reports-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.att-reports-low-card {
  margin-top: 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  overflow: hidden;
}

.att-reports-low-banner {
  padding: 10px 14px;
  font-size: 14px;
  color: #92400e;
  border-bottom: 1px solid #fde68a;
}

.att-reports-low-banner strong {
  margin-right: 6px;
}

.att-reports-table-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.att-reports-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}

.att-reports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.att-reports-table th,
.att-reports-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.att-reports-table th {
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.att-reports-table-compact th,
.att-reports-table-compact td {
  padding: 8px 12px;
}

.att-reports-cell-date {
  white-space: nowrap;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.att-reports-stu-name {
  font-weight: 600;
  color: #0f172a;
}

.att-reports-cell-remarks {
  color: #64748b;
  max-width: 320px;
}

.att-reports-empty {
  text-align: center;
  padding: 36px 16px !important;
  color: #64748b;
  font-size: 14px;
  border-bottom: none !important;
}

.att-reports-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.att-reports-link:hover {
  text-decoration: underline;
}

.att-reports-pct-low {
  font-weight: 700;
  color: #dc2626;
}

@media (max-width: 768px) {
  .att-reports-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .att-reports-filter-threshold {
    max-width: none;
  }

  .att-reports-filter-submit .att-reports-btn {
    width: 100%;
  }
}

/* Mark staff attendance (templates/attendance/staff_mark.html) */
.mark-staff-page {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.mark-staff-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.mark-staff-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.mark-staff-filter-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.mark-staff-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.mark-staff-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.mark-staff-filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.mark-staff-input {
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
}

.mark-staff-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mark-staff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.mark-staff-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.mark-staff-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.mark-staff-btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.mark-staff-btn-secondary:hover {
  background: #f8fafc;
}

.mark-staff-att-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.mark-staff-section-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  border-left: 4px solid #3b82f6;
  padding-left: 10px;
}

.mark-staff-table-wrap {
  overflow-x: auto;
  margin: 0 -4px 14px;
}

.mark-staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.mark-staff-table th,
.mark-staff-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.mark-staff-table th {
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.mark-staff-cell-name {
  font-weight: 600;
  color: #0f172a;
}

.mark-staff-cell-eid {
  color: #64748b;
  font-size: 13px;
}

.mark-staff-cell-status {
  min-width: 160px;
}

.mark-staff-status-select {
  width: 100%;
  max-width: 220px;
  height: 36px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  background: #fff;
}

.mark-staff-empty {
  text-align: center;
  padding: 28px 16px !important;
  color: #64748b;
  font-size: 14px;
  border-bottom: none !important;
}

.mark-staff-action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 0;
  padding-top: 4px;
}

.mark-staff-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #94a3b8;
}

@media (max-width: 768px) {
  .mark-staff-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .mark-staff-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mark-staff-filter-actions .mark-staff-btn {
    width: 100%;
  }

  .mark-staff-action-bar {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .mark-staff-action-bar .mark-staff-btn {
    width: 100%;
  }
}

/* Monthly staff attendance register (templates/attendance/staff_register.html) */
.staff-reg-page {
  max-width: 100%;
  margin: 30px auto;
  padding: 0 20px;
}

.staff-reg-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.staff-reg-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.staff-reg-filter-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.staff-reg-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.staff-reg-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.staff-reg-filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.staff-reg-input {
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
  min-width: 0;
}

.staff-reg-filter-field:first-child .staff-reg-input {
  width: 100px;
}

.staff-reg-filter-field:nth-child(2) .staff-reg-input {
  min-width: 160px;
}

.staff-reg-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.staff-reg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.staff-reg-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.staff-reg-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.staff-reg-btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.staff-reg-btn-secondary:hover {
  background: #f8fafc;
}

.staff-reg-table-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.staff-reg-scroll {
  overflow: auto;
  max-height: min(75vh, 720px);
  -webkit-overflow-scrolling: touch;
}

.staff-reg-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
}

.staff-reg-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
}

.staff-reg-table tbody th,
.staff-reg-table tbody td {
  padding: 6px 6px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  text-align: center;
  vertical-align: middle;
}

.staff-reg-th-faculty,
.staff-reg-row-faculty {
  position: sticky;
  left: 0;
  z-index: 3;
  text-align: left !important;
  white-space: nowrap;
  min-width: 160px;
  max-width: 220px;
  box-shadow: 2px 0 0 rgba(15, 23, 42, 0.06);
}

.staff-reg-table thead .staff-reg-th-faculty {
  z-index: 4;
  background: #f1f5f9;
}

.staff-reg-row-faculty {
  background: #fff;
  font-weight: 600;
  color: #0f172a;
}

.staff-reg-table tbody tr:nth-child(even) .staff-reg-row-faculty {
  background: #fafafa;
}

.staff-reg-th-day {
  min-width: 28px;
}

.staff-reg-day-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #334155;
}

.staff-reg-empty {
  text-align: center;
  padding: 28px 16px !important;
  color: #64748b;
  font-size: 14px;
  border: none !important;
}

.staff-reg-legend {
  padding: 12px 16px 16px;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
  font-size: 13px;
  color: #475569;
}

.staff-reg-legend-title {
  font-weight: 700;
  color: #0f172a;
  margin-right: 8px;
}

.staff-reg-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.staff-reg-legend-list li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.staff-reg-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  font-weight: 800;
  font-size: 12px;
  color: #0f172a;
}

.staff-reg-code-muted {
  background: #f1f5f9;
  color: #94a3b8;
  font-weight: 600;
}

.staff-reg-legend-blank {
  color: #64748b;
}

@media (max-width: 768px) {
  .staff-reg-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-reg-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-reg-filter-actions .staff-reg-btn {
    width: 100%;
  }

  .staff-reg-legend-list {
    flex-direction: column;
    gap: 8px;
  }
}

/* Faculty leave requests admin (templates/attendance/leave_admin_list.html) */
.leave-admin-page {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.leave-admin-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.leave-admin-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.leave-admin-filter-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.leave-admin-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.leave-admin-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.leave-admin-filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.leave-admin-filter-grow {
  flex: 1 1 200px;
}

.leave-admin-input {
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
  min-width: 0;
}

.leave-admin-filter-field:first-child .leave-admin-input {
  min-width: 160px;
}

.leave-admin-filter-submit {
  flex-shrink: 0;
}

.leave-admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.leave-admin-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.leave-admin-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.leave-admin-btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.leave-admin-btn-approve {
  background: #16a34a;
  color: #fff;
}

.leave-admin-btn-approve:hover {
  background: #15803d;
  color: #fff;
}

.leave-admin-btn-reject {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.leave-admin-btn-reject:hover {
  background: #fef2f2;
}

.leave-admin-table-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.leave-admin-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}

.leave-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.leave-admin-table th,
.leave-admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.leave-admin-table th {
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.leave-admin-th-action {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.leave-admin-cell-name {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}

.leave-admin-cell-dates {
  white-space: nowrap;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.leave-admin-cell-reason {
  color: #475569;
  max-width: 280px;
}

.leave-admin-cell-action {
  text-align: right;
}

.leave-admin-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.leave-admin-badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.leave-admin-badge-approved {
  background: #dcfce7;
  color: #166534;
}

.leave-admin-badge-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.leave-admin-action-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.leave-admin-notes-input {
  width: 140px;
  max-width: 100%;
  height: 32px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
}

.leave-admin-review-note {
  font-size: 13px;
  color: #64748b;
}

.leave-admin-empty {
  text-align: center;
  padding: 36px 16px !important;
  color: #64748b;
  font-size: 14px;
  border-bottom: none !important;
}

.leave-admin-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  color: #64748b;
}

.leave-admin-page-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
}

.leave-admin-page-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .leave-admin-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .leave-admin-filter-submit .leave-admin-btn {
    width: 100%;
  }

  .leave-admin-action-form {
    flex-direction: column;
    align-items: stretch;
  }

  .leave-admin-notes-input {
    width: 100%;
  }

  .leave-admin-cell-action {
    text-align: left;
  }
}

/* Timetable (templates/timetable/my.html) */
.tt-page {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.tt-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.tt-title {
  margin: 0;
  font-size: 26px;
  color: #1e293b;
}

.tt-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.tt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.tt-btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.tt-btn-secondary:hover {
  background: #f8fafc;
  color: #0f172a;
}

.tt-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.tt-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.tt-week-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.tt-day-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 120px;
}

.tt-day-name {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.tt-period-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tt-period-item {
  border-bottom: 1px solid #f1f5f9;
}

.tt-period-item:last-child {
  border-bottom: none;
}

.tt-period-row {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  align-items: flex-start;
}

.tt-period-no {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 13px;
}

.tt-period-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #334155;
}

.tt-line {
  line-height: 1.35;
}

.tt-line-subject {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
}

.tt-meta {
  display: none;
}

@media (min-width: 480px) {
  .tt-meta {
    display: inline;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-right: 6px;
  }
}

.tt-empty {
  padding: 20px 14px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .tt-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tt-header-actions {
    width: 100%;
    flex-direction: column;
  }

  .tt-header-actions .tt-btn {
    width: 100%;
  }
}

/* Add timetable period (templates/timetable/form.html) */
.tt-add-page {
  max-width: 640px;
  margin: 30px auto;
  padding: 0 20px;
}

.tt-add-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.tt-add-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.tt-add-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: none;
}

.tt-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 18px;
}

.tt-add-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.tt-add-field label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.tt-add-input,
.tt-add-page select.tt-add-input,
.tt-add-page input.tt-add-input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
}

.tt-add-errors {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.tt-add-field-error {
  margin-top: 4px;
  font-size: 12px;
  color: #b91c1c;
}

.tt-add-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 4px;
}

.tt-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.tt-add-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.tt-add-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.tt-add-btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.tt-add-btn-secondary:hover {
  background: #cbd5e1;
  color: #0f172a;
}

@media (max-width: 600px) {
  .tt-add-grid {
    grid-template-columns: 1fr;
  }
}

/* Exams list (templates/exams/list.html) */
.exams-page {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.exams-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.exams-header-text h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.exams-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.exams-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.exams-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.exams-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.exams-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.exams-table-card {
  margin-top: 24px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.exams-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}

.exams-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.exams-table th,
.exams-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.exams-table th {
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.exams-th-actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.exams-cell-name {
  font-weight: 700;
  color: #0f172a;
}

.exams-cell-dates {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #334155;
}

.exams-cell-actions {
  text-align: right;
}

.exam-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.exam-badge-published {
  background: #dcfce7;
  color: #166534;
}

.exam-badge-draft {
  background: #f1f5f9;
  color: #475569;
}

.exam-link {
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.exam-link:hover {
  text-decoration: underline;
}

.exams-empty {
  text-align: center;
  padding: 36px 16px !important;
  color: #64748b;
  font-size: 14px;
  border-bottom: none !important;
}

.exams-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 13px;
  color: #64748b;
}

.exams-page-link {
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
}

.exams-page-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .exams-header {
    flex-direction: column;
    align-items: stretch;
  }

  .exams-header-actions .exams-btn {
    width: 100%;
  }
}

/* Create exam (templates/exams/exam_form.html) */
.exam-create-page {
  max-width: 960px;
  margin: 30px auto;
  padding: 0 24px;
}

.exam-create-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.exam-create-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.exam-create-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 32px 36px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.exam-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

.exam-create-grid .sw-field {
  min-width: 0;
}

.exam-create-grid .sw-field.exam-create-field--full {
  grid-column: 1 / -1;
}

.exam-create-errors {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.exam-create-field-error {
  margin-top: 4px;
  font-size: 12px;
  color: #b91c1c;
}

.exam-create-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 4px;
}

.exam-create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.exam-create-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.exam-create-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.exam-create-btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.exam-create-btn-secondary:hover {
  background: #cbd5e1;
  color: #0f172a;
}

@media (max-width: 600px) {
  .exam-create-grid {
    grid-template-columns: 1fr;
  }

  .exam-create-grid .sw-field.exam-create-field--full {
    grid-column: 1;
  }
}

/* Fee structures list (templates/fees/structure_list.html) */
.fee-struct-page {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.fee-struct-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.fee-struct-header-text h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.fee-struct-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.fee-struct-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.fee-struct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.fee-struct-btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.fee-struct-btn-secondary:hover {
  background: #f8fafc;
  color: #0f172a;
}

.fee-struct-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.fee-struct-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.fee-struct-table-card {
  margin-top: 24px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.fee-struct-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}

.fee-struct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.fee-struct-table th,
.fee-struct-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.fee-struct-table th {
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.fee-struct-th-actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.fee-struct-cell-class {
  font-weight: 600;
  color: #0f172a;
}

.fee-struct-cell-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #0f172a;
}

.fee-struct-cell-due {
  white-space: nowrap;
  color: #334155;
}

.fee-struct-cell-actions {
  text-align: right;
}

.fee-struct-link {
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.fee-struct-link:hover {
  text-decoration: underline;
}

.fee-struct-empty {
  text-align: center;
  padding: 36px 16px !important;
  color: #64748b;
  font-size: 14px;
  border-bottom: none !important;
}

.fee-struct-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 13px;
  color: #64748b;
}

.fee-struct-page-link {
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
}

.fee-struct-page-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .fee-struct-header {
    flex-direction: column;
    align-items: stretch;
  }

  .fee-struct-header-actions {
    flex-direction: column;
  }

  .fee-struct-header-actions .fee-struct-btn {
    width: 100%;
  }
}

/* Add fee structure (templates/fees/structure_form.html) */
.fs-add-page {
  max-width: 640px;
  margin: 30px auto;
  padding: 0 20px;
}

.fs-add-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.fs-add-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.fs-add-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.fs-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 18px;
}

.fs-add-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.fs-add-field label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.fs-add-input,
.fs-add-page select.fs-add-input,
.fs-add-page input.fs-add-input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
}

.fs-add-errors {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.fs-add-field-error {
  margin-top: 4px;
  font-size: 12px;
  color: #b91c1c;
}

.fs-add-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 4px;
}

.fs-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.fs-add-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.fs-add-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.fs-add-btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.fs-add-btn-secondary:hover {
  background: #cbd5e1;
  color: #0f172a;
}

@media (max-width: 600px) {
  .fs-add-grid {
    grid-template-columns: 1fr;
  }
}

/* Add fee head (templates/fees/fee_head_form.html) */
.fh-add-page {
  max-width: 520px;
  margin: 30px auto;
  padding: 0 20px;
}

.fh-add-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1e293b;
}

.fh-add-header-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.fh-add-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.fh-add-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.fh-add-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.fh-add-field label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.fh-add-field-toggle .fh-add-switch {
  margin-top: 4px;
  margin-bottom: 0;
  padding-left: 0;
}

.fh-add-field-toggle .form-check-input {
  width: 2.5em;
  margin-left: 0;
  cursor: pointer;
}

.fh-add-input,
.fh-add-page textarea.fh-add-input,
.fh-add-page input.fh-add-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
}

.fh-add-textarea {
  min-height: 88px;
  resize: vertical;
}

.fh-add-errors {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.fh-add-field-error {
  margin-top: 4px;
  font-size: 12px;
  color: #b91c1c;
}

.fh-add-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 4px;
}

.fh-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.fh-add-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.fh-add-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.fh-add-btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.fh-add-btn-secondary:hover {
  background: #cbd5e1;
  color: #0f172a;
}

/* Faculty list (templates/faculty/list.html) — scoped styles */
.faculty-page {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.faculty-page .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faculty-page .header h1 {
  margin-bottom: 5px;
  color: #1e293b;
}

.faculty-page .header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.faculty-page .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.faculty-page .btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.faculty-page .btn.primary {
  background: #3b82f6;
  color: #fff;
}

.faculty-page .btn.secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.faculty-page .filter-bar {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.faculty-page .filter-bar input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.faculty-page .table-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

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

.faculty-page th,
.faculty-page td {
  padding: 12px;
  text-align: left;
}

.faculty-page th {
  background: #f1f5f9;
  font-size: 13px;
  color: #475569;
}

.faculty-page tr {
  border-bottom: 1px solid #e2e8f0;
}

.faculty-page .link {
  background: none;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}

.faculty-page .empty {
  text-align: center;
  padding: 20px;
  color: #94a3b8;
}

@media (max-width: 768px) {
  .faculty-page .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .faculty-page .filter-bar {
    flex-direction: column;
  }
}

/* Faculty profile (templates/faculty/detail.html) — scoped styles */
.faculty-profile-page {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.faculty-profile-page .btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.faculty-profile-page .btn.primary {
  background: #3b82f6;
  color: #fff;
}

.faculty-profile-page .btn.secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.profile-top-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.profile-top-left {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
}

.basic-info {
  min-width: 0;
}

.basic-info .name {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.basic-info .meta {
  font-size: 14px;
  color: #64748b;
  margin-top: 2px;
  word-break: break-word;
}

.profile-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.profile-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.panel-head {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 800;
  color: #0f172a;
}

.panel-body {
  padding: 14px 16px;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.kv:last-child {
  border-bottom: none;
}

.kv .k {
  font-size: 13px;
  color: #64748b;
  font-weight: 700;
}

.kv .v {
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
}

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

.assignment-item {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.assignment-item:last-child {
  border-bottom: none;
}

.assignment-sec {
  font-weight: 800;
  color: #0f172a;
}

.assignment-sub {
  color: #64748b;
  font-size: 13px;
  margin-top: 2px;
}

.faculty-profile-page .empty {
  text-align: center;
  padding: 20px;
  color: #94a3b8;
}

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

@media (max-width: 768px) {
  .profile-top-card {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-top-actions {
    justify-content: flex-start;
  }
  .kv {
    grid-template-columns: 1fr;
  }
}

/* Student profile (students/detail.html) — reference layout */
.student-profile {
  padding: 20px;
  font-family: sans-serif;
}

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

.student-profile .profile-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

.student-profile .profile-header p {
  margin: 4px 0 0;
  color: #64748b;
}

.student-profile .header-right {
  text-align: right;
}

.student-profile .actions a {
  margin-left: 6px;
  padding: 8px 14px;
  border: none;
  background: #3b82f6;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  display: inline-block;
}

.student-profile .actions a:hover,
.student-profile .actions a:focus {
  background: #2563eb;
  color: #fff;
}

.student-profile .badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 6px;
}

.student-profile .badge.active {
  background: #dcfce7;
  color: #166534;
}

.student-profile .badge.inactive {
  background: #e2e8f0;
  color: #334155;
}

.student-profile .profile-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.student-profile .card {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.student-profile .card h3 {
  margin-bottom: 10px;
  font-size: 14px;
  color: #1e293b;
  font-weight: 800;
}

.student-profile .full {
  grid-column: span 2;
}

.student-profile .danger {
  background: #ef4444;
  color: white;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.student-profile .danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .student-profile .profile-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .student-profile .header-right {
    width: 100%;
    text-align: left;
  }

  .student-profile .actions a {
    margin-left: 0;
    margin-right: 6px;
    margin-top: 6px;
  }

  .student-profile .profile-grid {
    grid-template-columns: 1fr;
  }

  .student-profile .full {
    grid-column: span 1;
  }
}

/* Batch move students (students/promote.html) — reference layout (scoped) */
.batch-move {
  max-width: 600px;
  margin: auto;
  font-family: sans-serif;
}

.batch-move .header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

.batch-move .header p {
  margin: 5px 0 15px;
  color: #64748b;
  font-size: 14px;
}

.batch-move .alert {
  background: #fef3c7;
  color: #92400e;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 15px;
}

.batch-move .card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.batch-move .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.batch-move .form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  color: #475569;
  font-weight: 700;
}

.batch-move .form-group select {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #cbd5f5;
  font-size: 13px;
  background: #fff;
}

.batch-move .actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.batch-move .primary {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.batch-move .primary:hover {
  background: #2563eb;
}

.batch-move .secondary {
  background: #e2e8f0;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
}

.batch-move .footer-note {
  margin-top: 10px;
  font-size: 12px;
  color: #94a3b8;
}

@media (max-width: 600px) {
  .batch-move .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Students + Faculty module dashboards — reference layout (scoped) */
.sw-module-hub--students,
.sw-module-hub--faculty,
.sw-module-hub--accounts,
.sw-module-hub--attendance,
.sw-module-hub--timetable,
.sw-module-hub--exams,
.sw-module-hub--fees,
.sw-module-hub--notices,
.sw-module-hub--messages {
  background: #f8fafc;
}

.sw-module-hub--students .module,
.sw-module-hub--faculty .module,
.sw-module-hub--accounts .module,
.sw-module-hub--attendance .module,
.sw-module-hub--timetable .module,
.sw-module-hub--exams .module,
.sw-module-hub--fees .module,
.sw-module-hub--notices .module,
.sw-module-hub--messages .module {
  max-width: 1200px;
  margin: auto;
}

.sw-module-hub--students .module-header h1,
.sw-module-hub--faculty .module-header h1,
.sw-module-hub--accounts .module-header h1,
.sw-module-hub--attendance .module-header h1,
.sw-module-hub--timetable .module-header h1,
.sw-module-hub--exams .module-header h1,
.sw-module-hub--fees .module-header h1,
.sw-module-hub--notices .module-header h1,
.sw-module-hub--messages .module-header h1 {
  margin: 0;
  font-size: 26px;
  color: #0f172a;
}

.sw-module-hub--students .module-header p,
.sw-module-hub--faculty .module-header p,
.sw-module-hub--accounts .module-header p,
.sw-module-hub--attendance .module-header p,
.sw-module-hub--timetable .module-header p,
.sw-module-hub--exams .module-header p,
.sw-module-hub--fees .module-header p,
.sw-module-hub--notices .module-header p,
.sw-module-hub--messages .module-header p {
  margin-top: 4px;
  color: #64748b;
  font-size: 14px;
}

.sw-module-hub--students .kpi-grid,
.sw-module-hub--faculty .kpi-grid,
.sw-module-hub--accounts .kpi-grid,
.sw-module-hub--attendance .kpi-grid,
.sw-module-hub--timetable .kpi-grid,
.sw-module-hub--exams .kpi-grid,
.sw-module-hub--fees .kpi-grid,
.sw-module-hub--notices .kpi-grid,
.sw-module-hub--messages .kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.sw-module-hub--students .kpi-card,
.sw-module-hub--faculty .kpi-card,
.sw-module-hub--accounts .kpi-card,
.sw-module-hub--attendance .kpi-card,
.sw-module-hub--timetable .kpi-card,
.sw-module-hub--exams .kpi-card,
.sw-module-hub--fees .kpi-card,
.sw-module-hub--notices .kpi-card,
.sw-module-hub--messages .kpi-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.sw-module-hub--students .kpi-card h3,
.sw-module-hub--faculty .kpi-card h3,
.sw-module-hub--accounts .kpi-card h3,
.sw-module-hub--attendance .kpi-card h3,
.sw-module-hub--timetable .kpi-card h3,
.sw-module-hub--exams .kpi-card h3,
.sw-module-hub--fees .kpi-card h3,
.sw-module-hub--notices .kpi-card h3,
.sw-module-hub--messages .kpi-card h3 {
  margin: 0;
  font-size: 24px;
  color: #3b82f6;
}

.sw-module-hub--students .kpi-card p,
.sw-module-hub--faculty .kpi-card p,
.sw-module-hub--accounts .kpi-card p,
.sw-module-hub--attendance .kpi-card p,
.sw-module-hub--timetable .kpi-card p,
.sw-module-hub--exams .kpi-card p,
.sw-module-hub--fees .kpi-card p,
.sw-module-hub--notices .kpi-card p,
.sw-module-hub--messages .kpi-card p {
  margin-top: 5px;
  color: #475569;
  font-size: 13px;
}

.sw-module-hub--students .main-grid,
.sw-module-hub--faculty .main-grid,
.sw-module-hub--accounts .main-grid,
.sw-module-hub--attendance .main-grid,
.sw-module-hub--timetable .main-grid,
.sw-module-hub--exams .main-grid,
.sw-module-hub--fees .main-grid,
.sw-module-hub--notices .main-grid,
.sw-module-hub--messages .main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

/* Generic card style inside students hub only */
.sw-module-hub--students .card,
.sw-module-hub--faculty .card,
.sw-module-hub--accounts .card,
.sw-module-hub--attendance .card,
.sw-module-hub--timetable .card,
.sw-module-hub--exams .card,
.sw-module-hub--fees .card,
.sw-module-hub--notices .card,
.sw-module-hub--messages .card {
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.sw-module-hub--students .card h2,
.sw-module-hub--faculty .card h2,
.sw-module-hub--accounts .card h2,
.sw-module-hub--attendance .card h2,
.sw-module-hub--timetable .card h2,
.sw-module-hub--exams .card h2,
.sw-module-hub--fees .card h2,
.sw-module-hub--notices .card h2,
.sw-module-hub--messages .card h2 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #1e293b;
  font-weight: 800;
}

.sw-module-hub--students .action-grid,
.sw-module-hub--faculty .action-grid,
.sw-module-hub--accounts .action-grid,
.sw-module-hub--attendance .action-grid,
.sw-module-hub--timetable .action-grid,
.sw-module-hub--exams .action-grid,
.sw-module-hub--fees .action-grid,
.sw-module-hub--notices .action-grid,
.sw-module-hub--messages .action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.sw-module-hub--students .action-card,
.sw-module-hub--faculty .action-card,
.sw-module-hub--accounts .action-card,
.sw-module-hub--attendance .action-card,
.sw-module-hub--timetable .action-card,
.sw-module-hub--exams .action-card,
.sw-module-hub--fees .action-card,
.sw-module-hub--notices .action-card,
.sw-module-hub--messages .action-card {
  padding: 15px;
  border-radius: 10px;
  background: #f1f5f9;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  display: block;
}

.sw-module-hub--students .action-card:hover,
.sw-module-hub--faculty .action-card:hover,
.sw-module-hub--accounts .action-card:hover,
.sw-module-hub--attendance .action-card:hover,
.sw-module-hub--timetable .action-card:hover,
.sw-module-hub--exams .action-card:hover,
.sw-module-hub--fees .action-card:hover,
.sw-module-hub--notices .action-card:hover,
.sw-module-hub--messages .action-card:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.sw-module-hub--students .action-card h4,
.sw-module-hub--faculty .action-card h4,
.sw-module-hub--accounts .action-card h4,
.sw-module-hub--attendance .action-card h4,
.sw-module-hub--timetable .action-card h4,
.sw-module-hub--exams .action-card h4,
.sw-module-hub--fees .action-card h4,
.sw-module-hub--notices .action-card h4,
.sw-module-hub--messages .action-card h4 {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
  font-weight: 800;
}

.sw-module-hub--students .action-card p,
.sw-module-hub--faculty .action-card p,
.sw-module-hub--accounts .action-card p,
.sw-module-hub--attendance .action-card p,
.sw-module-hub--timetable .action-card p,
.sw-module-hub--exams .action-card p,
.sw-module-hub--fees .action-card p,
.sw-module-hub--notices .action-card p,
.sw-module-hub--messages .action-card p {
  margin-top: 5px;
  font-size: 12px;
  color: #64748b;
}

/* Key metrics card + table (requested) */
.sw-module-hub--students .metrics-card,
.sw-module-hub--faculty .metrics-card,
.sw-module-hub--accounts .metrics-card,
.sw-module-hub--attendance .metrics-card,
.sw-module-hub--timetable .metrics-card,
.sw-module-hub--exams .metrics-card,
.sw-module-hub--fees .metrics-card,
.sw-module-hub--notices .metrics-card,
.sw-module-hub--messages .metrics-card {
  background: #ffffff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  max-width: 500px;
}

.sw-module-hub--students .metrics-header h2,
.sw-module-hub--faculty .metrics-header h2,
.sw-module-hub--accounts .metrics-header h2,
.sw-module-hub--attendance .metrics-header h2,
.sw-module-hub--timetable .metrics-header h2,
.sw-module-hub--exams .metrics-header h2,
.sw-module-hub--fees .metrics-header h2,
.sw-module-hub--notices .metrics-header h2,
.sw-module-hub--messages .metrics-header h2 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.sw-module-hub--students .metrics-header p,
.sw-module-hub--faculty .metrics-header p,
.sw-module-hub--accounts .metrics-header p,
.sw-module-hub--attendance .metrics-header p,
.sw-module-hub--timetable .metrics-header p,
.sw-module-hub--exams .metrics-header p,
.sw-module-hub--fees .metrics-header p,
.sw-module-hub--notices .metrics-header p,
.sw-module-hub--messages .metrics-header p {
  margin: 4px 0 12px;
  font-size: 13px;
  color: #64748b;
}

.sw-module-hub--students .metrics-table,
.sw-module-hub--faculty .metrics-table,
.sw-module-hub--accounts .metrics-table,
.sw-module-hub--attendance .metrics-table,
.sw-module-hub--timetable .metrics-table,
.sw-module-hub--exams .metrics-table,
.sw-module-hub--fees .metrics-table,
.sw-module-hub--notices .metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sw-module-hub--students .metrics-table th,
.sw-module-hub--faculty .metrics-table th,
.sw-module-hub--accounts .metrics-table th,
.sw-module-hub--attendance .metrics-table th,
.sw-module-hub--timetable .metrics-table th,
.sw-module-hub--exams .metrics-table th,
.sw-module-hub--fees .metrics-table th,
.sw-module-hub--notices .metrics-table th {
  text-align: left;
  padding: 8px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 500;
}

.sw-module-hub--students .metrics-table td,
.sw-module-hub--faculty .metrics-table td,
.sw-module-hub--accounts .metrics-table td,
.sw-module-hub--attendance .metrics-table td,
.sw-module-hub--timetable .metrics-table td,
.sw-module-hub--exams .metrics-table td,
.sw-module-hub--fees .metrics-table td,
.sw-module-hub--notices .metrics-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.sw-module-hub--students .metrics-table .right,
.sw-module-hub--faculty .metrics-table .right,
.sw-module-hub--accounts .metrics-table .right,
.sw-module-hub--attendance .metrics-table .right,
.sw-module-hub--timetable .metrics-table .right,
.sw-module-hub--exams .metrics-table .right,
.sw-module-hub--fees .metrics-table .right,
.sw-module-hub--notices .metrics-table .right {
  text-align: right;
  font-weight: 600;
}

.sw-module-hub--students .metrics-table .active,
.sw-module-hub--faculty .metrics-table .active,
.sw-module-hub--accounts .metrics-table .active,
.sw-module-hub--attendance .metrics-table .active,
.sw-module-hub--timetable .metrics-table .active,
.sw-module-hub--exams .metrics-table .active,
.sw-module-hub--fees .metrics-table .active,
.sw-module-hub--notices .metrics-table .active {
  color: #16a34a;
}

.sw-module-hub--students .metrics-table .inactive,
.sw-module-hub--faculty .metrics-table .inactive,
.sw-module-hub--accounts .metrics-table .inactive,
.sw-module-hub--attendance .metrics-table .inactive,
.sw-module-hub--timetable .metrics-table .inactive,
.sw-module-hub--exams .metrics-table .inactive,
.sw-module-hub--fees .metrics-table .inactive,
.sw-module-hub--notices .metrics-table .inactive {
  color: #ef4444;
}

.sw-module-hub--students .metrics-table .new,
.sw-module-hub--faculty .metrics-table .new,
.sw-module-hub--accounts .metrics-table .new,
.sw-module-hub--attendance .metrics-table .new,
.sw-module-hub--timetable .metrics-table .new,
.sw-module-hub--exams .metrics-table .new,
.sw-module-hub--fees .metrics-table .new,
.sw-module-hub--notices .metrics-table .new {
  color: #2563eb;
}

.sw-module-hub--students .metrics-table tbody tr:hover,
.sw-module-hub--faculty .metrics-table tbody tr:hover,
.sw-module-hub--accounts .metrics-table tbody tr:hover,
.sw-module-hub--attendance .metrics-table tbody tr:hover,
.sw-module-hub--timetable .metrics-table tbody tr:hover,
.sw-module-hub--exams .metrics-table tbody tr:hover,
.sw-module-hub--fees .metrics-table tbody tr:hover,
.sw-module-hub--notices .metrics-table tbody tr:hover {
  background: #f8fafc;
}

.sw-module-hub--students .guidance,
.sw-module-hub--faculty .guidance,
.sw-module-hub--accounts .guidance,
.sw-module-hub--attendance .guidance,
.sw-module-hub--timetable .guidance,
.sw-module-hub--exams .guidance,
.sw-module-hub--fees .guidance,
.sw-module-hub--notices .guidance {
  margin-top: 20px;
}

.sw-module-hub--students .guide-block,
.sw-module-hub--faculty .guide-block,
.sw-module-hub--accounts .guide-block,
.sw-module-hub--attendance .guide-block,
.sw-module-hub--timetable .guide-block,
.sw-module-hub--exams .guide-block,
.sw-module-hub--fees .guide-block,
.sw-module-hub--notices .guide-block {
  margin-bottom: 10px;
}

.sw-module-hub--students .guide-block h4,
.sw-module-hub--faculty .guide-block h4,
.sw-module-hub--accounts .guide-block h4,
.sw-module-hub--attendance .guide-block h4,
.sw-module-hub--timetable .guide-block h4,
.sw-module-hub--exams .guide-block h4,
.sw-module-hub--fees .guide-block h4,
.sw-module-hub--notices .guide-block h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.sw-module-hub--students .guide-block p,
.sw-module-hub--faculty .guide-block p,
.sw-module-hub--accounts .guide-block p,
.sw-module-hub--attendance .guide-block p,
.sw-module-hub--timetable .guide-block p,
.sw-module-hub--exams .guide-block p,
.sw-module-hub--fees .guide-block p,
.sw-module-hub--notices .guide-block p {
  font-size: 13px;
  color: #64748b;
  margin: 6px 0 0;
}

.sw-module-hub--students .footer-note,
.sw-module-hub--faculty .footer-note,
.sw-module-hub--accounts .footer-note,
.sw-module-hub--attendance .footer-note,
.sw-module-hub--timetable .footer-note,
.sw-module-hub--exams .footer-note,
.sw-module-hub--fees .footer-note,
.sw-module-hub--notices .footer-note {
  margin-top: 15px;
  font-size: 12px;
  color: #94a3b8;
}

@media (max-width: 768px) {
  .sw-module-hub--students .kpi-grid,
  .sw-module-hub--faculty .kpi-grid,
  .sw-module-hub--accounts .kpi-grid,
  .sw-module-hub--attendance .kpi-grid,
  .sw-module-hub--timetable .kpi-grid,
  .sw-module-hub--exams .kpi-grid,
  .sw-module-hub--fees .kpi-grid,
  .sw-module-hub--notices .kpi-grid,
  .sw-module-hub--messages .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sw-module-hub--students .main-grid,
  .sw-module-hub--faculty .main-grid,
  .sw-module-hub--accounts .main-grid,
  .sw-module-hub--attendance .main-grid,
  .sw-module-hub--timetable .main-grid,
  .sw-module-hub--exams .main-grid,
  .sw-module-hub--fees .main-grid,
  .sw-module-hub--notices .main-grid,
  .sw-module-hub--messages .main-grid {
    grid-template-columns: 1fr;
  }

  .sw-module-hub--students .action-grid,
  .sw-module-hub--faculty .action-grid,
  .sw-module-hub--accounts .action-grid,
  .sw-module-hub--attendance .action-grid,
  .sw-module-hub--timetable .action-grid,
  .sw-module-hub--exams .action-grid,
  .sw-module-hub--fees .action-grid,
  .sw-module-hub--notices .action-grid,
  .sw-module-hub--messages .action-grid {
    grid-template-columns: 1fr;
  }

  .sw-module-hub--students .metrics-card,
  .sw-module-hub--faculty .metrics-card,
  .sw-module-hub--accounts .metrics-card,
  .sw-module-hub--attendance .metrics-card,
  .sw-module-hub--timetable .metrics-card,
  .sw-module-hub--exams .metrics-card,
  .sw-module-hub--fees .metrics-card,
  .sw-module-hub--notices .metrics-card,
  .sw-module-hub--messages .metrics-card {
    max-width: 100%;
  }
}

/* Reports module dashboard — reference layout (scoped) */
.sw-module-hub--reports {
  background: #f8fafc;
}

.sw-module-hub--reports .module {
  max-width: 1200px;
  margin: auto;
}

.sw-module-hub--reports .module-header h1 {
  margin: 0;
  font-size: 26px;
  color: #0f172a;
}

.sw-module-hub--reports .module-header p {
  margin-top: 4px;
  color: #64748b;
  font-size: 14px;
}

.sw-module-hub--reports .kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.sw-module-hub--reports .kpi-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.sw-module-hub--reports .kpi-card h3 {
  margin: 0;
  font-size: 24px;
  color: #3b82f6;
}

.sw-module-hub--reports .kpi-card p {
  margin-top: 5px;
  color: #475569;
  font-size: 13px;
}

.sw-module-hub--reports .main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

.sw-module-hub--reports .card {
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.sw-module-hub--reports .card h2 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #1e293b;
  font-weight: 800;
}

.sw-module-hub--reports .action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.sw-module-hub--reports .action-card {
  padding: 15px;
  border-radius: 10px;
  background: #f1f5f9;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  display: block;
}

.sw-module-hub--reports .action-card:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.sw-module-hub--reports .action-card h4 {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
  font-weight: 800;
}

.sw-module-hub--reports .action-card p {
  margin-top: 5px;
  font-size: 12px;
  color: #64748b;
}

.sw-module-hub--reports .metrics-card {
  background: #ffffff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  max-width: 500px;
}

.sw-module-hub--reports .metrics-header h2 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.sw-module-hub--reports .metrics-header p {
  margin: 4px 0 12px;
  font-size: 13px;
  color: #64748b;
}

.sw-module-hub--reports .metrics-table .right {
  text-align: right;
  font-weight: 600;
}

.sw-module-hub--reports .metrics-table .active {
  color: #16a34a;
}

.sw-module-hub--reports .metrics-table .inactive {
  color: #ef4444;
}

.sw-module-hub--reports .metrics-table .new {
  color: #2563eb;
}

.sw-module-hub--reports .guidance {
  margin-top: 20px;
}

.sw-module-hub--reports .guide-block {
  margin-bottom: 10px;
}

.sw-module-hub--reports .guide-block h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.sw-module-hub--reports .guide-block p {
  font-size: 13px;
  color: #64748b;
  margin: 6px 0 0;
}

.sw-module-hub--reports .footer-note {
  margin-top: 15px;
  font-size: 12px;
  color: #94a3b8;
}

@media (max-width: 768px) {
  .sw-module-hub--reports .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sw-module-hub--reports .main-grid {
    grid-template-columns: 1fr;
  }
  .sw-module-hub--reports .action-grid {
    grid-template-columns: 1fr;
  }
  .sw-module-hub--reports .metrics-card {
    max-width: 100%;
  }
}

/* —— Add assignment (/faculty/.../assignments/add/) —— */
.assignment-page {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.assignment-page .header h2 {
  margin: 0;
  color: #0f172a;
}

.assignment-page .header p {
  margin: 5px 0 15px;
  color: #64748b;
  font-size: 14px;
}

.assignment-page .card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: none;
}

.assignment-page .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.assignment-page .form-group {
  margin-bottom: 15px;
}

.assignment-page .form-group.full {
  grid-column: span 2;
}

.assignment-page label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  color: #475569;
}

.assignment-page select {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #cbd5f5;
  font-size: 13px;
  background-color: #fff;
}

.assignment-page .actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.assignment-page .primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.assignment-page .primary:hover {
  background: #2563eb;
  color: #fff;
}

.assignment-page a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #0f172a;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}

.assignment-page a.secondary:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.assignment-page-errors {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.assignment-page-field-error {
  margin-top: 4px;
  font-size: 12px;
  color: #b91c1c;
}

@media (max-width: 600px) {
  .assignment-page .form-grid {
    grid-template-columns: 1fr;
  }

  .assignment-page .form-group.full {
    grid-column: span 1;
  }
}

/* ===== Marks Page Enhancements ===== */

.sw-marks-results-page .sw-dash-panel {
  border-radius: 14px;
  transition: 0.2s ease;
}

.sw-marks-results-page .sw-dash-panel:hover {
  transform: translateY(-2px);
}

/* Header */
.sw-marks-results-page h1 {
  letter-spacing: -0.3px;
}

/* Alerts */
#md-fatal-banner,
#md-storage-banner {
  border-radius: 10px;
  font-size: 13px;
}

/* Form spacing */
#md-marks-form .form-control {
  height: 42px;
  border-radius: 8px;
}

#md-marks-form label {
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* Buttons */
#md-add {
  font-weight: 600;
}

#md-clear-all {
  font-weight: 500;
}

/* Table improvements */
.sw-dash-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.sw-dash-table td {
  font-size: 13px;
}

.sw-dash-table tr:hover {
  background: #f8fafc;
}

/* Metrics alignment */
.sw-dash-metric {
  font-weight: 600;
  color: #0f172a;
}

/* Reference panel */
.sw-marks-ref-link {
  transition: 0.2s ease;
}

.sw-marks-ref-link:hover {
  background: #f8fafc;
  transform: translateX(3px);
}

.sw-marks-ref-link__icon {
  width: 34px;
  height: 34px;
  background: #eff6ff;
  color: #2563eb;
}

/* Footer */
footer .alert {
  border-radius: 10px;
  font-size: 13px;
}

/* ===== Marks Page (template-provided HTML/CSS) =====
   Scoped to `.sw-marks-results-page` to avoid affecting other pages.
*/

.sw-marks-results-page .marks-page {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}

/* Header */
.sw-marks-results-page .header h2 {
  margin: 0;
}

.sw-marks-results-page .header p {
  color: #64748b;
  font-size: 14px;
}

/* Alerts */
.sw-marks-results-page .alerts {
  margin-top: 15px;
}

.sw-marks-results-page .alert.warning,
.sw-marks-results-page .alert.danger {
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 13px;
}

.sw-marks-results-page .warning {
  background: #fef3c7;
  color: #92400e;
}

.sw-marks-results-page .danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Grid */
.sw-marks-results-page .main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* Card */
.sw-marks-results-page .marks-page .card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* Form */
.sw-marks-results-page .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.sw-marks-results-page .form-group {
  display: flex;
  flex-direction: column;
}

.sw-marks-results-page .form-group label {
  font-size: 13px;
  margin-bottom: 5px;
  color: #475569;
}

.sw-marks-results-page .form-group input,
.sw-marks-results-page .form-group select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  background: #fff;
}

/* Buttons */
.sw-marks-results-page .primary,
.sw-marks-results-page a.primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.sw-marks-results-page .secondary,
.sw-marks-results-page a.secondary {
  background: #e2e8f0;
  color: #0f172a;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.sw-marks-results-page .full {
  width: 100%;
  margin-top: 10px;
}

/* Actions */
.sw-marks-results-page .actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 10px;
}

/* Table */
.sw-marks-results-page .table-container {
  margin-top: 20px;
}

.sw-marks-results-page .table-container h4 {
  margin-bottom: 10px;
}

.sw-marks-results-page table {
  width: 100%;
  border-collapse: collapse;
}

.sw-marks-results-page th,
.sw-marks-results-page td {
  padding: 10px;
  font-size: 13px;
  text-align: left;
}

.sw-marks-results-page th {
  background: #f1f5f9;
}

.sw-marks-results-page .table-container tr {
  border-bottom: 1px solid #e2e8f0;
}

.sw-marks-results-page .empty {
  text-align: center;
  color: #94a3b8;
}

/* Reference */
.sw-marks-results-page .reference-list {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.sw-marks-results-page .reference-list li {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  cursor: pointer;
}

.sw-marks-results-page .reference-list li:hover {
  background: #f8fafc;
}

/* Footer */
.sw-marks-results-page .footer-note {
  margin-top: 15px;
  font-size: 12px;
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
  .sw-marks-results-page .main-grid {
    grid-template-columns: 1fr;
  }

  .sw-marks-results-page .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Marks layout (filters + entry) ===== */
.sw-marks-results-page .marks-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cards */
.sw-marks-results-page .marks-container .card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Titles */
.sw-marks-results-page .marks-container .card h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

/* Form */
.sw-marks-results-page .marks-container .form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.sw-marks-results-page .marks-container .form-group label {
  font-size: 12px;
  color: #64748b;
}

.sw-marks-results-page .marks-container .form-group input,
.sw-marks-results-page .marks-container .form-group select {
  height: 40px;
  border-radius: 8px;
  border: 1px solid #ccc;
  padding: 6px;
}

/* Buttons */
.sw-marks-results-page .marks-container .primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.sw-marks-results-page .marks-container .secondary {
  background: #e5e7eb;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
}

/* Table */
.sw-marks-results-page .marks-container .table-box {
  margin-top: 15px;
  overflow: auto;
}

.sw-marks-results-page .marks-container table {
  width: 100%;
  border-collapse: collapse;
}

.sw-marks-results-page .marks-container thead {
  background: #1e293b;
  color: #fff;
}

.sw-marks-results-page .marks-container th,
.sw-marks-results-page .marks-container td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.sw-marks-results-page .marks-container .error-text {
  color: red;
  font-size: 13px;
  margin-top: 8px;
}

.sw-marks-results-page .action-card {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
  .sw-marks-results-page .marks-container .form-grid {
    grid-template-columns: 1fr;
  }
}

