:root {
    --primary-yellow: #FDDA24;
    --text-color: #2b2b2b;
    --muted-text: #666;
    --input-hover: #f5f5f5;
    --button-bg: #E6E6E6;
    --button-text: #8E8E8E;
    --button-active: #FDDA24;
    --alert-bg: #DDF4FF;
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: #ffffff;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Decorations */
.background-decorations {
    display: none;
    /* Removed curves as requested */
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px 20px;
    position: relative;
    animation: fadeInDown 1s ease-out;
}

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

.logo {
    height: 44px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 28px;
    font-weight: 400;
    color: #444;
    letter-spacing: -0.5px;
}

.portal-badge-fixed {
    position: absolute;
    top: 50px;
    right: 20px;
    background: #333;
    color: white;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 400;
    border-radius: 0;
}

/* Main Content */
main {
    flex: 1;
    max-width: 650px;
    width: 100%;
    margin: 40px auto;
    padding: 10px 20px 50px;
}

.alert-banner {
    background-color: #DDF4FF;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: none;
    border: none;
    animation: fadeIn 1s ease-out 0.2s both;
}

.alert-icon {
    font-size: 22px;
    margin-right: 15px;
    color: #4FB5E6;
}

.alert-content strong {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #00448D;
}

.alert-content p {
    font-size: 13px;
    color: #444;
    margin: 0;
}

.alert-content a {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    font-size: 13px;
    transition: color 0.3s ease;
}

.alert-content a:hover {
    color: #00448D;
}

/* Login Card */
.login-card {
    background: #fff;
    border-radius: 8px;
    padding: 50px 60px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.login-card h2 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #1a1a1a;
}

.subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}


/* Form Styles */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ccc;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.input-group label:focus-within {
    border-color: var(--primary-yellow);
    transform: translateY(-2px);
}

.icon {
    font-size: 16px;
    padding: 10px;
    color: #666;
    transition: color 0.3s ease;
}

.input-group label:focus-within .icon {
    color: #2b2b2b;
}

input {
    width: 100%;
    border: none;
    padding: 10px 5px;
    font-size: 15px;
    outline: none;
    background: transparent;
    font-family: var(--font-family);
    color: #333;
}

input::placeholder {
    color: #bbb;
    font-weight: 400;
}

.forgot-link {
    display: block;
    font-size: 13.5px;
    color: #333;
    text-decoration: underline;
    margin-top: 10px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #00448D;
}

button {
    width: 100%;
    background-color: #E6E6E6;
    color: #999;
    border: none;
    padding: 16px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: not-allowed;
    margin-top: 45px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

button.active {
    background-color: #FDDA24;
    color: #000;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(253, 218, 36, 0.4);
}

button.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(253, 218, 36, 0.5);
}

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

.create-user {
    display: block;
    margin-top: 30px;
    font-weight: 700;
    color: #2b2b2b;
    text-decoration: underline;
    font-size: 14.5px;
    transition: color 0.3s ease;
}

.create-user:hover {
    color: #00448D;
}

/* Footer */
footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 50px;
    background: #fff;
    backdrop-filter: blur(5px);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #777;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #2b2b2b;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.footer-logo {
    height: 24px;
    opacity: 0.8;
}

.ip-info {
    font-size: 11.5px;
    color: #999;
    line-height: 2;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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


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

    h1 {
        font-size: 24px;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Steps Indicator */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ccc;
    position: relative;
}

.step-item.active {
    color: #2b2b2b;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.step-item.active .step-circle {
    border-color: var(--primary-yellow);
    background: var(--primary-yellow);
    color: #000;
}

.line {
    width: 50px;
    height: 2px;
    background: #ccc;
    margin: 0 10px;
    margin-bottom: 20px;
}

/* Intro Content */
.intro-content {
    text-align: center;
}

.instruction-icon {
    font-size: 60px;
    color: var(--primary-yellow);
    margin: 30px 0;
}

/* Camera Container */
.camera-container {
    width: 100%;
    max-width: 400px;
    height: 300px;
    /* Default for Face */
    background: #000;
    margin: 0 auto 20px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.camera-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Mirror effect for selfie */
}

/* Document Mode specific adjustments */
.camera-container.doc-mode video {
    transform: none;
    /* No mirror for back camera */
}

.camera-container.doc-mode {
    height: 250px;
    /* Adjust aspect ratio for document */
}

/* Overlays */
.camera-overlay-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 240px;
    border: 3px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    /* Oval for face */
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    z-index: 10;
    pointer-events: none;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Estado: rostro correctamente posicionado */
.camera-overlay-face.oval-ok {
    border-color: #0d2f6e;
    box-shadow:
        0 0 0 9999px rgba(0, 0, 0, 0.5),
        0 0 0 4px #0d2f6e,
        0 0 18px 6px rgba(13, 47, 110, 0.7);
}

.camera-overlay-doc {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.doc-guide {
    width: 85%;
    height: 60%;
    border: 2px dashed rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

/* Recording Indicator */
.recording-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    z-index: 20;
}

.red-dot {
    width: 10px;
    height: 10px;
    background: red;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Document Buttons */
.doc-btn {
    margin-top: 10px;
}

.doc-btn.secondary {
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
    margin-top: 10px;
}

/* Spinner */
.spinner-container {
    padding: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Error 404 Page */
.error-container {
    text-align: center;
    padding: 50px 20px;
    animation: fadeIn 0.5s ease-out;
}

.error-content h1 {
    font-size: 80px;
    color: var(--primary-yellow);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.error-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.back-home {
    display: inline-block;
    margin-top: 20px;
    background: var(--primary-yellow);
    color: #000;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.back-home:hover {
    transform: scale(1.05);
}

/* Modal Clave Dinámica */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.hidden {
    display: none !important;
}
.modal-dinamica-card {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 20px 25px 30px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-dinamica-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    box-shadow: none;
    padding: 0;
    margin: 0;
    width: auto;
}
.modal-dinamica-banner {
    background: #8e62c9;
    color: white;
    border-radius: 12px;
    padding: 25px 15px;
    margin-top: 15px;
    margin-bottom: 25px;
}
.modal-dinamica-banner p {
    font-size: 20px;
    margin: 0;
    line-height: 1.3;
}
.modal-dinamica-banner strong {
    font-weight: 700;
}
.modal-dinamica-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}
.modal-dinamica-subtitle {
    font-size: 14.5px;
    color: #333;
    margin-bottom: 30px;
}
.modal-dinamica-inputs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}
.dinamica-digit {
    width: 45px;
    height: 45px;
    font-size: 24px;
    text-align: center;
    border: none;
    border-bottom: 2px solid #ccc;
    background: transparent;
    border-radius: 0;
    padding: 0;
    font-weight: 500;
    color: #1a1a1a;
}
.dinamica-digit:focus {
    border-bottom: 2px solid #1a1a1a;
    outline: none;
}
.modal-dinamica-actions {
    display: flex;
    gap: 15px;
}
.modal-dinamica-actions button {
    margin-top: 0;
    flex: 1;
    border-radius: 25px;
    padding: 12px;
    font-size: 15px;
    box-shadow: none;
    font-weight: 700;
}
.btn-borrar {
    background-color: #fff;
    color: #999;
    border: 1px solid #ccc;
    cursor: pointer;
}
.btn-borrar:hover {
    background-color: #f5f5f5;
    color: #666;
}
.btn-continuar {
    background-color: #e0e0e0;
    color: #999;
    border: none;
}
.btn-continuar.active {
    background-color: #e0e0e0;
    color: #666;
    cursor: pointer;
}
