/* =========================================
   RESET GLOBAL (Evita el desbordamiento)
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

/* =========================================
   PREMIUM DRIVER APPLY (RESPONSIVE SPLIT LAYOUT)
   ========================================= */
   :root {
    --primary: #00d2d3;
    --primary-dark: #01a3a4;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-white: #ffffff;
    --text-gray: #94a3b8;
    --border-color: #334155;
}

body.apply-page-body {
    background-color: var(--bg-dark);
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* --- CONTENEDOR PRINCIPAL RESPONSIVO --- */
.apply-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
    margin: auto;
}

.apply-card {
    background: var(--card-bg); /* Forzamos un color sólido más claro que el fondo */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Borde general sutil */
    border-top: 1px solid rgba(255, 255, 255, 0.3); /* Luz superior para dar volumen */
    border-bottom: 1px solid rgba(0, 0, 0, 0.5); /* Sombra inferior en el borde */
    border-radius: 24px;
    /* Sombra oscura profunda + un sutil resplandor cyan (glow) alrededor */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 210, 211, 0.05);
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- LADO IZQUIERDO (INFO) --- */
.apply-info-side {
    background: radial-gradient(circle at top left, rgba(0, 210, 211, 0.15), transparent 60%),
                linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border-color);
}

.brand-header { margin-bottom: 2rem; }
.icon-circle {
    width: 60px; height: 60px;
    background: rgba(0, 210, 211, 0.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1.8rem;
    margin-bottom: 1rem; box-shadow: 0 0 20px rgba(0, 210, 211, 0.2);
}
.brand-title { color: var(--text-white); font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; line-height: 1.2;}
.brand-subtitle { color: var(--text-gray); font-size: 1rem;}

.benefits-list { list-style: none; padding: 0; margin-top: 2rem;}
.benefits-list li {
    display: flex; align-items: center; gap: 12px;
    color: var(--text-white); margin-bottom: 1.2rem; font-size: 1.05rem;
}
.benefits-list i { color: var(--primary); font-size: 1.2rem; }

/* --- LADO DERECHO (FORMULARIO) --- */
.apply-form-side {
    padding: 3rem;
    background-color: var(--card-bg); /* Aseguramos que el lado derecho no sea transparente */
    position: relative;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.full-width { grid-column: span 2; }

/* --- INPUTS --- */
.input-group label {
    display: block; color: var(--text-gray); font-size: 0.85rem; margin-bottom: 8px; margin-left: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.input-wrapper { position: relative; width: 100%; }
.input-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: #64748b; font-size: 1.1rem; transition: color 0.3s; z-index: 5;
}
.input-wrapper input {
    width: 100%; padding: 14px 14px 14px 48px;
    background: #0f172a; border: 1px solid var(--border-color);
    border-radius: 12px; color: white; font-size: 1rem; outline: none; transition: all 0.3s;
}
.input-wrapper input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 210, 211, 0.15); }
.input-wrapper input:focus + .input-icon, .input-wrapper:focus-within .input-icon { color: var(--primary); }

/* --- WHATSAPP FLEX --- */
.input-group-flex { display: flex; gap: 10px; width: 100%; }
.select-country-code, .ts-wrapper.select-country-code { width: 120px !important; flex: 0 0 120px; }

/* --- BOTÓN --- */
.btn-login {
    width: 100%; padding: 16px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #0f172a; font-size: 1.1rem; font-weight: 800; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s; margin-top: 1rem;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 210, 211, 0.3); }

/* --- FOOTER --- */
.login-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px dashed rgba(255,255,255,0.1); text-align: center;}
.whatsapp-btn {
    display: inline-flex; align-items: center; gap: 8px; color: var(--text-gray); text-decoration: none; font-size: 0.95rem; transition: color 0.3s;
}
.whatsapp-btn:hover { color: #fff; }

/* =======================================================
   TOM SELECT - DARK MODE (Adaptado)
   ======================================================= */
.ts-wrapper.driver-select, .ts-wrapper.select-country-code { background: transparent !important; border: none !important; padding: 0 !important; box-shadow: none !important; height: auto !important; }
.ts-control {
    background-color: #0f172a !important; background-image: none !important;    
    border: 1px solid var(--border-color) !important; border-radius: 12px !important; color: #ffffff !important;
    padding: 14px 14px 14px 48px !important; min-height: 50px; display: flex; align-items: center; box-shadow: none !important;
}
.select-country-code .ts-control { padding: 14px 10px !important; justify-content: center;}
.ts-control > input { color: #ffffff !important; font-family: inherit !important; }
.ts-control > .item { color: #ffffff !important; font-weight: 500; }
.ts-dropdown { background-color: #1e293b !important; border: 1px solid var(--border-color) !important; color: #cbd5e1 !important; border-radius: 12px !important; margin-top: 5px !important; box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important; z-index: 10000 !important; }
.ts-dropdown .option { padding: 10px 15px !important; cursor: pointer; }
.ts-dropdown .active, .ts-dropdown .option:hover { background-color: var(--primary) !important; color: #0f172a !important; }
.ts-wrapper.focus .ts-control { border-color: var(--primary) !important; box-shadow: 0 0 0 4px rgba(0, 210, 211, 0.15) !important; }

/* =========================================
   RESPONSIVIDAD MÓVIL Y TABLET
   ========================================= */
@media (max-width: 992px) {
    .apply-card { grid-template-columns: 1fr; }
    .apply-info-side { padding: 2rem; border-right: none; border-bottom: 1px solid var(--border-color); text-align: center; }
    .icon-circle { margin: 0 auto 1rem; }
    .benefits-list li { justify-content: center; }
    .apply-form-side { padding: 2rem; }
}

@media (max-width: 600px) {
    .apply-wrapper { padding: 1rem; }
    .form-grid { grid-template-columns: 1fr; gap: 1rem;}
    .full-width { grid-column: span 1; }
    .select-country-code, .ts-wrapper.select-country-code { width: 100px !important; flex: 0 0 100px; }
}

/* Partículas animadas al fondo */
.delivery-particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 0; pointer-events: none;}
.icon-float { position: absolute; color: rgba(255, 255, 255, 0.05); font-size: 5rem; animation: floatAnim 10s infinite ease-in-out alternate; }
.p-1 { left: 10%; top: 20%; animation-delay: 0s; }
.p-2 { left: 85%; top: 15%; animation-delay: -2s; font-size: 3rem;}
.p-3 { left: 15%; top: 80%; animation-delay: -4s; }
.p-4 { left: 80%; top: 75%; animation-delay: -6s; font-size: 6rem;}

@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatAnim { 0% { transform: translateY(0) rotate(0deg); } 100% { transform: translateY(-40px) rotate(15deg); } }

/* =========================================
   BADGE DE PLATAFORMA (MARCA BLANCA)
   ========================================= */
.platform-badge {
    display: inline-block;
    background: rgba(0, 210, 211, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 210, 211, 0.3);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85em;
    vertical-align: middle;
}