/* ============================================================
   MPCS Application Stylesheet - Premium Hybrid Theme
   Dark Slate Sidebar & Login + Modern Light Content & Cards
   ============================================================ */

/* ── Fonts & Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --primary:        #10b981; /* emerald green matching brand */
    --primary-light:  #34d399;
    --primary-dark:   #059669;
    --primary-glow:   rgba(16,185,129,0.15);

    --member:         #10b981;
    --member-light:   #34d399;
    --member-glow:    rgba(16,185,129,0.15);

    --danger:         #ef4444;
    --warning:        #f59e0b;
    --success:        #10b981;
    --info:           #3b82f6;

    --bg-dark:        #0f172a;
    --bg-sidebar:     #0f172a;
    --bg-app:         #f8fafc;
    --bg-card:        #ffffff;
    --bg-input:       #ffffff;

    --border:         #e2e8f0;
    --border-strong:  #cbd5e1;

    --text-primary:   #0f172a;
    --text-secondary: #334155;
    --text-muted:     #64748b;

    --sidebar-w:      260px;
    --topbar-h:       64px;
    --radius:         12px;
    --radius-lg:      16px;
    --radius-sm:      8px;
    --shadow:         0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg:      0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --transition:     all 0.2s ease-in-out;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* ============================================================
   AUTH LAYOUT
   ============================================================ */
.layout-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0f172a !important; /* Dark Slate background */
}

/* ============================================================
   APP LAYOUT (sidebar + main)
   ============================================================ */
.layout-app {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: #0f172a; /* Dark Slate */
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-info { display: none; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    min-height: var(--topbar-h);
}

.sidebar-logo {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 0 16px var(--primary-glow);
}

.sidebar-logo-member {
    background: linear-gradient(135deg, var(--member), #059669);
    box-shadow: 0 0 16px var(--member-glow);
}

.sidebar-brand-text {
    flex: 1;
    overflow: hidden;
}

.brand-name {
    display: block;
    font-weight: 800;
    font-size: 1rem;
    color: #f8fafc;
    letter-spacing: 0.05em;
}

.brand-sub {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-toggle {
    margin-left: auto;
    background: none; border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-toggle:hover { background: rgba(255,255,255,0.05); color: #f8fafc; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
}

.nav-section { margin-bottom: 1.25rem; }

.nav-section-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    padding: 0 0.5rem;
    margin-bottom: 0.35rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    margin-bottom: 0.15rem;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #f8fafc;
    transform: translateX(2px);
}

.nav-item.active {
    background: rgba(16,185,129,0.15);
    color: #10b981;
    border-left: 3px solid #10b981;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-card {
    display: flex; align-items: center; gap: 0.6rem;
    flex: 1; overflow: hidden;
}

.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.user-avatar-member {
    background: linear-gradient(135deg, var(--member), #059669);
}

.user-info { overflow: hidden; }

.user-name {
    display: block;
    font-size: 0.8rem; font-weight: 600;
    color: #f8fafc;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
}

.logout-btn {
    background: none; border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: var(--transition);
    flex-shrink: 0;
}

.logout-btn:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

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

.main-content.sidebar-collapsed { margin-left: 72px; }

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky; top: 0; z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }

.mobile-toggle {
    display: none;
    background: none; border: none;
    color: #334155;
    font-size: 1.1rem; cursor: pointer;
}

.page-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.topbar-date {
    font-size: 0.8rem;
    color: #64748b;
}

/* ── Page Content ──────────────────────────────────────────── */
.page-content {
    flex: 1;
    padding: 1.75rem 2rem;
    width: 100%;
    overflow-x: auto;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ── Card ──────────────────────────────────────────────────── */
.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.card-hover:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.card-body { padding: 1.5rem; }
.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* ── Stat Cards ────────────────────────────────────────────── */
.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px; /* Left accent border exactly like screenshot */
    background: var(--stat-color, var(--primary));
    border-radius: var(--radius) 0 0 var(--radius);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--stat-color, var(--primary)) 10%, transparent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    color: var(--stat-color, var(--primary));
    flex-shrink: 0;
}

.stat-info { flex: 1; }

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.2rem;
}

/* ── Grid ──────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Table ─────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
}

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

thead th {
    padding: 0.85rem 1rem;
    background: #f1f5f9; /* Light grey headers matching screenshot 4 */
    color: #475569;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
}

tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: middle;
}

tbody tr:hover { background: #f8fafc; }
tbody tr:last-child td { border-bottom: none; }

/* ── Pagination ────────────────────────────────────────────── */
.custom-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e2e8f0;
}
.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}
.pag-btn:hover:not(.disabled) {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}
.pag-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8;
}
.pag-info {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
    position: fixed;
    top: 1.5rem; right: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 0.75rem;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    transition: opacity 0.4s ease;
}
.toast-success { background: #065f46; color: #34d399; border: 1px solid #047857; }
.toast-error { background: #991b1b; color: #f87171; border: 1px solid #b91c1c; }
.toast-close {
    background: none; border: none; cursor: pointer;
    color: inherit; opacity: 0.7; font-size: 1.1rem;
    margin-left: auto; padding: 0 0.25rem;
    line-height: 1;
}
.toast-close:hover { opacity: 1; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    line-height: 1;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* ── Form Controls ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}
.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: #0f172a;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.btn-primary { background: #10b981; color: #fff; }
.btn-primary:hover { background: #059669; }
.btn-secondary { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-ghost { background: transparent; color: #64748b; }
.btn-ghost:hover { background: #f1f5f9; color: #334155; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }

/* ── Button Sizes & Variants ───────────────────────────────── */
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    background: #f1f5f9; color: #475569; border: none; cursor: pointer;
    transition: var(--transition); text-decoration: none; font-size: 0.9rem;
}
.btn-icon:hover { background: #e2e8f0; color: #0f172a; }
.btn-danger-icon { background: #fee2e2; color: #991b1b; }
.btn-danger-icon:hover { background: #fca5a5; color: #7f1d1d; }
.action-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-header-title, .page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.page-header-subtitle, .page-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.2rem;
}

/* ── Search Bar ────────────────────────────────────────────── */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.search-input-wrapper i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}
.search-input-wrapper .form-control {
    padding-left: 2.25rem;
}

/* ── Filter Form ───────────────────────────────────────────── */
.filter-form { width: 100%; }
.filter-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 150px;
}
.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.filter-actions {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: flex-end;
    gap: 0.5rem;
}

/* ── Input with Icon ───────────────────────────────────────── */
.input-icon { position: relative; }
.input-icon i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}
.input-icon .form-control { padding-left: 2.25rem; }

/* ── Data Table (loans, orders, etc.) ─────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.data-table thead th {
    padding: 0.85rem 1rem;
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid #e2e8f0;
}
.data-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-responsive { overflow-x: auto; }

.table-member {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.member-avatar-sm {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}
.mono-text { font-family: 'Courier New', monospace; font-size: 0.8rem; }
.amount-cell { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Loan type badge colors ────────────────────────────────── */
.badge-type-1 { background: #dbeafe; color: #1e40af; border-radius: 9999px; padding: 0.2rem 0.6rem; font-size: 0.72rem; font-weight: 600; }
.badge-type-2 { background: #fef3c7; color: #92400e; border-radius: 9999px; padding: 0.2rem 0.6rem; font-size: 0.72rem; font-weight: 600; }
.badge-type-3 { background: #f3e8ff; color: #7c3aed; border-radius: 9999px; padding: 0.2rem 0.6rem; font-size: 0.72rem; font-weight: 600; }

/* ── Utility classes ───────────────────────────────────────── */
.text-success { color: #10b981 !important; }
.text-danger  { color: #ef4444 !important; }
.text-warning { color: #f59e0b !important; }
.text-muted   { color: #64748b !important; }
.text-primary { color: #10b981 !important; }
.text-sm      { font-size: 0.8rem; }
.text-xs      { font-size: 0.72rem; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-bold      { font-weight: 700; }
.mb-4         { margin-bottom: 1rem; }
.mb-3         { margin-bottom: 0.75rem; }
.mb-2         { margin-bottom: 0.5rem; }
.mt-2         { margin-top: 0.5rem; }
.mt-4         { margin-top: 1rem; }
.p-0          { padding: 0 !important; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-2        { gap: 0.5rem; }
.w-100        { width: 100%; }
.empty-state  { text-align: center; color: #94a3b8; padding: 2rem; font-size: 0.875rem; }

/* ── Alert / Flash ─────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: translateX(0); } }

/* ── Enrollment Form Styling ───────────────────────────────── */
.enrollment-header {
    background: #1e3b6f; /* Premium dark navy-blue */
    color: #ffffff;
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow);
}
.enrollment-header-back {
    font-size: 1.25rem;
    color: #1e3b6f;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.enrollment-header-back:hover {
    background: #f1f5f9;
    transform: translateX(-2px);
}
.enrollment-header-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    line-height: 1.2;
}
.enrollment-header-content p {
    font-size: 0.875rem;
    color: #93c5fd;
    margin-top: 0.25rem;
}
.form-split-container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.form-split-main {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-split-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 1.5rem;
}
.enroll-card {
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.enroll-card-header {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.enroll-card-header.navy {
    background: #1e3b6f;
    color: #ffffff;
    border-bottom-color: #1e3b6f;
}
.enroll-card-header.navy h3 {
    color: #ffffff;
}
.enroll-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e3b6f;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.enroll-card-body {
    padding: 1.5rem;
}
.form-row-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}
.form-row-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.radio-group-horizontal {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 0.5rem;
    min-height: 38px;
}
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
    font-weight: 500 !important;
}
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    border: 1px solid #cbd5e1;
    accent-color: #1e3b6f;
    cursor: pointer;
}
.photo-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.photo-upload-container:hover {
    border-color: #1e3b6f;
    background: #f1f5f9;
}
.photo-upload-container i {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}
.photo-upload-container .upload-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}
.photo-upload-container .upload-subtext {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}
.photo-preview-image {
    width: 150px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}
.form-footer-action {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.security-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}
.security-note i {
    color: #10b981;
}

@media(max-width: 992px) {
    .form-split-container {
        flex-direction: column;
    }
    .form-split-main, .form-split-side {
        width: 100%;
    }
    .form-split-side {
        position: static;
    }
    .form-row-grid-3, .form-row-grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media(max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.open { transform: translateX(0); width: var(--sidebar-w); }
    .main-content { margin-left: 0; }
    .main-content.sidebar-collapsed { margin-left: 0; }
    .mobile-toggle { display: flex !important; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-content { padding: 1rem; }
    .topbar { padding: 0 1rem; }
    .filter-row { flex-direction: column; }
    .filter-actions { flex-direction: row; }
    .page-header { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   STATS GRID AND REPORT CARDS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-green { background: #ecfdf5; color: #10b981; }
.stat-blue { background: #eff6ff; color: #3b82f6; }
.stat-purple { background: #f5f3ff; color: #8b5cf6; }
.stat-orange { background: #fffbeb; color: #f59e0b; }
.stat-red { background: #fef2f2; color: #ef4444; }

.stat-body {
    flex: 1;
    min-width: 0;
}
.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}
.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
}

.grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media(max-width: 900px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.report-total-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: var(--shadow);
}
.report-total-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.report-total-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
}
.report-total-count {
    font-size: 0.75rem;
    color: #64748b;
}

.data-table-sm thead th {
    padding: 0.6rem 0.85rem;
    font-size: 0.68rem;
}
.data-table-sm tbody td {
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
}

.table-total {
    background: #f8fafc;
    border-top: 2px solid #cbd5e1;
}
.table-total td {
    font-weight: 700;
    color: #0f172a !important;
}

.font-bold {
    font-weight: 700;
}
.badge-sm {
    padding: 0.15rem 0.45rem;
    font-size: 0.65rem;
}
.mb-6 {
    margin-bottom: 1.5rem;
}

/* ============================================================
   LAYOUT HELPER CLASSES
   ============================================================ */
.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media(max-width: 992px) {
    .grid-2-1 {
        grid-template-columns: 1fr;
    }
}
.stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}
.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.detail-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.detail-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.detail-value.amount-lg {
    font-size: 1.25rem;
    color: #1e3b6f;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.detail-row span:first-child {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}
.detail-row span:last-child {
    font-size: 0.875rem;
    color: #334155;
    font-weight: 600;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}
.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 9999px;
    transition: width 0.4s ease;
}
.progress-bar-fill.bg-success {
    background: #10b981;
}

.badge-lg {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}
.badge-neutral {
    background: #f1f5f9;
    color: #475569;
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.member-profile-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.member-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   PRINT AND GENERAL UTILITIES
   ============================================================ */
@media print {
    .sidebar, .topbar, .btn, .search-bar, .pagination { display: none !important; }
    .main-content { margin: 0 !important; }
    .page-content { padding: 0 !important; }
    body { background: #fff; color: #000; }
    table { font-size: 10pt; }
}

/* Topbar sidebar toggle button - always visible */
.topbar .sidebar-toggle {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #475569;
    cursor: pointer;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 38px;
    height: 38px;
    margin-left: 0;
    flex-shrink: 0;
}
.topbar .sidebar-toggle:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}
.topbar .sidebar-toggle:active {
    background: #e2e8f0;
    transform: scale(0.95);
}
