* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --sidebar-bg: #02243f;
    --app-bg: #d2d7dd;
    --card-bg: #f8fafc;
    --sidebar-width: 320px;
    --text-main: #3a506a;
    --text-soft: #75879c;
    --green: #22be94;
    --red: #f06c68;
    --purple: #7b66c7;
    --line: #c7cdd4;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--app-bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    transition: grid-template-columns 0.25s ease;
}

.sidebar {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    transition: transform 0.25s ease, width 0.25s ease, padding 0.25s ease;
}

.app.sidebar-hidden {
    grid-template-columns: 76px 1fr;
}

.app.sidebar-hidden .sidebar {
    width: 76px;
    padding: 24px 10px;
    overflow: hidden;
    transform: none;
}

.app.sidebar-hidden .logo {
    align-self: center;
    margin-bottom: 22px;
}

.app.sidebar-hidden .logo {
    font-size: 0;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app.sidebar-hidden .menu {
    width: 100%;
    align-items: center;
    gap: 8px;
}

.menu-item {
    text-decoration: none;
    color: #8397ad;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 2px;
    transition: color 0.2s ease;
}

.menu-item,
.logout-btn {
    width: 100%;
    line-height: 1;
}

.menu-item:hover,
.menu-item.active {
    color: #ffffff;
}

.app.sidebar-hidden .menu-item,
.app.sidebar-hidden .logout-btn {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.app.sidebar-hidden .menu-item span,
.app.sidebar-hidden .logout-btn span {
    display: none;
}

.menu-item i,
.logout-btn i {
    width: 18px;
    text-align: center;
}

.logout-btn {
    margin-top: auto;
    border: none;
    background: transparent;
    color: #ff5f56;
    font-size: 16px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px 2px;
}

.app.sidebar-hidden .logout-btn {
    width: 100%;
    min-width: 0;
}

.topbar {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #eef4fb 100%);
    border: 1px solid #d5dce5;
    border-radius: 12px;
    padding: 0 12px;
    margin: 12px 0 20px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.menu-toggle {
    border: none;
    background: transparent;
    color: #607286;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    line-height: 0;
}

.menu-toggle .noti-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    display: block;
}

.search-wrap {
    position: relative;
}

.search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca8b6;
    font-size: 12px;
}

.search-wrap input {
    width: 200px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #dfe4e8;
    background: #eceff3;
    padding: 0 12px 0 30px;
    color: #6b7f94;
    font-size: 13px;
    outline: none;
}

.main-content {
    padding: 18px 18px 28px;
    min-width: 0;
}

.wallet-page {
    flex: 1;
    width: 100%;
}

.wallet-page h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 14px;
}

.wallet-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid #dbe2ea;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.wallet-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.wallet-card h2 {
    font-size: 28px;
    font-weight: 600;
}

.wallet-actions {
    display: flex;
    gap: 10px;
}

.wallet-actions button,
.wallet-actions a {
    border: none;
    color: #fff;
    border-radius: 8px;
    height: 38px;
    padding: 0 20px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.deposit-btn {
    background: var(--green);
}

.withdraw-btn {
    background: var(--red);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.wallet-card p {
    color: var(--text-soft);
    font-size: 14px;
}

.history-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #f4f6f8;
    border: 1px solid var(--line);
}

.history-table th,
.history-table td {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
    color: #000;
    font-size: 13px;
}

.history-table th {
    font-weight: 700;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table td:last-child,
.history-table th:last-child {
    border-right: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #fff;
    background: var(--purple);
    font-weight: 700;
    font-size: 12px;
}

.status-badge.pending {
    background: var(--purple);
}

.status-badge.approved {
    background: var(--green);
}

.status-badge.rejected {
    background: var(--red);
}

.wallet-footer {
    margin-top: auto;
    text-align: center;
    color: #5f7186;
    font-size: 13px;
    padding: 18px 0 12px;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1500px) {
    .logo {
        font-size: 36px;
    }

    .menu-item {
        font-size: 15px;
    }

    .logout-btn {
        font-size: 15px;
    }

    .search-wrap input {
        font-size: 14px;
        width: 180px;
        height: 34px;
    }

    .wallet-page h1 {
        font-size: 28px;
    }

    .wallet-card h2 {
        font-size: 24px;
    }

    .wallet-actions button,
    .wallet-actions a {
        font-size: 14px;
        height: 36px;
    }

    .status-pill {
        font-size: 12px;
    }

    .wallet-card p {
        font-size: 13px;
    }

    .history-title {
        font-size: 20px;
    }

    .history-table th,
    .history-table td {
        font-size: 13px;
    }

    .status-badge {
        font-size: 11px;
    }

    .wallet-footer {
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    .app {
        grid-template-columns: 1fr;
    }

    .app.sidebar-hidden {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 280px;
        transform: translateX(-100%);
        z-index: 1000;
    }

    .app.sidebar-hidden .sidebar {
        width: 280px;
        padding: 24px 16px;
        overflow: visible;
        transform: translateX(-100%);
    }

    .app.sidebar-hidden .logo {
        align-self: flex-start;
        margin-bottom: 30px;
        font-size: 42px;
    }

    .app.sidebar-hidden .menu {
        width: auto;
        align-items: stretch;
        gap: 6px;
    }

    .app.sidebar-hidden .menu-item,
    .app.sidebar-hidden .logout-btn {
        justify-content: flex-start;
        padding-left: 2px;
        padding-right: 2px;
    }

    .app.sidebar-hidden .menu-item span,
    .app.sidebar-hidden .logout-btn span {
        display: inline;
    }

    .app.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 900;
        display: none;
    }

    .app.sidebar-open .sidebar-overlay {
        display: block;
    }

    .main-content {
        padding: 12px 14px 20px;
    }

    .wallet-page h1 {
        font-size: 24px;
    }

    .wallet-card-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .wallet-page h1 {
        font-size: 22px;
    }

    .wallet-card {
        padding: 14px;
    }

    .wallet-card h2 {
        font-size: 20px;
    }

    .wallet-actions {
        width: 100%;
    }

    .wallet-actions button,
    .wallet-actions a {
        width: 100%;
    }

    .wallet-actions {
        flex-direction: column;
    }

    .status-pill {
        font-size: 11px;
        padding: 4px 10px;
    }

    .wallet-card p {
        font-size: 14px;
    }

    .history-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .wallet-footer {
        font-size: 14px;
    }
}