:root {
    --primary-blue: #1a73e8;
    --secondary-blue: #4285f4;
    --accent-orange: #ff6d00;
    --white: #ffffff;
    --gradient-start: #1a73e8;
    --gradient-end: #4285f4;
}

body {
    background: #f5f5f5;
    min-height: 100vh;
    color: #333333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Login Styles */
.login-container {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.login-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 0;
}

/* Left Section - Background Image */
.login-left {
    flex: 1;
    background-image: url('https://universityibc.s3.us-east-1.amazonaws.com/BANNER/OCHO.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 2rem;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.login-copyright-left {
    display: none;
}

/* Right Section - Login Form */
.login-right {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    min-height: 100vh;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-form-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: left;
    letter-spacing: 0.5px;
}

.title-blue {
    color: #1a73e8;
}

.title-orange {
    color: #ff6d00;
}

.login-subtitle {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-align: left;
}

.login-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #333333;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: left;
}

.login-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #ffffff;
    color: #333333;
}

.login-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.password-toggle:hover {
    color: #1a73e8;
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(90deg, #1a73e8 0%, #ff6d00 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 0.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.login-copyright-right {
    display: none;
}

.login-help-text {
    color: #666666;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    text-align: left;
}

.admin-shortcut-message {
    font-size: 0.85rem;
    color: #ff6d00;
    margin-top: 0.35rem;
}

.login-help-link {
    color: #1a73e8;
    text-decoration: underline;
    transition: color 0.2s;
}

.login-help-link:hover {
    color: #ff6d00;
}

/* Responsive Login */
@media (max-width: 992px) {
    .login-container {
        overflow-y: auto;
    }
    
    .login-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .login-left {
        min-height: 50vh;
        padding: 2rem 1rem;
        justify-content: flex-end;
    }
    
    .login-right {
        min-height: 50vh;
        padding: 2rem 1rem;
    }
    
}

@media (max-width: 768px) {
    .login-left {
        min-height: 40vh;
    }
    
    .login-right {
        min-height: 60vh;
    }
    
    .login-form-card {
        padding: 2rem 1.5rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 0;
    }
    
    .login-wrapper {
        box-shadow: none;
    }
    
    .login-left {
        min-height: 35vh;
        padding: 1.5rem 1rem;
    }
    
    .login-right {
        min-height: 65vh;
        padding: 1.5rem 1rem;
    }
    
    .login-form-card {
        padding: 1.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .login-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .login-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .login-help-text {
        font-size: 0.8rem;
        margin-top: 1rem;
    }
    
}

@media (max-width: 400px) {
    .login-title {
        font-size: 1.35rem;
    }
    
    .login-form-card {
        padding: 1.25rem;
    }
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    padding: 0.8rem;
}

.btn-primary:hover {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
}

.btn-accent {
    background-color: var(--accent-orange) !important;
    border-color: var(--accent-orange) !important;
    color: #fff !important;
    font-weight: 500;
    font-size: 1.1rem;
    transition: background 0.2s, border 0.2s;
}

.btn-accent:hover, .btn-accent:focus {
    background-color: #ff8c1a !important;
    border-color: #ff8c1a !important;
    color: #fff !important;
}

/* Company Cards */
.company-card[data-company="ibc"] {
    background: linear-gradient(135deg, #1a73e8 0%, #81d4fa 100%);
}

.company-card[data-company="cepal"] {
    background: linear-gradient(135deg, #7b1fa2 0%, #2196f3 100%);
}

.company-card[data-company="otras"] {
    background: linear-gradient(135deg, #ff6d00 0%, #ff8a65 100%);
}

.company-card[data-company="inteligenio"] {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-card[data-company="inteligenio"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.company-card[data-company="inteligenio"] .company-logo {
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.company-card[data-company="inteligenio"]:hover .company-logo {
    transform: scale(1.05);
}

.company-card[data-company="inteligenio"] h3 {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

.company-card {
    color: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    margin: 0.5rem;
    height: 100%;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s;
}

.company-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
}

.company-logo {
    max-width: 150px;
    height: auto;
    padding: 1rem;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}

.company-card h3 {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Video Cards */
.video-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.video-card .card-img-top {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.video-card .card-body {
    padding: 1rem;
}

.video-card .card-title {
    color: #000000;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.video-card .card-text {
    color: #333333;
    font-size: 0.9rem;
}

.text-justify {
    text-align: justify;
}

/* Admin Dashboard */
#adminSection {
    background: #12151c;
    color: #e9ecef;
}

#adminSection .text-muted {
    color: rgba(255, 255, 255, 0.72) !important;
}

#adminSection .form-label,
#adminSection .admin-card .form-label,
#adminSection label.form-label {
    color: #f8f9fa !important;
}

#adminSection .form-check-label,
#adminSection .company-permission-block label,
#adminSection .permission-checkboxes .form-check-label {
    color: #e9ecef !important;
}

#adminSection .admin-card .form-control,
#adminSection .admin-card .form-select {
    color: #f8f9fa;
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.25);
}

#adminSection .admin-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

#adminSection .admin-card .form-control:focus,
#adminSection .admin-card .form-select:focus {
    color: #f8f9fa;
    background-color: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.25);
}

.admin-card {
    background: rgba(24, 28, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e5e5e5;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.admin-card .card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #1a73e8, #ff6d00);
}

.admin-table-wrapper {
    max-height: 420px;
}

.admin-table-wrapper table {
    color: #f8f9fa;
}

.admin-table-wrapper thead th {
    position: sticky;
    top: 0;
    background: rgba(26, 115, 232, 0.95);
    z-index: 2;
    border-color: rgba(255, 255, 255, 0.12);
}

.admin-table-wrapper tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.admin-table-wrapper .user-select-col {
    width: 42px;
}

.admin-table-wrapper .user-status-badge {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.admin-table-wrapper .user-status-active {
    background-color: #198754;
    color: #fff;
}

.admin-table-wrapper .user-status-inactive {
    background-color: #6c757d;
    color: #fff;
}

.admin-table-wrapper .user-session-online {
    background-color: #0dcaf0;
    color: #000;
    font-size: 0.75rem;
}

.admin-table-wrapper .user-email-cell {
    color: #f8f9fa;
}

.admin-table-wrapper .user-actions-col {
    width: 130px;
    min-width: 130px;
}

.admin-table-wrapper .user-actions-cell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    margin: 0 auto;
    max-width: 128px;
}

.admin-table-wrapper .user-actions-cell .btn {
    width: 100%;
    padding: 0.25rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-table-wrapper .user-actions-cell .btn i {
    font-size: 0.85rem;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
}

.permissions-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.company-permission-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1rem;
}

.company-permission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.company-permission-header h6 {
    color: #ffffff;
}

.company-permission-subtitle {
    color: rgba(255, 255, 255, 0.72);
}

.company-permission-details {
    margin-top: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.75rem;
}

.company-permission-details.active {
    display: flex;
}

.permission-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.permission-checkboxes .form-check {
    min-width: 160px;
}

.permission-select {
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.permission-select option {
    color: #000;
}

.table-dark.table-striped>tbody>tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}

.table-dark.table-striped>tbody>tr:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.98);
}

.btn-close {
    background-color: var(--white);
    opacity: 0.8;
    z-index: 1050;
}

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

.presentacion-section-title {
    color: #555;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.presentacion-lang-switcher {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.presentacion-lang-switcher-label {
    font-weight: 600;
    color: #333;
    margin-right: 0.25rem;
}

.presentacion-lang-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 999px;
    cursor: pointer;
    margin: 0;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    background: #f8f9fa;
}

.presentacion-lang-radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.presentacion-lang-radio.is-active {
    border-color: var(--primary-blue);
    background: #e8f1fd;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.presentacion-lang-radio span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.presentacion-lang-radio-flag {
    width: 32px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.presentacion-language-prompt {
    color: #333;
    font-size: 1.35rem;
    font-weight: 600;
    text-align: center;
}

.presentacion-language-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    min-height: 220px;
    justify-content: center;
}

.presentacion-language-card:hover,
.presentacion-language-card:focus {
    transform: translateY(-4px);
    border-color: var(--primary-blue);
    box-shadow: 0 8px 22px rgba(26, 115, 232, 0.2);
    outline: none;
}

.presentacion-language-flag {
    width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.presentacion-language-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.presentacion-category-card-with-lang {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border: none;
    border-radius: 15px;
    padding: 1.5rem 1.25rem 1.75rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.gerencia-pasos-cintillo {
    background: linear-gradient(135deg, #2f8fd8 0%, #1a73e8 100%);
    border-radius: 14px;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 1.25rem;
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.28);
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    line-height: 1.35;
    text-transform: uppercase;
}

.presentacion-category-badge {
    width: 72px;
    height: 72px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.presentacion-category-title {
    color: #fff !important;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    margin: 0 0 1rem;
    text-transform: uppercase;
}

.presentacion-category-lang-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.85rem;
    text-align: center;
}

.presentacion-category-lang-options {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.presentacion-lang-btn {
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 110px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.presentacion-lang-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.presentacion-lang-btn span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
}

.presentacion-lang-flag {
    width: 64px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    .login-card {
        margin: 0.5rem;
    }

    .company-card {
        margin-bottom: 1rem;
    }

    .company-logo {
        max-width: 120px;
    }

    .video-thumbnail {
        height: 180px;
    }

    .video-title {
        font-size: 1rem;
    }

    .video-description {
        font-size: 0.8rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0.25rem;
    }

    .login-card {
        margin: 0.25rem;
    }

    .company-logo {
        max-width: 100px;
    }

    .video-thumbnail {
        height: 160px;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .company-card {
        transition: none;
    }
}

/* Soporte para modo oscuro */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0d47a1, #1565c0);
    }

    .card {
        background-color: rgba(45, 45, 45, 0.95);
    }

    .video-description {
        color: #ccc;
    }
}

/* Oculta el botón de descarga en los controles nativos de video */
video::-internal-media-controls-download-button {
    display: none !important;
}
video::-webkit-media-controls-enclosure {
    overflow: hidden !important;
}
video::-webkit-media-controls-panel {
    display: flex !important;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: #000 !important;
}

.custom-modal-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
}
.custom-modal-content {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #181c24;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 2100;
    padding: 1.5rem 1rem 1rem 1rem;
    min-width: 340px;
    max-width: 90vw;
    width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pdf-modal-content {
    width: min(900px, 95vw);
    max-width: 95vw;
    height: min(90vh, 90dvh);
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem 1.25rem;
    position: relative;
    overflow: hidden;
}

.pdf-viewer-wrapper {
    flex: 1;
    min-height: 0;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.pdf-canvas-container {
    width: 100%;
    padding: 0.35rem 0;
}

.pdf-canvas-page-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
    background: #ececec;
}

.pdf-canvas-page {
    max-width: 100%;
    height: auto;
    display: block;
}

.pdf-loading,
.pdf-viewer-fallback {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #333;
}

.pdf-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
    flex-shrink: 0;
    width: 100%;
}

.pdf-viewer-wrapper iframe,
.pdf-viewer-container iframe {
    width: 100%;
    min-height: 100%;
    height: 100%;
    border: none;
    background: #fff;
    display: block;
}

html.pdf-scroll-locked,
body.pdf-scroll-locked {
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
    touch-action: none;
    overscroll-behavior: none;
}

body.pdf-scroll-locked {
    position: fixed;
    inset: 0;
}

#pdfViewerModal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
}

#pdfViewerModal.pdf-modal-open {
    display: flex;
}

#pdfViewerModal .custom-modal-bg {
    position: absolute;
    inset: 0;
}

#pdfViewerModal .custom-modal-content.pdf-modal-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0;
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    box-sizing: border-box;
}

#pdfViewerModal .pdf-viewer-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    touch-action: pan-y;
}

#pdfViewerModal .pdf-canvas-container {
    min-height: min-content;
}

@media (max-width: 1024px) {
    #pdfViewerModal .pdf-modal-content {
        padding: 0.65rem;
        padding-top: max(0.65rem, env(safe-area-inset-top));
        padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
    }

    #pdfViewerModal .pdf-viewer-wrapper {
        border-radius: 8px;
    }
}
.pdf-viewer-wrapper:fullscreen,
.pdf-viewer-wrapper:-webkit-full-screen,
.pdf-viewer-container iframe:fullscreen,
.pdf-viewer-container iframe:-webkit-full-screen,
.pdf-viewer-wrapper.is-pseudo-fullscreen-target {
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    background: #fff;
}

.pdf-viewer-wrapper:fullscreen iframe,
.pdf-viewer-wrapper:-webkit-full-screen iframe,
.pdf-viewer-wrapper.is-pseudo-fullscreen-target iframe {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

html.viewer-expanded-active,
html.viewer-expanded-active body {
    overflow: hidden !important;
}

#pdfViewerModal.is-viewer-expanded {
    z-index: 3000;
}

#pdfViewerModal.is-viewer-expanded .custom-modal-content.pdf-modal-content {
    padding: 0;
    background: #000;
}

#pdfViewerModal.is-viewer-expanded .pdf-viewer-wrapper {
    flex: 1 1 auto;
    border-radius: 0;
    touch-action: pan-y;
}

#pdfViewerModal.is-viewer-expanded .pdf-modal-close {
    z-index: 3100;
    top: max(10px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    color: #dc3545;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    width: 2.5rem;
    height: 2.5rem;
    line-height: 2.5rem;
    text-align: center;
}

#pdfViewerModal.is-viewer-expanded .pdf-modal-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    z-index: 3100;
    margin: 0;
    padding: 0 0.75rem;
    pointer-events: none;
}

#pdfViewerModal.is-viewer-expanded .pdf-modal-actions .btn {
    pointer-events: auto;
}

#pdfViewerModal.is-viewer-expanded #pdfOpenExternalBtn {
    display: none;
}

.pdf-viewer-container.is-viewer-expanded {
    position: fixed;
    inset: 0;
    z-index: 3000;
    margin: 0;
    padding: 0;
    border-radius: 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    background: #000;
}

.pdf-viewer-container.is-viewer-expanded .pdf-viewer-wrapper {
    position: fixed;
    inset: 0;
    max-height: none;
    height: 100dvh;
    border-radius: 0;
}

.pdf-viewer-container.is-viewer-expanded .pdf-modal-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    z-index: 3100;
    margin: 0;
    padding: 0 0.75rem;
}
.custom-modal-close {
    position: absolute;
    top: 10px;
    right: 18px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2200;
    line-height: 1;
    padding: 0;
}

#pdfViewerModal .pdf-modal-close {
    color: #dc3545;
    font-size: 2.4rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

#pdfViewerModal .pdf-modal-close:hover,
#pdfViewerModal .pdf-modal-close:focus {
    color: #b02a37;
    outline: none;
}
#customPlayer {
    width: 100%;
    max-height: 60vh;
    background: #000;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}
.custom-controls {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #23272f;
    border-radius: 6px;
    padding: 0.5rem 0.7rem;
    margin-top: 0.2rem;
}
.custom-controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0.3rem;
}
.custom-controls input[type=range] {
    flex: 1;
    accent-color: #1a73e8;
    height: 3px;
}
#currentTime, #duration {
    color: #fff;
    font-size: 0.95rem;
    min-width: 45px;
    text-align: center;
}
@media (max-width: 600px) {
    .custom-modal-content {
        width: 98vw;
        min-width: unset;
        padding: 0.5rem 0.2rem 0.7rem 0.2rem;
    }
    #customPlayer {
        max-height: 40vh;
    }
    .custom-controls {
        flex-direction: column;
        gap: 0.3rem;
    }
}

.audio-card {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    transition: transform 0.3s ease;
}

.audio-card:hover {
    transform: translateY(-5px);
}

.audio-card .card-body {
    padding: 1.5rem;
}

.audio-card audio {
    margin-top: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.audio-card audio::-webkit-media-controls-panel {
    background: rgba(255, 255, 255, 0.1);
}

.audio-card audio::-webkit-media-controls-current-time-display,
.audio-card audio::-webkit-media-controls-time-remaining-display {
    color: white;
}

.audio-card audio::-webkit-media-controls-timeline {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    margin-left: 10px;
    margin-right: 10px;
}

.audio-card audio::-webkit-media-controls-volume-slider {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding-left: 8px;
    padding-right: 8px;
}

/* Folder Styles */
.folder-card {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.8) 0%, rgba(66, 133, 244, 0.8) 100%);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.folder-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.95) 0%, rgba(66, 133, 244, 0.95) 100%);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.folder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.folder-title {
    color: #fff;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Footer */
.site-footer {
    background: #1a73e8;
    color: #ffffff;
    font-weight: 500;
}

/* Ajustes para el botón de volver */
.btn-secondary {
    background: rgba(108, 117, 125, 0.8);
    border: none;
    color: #fff;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(108, 117, 125, 1);
    color: #fff;
}

/* Estilos para la sección de videoteca */
#videotecaSection {
    background: #f5f5f5;
}

#videotecaSection h2 {
    color: #666666;
    font-weight: 600;
}

#videotecaSection .text-white {
    color: #666666 !important;
}

#videotecaSection .recorrido-subfolder-title {
    font-size: 1rem;
    line-height: 1.5;
    text-align: justify;
    text-justify: inter-word;
}

#videotecaSection .recorrido-subnivel-highlight {
    color: #f0b400 !important;
    font-weight: 600;
}

.recorrido-subfolder-title-main,
.recorrido-subfolder-title-sub {
    display: block;
    text-align: justify;
    text-justify: inter-word;
}

.recorrido-subfolder-title-sub {
    margin-top: 0.65rem;
    font-size: 0.92rem;
}

@media (min-width: 768px) {
    #videotecaSection .recorrido-subfolder-title {
        font-size: 1.08rem;
    }

    .recorrido-subfolder-title-sub {
        font-size: 0.98rem;
    }
}

/* Input de búsqueda */
#videoSearch {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333333;
    border-radius: 8px;
}

#videoSearch:focus {
    background: #ffffff;
    border-color: #1a73e8;
    color: #333333;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

#videoSearch::placeholder {
    color: #999999;
}

#companiesSection {
    background: #f5f5f5;
}

#companiesSection h2 {
    color: #666666;
    font-weight: 600;
}

#logoutButton {
    z-index: 3100;
    top: 0;
}
.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-danger:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: #fff !important;
}

/* Ajustes para las tarjetas de video y audio dentro de las carpetas */
.folder-content .video-card,
.folder-content .audio-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.folder-content .video-card:hover,
.folder-content .audio-card:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Botón estandarizado "Volver" */
.standard-back-button {
    background-color: #1a73e8 !important;
    border-color: #1a73e8 !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.standard-back-button:hover {
    background-color: #1557b0 !important;
    border-color: #1557b0 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3) !important;
}

.standard-back-button:active {
    background-color: #0d47a1 !important;
    border-color: #0d47a1 !important;
    transform: translateY(0);
}

/* Estandarizar botones del modal de contraseña */
#accessCodeModal .modal-footer .btn {
    min-width: 120px;
    padding: 10px 20px !important;
    font-weight: 500;
}

/* Estilos para el visor de PDF de Malla Curricular */
.pdf-viewer-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.pdf-viewer-container .pdf-viewer-wrapper {
    min-height: 60vh;
    max-height: 75vh;
}

.pdf-viewer-container iframe {
    width: 100%;
    min-height: 60vh;
    height: 75vh;
    border: none;
    border-radius: 8px;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .pdf-viewer-container {
        padding: 10px;
    }

    .pdf-viewer-container .pdf-viewer-wrapper {
        min-height: 55vh;
        max-height: 65vh;
    }

    .pdf-viewer-container iframe {
        min-height: 55vh;
        height: 65vh;
    }
}

/* ===== Modal Seguimiento (UX claro, alto contraste) ===== */
#userActivityModal .activity-modal-content {
    background: #f7f9fc !important;
    color: #1f2937 !important;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

#userActivityModal .activity-modal-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
}

#userActivityModal .activity-modal-header .modal-title {
    color: #111827 !important;
    font-weight: 700;
    font-size: 1.15rem;
}

#userActivityModal .activity-modal-body {
    background: #f7f9fc !important;
    color: #1f2937 !important;
    padding: 1.25rem;
    max-height: min(70vh, 720px);
}

#userActivityModal .activity-modal-footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

#userActivityModal .activity-loading,
#userActivityModal .activity-empty,
#userActivityModal .activity-error {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    color: #374151 !important;
    font-weight: 500;
}

#userActivityModal .activity-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b !important;
}

#userActivityModal .activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#userActivityModal .activity-session-card {
    background: #ffffff !important;
    border: 1px solid #dbe3f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

#userActivityModal .activity-session-header {
    background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
    border-bottom: 1px solid #dbeafe;
    padding: 0.95rem 1.1rem;
    color: #111827 !important;
}

#userActivityModal .activity-session-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

#userActivityModal .activity-session-title-row strong {
    color: #1d4ed8;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

#userActivityModal .activity-live-badge {
    display: inline-flex;
    align-items: center;
    background: #dcfce7;
    color: #166534 !important;
    border: 1px solid #86efac;
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
}

#userActivityModal .activity-session-line {
    color: #111827 !important;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

#userActivityModal .activity-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    color: #374151 !important;
    font-size: 0.92rem;
}

#userActivityModal .activity-session-body {
    background: #ffffff !important;
    color: #1f2937 !important;
    padding: 1rem 1.1rem 1.15rem;
}

#userActivityModal .activity-section + .activity-section {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid #eef2f7;
}

#userActivityModal .activity-section h6 {
    color: #111827 !important;
    font-weight: 700;
    font-size: 0.98rem;
    margin-bottom: 0.65rem;
}

#userActivityModal .activity-empty-inline {
    margin: 0;
    color: #4b5563 !important;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    font-size: 0.92rem;
}

#userActivityModal .activity-video-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

#userActivityModal .activity-video-list li {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

#userActivityModal .activity-video-title {
    color: #0f172a !important;
    font-weight: 700;
}

#userActivityModal .activity-video-meta {
    color: #475569 !important;
    font-size: 0.88rem;
}

#userActivityModal .activity-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

#userActivityModal .activity-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    color: #111827 !important;
    background: #ffffff !important;
}

#userActivityModal .activity-table thead th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

#userActivityModal .activity-table tbody td {
    background: #ffffff !important;
    color: #1f2937 !important;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
    font-size: 0.9rem;
}

#userActivityModal .activity-table tbody tr:nth-child(even) td {
    background: #f8fafc !important;
}

#userActivityModal .activity-table tbody tr:last-child td {
    border-bottom: none;
}

#userActivityModal .activity-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.18rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

#userActivityModal .activity-pill-nav_company,
#userActivityModal .activity-pill-nav_folder,
#userActivityModal .activity-pill-nav_card {
    background: #dbeafe;
    color: #1e40af !important;
    border-color: #93c5fd;
}

#userActivityModal .activity-pill-video_open,
#userActivityModal .activity-pill-video_watch {
    background: #ffedd5;
    color: #9a3412 !important;
    border-color: #fdba74;
}

#userActivityModal .activity-pill-pdf_open {
    background: #fee2e2;
    color: #991b1b !important;
    border-color: #fca5a5;
}

@media (max-width: 768px) {
    #userActivityModal .activity-session-meta {
        flex-direction: column;
        gap: 0.35rem;
    }

    #userActivityModal .activity-table thead th,
    #userActivityModal .activity-table tbody td {
        font-size: 0.82rem;
        padding: 0.55rem 0.6rem;
    }
}

.access-countdown-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.7rem 1rem;
    background: linear-gradient(90deg, #b45309, #f59e0b);
    color: #1a1203;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.access-countdown-units {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.7rem;
}

.access-countdown-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 4.2rem;
    line-height: 1.05;
}

.access-countdown-unit b {
    font-variant-numeric: tabular-nums;
    font-size: 1.35rem;
    letter-spacing: 0.03em;
}

.access-countdown-unit small {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: lowercase;
}

body.has-access-countdown {
    padding-top: 72px;
}

@media (max-width: 576px) {
    .access-countdown-banner {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.75rem 0.85rem 0.85rem;
        text-align: center;
        line-height: 1.25;
    }

    .access-countdown-unit b {
        font-size: 1.25rem;
    }

    .access-countdown-units {
        width: 100%;
    }

    body.has-access-countdown #videotecaSection > .container,
    body.has-access-countdown #companiesSection > .container {
        padding-top: 1.15rem;
    }

    body.has-access-countdown #videotecaSection h2 {
        margin-top: 0.35rem;
        margin-bottom: 1.15rem;
    }
}

/* Reproductor nativo: acciones + reproducción continua */
#nativeVideoModal .native-player-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    width: 100%;
    max-width: 800px;
}

#nativeVideoModal .continuous-playback-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    user-select: none;
}

#nativeVideoModal .continuous-playback-toggle input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #f59e0b;
    cursor: pointer;
}

#nativeVideoModal .continuous-playback-toggle span {
    color: #fff;
}

#nativeVideoModal #nativeFullscreenBtn {
    margin-top: 0;
} 