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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6f8;
    color: #171717;
}


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

.sidebar {
    position: fixed;
    left: 0;
    top: 0;

    width: 245px;
    height: 100vh;

    background: #ffffff;
    border-right: 1px solid #e8e8e8;

    padding: 28px 20px;

    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.logo-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #171717;
    color: white;

    font-size: 18px;
    font-weight: 700;
}

.logo h2 {
    font-size: 17px;
    margin-bottom: 3px;
}

.logo span {
    color: #8b8b8b;
    font-size: 11px;
}


/* =========================
   MENU
========================= */

.menu {
    margin-top: 45px;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-item {
    text-decoration: none;
    color: #777;

    padding: 12px 13px;

    border-radius: 9px;

    display: flex;
    align-items: center;
    gap: 12px;

    font-size: 14px;

    transition: 0.2s ease;
}

.menu-item span {
    width: 20px;
    font-size: 17px;
    text-align: center;
}

.menu-item:hover {
    background: #f4f4f4;
    color: #111;
}

.menu-item.active {
    background: #171717;
    color: #fff;
}


/* SIDEBAR BOTTOM */

.sidebar-bottom {
    margin-top: auto;

    padding: 16px;

    background: #f5f5f5;
    border-radius: 10px;
}

.sidebar-bottom p {
    color: #777;
    font-size: 12px;
    line-height: 1.6;
}


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

.main-content {
    margin-left: 245px;
    padding: 35px 45px;
    max-width: 1450px;
}


/* =========================
   TOPBAR
========================= */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 28px;
}

.small-title {
    color: #999;
    font-size: 12px;
    margin-bottom: 6px;
}

.topbar h1 {
    font-size: 28px;
    letter-spacing: -0.5px;
}

.add-btn {
    border: none;

    background: #171717;
    color: white;

    padding: 12px 18px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 8px;

    transition: 0.2s ease;
}

.add-btn span {
    font-size: 20px;
    font-weight: 400;
}

.add-btn:hover {
    transform: translateY(-2px);
    background: #303030;
}


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

.balance-card {
    min-height: 190px;

    background: #171717;
    color: white;

    border-radius: 15px;

    padding: 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;

    overflow: hidden;
    position: relative;
}

.balance-card::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    border: 1px solid #444;

    border-radius: 50%;

    right: 70px;
    top: -90px;
}

.balance-card p {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 8px;
}

.balance-card h2 {
    font-size: 34px;
    letter-spacing: -1px;
}

.balance-info {
    display: block;

    margin-top: 10px;

    color: #777;
    font-size: 11px;
}


/* BALANCE ACTIONS */

.balance-actions {
    display: flex;
    align-items: center;
    gap: 18px;

    z-index: 2;
}

.edit-balance-btn {
    border: 1px solid #444;

    background: transparent;

    color: #ccc;

    padding: 9px 13px;

    border-radius: 7px;

    font-size: 11px;

    cursor: pointer;

    transition: 0.2s;
}

.edit-balance-btn:hover {
    background: #2b2b2b;
    color: white;
}

.balance-icon {
    width: 65px;
    height: 65px;

    border: 1px solid #3a3a3a;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
}


/* =========================
   SUMMARY
========================= */

.summary-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;

    margin-bottom: 18px;
}

.summary-card {
    background: white;

    border: 1px solid #e9e9e9;

    border-radius: 13px;

    padding: 22px;

    transition: 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-3px);

    border-color: #d5d5d5;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-label {
    color: #777;
    font-size: 13px;
}

.summary-icon {
    width: 30px;
    height: 30px;

    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
}

.summary-icon.income {
    background: #eaf7ef;
    color: #23834c;
}

.summary-icon.expense {
    background: #fcecec;
    color: #c94040;
}

.summary-icon.transaction {
    background: #eeeeee;
    color: #555;
}

.summary-card h3 {
    margin-top: 18px;
    font-size: 23px;
}

.summary-card p {
    margin-top: 6px;

    color: #999;
    font-size: 11px;
}


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

.content-grid {
    display: grid;

    grid-template-columns: 1.7fr 1fr;

    gap: 18px;
}

.transactions-card,
.info-card {
    background: white;

    border: 1px solid #e9e9e9;

    border-radius: 13px;

    padding: 23px;
}


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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 22px;
}

.section-header h2,
.info-header h2 {
    font-size: 17px;
}

.section-header p {
    color: #999;
    font-size: 11px;
    margin-top: 5px;
}

.section-header select {
    border: 1px solid #ddd;

    background: white;

    padding: 8px 10px;

    border-radius: 7px;

    font-size: 12px;

    outline: none;
}

.transaction-list {
    display: flex;
    flex-direction: column;
}

.transaction {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 0;

    border-bottom: 1px solid #eeeeee;
}

.transaction:last-child {
    border-bottom: none;
}

.transaction-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.transaction-icon {
    width: 38px;
    height: 38px;

    border-radius: 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
}

.transaction-icon.income {
    background: #eaf7ef;
    color: #27844e;
}

.transaction-icon.expense {
    background: #fcecec;
    color: #c94343;
}

.transaction-name {
    font-size: 13px;
    font-weight: 600;
}

.transaction-category {
    margin-top: 4px;

    color: #999;
    font-size: 10px;
}

.transaction-right {
    text-align: right;
}

.transaction-amount {
    font-size: 13px;
    font-weight: 600;
}

.transaction-amount.income {
    color: #25824b;
}

.transaction-amount.expense {
    color: #c94343;
}

.transaction-date {
    margin-top: 4px;

    color: #aaa;
    font-size: 10px;
}

.delete-btn {
    margin-left: 10px;

    border: none;

    background: transparent;

    color: #aaa;

    cursor: pointer;

    font-size: 15px;

    transition: 0.2s;
}

.delete-btn:hover {
    color: #d33;
}


/* =========================
   EMPTY STATE
========================= */

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 12px;
}


/* =========================
   INFO
========================= */

.info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 30px;
}

.info-header span {
    font-size: 10px;

    color: #999;

    background: #f3f3f3;

    padding: 6px 9px;

    border-radius: 20px;
}

.progress-item {
    margin-bottom: 24px;
}

.progress-text {
    display: flex;
    justify-content: space-between;

    margin-bottom: 8px;

    font-size: 12px;
}

.progress-text span {
    color: #777;
}

.progress-text strong {
    font-size: 11px;
}

.progress-bar {
    height: 6px;

    background: #eeeeee;

    border-radius: 10px;

    overflow: hidden;
}

.progress-bar div {
    width: 0%;

    height: 100%;

    background: #171717;

    border-radius: 10px;

    transition: width 0.4s ease;
}


/* =========================
   TIPS
========================= */

.tips {
    display: flex;

    gap: 10px;

    margin-top: 35px;

    padding: 14px;

    background: #f7f7f7;

    border-radius: 9px;
}

.tips > span {
    font-size: 17px;
}

.tips strong {
    font-size: 12px;
}

.tips p {
    color: #888;

    font-size: 10px;

    line-height: 1.5;

    margin-top: 4px;
}


/* =========================
   MODAL
========================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.4);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 100;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 500px;

    background: white;

    border-radius: 14px;

    padding: 25px;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);

    animation: modalIn 0.2s ease;
}

@keyframes modalIn {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

.modal-header {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 20px;
}

.close-btn {
    width: 30px;
    height: 30px;

    border: none;

    background: #f3f3f3;

    border-radius: 7px;

    font-size: 20px;

    cursor: pointer;

    color: #555;
}


/* =========================
   FORM
========================= */

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 12px;

    color: #555;

    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid #ddd;

    border-radius: 8px;

    background: white;

    font-size: 13px;

    outline: none;

    transition: 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #888;

    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;
}

.save-btn {
    width: 100%;

    margin-top: 8px;

    border: none;

    background: #171717;

    color: white;

    padding: 12px;

    border-radius: 8px;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

.save-btn:hover {
    background: #333;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        padding: 30px;
    }

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

}


@media (max-width: 750px) {

    .sidebar {
        position: static;

        width: 100%;
        height: auto;

        padding: 15px 20px;
    }

    .sidebar-bottom {
        display: none;
    }

    .menu {
        margin-top: 20px;

        flex-direction: row;

        overflow-x: auto;
    }

    .menu-item {
        white-space: nowrap;
    }

    .main-content {
        margin-left: 0;

        padding: 25px 18px;
    }

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

    .topbar {
        align-items: flex-start;

        gap: 15px;

        flex-direction: column;
    }

    .balance-card {
        min-height: 160px;
    }

    .balance-actions {
        gap: 10px;
    }

}


@media (max-width: 500px) {

    .topbar h1 {
        font-size: 24px;
    }

    .add-btn {
        width: 100%;
        justify-content: center;
    }

    .balance-card {
        padding: 23px;
    }

    .balance-card h2 {
        font-size: 28px;
    }

    .balance-icon {
        display: none;
    }

    .balance-actions {
        flex-direction: column;
        align-items: flex-end;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

}