/* concurso_nobel/assets/css/menu_concurso.css */
/* Sidebar NOBEX moderno: cada módulo usa color_menu desde concurso_menu. */

.cn-menu-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1400;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .30);
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

.cn-sidebar {
    position: fixed;
    z-index: 1300;
    top: 0;
    left: 0;
    bottom: 0;
    width: 330px;
    background:
        radial-gradient(circle at 18% 5%, rgba(250, 204, 21, .14), transparent 25%),
        radial-gradient(circle at 95% 42%, rgba(56, 189, 248, .11), transparent 22%),
        linear-gradient(180deg, #071226 0%, #071526 50%, #681019 100%);
    color: #fff;
    box-shadow: 18px 0 45px rgba(2, 8, 23, .35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,.08);
}

body.cn-con-sidebar {
    min-height: 100vh;
}

body.cn-con-sidebar img,
body.cn-con-sidebar svg,
body.cn-con-sidebar canvas,
body.cn-con-sidebar video {
    max-width: 100%;
}

body.cn-con-sidebar input,
body.cn-con-sidebar select,
body.cn-con-sidebar textarea,
body.cn-con-sidebar button {
    max-width: 100%;
}

body.cn-con-sidebar .table-wrap,
body.cn-con-sidebar .tabla-wrap,
body.cn-con-sidebar .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cn-sidebar-top {
    padding: 18px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
}

.cn-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.cn-sidebar-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(250,204,21,.20), rgba(250,204,21,.08));
    border: 1px solid rgba(250,204,21,.38);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #facc15;
    font-size: 24px;
    box-shadow:
        inset 0 -10px 18px rgba(0,0,0,.18),
        0 12px 24px rgba(0,0,0,.14);
}

.cn-brand-text strong {
    display: block;
    font-size: 24px;
    font-weight: 1000;
    letter-spacing: -.03em;
    line-height: 1;
}

.cn-brand-text small {
    display: block;
    margin-top: 7px;
    color: #dbe2ef;
    font-size: 12px;
    font-weight: 850;
}

.cn-access-card {
    padding: 16px 16px 14px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.06));
    border: 1px solid rgba(255,255,255,.13);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.cn-access-card p {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 950;
    line-height: 1.2;
    color: #ffffff;
}

.cn-access-card span {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 850;
}

.cn-access-card span i {
    color: #e8d069;
}

.cn-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px 18px;
}

.cn-menu-nav::-webkit-scrollbar {
    width: 8px;
}

.cn-menu-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.15);
    border-radius: 999px;
}

.cn-menu-group {
    margin-bottom: 8px;
}

.cn-menu-group summary {
    list-style: none;
}

.cn-menu-group summary::-webkit-details-marker {
    display: none;
}

.cn-menu-parent,
.cn-menu-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 20px;
    padding: 13px 14px;
    color: #f5f7fb;
    font-size: 15px;
    font-weight: 950;
    transition: all .18s ease;
    position: relative;
}

.cn-menu-parent-left,
.cn-menu-link-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cn-menu-parent-left span:last-child,
.cn-menu-link-left span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--cn-item-color, #f8fafc);
    text-shadow: 0 0 10px color-mix(in srgb, var(--cn-item-color, #facc15) 18%, transparent);
}

.cn-menu-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: color-mix(in srgb, var(--cn-item-color, #facc15) 20%, transparent);
    border: 1px solid color-mix(in srgb, var(--cn-item-color, #facc15) 34%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.cn-menu-icon-box i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--cn-item-color, #facc15);
    transition: all .18s ease;
    filter: drop-shadow(0 0 7px color-mix(in srgb, var(--cn-item-color, #facc15) 55%, transparent));
}

.cn-menu-icon-box.is-small {
    width: 28px;
    height: 28px;
    border-radius: 11px;
}

.cn-menu-icon-box.is-small i {
    font-size: 13px;
}

.cn-menu-parent:hover,
.cn-menu-link:hover {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--cn-item-color, #facc15) 13%, transparent), rgba(255,255,255,.055));
    transform: translateX(2px);
}

.cn-menu-parent.is-active,
.cn-menu-link.is-active {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--cn-item-color, #facc15) 26%, transparent), rgba(255,255,255,.09));
    color: var(--cn-item-color, #fff);
    box-shadow:
        inset 5px 0 0 var(--cn-item-color, #facc15),
        0 10px 22px rgba(0,0,0,.12);
}

.cn-menu-parent.is-active .cn-menu-icon-box,
.cn-menu-link.is-active .cn-menu-icon-box {
    background: color-mix(in srgb, var(--cn-item-color, #facc15) 28%, transparent);
    border-color: color-mix(in srgb, var(--cn-item-color, #facc15) 52%, transparent);
}

.cn-menu-parent.is-active .cn-menu-icon-box i,
.cn-menu-link.is-active .cn-menu-icon-box i {
    color: var(--cn-item-color, #facc15);
    transform: scale(1.08);
}

.cn-submenu {
    padding: 7px 0 4px 18px;
}

.cn-menu-link.is-child {
    margin: 5px 0;
    padding: 10px 12px;
    border-radius: 17px;
    font-size: 13px;
    color: var(--cn-item-color, #dde7f7);
    background: rgba(255,255,255,.025);
}

.cn-menu-link.is-child.is-active {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--cn-item-color, #facc15) 20%, transparent), rgba(255,255,255,.08));
    box-shadow: inset 4px 0 0 var(--cn-item-color, #facc15);
}

.cn-chevron {
    color: #d1d5db !important;
    font-size: 12px !important;
    transition: transform .18s ease;
}

.cn-menu-group[open] .cn-chevron {
    transform: rotate(180deg);
}

.cn-menu-empty {
    margin: 10px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    color: #f8fafc;
    font-size: 14px;
    font-weight: 850;
    text-align: center;
}

.cn-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.025));
}

.cn-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(135deg, #ef2f2f, #dc2626);
    color: #fff;
    font-weight: 1000;
    font-size: 16px;
    box-shadow: 0 12px 24px rgba(220, 38, 38, .25);
    transition: all .18s ease;
}

.cn-logout-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.cn-sidebar-backdrop {
    display: none;
}

@media (max-width: 980px) {
    .cn-menu-toggle {
        display: flex;
    }

    .cn-sidebar {
        width: 310px;
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    body.cn-sidebar-open .cn-sidebar {
        transform: translateX(0);
    }

    .cn-sidebar-backdrop {
        position: fixed;
        z-index: 1200;
        inset: 0;
        background: rgba(15, 23, 42, .55);
    }

    body.cn-sidebar-open .cn-sidebar-backdrop {
        display: block;
    }

    .cn-con-sidebar .shell {
        margin-left: 0;
        padding-top: 72px;
        padding-left: 12px;
        padding-right: 12px;
    }

    body.cn-con-sidebar .topbar-inner,
    body.cn-con-sidebar .topin {
        padding-left: 62px !important;
    }

    body.cn-con-sidebar .container,
    body.cn-con-sidebar .wrap {
        width: 100%;
        max-width: 100%;
    }

    body.cn-con-sidebar .top-actions,
    body.cn-con-sidebar .topbar-actions,
    body.cn-con-sidebar .links {
        width: 100%;
        justify-content: flex-start;
    }

    body.cn-con-sidebar .btn-top,
    body.cn-con-sidebar .topbar a,
    body.cn-con-sidebar .top a,
    body.cn-con-sidebar .btn,
    body.cn-con-sidebar .quick-btn {
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .cn-sidebar {
        width: 100%;
        max-width: 345px;
    }

    .cn-brand-text strong {
        font-size: 22px;
    }

    .cn-access-card p {
        font-size: 15px;
    }
}

@media (min-width: 981px) {
    body.cn-con-sidebar {
        padding-left: 330px;
    }

    body.cn-con-sidebar .shell {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        padding-left: 26px;
        padding-right: 26px;
    }

    body.cn-con-sidebar .container,
    body.cn-con-sidebar .wrap,
    body.cn-con-sidebar .toolbar,
    body.cn-con-sidebar .topbar-inner,
    body.cn-con-sidebar .topin {
        max-width: min(1440px, calc(100vw - 362px));
    }

    body.cn-con-sidebar .container,
    body.cn-con-sidebar .wrap,
    body.cn-con-sidebar .toolbar {
        margin-left: auto;
        margin-right: auto;
    }

    body.cn-con-sidebar .page {
        width: auto;
        max-width: min(1120px, calc(100vw - 354px));
    }
}

@media print {
    body.cn-con-sidebar {
        padding-left: 0 !important;
    }

    .cn-menu-toggle,
    .cn-sidebar,
    .cn-sidebar-backdrop {
        display: none !important;
    }
}
