:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;
    --navbar-height: 56px;
    --primary: #0d6efd;
    --primary-dark: #0b5ed7;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #0dcaf0;
    --purple: #6f42c1;
    --orange: #fd7e14;
    --teal: #20c997;
    --dark: #1a1d29;
    --dark-hover: #22263b;
    --dark-active: #2a2f45;
    --dark-text: #c2c7d6;
    --dark-text-muted: #8a8fa3;
    --border-color: #e9ecef;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --card-hover-shadow: 0 8px 25px rgba(0,0,0,0.1);
    --transition-speed: 0.25s;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --breadcrumb-bg: #f8f9fa;
}

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

body {
    font-family: var(--font-family);
    background-color: #f5f6fa;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── Top Navbar ── */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    z-index: 1040;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.navbar-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    gap: 12px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #495057;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
    color: var(--dark);
}

.navbar-brand {
    text-decoration: none;
    color: var(--dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.navbar-brand i {
    color: var(--primary);
    font-size: 1.4rem;
}

.navbar-brand:hover {
    color: var(--primary);
}

.school-name {
    color: #6c757d;
    font-size: 0.85rem;
    padding-left: 10px;
    border-left: 1px solid var(--border-color);
    white-space: nowrap;
}

.school-name i {
    font-size: 0.85rem;
}

/* ── Global Search ── */
.navbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 520px;
    margin: 0 auto;
}

.global-search {
    position: relative;
    width: 100%;
    max-width: 480px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 38px;
    padding: 0 36px 0 36px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.12);
}

.search-input::placeholder {
    color: #adb5bd;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.search-clear:hover {
    color: #495057;
    background: #e9ecef;
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 1050;
    max-height: 420px;
    overflow: hidden;
}

.search-results-inner {
    max-height: 380px;
    overflow-y: auto;
}

.search-loading,
.search-empty {
    padding: 24px;
    text-align: center;
    color: #6c757d;
}

.search-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    color: #ced4da;
}

.search-empty p {
    margin: 0;
    font-size: 0.9rem;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background var(--transition-speed);
    border-bottom: 1px solid #f2f4f6;
    text-decoration: none;
    color: inherit;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: #f0f4ff;
}

.search-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    margin-right: 12px;
}

.search-item-icon.type-Student { background: #e7f3ff; color: var(--primary); }
.search-item-icon.type-Teacher { background: #e8f8f0; color: var(--success); }
.search-item-icon.type-Class { background: #fff3e0; color: var(--orange); }
.search-item-icon.type-Subject { background: #f3e8ff; color: var(--purple); }
.search-item-icon.type-Book { background: #fff3e0; color: var(--warning); }
.search-item-icon.type-Exam { background: #ffe0e0; color: var(--danger); }
.search-item-icon.type-FeeInvoice { background: #e8f8f0; color: var(--teal); }
.search-item-icon.type-FeePayment { background: #e7f3ff; color: var(--primary); }
.search-item-icon.type-Vehicle { background: #e0f7fa; color: var(--info); }

.search-item-text {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-subtext {
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-type {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f2f4f6;
    flex-shrink: 0;
    margin-left: 8px;
}

.search-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: #f8f9fa;
}

/* ── Navbar Right ── */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.role-badge i {
    font-size: 0.7rem;
}

.role-school-admin,
.role-admin { background: #e7f3ff; color: #0d6efd; }
.role-teacher { background: #e8f8f0; color: #198754; }
.role-student { background: #fff3e0; color: #fd7e14; }
.role-parent { background: #e8f8f0; color: #198754; }
.role-accountant { background: #f3e8ff; color: #6f42c1; }
.role-librarian { background: #e0f7fa; color: #0dcaf0; }
.role-transport-officer { background: #fff3e0; color: #fd7e14; }
.role-hostel-master { background: #e7f3ff; color: #0d6efd; }
.role-exam-officer { background: #ffe0e0; color: #dc3545; }
.role-receptionist { background: #e8f8f0; color: #20c997; }
.role-platform-owner { background: #1a1d29; color: #fff; }

.btn-icon {
    background: none;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #495057;
    cursor: pointer;
    position: relative;
    transition: background var(--transition-speed);
}

.btn-icon:hover {
    background: #f0f0f0;
    color: var(--dark);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

.notification-menu {
    width: 360px;
    max-height: 480px;
    padding: 0;
    overflow: hidden;
}

.notification-menu .dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.notification-list {
    max-height: 340px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid #f2f4f6;
    cursor: pointer;
    transition: background var(--transition-speed);
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f4ff;
    border-left: 3px solid var(--primary);
}

.notification-item.unread:hover {
    background: #e7eeff;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-right: 10px;
}

.notification-icon.type-INFO { background: #e7f3ff; color: var(--primary); }
.notification-icon.type-WARNING { background: #fff3e0; color: var(--orange); }
.notification-icon.type-SUCCESS { background: #e8f8f0; color: var(--success); }
.notification-icon.type-ERROR { background: #ffe0e0; color: var(--danger); }
.notification-icon.type-APPROVAL { background: #f3e8ff; color: var(--purple); }
.notification-icon.type-BILLING { background: #e8f8f0; color: var(--teal); }
.notification-icon.type-ACADEMIC { background: #fff3e0; color: var(--warning); }

.notification-text {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 0.8rem;
    color: #6c757d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.7rem;
    color: #adb5bd;
    white-space: nowrap;
}

.dropdown-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    background: #f8f9fa;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border: none;
    background: none;
    color: #495057;
    border-radius: 8px;
    transition: background var(--transition-speed);
    cursor: pointer;
}

.user-dropdown-btn:hover {
    background: #f0f0f0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-btn .bi-chevron-down {
    font-size: 0.7rem;
    color: #adb5bd;
}

.dropdown-user-info {
    padding: 8px 16px;
}

.dropdown-user-info strong {
    font-size: 0.9rem;
}

.dropdown-user-info small {
    font-size: 0.8rem;
}

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--dark-text);
    z-index: 1030;
    overflow: hidden;
    transition: width var(--transition-speed), transform var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 0;
}

.sidebar-inner {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    padding-bottom: 20px;
}

.sidebar-inner::-webkit-scrollbar {
    width: 4px;
}

.sidebar-inner::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-inner::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.sidebar .sidebar-brand {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    color: #fff;
}

.sidebar .sidebar-brand .brand-name {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .sidebar-brand .brand-name i {
    color: var(--primary);
    font-size: 1.2rem;
}

.sidebar .sidebar-brand .brand-subtitle {
    font-size: 0.75rem;
    color: var(--dark-text-muted);
    margin-top: 2px;
    padding-left: 28px;
}

.sidebar-heading {
    padding: 16px 20px 6px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dark-text-muted);
    font-weight: 700;
}

.sidebar .nav {
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar .nav-item {
    position: relative;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--dark-text);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all var(--transition-speed);
    gap: 10px;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.sidebar .nav-link:hover {
    background: var(--dark-hover);
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--dark-active);
    color: #fff;
    border-left-color: var(--primary);
}

.sidebar .nav-link i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar .nav-link .nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .nav-link .nav-badge {
    padding: 1px 6px;
    font-size: 0.65rem;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    flex-shrink: 0;
}

.sidebar .nav-link .nav-arrow {
    font-size: 0.65rem;
    color: var(--dark-text-muted);
    transition: transform var(--transition-speed);
    flex-shrink: 0;
}

.sidebar .nav-link .nav-arrow.open {
    transform: rotate(90deg);
}

.sidebar .sub-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--transition-speed) ease;
}

.sidebar .sub-nav.open {
    max-height: 500px;
}

.sidebar .sub-nav .nav-link {
    padding-left: 50px;
    font-size: 0.84rem;
    border-left: 3px solid transparent;
}

.sidebar .sub-nav .nav-link.active {
    border-left-color: var(--primary);
}

.sidebar .nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 8px 20px;
}

/* ── Content Wrapper ── */
.content-wrapper {
    margin-top: var(--navbar-height);
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height));
    transition: margin-left var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.content-wrapper.full-page {
    margin-left: 0;
}

.sidebar.collapsed + .content-wrapper,
.sidebar-collapsed .content-wrapper {
    margin-left: 0;
}

/* ── Breadcrumb Bar ── */
.breadcrumb-bar {
    background: var(--breadcrumb-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 24px;
    display: flex;
    align-items: center;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
}

.breadcrumb-item {
    font-size: 0.8rem;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: #212529;
    font-weight: 500;
}

/* ── Flash Messages ── */
.flash-messages {
    padding: 12px 24px 0;
}

.flash-messages .alert {
    margin-bottom: 8px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flash-messages .alert .alert-content {
    display: flex;
    align-items: center;
}

.flash-messages .alert .btn-close {
    font-size: 0.75rem;
}

.flash-messages .alert-success { background: #d4edda; color: #155724; }
.flash-messages .alert-danger { background: #f8d7da; color: #721c24; }
.flash-messages .alert-warning { background: #fff3cd; color: #856404; }
.flash-messages .alert-info { background: #d1ecf1; color: #0c5460; }

/* ── Page Header ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #212529;
}

.page-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
}

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

/* ── Page Content ── */
.page-content {
    padding: 0 24px 24px;
    flex: 1;
}

/* ── Footer ── */
.footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 16px 0;
    margin-top: auto;
}

/* ── Cards ── */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
}

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

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px 12px 0 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 0 0 12px 12px !important;
}

/* ── Stat Cards ── */
.stat-card {
    border-radius: 12px;
    overflow: hidden;
}

.stat-card .card-body {
    padding: 20px;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #198754, #20c997);
    color: #fff;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #fff;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #0dcaf0, #0d6efd);
    color: #fff;
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: #fff;
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: #fff;
}

.bg-gradient-teal {
    background: linear-gradient(135deg, #20c997, #0dcaf0);
    color: #fff;
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #1a1d29, #343a40);
    color: #fff;
}

.border-left-primary { border-left: 4px solid var(--primary) !important; }
.border-left-success { border-left: 4px solid var(--success) !important; }
.border-left-warning { border-left: 4px solid var(--warning) !important; }
.border-left-info { border-left: 4px solid var(--info) !important; }
.border-left-danger { border-left: 4px solid var(--danger) !important; }
.border-left-purple { border-left: 4px solid var(--purple) !important; }

/* ── Tables ── */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom-width: 1px;
    padding: 12px 12px;
}

.table td {
    padding: 12px;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr {
    transition: background var(--transition-speed);
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table-light th {
    background: #f8f9fa;
}

.table-actions {
    white-space: nowrap;
}

.table-actions .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* ── Forms ── */
.form-control,
.form-select {
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    font-size: 0.9rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.12);
}

.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 6px;
}

.form-text {
    font-size: 0.8rem;
    color: #6c757d;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
}

.invalid-feedback {
    font-size: 0.8rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary);
}

.input-group-text {
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* ── Buttons ── */
.btn {
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all var(--transition-speed);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
}

.btn-success { background: var(--success); border-color: var(--success); }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #212529; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-info { background: var(--info); border-color: var(--info); color: #fff; }
.btn-purple { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn-purple:hover { background: #5a32a3; border-color: #5a32a3; color: #fff; }

.btn-outline-purple {
    color: var(--purple);
    border-color: var(--purple);
}

.btn-outline-purple:hover {
    background: var(--purple);
    color: #fff;
}

.btn-group-action .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* ── Badges ── */
.badge {
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.badge-status {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* ── Modals ── */
.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: 14px 14px 0 0;
}

.modal-header .modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: 0 0 14px 14px;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fade-in {
    animation: fadeIn var(--transition-speed) ease;
}

.fade-in-up {
    animation: fadeInUp var(--transition-speed) ease;
}

/* ── Spinner ── */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
}

/* ── Toast ── */
.toast-container {
    z-index: 1060;
}

.toast {
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    animation: slideInRight var(--transition-speed) ease;
}

.toast-body {
    font-size: 0.9rem;
}

/* ── Login Page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px;
}

.login-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    animation: fadeInUp 0.4s ease;
}

.login-card .brand {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .brand i {
    font-size: 3rem;
    color: var(--primary);
}

.login-card .brand h3 {
    margin-top: 12px;
    font-weight: 700;
}

/* ── Dropdown ── */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 6px;
    animation: fadeInDown 0.15s ease;
}

.dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f0f4ff;
    color: var(--primary);
}

.dropdown-item.text-danger:hover {
    background: #fff0f0;
}

.dropdown-divider {
    margin: 4px 0;
}

/* ── DataTable ── */
.dataTables_wrapper {
    padding-top: 10px;
}

.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    padding: 6px 12px;
    border: 1px solid #dee2e6;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 6px;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
}

.dataTables_wrapper .dataTables_info {
    font-size: 0.85rem;
    color: #6c757d;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px;
    padding: 4px 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

/* ── Lists ── */
.list-group-item {
    border: none;
    margin-bottom: 2px;
    border-radius: 8px !important;
    font-size: 0.9rem;
}

.list-group-item:hover {
    background: #f8f9fa;
}

/* ── Progress ── */
.progress {
    border-radius: 20px;
    height: 8px;
    background: #e9ecef;
}

.progress-bar {
    border-radius: 20px;
}

/* ── Tabs ── */
.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    background: #f8f9fa;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
    background: transparent;
}

.tab-content {
    padding-top: 16px;
}

/* ── Alerts ── */
.alert {
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
}

/* ── Pagination ── */
.page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: #495057;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.page-link:hover {
    background: #f0f4ff;
    color: var(--primary);
}

.page-item.active .page-link {
    background: var(--primary);
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .content-wrapper {
        margin-left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1029;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .navbar-center {
        display: none;
    }

    .user-name {
        display: none !important;
    }

    .school-name {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .navbar-inner {
        padding: 0 10px;
        gap: 6px;
    }

    .notification-menu {
        width: 300px;
        right: -60px !important;
    }

    .page-header {
        padding: 12px 16px;
    }

    .page-content {
        padding: 0 16px 16px;
    }

    .breadcrumb-bar {
        padding: 8px 16px;
    }

    .flash-messages {
        padding: 8px 16px 0;
    }

    .role-badge {
        display: none;
    }
}

/* ── Utilities ── */
.cursor-pointer { cursor: pointer; }
.text-purple { color: var(--purple); }
.text-orange { color: var(--orange); }
.text-teal { color: var(--teal); }
.bg-soft-primary { background: #e7f3ff; }
.bg-soft-success { background: #e8f8f0; }
.bg-soft-warning { background: #fff3e0; }
.bg-soft-danger { background: #ffe0e0; }
.bg-soft-info { background: #e0f7fa; }
.bg-soft-purple { background: #f3e8ff; }

.overflow-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.min-width-0 { min-width: 0; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 24px; }
