﻿/* ── Reset y base ────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #1a1f2e;
    font-family: 'Segoe UI', sans-serif;
    color: #ffffff;
    min-height: 100vh;
    padding: 30px 15px;
}

/* ── Contenedor principal ────────────────────────────────────── */
.registro-wrapper {
    max-width: 480px;
    margin: 0 auto;
}

/* ── Logo ────────────────────────────────────────────────────── */
.logo-registro {
    width: 80px;
}

/* ── Títulos ─────────────────────────────────────────────────── */
.titulo-registro {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.subtitulo-registro {
    color: #aab0c0;
    font-size: 0.95rem;
    margin-top: 6px;
}

/* ── Stepper ─────────────────────────────────────────────────── */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #2d3349;
    border: 2px solid #444c66;
    color: #aab0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.step.active .step-circle {
    background-color: #d4a843;
    border-color: #d4a843;
    color: #1a1f2e;
}

.step-label {
    font-size: 0.7rem;
    color: #aab0c0;
    text-align: center;
    line-height: 1.2;
}

.step.active .step-label {
    color: #d4a843;
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background-color: #444c66;
    margin: 0 8px;
    margin-bottom: 24px;
    min-width: 40px;
}

/* ── Card del formulario ─────────────────────────────────────── */
.registro-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    color: #1a1f2e;
}

/* ── Beneficios ──────────────────────────────────────────────── */
.beneficios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.82rem;
    color: #333;
}

.check-icon {
    color: #2ecc71;
    font-style: normal;
    margin-right: 4px;
}

/* ── Paso título ─────────────────────────────────────────────── */
.paso-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1f2e;
    margin-bottom: 6px;
}

.paso-subtitulo {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
}

/* ── Campos ──────────────────────────────────────────────────── */
.campo-grupo {
    margin-bottom: 14px;
}

.campo-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
    display: block;
}

.campo-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dde1ea;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1a1f2e;
    background-color: #f8f9fc;
    outline: none;
    transition: border-color 0.2s;
}

    .campo-input:focus {
        border-color: #d4a843;
        background-color: #fff;
    }

.campo-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.campo-error {
    color: #e74c3c;
    font-size: 0.78rem;
    margin-top: 3px;
    display: block;
}

/* ── Fecha ───────────────────────────────────────────────────── */
.fecha-grupo {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr;
    gap: 8px;
}

/* ── Celular ─────────────────────────────────────────────────── */
.celular-grupo {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
}

.lada-select {
    padding-right: 28px;
}

/* ── Botón continuar ─────────────────────────────────────────── */
.btn-continuar {
    width: 100%;
    padding: 14px;
    background-color: #d4a843;
    color: #1a1f2e;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s;
    letter-spacing: 0.5px;
}

    .btn-continuar:hover {
        background-color: #c49a35;
    }

    .btn-continuar:disabled {
        background-color: #e0c882;
        cursor: not-allowed;
    }

/* ── Botón secundario ────────────────────────────────────────── */
.btn-secundario {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    color: #666;
    border: 1px solid #dde1ea;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

    .btn-secundario:hover {
        background-color: #f0f0f0;
    }

/* ── Tabla de personas ───────────────────────────────────────── */
.tabla-personas {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 16px;
}

    .tabla-personas th {
        background-color: #f0f2f7;
        padding: 8px 10px;
        text-align: left;
        color: #555;
        font-weight: 600;
    }

    .tabla-personas td {
        padding: 8px 10px;
        border-bottom: 1px solid #eee;
        color: #333;
    }

    .tabla-personas tr:last-child td {
        border-bottom: none;
    }

.btn-eliminar {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
}

/* ── Total ───────────────────────────────────────────────────── */
.total-box {
    background-color: #f8f9fc;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 0.95rem;
    color: #555;
    font-weight: 600;
}

.total-monto {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1f2e;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.88rem;
}

.alert-danger {
    background-color: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

/* ── Stepper: paso completado ────────────────────────────────── */
.step.done .step-circle {
    background-color: #2ecc71;
    border-color: #2ecc71;
    color: #fff;
}

/* ── Badge titular ───────────────────────────────────────────── */
.badge-titular {
    background-color: #d4a843;
    color: #1a1f2e;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 700;
    margin-left: 6px;
}

/* ── Separador ───────────────────────────────────────────────── */
.separador {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* ── Subtítulo de formulario ─────────────────────────────────── */
.subtitulo-form {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1f2e;
    margin-bottom: 14px;
}

/* ── Checkbox ────────────────────────────────────────────────── */
.check-grupo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-label {
    font-size: 0.88rem;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .check-label input[type="checkbox"] {
        width: 16px;
        height: 16px;
        cursor: pointer;
        accent-color: #d4a843;
    }

/* ── Iconos de resultado ─────────────────────────────────────── */
.icono-exito {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #2ecc71;
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.icono-cancelado {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #e74c3c;
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ── Campo inválido ──────────────────────────────────────────── */
.campo-invalido {
    border-color: #e74c3c !important;
    background-color: #fff8f8 !important;
}

/* ── Ícono pendiente ─────────────────────────────────────────── */
.icono-pendiente {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #d4a843;
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ── Instrucciones ───────────────────────────────────────────── */
.instrucciones-box {
    background-color: #f8f9fc;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 20px;
    text-align: left;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
}

    .instrucciones-box p {
        margin-bottom: 8px;
    }


/* ── Pago seguro info ────────────────────────────────────────── */
.pago-seguro-info {
    margin-top: 16px;
    text-align: center;
}

.pago-seguro-badge {
    font-size: 0.78rem;
    color: #888;
    margin-bottom: 10px;
}

.pago-metodos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .pago-metodos img {
        height: 24px;
        width: auto;
        opacity: 0.7;
        transition: opacity 0.2s;
    }

        .pago-metodos img:hover {
            opacity: 1;
        }

.badge-metodo {
    background-color: #f0f2f7;
    color: #555;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* ── Costo diario ────────────────────────────────────────────── */
.costo-diario-box {
    background-color: #eafaf1;
    border: 1px solid #a9dfbf;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 10px;
    font-size: 0.88rem;
    color: #1e8449;
    text-align: center;
}

/* ── Botones del formulario de dependiente ───────────────── */
.botones-form-dep {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.btn-almacenar {
    flex: 1;
    padding: 12px;
    background-color: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .btn-almacenar:hover {
        background-color: #27ae60;
    }

.btn-cancelar-dep {
    flex: 1;
    padding: 12px;
    background-color: transparent;
    color: #888;
    border: 1px solid #dde1ea;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-cancelar-dep:hover {
        background-color: #f0f0f0;
        color: #555;
    }


/* ── Botón agregar dependiente ───────────────────────────── */
.btn-agregar-dep {
    width: 100%;
    padding: 10px;
    background-color: transparent;
    color: #5b8dee;
    border: 2px dashed #5b8dee;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

    .btn-agregar-dep:hover {
        background-color: #eef3fd;
        border-color: #4a7de0;
        color: #4a7de0;
    }


/* ── Animación slide down formulario dependiente ─────────── */
#formDepWrapper {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity .7s ease;
    max-height: 0;
    opacity: 0;
}

    #formDepWrapper.abierto {
        max-height: 1000px;
        opacity: 1;
    }


/* ── Modal dependiente ───────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInOverlay 0.25s ease;
}

.modal-contenido {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDownModal 0.3s ease;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1f2e;
    margin: 0;
}

.modal-cerrar {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #aaa;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

    .modal-cerrar:hover {
        background-color: #f0f0f0;
        color: #555;
    }

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDownModal {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}