/* ---------- GENERAL ---------- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0.5rem;
    background-color: #f8f9fa;
    color: #333;
}

header h1 {
    text-align: center;
    color: #007bff;
    margin-bottom: 1rem;
}

main {
    max-width: 900px;
    margin: 0 auto;
}

/* ---------- FORM SECTIONS ---------- */
.form-section {
    margin-bottom: 1rem;
}

form {
    background: #fff;
    padding: 0.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

form input, form select, form button {
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form button {
    background-color: #007bff;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

form button:hover {
    background-color: #0056b3;
}

/* ---------- HIDDEN ---------- */
.hidden {
    display: none;
}

/* ---------- TOGGLE BUTTONS ---------- */
button.arrow-btn {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

/* ---------- TOTALS ---------- */
.totals {
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.totals div {
    margin: 0.2rem 0;
}

.totals .balance {
    font-weight: bold;
    color: #007bff;
}

/* ---------- BALANCE TRIP BUTTON ---------- */
form button[name="balance_trip"] {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: bold;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
}

/* ---------- TABLE ---------- */
.table-section {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

thead {
    background-color: #007bff;
    color: #fff;
}

th, td {
    padding: 0.4rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

input[type="text"], input[type="number"], input[type="date"], select {
    width: 100%;
    box-sizing: border-box;
}

/* ---------- DELETE BUTTON ---------- */
.deleteRowBtn {
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
}

.deleteRowBtn:hover {
    background: #a71d2a;
}

/* ---------- MOBILE RESPONSIVE ---------- */
@media (max-width: 600px) {
    form .form-row {
        flex-direction: column;
    }

    th, td {
        font-size: 0.9rem;
    }

    .totals div {
        font-size: 0.95rem;
    }

    form button, .deleteRowBtn {
        font-size: 0.9rem;
        padding: 0.3rem 0.5rem;
    }
}

