/* ============================================
   NEXUS 2030 — DASHBOARD
   ============================================ */

* { box-sizing: border-box; }

body.dashboard-page {
    margin: 0;
    padding: 0;
    background: #f0f4ff;
    font-family: 'Inter', sans-serif;
    display: flex;
}

/* ==================
   SIDEBAR
   ================== */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: #081440;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-brand .brand-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: white;
}

.sidebar-brand .brand-name {
    font-size: 1.1rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.04em;
}

.sidebar-brand .brand-year {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.1em;
}

.sidebar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    cursor: pointer;
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0.75rem;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0 0.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
    cursor: pointer;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.sidebar-link.active {
    background: rgba(255,107,0,0.15);
    color: #ff6b00;
    font-weight: 600;
}

.sidebar-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-logout:hover {
    background: rgba(255,59,59,0.12);
    color: #ff6b6b;
}

/* ==================
   MAIN CONTENT
   ================== */
.dashboard-main {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================
   TOPBAR
   ================== */
.dash-topbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.dash-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #081440;
    display: none;
    padding: 0.25rem;
}

.dash-breadcrumb {
    font-size: 0.95rem;
    font-weight: 600;
    color: #081440;
}

.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dash-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #081440, #1a3a8f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.dash-user-info {
    display: flex;
    flex-direction: column;
}

.dash-user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #081440;
    line-height: 1.2;
}

.dash-user-id {
    font-size: 0.72rem;
    color: #94a3b8;
}

/* LANG IN TOPBAR */
.dash-lang .lang-btn {
    background: #f0f4ff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #081440;
}

.dash-lang .lang-dropdown {
    top: calc(100% + 8px);
    right: 0;
    left: auto;
}

/* ==================
   CONTENT
   ================== */
.dash-content {
    padding: 2rem;
    flex: 1;
}

.dash-page {
    display: none;
}

.dash-page.active {
    display: block;
}

.dash-welcome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dash-welcome h1 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 800;
    color: #081440;
    margin: 0 0 0.25rem 0;
}

.dash-welcome p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

.dash-date {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    text-align: right;
}

/* ==================
   STAT CARDS
   ================== */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 12px rgba(8,20,64,0.06);
    border: 1px solid rgba(8,20,64,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(8,20,64,0.10);
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #081440;
    line-height: 1.2;
}

.stat-change {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.stat-change.positive {
    color: #10b981;
}

/* ==================
   SECTIONS
   ================== */
.dash-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(8,20,64,0.06);
    border: 1px solid rgba(8,20,64,0.05);
}

.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.dash-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #081440;
    margin: 0 0 1.25rem 0;
}

.dash-section-header .dash-section-title {
    margin: 0;
}

.dash-see-all {
    font-size: 0.85rem;
    color: #ff6b00;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

/* ==================
   QUICK ACTIONS
   ================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: #f0f4ff;
    border: 1.5px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #081440;
    transition: all 0.2s ease;
}

.quick-action:hover {
    background: rgba(255,107,0,0.08);
    border-color: rgba(255,107,0,0.3);
    color: #ff6b00;
}

.qa-icon {
    font-size: 1.5rem;
}

/* ==================
   TRANSACTIONS
   ================== */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tx-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f0f4ff;
}

.tx-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tx-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tx-in { background: rgba(16,185,129,0.12); }
.tx-out { background: rgba(239,68,68,0.10); }
.tx-save { background: rgba(8,20,64,0.08); }
.tx-exchange { background: rgba(139,92,246,0.10); }

.tx-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tx-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #081440;
}

.tx-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

.tx-amount {
    font-size: 0.95rem;
    font-weight: 700;
    color: #081440;
}

.tx-amount.positive { color: #10b981; }
.tx-amount.negative { color: #ef4444; }

/* ==================
   EPARGNE
   ================== */
.epargne-actions {
    display: flex;
    gap: 1rem;
}

.btn-epargne {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-epargne:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,0,0.3);
}

.btn-epargne.outline {
    background: transparent;
    color: #081440;
    border: 2px solid #e2e8f0;
}

.btn-epargne.outline:hover {
    border-color: #081440;
    box-shadow: none;
}

/* ==================
   TRANSFER FORM
   ================== */
.transfer-form {
    max-width: 480px;
}

.transfer-form .form-group {
    margin-bottom: 1.25rem;
}

.transfer-form .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.transfer-form .form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: #081440;
    background: #f8f9fc;
    transition: all 0.2s ease;
}

.transfer-form .form-input:focus {
    outline: none;
    border-color: #ff6b00;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255,107,0,0.08);
}

/* ==================
   PROFILE
   ================== */
.profile-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #081440, #1a3a8f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.profile-info h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #081440;
    margin: 0 0 0.4rem 0;
}

.profile-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0.2rem 0;
}

.profile-badge {
    display: inline-block;
    background: rgba(16,185,129,0.1);
    color: #059669;
    border: 1px solid rgba(16,185,129,0.25);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

/* ==================
   SECURITY
   ================== */
.security-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.security-item span:first-child {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.security-item div {
    flex: 1;
}

.security-item strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #081440;
    margin-bottom: 0.2rem;
}

.security-item p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}

.btn-sec {
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #081440;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.btn-sec:hover {
    border-color: #ff6b00;
    color: #ff6b00;
}

.btn-sec.active {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.3);
    color: #059669;
}

/* ==================
   RESPONSIVE
   ================== */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-toggle {
        display: block;
    }

    .dashboard-main {
        margin-left: 0;
    }

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    .dash-user-info {
        display: none;
    }
}

@media (max-width: 600px) {
    .dash-content {
        padding: 1.25rem;
    }

    .dash-topbar {
        padding: 0.75rem 1.25rem;
    }

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    .dash-stats {
        grid-template-columns: 1fr 1fr;
    }
}
/* FIX LANG DROPDOWN IN DASHBOARD */
.dash-lang .lang-dropdown {
    display: none;
    position: absolute;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(8,20,64,0.12);
    min-width: 160px;
    z-index: 200;
    overflow: hidden;
}

.dash-lang .lang-dropdown.open {
    display: block;
}

.dash-lang .lang-option {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s ease;
}

.dash-lang .lang-option:hover {
    background: #f0f4ff;
}

.dash-lang .lang-option.active {
    background: rgba(255,107,0,0.08);
    color: #ff6b00;
    font-weight: 600;
}

.dash-lang {
    position: relative;
}