body {
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 700px;
    margin: 40px auto;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

h1,
h2 {
    margin-top: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    box-sizing: border-box;
}

button,
.btn {
    display: inline-block;
    padding: 10px 15px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 10px;
}

button:hover,
.btn:hover {
    opacity: 0.9;
}

.error {
    color: #c00;
}

.warning {
    color: #c60;
}

.list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.list th,
.list td {
    border: 1px solid #ddd;
    padding: 8px;
}

.items {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.items th,
.items td {
    border: 1px solid #eee;
    padding: 6px;
}

.small-btn {
    padding: 4px 8px;
    font-size: 12px;
    background: #999;
}

.total {
    margin-top: 15px;
    font-weight: bold;
}

.footer-link {
    margin-top: 20px;
}

footer {
    margin-top: 40px;
    padding: 20px;
    color: white;
    background: #0f0f0f;
    text-align: center;
}

/* ============================
   MOBILE RESPONSIVE FIXES
   ============================ */
@media (max-width: 800px) {

    body {
        padding: 10px;
    }

    .container {
        width: 100%;
        padding: 10px;
        margin: 0;
    }

    h1,
    h2 {
        font-size: 22px;
        text-align: center;
    }

    /* Make buttons full width */
    button,
    .btn {
        width: 100%;
        margin-bottom: 10px;
        font-size: 16px;
        padding: 12px;
    }

    /* Fix table overflow */
    table.items {
        width: 100%;
        display: block;
        overflow-x: auto;
        border-collapse: collapse;
    }

    /* Stack table rows vertically */
    table.items tr {
        display: block;
        margin-bottom: 15px;
        border-bottom: 1px solid #ddd;
        padding-bottom: 10px;
    }

    table.items th {
        display: none;
        /* Hide headers on mobile */
    }

    table.items td {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }

    /* FORCE ALL INPUTS TO BE FULL-WIDTH BLOCK ELEMENTS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        display: block;
        width: 100%;
        min-width: 260px;
        max-width: 300px;
        /* prevents tiny inputs */
        padding: 12px;
        margin: 12px 0;
        font-size: 16px;
        box-sizing: border-box;
    }

    /* CHECKBOXES SHOULD NOT SHRINK INPUTS */
    input[type="checkbox"] {
        transform: scale(1.3);
        margin-right: 10px;
    }

    /* BUTTONS FULL WIDTH ON MOBILE */
    button,
    .btn {
        display: block !important;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        margin: 12px 0 !important;
        clear: both;
    }

    /* Remove button alignment */
    .small-btn {
        width: 100%;
        padding: 10px;
        margin-top: 5px;
    }

    /* Chart responsive */
    canvas {
        width: 100% !important;
        height: auto !important;
    }

    /* Total text */
    .total {
        font-size: 18px;
        text-align: center;
    }
}