/* Base Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    align-items: center;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 5px 10px;
    margin: 5px;
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    align-content: center;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #218838;
}

.btn.logout {
    background-color: #dc3545;
}

.btn.logout:hover {
    background-color: #c82333;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: #555;
}

input,
select,
button {
    padding: 8px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
}

button {
    background-color: #007bff;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
input[type="date"],
select {
    width: 100%;
    padding: 8px 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

button {
    display: block;
    width: 100%;
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #007bff;
    color: #fff;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Centered Menu or Header */
.menu {
    text-align: center;
    margin-bottom: 20px;
}
.month-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}
.month-row input[type="month"] {
    flex: 1;
}

.dropdown-box {
    position: relative;
    margin-bottom: 15px;
}

.dropdown-toggle {
    background-color: #f2f2f2;
    padding: 10px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.month-checkboxes {
    display: none;
    border: 1px solid #ccc;
    background: #fff;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    width: 100%;
    z-index: 10;
}

.month-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.month-checkbox input {
    margin-right: 5px;
}

.dropdown-box.active .month-checkboxes {
    display: block;
}

.dropdown-container {
    position: relative;
    width: 250px;
    margin-bottom: 1rem;
}

.dropdown-list {
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.dropdown-list label {
    display: block;
    margin-bottom: 5px;
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    background: #f0f0f0;
    margin: 5px 0;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
}
#paymentChart {
    background: #fff;
    padding: 10px;
    border-radius: 10px;
}
/* ===== Extra Small Devices (Phones ≤ 480px) ===== */
@media screen and (max-width: 480px) {
    .container {
        width: 85%;
        padding: 10px;
    }

    h2, h3, h4 {
        font-size: 18px;
    }

    .btn {
        width: 25%;
        font-size: 10px;
        padding: 5px 5px;
        align-content: center;
    }
    
    
    input,
    select,
    button {
        width: 90%;
        font-size: 14px;
    }

    .dropdown-box,
    .dropdown-container {
        width: 100%;
    }

    table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
    }

    th, td {
        padding: 6px;
    }

    .month-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu {
        font-size: 16px;
    }
}

/* ===== Small Devices (Phones 481px – 767px) ===== */
@media screen and (min-width: 481px) and (max-width: 767px) {
    .container {
        width: 85%;
        padding: 10px;
    }

    h2, h3, h4 {
        font-size: 18px;
    }

    .btn {
        width: 25%;
        font-size: 10px;
        padding: 5px 5px;
    }

    input,
    select,
    button {
        width: 100%;
        font-size: 15px;
    }

    table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }

    .month-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dropdown-box,
    .dropdown-container {
        width: 100%;
    }
}

/* ===== Medium Devices (Tablets 768px – 1024px) ===== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .container {
        width: 85%;
        padding: 10px;
    }

    h2, h3, h4 {
        font-size: 18px;
    }

    .btn {
        width: 25%;
        font-size: 10px;
        padding: 5px 5px;
    }

    input,
    select,
    button {
        font-size: 16px;
    }

    table {
        font-size: 15px;
    }

    .month-row {
        flex-direction: row;
    }

    .dropdown-container,
    .dropdown-box {
        width: 100%;
    }
}
