:root {
    --cb-radius: 12px;
    --cb-space-1: 0.5rem;
    --cb-space-2: 0.75rem;
    --cb-space-3: 1rem;
}

html, body {
    -webkit-text-size-adjust: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* Main page spacing */
main.container {
    padding-left: var(--cb-space-2);
    padding-right: var(--cb-space-2);
}

/* Forms */
label {
    display: block;
}

.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
    border: 2px solid #ccc;
    padding: 20px;
}

/* Menu cards */
.menu-item {
    display: inline-block;
    width: 250px;
    margin: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    color: #111;
    border-radius: 10px;
    overflow: hidden;
}

.menu-item-background {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.menu-item span {
    display: block;
    line-height: 20px;
}

/* Legacy helpers */
.campo-titulo {
    text-align: left;
    font-weight: normal;
}

.campo-valor {
    text-align: right;
    font-weight: bold;
}

.tabla-reparacion {
    margin: 0 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    text-align: center;
}

.contador {
    font-size: 2em;
    color: #ff0000;
    font-weight: bold;
}

/* Buttons */
.btn:not(.btn-close) {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:not(.btn-link):not(.btn-close) {
    border: 0;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.btn:not(.btn-link):not(.btn-close):not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16);
}

.btn:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.28);
    outline-offset: 1px;
}

.btn-primary {
    background-image: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-success {
    background-image: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
}

.btn-secondary {
    background-image: linear-gradient(180deg, #64748b 0%, #475569 100%);
}

.btn-danger {
    background-image: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.btn-custom {
    width: 100%;
    font-size: 1rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    line-height: 1.4;
}

.btn-home {
    width: 100%;
    font-size: 1.05rem;
    padding: 0.95rem 0.8rem;
    line-height: 1.25;
}

/* Tables */
.table-compact td,
.table-compact th {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-left: 6px;
    padding-right: 6px;
    vertical-align: middle;
    font-size: 0.85rem;
}

.table-compact button {
    padding: 2px 4px;
}

.table th,
.table td {
    vertical-align: middle;
}

/* Mobile first */
@media (max-width: 576px) {
    main.container {
        padding-left: var(--cb-space-1);
        padding-right: var(--cb-space-1);
        margin-top: 0.75rem !important;
    }

    header.container-fluid {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .btn {
        min-height: 48px;
        font-size: 1rem;
        padding: 0.65rem 0.85rem;
    }

    .btn-custom {
        font-size: 0.98rem;
    }

    .btn-home {
        min-height: 56px;
        font-size: 1.05rem;
        padding: 0.9rem 0.75rem;
    }

    .card {
        border-radius: var(--cb-radius) !important;
    }

    .tabla-reparacion {
        margin-left: 8px;
        margin-right: 8px;
    }

    .table {
        font-size: 0.88rem;
    }

    .table td,
    .table th {
        padding: 0.4rem 0.45rem;
    }
}
