/* ============================================
   School Financial Management System (SFMS)
   Comprehensive Stylesheet
   ============================================ */

/* ----------------------------------------
   1. CSS RESET / NORMALIZE
   ---------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Poppins', 'Segoe UI', Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #111827;
    background-color: #F8FAFC;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

a {
    color: #2563EB;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1D4ED8;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ----------------------------------------
   2. CSS VARIABLES
   ---------------------------------------- */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #EFF6FF;
    --success: #10B981;
    --success-light: #ECFDF5;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --info: #3B82F6;
    --info-light: #EFF6FF;

    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --sidebar-bg: #FFFFFF;
    --sidebar-text: #6B7280;
    --sidebar-active: #EFF6FF;
    --sidebar-hover: #EFF6FF;
    --sidebar-width: 280px;

    --card-bg: #FFFFFF;
    --text: #111827;
    --text-primary: #111827;
    --text-muted: #6B7280;
    --text-secondary: #6B7280;
    --border: #E5E7EB;
    --border-dark: #D1D5DB;
    --hover: #EFF6FF;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    --radius-sm: 4px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --transition: all 0.2s ease;
}

/* ----------------------------------------
   3. LAYOUT: SIDEBAR + MAIN CONTENT
   ---------------------------------------- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0e2a63 0%, #173a86 60%, #1e40af 100%);
    border-right: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Desktop hide/show (toggled by the hamburger button, remembered per browser). */
@media (min-width: 993px) {
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }
}

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

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

.sidebar-logo {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
    text-align: center;
    background-color: transparent;
}

.sidebar-brand {
    display: block;
    text-align: center;
    text-decoration: none;
}

.sidebar-brand:hover {
    text-decoration: none;
}

.sidebar-brand .brand-title {
    font-size: 25px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    letter-spacing: 1px;
}

.sidebar-brand .brand-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #BFDBFE;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin-top: 2px;
}

.sidebar-role {
    color: #E0EAFF;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 12px 0 0;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 6px 12px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 12px 16px;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px 8px 11px;
    margin: 2px 0;
    border-radius: 8px;
    border-left: 3px solid transparent;
    background-color: transparent;
    color: #C3D4F5;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    transition: var(--transition);
    gap: 10px;
    text-decoration: none;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.10);
    color: #FFFFFF;
}

.sidebar-nav a.active {
    background-color: #FFFFFF;
    color: #1D4ED8;
    font-weight: 600;
    border-left: 3px solid transparent;
}

.sidebar-section-label {
    color: #8FA8D8;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 14px 6px;
    margin: 0;
}

.sidebar-section-label:first-child {
    padding-top: 4px;
}

/* Procurement submenu (Learning Materials stays inside Procurement) */
.sidebar-submenu {
    margin: 1px 0;
}

.sidebar-submenu > a.submenu-toggle {
    width: 100%;
}

.sidebar-submenu .submenu-items {
    margin: 2px 0 2px 12px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.20);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-submenu .submenu-items a {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 0.8125rem;
    color: #A9C0E8;
}

.sidebar-submenu .submenu-items a:hover {
    color: #FFFFFF;
}

.sidebar-submenu .submenu-items a.active {
    background-color: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
}

.nav-icon {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
    background-color: transparent;
}

.sidebar-footer .btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px 10px 11px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    color: #C3D4F5;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border-top: none;
    border-right: none;
    border-bottom: none;
    background-color: transparent;
    cursor: pointer;
    text-align: left;
}

.sidebar-footer .btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.content-area {
    flex: 1;
    padding: 24px 32px;
}

/* ----------------------------------------
   4. TOP BAR / HEADER
   ---------------------------------------- */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 12px 32px;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: var(--shadow-sm);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.brand-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.notification-bell {
    position: relative;
    font-size: 1.25rem;
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.notification-bell:hover {
    background-color: var(--bg);
    color: var(--primary);
}

.bell-icon {
    font-size: 1.25rem;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--danger);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 0 4px;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu:hover {
    background-color: var(--bg);
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #111827;
    line-height: 1.3;
}

.user-role {
    font-size: 0.75rem;
    color: #6B7280;
    line-height: 1.3;
}

.top-bar-user {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #EFF6FF;
    color: #2563EB;
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 32px;
    color: #6B7280;
    font-size: 0.8125rem;
    border-top: 1px solid #E5E7EB;
    background-color: #FFFFFF;
}

.app-footer p {
    margin: 0;
}

.app-footer .footer-tagline {
    color: #6B7280;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a,
.user-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    color: var(--text);
    font-size: 0.875rem;
    transition: var(--transition);
    border: none;
    background: none;
    cursor: pointer;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background-color: var(--bg);
    color: var(--primary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.hamburger:hover {
    background-color: var(--bg);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text);
    margin: 2px 0;
    transition: var(--transition);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

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

/* ----------------------------------------
   5. DASHBOARD CARDS / SUMMARY CARDS
   ---------------------------------------- */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.dashboard-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.dashboard-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.card-blue {
    border-left: 4px solid var(--primary);
}

.card-green {
    border-left: 4px solid var(--success);
}

.card-red {
    border-left: 4px solid var(--danger);
}

.card-yellow {
    border-left: 4px solid var(--warning);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.card-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* Card Groups */
.card-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card-group-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card-group-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.card-group-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    flex-shrink: 0;
}

/* ----------------------------------------
   6. TABLES
   ---------------------------------------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table thead th {
    background-color: #f7fafc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    user-select: none;
}

.table thead th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 24px;
}

.table thead th.sortable:hover {
    color: var(--primary);
}

.table thead th.sortable::after {
    content: '\2195';
    position: absolute;
    right: 8px;
    opacity: 0.4;
}

.table thead th.sort-asc::after {
    content: '\25B2';
    opacity: 0.8;
}

.table thead th.sort-desc::after {
    content: '\25BC';
    opacity: 0.8;
}

.table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.table tbody tr:hover {
    background-color: var(--primary-light);
}

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

.table .text-center {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

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

.table .inline-form {
    display: inline;
}

/* ----------------------------------------
   7. BUTTONS — FMS Global SOFT Button System
   Single source of truth for ALL buttons in every module.
   4 SOFT variants only (no solid fill, no gradient, no pill):
     PRIMARY (soft blue) | SUCCESS (soft green)
     DANGER (soft red)   | SECONDARY (soft gray)
   Standard: 40px height | 0 16px padding | 6px radius
             14px font | 500-600 weight | 1px solid border
             150-200ms transition | inline-flex centered | 6-8px icon gap.
   Table size (.btn-sm): 34px height | 0 12px padding | 13px font.
   ONLY background / text / border color may change per variant.
   ---------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    background: none;
    background-image: none;
    box-shadow: none;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
    white-space: nowrap;
    line-height: 1.5;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
}

.btn:hover {
    text-decoration: none;
    background-image: none;
    box-shadow: none;
}

.btn:focus {
    outline: none;
}

.btn:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

.btn:active {
    box-shadow: none;
}

/* Icons inside buttons: subtle, 16px, inherit text color, same spacing. */
.btn svg,
.btn i,
.btn .icon,
.btn img.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: inherit;
    fill: currentColor;
}

/* Disabled: single consistent soft appearance for every variant. */
.btn:disabled,
.btn.disabled,
.btn[disabled],
.btn[aria-disabled="true"] {
    background-color: #F1F5F9;
    background-image: none;
    border-color: #E2E8F0;
    color: #94A3AF;
    opacity: 1;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

/* SOFT PRIMARY — Save / Submit / Create / Add / Update / Generate / Apply / Continue. */
.btn-primary {
    background-color: #EFF6FF;
    background-image: none;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #DBEAFE;
    background-image: none;
    border-color: #93C5FD;
    color: #1E40AF;
}

.btn-primary:active {
    background-color: #BFDBFE;
    border-color: #93C5FD;
    color: #1E40AF;
}

.btn-primary:focus-visible {
    outline-color: #2563EB;
}

/* SOFT SUCCESS — Approve / Confirm / Mark Paid / Complete / Verified / Export. */
.btn-success {
    background-color: #ECFDF5;
    background-image: none;
    color: #047857;
    border: 1px solid #A7F3D0;
    font-weight: 600;
}

.btn-success:hover {
    background-color: #D1FAE5;
    background-image: none;
    border-color: #6EE7B7;
    color: #065F46;
}

.btn-success:active {
    background-color: #A7F3D0;
    border-color: #6EE7B7;
    color: #065F46;
}

.btn-success:focus-visible {
    outline-color: #059669;
}

/* SOFT DANGER — Delete / Reject / Remove / Revoke / Disable. Never solid red. */
.btn-danger {
    background-color: #FEF2F2;
    background-image: none;
    color: #B91C1C;
    border: 1px solid #FECACA;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #FEE2E2;
    background-image: none;
    border-color: #FCA5A5;
    color: #991B1B;
}

.btn-danger:active {
    background-color: #FECACA;
    border-color: #FCA5A5;
    color: #991B1B;
}

.btn-danger:focus-visible {
    outline-color: #DC2626;
}

/* SOFT SECONDARY — Back / Cancel / Close / View / Edit / Filter / Clear / Reset. */
.btn-secondary {
    background-color: #F8FAFC;
    background-image: none;
    color: #334155;
    border: 1px solid #E2E8F0;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #F1F5F9;
    background-image: none;
    border-color: #CBD5E1;
    color: #0F172A;
}

.btn-secondary:active {
    background-color: #E2E8F0;
    border-color: #CBD5E1;
    color: #0F172A;
}

.btn-secondary:focus-visible {
    outline-color: #64748B;
}

/* Table buttons: smaller version of the SAME soft style. */
.btn-sm {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-lg {
    min-height: 44px;
    padding: 0 24px;
    font-size: 15px;
    border-radius: 6px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Sidebar logout is a nav item, NOT a soft action button — keep it transparent. */
.sidebar-footer .btn-logout {
    background-color: transparent;
    background-image: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
    box-shadow: none;
}

/* ----------------------------------------
   8. BADGES / STATUS
   ---------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.badge-green {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-red {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-yellow {
    background-color: var(--warning-light);
    color: var(--warning);
}

.badge-blue {
    background-color: var(--info-light);
    color: var(--info);
}

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

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

.badge-dark {
    background-color: #1e293b;
    color: #ffffff;
}

/* Status-specific badges */
.badge-pending {
    background-color: var(--warning-light);
    color: var(--warning);
}

.badge-approved {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-rejected {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-under_review,
.badge-under-review {
    background-color: var(--info-light);
    color: var(--info);
}

.badge-posted {
    background-color: #ECFDF5;
    color: #10B981;
}

.badge-reconciled {
    background-color: #EFF6FF;
    color: #3B82F6;
}

.badge-variance {
    background-color: #FFFBEB;
    color: #F59E0B;
}

.badge-unreconciled {
    background-color: #FFFBEB;
    color: #F59E0B;
}

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

.badge-cleared {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-not_cleared,
.badge-not-cleared {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-pending_review,
.badge-pending-review {
    background-color: var(--info-light);
    color: var(--info);
}

/* ----------------------------------------
   9. FORMS
   ---------------------------------------- */
.form-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label, .form-group .static-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text);
}

.form-group .required {
    color: var(--danger);
}

.form-control {
    display: block;
    width: 100%;
    padding: 9px 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text);
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f7fafc;
    opacity: 0.7;
    cursor: not-allowed;
}

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

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* File Inputs */
input[type="file"].form-control {
    padding: 8px;
    cursor: pointer;
}

input[type="file"].form-control::file-selector-button {
    padding: 6px 14px;
    margin: 0 8px 0 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: #f7fafc;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

input[type="file"].form-control::file-selector-button:hover {
    background-color: var(--bg);
}

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0 6px 0 0;
    accent-color: var(--primary);
    vertical-align: middle;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-check label {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 0.875rem;
}

/* Form Help Text */
.form-help {
    display: block;
    margin-top: 4px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Error Messages */
.error-message {
    display: block;
    margin-top: 4px;
    font-size: 0.8125rem;
    color: var(--danger);
}

.validation-errors {
    background-color: var(--danger-light);
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.validation-errors ul {
    list-style: disc;
    padding-left: 20px;
}

.validation-errors li {
    color: var(--danger);
    font-size: 0.875rem;
    margin-bottom: 4px;
}

/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Inline Forms */
.form-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ----------------------------------------
   10. FILTER BAR / SEARCH BAR
   ---------------------------------------- */
.filters-bar,
.filter-bar {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 160px;
}

.filter-group .form-control {
    padding: 7px 12px;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow-x: auto;
}

.filter-tabs .tab {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.filter-tabs .tab:hover {
    color: var(--text);
    background-color: var(--bg);
    text-decoration: none;
}

.filter-tabs .tab.active {
    background-color: var(--primary);
    color: #ffffff;
}

/* ----------------------------------------
   11. PAGE HEADER
   ---------------------------------------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.8125rem;
}

.breadcrumbs a {
    color: var(--text-muted);
    transition: var(--transition);
}

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

.breadcrumbs .separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumbs .current {
    color: var(--text);
    font-weight: 500;
}

/* ----------------------------------------
   12. ALERTS / MESSAGES
   ---------------------------------------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

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

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

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

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

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

.alert .alert-close {
    margin-left: auto;
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.6;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    color: inherit;
}

.alert .alert-close:hover {
    opacity: 1;
}

.alert-dismiss {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ----------------------------------------
   13. MODALS (Standardized)
   ---------------------------------------- */
/* Base overlay — full-screen backdrop */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(15, 42, 90, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

/* Show modal */
.modal-overlay.active,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"] {
    display: flex;
}

/* Modal container — standardized */
.modal {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.25s ease;
    overflow: hidden;
}

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

/* Modal header — standardized */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.modal-header .badge {
    flex-shrink: 0;
    margin-left: 8px;
}

/* Close button — standardized */
.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1.375rem;
    line-height: 1;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    padding: 0;
}

.modal-close:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

.modal-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Modal body — standardized */
.modal-body {
    padding: 20px 20px 16px;
    overflow-y: auto;
    flex: 1;
}

/* Modal footer — standardized */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* Form elements inside modals */
.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body .form-control {
    padding: 9px 12px;
    font-size: 0.875rem;
}

.modal-body .form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 6px;
}

/* Modal footer buttons — consistent sizing */
.modal-footer .btn {
    min-height: 36px;
    padding: 0 16px;
    font-size: 0.875rem;
}

/* Modal sizes — utility classes */
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }
.modal-full { max-width: 95vw; }

/* Narrow modal for confirm dialogs */
.modal-confirm .modal-body {
    text-align: center;
    padding: 28px 20px 16px;
}

.modal-confirm .confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: inline-block;
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
}

.modal-confirm .confirm-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.modal-confirm .confirm-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.modal-confirm .confirm-message {
    font-size: 0.9375rem;
    color: var(--text);
    margin-bottom: 4px;
    font-weight: 500;
}

.modal-confirm .confirm-submessage {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Scrollable modal for long content */
.modal-scrollable .modal-body {
    max-height: 60vh;
}

/* Override for full-screen on mobile */
@media (max-width: 640px) {
    .modal-overlay {
        padding: 12px;
        align-items: stretch;
    }
    .modal {
        max-height: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 100vh;
    }
    .modal-header {
        padding: 14px 16px;
    }
    .modal-body {
        padding: 16px;
    }
    .modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    .modal-footer .btn {
        flex: 1;
        justify-content: center;
    }
}

/* Small modal for quick actions */
.modal-sm { max-width: 380px; }

/* Confirmation modal specific */
.modal-confirm .confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: inline-block;
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
}

.modal-confirm .confirm-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.modal-confirm .confirm-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.modal-confirm .confirm-message {
    font-size: 0.9375rem;
    color: var(--text);
    margin-bottom: 4px;
    font-weight: 500;
}

.modal-confirm .confirm-submessage {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   Form-item spacing inside modals
   ============================================ */
.modal-body .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 560px) {
    .modal-body .form-row {
        grid-template-columns: 1fr;
    }
}

/* Modal with sidebar layout */
.modal-with-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-height: 90vh;
}

.modal-sidebar {
    border-right: 1px solid var(--border);
    padding: 16px;
    overflow-y: auto;
    background: var(--bg);
}

.modal-main {
    padding: 16px;
    overflow-y: auto;
}

@media (max-width: 880px) {
    .modal-with-sidebar {
        grid-template-columns: 1fr;
    }
    .modal-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 200px;
    }
}

/* Modal footer buttons — consistent sizing */
.modal-footer .btn {
    min-height: 36px;
    padding: 0 16px;
    font-size: 0.875rem;
}

/* Modal sizes — utility classes */
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }
.modal-full { max-width: 95vw; }

/* ----------------------------------------
   14. PROGRESS BARS
   ---------------------------------------- */
.progress-bar-container {
    width: 100%;
    height: 24px;
    background-color: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #3b82f6);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    transition: width 0.6s ease;
    min-width: 30px;
}

.progress-bar.green {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.progress-bar.yellow {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.progress-bar.red {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

.progress-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ----------------------------------------
   15. PAGINATION (shared FMS pager:
   result count left, compact rectangular
   buttons right: [Previous] [1] [2] [Next])
   ---------------------------------------- */
.pagination-wrapper,
.pagination {
    padding: 16px 0 0;
}

.fms-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    flex-wrap: wrap;
    border-top: 1px solid #eef2f7;
    padding-top: 14px;
}

.fms-pager-count {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.fms-pager-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}

.fms-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    font-size: 0.825rem;
    font-weight: 600;
    line-height: 1;
    color: var(--primary);
    background-color: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

a.fms-page-btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.fms-page-btn.is-active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    cursor: default;
}

.fms-page-btn.is-disabled {
    color: #9ca3af;
    border-color: var(--border);
    background-color: #f9fafb;
    opacity: 0.7;
    cursor: not-allowed;
}

.fms-page-btn.is-ellipsis {
    min-width: 24px;
    padding: 0 4px;
    color: var(--text-muted);
    border-color: transparent;
    background-color: transparent;
    cursor: default;
}

.fms-page-arrow {
    display: inline-flex;
    line-height: 0;
}

.fms-page-arrow svg {
    width: 12px;
    height: 12px;
    display: block;
}

a.fms-page-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    background-color: var(--primary-light);
}

@media (max-width: 576px) {
    .fms-pager-links {
        margin-left: 0;
    }

    .fms-page-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 10px;
    }
}

/* ----------------------------------------
   17. AUTH / LOGIN PAGE
   ---------------------------------------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0e3a8c 0%, #1a56db 50%, #3b82f6 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: authBgPulse 15s ease infinite;
}

@keyframes authBgPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.auth-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 40px 36px;
    position: relative;
    z-index: 1;
    animation: authCardIn 0.5s ease;
}

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

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

.auth-logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

.auth-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    text-align: center;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .form-group {
    margin-bottom: 20px;
}

.auth-card .form-group label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 6px;
}

.auth-card .form-control {
    padding: 11px 14px;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer a {
    font-weight: 500;
}

/* ----------------------------------------
   18. BUDGET PLANNER
   ---------------------------------------- */
.budget-results {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-top: 24px;
}

.budget-results h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 600;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.result-card {
    background-color: #f7fafc;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.result-card h4 {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    font-weight: 500;
}

.result-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.schedule-section {
    margin-top: 20px;
}

.schedule-section h4 {
    margin-bottom: 12px;
}

.explanation-section {
    margin-top: 20px;
    padding: 16px;
    background-color: #f7fafc;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.explanation-section h4 {
    margin-bottom: 8px;
}

.explanation-section p {
    color: var(--text-muted);
    line-height: 1.7;
}

.ai-disclaimer {
    background-color: var(--warning-light);
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-top: 20px;
    font-size: 0.8125rem;
    color: var(--warning);
}

/* ----------------------------------------
   19. PROCUREMENT / ITEMS GRID
   ---------------------------------------- */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.item-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.item-image {
    height: 160px;
    background-color: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-placeholder {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.item-info {
    padding: 16px;
}

.item-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.item-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* Size-based inventory display (uniforms) */
.size-availability {
    margin: 4px 0 12px;
    padding: 10px 12px;
    background-color: #f7fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.size-availability-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.size-availability ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.size-availability li {
    font-size: 0.8125rem;
    color: var(--text);
}

.size-availability li.out {
    color: var(--text-muted);
}

.stock-line {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ----------------------------------------
   20. EMPTY STATE
   ---------------------------------------- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 8px;
}

/* ----------------------------------------
   21. NOTIFICATION DROPDOWN
   ---------------------------------------- */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.notification-dropdown-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.notification-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
}

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

.notification-item:hover {
    background-color: #f7fafc;
    text-decoration: none;
}

.notification-item.unread {
    background-color: var(--primary-light);
}

.notification-item-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    border-radius: 50%;
}

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

.notification-item-title {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-dropdown-footer {
    text-align: center;
    padding: 10px;
    border-top: 1px solid var(--border);
}

.notification-dropdown-footer a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
}

/* Bell wrapper anchors the dropdown without shifting header layout */
.notif-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

button.notification-bell {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}

.bell-svg {
    width: 20px;
    height: 20px;
    display: block;
}

.notif-mark-all {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary);
    padding: 2px 4px;
}

.notif-mark-all:hover {
    text-decoration: underline;
}

/* Dropdown items rendered as buttons */
button.notification-item {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-family: inherit;
}

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

.notification-item-message {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notif-dot {
    display: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    margin-left: 8px;
    vertical-align: middle;
}

.notification-item.unread .notif-dot {
    display: inline-block;
}

.notification-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-green {
    color: var(--success);
    font-weight: 700;
}

.notif-red {
    color: var(--danger);
    font-weight: 700;
}

.notif-blue {
    color: var(--primary);
    font-weight: 700;
}

.notif-gray {
    color: var(--text-muted);
    font-weight: 700;
}

.notif-empty {
    padding: 20px 16px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .notif-wrap .notification-dropdown {
        width: min(320px, calc(100vw - 24px));
        right: 0;
    }
}

@media (max-width: 480px) {
    .notif-wrap .notification-dropdown {
        width: min(300px, calc(100vw - 24px));
        right: 0;
    }
}

/* ----------------------------------------
   22. IMAGE PREVIEW
   ---------------------------------------- */
.image-preview-area {
    margin-top: 8px;
}

.image-preview-area label, .image-preview-area .static-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.preview-image {
    max-width: 300px;
    max-height: 200px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-top: 8px;
    object-fit: cover;
}

.pdf-indicator {
    padding: 12px 16px;
    background-color: var(--danger-light);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--danger);
    margin-top: 8px;
    display: inline-block;
}

/* ----------------------------------------
   23. CHARTS CONTAINER
   ---------------------------------------- */
.chart-container {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.chart-container h3 {
    margin-bottom: 16px;
    font-size: 1rem;
}

.chart-placeholder {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f7fafc;
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ----------------------------------------
   24. LOADING SPINNER
   ---------------------------------------- */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 3px;
}

.spinner-lg {
    width: 56px;
    height: 56px;
    border-width: 5px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    gap: 16px;
}

.loading-overlay .spinner {
    width: 48px;
    height: 48px;
}

.loading-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ----------------------------------------
   25. SECTIONS & DETAIL VIEWS
   ---------------------------------------- */
.detail-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}

.detail-card:last-child {
    margin-bottom: 0;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.detail-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
    padding: 24px;
}

.detail-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 24px;
}

.detail-col h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label, .detail-item .detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.detail-item .detail-value,
p.detail-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    margin: 0;
}

.detail-card > .table-responsive {
    margin: 0;
    padding: 8px 24px 16px;
}

.rejection-reason {
    margin: 0 24px 24px;
    padding: 14px 18px;
    background-color: var(--danger-light);
    border: 1px solid #fecaca;
    border-radius: var(--radius);
}

.rejection-reason h4 {
    font-size: 0.875rem;
    margin-bottom: 6px;
    color: var(--danger);
}

.rejection-reason p {
    font-size: 0.875rem;
}

.proof-section {
    padding: 0 24px 24px;
}

.proof-section h4 {
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.proof-image-tag {
    max-width: 320px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.detail-card .empty-note {
    padding: 0 24px 24px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 640px) {
    .detail-grid,
    .detail-grid-2col {
        grid-template-columns: 1fr;
    }
    .header-actions {
        width: 100%;
    }
    .header-actions .btn {
        flex: 1;
    }
}

.detail-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.detail-card-body {
    padding: 24px;
}

.detail-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background-color: #f8fafc;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label, .info-item .detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.info-item .value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
}

/* ----------------------------------------
   26. CARD FOOTER
   ---------------------------------------- */
.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background-color: #f8fafc;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.card-footer a,
.card-footer .btn {
    font-size: 0.8125rem;
}

/* ----------------------------------------
   27. TEXT UTILITIES
   ---------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-bold { font-weight: 600; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.5px; }
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----------------------------------------
   28. SPACING UTILITIES
   ---------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }

/* ----------------------------------------
   29. DISPLAY UTILITIES
   ---------------------------------------- */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

/* ----------------------------------------
   30. DIVIDER
   ---------------------------------------- */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* ----------------------------------------
   31. STICKY HEADER TABLE
   ---------------------------------------- */
.table-sticky-header {
    position: relative;
}

.table-sticky-header thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ----------------------------------------
   32. PRINT STYLES
   ---------------------------------------- */
@media print {
    .sidebar,
    .top-bar,
    .hamburger,
    .sidebar-overlay,
    .btn,
    .pagination-wrapper,
    .pagination,
    .filter-form,
    .filters-bar,
    .filter-bar,
    .filter-tabs,
    .page-header {
        display: none !important;
    }

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

    .content-area {
        padding: 0 !important;
    }

    .dashboard-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .table {
        font-size: 0.75rem;
    }

    body {
        background: #ffffff;
        color: #000000;
    }

    .alert {
        display: none !important;
    }
}

/* ----------------------------------------
   33. RESPONSIVE DESIGN
   ---------------------------------------- */
/* Tablet: reduce sidebar width while keeping labels readable */
@media (min-width: 993px) and (max-width: 1200px) {
    :root {
        --sidebar-width: 240px;
    }

    .sidebar-nav a {
        font-size: 0.8125rem;
        padding: 8px 10px;
    }

    .content-area {
        padding: 20px 24px;
    }
}

@media (max-width: 1200px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-row {
        grid-template-columns: 1fr;
    }

    .card-groups {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
    }

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

    .hamburger {
        display: flex;
    }

    .top-bar {
        padding: 12px 16px;
    }

    .content-area {
        padding: 20px 16px;
    }

    .dashboard-row {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

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

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: 100%;
    }

    .form-card {
        padding: 20px;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .result-cards {
        grid-template-columns: 1fr;
    }

    .notification-dropdown {
        width: 300px;
        right: -60px;
    }

    .table-responsive {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .top-bar-right {
        gap: 10px;
    }

    .user-name {
        display: none;
    }

    .user-role {
        display: none;
    }

    .card-groups {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal {
        max-width: 100%;
        margin: 10px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }
}

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

    .notification-dropdown {
        width: 280px;
        right: -80px;
    }

    .auth-card {
        padding: 24px 20px;
    }

    h1 { font-size: 1.375rem; }
    h2 { font-size: 1.25rem; }

    .card-amount {
        font-size: 1.375rem;
    }
}

/* ----------------------------------------
   34. SCROLLBAR STYLING
   ---------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #c1c9d4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a0aec0;
}

/* ----------------------------------------
   35. SELECTION HIGHLIGHT
   ---------------------------------------- */
::selection {
    background-color: rgba(26, 86, 219, 0.2);
    color: var(--text);
}

/* ----------------------------------------
   36. TRANSITION GLOBAL
   ---------------------------------------- */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

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

/* ----------------------------------------
   37. DISABLED STATE
   ---------------------------------------- */
.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ----------------------------------------
   38. RESPONSIVE TABLES
   ---------------------------------------- */
@media (max-width: 768px) {
    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 12px;
        background-color: var(--card-bg);
    }

    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 4px;
        border-bottom: 1px solid var(--border);
        text-align: right;
    }

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

    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        color: var(--text-muted);
        margin-right: 12px;
    }

    .table .text-center::before {
        content: none;
    }
}

/* ----------------------------------------
   39. PRINT BUTTON AREA
   ---------------------------------------- */
.print-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* ----------------------------------------
   40. STUDENT FINANCIAL CLEARANCE
   ---------------------------------------- */
.page-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.badge-large {
    font-size: 0.8125rem;
    padding: 5px 14px;
}

.form-actions-center {
    justify-content: center;
    border-top: none;
    margin-top: 20px;
    padding-top: 0;
}

@media (max-width: 640px) {
    .page-header-right {
        align-items: flex-start;
        width: 100%;
    }
}

/* ----------------------------------------
   41. COLLECTION CARDS
   ---------------------------------------- */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.collection-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

/* ----------------------------------------
   42. STAT HIGHLIGHTS
   ---------------------------------------- */
.stat-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 16px;
    background-color: #f7fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.stat-item .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-item .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

/* ----------------------------------------
   43. HORIZONTAL RULE ACCENT
   ---------------------------------------- */
.hr-accent {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    margin: 20px 0;
}

/* ----------------------------------------
   44. TOOLTIP
   ---------------------------------------- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: #ffffff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: var(--radius);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ----------------------------------------
   45. SKELETON LOADING
   ---------------------------------------- */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #edf2f7 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-heading {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* ----------------------------------------
   46. STUDENT PORTAL CHROME (text-only nav)
   ---------------------------------------- */
.sidebar-subtitle {
    color: #a0aec0;
    font-size: 0.7rem;
    line-height: 1.4;
    margin-top: 6px;
}

.sidebar-section-label {
    color: #7a8aa0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 14px 6px;
    margin: 0;
}

.top-bar-clock {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.top-bar-clock:empty {
    display: none;
}

.top-bar-notifications {
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius);
}

.top-bar-notifications:hover {
    background-color: var(--bg);
}

.top-bar-notifications .notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
}

.top-bar-user {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

/* ----------------------------------------
   47. STUDENT FINANCIAL DASHBOARD
   ---------------------------------------- */
.student-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.student-dashboard .dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.student-dashboard .dash-head h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.student-dashboard .dash-welcome {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.student-dashboard .term-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 12px 20px;
    text-align: right;
    font-size: 0.875rem;
    line-height: 1.5;
}

.student-dashboard .term-card strong {
    display: block;
    font-weight: 600;
}

.student-dashboard .term-card span {
    color: var(--text-muted);
}

.student-dashboard .summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.student-dashboard .summary-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-top: 4px solid var(--border-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.student-dashboard .summary-card h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.student-dashboard .summary-card .summary-amount {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.student-dashboard .summary-card .summary-sub {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.student-dashboard .sum-blue { border-top-color: var(--primary); background-color: #f2f6fe; }
.student-dashboard .sum-green { border-top-color: var(--success); background-color: #f2fbf7; }
.student-dashboard .sum-red { border-top-color: var(--danger); background-color: #fef4f4; }
.student-dashboard .sum-yellow { border-top-color: var(--warning); background-color: #fffaf0; }

.student-dashboard .panel-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.student-dashboard .panel-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.student-dashboard .clearance-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.student-dashboard .clearance-message {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 8px;
}

.student-dashboard .tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.student-dashboard .dashboard-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    padding: 16px 0 4px;
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .student-dashboard .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .student-dashboard .tables-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .student-dashboard .summary-grid {
        grid-template-columns: 1fr;
    }
    .student-dashboard .dash-head {
        flex-direction: column;
    }
    .student-dashboard .term-card {
        text-align: left;
        width: 100%;
    }
    .top-bar-clock {
        display: none;
    }
}

/* ----------------------------------------
   48. CASHIER DASHBOARD (mirrors student portal cards)
   ---------------------------------------- */
.cashier-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cashier-dashboard .dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cashier-dashboard .dash-head h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.cashier-dashboard .dash-welcome {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.cashier-dashboard .term-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 12px 20px;
    text-align: right;
    font-size: 0.875rem;
    line-height: 1.5;
}

.cashier-dashboard .term-card strong {
    display: block;
    font-weight: 600;
}

.cashier-dashboard .term-card span {
    color: var(--text-muted);
}

.cashier-dashboard .summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cashier-dashboard .summary-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-top: 4px solid var(--border-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.cashier-dashboard .summary-card h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.cashier-dashboard .summary-card .summary-amount {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.cashier-dashboard .summary-card .summary-sub {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.cashier-dashboard .sum-orange { border-top-color: var(--warning); background-color: #fffaf0; }
.cashier-dashboard .sum-green { border-top-color: var(--success); background-color: #f2fbf7; }
.cashier-dashboard .sum-blue { border-top-color: var(--primary); background-color: #f2f6fe; }
.cashier-dashboard .sum-red { border-top-color: var(--danger); background-color: #fef4f4; }

.cashier-dashboard .panel-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.cashier-dashboard .panel-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0;
}

.cashier-dashboard .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.cashier-dashboard .panel-link {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ----------------------------------------
   49. PROCUREMENT RECENT REQUESTS
   ---------------------------------------- */
.recent-requests {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-top: 24px;
}

.recent-requests-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.recent-requests-head h3 {
    font-size: 1rem;
    font-weight: 600;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.recent-requests .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.recent-requests .empty-state .btn {
    margin-top: 8px;
}
.cashier-dashboard .dashboard-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    padding: 16px 0 4px;
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .cashier-dashboard .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .cashier-dashboard .summary-grid {
        grid-template-columns: 1fr;
    }
    .cashier-dashboard .dash-head {
        flex-direction: column;
    }
    .cashier-dashboard .term-card {
        text-align: left;
        width: 100%;
    }
}

/* ----------------------------------------
   50. ACCOUNTANT MODULE (minimalist, text-only cards)
   ---------------------------------------- */
.page-subtitle {
    color: #6B7280;
    font-size: 14px;
    margin-top: 4px;
}

.acct-card {
    border-left: 4px solid var(--primary);
}

.acct-card .card-content h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.acct-card .card-amount {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.status-text .badge {
    font-size: 0.875rem;
}

.quick-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-actions-inline {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.filter-form .form-group {
    margin-bottom: 0;
    min-width: 160px;
}

.filter-form .form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 400;
    font-size: 12px;
    color: var(--text);
}

.filter-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.filter-row .form-group {
    min-width: 0;
}

.filter-actions-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 20px;
}

@media (max-width: 1024px) {
    .filter-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    .filter-actions-row {
        padding-top: 0;
    }
}

.filter-form .report-type-group {
    min-width: 220px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.detail-item .detail-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.detail-item .detail-value {
    font-size: 0.95rem;
    font-weight: 500;
}

.muted-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.report-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.report-school {
    font-size: 1.125rem;
    font-weight: 700;
}

.report-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 4px 0;
}

.report-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

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

.report-summary-item {
    flex: 1;
    min-width: 160px;
    background-color: #f7fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
}

.report-type-list {
    list-style: disc;
    padding-left: 20px;
    margin: 12px 0;
}

.report-type-list li {
    margin-bottom: 4px;
}

/* ----------------------------------------
   51. FMS REFERENCE DASHBOARD HEADER
   ---------------------------------------- */
.dash-welcome-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.dash-welcome-row h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.dash-datetime {
    color: #6B7280;
    font-size: 0.875rem;
    white-space: nowrap;
    padding-top: 4px;
}

.summary-desc {
    font-size: 0.8125rem;
    color: #6B7280;
    margin-top: 4px;
}

.card-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.card-head-row h3 {
    margin-bottom: 0;
}

.view-all-link {
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1024px) {
    .two-col-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .brand-name {
        font-size: 0.875rem;
    }
    .dash-datetime {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .table-responsive {
        margin: 0;
        padding: 0;
    }
}

@media print {
    .sidebar,
    .top-bar,
    .filter-bar,
    .quick-links,
    .form-actions,
    .pagination,
    .alert {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
    }
    .content-area {
        padding: 0;
    }
    .dashboard-card {
        box-shadow: none;
        break-inside: avoid;
    }
}

/* ----------------------------------------
   51. SHARED FMS COMPONENTS (admin + accountant share one look)
   ---------------------------------------- */
.fms-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.fms-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 18px 20px; border-left: 4px solid #1a56db; }
a.fms-stat-link { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
a.fms-stat-link:hover { background: #f8fafc; border-color: #cbd5e1; border-left-color: #1a56db; box-shadow: 0 4px 12px rgba(15, 42, 90, 0.08); transform: translateY(-1px); text-decoration: none; color: inherit; }
a.fms-stat-link:focus-visible { outline: 2px solid #1a56db; outline-offset: 2px; background: #f8fafc; box-shadow: 0 4px 12px rgba(15, 42, 90, 0.08); }
.fms-stat h4 { margin: 0 0 6px; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; }
.fms-stat .val { margin: 0; font-size: 1.4rem; font-weight: 700; color: #0f2a5a; overflow-wrap: anywhere; }
.fms-stat .sub { margin: 4px 0 0; font-size: 0.8rem; color: #64748b; }
.fms-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px 22px; margin-bottom: 20px; }
.fms-panel h3 { margin: 0 0 14px; font-size: 1.05rem; color: #0f2a5a; }
.fms-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fms-head-row h3 { margin: 0; }
.fms-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fms-analytics-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; align-items: stretch; }
.fms-chart-card { margin-bottom: 0; display: flex; flex-direction: column; }
.fms-chart-card h3 { flex-shrink: 0; }
.fms-chart-wrap { position: relative; height: 260px; }
.fms-chart-wrap canvas { width: 100% !important; height: 100% !important; }
.fms-donut-wrap { position: relative; height: 220px; }
.fms-donut-wrap canvas { width: 100% !important; height: 100% !important; }
.fms-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.fms-donut-center strong { font-size: 1.6rem; color: #0f2a5a; line-height: 1; }
.fms-donut-center span { font-size: 0.8rem; color: #64748b; margin-top: 4px; }
.fms-budget-legend { margin-top: 14px; border-top: 1px solid #eef2f7; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.fms-budget-legend div { display: flex; justify-content: space-between; gap: 12px; }
.fms-budget-legend span { color: #64748b; }
.fms-budget-legend strong { color: #0f2a5a; }
.fms-budget-legend .total { border-top: 1px dashed #e2e8f0; padding-top: 8px; }
.fms-bar { height: 10px; background: #eef2f7; border-radius: 5px; overflow: hidden; margin-top: 6px; }
.fms-bar > span { display: block; height: 100%; background: #1a56db; }
.fms-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.fms-table th { background: #f1f5f9; text-align: left; padding: 10px 12px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; color: #475569; border-bottom: 2px solid #e2e8f0; white-space: nowrap; }
.fms-table td { padding: 10px 12px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.fms-table tr:hover td { background: #f8fafc; }
.fms-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status { display: inline-block; padding: 2px 10px; font-size: 0.72rem; font-weight: 600; border-radius: 20px; background: #eef2ff; color: #1a56db; white-space: nowrap; }
.status.st-green { background: #ecfdf5; color: #047857; }
.status.st-red { background: #fef2f2; color: #b91c1c; }
.status.st-amber { background: #fffbeb; color: #b45309; }
.status.st-gray { background: #f1f5f9; color: #475569; }
.ai-box { border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 8px; padding: 16px 18px; margin-top: 16px; }
.ai-box h4 { margin: 0 0 8px; color: #0f2a5a; font-size: 0.95rem; }
.ai-tag { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; background: #1a56db; color: #fff; border-radius: 4px; padding: 2px 8px; margin-bottom: 8px; }
.main-content.reports-blurred { filter: blur(6px); pointer-events: none; user-select: none; }
.reports-gate-overlay { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 42, 90, 0.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.reports-gate-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 42, 90, 0.18); width: 100%; max-width: 400px; padding: 28px 28px 24px; }
.reports-gate-card h3 { margin: 0 0 6px; font-size: 1.15rem; color: #0f2a5a; text-align: center; }
.reports-gate-sub { margin: 0 0 18px; font-size: 0.85rem; color: #64748b; text-align: center; line-height: 1.6; }
.reports-gate-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 6px; padding: 10px 14px; font-size: 0.85rem; margin-bottom: 16px; line-height: 1.6; }
.reports-gate-card .form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.875rem; color: #0f2a5a; }
.reports-gate-passwrap { position: relative; }
.reports-gate-passwrap .form-control { width: 100%; padding-right: 64px; }
.reports-gate-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--primary); font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 6px 8px; }
.reports-gate-actions { display: flex; gap: 10px; }
.reports-gate-actions .btn { flex: 1; }
.admin-top-bar { gap: 16px; }
.admin-title-block { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.admin-title { margin: 0; font-size: 1.15rem; font-weight: 700; color: #0f2a5a; white-space: nowrap; }
.admin-breadcrumb { margin: 2px 0 0; font-size: 0.78rem; color: #64748b; white-space: nowrap; }
.admin-breadcrumb a { color: #64748b; text-decoration: none; }
.admin-breadcrumb a:hover { color: #2563EB; text-decoration: underline; }
.admin-breadcrumb .crumb-sep { margin: 0 6px; color: #94a3b8; }
.admin-breadcrumb .crumb-current { color: #2563EB; font-weight: 500; }
.admin-top-bar .top-bar-right { gap: 14px; }
.admin-datetime { display: flex; align-items: center; gap: 12px; background: #EFF6FF; border: 1px solid #DBEAFE; border-radius: 10px; padding: 8px 16px; white-space: nowrap; }
.admin-datetime .datetime-item { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; color: #0f2a5a; font-weight: 500; }
.admin-datetime .datetime-item svg { width: 15px; height: 15px; color: #2563EB; flex-shrink: 0; }
.admin-datetime #adminTime { font-variant-numeric: tabular-nums; font-weight: 600; }
.admin-datetime .datetime-sep { width: 1px; height: 18px; background: #BFDBFE; flex-shrink: 0; }
.dropdown-chevron { width: 14px; height: 14px; color: #64748b; flex-shrink: 0; }
.pagination-wrapper { margin-top: 12px; }
@media (max-width: 1100px) { .fms-stat-grid { grid-template-columns: repeat(2, 1fr); } .fms-two { grid-template-columns: 1fr; } .fms-analytics-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
    .admin-top-bar { flex-wrap: wrap; row-gap: 10px; }
    .admin-datetime { order: 3; flex: 1 1 100%; justify-content: flex-start; overflow-x: auto; }
}
@media (max-width: 760px) { .fms-stat-grid { grid-template-columns: 1fr; } .fms-analytics-grid { grid-template-columns: 1fr; } .fms-chart-wrap { height: 240px; } }
@media (max-width: 640px) {
    .top-bar { padding: 10px 16px; }
    .admin-title { font-size: 1rem; }
    .admin-breadcrumb { font-size: 0.72rem; }
    .top-bar-user { display: none; }
    .admin-datetime { padding: 7px 12px; gap: 8px; }
    .admin-datetime .datetime-item { font-size: 0.75rem; }
}
