/* ============================================
   FUENTES
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&amp;display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&amp;display=swap');

/* ============================================
   VARIABLES CSS - MODO CLARO (por defecto)
   ============================================ */
:root,
[data-bs-theme="light"] {
    /* --- Colores de marca --- */
    --st-primary: #FFB840;
    --st-primary-hover: #E5A536;
    --st-primary-active: #CC932D;
    --st-primary-rgb: 255, 184, 64;
    --st-brand-green: #109D59;
    --st-brand-green-rgb: 16, 157, 89;

    /* --- Fondos --- */
    --st-bg-body: #FFFFFF;
    --st-bg-secondary: #F9FAFB;
    --st-bg-card: #FFFFFF;
    --st-bg-input: #F9FAFB;
    --st-bg-input-focus: #FFFFFF;

    /* --- Textos --- */
    --st-text-primary: #111827;
    --st-text-secondary: #6B7280;
    --st-text-muted: #9CA3AF;
    --st-text-placeholder: #9CA3AF;
    --st-text-on-primary: #FFFFFF;

    /* --- Bordes --- */
    --st-border-color: #E5E7EB;
    --st-border-light: #F3F4F6;
    --st-border-focus: var(--st-primary);

    /* --- Sombras --- */
    --st-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --st-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --st-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --st-shadow-primary: 0 10px 25px -5px rgba(var(--st-primary-rgb), 0.25);

    /* --- Bordes redondeados --- */
    --st-radius-sm: 8px;
    --st-radius-md: 12px;
    --st-radius-lg: 16px;
    --st-radius-xl: 20px;
    --st-radius-pill: 50px;
    --st-radius-circle: 50%;

    /* --- Transiciones --- */
    --st-transition: all 0.2s ease;
}

/* ============================================
   VARIABLES CSS - MODO OSCURO
   ============================================ */
[data-bs-theme="dark"] {
    /* --- Fondos --- */
    --st-bg-body: #121212;
    --st-bg-secondary: #1E1E1E;
    --st-bg-card: #1E1E1E;
    --st-bg-input: #1A1A2E;
    --st-bg-input-focus: #252540;

    /* --- Textos --- */
    --st-text-primary: #F1F5F9;
    --st-text-secondary: #94A3B8;
    --st-text-muted: #64748B;
    --st-text-placeholder: #64748B;

    /* --- Bordes --- */
    --st-border-color: #334155;
    --st-border-light: #1E293B;

    /* --- Sombras --- */
    --st-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --st-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --st-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --st-shadow-primary: 0 10px 25px -5px rgba(var(--st-primary-rgb), 0.15);
}

/* ============================================
   ESTILOS BASE
   ============================================ */
html {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--st-bg-body);
    color: var(--st-text-primary);
    -webkit-tap-highlight-color: transparent;
    min-height: 100dvh;
    min-height: max(884px, 100dvh);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   LAYOUT PRINCIPAL - PANTALLAS AUTH
   ============================================ */
.st-auth-wrapper {
    min-height: 100dvh;
    min-height: max(884px, 100dvh);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
}

.st-auth-main {
    width: 100%;
    max-width: 400px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ============================================
   LOGO
   ============================================ */
.st-logo {
    width: 100%;
    max-width: 280px;
    height: auto;
    object-fit: contain;
}

.st-logo-sm {
    width: 100%;
    max-width: 192px;
    height: auto;
    object-fit: contain;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
.st-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--st-text-primary);
    letter-spacing: -0.025em;
}

.st-subtitle {
    font-size: 0.875rem;
    color: var(--st-text-secondary);
    line-height: 1.6;
}

.st-text-muted {
    color: var(--st-text-muted) !important;
}

.st-text-primary-color {
    color: var(--st-primary) !important;
}

/* ============================================
   BOTÓN PRIMARIO (Amarillo Sorteate)
   ============================================ */
.btn-st-primary {
    background-color: var(--st-primary);
    color: var(--st-text-primary);
    font-weight: 700;
    font-size: 1.125rem;
    border: none;
    border-radius: var(--st-radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--st-shadow-primary);
    transition: var(--st-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}

.btn-st-primary:hover {
    background-color: var(--st-primary-hover);
    color: var(--st-text-primary);
    transform: translateY(-1px);
    box-shadow: 0 12px 30px -5px rgba(var(--st-primary-rgb), 0.35);
}

.btn-st-primary:active {
    background-color: var(--st-primary-active);
    transform: scale(0.98);
    box-shadow: var(--st-shadow-sm);
}

.btn-st-primary .bi,
.btn-st-primary svg {
    flex-shrink: 0;
}

/* ============================================
   INPUT DE TELÉFONO
   ============================================ */
.st-phone-container {
    display: flex;
    align-items: center;
    background-color: var(--st-bg-input);
    border: 2px solid var(--st-border-color);
    border-radius: var(--st-radius-lg);
    padding: 0.25rem;
    box-shadow: var(--st-shadow-sm);
    transition: var(--st-transition);
    overflow: hidden;
}

.st-phone-container:focus-within {
    border-color: var(--st-primary);
    box-shadow: 0 0 0 3px rgba(var(--st-primary-rgb), 0.15);
}

.st-phone-prefix {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-right: 1px solid var(--st-border-color);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    color: var(--st-text-primary);
    transition: var(--st-transition);
}

.st-phone-prefix:hover {
    background-color: var(--st-bg-secondary);
}

.st-phone-prefix .st-flag {
    font-size: 1.25rem;
}

.st-phone-prefix .bi {
    color: var(--st-text-muted);
    font-size: 0.75rem;
}

.st-phone-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 1.125rem;
    color: var(--st-text-primary);
    padding: 0.75rem 1rem;
}

.st-phone-input::placeholder {
    color: var(--st-text-placeholder);
}

/* ============================================
   INPUTS OTP
   ============================================ */
.st-otp-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    width: 100%;
}

.st-otp-input {
    width: 100%;
    aspect-ratio: 1;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    background-color: var(--st-bg-input);
    border: 2px solid var(--st-border-color);
    border-radius: var(--st-radius-md);
    color: var(--st-text-primary);
    outline: none;
    transition: var(--st-transition);
}

.st-otp-input:focus {
    border-color: var(--st-primary);
    box-shadow: 0 0 0 3px rgba(var(--st-primary-rgb), 0.15);
}

/* ============================================
   ICONO ILUSTRATIVO (OTP)
   ============================================ */
.st-icon-circle {
    width: 128px;
    height: 128px;
    border-radius: var(--st-radius-circle);
    background-color: rgba(var(--st-primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.st-icon-circle .bi-phone {
    font-size: 4rem;
    color: var(--st-primary);
}

.st-icon-badge {
    position: absolute;
    top: 0.25rem;
    right: -0.5rem;
    background-color: var(--st-bg-card);
    border: 1px solid var(--st-border-color);
    border-radius: var(--st-radius-lg);
    padding: 0.5rem;
    box-shadow: var(--st-shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-icon-badge .bi-whatsapp {
    font-size: 1.25rem;
    color: #25D366;
}

/* ============================================
   ENLACES Y TEXTOS INTERACTIVOS
   ============================================ */
.st-link {
    color: var(--st-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--st-transition);
}

.st-link:hover {
    color: var(--st-primary-hover);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

/* ============================================
   FOOTER AUTH
   ============================================ */
.st-auth-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-bottom: 2rem;
}

.st-auth-footer a {
    color: var(--st-text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--st-transition);
}

.st-auth-footer a:hover {
    color: var(--st-primary);
}

.st-auth-footer .st-version {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: var(--st-text-muted);
}

.st-footer-divider {
    color: var(--st-border-color);
}

/* ============================================
   BARRA INFERIOR (Home Indicator)
   ============================================ */
.st-home-indicator {
    width: 128px;
    height: 5px;
    border-radius: var(--st-radius-pill);
    background-color: var(--st-border-color);
    margin-bottom: 0.5rem;
}

/* ============================================
   SEGURIDAD / CANDADO
   ============================================ */
.st-secure-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
}

.st-secure-badge .bi {
    font-size: 0.75rem;
}

.st-secure-badge span {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ============================================
   TEMPORIZADOR OTP
   ============================================ */
.st-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--st-text-secondary);
}

.st-timer .bi {
    font-size: 1rem;
}

.st-timer-value {
    font-weight: 600;
    color: var(--st-text-primary);
}

/* ============================================
   BOTÓN VOLVER (OTP Header)
   ============================================ */
.st-btn-back {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--st-radius-circle);
    color: var(--st-text-primary);
    transition: var(--st-transition);
    padding: 0;
}

.st-btn-back:hover {
    background-color: var(--st-bg-secondary);
}

.st-btn-back .bi {
    font-size: 1.5rem;
}

/* ============================================
   UTILIDADES
   ============================================ */
.st-gap-1 { gap: 0.25rem; }
.st-gap-2 { gap: 0.5rem; }
.st-gap-3 { gap: 1rem; }
.st-gap-4 { gap: 1.5rem; }
.st-gap-5 { gap: 2rem; }
.st-gap-6 { gap: 2.5rem; }
.st-gap-8 { gap: 3rem; }

/* ============================================
   WHATSAPP ICON SVG (para botón)
   ============================================ */
.st-wa-icon {
    width: 24px;
    height: 24px;
    fill: white;
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 380px) {
    .st-otp-input {
        font-size: 1rem;
    }

    .st-logo {
        max-width: 220px;
    }

    .st-logo-sm {
        max-width: 160px;
    }
}

