* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
    color: #0f0e0e;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 30px auto;
}

h1 {
    text-align: center;
    margin-bottom: 5px;
}

.subtitle {
    text-align: center;
    color: #4011ec;
    margin-bottom: 30px;
    font-weight:bold;   
}


/* CARDS */

.cards {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;  
    margin-bottom: 25px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow:
        0 3px 10px rgba(0,0,0,0.08);

    text-align: center;
}

.card h3 {
    margin: 0 0 12px;
}

.card h2 {
    margin: 0;
    font-size: 28px;
}

.collection {
    border-top: 5px solid #28a745;
}

.spent {
    border-top: 5px solid #ff1818;
}

.remaining {
    border-top: 5px solid #007bff;
}


/* BOX */

.box {
    background: white;
    padding: 25px;
    margin-bottom: 25px;

    border-radius: 12px;

    box-shadow:
        0 3px 10px rgba(0,0,0,0.08);
}

.box h2 {
    margin-top: 0;
}


/* FORM */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 18px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

input {
    width: 100%;

    padding: 12px;

    border: 1px solid #ccc;

    border-radius: 6px;

    font-size: 15px;
}

input:focus {
    outline: none;

    border-color: #007bff;
}


/* BUTTON */

.btn {
    margin-top: 20px;

    padding: 12px 25px;

    border: none;

    border-radius: 6px;

    color: white;

    cursor: pointer;

    font-size: 15px;
}

.add-btn {
    background: #21ab1a;
}

.add-btn:hover {
    background: #218838;
}

.spent-btn {
    background: #dc3545;
}

.spent-btn:hover {
    background: #c82333;
}


/* TABLE */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;

    margin-top: 15px;
}

th {
    background: #343a40;

    color: white;

    padding: 13px;

    text-align: left;
}

td {
    padding: 12px;

    border-bottom: 1px solid #ddd;
}

tr:hover {
    background: #f8f9fa;
}

.amount {
    font-weight: bold;
}


/* DELETE */

.delete-btn {
    display: inline-block;

    padding: 7px 12px;

    background: #dc3545;

    color: white;

    text-decoration: none;

    border-radius: 5px;

    font-size: 13px;
}

.delete-btn:hover {
    background: #b02a37;
}


/* MOBILE */

@media (max-width: 768px) {

    .cards {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .container {
        width: 92%;
    }

    h1 {
        font-size: 25px;
    }

}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.excel-btn {
    background: #198754;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.excel-btn:hover {
    background: #146c43;
}
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.excel-btn {
    background: #198754;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.excel-btn:hover {
    background: #146c43;
}
.collection-header {
    display: flex;
    gap: 10px;
    align-items: center;
}

.add-btn {
    background: #6c3fb5;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}

.collection-type {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

