* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.history-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border-radius: 8px;
    background: var(--card);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

:root {
    --bg: #0b0f19;
    --card: #121827;
    --card-light: #182133;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f5f7fb;
    --muted: #8d98aa;
    --accent: #6c7cff;
    --accent-light: #8b97ff;
    --success: #36d399;
    --danger: #ff6b81;
    --warning: #f7c65c;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}
.payment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border-radius: 8px;
    background: rgba(54, 211, 153, 0.1);
    color: var(--success);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

/* =========================
   APP LAYOUT
========================= */

.app {
    min-height: 100vh;
    display: flex;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 250px;
    min-height: 100vh;
    background: #0f1522;
    border-right: 1px solid var(--border);
    padding: 25px 18px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        var(--accent),
        #9c6cff
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
}

.logo-text span {
    color: var(--accent-light);
}

.nav-title {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 12px 12px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border-radius: 11px;
    color: var(--muted);
    transition: 0.2s ease;
}

.nav a:hover,
.nav a.active {
    background: rgba(108, 124, 255, 0.12);
    color: var(--text);
}

.nav-icon {
    width: 22px;
    text-align: center;
}

.sidebar-bottom {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 25px;
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--card-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-mini-info {
    min-width: 0;
}

.user-mini-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-mini-email {
    color: var(--muted);
    font-size: 11px;
    margin-top: 3px;
}

/* =========================
   MAIN
========================= */

.main {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    padding: 30px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
}

.greeting h1 {
    font-size: 28px;
    margin-bottom: 7px;
}

.greeting p {
    color: var(--muted);
    font-size: 14px;
}

.mobile-menu {
    display: none;
}

/* =========================
   BALANCE CARD
========================= */

.balance-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: 20px;
    background: linear-gradient(
        135deg,
        #1a2450,
        #151c34 60%,
        #241a43
    );
    border: 1px solid rgba(139, 151, 255, 0.18);
    margin-bottom: 20px;
}

.balance-card::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(108, 124, 255, 0.12);
    right: -80px;
    top: -100px;
}

.balance-label {
    color: #aeb8d1;
    font-size: 13px;
    margin-bottom: 10px;
}

.balance-amount {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1px;
}

.balance-note {
    margin-top: 10px;
    color: #aeb8d1;
    font-size: 12px;
}

/* =========================
   STAT CARDS
========================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-title {
    color: var(--muted);
    font-size: 13px;
}

.stat-icon {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-light);
}

.stat-value {
    font-size: 23px;
    font-weight: 700;
}

.stat-description {
    color: var(--muted);
    font-size: 11px;
    margin-top: 6px;
}

/* =========================
   CONTENT GRID
========================= */

.content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 22px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 16px;
}

.panel-link {
    color: var(--accent-light);
    font-size: 12px;
}

/* =========================
   TRANSACTIONS
========================= */

.empty-state {
    padding: 35px 15px;
    text-align: center;
}

.empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: var(--card-light);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.empty-state h3 {
    font-size: 14px;
    margin-bottom: 7px;
}

.empty-state p {
    color: var(--muted);
    font-size: 12px;
}

/* =========================
   QUICK ACTIONS
========================= */

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.action {
    border: 1px solid var(--border);
    background: var(--card-light);
    border-radius: 12px;
    padding: 15px;
    transition: 0.2s ease;
}

.action:hover {
    border-color: rgba(108, 124, 255, 0.4);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 20px;
    margin-bottom: 9px;
}

.action-title {
    font-size: 13px;
    font-weight: 600;
}

.action-description {
    color: var(--muted);
    font-size: 10px;
    margin-top: 4px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .mobile-menu {
        display: flex;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: var(--card);
        border: 1px solid var(--border);
        align-items: center;
        justify-content: center;
        color: var(--text);
        cursor: pointer;
        font-size: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .greeting h1 {
        font-size: 22px;
    }

    .balance-amount {
        font-size: 32px;
    }
}

@media (max-width: 500px) {

    .main {
        padding: 15px;
    }

    .topbar {
        margin-bottom: 25px;
    }

    .balance-card {
        padding: 22px;
    }

    .balance-amount {
        font-size: 29px;
    }

    .actions {
        grid-template-columns: 1fr;
    }
}
/* PocketBudget responsive layout standards (mobile / tablet / desktop). */
html { min-width: 320px; }
body { overflow-x: hidden; }
.main { min-width: 0; }

/* Tablet: full-width content with a drawer sidebar. */
@media (min-width: 768px) and (max-width: 1023px) {
    .main {
        margin-left: 0;
        width: 100%;
        padding: 92px 24px 28px;
    }
}

/* Mobile: reserve a dedicated top strip for the global menu trigger. */
@media (max-width: 767px) {
    .main {
        margin-left: 0;
        width: 100%;
        padding: 84px 16px 24px;
    }
    .sidebar {
        width: min(280px, 86vw);
        max-width: 280px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .stats-grid,
    .content-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .balance-card { max-width: 100%; }
    img, canvas, svg { max-width: 100%; }
    table { max-width: 100%; }
}

@media (max-width: 359px) {
    .main { padding-left: 12px; padding-right: 12px; }
}
