:root {
    /* Colores para botones*/
    --primary-color: #003F5F;
    --secondary-color: #EDC11C;
    --inactive-color: #dcdfe1;
    
    --header-color: #ffffff;
    --text-color-active: #000000;
    --text-color-inactive: #6c757d;
    --success-color: #28a745;
    --error-color: #dc3545;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url('../img/left-photo.jpg') center center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Overlay negro con 40% de opacidad */
    z-index: 1;
    pointer-events: none; /* Permite que los clics pasen a través del overlay */
}

.header {
    position: relative;
    display: flex;
    align-items: center;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding-left: 30px;
    flex-shrink: 0;
    z-index: 2;
}

.header-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    /* Naranja BCP */
}

.header img {
    height: 32px;
    z-index: 1;
}

.main-content {
    flex: 1;
    display: flex;
    min-height: calc(100vh - 60px - 40px);
    /* 100vh - header - footer */
    position: relative;
    z-index: 2;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.center-panel {
    background: transparent;
    backdrop-filter: none;
    border-right: none;
    width: 100% !important;
    max-width: 90vw !important; /* Aumentar a 90% del viewport width */
    min-width: 900px; /* Ancho mínimo para asegurar que sea grande */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px; /* o como prefieras */
}

/* Elimino overlays de los paneles */
.right-panel::before, .center-panel::before, .right-panel::after, .center-panel::after {
    content: none !important;
    display: none !important;
}

.right-panel > * {
    position: relative;
    z-index: 2;
}

.content-area {
    max-width: 600px;
    width: 100%;
}
.login-box {
    background: #fff;
    padding: 30px 25px 25px 25px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    border: 1px solid #e9ecef;
    margin: 0 auto;
}

.login-box h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-color);
    text-align: center;
    letter-spacing: -0.025em;
}

.login-box input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    margin: 8px auto 20px auto;
    display: block;
    padding: 10px 12px;
    padding-right: 40px;
    /* Espacio para el check */
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    background: #f9fafb;
    transition: all 0.3s ease;
    position: relative;
}

.input-container {
    position: relative;
    width: 100%;
}

.check-icon,
.cross-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.check-icon {
    color: var(--success-color);
}

.cross-icon {
    color: var(--error-color);
}

.check-icon.show,
.cross-icon.show {
    opacity: 1;
}

/* Estados del input */
.input-valid {
    border-color: var(--success-color) !important;
    background-color: #f8fff9 !important;
}

.input-invalid {
    border-color: var(--error-color) !important;
    background-color: #f8f9fa !important;
}

.cross-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--error-color);
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cross-icon.show {
    opacity: 1;
}

.input-valid {
    border-color: var(--success-color) !important;
    background-color: #f8fff9 !important;
}

.input-invalid {
    border-color: var(--error-color) !important;
    background-color: #f9c1c1 !important;
}

.login-box input[type="text"]:focus {
    border: 1.5px solid var(--primary-color);
    outline: none;
    background: #fff;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--inactive-color);
    color: var(--text-color-inactive);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: not-allowed;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    letter-spacing: -0.01em;
    opacity: 0.6;
}

.btn.secondary {
    background: var(--secondary-color);
    color: #fff;
    cursor: pointer;
    opacity: 1;
}

.btn.primary {
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    opacity: 1;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.response {
    margin-top: 18px;
    text-align: center;
    color: var(--error-color);
    min-height: 24px;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(224, 224, 224, 0.5);
    padding: 10px 40px;
    color: #888;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.footer-left {
    text-align: left;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: right;
}

.footer-logo {
    height: 22px;
    margin-bottom: 5px;
    vertical-align: middle;
}

.loading-message {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: #444;
    font-weight: 500;
    font-size: 16px;
    padding-top: 20px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
}

.success-message {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--success-color);
    font-weight: 500;
    font-size: 16px;
    padding-top: 20px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
}

.loading-dots {
    display: inline-block;
    width: 24px;
    text-align: left;
}

.loading-dots span {
    display: inline-block;
    animation: blink 1.4s infinite both;
    font-weight: bold;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {

    0%,
    80%,
    100% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }
}

.iframe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    margin: 0 auto;
}

.iframe-container iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 8px;
    max-width: 800px;
}

#iframe-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
#biolink-iframe {
    width: 100%;
    min-width: 320px;
    height: 80vh;
    border-radius: 8px;
    background: #fff;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: calc(100vh - 60px - 80px);
        padding: 20px 15px;
        overflow-y: auto;
        display: flex;
    }

    .center-panel {
        max-width: 85vw !important;
        min-width: auto !important;
        padding: 20px;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        flex: 1;
    }

    .document-container {
        max-width: 85vw !important;
        width: 85vw !important;
        min-width: auto !important;
        padding: 20px !important;
        min-height: calc(100vh - 140px) !important;
        max-height: calc(100vh - 140px) !important;
        margin-top: 35px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box;
    }

    .login-box {
        padding: 35px 30px 30px 30px;
        max-width: 80vw;
        border-radius: 12px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
        max-height: 90vh;
        overflow-y: auto;
    }

    .login-box h2 {
        font-size: 24px !important;
        margin-bottom: 25px;
    }

    .login-box input[type="text"] {
        font-size: 18px !important;
        padding: 15px 12px;
        margin-bottom: 25px;
    }

    .btn {
        font-size: 18px !important;
        padding: 16px 20px;
        margin-top: 15px;
    }

    .header {
        padding-left: 20px;
        height: 60px;
        flex-shrink: 0;
    }

    .header img {
        height: 35px;
    }

    .footer {
        padding: 12px 20px;
        font-size: 14px;
        flex-shrink: 0;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 8px;
    }

    .footer-left {
        text-align: center;
        width: 100%;
    }

    .footer-right {
        text-align: center;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .footer-logo {
        height: 25px;
    }

    /* Aumentar tamaños para elementos de archivo */
    .file-preview {
        padding: 16px 20px;
        margin-top: 15px;
        min-height: 70px;
    }

    .file-name {
        font-size: 16px;
    }

    .file-icon {
        width: 28px;
        height: 28px;
    }

    .remove-file-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }

    .remove-file-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Área de subida mejorada para móviles */
    .upload-area {
        padding: 40px 25px;
        min-height: 140px;
    }

    .upload-icon {
        font-size: 40px;
    }

    .upload-text {
        font-size: 18px;
    }

    .upload-hint {
        font-size: 15px;
    }

    /* Aumentar tamaños para el visor de documentos */
    .document-header {
        padding: 20px 25px;
    }

    .document-title {
        font-size: 13px !important;
    }

    .btn-download {
        font-size: 16px;
        padding: 12px 20px;
    }

    /* Visor de PDF en móviles */
    #pdfjs-viewer-container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
        box-sizing: border-box;
        width: calc(100% - 30px) !important;
        display: contents !important;
    }

    #pdfjs-viewer {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 15px !important;
        padding-bottom: 15px !important;
        box-sizing: border-box;
    }

    /* Mensajes de error en móviles */
    .document-container p {
        color: #000 !important;
    }

    .document-container h2 {
        color: #000 !important;
    }

    /* Aviso de cookies y cámara en móviles */
    .camera-cookie-notice {
        padding: 12px !important;
        margin-bottom: 15px !important;
        border-radius: 6px !important;
    }

    .camera-cookie-notice p {
        font-size: 13px !important;
    }

    .camera-cookie-notice p:last-child {
        font-size: 12px !important;
    }

    /* Bloquear scroll no deseado en /view */
    #pdfjs-viewer-container {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevenir scroll en el body y html en móviles */
    body, html {
        overflow-x: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }

    .main-content {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 480px) {
    .main-content {
        min-height: calc(100vh - 60px - 80px);
        padding: 15px 12px;
        justify-content: center;
        display: flex;
    }

    .center-panel {
        max-width: 90vw !important;
        padding: 15px;
        margin: 0;
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .document-container {
        max-width: 90vw !important;
        width: 90vw !important;
        min-width: auto !important;
        padding: 20px !important;
        min-height: calc(100vh - 120px) !important;
        max-height: calc(100vh - 120px) !important;
        margin-top: 35px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box;
    }

    .login-box {
        padding: 30px 25px 25px 25px;
        max-width: 85vw;
        border-radius: 10px;
        margin: 0 auto;
        max-height: 85vh;
        overflow-y: auto;
    }

    .login-box h2 {
        font-size: 22px !important;
        margin-bottom: 20px;
    }

    .login-box input[type="text"] {
        font-size: 17px !important;
        padding: 14px 12px;
        margin-bottom: 20px;
    }

    .btn {
        font-size: 17px !important;
        padding: 15px 18px;
        margin-top: 12px;
    }

    .header {
        padding-left: 15px;
        height: 55px;
        flex-shrink: 0;
    }

    .header img {
        height: 30px;
    }

    .footer {
        padding: 10px 15px;
        font-size: 13px;
        flex-shrink: 0;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 6px;
    }

    .footer-left {
        text-align: center;
        width: 100%;
    }

    .footer-right {
        text-align: center;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .footer-logo {
        height: 22px;
    }

    /* Aumentar tamaños para elementos de archivo */
    .file-preview {
        padding: 14px 18px;
        margin-top: 12px;
        min-height: 65px;
    }

    .file-name {
        font-size: 15px;
    }

    .file-icon {
        width: 26px;
        height: 26px;
    }

    .remove-file-btn {
        min-width: 42px;
        min-height: 42px;
        padding: 9px;
    }

    .remove-file-btn svg {
        width: 19px;
        height: 19px;
    }

    /* Área de subida mejorada para móviles */
    .upload-area {
        padding: 35px 22px;
        min-height: 130px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .upload-text {
        font-size: 17px;
    }

    .upload-hint {
        font-size: 14px;
    }

    /* Aumentar tamaños para el visor de documentos */
    .document-header {
        padding: 18px 22px;
    }

    .document-title {
        font-size: 13px !important;
    }

    .btn-download {
        font-size: 15px;
        padding: 11px 18px;
    }

    /* Visor de PDF en móviles */
    #pdfjs-viewer-container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
        box-sizing: border-box;
        width: calc(100% - 30px) !important;
        display: contents !important;
    }

    #pdfjs-viewer {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 15px !important;
        padding-bottom: 15px !important;
        box-sizing: border-box;
    }

    /* Mensajes de error en móviles */
    .document-container p {
        color: #000 !important;
    }

    .document-container h2 {
        color: #000 !important;
    }

    /* Aviso de cookies y cámara en móviles */
    .camera-cookie-notice {
        padding: 12px !important;
        margin-bottom: 15px !important;
        border-radius: 6px !important;
    }

    .camera-cookie-notice p {
        font-size: 13px !important;
    }

    .camera-cookie-notice p:last-child {
        font-size: 12px !important;
    }

    /* Bloquear scroll no deseado en /view */
    #pdfjs-viewer-container {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevenir scroll en el body y html en móviles */
    body, html {
        overflow-x: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }

    .main-content {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 360px) {
    .main-content {
        min-height: calc(100vh - 50px - 70px);
        padding: 12px 10px;
        justify-content: center;
        display: flex;
    }

    .center-panel {
        max-width: 92vw !important;
        padding: 12px;
        margin: 0;
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .document-container {
        max-width: 92vw !important;
        width: 92vw !important;
        min-width: auto !important;
        padding: 15px !important;
        min-height: calc(100vh - 110px) !important;
        max-height: calc(100vh - 110px) !important;
        margin-top: 35px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box;
    }

    .login-box {
        padding: 25px 20px 20px 20px;
        max-width: 88vw;
        border-radius: 8px;
        margin: 0 auto;
        max-height: 80vh;
        overflow-y: auto;
    }

    .login-box h2 {
        font-size: 20px !important;
        margin-bottom: 18px;
    }

    .login-box input[type="text"] {
        font-size: 16px !important;
        padding: 13px 10px;
        margin-bottom: 18px;
    }

    .btn {
        font-size: 16px !important;
        padding: 14px 16px;
        margin-top: 10px;
    }

    .header {
        padding-left: 12px;
        height: 50px;
        flex-shrink: 0;
    }

    .header img {
        height: 26px;
    }

    .footer {
        padding: 8px 12px;
        font-size: 12px;
        flex-shrink: 0;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 5px;
    }

    .footer-left {
        text-align: center;
        width: 100%;
    }

    .footer-right {
        text-align: center;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .footer-logo {
        height: 20px;
    }

    /* Aumentar tamaños para elementos de archivo */
    .file-preview {
        padding: 12px 16px;
        margin-top: 10px;
        min-height: 60px;
    }

    .file-name {
        font-size: 14px;
    }

    .file-icon {
        width: 24px;
        height: 24px;
    }

    .remove-file-btn {
        min-width: 40px;
        min-height: 40px;
        padding: 8px;
    }

    .remove-file-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Área de subida mejorada para móviles */
    .upload-area {
        padding: 30px 20px;
        min-height: 120px;
    }

    .upload-icon {
        font-size: 32px;
    }

    .upload-text {
        font-size: 16px;
    }

    .upload-hint {
        font-size: 13px;
    }

    /* Aumentar tamaños para el visor de documentos */
    .document-header {
        padding: 16px 20px;
    }

    .document-title {
        font-size: 13px !important;
    }

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

    /* Visor de PDF en móviles */
    #pdfjs-viewer-container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
        box-sizing: border-box;
        width: calc(100% - 30px) !important;
        display: contents !important;
    }

    #pdfjs-viewer {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 15px !important;
        padding-bottom: 15px !important;
        box-sizing: border-box;
    }

    /* Mensajes de error en móviles */
    .document-container p {
        color: #000 !important;
    }

    .document-container h2 {
        color: #000 !important;
    }

    /* Aviso de cookies y cámara en móviles */
    .camera-cookie-notice {
        padding: 12px !important;
        margin-bottom: 15px !important;
        border-radius: 6px !important;
    }

    .camera-cookie-notice p {
        font-size: 13px !important;
    }

    .camera-cookie-notice p:last-child {
        font-size: 12px !important;
    }

    /* Bloquear scroll no deseado en /view */
    #pdfjs-viewer-container {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevenir scroll en el body y html en móviles */
    body, html {
        overflow-x: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }

    .main-content {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 500px) {
    .login-box {
        padding: 25px 20px 20px 20px;
    }

    .header {
        padding-left: 10px;
    }


}

@media (max-width: 600px) {
    .footer {
        flex-direction: column;
        gap: 8px;
        padding: 18px 10px 10px 10px;
    }

    .footer-left,
    .footer-right {
        text-align: center;
        width: 100%;
    }
}

/* Estilos para la vista previa del archivo */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border: 1px dashed var(--primary-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    transition: all 0.3s ease;
    min-height: 60px; /* Altura mínima para móviles */
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.file-name {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--text-color-active);
    font-weight: 500;
    word-break: break-all;
    line-height: 1.4;
}

.remove-file-btn {
    background: none;
    border: none;
    padding: 8px; /* Aumentar área de toque para móviles */
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; /* Área mínima de toque */
    min-height: 40px; /* Área mínima de toque */
}

.remove-file-btn:hover {
    background: var(--primary-color);
    color: white;
}

.remove-file-btn svg {
    width: 18px; /* Aumentar tamaño del ícono */
    height: 18px;
}

/* Área de subida de archivos mejorada para móviles */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px; /* Altura mínima para móviles */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #e6f3ff;
}

.upload-icon {
    font-size: 32px; /* Ícono más grande para móviles */
    color: #666;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 16px; /* Texto más grande para móviles */
    color: #666;
    font-weight: 500;
}

.upload-hint {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

/* Estilos para el visor de documentos */
.document-viewer {
    width: 100%;
    height: 80vh;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.document-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-title {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.document-actions {
    display: flex;
    gap: 10px;
}

.btn-download {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download:hover {
    background: #002a3f;
}

.document-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 800px;
    min-width: 600px;
    min-height: calc(100vh - 120px);
}

.document-iframe {
    flex: 1;
    border: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
    min-height: 70vh; /* Asegurar altura mínima */
}

/* Estilos específicos para la página de visualización */
.document-container .document-iframe {
    width: 100% !important;
    height: calc(100vh - 200px) !important; /* Usar toda la altura disponible */
    min-height: 600px !important;
    max-height: none !important;
}

/* Estilos específicos para la página /document/{token}/view */
body .main-content .center-panel .document-container {
    max-width: 85vw !important;
    width: 85vw !important;
    min-width: auto !important;
    padding: 10px !important;
    height: calc(100vh - 200px) !important; /* Asegurar que el contenedor también respete el footer */
}

body .main-content .center-panel .document-container .document-iframe {
    width: 100% !important;
    height: calc(100vh - 200px) !important; /* Altura calculada que siempre cabe */
}

/* Estilos que sobrescriben el visor nativo del navegador */
.document-iframe .pdfViewer,
.document-iframe .pdfViewerContainer {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
}

/* Protección adicional contra inspección */
* {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-context-menu: none !important;
    -moz-context-menu: none !important;
    context-menu: none !important;
}

/* Bloquear clic derecho específicamente */
html, body, div, span, iframe, img, a, button, input, textarea {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    pointer-events: auto !important;
}

/* Protección específica para iframes */
iframe {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    pointer-events: auto !important;
}

/* Protección para el iframe del documento */
.document-iframe {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    pointer-events: auto !important;
    position: relative !important;
}

/* Ocultar herramientas del PDF cuando sea posible */
.document-iframe {
    /* Intentar ocultar barras de herramientas del PDF */
    -webkit-filter: contrast(1) brightness(1) !important;
}

/* CSS para ocultar elementos específicos del visor de PDF */
.document-iframe[src*="download"] {
    /* Aplicar estilos específicos para el endpoint de descarga */
    border: none !important;
}

/* CSS más agresivo para ocultar herramientas del PDF */
.document-iframe {
    /* Ocultar cualquier elemento que parezca una barra de herramientas */
    background: white !important;
}

/* Intentar ocultar elementos específicos del PDF viewer */
.document-iframe[src*="download"] {
    /* Forzar que el PDF se muestre sin herramientas */
    border: none !important;
    background: white !important;
}

/* Contenedor del iframe con overlay */
.iframe-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Overlay transparente para bloquear clic derecho en el iframe */
.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9999;
    pointer-events: none; /* Cambiar a none para permitir scroll */
    cursor: default;
    /* Permitir que el scroll funcione */
    overflow: visible;
    /* No bloquear eventos de scroll */
    touch-action: pan-x pan-y;
}

/* Estilos específicos para móviles - asegurar contenido completo */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    
    body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .main-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    }
    
    .center-panel {
        width: 100%;
        max-width: 95vw !important;
        min-width: auto !important;
    }
    
    .login-box {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Asegurar que el footer siempre esté visible */
.footer {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

/* Asegurar que el header siempre esté visible */
.header {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

/* Estilos para el aviso de cookies y cámara */
.camera-cookie-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.camera-cookie-notice p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.4;
}

.camera-cookie-notice p:first-child {
    margin-bottom: 8px;
    font-weight: 600;
}

.camera-cookie-notice p:last-child {
    font-size: 13px;
    opacity: 0.9;
}
