﻿@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@300;400;500;600;700&display=swap');
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: #f5f7fb;
    height: 100%;
    overflow-x: hidden;
}

/* -------- Layout Fix -------- */
.page-wrapper {
    width: 100%;
    min-height: 100vh;
}

.sofipage {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* -------- Sidebar -------- */
.sofi-sidebar {
    width: 250px;
    background-color: #000000; /* 🔥 PERUBAHAN: #0d1b3f -> #000000 */
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex-shrink: 0;
    transition: all 0.3s ease;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

/* 🔥 PERBAIKAN: Mobile & Tablet */
@media (max-width: 1024px) {
    .sofi-sidebar {
        position: fixed;
        background-color: #000000; /* 🔥 PERUBAHAN: pastikan konsisten hitam di mobile */
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
    }
}

.logo {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.menu {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.menu-item {
    padding: 12px 25px;
    color: #c7c7d9;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

    .menu-item:hover,
    .menu-item.active {
        background-color: rgba(255, 255, 255, 0.15);
        color: #fff;
    }

    .menu-item .oi {
        margin-right: 10px;
        font-size: 0.9rem;
    }

.text-danger {
    color: #ff8080 !important;
}

/* -------- Main Area Fix -------- */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    transition: all 0.3s ease;
}

/* 🔥 PERBAIKAN PENTING: Main Area Classes */
.main-with-sidebar {
    margin-left: 250px; /* 🔥 Content digeser ketika ada sidebar */
    width: calc(100% - 250px);
}

.main-fullwidth {
    margin-left: 0; /* 🔥 Full width ketika sidebar hidden */
    width: 100%;
}

.top-row {
    background-color: white;
    border-bottom: 1px solid #ddd;
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

    .top-row .text-muted {
        color: #6c757d !important;
    }

/* 🔥 PERBAIKAN: Content Area */
.content-area {
    flex: 1;
    padding: 30px;
    background-color: #f5f7fb;
    width: 100%;
    min-height: calc(100vh - 80px);
    overflow-y: auto;
}

/* -------- Header Fix -------- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    width: 100%;
}

    .header input {
        width: 280px;
        padding: 10px 15px;
        border-radius: 10px;
        border: 1px solid #ddd;
        outline: none;
        font-size: 0.9rem;
    }

    .header .profile {
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .header .profile img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #e9ecef;
        }

/* -------- Cards & Content Fix -------- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    width: 100%;
}

    .card:hover {
        transform: translateY(-3px);
    }

.balance-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #4a6cf7, #6a11cb);
    color: white;
    padding: 25px;
}

    .balance-card h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .balance-card .amount {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .balance-card .trend {
        font-size: 0.9rem;
        opacity: 0.9;
    }

.search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

    .search-card input {
        flex-grow: 1;
        padding: 10px 15px;
        border-radius: 10px;
        border: 1px solid #ddd;
        outline: none;
        font-size: 0.9rem;
    }

.transfer-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

    .transfer-card .oi {
        font-size: 2rem;
        margin-bottom: 10px;
        color: #4a6cf7;
    }

/* -------- Transaction History -------- */
.transaction-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
}

    .transaction-section h3 {
        margin-bottom: 20px;
        color: #333;
        font-weight: 600;
    }

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
}

    .transaction-item:last-child {
        border-bottom: none;
    }

.transaction-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a6cf7;
}

.transaction-details h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.transaction-details p {
    font-size: 0.8rem;
    color: #6c757d;
}

.transaction-amount {
    font-weight: 600;
}

    .transaction-amount.positive {
        color: #28a745;
    }

    .transaction-amount.negative {
        color: #dc3545;
    }

/* Tombol toggle */
.btn-toggle-navbar {
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .btn-toggle-navbar:hover {
        background-color: #f8f9fa;
    }

/* 🔥 PERBAIKAN: Mobile & Tablet */
@media (max-width: 1024px) {
    .sofi-sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
    }

    /* 🔥 PERBAIKAN: Sidebar show di mobile */
    .sofipage:not(.navbar-hidden) .sofi-sidebar {
        transform: translateX(0);
    }

    .main-area {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .content-area {
        padding: 20px 15px;
        min-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .top-row {
        padding: 12px 15px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

        .header input {
            width: 100%;
        }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* 🔥 PERBAIKAN TAMBAHAN: Pastikan content tidak overlap */
@media (min-width: 1025px) {
    .main-with-sidebar {
        margin-left: 250px;
        width: calc(100% - 250px);
    }

    .main-fullwidth {
        margin-left: 0;
        width: 100%;
    }
}


.payment-card {
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

    .payment-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .payment-card.border-primary {
        border: 2px solid #007bff !important;
    }

.modal {
    backdrop-filter: blur(5px);
}

.card-title {
    font-weight: 600;
}



