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

body {
    font-family: 'Poppins', sans-serif;
    background: #1a1a2e;
}

.login-wrapper {
    width: 100vw;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-logo-card {
    position: absolute;
    top: 3%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 15px 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
}

.login-logo-card img {
    width: 80%;
    max-width: 240px;
    margin-bottom: 8px;
}

.login-logo-card p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

#incode-container {
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Hacer visibles los textos de feedback del SDK de Incode */
#incode-container [class*="IncodeLoginNotification"] {
    color: #ffffff !important;
    font-size: 0.95rem !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    bottom: auto !important;
    top: 155px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 400px !important;
    z-index: 20 !important;
    padding: 10px 16px !important;
    background: transparent !important;
    border-radius: 0 !important;
}

/* Subir la cámara y el contenido del SDK */
#incode-container [class*="IncodeLoginWebcamContainer"] {
    margin-top: -40px !important;
}

/* Asegurar que el botón de captura no tape el texto */
#incode-container [class*="CaptureButton"],
#incode-container [class*="ManualCapture"] {
    z-index: 15 !important;
}

.error-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    display: none;
}

.error-state p.error-msg {
    font-size: 0.9rem;
    color: #d32f2f;
    margin-bottom: 8px;
}

.error-state p.error-hint {
    font-size: 0.85rem;
    color: #ffffff;
    margin-bottom: 24px;
}

.btn-retry {
    background: #2d89ef;
    border: 1px solid #2d89ef;
    padding: 8px 30px;
    min-width: 154px;
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-retry:hover {
    border-color: #ffffff;
}

/* Loading state */
.loading-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    display: none;
}

.loading-state .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #2d89ef;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: #ffffff;
    font-size: 0.95rem;
}

/* Iframe wrapper */
.iframe-wrapper {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    background: #fff;
}
