/* ════════════════════════════════════════════════════════════════
   NAVBAR BASE
════════════════════════════════════════════════════════════════ */
.ocl-navbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    min-height: 60px;
    width: 100%;
    position: relative;
}

/* ── Hamburguesa (solo dashboard) ── */
.ocl-hamburger {
    background: transparent;
    border: none;
    color: #16b790;
    font-size: 22px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: background .2s, transform .2s;
    flex-shrink: 0;
    line-height: 1;
}
.ocl-hamburger:hover {
    background: rgba(22,183,144,.12);
    transform: scale(1.05);
}

/* ── Logo ── */
.ocl-brand { flex-shrink: 0; }
.ocl-brand img {width: 275px; display: block; }

/* ── Spacer ── */
.ocl-spacer { flex: 1; }

/* ── Links de navegación ── */
.ocl-nav-links {
    display: flex;
    align-items: center;
}
.ocl-nav-link {
    color: rgba(255,255,255,.82) !important;
    font-family: 'Baloo', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.ocl-nav-link:hover { color: #16b790 !important; background: rgba(255,255,255,.07) !important; }
.ocl-nav-link.active {
    color: #fff !important;
    background: rgba(22,183,144,.22) !important;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #16b790 !important;
    border-radius: 8px;
}

/* ── Dropdown "Mis Competencias" ── */
.ocl-dd-wrap {
    position: relative;
}
.ocl-dd-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,.82) !important;
    font-family: 'Baloo', sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    background: none !important;
    border: none !important;
    text-decoration: none;
    transition: color .15s, background .15s;
    white-space: nowrap;
    line-height: 1.5;
    vertical-align: middle;
}
.ocl-dd-toggle:hover { color: #16b790 !important; background: rgba(255,255,255,.07) !important; }
.ocl-dd-toggle .ocl-caret { font-size: .6rem; transition: transform .22s; margin-left: 1px; }
.ocl-dd-toggle.open { color: #16b790 !important; }
.ocl-dd-toggle.open .ocl-caret { transform: rotate(180deg); }

.ocl-dd-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px) scale(.97);
    min-width: 260px;
    background: #fff;
    border-radius: 14px;
    border: none;
    box-shadow: 0 12px 40px rgba(38,31,84,.22);
    padding: 8px 0;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s, transform .18s;
}
.ocl-dd-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}
.ocl-dd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    transition: background .15s;
    cursor: pointer;
}
.ocl-dd-item:hover:not(.ocl-dd-disabled) { background: #f4f5ff; }
.ocl-dd-item.ocl-dd-disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }
.ocl-dd-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.ocl-dd-icon--eval { background: #e8f5e8; color: #329d48; }
.ocl-dd-icon--form { background: #fff3e0; color: #f39c12; }
.ocl-dd-icon--anal { background: #e8f0fb; color: #4554e5; }
.ocl-dd-text { display: flex; flex-direction: column; flex: 1; line-height: 1.3; }
.ocl-dd-text strong { font-size: .88rem; color: #261f54; }
.ocl-dd-text small  { font-size: .76rem; color: #999; }
.ocl-dd-badge {
    background: #fff3e0; color: #f39c12; border-radius: 20px;
    padding: 2px 8px; font-size: .7rem; font-weight: 700;
}
.ocl-dd-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }

/* ── Botón INGRESAR ── */
.ocl-btn-ingresar {
    background: #4554e5;
    color: #fff !important;
    border: none;
    padding: 7px 20px;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .15s;
    font-family: 'Baloo', sans-serif;
    white-space: nowrap;
}
.ocl-btn-ingresar:hover { background: #3443d4; transform: translateY(-1px); }

/* ════════════════════════════════════════════════════════════════
   DROPDOWN DE USUARIO
════════════════════════════════════════════════════════════════ */
.ocl-user-wrap { position: relative; flex-shrink: 0; }

.ocl-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 40px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    transition: background .18s, border-color .18s;
    color: white;
    font-family: inherit;
}
.ocl-user-trigger:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); }
.ocl-user-trigger.open { background: rgba(255,255,255,.18); border-color: rgba(22,183,144,.55); }

.ocl-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 800; color: #fff;
    flex-shrink: 0; letter-spacing: .02em;
    background: <?= $_avatarColor ?>;
}
.ocl-user-label {
    font-size: .82rem; font-weight: 600; color: #fff;
    white-space: nowrap; line-height: 1;
}
.ocl-user-label small {
    font-size: .7rem; color: rgba(255,255,255,.55);
    font-weight: 400; display: block; margin-top: 1px;
}
.ocl-user-caret {
    font-size: .62rem; color: rgba(255,255,255,.5);
    margin-left: 2px; transition: transform .22s;
}
.ocl-user-trigger.open .ocl-user-caret { transform: rotate(180deg); }

/* Panel desplegable de usuario */
.ocl-user-panel {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 310px;
    max-height: calc(100vh - 90px);   /* nunca sale del viewport */
    overflow-y: auto;
    overflow-x: hidden;
    background: #1e1b3a;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,.45);
    z-index: 3000;
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    /* scrollbar discreta */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.15) transparent;
}
.ocl-user-panel::-webkit-scrollbar       { width: 4px; }
.ocl-user-panel::-webkit-scrollbar-track { background: transparent; }
.ocl-user-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }
.ocl-user-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Cabecera del panel */
.ocl-up-head {
    padding: 16px 16px 12px;
    background: linear-gradient(135deg, rgba(69,84,229,.32), rgba(22,183,144,.14));
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; gap: 12px;
}
.ocl-up-avatar-lg {
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; font-weight: 800; color: #fff; flex-shrink: 0;
    background: <?= $_avatarColor ?>;
    box-shadow: 0 0 0 3px rgba(255,255,255,.14);
}
.ocl-up-ident { flex: 1; min-width: 0; }
.ocl-up-name {
    font-size: .93rem; font-weight: 700; color: #fff;
    white-space: normal; word-break: break-word; line-height: 1.3;
}
.ocl-up-email {
    font-size: .74rem; color: rgba(255,255,255,.48);
    white-space: normal; word-break: break-all; margin-top: 2px; line-height: 1.35;
}
.ocl-up-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px; padding: 2px 8px;
    font-size: .68rem; color: rgba(255,255,255,.78); margin-top: 5px; font-weight: 600;
}

/* Sección de datos */
.ocl-up-section {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.ocl-up-sec-title {
    font-size: .63rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .09em; color: rgba(255,255,255,.32); margin-bottom: 9px;
}

/* Chips */
.ocl-chips { display: flex; flex-direction: column; gap: 5px; }
.ocl-chip {
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px; padding: 7px 10px;
    display: flex; align-items: center; gap: 9px;
}
.ocl-chip-ico { font-size: .8rem; color: #16b790; flex-shrink: 0; width: 16px; text-align: center; }
.ocl-chip-body { flex: 1; min-width: 0; }
.ocl-chip-label {
    font-size: .61rem; color: rgba(255,255,255,.36);
    font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.ocl-chip-value {
    font-size: .8rem; color: #fff; font-weight: 600;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}
/* Sub-chip inline (rango + sexo en una fila) */
.ocl-chip-twin {
    display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 5px;
}
.ocl-chip-twin .ocl-chip { margin: 0; }

/* Grid datos externos */
.ocl-data-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 5px;
}
.ocl-data-item {
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07);
    border-radius: 8px; padding: 7px 10px;
}
.ocl-data-label { font-size: .61rem; color: rgba(255,255,255,.35); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ocl-data-val { font-size: .79rem; color: #fff; font-weight: 600; margin-top: 2px; white-space: normal; word-break: break-word; line-height: 1.35; }

/* Acciones del panel */
.ocl-up-actions { padding: 7px 8px; }
.ocl-up-action {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px; border-radius: 9px;
    color: rgba(255,255,255,.78); text-decoration: none;
    font-size: .84rem; font-weight: 500;
    transition: background .14s, color .14s;
    cursor: pointer; background: none; border: none;
    width: 100%; text-align: left; font-family: inherit;
}
.ocl-up-action:hover { background: rgba(255,255,255,.08); color: #fff; }
.ocl-up-action.danger:hover { background: rgba(255,80,80,.12); color: #ff6b6b; }
.ocl-up-action-ico {
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; flex-shrink: 0;
}
.ocl-up-action-ico.ico-edit   { background: rgba(69,84,229,.2); color: #8899ff; }
.ocl-up-action-ico.ico-logout { background: rgba(255,80,80,.14); color: #ff6b6b; }
.ocl-up-divider { height: 1px; background: rgba(255,255,255,.07); margin: 3px 10px; }

/* ════════════════════════════════════════════════════════════════
   MOBILE COLLAPSE (solo páginas de inicio)
════════════════════════════════════════════════════════════════ */
.ocl-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 6px;
    padding: 5px 9px;
    color: rgba(255,255,255,.9);
    cursor: pointer;
    font-size: 1rem;
}
.ocl-collapsible { display: flex; align-items: center;flex: 1; }

@media (max-width: 767px) {
    .ocl-mobile-toggle { display: flex; }
    .ocl-collapsible {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #261f54;
        border-top: 1px solid rgba(255,255,255,.12);
        padding: 12px 16px;
        gap: 4px;
        z-index: 2999;
    }
    .ocl-collapsible.mobile-open { display: flex; }
    .ocl-user-panel { width: calc(100vw - 24px); right: -10px; }
    .ocl-spacer { display: none; }
    .ocl-nav-links { flex-direction: column; align-items: flex-start; width: 100%; }
    .ocl-data-grid { grid-template-columns: 1fr; }
}