body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f5f6f8;
}

.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    width: 350px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-card h1 {
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    margin-bottom: 25px;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

button {
    margin-top: 20px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.login-card button {
    width: 100%;
    background: #222;
    color: white;
}

#loginMessage {
    color: #c0392b;
}

.dashboard {
    padding: 40px;
}
/* =========================================================
   DASHBOARD
   ========================================================= */

body {
    color: #222;
}

.topbar {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.topbar h1 {
    margin: 0;
}

.topbar p {
    margin: 5px 0 0;
    color: #666;
}

.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px;
}

.month-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
}

.month-header h2 {
    min-width: 180px;
    text-align: center;
}

.month-header button {
    margin: 0;
    width: 40px;
    height: 40px;
}


/* SUMMARY */

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

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.summary-card span {
    display: block;
    color: #666;
    margin-bottom: 10px;
}

.summary-card strong {
    font-size: 24px;
}


/* PANELS */

.panel {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

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

.panel-header h2 {
    margin: 0;
}

.panel-header button {
    margin: 0;
    background: #222;
    color: white;
}


/* CATEGORY */

.category-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}


/* EXPENSE */

.expense-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.expense-row small {
    display: block;
    color: #777;
    margin-top: 5px;
}

.empty-state {
    color: #777;
}


/* MOBILE */

@media (max-width: 700px) {

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

    .dashboard {
        padding: 20px;
    }

    .topbar {
        padding: 15px 20px;
    }

    .topbar h1 {
        font-size: 20px;
    }
}
/* =========================================================
   MODAL
   ========================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
    z-index: 1000;
}

.modal-box {
    background: white;
    border-radius: 12px;
    max-width: 650px;
    width: 100%;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 22px;
}

.modal-close {
    background: transparent;
    color: #666;
    font-size: 20px;
    padding: 5px 10px;
    margin: 0;
    cursor: pointer;
}

.modal-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
}

.modal-meta strong {
    color: #666;
    font-weight: normal;
}

.modal-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.modal-items-table th {
    text-align: left;
    padding: 8px 6px;
    border-bottom: 2px solid #eee;
    color: #666;
    font-weight: normal;
    font-size: 13px;
}

.modal-items-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-items-table tbody tr:hover {
    background: #fafafa;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.danger-button {
    background: #c0392b;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    margin: 0;
}

.danger-button:hover {
    background: #a93226;
}

.expense-row {
    cursor: pointer;
}

.expense-row:hover {
    background: #fafafa;
}