/* Estilos principales Acuavital para Formulario de Clientes */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f8fb;
    margin: 0;
    padding: 0;
    color: #333;
}

.form-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 69, 141, 0.08);
}

@media (max-width: 840px) {
    .form-container {
        margin: 15px;
        padding: 20px;
        max-width: calc(100% - 30px);
    }
}

h1 {
    color: #00458d;
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 700;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-height: 70px;
    width: auto;
}

/* Estilos de Bloques / Secciones */
.form-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #00a7e1; /* Azul claro marca */
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 8px 16px rgba(0, 69, 141, 0.06);
}

.form-section.phone-verification-section {
    border-left-color: #0284c7;
    background: #f8fafc;
}

.form-section.entrega-section {
    border-left-color: #77BC1F; /* Verde marca para entrega */
}

.form-section.empresa-section {
    border-left-color: #00458d; /* Azul corporativo */
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: #00458d;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

/* Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.full-width {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .full-width {
        grid-column: span 1;
    }
}

.form-row {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-row label {
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #00458d;
}

.form-row input:not([type="checkbox"]),
.form-row textarea,
.form-row select {
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 15px;
    background-color: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    width: 100%;
}

.form-row input:not([type="checkbox"]):focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: #00a7e1;
    box-shadow: 0 0 0 3px rgba(0, 167, 225, 0.15);
    outline: none;
}

.form-row input:not([type="checkbox"]):disabled,
.form-row textarea:disabled,
.form-row select:disabled {
    background-color: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

/* Teléfono bloqueado/fijo */
.telefono-locked {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    cursor: not-allowed !important;
    border-color: #94a3b8 !important;
}

/* Selects */
.select-row select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 40px;
}

.select-row::after {
    content: "▼";
    position: absolute;
    right: 15px;
    bottom: 15px;
    pointer-events: none;
    font-size: 11px;
    color: #00458d;
}

#cedula-prefijo, #rif-prefijo {
    width: 80px;
    flex-shrink: 0;
}

/* ========================================================
   ESTILOS DE VERIFICACIÓN TWILIO / PHONE-FIRST
======================================================== */

.btn-validar-tel {
    background: #0284c7;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

.btn-validar-tel:hover {
    background: #0369a1;
}

.btn-validar-tel:active {
    transform: scale(0.98);
}

/* Tarjeta de ingreso de OTP */
.otp-box-card {
    background: #ffffff;
    border: 2px solid #0284c7;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.12);
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

.otp-box-header {
    font-size: 16px;
    color: #0369a1;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.otp-instructions {
    font-size: 14px;
    color: #334155;
    margin-bottom: 15px;
    line-height: 1.4;
}

.otp-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

@media (max-width: 600px) {
    .otp-input-row {
        flex-direction: column;
    }
}

#inputCodigoOTP {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 6px;
    text-align: center;
    max-width: 200px;
    padding: 10px 12px;
    border: 2px solid #0284c7;
    border-radius: 8px;
    color: #0f172a;
}

@media (max-width: 600px) {
    #inputCodigoOTP {
        max-width: 100%;
        width: 100%;
    }
}

.btn-confirmar-otp {
    background: #77BC1F;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex-grow: 1;
    transition: background 0.2s;
}

.btn-confirmar-otp:hover {
    background: #629e18;
}

.otp-timer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.otp-countdown {
    color: #0284c7;
    font-size: 14px;
}

.btn-reenviar-otp {
    background: transparent;
    border: none;
    color: #0284c7;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-reenviar-otp:hover {
    color: #0369a1;
}

/* Badges de estado de teléfono */
.tel-badge-gc {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-left: 5px solid #16a34a;
    padding: 14px 16px;
    border-radius: 10px;
    color: #166534;
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

.tel-badge-gc .icon {
    font-size: 22px;
    line-height: 1;
}

.tel-badge-gc strong {
    font-size: 15px;
    display: block;
    margin-bottom: 2px;
}

.tel-badge-gc p {
    margin: 0;
    font-size: 13.5px;
    color: #15803d;
}

.tel-badge-verificado {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ecfeff;
    border: 1.5px solid #a5f3fc;
    border-left: 5px solid #0891b2;
    padding: 14px 16px;
    border-radius: 10px;
    color: #155e75;
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

.tel-badge-verificado .icon {
    font-size: 22px;
    line-height: 1;
}

.tel-badge-verificado strong {
    font-size: 15px;
    display: block;
    margin-bottom: 2px;
}

.tel-badge-verificado p {
    margin: 0;
    font-size: 13.5px;
    color: #0e7490;
}

/* Estado de secciones bloqueadas */
.secciones-bloqueadas {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
    filter: grayscale(40%);
    transition: all 0.3s ease;
}

.secciones-desbloqueadas {
    opacity: 1;
    pointer-events: auto;
    user-select: auto;
    filter: none;
    transition: all 0.3s ease;
}

/* Botón Submit principal estilo WhatsApp */
button[type="submit"], .btn-whatsapp-guardar {
    background-color: #25D366;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

button[type="submit"]:hover, .btn-whatsapp-guardar:hover {
    background-color: #1ebe5d;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    transform: translateY(-2px);
}

button[type="submit"]:active, .btn-whatsapp-guardar:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

button[type="submit"]:disabled, .btn-whatsapp-guardar:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.whatsapp-btn-icon {
    width: 26px;
    height: 26px;
    fill: #ffffff;
    flex-shrink: 0;
}

/* Nota Empresa */
.nota-empresa {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: #f0fdf4;
    border-left: 4px solid #77BC1F;
    color: #14532d;
    font-size: 15px;
    line-height: 1.5;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 0 0 20px 0;
    border: 1px solid rgba(119, 188, 31, 0.2);
}

.nota-empresa::before {
    content: "ℹ";
    font-size: 16px;
    font-weight: bold;
    color: #77BC1F;
    margin-top: 1px;
}

.hidden-nota {
    display: none !important;
}

/* Resaltado de campos faltantes */
.req-star {
    color: #dc2626;
    font-weight: bold;
    margin-right: 3px;
}

.campo-faltante {
    border: 2px solid #ff4d4d !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 5px rgba(255, 77, 77, 0.3) !important;
    transition: all 0.3s ease-in-out;
}

.campo-faltante:focus {
    box-shadow: 0 0 8px rgba(255, 77, 77, 0.5) !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}