/* ---------- RESET / BASE ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: system-ui, sans-serif;
    line-height: 1.5;
    background: #f5f5f5;
    color: #222;
    padding: 1rem;
}

/* ---------- MAIN LAYOUT ---------- */
.container, main, .card, .box, .content {
    max-width: 800px;          /* tweak to taste */
    margin-inline: auto;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* ---------- TABLES ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
th, td {
    padding: .5rem .75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background: #fafafa;
}

/* ---------- FORMS ---------- */
input, select, textarea, button {
    width: 100%;
    padding: .6rem .75rem;
    margin: .25rem 0 .75rem;
    border: 1px solid #bbb;
    border-radius: 4px;
    font: inherit;
}
button, .btn {
    background: #0069d9;
    color: #fff;
    cursor: pointer;
    border: none;
}
button:hover, .btn:hover { background: #0053b3; }

input[type=radio] {
    border: 0px;
    width: 100%;
    height: 2em;
}

/* ---------- SMALL SCREENS ---------- */
@media (max-width: 600px) {
    body { padding: .5rem; }
    .container, .card { padding: 1rem; }

    /* stack table rows */
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    tr { margin-bottom: 1rem; border: 1px solid #ddd; border-radius: 4px; }
    td {
        padding: .5rem;
        text-align: center;
        position: relative;
        padding-left: 5%;
    }
    td::before {
        content: attr(data-label);
        position: absolute;
        left: .75rem;
        width: 45%;
        white-space: nowrap;
        font-weight: 600;
        text-align: left;
    }

    /* full-width buttons */
    button, .btn { width: 100%; margin-bottom: .5rem; }
}

