/* ================================================
   CAPACITACIONES — WIRESERVICE — DISEÑO PREMIUM
   ================================================ */

:root {
    --bg:           #F7FAFB;
    --bg-alt:       #FFFFFF;
    --bg-dark:      #0D1B2A;
    --text:         #0F1F2E;
    --text-muted:   #4A6375;
    --teal:         #17B89A;
    --teal-glow:    rgba(23, 184, 154, .2);
    --violet:       #7C3AED;
    --border:       #DDE6ED;
    --radius:       12px;
    --radius-lg:    24px;
    --shadow:       0 10px 30px rgba(15, 31, 46, 0.08);
    --shadow-lg:    0 20px 50px rgba(15, 31, 46, 0.13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
h1, h2, h3 { font-family: 'Outfit', sans-serif; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.hidden { display: none !important; }
.highlight { color: var(--teal); }

/* ── LANDING HERO ─────────────────────────────────────────────────────── */
.landing-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 5rem;
    padding-bottom: 4rem;
    background:
        radial-gradient(ellipse at 10% 10%, rgba(23,184,154,0.07) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 90%, rgba(124,58,237,0.05) 0%, transparent 45%),
        var(--bg);
    transition: filter 0.3s;
}

/* Nav superior */
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 3rem;
}
.landing-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.landing-back:hover { color: var(--teal); }

/* Cabecera de contenido */
.hero-content { text-align: center; }

.badge {
    display: inline-block;
    background: var(--teal-glow);
    color: var(--teal);
    padding: 0.45rem 1.2rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-content > p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 3rem;
}

.landing-hint {
    margin-top: 2.5rem !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    max-width: 400px !important;
}

/* ── GRID DIRECTA EN LANDING ──────────────────────────────────────────── */
.company-direct-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 850px) {
    .company-direct-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── TARJETAS DE EMPRESA ──────────────────────────────────────────────── */
.selection-card {
    background: var(--bg-alt);
    padding: 2.5rem 1.75rem 2rem;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    cursor: pointer;
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.35s ease,
                border-color 0.25s ease;
    animation: cardIn 0.4s ease both;
    position: relative;
    overflow: hidden;
}

.selection-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(23,184,154,0.04), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.selection-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg), 0 0 0 1.5px rgba(23,184,154,0.25);
    border-color: var(--teal);
}
.selection-card:hover::after { opacity: 1; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.company-logo-box {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.logo-circle {
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    border: 1.5px solid var(--border);
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.selection-card:hover .logo-circle {
    box-shadow: 0 8px 24px rgba(23,184,154,0.18);
}
.logo-circle img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.selection-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text);
}
.card-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(23,184,154,0.08);
    color: var(--teal);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    transition: background 0.2s, gap 0.2s;
}
.selection-card:hover .card-cta {
    background: var(--teal);
    color: white;
    gap: 10px;
}

/* Skeleton loader */
.skeleton-card {
    height: 280px;
    background: linear-gradient(90deg, #e8eef3 25%, #f2f6f8 50%, #e8eef3 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    cursor: default;
    pointer-events: none;
}
@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* Error de carga */
.load-error {
    grid-column: 1 / -1;
    padding: 2rem;
    color: #dc2626;
    font-size: 0.95rem;
    background: #fff5f5;
    border-radius: var(--radius);
    border: 1px solid #fecaca;
}

/* ── LOGIN OVERLAY ────────────────────────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 27, 42, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.login-box, .info-box {
    width: 100%;
    max-width: 440px;
    background: white;
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(13,27,42,0.2);
    animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.info-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    text-align: left;
    background: #F8FAFC;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.info-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.company-header-logo {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    min-height: 80px;
    align-items: center;
}
.company-header-logo img { max-height: 80px; max-width: 200px; object-fit: contain; }

.login-box h2 { font-size: 1.7rem; margin-bottom: 0.35rem; }
.login-box > p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.login-company-desc:empty { margin-bottom: 0; display: none; }

.form-group { text-align: left; margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.82rem; margin-bottom: 0.45rem; color: var(--text); }
.form-group input, .form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234A6375'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-glow);
    background: white;
}

.btn-ghost {
    width: 100%;
    padding: 0.9rem 1rem;
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.93rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); background: rgba(23,184,154,0.04); }

.btn-action {
    width: 100%;
    padding: 1rem;
    background: var(--bg-dark);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
    margin-top: 0.5rem;
    font-family: inherit;
}
.btn-action:hover   { background: var(--teal); }
.btn-action:active  { transform: scale(0.98); }
.btn-action:disabled { opacity: 0.65; cursor: not-allowed; }

.login-error-msg {
    color: #dc2626;
    font-size: 0.85rem;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}
.back-link:hover { color: var(--teal); }

/* ── PORTAL HEADER (MODIFICADO) ────────────────────────────────────────── */
.portal-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}
.sidebar-toggle:hover { background: var(--bg); }

.user-badge-header {
    background: var(--teal-glow);
    color: var(--teal);
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
}
.btn-logout-header {
    border: none;
    background: rgba(225, 29, 72, 0.05);
    color: #E11D48;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-logout-header:hover { background: #E11D48; color: white; }

/* ── SIDEBAR NAVEGACIÓN ────────────────────────────────────────────────── */
.portal-sidebar {
    position: fixed;
    top: 0;
    left: -100%; /* Oculto por defecto */
    width: 280px;
    height: 100vh;
    background: var(--bg-dark);
    color: white;
    z-index: 2000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0,0,0,0.2);
}
.portal-sidebar.active {
    left: 0;
}

@media (max-width: 480px) {
    .portal-sidebar {
        width: 100%; /* Pantalla completa en celulares pequeños */
    }
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
}

.sidebar-user {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.02);
}
.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--teal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.user-info {
    display: flex;
    flex-direction: column;
}
#userName {
    font-weight: 700;
    font-size: 0.95rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.sidebar-nav a i { width: 20px; text-align: center; }
.sidebar-nav a:hover, .sidebar-nav a.active {
    color: white;
    background: rgba(23, 184, 154, 0.1);
    border-left: 3px solid var(--teal);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.btn-logout-sidebar {
    width: 100%;
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(225, 29, 72, 0.3);
    background: rgba(225, 29, 72, 0.05);
    color: #fb7185;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-logout-sidebar:hover { background: #E11D48; color: white; }

/* Overlay de fondo para sidebar */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ── RESPONSIVE ADAPTATIONS ───────────────────────────────────────────── */
@media (min-width: 1024px) {
    /* En desktop el sidebar podría ser fijo si se desea, 
       pero el usuario pidió mejorar sidebar en vista celular.
       Mantenemos el drawer para no romper el layout grid actual. */
}

.portal-hero { padding: 3.5rem 0 2rem; text-align: center; }
.portal-hero h1 { font-size: 2.2rem; margin-bottom: 0.75rem; }
.portal-hero p { color: var(--text-muted); margin-bottom: 1.5rem; }

.btn-back-roles {
    background: white;
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-back-roles:hover {
    color: var(--teal);
    border-color: var(--teal);
    background: var(--teal-glow);
}

/* Search bar */
.search-bar-wrap {
    position: relative;
    max-width: 520px;
    margin: 0 auto 2.5rem;
}
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    padding: 0.65rem 1.2rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(23,184,154,0.12);
}
.search-bar i.fa-search { color: var(--text-muted); font-size: 0.9rem; flex-shrink: 0; }
.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 50%;
    transition: color 0.2s;
}
.search-clear:hover { color: var(--text); }
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    overflow: hidden;
    z-index: 100;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1.2rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    font-size: 0.9rem;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--teal-glow); }
.sr-category {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--teal);
    background: rgba(23,184,154,0.1);
    padding: 2px 8px;
    border-radius: 50px;
    white-space: nowrap;
}
.sr-title { flex: 1; font-weight: 600; }
.sr-type {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.search-empty { padding: 1rem 1.2rem; color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.75rem;
    padding-bottom: 5rem;
}

.role-card-item {
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.role-card-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--teal);
}

.role-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem;
    transition: transform 0.3s;
}
.role-card-item:hover .role-icon-box { transform: scale(1.1) rotate(5deg); }

.role-card-item h3 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--text); }
.role-card-item p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.btn-select-role {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0.8;
}
.role-card-item:hover .btn-select-role { opacity: 1; }

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
    padding-bottom: 5rem;
}

.program-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.2s;
}
.program-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--teal);
}

.prog-type {
    font-weight: 800;
    font-size: 0.7rem;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    display: block;
}
.program-card h3 { margin-bottom: 1.25rem; font-size: 1.1rem; }
.card-footer { padding-top: 1rem; border-top: 1px solid var(--border); }
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--bg);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.program-card:hover .btn-download { background: var(--teal); color: white; }

/* Badge de categoría dentro de card de material */
.prog-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 2px 10px;
    margin-bottom: 0.6rem;
}

/* Estado vacío */
.empty-section {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}
.empty-section i { font-size: 3rem; margin-bottom: 1rem; display: block; opacity: 0.3; }

/* ── CONSULTOR VIRTUAL EMBEBIDO ────────────────────────────────────── */
.virtual-assistant-box {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
}

.va-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #0D1B2A 0%, #17B89A 100%);
    color: white;
}
.va-avatar {
    width: 46px; height: 46px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.va-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; }
.va-status { font-size: 0.78rem; opacity: 0.85; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.va-dot {
    width: 7px; height: 7px; background: #4ade80;
    border-radius: 50%; display: inline-block;
    animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

/* Temas guiados */
.va-topics { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.va-topics-label { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.85rem; }
.va-topics-grid {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.va-topic-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 0.45rem 0.9rem;
    border: 1.5px solid var(--border);
    background: white;
    border-radius: 50px;
    font-size: 0.82rem; font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
    font-family: inherit;
}
.va-topic-btn i { color: var(--teal); font-size: 0.78rem; }
.va-topic-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: rgba(23,184,154,0.06);
    transform: translateY(-1px);
}
.va-topics.va-collapsed { display: none; }

/* Mensajes */
.va-messages {
    min-height: 80px;
    max-height: 340px;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    scroll-behavior: smooth;
}
.va-messages:empty::before {
    content: 'Los resultados de tu consulta aparecerán aquí.';
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
    margin: auto;
    display: block;
    padding: 1.5rem 0;
}
.va-msg { display: flex; flex-direction: column; max-width: 82%; animation: vaIn 0.25s ease; }
@keyframes vaIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.va-msg-user  { align-self: flex-end; align-items: flex-end; }
.va-msg-bot   { align-self: flex-start; align-items: flex-start; }
.va-bubble {
    padding: 0.7rem 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre-wrap;
}
.va-msg-user .va-bubble  { background: var(--teal); color: white; border-bottom-right-radius: 4px; }
.va-msg-bot  .va-bubble  { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.va-ts { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; padding: 0 4px; }
.va-typing { display: flex; gap: 4px; padding: 0.7rem 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; border-bottom-left-radius: 4px; width: fit-content; }
.va-typing span { width: 7px; height: 7px; background: var(--text-muted); border-radius: 50%; animation: va-bounce 1.2s infinite; }
.va-typing span:nth-child(2) { animation-delay: 0.2s; }
.va-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes va-bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

/* Input */
.va-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 0.9rem 1.2rem;
    border-top: 1px solid var(--border);
    background: white;
}
.va-input-row textarea {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem 0.9rem;
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    max-height: 100px;
    background: var(--bg);
}
.va-input-row textarea:focus { border-color: var(--teal); background: white; }
.va-send-btn {
    width: 40px; height: 40px;
    background: var(--teal);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}
.va-send-btn:hover  { background: #13a087; transform: scale(1.05); }
.va-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Botón nueva consulta */
.va-reset-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0.5rem auto 0;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}
.va-reset-btn:hover { border-color: var(--teal); color: var(--teal); }
.va-reset-btn i { font-size: 0.75rem; }

.support-channels { margin-bottom: 2rem; }
.channels-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-muted); }

/* ── PANEL SOPORTE ─────────────────────────────────────────────────── */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.support-card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    transition: box-shadow 0.25s;
}
.support-card:hover { box-shadow: var(--shadow); }
.support-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.support-card h3 { font-size: 1.1rem; }
.support-card p { color: var(--text-muted); font-size: 0.88rem; flex: 1; }
.support-card .btn-action { width: auto; padding: 0.65rem 1.5rem; font-size: 0.88rem; }

/* ── FAQ ────────────────────────────────────────────────────────────── */
.support-faq { margin-top: 2rem; padding-bottom: 4rem; }
.support-faq h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item.open { border-color: var(--teal); }
.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
}
.faq-chevron { transition: transform 0.3s; color: var(--text-muted); font-size: 0.85rem; flex-shrink: 0; }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--teal); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}
.faq-item.open .faq-a { padding-bottom: 1.25rem; }

.portal-footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-top: 1px solid var(--border);
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .company-direct-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

@media (max-width: 768px) {
    .landing-hero { padding-top: 4rem; }
    .container { padding: 0 1.25rem; }
    .hero-content h1 { font-size: 2.4rem; }
    .hero-content > p { font-size: 1.05rem; }
    .programs-grid { grid-template-columns: 1fr; }
    .portal-hero h1 { font-size: 1.8rem; }
    .login-box { padding: 2.5rem 1.75rem; margin: 1rem; }
}

@media (max-width: 520px) {
    .company-direct-grid { grid-template-columns: 1fr; max-width: 100%; padding: 0 1rem; }
    .hero-content h1 { font-size: 2.1rem; }
    .hero-content > p { font-size: 1rem; margin-bottom: 2rem; }
    .logo-circle { width: 90px; height: 90px; }
    .selection-card { padding: 2rem 1.25rem 1.5rem; }
    .badge { margin-bottom: 1rem; }
    .login-box { padding: 2rem 1.25rem; }
    .landing-nav { padding-bottom: 2rem; }
}

/* ================================================
   WIREBOT — WIDGET DE IA FLOTANTE
   ================================================ */

#wsbot-root {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.wsbot-hidden { display: none !important; }

/* --- Botón flotante --- */
#wsbot-toggle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #17B89A 0%, #0fa882 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(23, 184, 154, 0.45), 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    color: #fff;
}
#wsbot-toggle:hover { transform: scale(1.07); box-shadow: 0 8px 30px rgba(23, 184, 154, 0.55); }
#wsbot-toggle:active { transform: scale(0.96); }
#wsbot-toggle svg { width: 26px; height: 26px; }

#wsbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* --- Panel del chat --- */
#wsbot-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    max-height: 560px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 31, 46, 0.18), 0 4px 16px rgba(15, 31, 46, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: wsbot-pop-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wsbot-pop-in {
    from { opacity: 0; transform: scale(0.85) translateY(12px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

#wsbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, #0D1B2A 0%, #17283a 100%);
    color: #fff;
    flex-shrink: 0;
}
.wsbot-header-left { display: flex; align-items: center; gap: 0.7rem; }
.wsbot-avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, #17B89A, #0fa882);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.wsbot-avatar svg { width: 20px; height: 20px; color: #fff; }
.wsbot-header-name  { font-weight: 700; font-size: 0.95rem; color: #fff; }
.wsbot-header-status {
    font-size: 0.75rem; color: rgba(255,255,255,0.65);
    display: flex; align-items: center; gap: 5px; margin-top: 1px;
}
.wsbot-dot {
    width: 7px; height: 7px; background: #22c55e; border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.25);
}
#wsbot-minimize {
    background: rgba(255,255,255,0.1); border: none; cursor: pointer;
    color: rgba(255,255,255,0.75); border-radius: 8px;
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
#wsbot-minimize:hover { background: rgba(255,255,255,0.2); color: #fff; }
#wsbot-minimize svg  { width: 16px; height: 16px; }

#wsbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: #f7fafb;
    scroll-behavior: smooth;
}
#wsbot-messages::-webkit-scrollbar { width: 4px; }
#wsbot-messages::-webkit-scrollbar-thumb { background: #dde6ed; border-radius: 4px; }

.wsbot-msg { display: flex; flex-direction: column; max-width: 82%; }
.wsbot-msg-user      { align-self: flex-end;   align-items: flex-end; }
.wsbot-msg-assistant { align-self: flex-start; align-items: flex-start; }

.wsbot-bubble {
    padding: 0.65rem 0.9rem;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.55;
    word-break: break-word;
    white-space: pre-wrap;
}
.wsbot-msg-user .wsbot-bubble {
    background: linear-gradient(135deg, #17B89A, #0fa882);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.wsbot-msg-assistant .wsbot-bubble {
    background: #fff;
    color: #0F1F2E;
    border: 1px solid #e8eef3;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(15,31,46,0.06);
}
.wsbot-ts { font-size: 0.68rem; color: #9bb0bf; margin-top: 3px; padding: 0 3px; }

@keyframes wsbot-msg-slide {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wsbot-msg-in { animation: wsbot-msg-slide 0.22s ease; }

.wsbot-typing-bubble { display: flex; align-items: center; gap: 5px; padding: 0.75rem 1rem; }
.wsbot-typing-bubble span {
    width: 7px; height: 7px; background: #17B89A; border-radius: 50%;
    animation: wsbot-typing 1.2s infinite;
}
.wsbot-typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.wsbot-typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wsbot-typing {
    0%,60%,100% { transform: translateY(0); opacity: 0.5; }
    30%          { transform: translateY(-5px); opacity: 1; }
}

#wsbot-quick {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    padding: 0.5rem 1rem 0; background: #f7fafb; flex-shrink: 0;
}
.wsbot-quick-btn {
    background: #fff; border: 1px solid #c8d8e4; color: #0F1F2E;
    font-size: 0.78rem; padding: 0.35rem 0.75rem; border-radius: 20px;
    cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap; font-family: inherit;
}
.wsbot-quick-btn:hover { background: #17B89A; border-color: #17B89A; color: #fff; }

#wsbot-input-row {
    display: flex; align-items: flex-end; gap: 0.5rem;
    padding: 0.7rem 0.8rem; border-top: 1px solid #e8eef3; background: #fff; flex-shrink: 0;
}
#wsbot-input {
    flex: 1; border: 1px solid #dde6ed; border-radius: 12px;
    padding: 0.55rem 0.85rem; font-size: 0.875rem; font-family: inherit;
    color: #0F1F2E; background: #f7fafb; resize: none; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.5; max-height: 120px; overflow-y: auto;
}
#wsbot-input:focus {
    border-color: #17B89A;
    box-shadow: 0 0 0 3px rgba(23,184,154,0.12);
    background: #fff;
}
#wsbot-input::placeholder { color: #9bb0bf; }
#wsbot-send {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, #17B89A, #0fa882);
    border: none; border-radius: 10px; color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: transform 0.15s, opacity 0.15s;
}
#wsbot-send:hover  { transform: scale(1.05); }
#wsbot-send:active { transform: scale(0.95); }
#wsbot-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
#wsbot-send svg { width: 18px; height: 18px; }

#wsbot-footer {
    text-align: center; font-size: 0.7rem; color: #9bb0bf;
    padding: 0.35rem 0 0.5rem; background: #fff; flex-shrink: 0;
}
#wsbot-footer a { color: #17B89A; text-decoration: none; }
#wsbot-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    #wsbot-root { bottom: 1rem; right: 1rem; }
    #wsbot-panel { width: calc(100vw - 2rem); right: 0; max-height: 70vh; border-radius: 16px; }
    #wsbot-toggle { width: 52px; height: 52px; }
}
/* ── DASHBOARD UI ──────────────────────────────────────────────────────── */
.dashboard-welcome {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.dashboard-welcome::after {
    content: '';
    position: absolute;
    right: -20px; bottom: -20px;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: '\f19d';
    font-size: 8rem;
    color: var(--teal);
    opacity: 0.03;
    transform: rotate(-10deg);
}
.welcome-text h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.welcome-text p { color: var(--text-muted); }

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.stat-card-premium {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.3s ease;
}
.stat-card-premium:hover { transform: translateY(-5px); }
.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-info .stat-value { font-size: 1.5rem; font-weight: 800; font-family: 'Outfit'; display: block; line-height: 1; }
.stat-info .stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }

@media (max-width: 768px) {
    .dashboard-welcome { flex-direction: column; text-align: center; gap: 1.5rem; }
}
.card-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-fav {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: all 0.2s ease;
    padding: 5px;
}
.btn-fav:hover { transform: scale(1.2); color: #F59E0B; }
.btn-fav.active { color: #F59E0B; animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.badge-seen {
    background: #DCFCE7;
    color: #15803D;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    text-transform: uppercase;
}

.card-seen {
    opacity: 0.8;
}
.card-seen:hover { opacity: 1; }
/* ── DARK MODE ───────────────────────────────────────────────────────── */
.btn-dark-mode {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    margin-right: 10px;
}
.btn-dark-mode:hover { background: rgba(0,0,0,0.05); color: var(--teal); }

body.dark-theme {
    --bg: #0B1117;
    --bg-alt: #161B22;
    --text: #C9D1D9;
    --text-muted: #8B949E;
    --border: #30363D;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
}

body.dark-theme .dashboard-welcome,
body.dark-theme .stat-card-premium,
body.dark-theme .program-card,
body.dark-theme .role-card-item,
body.dark-theme .sidebar,
body.dark-theme .portal-header,
body.dark-theme .virtual-assistant-box,
body.dark-theme .support-card {
    background: #161B22;
    border-color: #30363D;
}

body.dark-theme .sidebar-nav a { color: #8B949E; }
body.dark-theme .sidebar-nav a.active { background: rgba(23,184,154,0.15); color: var(--teal); }
body.dark-theme .role-card-item:hover,
body.dark-theme .program-card:hover {
    background: #1C2128;
}
body.dark-theme h1, body.dark-theme h2, body.dark-theme h3 { color: #F0F6FC; }

/* ── TOAST NOTIFICATIONS ────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    background: rgba(15, 31, 46, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-lg);
    display: none;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastIn {
    from { transform: translateY(100px) scale(0.8); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}



body.dark-theme .video-main, body.dark-theme .video-playlist { background: #162436; border-color: #2D3F53; }
body.dark-theme .playlist-item { background: #0D1B2A; }
body.dark-theme .playlist-item:hover { background: rgba(23, 184, 154, 0.15); border-color: rgba(23, 184, 154, 0.3); }
body.dark-theme .playlist-item.active { background: var(--teal); color: white; }
body.dark-theme .playlist-items::-webkit-scrollbar-track { background: #0D1B2A; }
body.dark-theme .playlist-items::-webkit-scrollbar-thumb { background: #2D3F53; }

/* ── VIDEO MODAL (PREMIUM REPLACEMENT FOR TAILWIND) ───────────────────── */
.video-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(13, 27, 42, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.video-modal-overlay.flex {
    display: flex;
}

.video-modal-container {
    position: relative;
    width: 95vw;
    max-width: 1600px;
    height: 90vh;
    background: white;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.4);
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

@media (min-width: 850px) {
    .video-modal-container {
        flex-direction: row;
    }
}

.video-main-area {
    flex: 1;
    background: #000;
    display: flex;
    flex-direction: column;
    padding: 1rem; /* Menos padding en móvil */
    position: relative;
    min-height: 40vh; /* Asegurar espacio para el video en móvil */
}

@media (min-width: 850px) {
    .video-main-area {
        padding: 1.5rem;
    }
}

.video-player-wrap {
    flex: 1;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#mainVideoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-info-bar {
    padding: 0.75rem 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#mainVideoTitle {
    font-size: 1rem; /* Más pequeño en móvil */
    font-weight: 700;
    color: white;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 850px) {
    #mainVideoTitle {
        font-size: 1.25rem;
    }
}

/* Sidebar Playlist */
.video-playlist-sidebar {
    width: 100%;
    height: 300px;
    background: #F8FAFC;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

@media (min-width: 850px) {
    .video-playlist-sidebar {
        width: 350px;
        height: 100%;
    }
}

.playlist-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.playlist-header h3 {
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    border: 1px solid var(--border);
}

.video-item:hover {
    background: var(--bg);
    transform: translateX(4px);
    border-color: var(--teal);
}

.video-item.active {
    background: var(--teal-glow);
    border-color: var(--teal);
    box-shadow: 0 4px 12px rgba(23,184,154,0.1);
}

.video-item-icon {
    width: 36px;
    height: 36px;
    background: var(--bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    flex-shrink: 0;
}

.video-item.active .video-item-icon {
    background: var(--teal);
    color: white;
}

.video-item-info {
    flex: 1;
    min-width: 0;
}

.video-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-item-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.video-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.video-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* Dark Mode Modal */
body.dark-mode .video-modal-container {
    background: var(--bg-dark);
}
body.dark-mode .video-playlist-sidebar {
    background: #0B1622;
    border-left-color: rgba(255,255,255,0.05);
}
body.dark-mode .playlist-header {
    border-bottom-color: rgba(255,255,255,0.05);
}
body.dark-mode .playlist-header h3 { color: white; }
body.dark-mode .video-item {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}
body.dark-mode .video-item-name { color: #E2E8F0; }
body.dark-mode .video-item:hover { background: rgba(255,255,255,0.06); }
