/* Paleta consistente con el sitio público (index.html) */
:root {
    --oro-antiguo: #C3B091;
    --oro-oscuro: #9E8062;
    --sombra: #7D6348;
    --blanco-alabastro: #FCFAF8;
    --blanco-perla: #F5EFE6;
    --gris-piedra: #9E958C;
    --gris-oscuro: #5C5248;
    --negro-suave: #4A3C31;
    --verde-ok: #27ae60;
    --rojo-error: #e74c3c;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }

::selection {
    background: var(--oro-antiguo);
    color: var(--negro-suave);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.15rem;
    background: var(--blanco-perla);
    color: var(--negro-suave);
    line-height: 1.5;
}

a {
    color: var(--oro-oscuro);
    text-decoration-color: rgba(158, 128, 98, 0.4);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--sombra);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.opcion-radio:focus-within {
    outline: 2px solid var(--oro-oscuro);
    outline-offset: 2px;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--sombra);
    line-height: 1.25;
}

h3, h4 {
    margin: 1.75rem 0 0.75rem;
}

h3:first-child, h4:first-child {
    margin-top: 0;
}

.staff-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--blanco-perla);
    font-family: var(--font-display);
    font-size: 0.95rem;
}

.staff-nav a {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    color: var(--negro-suave);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.staff-nav a:hover {
    background: rgba(158, 128, 98, 0.12);
    color: var(--sombra);
}

.staff-nav-push {
    margin-left: auto;
}

@media (max-width: 480px) {
    .staff-nav {
        gap: 0.25rem;
    }

    .staff-nav-push {
        margin-left: 0;
    }

    .staff-nav a {
        padding: 0.35rem 0.6rem;
        font-size: 0.9rem;
    }
}

.app-shell {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-header strong {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.app-header h1 {
    font-size: 1.6rem;
    margin: 0.5rem 0 0;
}

.app-card {
    position: relative;
    background: var(--blanco-alabastro);
    border: 1px solid var(--oro-antiguo);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(74, 60, 49, 0.08);
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--oro-antiguo), var(--oro-oscuro));
}

@media (max-width: 480px) {
    .app-shell {
        padding: 1.25rem 0.75rem 3rem;
    }

    .app-card {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }
}

.progreso {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.progreso span {
    width: 28px;
    height: 6px;
    border-radius: 4px;
    background: var(--gris-piedra);
    opacity: 0.4;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.progreso span.activo {
    background: var(--oro-oscuro);
    opacity: 1;
}

label {
    display: block;
    font-weight: 600;
    margin: 1rem 0 0.35rem;
    color: var(--negro-suave);
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--gris-piedra);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1.05rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--oro-oscuro);
    box-shadow: 0 0 0 3px rgba(158, 128, 98, 0.15);
    outline: none;
}

input.invalido {
    border-color: var(--rojo-error);
}

textarea {
    resize: vertical;
    min-height: 6rem;
}

.opcion-radio {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid var(--gris-piedra);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.opcion-radio:hover {
    border-color: var(--oro-oscuro);
}

.opcion-radio:has(input:checked) {
    border-color: var(--oro-oscuro);
    background: rgba(158, 128, 98, 0.08);
}

.opcion-radio input { margin-top: 0.3rem; }

.opcion-radio strong { display: block; }
.opcion-radio small { color: var(--gris-oscuro); }

.consentimiento {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid var(--blanco-perla);
    padding: 0.85rem 0;
    transition: background 0.2s ease;
}

.consentimiento:hover {
    background: rgba(158, 128, 98, 0.05);
}

.btn {
    display: inline-block;
    background: var(--oro-oscuro);
    color: #fff;
    border: none;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    cursor: pointer;
    margin-top: 1.5rem;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: var(--sombra);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 60, 49, 0.18);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: var(--gris-piedra);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secundario {
    background: transparent;
    color: var(--sombra);
    border: 1px solid var(--oro-antiguo);
}

.btn-secundario:hover {
    background: rgba(158, 128, 98, 0.08);
    color: var(--sombra);
}

.ayuda {
    color: var(--gris-oscuro);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

.alerta {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

.alerta-error {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid var(--rojo-error);
    color: #a93226;
}

.alerta-exito {
    background: rgba(39, 174, 96, 0.12);
    border: 1px solid var(--verde-ok);
    color: #1e8449;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 1.5rem;
    font-size: 1.05rem;
}

table th, table td {
    text-align: left;
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--blanco-perla);
}

table th {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--sombra);
    background: var(--blanco-perla);
    white-space: nowrap;
}

table th:first-child,
table td:first-child {
    padding-left: 0.9rem;
}

table tbody tr {
    transition: background 0.15s ease;
}

table tbody tr:hover {
    background: rgba(158, 128, 98, 0.06);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
    background: var(--blanco-perla);
    color: var(--gris-oscuro);
    white-space: nowrap;
}

.badge-exito {
    background: rgba(39, 174, 96, 0.14);
    color: #1e8449;
}

.badge-error {
    background: rgba(231, 76, 60, 0.14);
    color: #a93226;
}

.badge-oro {
    background: rgba(158, 128, 98, 0.14);
    color: var(--oro-oscuro);
}

.qr-box {
    text-align: center;
    padding: 1.5rem;
}

.qr-box img {
    max-width: 300px;
    border: 1px solid var(--oro-antiguo);
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 8px 20px rgba(74, 60, 49, 0.1);
}

@media (max-width: 480px) {
    table {
        font-size: 0.95rem;
    }

    table th, table td {
        padding: 0.55rem 0.4rem;
    }
}
