/* ============================================
   LOGIN STYLE APPLE - AZUL MARINO
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a1628;
    position: relative;
    margin: 0;
    padding: 20px;
}

/* ============================================
   FONDO AZUL MARINO
   ============================================ */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #0a1628 0%, #0d1f3c 50%, #0a1628 100%);
    z-index: 0;
}

.background::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(74, 108, 247, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.background::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* ============================================
   CONTENEDOR
   ============================================ */

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

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

/* ============================================
   TARJETA BLANCA
   ============================================ */

.glass-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 48px 32px 40px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ============================================
   LOGO TEXTO
   ============================================ */

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-text .brand {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #1e4a7a;
    line-height: 1;
}

.logo-text .brand span {
    color: #f37021;
}

.logo-text .brand span {
    color: #f37021;
}

.logo-text .line {
    width: 100px;
    height: 4px;
    margin-top: 2px;
    background: linear-gradient(90deg, transparent 0%, #f37021 15%, #f37021 85%, transparent 100%);
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(243, 112, 33, 0.2);
}

/* ============================================
   TEXTO
   ============================================ */

.title {
    font-size: 26px;
    font-weight: 700;
    color: #0a1628;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.subtitle {
    font-size: 15px;
    color: #6b7a8f;
    text-align: center;
    margin-bottom: 32px;
    font-weight: 400;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

/* ============================================
   CAMPO DE TELÉFONO
   ============================================ */

.phone-input-group {
    margin-bottom: 24px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border: 2px solid #f0f2f5;
    border-radius: 14px;
    transition: all 0.2s ease;
    padding: 2px;
    position: relative;
}

.phone-input-wrapper:focus-within {
    border-color: #007aff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.08);
}

.country-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 10px 12px 14px;
    color: #0a1628;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-right: 1px solid #e5e8ec;
    flex-shrink: 0;
    user-select: none;
    transition: background 0.15s ease;
    border-radius: 12px 0 0 12px;
}

.country-selector:hover {
    background: rgba(0, 0, 0, 0.02);
}

.country-selector .flag {
    font-size: 22px;
    line-height: 1;
}

.country-selector .code {
    font-size: 14px;
    font-weight: 600;
    color: #0a1628;
    letter-spacing: 0.3px;
}

.country-selector .arrow {
    font-size: 10px;
    color: #8e9aaf;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.country-selector.active .arrow {
    transform: rotate(180deg);
}

.phone-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 14px;
    font-size: 16px;
    color: #0a1628;
    font-weight: 400;
    outline: none;
    min-width: 0;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
}

.phone-input::placeholder {
    color: #9aa8b9;
    font-weight: 300;
    font-size: 15px;
}

.phone-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #f0f2f5 inset !important;
    -webkit-text-fill-color: #0a1628 !important;
}

.phone-input:focus:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
}

.country-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 14px;
    padding: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 10px rgba(0, 0, 0, 0.02);
}

.country-dropdown.show {
    display: block;
    animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.country-option {
    padding: 8px 12px;
    border-radius: 10px;
    color: #0a1628;
    cursor: pointer;
    transition: all 0.12s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.country-option:hover {
    background: #f0f2f5;
}

.country-option.active {
    background: #e8edf5;
}

.country-option .flag {
    font-size: 20px;
}

.country-option .code {
    font-weight: 500;
    color: #6b7a8f;
    font-size: 13px;
}

.country-option .nombre {
    font-size: 13px;
    color: #6b7a8f;
    margin-left: auto;
}

.country-dropdown::-webkit-scrollbar {
    width: 4px;
}

.country-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: #d1d6dd;
    border-radius: 10px;
}

.country-dropdown::-webkit-scrollbar-thumb:hover {
    background: #b0b8c2;
}

/* ============================================
   ERROR
   ============================================ */

.error-message {
    color: #ff3b30;
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeIn 0.3s ease;
    padding: 0 4px;
}

.error-message i {
    font-size: 14px;
}

/* ============================================
   BOTÓN
   ============================================ */

.btn-continue {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: #007aff;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
}

.btn-continue:hover {
    background: #0066d9;
    transform: scale(1.01);
}

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

.btn-continue .btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-continue .arrow {
    transition: transform 0.2s ease;
    font-size: 16px;
}

.btn-continue:hover .arrow {
    transform: translateX(3px);
}

.btn-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   FOOTER
   ============================================ */

.security-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    color: #8e9aaf;
    font-size: 12px;
    font-weight: 400;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.security-footer i {
    font-size: 14px;
    color: #b0b8c2;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .login-container {
        padding: 0;
        max-width: 100%;
    }

    .glass-card {
        padding: 32px 20px 28px;
        border-radius: 20px;
    }

.logo-text .brand {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #1e4a7a;
    line-height: 1;
}

.logo-text .brand span {
    color: #f37021;
}

    .logo-text .line {
        width: 80px;
        height: 3.5px;
    }

    .title {
        font-size: 22px;
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .phone-input {
        font-size: 15px;
        padding: 10px 12px;
    }

    .country-selector {
        padding: 8px 8px 8px 12px;
        font-size: 13px;
    }

    .country-selector .flag {
        font-size: 18px;
    }

    .btn-continue {
        padding: 12px;
        font-size: 15px;
        border-radius: 12px;
    }

    .security-footer {
        font-size: 11px;
        margin-top: 20px;
    }
}

@media (max-width: 380px) {
    .glass-card {
        padding: 24px 16px 24px;
    }

.logo-text .brand {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #1e4a7a;
    line-height: 1;
}

.logo-text .brand span {
    color: #f37021;
}

    .logo-text .line {
        width: 60px;
        height: 3px;
    }

    .title {
        font-size: 20px;
    }

    .country-selector .code {
        font-size: 12px;
    }

    .phone-input {
        font-size: 14px;
        padding: 8px 10px;
    }

    .btn-continue {
        font-size: 14px;
        padding: 10px;
    }
}
