* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #F0F2F8;
    color: #1A2A3A;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ========== SIDEBAR - Banko Style ========== */
.sidebar {
    width: 280px;
    background: #0A2647;
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.08);
    z-index: 10;
}

.logo-area {
    padding: 28px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.logo-area h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.logo-area h2 span {
    color: #D4AF37;
}

.logo-area p {
    font-size: 12px;
    color: #8BA0B8;
    margin-top: 6px;
}

.nav-menu {
    flex: 1;
    padding: 0 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 12px;
    color: #C5D3E8;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-item i {
    width: 24px;
    font-size: 18px;
}

.nav-item span {
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.nav-item.active {
    background: #D4AF37;
    color: #0A2647;
}

.nav-item.active i {
    color: #0A2647;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: white;
    padding: 12px 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #0A2647;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F0F2F8;
    padding: 8px 16px;
    border-radius: 40px;
}

.user-badge i {
    font-size: 20px;
    color: #D4AF37;
}

.user-badge span {
    font-weight: 500;
    font-size: 14px;
}

.avatar {
    width: 44px;
    height: 44px;
    background: #D4AF37;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0A2647;
    font-weight: bold;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    border-left: 4px solid #D4AF37;
}

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

.stat-title {
    font-size: 14px;
    color: #6C7A8A;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #0A2647;
}

.stat-sub {
    font-size: 13px;
    color: #28A745;
    margin-top: 8px;
}

/* Tables */
.card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #E8ECF2;
    padding-bottom: 12px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #0A2647;
}

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

th, td {
    text-align: left;
    padding: 14px 8px;
    border-bottom: 1px solid #E8ECF2;
}

th {
    font-weight: 600;
    color: #5A6B7A;
    font-size: 13px;
}

td {
    font-size: 14px;
}

.badge {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
}

.badge-warning {
    background: #FFF3E0;
    color: #E65100;
}

.btn {
    padding: 10px 20px;
    border-radius: 40px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #0A2647;
    color: white;
}

.btn-primary:hover {
    background: #D4AF37;
    color: #0A2647;
}

.btn-success {
    background: #28A745;
    color: white;
}

.btn-danger {
    background: #DC3545;
    color: white;
}

/* Genealogy Tree */
.tree {
    text-align: center;
    padding: 20px;
    overflow-x: auto;
}

.tree ul {
    padding-top: 20px;
    position: relative;
    display: flex;
    justify-content: center;
}

.tree li {
    display: inline-block;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 0 10px;
}

.tree .member-node {
    background: #F8F9FC;
    border: 2px solid #D4AF37;
    padding: 10px 16px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #D0D5DD;
    border-radius: 12px;
    font-family: inherit;
}

/* Page visibility */
.page {
    display: none;
}

.page.active-page {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    .sidebar span, .logo-area p {
        display: none;
    }
    .main-content {
        padding: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}