/* Olive theme (scoped).
   Colors come from the global `:root` color system in custom.css.
   This file focuses on layout, density, and component styling. */

.sw-theme-olive {
  --sw-focus-ring: color-mix(in srgb, var(--primary) 35%, transparent);
}

/* Density presets (role-based via base.html) */
.sw-theme-olive.sw-density-student {
  --sw-content-max: 1100px;
  --sw-card-pad: 18px;
  --sw-card-gap: 18px;
  --sw-table-pad-y: 10px;
  --sw-table-pad-x: 12px;
  --sw-field-pad-y: 10px;
  --sw-field-pad-x: 12px;
  --sw-font-size: 15px;
  --sw-line-height: 1.55;
  --sw-main-pad-top: 1.5rem;
  --sw-main-pad-bottom: 2.25rem;
  --sw-main-pad-x: clamp(16px, 2.2vw, 32px);
}

.sw-theme-olive.sw-density-admin {
  --sw-content-max: 1400px;
  --sw-card-pad: 14px;
  --sw-card-gap: 14px;
  --sw-table-pad-y: 8px;
  --sw-table-pad-x: 10px;
  --sw-field-pad-y: 8px;
  --sw-field-pad-x: 10px;
  --sw-font-size: 14px;
  --sw-line-height: 1.45;
  --sw-main-pad-top: 1rem;
  --sw-main-pad-bottom: 1.5rem;
  --sw-main-pad-x: clamp(12px, 1.6vw, 22px);
}

/* Global readability + hierarchy */
.sw-theme-olive {
  font-size: var(--sw-font-size, 15px);
  line-height: var(--sw-line-height, 1.55);
}

.sw-theme-olive main#sw-main-content {
  max-width: var(--sw-content-max, 1200px);
  padding-left: var(--sw-main-pad-x, 20px) !important;
  padding-right: var(--sw-main-pad-x, 20px) !important;
  padding-top: var(--sw-main-pad-top, 1.25rem) !important;
  padding-bottom: var(--sw-main-pad-bottom, 2rem) !important;
}

.sw-theme-olive h1,
.sw-theme-olive h2,
.sw-theme-olive h3 {
  letter-spacing: -0.02em;
}

.sw-theme-olive a {
  color: var(--primary);
}
.sw-theme-olive a:hover,
.sw-theme-olive a:focus {
  color: var(--primary);
  text-decoration: underline;
}

/* Icons (Bootstrap Icons + generic <i>) */
.sw-theme-olive .bi,
.sw-theme-olive i.bi,
.sw-theme-olive i[class^="bi-"],
.sw-theme-olive i[class*=" bi-"] {
  color: color-mix(in srgb, var(--primary) 70%, #000);
}

/* Active icons: accent */
.sw-theme-olive .active .bi,
.sw-theme-olive .nav-link.active .bi,
.sw-theme-olive .btn.active .bi {
  color: var(--accent) !important;
}

/* Admin dashboard KPI tiles (Students / Faculty / Fees today / Attendance) */
.sw-theme-olive .sw-kpi-card {
  /* ensure legacy gradient doesn't reintroduce blue tint */
  background: #fff !important;
}

.sw-theme-olive .sw-kpi-card::before {
  background: linear-gradient(180deg, var(--primary), var(--accent)) !important;
}

.sw-theme-olive .sw-kpi-card--blue::before,
.sw-theme-olive .sw-kpi-card--violet::before,
.sw-theme-olive .sw-kpi-card--emerald::before,
.sw-theme-olive .sw-kpi-card--amber::before {
  background: linear-gradient(180deg, var(--primary), var(--accent)) !important;
}

.sw-theme-olive .sw-kpi-icon {
  background: color-mix(in srgb, var(--accent) 28%, #fff) !important;
  color: var(--primary) !important;
}

.sw-theme-olive .sw-kpi-btn,
.sw-theme-olive .sw-kpi-btn--violet,
.sw-theme-olive .sw-kpi-btn--emerald,
.sw-theme-olive .sw-kpi-btn--amber {
  background: var(--primary) !important;
  color: #fff !important;
  border: 1px solid color-mix(in srgb, var(--primary) 85%, #000) !important;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 28%, transparent) !important;
}

.sw-theme-olive .sw-kpi-btn:hover,
.sw-theme-olive .sw-kpi-btn:focus,
.sw-theme-olive .sw-kpi-btn--violet:hover,
.sw-theme-olive .sw-kpi-btn--violet:focus,
.sw-theme-olive .sw-kpi-btn--emerald:hover,
.sw-theme-olive .sw-kpi-btn--emerald:focus,
.sw-theme-olive .sw-kpi-btn--amber:hover,
.sw-theme-olive .sw-kpi-btn--amber:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  border-color: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

/* Students add/edit page (/students/add/, /students/<id>/edit/) */
.sw-theme-olive .sw-student-card {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

.sw-theme-olive .sw-student-section h2 {
  border-left-color: var(--primary) !important;
}

.sw-theme-olive .sw-student-form input:focus,
.sw-theme-olive .sw-student-form select:focus,
.sw-theme-olive .sw-student-form textarea:focus,
.sw-theme-olive .sw-student-form .form-control:focus,
.sw-theme-olive .sw-student-form .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent) !important;
}

.sw-theme-olive .students-page .filter-bar select:focus,
.sw-theme-olive .students-page .filter-bar input:focus {
  border-color: var(--primary) !important;
  outline: 3px solid color-mix(in srgb, var(--primary) 25%, transparent) !important;
  box-shadow: none !important;
}

/* Faculty add/edit page (/faculty/add/, /faculty/<id>/edit/) */
.sw-theme-olive .sw-faculty-add-page .card {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

.sw-theme-olive .sw-faculty-add-page .section h2 {
  border-left-color: var(--primary) !important;
}

.sw-theme-olive .sw-faculty-add-page input:focus,
.sw-theme-olive .sw-faculty-add-page select:focus,
.sw-theme-olive .sw-faculty-add-page textarea:focus,
.sw-theme-olive .sw-faculty-add-page .form-control:focus,
.sw-theme-olive .sw-faculty-add-page .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent) !important;
}

.sw-theme-olive .sw-faculty-add-page .btn.primary,
.sw-theme-olive .sw-faculty-add-page .btn.small {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .sw-faculty-add-page .btn.primary:hover,
.sw-theme-olive .sw-faculty-add-page .btn.primary:focus,
.sw-theme-olive .sw-faculty-add-page .btn.small:hover,
.sw-theme-olive .sw-faculty-add-page .btn.small:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

/* Attendance mark page (/attendance/mark/): Load Students + Save buttons */
.sw-theme-olive .mark-att-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .mark-att-btn-primary:hover,
.sw-theme-olive .mark-att-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

.sw-theme-olive .mark-att-btn-secondary {
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* Attendance reports (/attendance/reports/): Filter button */
.sw-theme-olive .att-reports-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .att-reports-btn-primary:hover,
.sw-theme-olive .att-reports-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

/* Staff attendance mark (/attendance/staff/mark/): buttons */
.sw-theme-olive .mark-staff-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .mark-staff-btn-primary:hover,
.sw-theme-olive .mark-staff-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

.sw-theme-olive .mark-staff-btn-secondary {
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* Staff attendance mark: "Monthly Register" left accent line */
.sw-theme-olive .mark-staff-section-title {
  border-left-color: var(--primary) !important;
}

/* Staff monthly register (/attendance/staff/register/): buttons */
.sw-theme-olive .staff-reg-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .staff-reg-btn-primary:hover,
.sw-theme-olive .staff-reg-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

.sw-theme-olive .staff-reg-btn-secondary {
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* Faculty leave admin (/attendance/leave/admin/): Filter button */
.sw-theme-olive .leave-admin-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .leave-admin-btn-primary:hover,
.sw-theme-olive .leave-admin-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

/* Exams list (/exams/): "+ Create Exam" button */
.sw-theme-olive .exams-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .exams-btn-primary:hover,
.sw-theme-olive .exams-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

/* Exams create (/exams/add/): buttons */
.sw-theme-olive .exam-create-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .exam-create-btn-primary:hover,
.sw-theme-olive .exam-create-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

.sw-theme-olive .exam-create-btn-secondary {
  border: 1px solid var(--border) !important;
  background: #fff !important;
  color: var(--text) !important;
}

.sw-theme-olive .exam-create-btn-secondary:hover,
.sw-theme-olive .exam-create-btn-secondary:focus {
  background: color-mix(in srgb, var(--primary) 8%, #fff) !important;
  color: var(--text) !important;
}

/* Notices (/notifications/): buttons */
.sw-theme-olive .nt-feed-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .nt-feed-btn-primary:hover,
.sw-theme-olive .nt-feed-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

.sw-theme-olive .nt-feed-btn-outline {
  background: #fff !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.sw-theme-olive .nt-feed-btn-outline:hover,
.sw-theme-olive .nt-feed-btn-outline:focus {
  background: color-mix(in srgb, var(--primary) 10%, #fff) !important;
  color: var(--primary) !important;
}

.sw-theme-olive .nt-feed-btn-ghost {
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* User directory (/accounts/users/): buttons */
.sw-theme-olive .user-directory-page .ud-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .user-directory-page .ud-btn-primary:hover,
.sw-theme-olive .user-directory-page .ud-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

.sw-theme-olive .user-directory-page .ud-btn-secondary {
  background: #fff !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.sw-theme-olive .user-directory-page .ud-btn-secondary:hover,
.sw-theme-olive .user-directory-page .ud-btn-secondary:focus {
  background: color-mix(in srgb, var(--primary) 10%, #fff) !important;
  color: var(--primary) !important;
}

.sw-theme-olive .user-directory-page .ud-btn-outline {
  background: #fff !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.sw-theme-olive .user-directory-page .ud-btn-outline:hover,
.sw-theme-olive .user-directory-page .ud-btn-outline:focus {
  background: color-mix(in srgb, var(--accent) 10%, #fff) !important;
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border)) !important;
}

.sw-theme-olive .user-directory-page .ud-btn-primary-soft {
  background: color-mix(in srgb, var(--primary) 10%, #fff) !important;
  color: var(--primary) !important;
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border)) !important;
}

.sw-theme-olive .user-directory-page .ud-btn-primary-soft:hover,
.sw-theme-olive .user-directory-page .ud-btn-primary-soft:focus {
  background: color-mix(in srgb, var(--primary) 16%, #fff) !important;
  color: var(--primary) !important;
}

/* Timetable (/timetable/, /timetable/manage/): buttons */
.sw-theme-olive .tt-btn-primary,
.sw-theme-olive .tt-btn.primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .tt-btn-primary:hover,
.sw-theme-olive .tt-btn-primary:focus,
.sw-theme-olive .tt-btn.primary:hover,
.sw-theme-olive .tt-btn.primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

.sw-theme-olive .tt-btn-secondary,
.sw-theme-olive .tt-btn.secondary {
  background: #fff !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.sw-theme-olive .tt-btn-secondary:hover,
.sw-theme-olive .tt-btn-secondary:focus,
.sw-theme-olive .tt-btn.secondary:hover,
.sw-theme-olive .tt-btn.secondary:focus {
  background: color-mix(in srgb, var(--primary) 10%, #fff) !important;
  color: var(--primary) !important;
}

.sw-theme-olive .tt-btn.warning {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .tt-btn.warning:hover,
.sw-theme-olive .tt-btn.warning:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

/* Fee structures (/fees/structures/, /fees/structures/add/): buttons */
.sw-theme-olive .fee-struct-btn-primary,
.sw-theme-olive .fs-add-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .fee-struct-page .fee-struct-header-actions .fee-struct-btn.fee-struct-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

.sw-theme-olive .fee-struct-page .fee-struct-header-actions .fee-struct-btn.fee-struct-btn-primary:hover,
.sw-theme-olive .fee-struct-page .fee-struct-header-actions .fee-struct-btn.fee-struct-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  border-color: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

.sw-theme-olive .fee-struct-btn-primary:hover,
.sw-theme-olive .fee-struct-btn-primary:focus,
.sw-theme-olive .fs-add-btn-primary:hover,
.sw-theme-olive .fs-add-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

.sw-theme-olive .fee-struct-btn-secondary {
  background: #fff !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.sw-theme-olive .fee-struct-btn-secondary:hover,
.sw-theme-olive .fee-struct-btn-secondary:focus {
  background: color-mix(in srgb, var(--primary) 10%, #fff) !important;
  color: var(--primary) !important;
}

.sw-theme-olive .fs-add-btn-secondary {
  background: #fff !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
}

.sw-theme-olive .fs-add-btn-secondary:hover,
.sw-theme-olive .fs-add-btn-secondary:focus {
  background: color-mix(in srgb, var(--primary) 10%, #fff) !important;
  color: var(--primary) !important;
}

.sw-theme-olive .sw-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .sw-btn-primary:hover,
.sw-theme-olive .sw-btn-primary:focus {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

/* Module hub (Students/Fees/Exams/Attendance/Timetable/etc): remove legacy gradients/shades */
.sw-theme-olive .sw-module-hero {
  background: var(--primary) !important;
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.sw-theme-olive .sw-module-hero--students,
.sw-theme-olive .sw-module-hero--faculty,
.sw-theme-olive .sw-module-hero--fees,
.sw-theme-olive .sw-module-hero--attendance,
.sw-theme-olive .sw-module-hero--exams,
.sw-theme-olive .sw-module-hero--notices,
.sw-theme-olive .sw-module-hero--messages,
.sw-theme-olive .sw-module-hero--timetable,
.sw-theme-olive .sw-module-hero--reports,
.sw-theme-olive .sw-module-hero--accounts {
  background: var(--primary) !important;
}

.sw-theme-olive .sw-module-hub--students,
.sw-theme-olive .sw-module-hub--faculty,
.sw-theme-olive .sw-module-hub--accounts,
.sw-theme-olive .sw-module-hub--attendance,
.sw-theme-olive .sw-module-hub--timetable,
.sw-theme-olive .sw-module-hub--exams,
.sw-theme-olive .sw-module-hub--fees,
.sw-theme-olive .sw-module-hub--notices,
.sw-theme-olive .sw-module-hub--messages {
  background: transparent !important;
}

/* Fees dashboard (and other module hubs): remove blue KPI number + grey action-card tints */
.sw-theme-olive .sw-module-hub .kpi-card h3 {
  color: var(--primary) !important;
}

.sw-theme-olive .sw-module-hub .action-card {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

.sw-theme-olive .sw-module-hub .action-card:hover {
  background: color-mix(in srgb, var(--accent) 10%, #fff) !important;
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border)) !important;
}

.sw-theme-olive .sw-module-hub--students .module-header h1,
.sw-theme-olive .sw-module-hub--faculty .module-header h1,
.sw-theme-olive .sw-module-hub--accounts .module-header h1,
.sw-theme-olive .sw-module-hub--attendance .module-header h1,
.sw-theme-olive .sw-module-hub--timetable .module-header h1,
.sw-theme-olive .sw-module-hub--exams .module-header h1,
.sw-theme-olive .sw-module-hub--fees .module-header h1,
.sw-theme-olive .sw-module-hub--notices .module-header h1,
.sw-theme-olive .sw-module-hub--messages .module-header h1 {
  color: var(--text) !important;
}

.sw-theme-olive .sw-module-hub--students .module-header p,
.sw-theme-olive .sw-module-hub--faculty .module-header p,
.sw-theme-olive .sw-module-hub--accounts .module-header p,
.sw-theme-olive .sw-module-hub--attendance .module-header p,
.sw-theme-olive .sw-module-hub--timetable .module-header p,
.sw-theme-olive .sw-module-hub--exams .module-header p,
.sw-theme-olive .sw-module-hub--fees .module-header p,
.sw-theme-olive .sw-module-hub--notices .module-header p,
.sw-theme-olive .sw-module-hub--messages .module-header p {
  color: color-mix(in srgb, var(--text) 70%, #ffffff) !important;
}

.sw-theme-olive .sw-module-hub .action-card:hover {
  background: color-mix(in srgb, var(--accent) 12%, #fff) !important;
}

.sw-theme-olive .sw-action-card:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, transparent) !important;
}

.sw-theme-olive .sw-action-icon {
  background: color-mix(in srgb, var(--primary) 12%, #fff) !important;
  color: var(--primary) !important;
}

.sw-theme-olive .sw-module-hub .action-card:hover,
.sw-theme-olive .sw-module-hub--students .action-card:hover,
.sw-theme-olive .sw-module-hub--fees .action-card:hover,
.sw-theme-olive .sw-module-hub--attendance .action-card:hover,
.sw-theme-olive .sw-module-hub--exams .action-card:hover,
.sw-theme-olive .sw-module-hub--timetable .action-card:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, transparent) !important;
}

.sw-theme-olive .sw-module-aside {
  background: color-mix(in srgb, var(--accent) 10%, #fff) !important;
  border-color: var(--border) !important;
}

/* Tables (admin-heavy screens benefit most) */
.sw-theme-olive table {
  border-color: var(--border);
}

.sw-theme-olive table thead th,
.sw-theme-olive table thead td,
.sw-theme-olive .table thead th,
.sw-theme-olive .table thead td {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--border) !important;
}

.sw-theme-olive table th,
.sw-theme-olive table td,
.sw-theme-olive .table th,
.sw-theme-olive .table td {
  padding: var(--sw-table-pad-y, 10px) var(--sw-table-pad-x, 12px);
  border-color: var(--border);
}

/* Zebra rows + hover */
.sw-theme-olive table tbody tr:nth-child(even),
.sw-theme-olive .table tbody tr:nth-child(even) {
  background: color-mix(in srgb, #fff 80%, var(--background) 20%);
}

.sw-theme-olive table tbody tr:hover,
.sw-theme-olive .table tbody tr:hover {
  background: color-mix(in srgb, #fff 88%, var(--accent) 12%);
}

/* Cards / panels: normalize padding to density (Bootstrap cards vary by template) */
.sw-theme-olive .card,
.sw-theme-olive .sw-dash-panel,
.sw-theme-olive .metrics-card,
.sw-theme-olive .sw-kpi-card,
.sw-theme-olive .sw-action-card,
.sw-theme-olive .sw-master-data-tile,
.sw-theme-olive .sw-admin-cta,
.sw-theme-olive .tt-day-card,
.sw-theme-olive .nt-feed-card,
.sw-theme-olive .sm-inbox-card,
.sw-theme-olive .sm-thread-card,
.sw-theme-olive .sm-thread-reply,
.sw-theme-olive .fee-table-card,
.sw-theme-olive .res-card,
.sw-theme-olive .att-card,
.sw-theme-olive .msg-card,
.sw-theme-olive .profile-header,
.sw-theme-olive .profile-card,
.sw-theme-olive .kpi-card {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

.sw-theme-olive.sw-density-admin .card,
.sw-theme-olive.sw-density-admin .sw-dash-panel,
.sw-theme-olive.sw-density-admin .metrics-card,
.sw-theme-olive.sw-density-admin .sw-kpi-card,
.sw-theme-olive.sw-density-admin .sw-action-card,
.sw-theme-olive.sw-density-admin .sw-master-data-tile,
.sw-theme-olive.sw-density-admin .sw-admin-cta,
.sw-theme-olive.sw-density-admin .tt-day-card,
.sw-theme-olive.sw-density-admin .nt-feed-card,
.sw-theme-olive.sw-density-admin .sm-inbox-card,
.sw-theme-olive.sw-density-admin .sm-thread-card,
.sw-theme-olive.sw-density-admin .sm-thread-reply,
.sw-theme-olive.sw-density-admin .fee-table-card,
.sw-theme-olive.sw-density-admin .res-card,
.sw-theme-olive.sw-density-admin .att-card,
.sw-theme-olive.sw-density-admin .msg-card,
.sw-theme-olive.sw-density-admin .profile-header,
.sw-theme-olive.sw-density-admin .profile-card,
.sw-theme-olive.sw-density-admin .kpi-card {
  padding: var(--sw-card-pad) !important;
}

.sw-theme-olive.sw-density-student .card,
.sw-theme-olive.sw-density-student .sw-dash-panel,
.sw-theme-olive.sw-density-student .metrics-card,
.sw-theme-olive.sw-density-student .sw-kpi-card,
.sw-theme-olive.sw-density-student .sw-action-card,
.sw-theme-olive.sw-density-student .sw-master-data-tile,
.sw-theme-olive.sw-density-student .sw-admin-cta,
.sw-theme-olive.sw-density-student .tt-day-card,
.sw-theme-olive.sw-density-student .nt-feed-card,
.sw-theme-olive.sw-density-student .sm-inbox-card,
.sw-theme-olive.sw-density-student .sm-thread-card,
.sw-theme-olive.sw-density-student .sm-thread-reply,
.sw-theme-olive.sw-density-student .fee-table-card,
.sw-theme-olive.sw-density-student .res-card,
.sw-theme-olive.sw-density-student .att-card,
.sw-theme-olive.sw-density-student .msg-card,
.sw-theme-olive.sw-density-student .profile-header,
.sw-theme-olive.sw-density-student .profile-card,
.sw-theme-olive.sw-density-student .kpi-card {
  padding: var(--sw-card-pad) !important;
}

/* Reduce/increase section spacing */
.sw-theme-olive.sw-density-admin .row.g-4 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

.sw-theme-olive.sw-density-student .row.g-4 {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}

/* Forms */
.sw-theme-olive input[type="text"],
.sw-theme-olive input[type="email"],
.sw-theme-olive input[type="password"],
.sw-theme-olive input[type="number"],
.sw-theme-olive input[type="date"],
.sw-theme-olive select,
.sw-theme-olive textarea {
  padding: var(--sw-field-pad-y, 10px) var(--sw-field-pad-x, 12px);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, #fff 92%, var(--primary) 2%);
}

/* Filters/toolbars: denser admin, roomier student */
.sw-theme-olive.sw-density-admin .filters,
.sw-theme-olive.sw-density-admin .sw-toolbar,
.sw-theme-olive.sw-density-admin .sw-filter-row {
  gap: 0.6rem !important;
}

.sw-theme-olive.sw-density-student .filters,
.sw-theme-olive.sw-density-student .sw-toolbar,
.sw-theme-olive.sw-density-student .sw-filter-row {
  gap: 1rem !important;
}

.sw-theme-olive input:focus,
.sw-theme-olive select:focus,
.sw-theme-olive textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
  box-shadow: none;
}

/* Bootstrap form controls (ensure coverage on admin screens) */
.sw-theme-olive .form-control,
.sw-theme-olive .form-select,
.sw-theme-olive .form-check-input {
  border-color: var(--border) !important;
}

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

/* Labels: dark olive, clear hierarchy */
.sw-theme-olive label,
.sw-theme-olive .form-label,
.sw-theme-olive .col-form-label {
  color: var(--text);
  font-weight: 600;
}

/* Field spacing + alignment helpers */
.sw-theme-olive .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.sw-theme-olive.sw-density-admin .form-group {
  margin-bottom: 0.7rem;
}

.sw-theme-olive.sw-density-student .form-group {
  margin-bottom: 1rem;
}

.sw-theme-olive .form-check {
  margin-bottom: 0.75rem;
}

.sw-theme-olive.sw-density-admin .form-check {
  margin-bottom: 0.6rem;
}

.sw-theme-olive .form-text,
.sw-theme-olive .text-muted {
  color: color-mix(in srgb, var(--text) 60%, #ffffff) !important;
}

/* Buttons (primary / secondary) — shared across admin + student */
.sw-theme-olive .btn,
.sw-theme-olive button,
.sw-theme-olive a.btn {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

/* Primary */
.sw-theme-olive .btn-primary,
.sw-theme-olive .btn.btn-primary,
.sw-theme-olive .btn.primary,
.sw-theme-olive button.btn-primary,
.sw-theme-olive button.primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.sw-theme-olive .btn-primary:hover,
.sw-theme-olive .btn.btn-primary:hover,
.sw-theme-olive .btn.primary:hover,
.sw-theme-olive button.btn-primary:hover,
.sw-theme-olive button.primary:hover {
  background: color-mix(in srgb, var(--primary) 86%, #000) !important;
  border-color: color-mix(in srgb, var(--primary) 86%, #000) !important;
  color: #fff !important;
}

/* Secondary (outline) */
.sw-theme-olive .btn-outline-primary,
.sw-theme-olive .btn.secondary,
.sw-theme-olive .btn.btn-outline-primary {
  background: transparent !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.sw-theme-olive .btn-outline-primary:hover,
.sw-theme-olive .btn.secondary:hover,
.sw-theme-olive .btn.btn-outline-primary:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* Finance Overview: "Pending fees" uses Bootstrap warning outline */
.sw-theme-olive .btn-outline-warning,
.sw-theme-olive .btn.btn-outline-warning {
  background: transparent !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.sw-theme-olive .btn-outline-warning:hover,
.sw-theme-olive .btn-outline-warning:focus,
.sw-theme-olive .btn.btn-outline-warning:hover,
.sw-theme-olive .btn.btn-outline-warning:focus {
  background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* Navbar (admin + student): same solid Olive style */
.sw-theme-olive .navbar-school,
.sw-theme-olive .navbar-school-app,
.sw-theme-olive .navbar-school.sw-admin-navbar {
  background: var(--primary) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.sw-theme-olive .navbar-school .navbar-brand,
.sw-theme-olive .navbar-school-app .navbar-brand {
  color: #fff !important;
}

.sw-theme-olive .navbar-school .nav-link,
.sw-theme-olive .navbar-school-app .nav-link,
.sw-theme-olive .navbar-school.sw-admin-navbar .nav-link {
  color: rgba(255, 255, 255, 0.92) !important;
}

.sw-theme-olive .navbar-school .nav-link:hover,
.sw-theme-olive .navbar-school .nav-link:focus,
.sw-theme-olive .navbar-school-app .nav-link:hover,
.sw-theme-olive .navbar-school-app .nav-link:focus,
.sw-theme-olive .navbar-school.sw-admin-navbar .nav-link:hover,
.sw-theme-olive .navbar-school.sw-admin-navbar .nav-link:focus {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

.sw-theme-olive .navbar-school .nav-link.active,
.sw-theme-olive .navbar-school-app .nav-link.active,
.sw-theme-olive .navbar-school.sw-admin-navbar .nav-link.active {
  color: var(--accent) !important;
}

.sw-theme-olive .navbar-school .btn-login,
.sw-theme-olive .navbar-school-app .btn-login {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.sw-theme-olive .navbar-school .btn-login:hover,
.sw-theme-olive .navbar-school-app .btn-login:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.sw-theme-olive .navbar-school .dropdown-menu .dropdown-item:hover,
.sw-theme-olive .navbar-school .dropdown-menu .dropdown-item:focus,
.sw-theme-olive .navbar-school.sw-admin-navbar .dropdown-menu .dropdown-item:hover,
.sw-theme-olive .navbar-school.sw-admin-navbar .dropdown-menu .dropdown-item:focus {
  background: color-mix(in srgb, var(--accent) 24%, #fff);
  color: #0f172a;
}

.sw-theme-olive .sw-footer {
  background: var(--primary);
  border-top: 1px solid var(--border);
}

/* Footer: keep structure, only adjust colors */
.sw-theme-olive .sw-footer,
.sw-theme-olive .sw-footer * {
  color: #fff !important;
}

.sw-theme-olive .sw-footer a {
  color: #fff !important;
}

.sw-theme-olive .sw-footer .border,
.sw-theme-olive .sw-footer hr {
  border-color: color-mix(in srgb, #fff 35%, transparent) !important;
}

