* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 20px;
    background: #f5f7fb;
    font-family: Arial, sans-serif;
    color: #222;
}

.container {
    max-width: 1100px;
    margin: auto;
}

h1 {
    margin-bottom: 30px;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-bar h1 {
    margin: 0;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

@media (max-width: 768px) {

    .header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .user-area {
        width: 100%;
        justify-content: space-between;
    }

}

.summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.card h3 {
    margin: 0 0 10px;
}

.card strong {
    font-size: 26px;
}

.incoming strong {
    color: #198754;
}

.outgoing strong {
    color: #dc3545;
}

.balance strong {
    color: #0d6efd;
}

.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    border: 0;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    cursor: pointer;
    font-size: 15px;
}

.btn-incoming {
    background: #198754;
}

.btn-outgoing {
    background: #dc3545;
}

.table-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
}

.badge.incoming {
    background: #d1e7dd;
    color: #0f5132;
}

.badge.outgoing {
    background: #f8d7da;
    color: #842029;
}

.form-container {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.form-container .btn {
    width: 100%;
}

.back {
    display: block;
    margin-top: 20px;
    text-align: center;
    color: #333;
    text-decoration: none;
}

.error {
    background: #f8d7da;
    color: #842029;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {

    .summary {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .actions .btn {
        text-align: center;
    }
}

.filter-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.filter-box form {
    display: flex;
    align-items: end;
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: bold;
}

.filter-group input {
    padding: 11px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.btn-primary {
    background: #0d6efd;
}

.btn-secondary {
    background: #6c757d;
}

.selected-month {
    margin-bottom: 20px;
}

@media (max-width: 768px) {

    .filter-box form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-box .btn {
        text-align: center;
    }

}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 450px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content p {
    color: #555;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.modal-actions .btn {
    border: none;
}

.login-container {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 5px;
}

.login-subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 30px;
}

.login-button {
    width: 100%;
}
