/* ===================================================================
   Nile Micro Finance Bank - Stylesheet
   =================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

:root {
    --primary: #1A3B47;
    --primary-light: #2A5562;
    --accent: #2D9687;
    --accent-light: #3FB8A8;
    --accent-dark: #1F6B60;
    --bg-light: #F0F5F3;
    --bg-card: #FFFFFF;
    --white: #FFFFFF;
    --text-dark: #1A3B47;
    --text-muted: #6B7C85;
    --border: #E0E8E5;
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #F44336;
    --shadow: 0 4px 20px rgba(26, 59, 71, 0.06);
    --shadow-lg: 0 10px 40px rgba(26, 59, 71, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 14px;
}

a { text-decoration: none; color: inherit; }

/* ============ LOGIN PAGE ============ */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, #d4e6e1 100%);
    padding: 20px;
}
.login-container { width: 100%; max-width: 440px; }
.login-box { background: var(--white); border-radius: 24px; padding: 50px 40px; box-shadow: var(--shadow-lg); }
.login-logo { text-align: center; margin-bottom: 35px; }
.logo-circle {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(45, 150, 135, 0.3);
}
.logo-circle i { font-size: 36px; color: var(--white); }
.login-logo h1 { font-size: 26px; color: var(--primary); margin-bottom: 8px; font-weight: 700; }
.login-logo p { color: var(--text-muted); font-size: 14px; }
.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--text-dark); font-weight: 500; }
.input-icon { position: relative; }
.input-icon i:first-child { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
.input-icon input {
    width: 100%; padding: 14px 14px 14px 45px;
    border: 2px solid var(--border); border-radius: 12px;
    font-size: 15px; background: var(--bg-light);
    transition: all 0.3s ease; outline: none;
}
.input-icon input:focus { border-color: var(--accent); background: var(--white); box-shadow: 0 0 0 4px rgba(45, 150, 135, 0.1); }
.toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); cursor: pointer; font-size: 14px; }
.toggle-password:hover { color: var(--accent); }
.btn-login {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: var(--white); border: none; border-radius: 12px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease; margin-top: 10px;
    box-shadow: 0 4px 15px rgba(45, 150, 135, 0.3);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(45, 150, 135, 0.4); }
.btn-login i { margin-right: 8px; }
.login-footer { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 13px; }

/* ============ ALERTS ============ */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.alert-error { background: #FFEBEE; color: #C62828; border-left: 4px solid var(--danger); }
.alert-success { background: #E8F5E9; color: #2E7D32; border-left: 4px solid var(--success); }
.alert-warning { background: #FFF3E0; color: #E65100; border-left: 4px solid var(--warning); }
.alert-info { background: #E1F5FE; color: #0277BD; border-left: 4px solid #03A9F4; }

/* ============ APP LAYOUT ============ */
.app-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--white);
    padding: 24px 18px;
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; padding: 0 8px; }
.logo-mini {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 18px;
    box-shadow: 0 4px 12px rgba(45, 150, 135, 0.3);
}
.logo-text h2 { font-size: 18px; color: var(--primary); line-height: 1; margin: 0; }
.logo-text span { font-size: 11px; color: var(--text-muted); }

.sidebar-section { margin-bottom: 24px; }
.section-title { font-size: 11px; text-transform: uppercase; color: var(--text-muted); padding: 0 12px; margin-bottom: 8px; letter-spacing: 0.5px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.nav-item i { width: 20px; text-align: center; font-size: 15px; }
.nav-item:hover { background: var(--bg-light); color: var(--accent); }
.nav-item.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(45, 150, 135, 0.25);
}
.nav-item.logout-item:hover { background: #FFEBEE; color: var(--danger); }

.sidebar-footer { margin-top: 32px; padding: 16px 12px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
.sidebar-footer p { margin: 0; }
.sidebar-footer small { font-size: 11px; }

/* Main content */
.main-content { flex: 1; margin-left: 260px; min-height: 100vh; }

/* Topbar */
.topbar {
    background: var(--white);
    padding: 18px 28px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; background: none; border: none; font-size: 20px; color: var(--primary); cursor: pointer; }
.page-greeting h1 { font-size: 22px; color: var(--primary); margin: 0; font-weight: 700; }
.page-greeting p { font-size: 13px; color: var(--text-muted); margin: 0; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
    width: 42px; height: 42px;
    background: var(--bg-light);
    border: none; border-radius: 12px;
    cursor: pointer;
    color: var(--primary);
    font-size: 16px;
    transition: all 0.2s ease;
}
.topbar-btn:hover { background: var(--accent); color: var(--white); }

.user-avatar {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-weight: 700; font-size: 16px;
    box-shadow: 0 4px 12px rgba(45, 150, 135, 0.25);
}

/* Content wrapper */
.content-wrapper { padding: 28px; }

/* ============ DASHBOARD ============ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.dashboard-grid.bottom-grid { grid-template-columns: 1.5fr 1fr; }

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.card.full-width { grid-column: 1 / -1; }

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-header h3 { font-size: 16px; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.card-header h3 i { color: var(--accent); }
.see-all { font-size: 13px; color: var(--accent); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.see-all:hover { color: var(--primary); }

/* Balance card */
.balance-card { background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%); color: var(--white); border: none; }
.balance-card .balance-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.balance-card h3 { color: var(--white); font-size: 14px; font-weight: 500; opacity: 0.9; }
.balance-date { font-size: 12px; opacity: 0.7; }
.balance-amount { display: flex; align-items: baseline; gap: 8px; margin-bottom: 24px; }
.balance-amount .currency { font-size: 18px; opacity: 0.8; }
.balance-amount .amount { font-size: 36px; font-weight: 700; }
.balance-stats { display: flex; gap: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.15); margin-bottom: 20px; }
.stat-mini { display: flex; align-items: center; gap: 10px; }
.stat-mini i { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15); font-size: 12px; }
.stat-mini .income-icon { background: rgba(76,175,80,0.3); }
.stat-mini .expense-icon { background: rgba(244,67,54,0.3); }
.stat-mini small { font-size: 11px; opacity: 0.75; display: block; }
.stat-mini strong { font-size: 14px; font-weight: 600; }

.quick-actions { display: flex; gap: 10px; }
.action-btn {
    flex: 1; padding: 12px;
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    text-align: center;
    color: var(--white);
    font-size: 12px; font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}
.action-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }
.action-btn i { display: block; font-size: 16px; margin-bottom: 4px; }

/* Loan summary */
.loan-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.loan-stat { padding: 12px; background: var(--bg-light); border-radius: 10px; }
.loan-stat.highlight { background: linear-gradient(135deg, rgba(45,150,135,0.1), rgba(26,59,71,0.05)); border: 1px solid rgba(45,150,135,0.2); }
.stat-label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.stat-value { font-size: 16px; font-weight: 700; color: var(--primary); }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-accent { color: var(--accent) !important; }

.loan-status-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border); }
.status-pill { padding: 5px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.status-active, .status-pending { background: #E1F5FE; color: #0277BD; }
.status-overdue { background: #FFEBEE; color: #C62828; }
.status-completed, .status-paid { background: #E8F5E9; color: #2E7D32; }
.status-partial { background: #FFF3E0; color: #E65100; }
.status-written_off { background: #ECEFF1; color: #455A64; }

/* Section header */
.section-header { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 16px 4px; }
.section-header h2 { font-size: 18px; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.section-header h2 i { color: var(--accent); }

/* Account cards */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.account-card {
    border-radius: var(--radius);
    padding: 20px;
    color: var(--white);
    min-height: 150px;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative; overflow: hidden;
}
.account-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.account-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.account-card-top h4 { font-size: 16px; margin-top: 4px; }
.account-type-label { font-size: 10px; text-transform: uppercase; opacity: 0.8; letter-spacing: 0.5px; }
.account-icon-bg { font-size: 32px; opacity: 0.25; }
.account-balance small { font-size: 11px; opacity: 0.8; display: block; margin-bottom: 2px; }
.account-balance h3 { font-size: 22px; font-weight: 700; }

.account-card.add-card {
    background: var(--bg-light);
    color: var(--text-muted);
    border: 2px dashed var(--border);
    align-items: center; justify-content: center;
    box-shadow: none;
}
.account-card.add-card:hover { border-color: var(--accent); color: var(--accent); }
.account-card.add-card i { font-size: 28px; margin-bottom: 8px; }

/* Recent transactions */
.txn-list { display: flex; flex-direction: column; gap: 4px; }
.txn-item { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 10px; transition: all 0.2s ease; }
.txn-item:hover { background: var(--bg-light); }
.txn-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.txn-info { flex: 1; }
.txn-info strong { display: block; font-size: 14px; color: var(--primary); }
.txn-info small { font-size: 12px; color: var(--text-muted); }
.txn-amount { font-weight: 700; font-size: 14px; }
.amount-in { color: var(--success); }
.amount-out { color: var(--danger); }
.amount-neutral { color: var(--primary); }

/* Savings card */
.savings-card { display: flex; flex-direction: column; }
.savings-gauge { display: flex; justify-content: center; padding: 10px 0; }
.gauge-circle {
    width: 160px; height: 160px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--progress) * 1%), var(--bg-light) 0);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.gauge-inner {
    width: 130px; height: 130px;
    background: var(--white);
    border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
}
.gauge-percent { font-size: 24px; font-weight: 700; color: var(--primary); }
.gauge-inner small { color: var(--text-muted); font-size: 12px; }
.savings-info { text-align: center; margin-top: 16px; }
.savings-info h4 { color: var(--primary); margin-bottom: 4px; }
.savings-info p { color: var(--text-muted); font-size: 14px; }
.savings-info p strong { color: var(--accent); font-size: 16px; }
.savings-info small { color: var(--text-muted); display: block; margin-top: 6px; }

/* Empty state */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { margin-bottom: 16px; }

/* Buttons */
.btn-primary-sm, .btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--white);
    border-radius: 10px; border: none;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease;
}
.btn-primary-sm:hover, .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(45,150,135,0.3); }
.btn-secondary { background: var(--bg-light); color: var(--primary); padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border); font-weight: 600; cursor: pointer; }
.btn-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-light); border-radius: 8px; color: var(--accent); transition: all 0.2s ease; }
.btn-icon:hover { background: var(--accent); color: var(--white); }

/* Tables */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    text-align: left; padding: 12px 16px;
    font-size: 11px; text-transform: uppercase;
    color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.data-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.data-table tbody tr:hover { background: var(--bg-light); }
.data-table code { background: var(--bg-light); padding: 3px 8px; border-radius: 6px; font-size: 11px; color: var(--accent); }

/* Toast */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    padding: 14px 20px;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 10px;
    z-index: 9999;
    font-size: 14px; font-weight: 500;
    border-left: 4px solid var(--accent);
    animation: slideIn 0.3s ease;
}
.toast-success { border-left-color: var(--success); color: var(--success); }
.toast-error { border-left-color: var(--danger); color: var(--danger); }
.toast-warning { border-left-color: var(--warning); color: var(--warning); }
.toast.hide { animation: slideOut 0.3s ease forwards; }
@keyframes slideIn { from { transform: translateX(120%); } to { transform: translateX(0); } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }

/* ============ RESPONSIVE ============ */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .dashboard-grid, .dashboard-grid.bottom-grid { grid-template-columns: 1fr; }
    .balance-amount .amount { font-size: 28px; }
}

@media (max-width: 600px) {
    .content-wrapper { padding: 16px; }
    .topbar { padding: 14px 18px; }
    .page-greeting h1 { font-size: 18px; }
    .page-greeting p { display: none; }
    .balance-stats { flex-direction: column; gap: 12px; }
    .accounts-grid { grid-template-columns: 1fr; }
}

/* ============ PAGE ACTIONS BAR ============ */
.page-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.page-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-pill {
    background: var(--white);
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px;
}
.stat-pill i {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--white);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.stat-pill small { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.stat-pill strong { font-size: 16px; color: var(--primary); }

/* ============ ACCOUNT CARD FULL ============ */
.account-card-full {
    border-radius: var(--radius);
    padding: 22px;
    color: var(--white);
    min-height: 200px;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative; overflow: hidden;
}
.account-card-full:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.account-card-full.inactive { opacity: 0.55; }
.account-num { font-size: 11px; opacity: 0.85; display: block; margin-top: 4px; letter-spacing: 1px; }
.opening-bal { font-size: 11px; opacity: 0.7; display: block; margin-top: 4px; }
.account-actions {
    display: flex; gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.acc-action-btn {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.18);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 13px;
    transition: all 0.2s ease;
}
.acc-action-btn:hover { background: rgba(255,255,255,0.35); transform: scale(1.05); }
.acc-action-btn.danger:hover { background: rgba(244,67,54,0.8); }

/* ============ FORM PAGE ============ */
.form-page { max-width: 900px; margin: 0 auto; }
.form-card { padding: 28px; }
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}
.form-grid .form-group { display: flex; flex-direction: column; }
.form-grid .full-width { grid-column: 1 / -1; }
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-light);
    transition: all 0.3s ease;
    outline: none;
    color: var(--text-dark);
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(45,150,135,0.1);
}
.form-group input[readonly] { background: #f0f0f0; cursor: not-allowed; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.form-actions {
    display: flex; gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Color picker */
.color-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.color-swatch {
    width: 36px; height: 36px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}
.color-swatch input { display: none; }
.color-swatch i { color: var(--white); font-size: 14px; opacity: 0; transition: opacity 0.2s ease; }
.color-swatch input:checked + i { opacity: 1; }
.color-swatch:has(input:checked) { border-color: var(--primary); transform: scale(1.1); }

/* ============ ACCOUNT DETAIL PAGE ============ */
.account-detail-header { margin-bottom: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 14px; }
.back-link:hover { color: var(--accent); }

.account-hero {
    border-radius: var(--radius);
    padding: 32px;
    color: var(--white);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: var(--shadow);
}
.hero-left h2 { font-size: 28px; margin: 4px 0; }
.hero-acc-num { font-size: 14px; opacity: 0.85; letter-spacing: 1px; margin-bottom: 16px; }
.hero-balance small { font-size: 12px; opacity: 0.8; display: block; margin-top: 12px; }
.hero-balance h1 { font-size: 42px; font-weight: 800; margin-top: 4px; }
.hero-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}
.hero-btn:hover { background: rgba(255,255,255,0.35); }

/* Stats row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.stat-card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.stat-card small { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; display: block; }
.stat-card strong { font-size: 17px; color: var(--primary); }

/* Responsive form */
@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
    .account-hero { flex-direction: column; gap: 16px; }
    .hero-balance h1 { font-size: 32px; }
    .page-actions-bar { flex-direction: column; align-items: stretch; }
}

/* ============ CATEGORIES PAGE ============ */
.muted-text { color: var(--text-muted); font-size: 13px; }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.category-tile {
    display: flex; align-items: center; gap: 12px;
    padding: 14px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.category-tile:hover { background: var(--white); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.cat-info { flex: 1; min-width: 0; }
.cat-info strong { display: block; color: var(--primary); font-size: 14px; }
.cat-info small { color: var(--text-muted); font-size: 11px; }

.cat-actions { display: flex; gap: 6px; }
.btn-icon-sm {
    width: 30px; height: 30px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}
.btn-icon-sm:hover { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-icon-sm.danger:hover { background: var(--danger); border-color: var(--danger); }

/* Stat pill icon override */
.stat-pill i.fa-arrow-down,
.stat-pill i.fa-arrow-up { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(26, 59, 71, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { font-size: 17px; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.modal-header h3 i { color: var(--accent); }
.modal-close {
    width: 32px; height: 32px;
    background: var(--bg-light);
    border: none; border-radius: 8px;
    cursor: pointer; color: var(--text-muted);
    transition: all 0.2s ease;
}
.modal-close:hover { background: var(--danger); color: var(--white); }

.modal-body { padding: 24px; }
.modal-body .form-group { margin-bottom: 18px; }
.modal-body .form-group:last-of-type { margin-bottom: 0; }

.modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding-top: 20px; margin-top: 20px;
    border-top: 1px solid var(--border);
}

/* Icon picker */
.icon-picker {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 10px;
}
.icon-swatch {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--white);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    color: var(--text-muted);
}
.icon-swatch input { display: none; }
.icon-swatch:hover { background: var(--accent); color: var(--white); }
.icon-swatch:has(input:checked) { background: var(--accent); color: var(--white); border-color: var(--primary); }

@media (max-width: 600px) {
    .icon-picker { grid-template-columns: repeat(6, 1fr); }
    .categories-grid { grid-template-columns: 1fr; }
}