/* ============================================================
   Member Rumah Mans - Main Stylesheet v2.0
   Modern & Elegant Dark/Light Mode — COMPLETE
   ============================================================ */

/* --- Variables --- */
:root {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #1a1f36;
    --bg-sidebar-hover: rgba(255,255,255,0.08);
    --bg-sidebar-active: rgba(99,102,241,0.25);
    --bg-input: #f8fafc;
    --bg-table-head: #f1f5f9;
    --bg-table-hover: #f8fafc;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-sidebar: #c8cdd8;
    --text-sidebar-active: #ffffff;
    --text-white: #ffffff;

    --border-color: #e2e8f0;
    --border-input: #cbd5e1;

    --accent: #6366f1;
    --accent-dark: #4f46e5;
    --accent-light: #e0e7ff;
    --accent-glow: rgba(99,102,241,0.2);

    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #dbeafe;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
    --shadow-glow: 0 0 20px rgba(99,102,241,0.25);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"], body.dark-mode {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d2e;
    --bg-card: #1e2235;
    --bg-sidebar: #12141f;
    --bg-input: #252840;
    --bg-table-head: #252840;
    --bg-table-hover: #2a2d45;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #2e3250;
    --border-input: #3a3f5c;
    --accent-light: #2d2f6b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5), 0 4px 10px rgba(0,0,0,0.3);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* --- App Layout --- */
.app-wrapper { display: flex; min-height: 100vh; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: width 0.3s ease;
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: var(--header-height);
}
.sidebar-logo { display: flex; align-items: center; gap: 12px; overflow: hidden; }
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}
.logo-text { overflow: hidden; white-space: nowrap; }
.logo-main { display: block; color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.3px; }
.logo-sub  { display: block; color: rgba(255,255,255,0.4); font-size: 11px; }
.sidebar-toggle-btn { color: rgba(255,255,255,0.5); font-size: 14px; padding: 6px; border-radius: var(--radius-sm); transition: var(--transition); flex-shrink: 0; }
.sidebar-toggle-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.06); overflow: hidden; }
.user-avatar { position: relative; flex-shrink: 0; }
.user-avatar img { width: 38px; height: 38px; border-radius: var(--radius-full); object-fit: cover; border: 2px solid rgba(99,102,241,0.5); }
.user-status-dot { position: absolute; bottom: 1px; right: 1px; width: 9px; height: 9px; background: var(--success); border-radius: 50%; border: 2px solid var(--bg-sidebar); }
.user-info { overflow: hidden; white-space: nowrap; }
.user-name { color: #fff; font-weight: 600; font-size: 13px; }
.user-role { margin-top: 2px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.nav-section { margin-bottom: 4px; }
.nav-section-label { display: block; color: rgba(255,255,255,0.3); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 10px 20px 4px; overflow: hidden; white-space: nowrap; }
.sidebar.collapsed .nav-section-label { opacity: 0; }
.nav-list { padding: 0 8px; }
.nav-item { margin-bottom: 2px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md); color: var(--text-sidebar); font-size: 13.5px; font-weight: 500; transition: var(--transition); overflow: hidden; white-space: nowrap; }
.nav-link:hover { background: var(--bg-sidebar-hover); color: #fff; }
.nav-item.active .nav-link, .nav-link.active { background: var(--bg-sidebar-active); color: var(--text-sidebar-active); box-shadow: inset 2px 0 0 var(--accent); }
.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-text { overflow: hidden; text-overflow: ellipsis; }
.sidebar.collapsed .nav-text, .sidebar.collapsed .logo-text, .sidebar.collapsed .user-info, .sidebar.collapsed .nav-section-label { display: none; }
.nav-logout { color: rgba(239,68,68,0.7); }
.nav-logout:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

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

/* --- Top Header --- */
.top-header { background: var(--bg-secondary); height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.page-title-header { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.header-btn { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); background: var(--bg-input); border: 1px solid var(--border-color); transition: var(--transition); font-size: 14px; }
.header-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }
.header-avatar { width: 36px; height: 36px; border-radius: var(--radius-full); object-fit: cover; border: 2px solid var(--accent); cursor: pointer; }

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

/* --- Page Header --- */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-header-left h1 { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; }
.page-header-left p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   CARDS
   ============================================================ */
.card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); overflow: hidden; transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-md); }
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--accent); }
.card-body { padding: 20px; }

/* --- Stat Cards --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-color); padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-sm); transition: var(--transition); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.stat-card.indigo::before { background: linear-gradient(90deg,#6366f1,#8b5cf6); }
.stat-card.green::before { background: linear-gradient(90deg,#10b981,#34d399); }
.stat-card.amber::before { background: linear-gradient(90deg,#f59e0b,#fbbf24); }
.stat-card.red::before { background: linear-gradient(90deg,#ef4444,#f87171); }
.stat-card.blue::before { background: linear-gradient(90deg,#3b82f6,#60a5fa); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { width: 50px; height: 50px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-card.indigo .stat-icon { background: #e0e7ff; color: #6366f1; }
.stat-card.green .stat-icon { background: #d1fae5; color: #10b981; }
.stat-card.amber .stat-icon { background: #fef3c7; color: #f59e0b; }
.stat-card.red .stat-icon { background: #fee2e2; color: #ef4444; }
.stat-card.blue .stat-icon { background: #dbeafe; color: #3b82f6; }
body.dark-mode .stat-card.indigo .stat-icon { background: rgba(99,102,241,0.15); }
body.dark-mode .stat-card.green .stat-icon { background: rgba(16,185,129,0.15); }
body.dark-mode .stat-card.amber .stat-icon { background: rgba(245,158,11,0.15); }
body.dark-mode .stat-card.red .stat-icon { background: rgba(239,68,68,0.15); }
body.dark-mode .stat-card.blue .stat-icon { background: rgba(59,130,246,0.15); }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; line-height: 1.1; }
.stat-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.required { color: var(--danger); }
.form-control { width: 100%; padding: 10px 14px; background: var(--bg-input); border: 1.5px solid var(--border-input); border-radius: var(--radius-md); color: var(--text-primary); font-size: 13.5px; transition: var(--transition); outline: none; }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: var(--bg-secondary); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.input-group { position: relative; }
.input-group-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.input-group .form-control { padding-left: 38px; }
.input-group-append { position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 13px; color: var(--text-muted); cursor: pointer; }
.input-group-append:hover { color: var(--accent); }
.input-group .form-control.has-append { padding-right: 42px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: var(--radius-md); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: var(--transition); border: 1.5px solid transparent; white-space: nowrap; font-family: var(--font); }
.btn i { font-size: 13px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 14.5px; }
.w-100 { width: 100%; justify-content: center; }

.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 4px 14px rgba(99,102,241,0.4); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-input); color: var(--text-primary); border-color: var(--border-color); }
.btn-secondary:hover { background: var(--border-color); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; box-shadow: 0 4px 12px rgba(16,185,129,0.35); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; box-shadow: 0 4px 12px rgba(239,68,68,0.35); }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #d97706; }
.btn-info { background: var(--info); color: #fff; border-color: var(--info); }
.btn-info:hover { background: #2563eb; }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-dark { background: var(--bg-sidebar); color: #fff; border-color: var(--bg-sidebar); }
.btn-dark:hover { background: #0f1015; }

/* ============================================================
   BADGES
   ============================================================ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap; }
.badge-super-admin { background: linear-gradient(135deg,rgba(99,102,241,0.15),rgba(139,92,246,0.15)); color: #6366f1; border: 1px solid rgba(99,102,241,0.25); }
.badge-ketua { background: rgba(245,158,11,0.12); color: #d97706; border: 1px solid rgba(245,158,11,0.25); }
.badge-anggota { background: rgba(16,185,129,0.12); color: #059669; border: 1px solid rgba(16,185,129,0.25); }
.badge-active { background: rgba(16,185,129,0.12); color: #059669; border: 1px solid rgba(16,185,129,0.25); }
.badge-pending { background: rgba(245,158,11,0.12); color: #d97706; border: 1px solid rgba(245,158,11,0.25); }
.badge-inactive { background: rgba(239,68,68,0.12); color: #dc2626; border: 1px solid rgba(239,68,68,0.25); }
.badge-confirmed { background: rgba(16,185,129,0.12); color: #059669; border: 1px solid rgba(16,185,129,0.25); }
.badge-rejected { background: rgba(239,68,68,0.12); color: #dc2626; border: 1px solid rgba(239,68,68,0.25); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { background: var(--bg-table-head); padding: 12px 14px; text-align: left; font-weight: 700; font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border-color); color: var(--text-primary); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg-table-hover); }
.table .actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.no-data { text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 14px; }
.no-data i { font-size: 40px; margin-bottom: 12px; display: block; opacity: 0.3; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: var(--radius-md); font-size: 13.5px; margin-bottom: 16px; line-height: 1.5; }
.alert i { font-size: 15px; margin-top: 1px; flex-shrink: 0; }
.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid rgba(16,185,129,0.3); }
.alert-danger  { background: var(--danger-bg); color: #991b1b; border: 1px solid rgba(239,68,68,0.3); }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid rgba(245,158,11,0.3); }
.alert-info    { background: var(--info-bg); color: #1e40af; border: 1px solid rgba(59,130,246,0.3); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal-overlay.show { display: flex; }
.modal { background: var(--bg-card); border-radius: var(--radius-xl); width: 100%; max-width: 540px; box-shadow: var(--shadow-lg); animation: modalIn 0.25s ease; border: 1px solid var(--border-color); }
.modal-lg { max-width: 720px; }
.modal-sm { max-width: 400px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border-color); }
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.modal-title i { color: var(--accent); }
.modal-close { width: 32px; height: 32px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--text-muted); background: var(--bg-input); transition: var(--transition); }
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes modalIn { from { opacity:0; transform: scale(0.95) translateY(-10px); } to { opacity:1; transform: scale(1) translateY(0); } }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrapper { display: flex; min-height: 100vh; }
.auth-left { width: 42%; background: linear-gradient(155deg, #1a1f36 0%, #252a4a 50%, #1e2035 100%); display: flex; flex-direction: column; justify-content: center; padding: 60px; position: relative; overflow: hidden; }
.auth-left::before { content: ''; position: absolute; top: -80px; right: -80px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%); border-radius: 50%; }
.auth-left::after { content: ''; position: absolute; bottom: -60px; left: -60px; width: 240px; height: 240px; background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%); border-radius: 50%; }
.auth-brand { position: relative; z-index: 1; }
.auth-logo { width: 56px; height: 56px; background: linear-gradient(135deg, #6366f1, #8b5cf6); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; margin-bottom: 24px; box-shadow: 0 8px 24px rgba(99,102,241,0.4); }
.auth-brand h1 { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.auth-brand p { color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.7; max-width: 320px; }
.auth-features { margin-top: 36px; position: relative; z-index: 1; }
.auth-feature { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.75); font-size: 13.5px; margin-bottom: 14px; }
.auth-feature i { width: 32px; height: 32px; background: rgba(255,255,255,0.08); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 13px; color: #a5b4fc; }
.auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 30px; background: var(--bg-primary); overflow-y: auto; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h2 { font-size: 24px; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.auth-card > p { color: var(--text-secondary); font-size: 14px; margin-bottom: 28px; }
.divider-text { text-align: center; color: var(--text-muted); font-size: 13px; position: relative; }
.divider-text::before, .divider-text::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border-color); }
.divider-text::before { left: 0; }
.divider-text::after { right: 0; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-wrapper { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.profile-sidebar-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-color); padding: 32px 24px; text-align: center; box-shadow: var(--shadow-sm); }
.profile-avatar-wrapper { position: relative; display: inline-block; margin-bottom: 20px; }
.profile-avatar-img { width: 100px; height: 100px; border-radius: var(--radius-full); object-fit: cover; border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }
.profile-avatar-edit { position: absolute; bottom: 2px; right: 2px; width: 28px; height: 28px; background: var(--accent); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; cursor: pointer; border: 2px solid var(--bg-card); transition: var(--transition); }
.profile-avatar-edit:hover { background: var(--accent-dark); transform: scale(1.1); }
.profile-name { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.profile-role { margin-bottom: 16px; }
.profile-meta { text-align: left; border-top: 1px solid var(--border-color); padding-top: 16px; margin-top: 8px; }
.profile-meta-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.profile-meta-item i { color: var(--accent); font-size: 13px; margin-top: 2px; width: 16px; }
.profile-meta-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.profile-meta-val { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone { border: 2px dashed var(--border-input); border-radius: var(--radius-md); padding: 32px 20px; text-align: center; cursor: pointer; transition: var(--transition); background: var(--bg-input); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--accent-light); }
.upload-zone i { font-size: 36px; color: var(--text-muted); margin-bottom: 10px; display: block; }
.upload-zone p { font-size: 13.5px; color: var(--text-secondary); }
.upload-zone .upload-filename { display: block; margin-top: 8px; font-size: 12px; color: var(--accent); font-weight: 600; }
.upload-zone input[type="file"] { display: none; }

/* ============================================================
   DASHBOARD WELCOME
   ============================================================ */
.welcome-banner { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%); border-radius: var(--radius-xl); padding: 28px 32px; margin-bottom: 24px; color: #fff; position: relative; overflow: hidden; box-shadow: 0 8px 30px rgba(99,102,241,0.35); }
.welcome-banner::before { content: ''; position: absolute; top: -40px; right: -40px; width: 200px; height: 200px; background: rgba(255,255,255,0.07); border-radius: 50%; }
.welcome-banner::after { content: ''; position: absolute; bottom: -30px; right: 80px; width: 120px; height: 120px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.welcome-content { position: relative; z-index: 1; }
.welcome-content h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.welcome-content p { opacity: 0.85; font-size: 14px; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; color: var(--text-primary); border-left: 4px solid var(--accent); min-width: 280px; animation: toastIn 0.3s ease; border: 1px solid var(--border-color); }
.toast.success { border-left-color: var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.warning .toast-icon { color: var(--warning); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
@keyframes toastIn { from { opacity:0; transform: translateX(30px); } to { opacity:1; transform: translateX(0); } }

/* --- Flash Message (top right) --- */
.flash-message { position: fixed; top: 80px; right: 24px; z-index: 300; display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; max-width: 380px; transition: all 0.4s ease; animation: toastIn 0.3s ease; }
.flash-message.success { background: #d1fae5; color: #065f46; border: 1px solid rgba(16,185,129,0.3); }
.flash-message.error   { background: #fee2e2; color: #991b1b; border: 1px solid rgba(239,68,68,0.3); }
.flash-message.warning { background: #fef3c7; color: #92400e; border: 1px solid rgba(245,158,11,0.3); }
.flash-message.info    { background: #dbeafe; color: #1e40af; border: 1px solid rgba(59,130,246,0.3); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar .form-control { max-width: 200px; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.search-box input { padding-left: 36px; min-width: 240px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; align-items: center; gap: 4px; }
.pagination a, .pagination span { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); border: 1px solid var(--border-color); font-size: 13px; color: var(--text-secondary); transition: var(--transition); background: var(--bg-secondary); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.pagination-info { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   DOCUMENT CARD
   ============================================================ */
.doc-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-color); padding: 18px; display: flex; align-items: flex-start; gap: 14px; transition: var(--transition); }
.doc-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.doc-icon { width: 48px; height: 48px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.doc-icon.pdf { background: rgba(239,68,68,0.1); color: #ef4444; }
.doc-icon.word { background: rgba(59,130,246,0.1); color: #3b82f6; }
.doc-icon.other { background: rgba(99,102,241,0.1); color: #6366f1; }
.doc-info { flex: 1; min-width: 0; }
.doc-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.doc-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ============================================================
   DONATION CARD
   ============================================================ */
.donation-row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.donation-row:last-child { border-bottom: none; }
.donation-icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: rgba(99,102,241,0.1); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.donation-label { font-weight: 600; font-size: 13.5px; color: var(--text-primary); }
.donation-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.donation-amount-hidden { font-size: 13px; color: var(--text-muted); font-style: italic; }
.donation-amount { font-size: 15px; font-weight: 800; color: var(--success); }

/* ============================================================
   MOBILE MENU TOGGLE
   ============================================================ */
.mobile-menu-toggle { display: none; width: 36px; height: 36px; border-radius: var(--radius-md); align-items: center; justify-content: center; color: var(--text-secondary); background: var(--bg-input); border: 1px solid var(--border-color); font-size: 15px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { left: -260px; transition: left 0.3s ease, width 0.3s ease; }
    .sidebar.mobile-open { left: 0; width: var(--sidebar-width); }
    .main-content { margin-left: 0 !important; }
    .mobile-menu-toggle { display: flex; }
    .auth-left { display: none; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar .form-control, .search-box input { max-width: 100%; min-width: unset; width: 100%; }
    .page-content { padding: 16px; }
    .top-header { padding: 0 16px; }
}

/* ============================================================
   EXTRA BUTTON VARIANTS (Excel / PDF / Danger Outline)
   ============================================================ */
.btn-excel { background: #1d6f42; color: #fff; border-color: #1d6f42; }
.btn-excel:hover { background: #155233; box-shadow: 0 4px 12px rgba(29,111,66,0.4); }
.btn-pdf { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-pdf:hover { background: #a93226; box-shadow: 0 4px 12px rgba(192,57,43,0.4); }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: var(--radius-md); }
.btn-icon i { margin: 0; }

/* ============================================================
   TABLE ACTIONS / EMPTY STATE
   ============================================================ */
.table-actions { display: flex; gap: 6px; align-items: center; }
.table-responsive { overflow-x: auto; }
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; display: block; margin-bottom: 16px; opacity: 0.25; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13.5px; }

/* ============================================================
   BADGE EXTRA VARIANTS
   ============================================================ */
.badge-primary { background: rgba(99,102,241,0.12); color: #6366f1; border: 1px solid rgba(99,102,241,0.25); }
.badge-info    { background: rgba(59,130,246,0.12); color: #2563eb; border: 1px solid rgba(59,130,246,0.25); }
.badge-success { background: rgba(16,185,129,0.12); color: #059669; border: 1px solid rgba(16,185,129,0.25); }
.badge-warning { background: rgba(245,158,11,0.12); color: #d97706; border: 1px solid rgba(245,158,11,0.25); }
.badge-danger  { background: rgba(239,68,68,0.12); color: #dc2626; border: 1px solid rgba(239,68,68,0.25); }

/* ============================================================
   SEARCH INPUT BAR (used in filter-bar)
   ============================================================ */
.search-input { position: relative; }
.search-input input { padding-left: 14px; min-width: 240px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-0   { padding: 0; }
.text-bold { font-weight: 700; }
.fw-600 { font-weight: 600; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent  { color: var(--accent); }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .sidebar, .top-header, .page-header-actions, .btn, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
    body { background: white !important; color: black !important; }
    .card { box-shadow: none !important; border: 1px solid #ccc !important; }
    .table th { background: #f0f0f0 !important; color: #000 !important; }
}
