/* ===== Global Styles ===== */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0 20px; /* Adds left/right margin */
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

h2, h3 {
    color: #222;
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    text-decoration: underline;
}

/* ===== Container ===== */
.container {
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    padding: 25px 40px; /* Increased left/right padding */
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
}

/* ===== Buttons ===== */
button, input[type=submit] {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

button:hover, input[type=submit]:hover {
    background: #0056b3;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===== Forms ===== */
form input[type=text],
form input[type=password],
form input[type=number] {
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

form input[type=number] {
    width: 100px;
    text-align: center;
}

/* ===== Navigation Buttons ===== */
.navbar {
    margin-bottom: 20px;
}

.navbar button {
    margin-right: 10px;
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th, table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

table th {
    background: #007bff;
    color: white;
}

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

table tr:hover {
    background: #eaf4ff;
}

/* ===== Search Box ===== */
#search, #searchInput {
    padding: 8px;
    width: 250px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
}

/* ===== Totals Section ===== */
.total-section {
    margin: 15px 0;
    font-size: 18px;
    font-weight: bold;
    color: #222;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 10px;
    }

    /* Table wrapper for horizontal scroll */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
    }

    table {
        width: 100%;
        /* Remove display: block and white-space: nowrap */
    }

    /* Stack buttons with spacing */
    ul {
        padding: 0;
    }
    ul li {
        margin-bottom: 14px;
    }
    button, input[type=submit] {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 8px;
    }
}
