/* Base Light Mode (default) */
body {
    font-family: sans-serif;
    padding: 14px;
    line-height: 1.4;
    background: #fafafa;
    color: #1a1a1a;
}

.title {
    color: green;
    margin-bottom: 4px;
}

.hint {
    font-size: 14px;
    color: #555;
    margin-bottom: 18px;
}

.form-grid h3 {
    margin: 10px 0 6px;
}

/* FORCE exactly 2 inputs per row for tire measurements */
.input-pair {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Exactly two columns */
    gap: 12px;
    width: 100%;
}

/* Keep them readable, but nice and narrow */
.input-field {
    width: 100%;
    max-width: 120px; /* holds 5 digits comfortably */
    min-width: 100px;
    box-sizing: border-box;
}

/* Inputs always stay short */
input {
    width: 100%;
    padding: 6px 8px;
    font-size: 16px;
    text-align: center; /* improves readability for numeric input */
}

input:focus {
    outline: 2px solid #2d89ef;
}

.err {
    color: #d11;
    font-size: 12px;
}

.btn {
    margin-top: 20px;
    padding: 12px;
    width: 100%;
    font-size: 18px;
    cursor: pointer;
    background: #2d89ef;
    color: white;
    border: none;
    border-radius: 6px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 14px;
}

table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 6px;
    border-bottom: 1px solid #ccc;
    text-align: center;
}

.red {
    color: #e44;
    font-weight: bold;
}


/* ✅ Auto Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e0e0e0;
    }

    input {
        background: #1e1e1e;
        border: 1px solid #444;
        color: #eee;
    }

    input:focus {
        outline: 2px solid #5fa8ff;
    }

    .btn {
        background: #3478e6;
        color: #f0f0f0;
    }

    .hint {
        color: #aaa;
    }

    table {
        background: #1f1f1f;
        color: #e0e0e0;
    }

    th, td {
        border-bottom: 1px solid #333;
    }

    .red {
        color: #ff6666;
    }
}


/* ✅ Mobile stacking */

@media(max-width: 600px) {
    table {
        font-size: 14px;
    }

    .btn {
        font-size: 16px;
    }
}
