/* ============================================================
   School ERP Management System — Theme Stylesheet
   ============================================================ */

:root {
    --primary: #121b66; /* St. Mary Navy Blue */
    --primary-light: #2c3882;
    --primary-dark: #0a0f3d;
    --primary-bg: #f1f5f7; /* Light gray background */
    --primary-gradient: linear-gradient(135deg, #0a0f3d, #1c2966);
    --secondary: #d32f2f; /* St. Mary Crimson Red */
    --accent-yellow: #ffeb3b; /* St. Mary Yellow */
    --success: #2e7d32;
    --success-light: #e8f5e9;
    --danger: #d32f2f;
    --danger-light: #ffebee;
    --warning: #f57f17;
    --warning-light: #fff8e1;
    --info: #0277bd;
    --info-light: #e1f5fe;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --header-height: 68px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition-speed: 0.25s;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

/* ---- Base ---- */
* { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background: var(--gray-100);
    color: var(--gray-900);
    margin: 0;
    padding: 0;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: underline; }

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #090e30 0%, #0d1547 50%, #070b24 100%);
    color: #fff;
    z-index: 1030;
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Brand Header */
.sidebar-brand {
    padding: 0 18px;
    height: var(--header-height);
    background: rgba(7, 11, 36, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.sidebar-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-brand-logo img {
    width: 32px;
    height: auto;
}

.sidebar-brand-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #ffffff;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 12px 0 30px;
    margin: 0;
}

.sidebar-menu .menu-header {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    padding: 22px 20px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    margin: 3px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-menu li a .sidebar-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #94a3b8;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar-menu li a:hover .sidebar-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.sidebar-menu li a.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.sidebar-menu li a.active .sidebar-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Submenu dropdown toggles & items */
.sidebar-submenu {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 26px;
    padding-left: 10px;
    margin-top: 4px;
    margin-bottom: 6px;
}

.sidebar-submenu li a {
    margin: 2px 0;
    padding: 7px 12px;
    font-size: 0.82rem;
    color: #94a3b8;
}

.sidebar-submenu li a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-submenu li a.active {
    background: rgba(37, 99, 235, 0.3);
    color: #93c5fd;
    font-weight: 600;
    border-color: transparent;
    box-shadow: none;
}

/* ---- Desktop Sidebar Collapse ---- */
body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}
body.sidebar-collapsed .main-header {
    left: 0;
}
body.sidebar-collapsed .main-content {
    margin-left: 0;
}

/* ---- Top Header / Navigation Bar ---- */
.main-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1020;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    transition: left var(--transition-speed) ease;
}

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

/* Subtle Icon Buttons */
.btn-icon-subtle {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #475569;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon-subtle:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: scale(1.04);
}

.breadcrumb-nav {
    font-size: 0.88rem;
    font-weight: 500;
    color: #64748b;
}

.breadcrumb-nav a {
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-nav a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.breadcrumb-nav span {
    color: #64748b;
}

.breadcrumb-nav span.mx-1 {
    color: #cbd5e1;
}

/* Center Quick Search */
.header-center {
    flex: 1;
    max-width: 420px;
    margin: 0 24px;
}

.header-search-form {
    width: 100%;
}

.header-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.88rem;
    pointer-events: none;
}

.header-search-input {
    width: 100%;
    padding-left: 38px !important;
    padding-right: 64px !important;
    height: 38px;
    border-radius: 9999px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.84rem !important;
    color: #1e293b !important;
    transition: all 0.25s ease !important;
}

.header-search-input:focus {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    outline: none !important;
}

.header-search-input::placeholder {
    color: #94a3b8;
}

.header-search-kbd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #64748b;
    border: 1px solid #cbd5e1;
    font-family: inherit;
    pointer-events: none;
}

/* Quick Action Buttons */
.btn-quick-action {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.btn-quick-fee {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #15803d !important;
}

.btn-quick-fee:hover {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #14532d !important;
    transform: translateY(-1px);
}

.btn-quick-student {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
}

.btn-quick-student:hover {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
    transform: translateY(-1px);
}

/* Header Session Capsule */
.header-session-capsule {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.session-live-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.session-name-text {
    font-size: 0.82rem;
    letter-spacing: -0.01em;
}

/* User Profile Pill & Dropdown */
.user-profile-pill {
    padding: 4px 8px !important;
    border-radius: 9999px !important;
    transition: background 0.2s !important;
}

.user-profile-pill:hover,
.user-profile-pill:focus {
    background: #f1f5f9 !important;
}

.user-avatar-gradient {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.user-avatar-gradient-lg {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

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

.user-role-pill {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.role-super_admin {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.role-principal {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.role-fee_operator {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.role-teacher {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.user-dropdown-menu {
    min-width: 260px;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
}

.user-dropdown-menu .dropdown-item {
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.15s ease;
}

.user-dropdown-menu .dropdown-item:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    padding-left: 1.15rem;
}

/* ---- Main Content ---- */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 24px;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left var(--transition-speed) ease;
}

/* ---- Cards ---- */
.stat-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.stat-card .stat-icon.bg-primary { background: var(--primary-bg); color: var(--primary); }
.stat-card .stat-icon.bg-success { background: var(--success-light); color: var(--success); }
.stat-card .stat-icon.bg-warning { background: var(--warning-light); color: var(--warning); }
.stat-card .stat-icon.bg-info { background: var(--info-light); color: var(--info); }
.stat-card .stat-icon.bg-danger { background: var(--danger-light); color: var(--danger); }

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.82rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ---- Content Card ---- */
.content-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.content-card .card-header-custom {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.content-card .card-header-custom h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.content-card .card-body-custom {
    padding: 20px 24px;
}

/* ---- Tables ---- */
.table-wrapper {
    overflow-x: auto;
}

.data-table, .datatable-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th, .datatable-table th {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    padding: 12px 14px !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.data-table th:first-child, .datatable-table th:first-child { border-radius: 8px 0 0 0; }
.data-table th:last-child, .datatable-table th:last-child { border-radius: 0 8px 0 0; }

.data-table td, .datatable-table td {
    padding: 12px 14px !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    font-size: 0.88rem;
    color: var(--gray-800);
    vertical-align: middle;
}

.data-table tbody tr:hover, .datatable-table tbody tr:hover {
    background: rgba(44, 56, 130, 0.04) !important;
}

/* Ensure sorting icons remain visible on dark background */
.datatable-sorter::before, .datatable-sorter::after {
    opacity: 0.6;
}
.datatable-sorter::before { border-top-color: #fff !important; }
.datatable-sorter::after { border-bottom-color: #fff !important; }
.datatable-ascending .datatable-sorter::after,
.datatable-descending .datatable-sorter::before { opacity: 1; }

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

/* ---- Buttons ---- */
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary-custom:hover {
    background: var(--primary-light);
    color: #fff;
    text-decoration: none;
}

.btn-success-custom {
    background: var(--success);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-success-custom:hover {
    background: #1b5e20;
    color: #fff;
    text-decoration: none;
}

.btn-outline-custom {
    background: transparent;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline-custom:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    text-decoration: none;
}

.btn-danger-custom {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-custom:hover {
    background: #b71c1c;
}

/* ---- Forms ---- */
.form-section {
    margin-bottom: 24px;
}

.form-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    padding-bottom: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary-bg);
}

/* ---- Badges ---- */
.badge-active {
    background: var(--success-light);
    color: var(--success);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-inactive {
    background: var(--danger-light);
    color: var(--danger);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-locked {
    background: var(--warning-light);
    color: var(--warning);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

/* ---- Login Page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-card .login-logo i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-card .login-logo h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 8px 0 0;
}

.login-card .login-logo p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ---- Receipt ---- */
.receipt-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.receipt-header h2 {
    color: var(--primary);
    margin: 0 0 4px;
    font-size: 1.3rem;
}

.receipt-header p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin: 0;
}

.receipt-body .receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--gray-200);
}

.receipt-body .receipt-row .label {
    font-weight: 600;
    color: var(--gray-700);
}

.receipt-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
    text-align: center;
    padding: 16px;
    background: var(--success-light);
    border-radius: var(--border-radius);
    margin: 16px 0;
}

/* ---- Pagination ---- */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* ---- Responsive ---- */

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ---- Tablet (max 992px) ---- */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-header {
        left: 0;
        padding: 0 16px;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .page-header h1 {
        font-size: 1.2rem;
    }

    .stat-card {
        margin-bottom: 12px;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    /* Tables: ensure horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    /* Card padding reduction */
    .content-card .card-body-custom {
        padding: 16px;
    }

    .content-card .card-header-custom {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    /* Form grids: 2 columns on tablet */
    .row.g-3 > [class*="col-md-2"],
    .row.g-3 > [class*="col-md-3"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Receipt */
    .receipt-container {
        padding: 24px;
    }
}

/* ---- Mobile (max 768px) ---- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-header {
        left: 0;
        padding: 0 12px;
        gap: 8px;
    }

    .main-content {
        margin-left: 0;
        padding: 16px 12px;
    }

    /* Header: hide breadcrumb on small screens */
    .breadcrumb-nav {
        display: none;
    }

    .header-right {
        gap: 8px;
    }

    /* Compact session badge on mobile */
    .header-right .badge {
        font-size: 0.7rem;
        padding: 4px 8px !important;
    }

    .user-info span {
        display: none;
    }

    .user-role-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    /* Page header stacks vertically */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .page-header h1 {
        font-size: 1.1rem;
    }

    /* Stat cards */
    .stat-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .stat-card .stat-value {
        font-size: 1.3rem;
    }

    .stat-card .stat-label {
        font-size: 0.75rem;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    /* Content cards */
    .content-card .card-body-custom {
        padding: 12px;
    }

    .content-card .card-header-custom {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .content-card .card-header-custom .btn-group {
        width: 100%;
    }

    .content-card .card-header-custom .btn-group .btn {
        flex: 1;
    }

    /* Tables: compact on mobile */
    .data-table th {
        font-size: 0.72rem;
        padding: 8px;
    }

    .data-table td {
        font-size: 0.8rem;
        padding: 8px;
    }

    /* Forms: single column on mobile */
    .row.g-3 > [class*="col-md-"],
    .row.g-3 > [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Buttons: full-width for primary actions */
    .page-header .btn,
    .page-header a.btn {
        width: 100%;
        justify-content: center;
    }

    /* Modals */
    .modal-dialog {
        margin: 10px;
    }

    .modal-lg {
        max-width: calc(100vw - 20px);
    }

    /* Login card */
    .login-card {
        padding: 24px;
        margin: 12px;
    }

    /* Receipt */
    .receipt-container {
        padding: 16px;
    }

    .receipt-header h2 {
        font-size: 1.1rem;
    }

    .receipt-amount {
        font-size: 1.2rem;
        padding: 12px;
    }

    /* Alert */
    .alert-custom {
        font-size: 0.82rem;
        padding: 10px 12px;
    }

    /* Checkbox grid */
    .checkbox-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    /* Empty state */
    .empty-state {
        padding: 32px 16px;
    }

    .empty-state i {
        font-size: 2.4rem;
    }
}

/* ---- Small Mobile (max 480px) ---- */
@media (max-width: 480px) {
    .main-content {
        padding: 12px 8px;
    }

    .main-header {
        padding: 0 8px;
    }

    .page-header h1 {
        font-size: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.1rem;
    }

    .data-table th,
    .data-table td {
        padding: 6px;
        font-size: 0.75rem;
    }

    .content-card .card-body-custom {
        padding: 10px 8px;
    }

    /* Buttons shrink */
    .btn-primary-custom,
    .btn-success-custom,
    .btn-outline-custom,
    .btn-danger-custom {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    /* Form inputs: bigger touch targets */
    .form-select,
    .form-control {
        font-size: 0.88rem;
        padding: 8px 12px;
        min-height: 42px;
    }

    /* Badges */
    .badge-active,
    .badge-inactive,
    .badge-locked {
        font-size: 0.68rem;
        padding: 2px 8px;
    }

    /* Sidebar brand */
    .sidebar-brand {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .sidebar-brand img {
        width: 40px !important;
    }

    /* Sidebar menu items: bigger touch targets */
    .sidebar-menu li a {
        padding: 10px 16px;
        font-size: 0.88rem;
    }
}

/* ---- Sidebar Collapsed State (Desktop) ---- */
body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

body.sidebar-collapsed .main-header {
    left: 0;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

/* ---- Print ---- */
@media print {
    .sidebar,
    .main-header,
    .sidebar-overlay,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .content-card {
        box-shadow: none;
        border: none;
    }

    .receipt-container {
        border: 1px solid #000;
    }
}

/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ---- Alerts ---- */
.alert-custom {
    border-radius: var(--border-radius);
    padding: 12px 16px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.alert-custom.success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid #c8e6c9;
}

.alert-custom.error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid #ffcdd2;
}

.alert-custom.warning {
    background: var(--warning-light);
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.alert-custom.info {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid #b3e5fc;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    color: var(--gray-300);
}

.empty-state p {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* ---- Checkbox Grids & Cards ---- */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.checkbox-card {
    display: block;
    position: relative;
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.checkbox-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-card .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: var(--border-radius);
}

.checkbox-card .checkbox-label i {
    font-size: 1.1rem;
    color: var(--gray-500);
    transition: color var(--transition-speed);
}

/* Checked State */
.checkbox-card input[type="checkbox"]:checked + .checkbox-label {
    background: var(--primary-bg);
    color: var(--primary);
}

.checkbox-card input[type="checkbox"]:checked + .checkbox-label i {
    color: var(--primary);
}

.checkbox-card:has(input[type="checkbox"]:checked) {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Global Loader Overlay */
.global-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.loader-spinner {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.loader-text {
    font-weight: 600;
    color: var(--gray-800);
}

.loader-subtext {
    font-size: 0.9rem;
    margin-bottom: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Premium UI Overhaul --- */
.fee-input-card {
    transition: all 0.3s ease;
    border: 1px solid transparent !important;
}
.fee-input-card:hover {
    border-color: #0d6efd !important;
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.1) !important;
    transform: translateY(-3px);
}
.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.fee-table tbody tr {
    transition: all 0.2s ease;
}
.fee-table tbody tr:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.002);
}
.custom-checkbox {
    width: 1.5em;
    height: 1.5em;
    border: 2px solid #ced4da;
    cursor: pointer;
}
.custom-checkbox:checked {
    background-color: #198754;
    border-color: #198754;
}

/* ═══════════════════════════════════════════════════════════════════
   STANDARDIZED EXECUTIVE ERP DESIGN SYSTEM (COLLECTION REGISTER THEME)
   ═══════════════════════════════════════════════════════════════════ */

/* 1. Page Header Card */
.page-header-card, .register-header-card, .defaulter-header-card {
    background: linear-gradient(135deg, #002b5c 0%, #1e3a8a 100%);
    border-radius: 12px;
    padding: 22px 26px;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 43, 92, 0.15);
}
.page-header-card h1, .page-header-card h2, 
.register-header-card h2, .defaulter-header-card h1 {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-header-card p, .register-header-card p, .defaulter-header-card p {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* 2. Responsive KPI Summary Grid & Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.kpi-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.kpi-icon.blue   { background: #eff6ff; color: #2563eb; }
.kpi-icon.green  { background: #ecfdf5; color: #059669; }
.kpi-icon.purple { background: #faf5ff; color: #7c3aed; }
.kpi-icon.amber  { background: #fffbeb; color: #d97706; }
.kpi-icon.red    { background: #fef2f2; color: #dc2626; }
.kpi-icon.teal   { background: #f0fdfa; color: #0d9488; }

.kpi-info {
    min-width: 0;
}
.kpi-info .kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 600;
}
.kpi-info .kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin-top: 2px;
}

/* 3. Filter Card */
.filter-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.filter-card .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

/* 4. Table Container & High-Density Tables */
.table-container-custom {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-bottom: 24px;
}
.table-container-custom .table-responsive {
    margin-bottom: 0;
}
.data-table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.data-table-custom thead th {
    background: #002b5c !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    text-align: center;
    padding: 10px 8px;
    border: 1px solid #001f44;
    white-space: nowrap;
    vertical-align: middle;
}
.data-table-custom tbody td {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    vertical-align: middle;
    line-height: 1.3;
}
.data-table-custom tbody tr:nth-child(even) {
    background: #f8fafc;
}
.data-table-custom tbody tr:hover {
    background: #f1f5f9;
}

/* ═══════════════════════════════════════════════════════════════════
   5. UNIVERSAL PAGE HEADER ENHANCEMENT (APPLIES TO ALL TEMPLATES)
   ═══════════════════════════════════════════════════════════════════ */
.page-header {
    background: linear-gradient(135deg, #002b5c 0%, #1e3a8a 100%);
    border-radius: 12px;
    padding: 22px 26px;
    color: #fff;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0, 43, 92, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h1, .page-header h2 {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-header h1 small, .page-header h2 small, .page-header .text-muted {
    color: #cbd5e1 !important;
    font-size: 0.92rem;
    font-weight: 500;
}
.page-header p {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 0;
}
.page-header p strong {
    color: #ffffff;
}
.page-header .btn-primary-custom,
.page-header .btn-primary {
    background: #ffffff !important;
    color: #002b5c !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.page-header .btn-primary-custom:hover,
.page-header .btn-primary:hover {
    background: #f1f5f9 !important;
    color: #001f44 !important;
}
.page-header .btn-outline-custom,
.page-header .btn-outline-light {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
}
.page-header .btn-outline-custom:hover,
.page-header .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════════
   6. UNIVERSAL CONTENT CARD & TABLE WRAPPER ELEVATION
   ═══════════════════════════════════════════════════════════════════ */
.content-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}
.content-card .card-header-custom {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f8fafc;
    border-radius: 10px 10px 0 0;
}
.content-card .card-header-custom h5 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}
.table-wrapper {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    overflow-x: auto;
}
.data-table, .datatable-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.data-table th, .datatable-table th {
    background: #002b5c !important;
    color: #fff !important;
    padding: 10px 12px !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid #001f44;
    vertical-align: middle;
}
.data-table th:first-child, .datatable-table th:first-child { border-radius: 0; }
.data-table th:last-child, .datatable-table th:last-child { border-radius: 0; }
.data-table td, .datatable-table td {
    padding: 9px 12px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.85rem;
    color: #1e293b;
    vertical-align: middle;
}
.data-table tbody tr:nth-child(even), .datatable-table tbody tr:nth-child(even) {
    background: #f8fafc;
}
.data-table tbody tr:hover, .datatable-table tbody tr:hover {
    background: #f1f5f9 !important;
}

/* Simple-DataTables Controls & Pagination */
.datatable-wrapper {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    overflow: hidden;
    margin-bottom: 24px;
}
.datatable-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 12px;
    flex-wrap: wrap;
}
.datatable-dropdown {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}
.datatable-selector {
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #1e293b;
    background-color: #ffffff;
    outline: none;
    margin: 0 4px;
}
.datatable-selector:focus {
    border-color: #002b5c;
    box-shadow: 0 0 0 3px rgba(0, 43, 92, 0.1);
}
.datatable-search {
    position: relative;
}
.datatable-input {
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 0.82rem;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    min-width: 220px;
    transition: all 0.2s ease;
}
.datatable-input:focus {
    border-color: #002b5c;
    box-shadow: 0 0 0 3px rgba(0, 43, 92, 0.12);
}
.datatable-container {
    overflow-x: auto;
}
.datatable-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    gap: 12px;
    flex-wrap: wrap;
}
.datatable-info {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}
.datatable-pagination ul {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    list-style: none;
}
.datatable-pagination li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}
.datatable-pagination li a:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #002b5c;
}
.datatable-pagination li.active a,
.datatable-pagination li.datatable-active a {
    background: #002b5c !important;
    border-color: #002b5c !important;
    color: #ffffff !important;
}
.datatable-sorter::before, .datatable-sorter::after {
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════════
   7. EXECUTIVE DASHBOARD DESIGN SYSTEM (UNIVERSAL SUITE)
   ═══════════════════════════════════════════════════════════════════ */
.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    margin-bottom: 24px;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dashboard-card:hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}
.dashboard-card:has(.dropdown-menu.show),
.dashboard-card.has-dropdown-open,
.marks-col:has(.dropdown-menu.show),
.marks-col.has-dropdown-open {
    z-index: 1065 !important;
    position: relative !important;
}
.dashboard-card-header {
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.dashboard-card-header h5, .dashboard-card-header h6 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-card-body {
    padding: 20px;
}

/* Quick Action Tiles */
.quick-action-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.quick-action-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.2s ease;
}
.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 43, 92, 0.09);
    border-color: #cbd5e1;
}
.quick-action-card.action-blue:hover::after { background: #2563eb; }
.quick-action-card.action-emerald:hover::after { background: #059669; }
.quick-action-card.action-amber:hover::after { background: #d97706; }
.quick-action-card.action-purple:hover::after { background: #7c3aed; }
.quick-action-card.action-red:hover::after { background: #dc2626; }
.quick-action-card.action-teal:hover::after { background: #0d9488; }

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.quick-action-card:hover .quick-action-icon {
    transform: scale(1.08);
}
.quick-action-icon.blue    { background: #eff6ff; color: #1d4ed8; }
.quick-action-icon.emerald { background: #ecfdf5; color: #047857; }
.quick-action-icon.amber   { background: #fffbeb; color: #b45309; }
.quick-action-icon.purple  { background: #faf5ff; color: #6d28d9; }
.quick-action-icon.red     { background: #fef2f2; color: #b91c1c; }
.quick-action-icon.teal    { background: #f0fdfa; color: #0f766e; }

.quick-action-info {
    flex-grow: 1;
    min-width: 0;
}
.quick-action-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}
.quick-action-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
    margin: 0;
}
.quick-action-arrow {
    color: #cbd5e1;
    font-size: 1.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}
.quick-action-card:hover .quick-action-arrow {
    color: #002b5c;
    transform: translateX(3px);
}

/* Dashboard Timeline & Activities */
.dashboard-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dashboard-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #f1f5f9;
}
.dashboard-timeline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.dashboard-timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #002b5c;
    font-size: 1rem;
    flex-shrink: 0;
}
.dashboard-timeline-content {
    flex-grow: 1;
    min-width: 0;
}
.dashboard-timeline-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}
.dashboard-timeline-meta {
    font-size: 0.76rem;
    color: #64748b;
}

/* Header Badge Pill */
.header-badge-pill {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════
   8. UNIVERSAL PRINT SECURITY (PREVENTS UI BLEED IN PRINTS)
   ═══════════════════════════════════════════════════════════════════ */
@media print {
    .sidebar, .sidebar-overlay, .main-header,
    .page-header, .page-header-card, .register-header-card, .defaulter-header-card,
    .kpi-grid, .filter-card, footer, nav, .btn, .no-print,
    .alert, .breadcrumb-nav, .user-info, .user-role-badge,
    #global-loader, #sidebar-toggle {
        display: none !important;
    }
}



