/* NOCControl — casca do visual novo (protótipo aprovado em 2026-11-29): menu lateral com grupos fixos e ícones, que
   recolhe para só os ícones; topo com a busca global, a nova demanda, o sino, o tema e o perfil. Também leva o sistema
   todo para a fonte Geist e para as cores da página da ONU (as telas antigas acompanham pelos --nc-*).
   Vem depois do app.css e antes do v2.css. */

:root {
    --nc-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --nc-font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --nc-font-destaque: var(--nc-font);
    --c-side-w: 248px;
    --c-ease: cubic-bezier(.2, 0, 0, 1);
}
html.nc-recolhido { --c-side-w: 68px; }

[data-bs-theme="light"] {
    --nc-bg: #f2f4f8; --nc-surface: #ffffff; --nc-surface-2: #f6f8fb; --nc-surface-3: #eceff5;
    --nc-border: #e1e6ee; --nc-border-forte: #c8d1de; --nc-text: #0e1726; --nc-muted: #4b5768;
    --c-fraco: #7a8699; --c-side: #ffffff; --c-side-txt: #4b5768;
    --c-on: color-mix(in srgb, var(--nc-accent) 10%, #fff);
    --nc-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .05);
    --nc-shadow-2: 0 12px 40px rgba(15, 23, 42, .18);
}
[data-bs-theme="dark"] {
    --nc-bg: #090d14; --nc-surface: #0f151f; --nc-surface-2: #131b27; --nc-surface-3: #1a2333;
    --nc-border: #1e2735; --nc-border-forte: #2c3a4f; --nc-text: #e6ebf4; --nc-muted: #9ba8bc;
    --c-fraco: #6d7a8f; --c-side: #0c121b; --c-side-txt: #9ba8bc;
    --c-on: color-mix(in srgb, var(--nc-accent) 16%, #0f151f);
    --nc-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --nc-shadow-2: 0 16px 48px rgba(0, 0, 0, .6);
}

/* Fundo liso (sem o brilho da versão anterior) e a fonte nova em tudo. */
.nc-app, [data-bs-theme="dark"] .nc-app { background: var(--nc-bg); }
body { font-family: var(--nc-font); letter-spacing: 0; }
.nc-titulo { font-weight: 650; letter-spacing: -.025em; }

/* ---------- menu lateral ---------- */
.c-side {
    background: var(--c-side); color: var(--c-side-txt); border-right: 1px solid var(--nc-border);
    width: var(--c-side-w); display: flex; flex-direction: column; min-width: 0;
}
@media (min-width: 992px) {
    .c-side { position: fixed; inset: 0 auto 0 0; z-index: 1020; height: 100vh; transition: width .2s var(--c-ease); }
    .nc-main, .c-topo { margin-left: var(--c-side-w); transition: margin-left .2s var(--c-ease); }
}
@media (max-width: 991.98px) {
    .c-side.offcanvas-lg { --bs-offcanvas-width: 272px; --bs-offcanvas-bg: var(--c-side); width: 272px; }
    .nc-main, .c-topo { margin-left: 0; }
}
.c-marca { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; min-height: 64px; }
.c-logo { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--nc-accent); color: #fff; font-size: 1.05rem; }
.c-logo-img { background: transparent; object-fit: contain; }
.c-marca-txt { min-width: 0; line-height: 1.25; }
.c-marca-txt b { display: block; font-size: 14.5px; color: var(--nc-text); letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-marca-txt small { display: block; font-size: 11.5px; color: var(--c-fraco); font-weight: 500; }
.c-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 12px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.c-grupo { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fraco); padding: 14px 10px 6px; white-space: nowrap; }
.c-link {
    display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 9px; border: 0; background: transparent;
    color: var(--c-side-txt); font-weight: 500; font-size: 13.5px; white-space: nowrap; position: relative; width: 100%; text-align: left;
    transition: background-color .15s var(--c-ease), color .15s var(--c-ease);
}
.c-link i { font-size: 17px; width: 20px; text-align: center; flex: none; }
.c-link span { overflow: hidden; text-overflow: ellipsis; }
.c-link:hover { background: var(--nc-surface-2); color: var(--nc-text); text-decoration: none; }
.c-link.on { background: var(--c-on); color: var(--nc-accent); font-weight: 600; }
[data-bs-theme="dark"] .c-link.on { color: color-mix(in srgb, var(--nc-accent) 55%, #fff); }
.c-link.c-pai { background: transparent; }
.c-selo { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--nc-crit); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.c-sub { display: none; flex-direction: column; gap: 1px; margin: 2px 0 6px 20px; padding-left: 12px; border-left: 1px solid var(--nc-border); }
.c-sub.aberto { display: flex; }
.c-sub-titulo { display: none; }
.c-sublink { display: block; padding: 5px 10px; border-radius: 7px; color: var(--c-side-txt); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sublink:hover { background: var(--nc-surface-2); color: var(--nc-text); text-decoration: none; }
.c-sublink.on { color: var(--nc-accent); font-weight: 600; background: var(--c-on); }
.c-side-pe { border-top: 1px solid var(--nc-border); padding: 10px; }
.c-recolher { cursor: pointer; }

/* recolhido: só os ícones (no computador) */
@media (min-width: 992px) {
    html.nc-recolhido .c-marca { justify-content: center; padding-inline: 0; }
    html.nc-recolhido .c-marca-txt, html.nc-recolhido .c-link span, html.nc-recolhido .c-sub { display: none; }
    html.nc-recolhido .c-grupo { font-size: 0; padding: 0; height: 1px; background: var(--nc-border); margin: 10px 8px; }
    html.nc-recolhido .c-link { justify-content: center; padding: 0; }
    html.nc-recolhido .c-selo { position: absolute; top: 1px; right: 3px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
    html.nc-recolhido .c-recolher i { transform: rotate(180deg); }
    /* seções do item (Configurações) numa caixa ao lado do ícone; a borda transparente liga a caixa ao ícone */
    html.nc-recolhido .c-item-pai:hover > .c-sub, html.nc-recolhido .c-item-pai:focus-within > .c-sub {
        display: flex; position: fixed; z-index: 1030; left: calc(var(--c-side-w) - 10px); top: var(--c-sub-top, 80px); margin: 0; min-width: 210px;
        padding: 6px; border: 1px solid var(--nc-border); border-left: 10px solid transparent; background-clip: padding-box;
        background-color: var(--nc-surface); border-radius: 0 12px 12px 0; box-shadow: var(--nc-shadow-2);
    }
    html.nc-recolhido .c-sub-titulo { display: block; padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fraco); }
}

/* ---------- topo ---------- */
.c-topo {
    position: sticky; top: 0; z-index: 1010; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 24px;
    background: color-mix(in srgb, var(--nc-surface) 88%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--nc-border);
}
@media (max-width: 575.98px) { .c-topo { padding: 0 12px; gap: 6px; } }
.c-busca { position: relative; flex: 1 1 auto; max-width: 540px; display: flex; align-items: center; margin: 0; }
.c-busca > .bi { position: absolute; left: 12px; color: var(--c-fraco); pointer-events: none; }
.c-busca input {
    width: 100%; height: 38px; padding: 0 64px 0 36px; border-radius: 11px; font-size: 13px; cursor: pointer;
    background: var(--nc-surface-2); color: var(--nc-text); border: 1px solid var(--nc-border); transition: border-color .15s var(--c-ease);
}
.c-busca input:hover { border-color: var(--nc-border-forte); }
.c-busca input::placeholder { color: var(--c-fraco); }
.c-busca .nc-atalho { position: absolute; right: 10px; pointer-events: none; }
@media (max-width: 575.98px) { .c-busca input { padding-right: 12px; } .c-busca .nc-atalho { display: none; } }
.c-topo-acoes { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.c-nova { height: 36px; display: inline-flex; align-items: center; border-radius: 10px; font-size: 13px; font-weight: 550; padding: 0 14px; }
.c-ic {
    position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px;
    border: 1px solid var(--nc-border); background: var(--nc-surface); color: var(--nc-muted); font-size: 1.05rem;
    transition: border-color .15s var(--c-ease), color .15s var(--c-ease);
}
.c-ic:hover { color: var(--nc-text); border-color: var(--nc-border-forte); text-decoration: none; }
.c-sino-ativo, .c-sino-ativo:hover { color: var(--nc-crit); }
.c-ponto {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 700; line-height: 1;
    background: var(--nc-crit); color: #fff; border: 2px solid var(--nc-surface);
}
.c-avatar {
    display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0;
    font-size: 12.5px; font-weight: 650; color: #fff;
    background: linear-gradient(135deg, var(--nc-accent), color-mix(in srgb, var(--nc-accent) 45%, #0b9fb3));
}
button.c-avatar:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--nc-accent) 25%, transparent); }
.c-avatar-grande { width: 40px; height: 40px; font-size: 13.5px; }

/* ---------- busca global (paleta) ---------- */
.nc-paleta { border-radius: 16px; border: 1px solid var(--nc-border); box-shadow: var(--nc-shadow-2); }
.nc-paleta-campo { font-family: var(--nc-font); font-size: 15px; }
.nc-paleta-grupo-titulo { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fraco); }
.nc-paleta-item { border-radius: 9px; }
.nc-paleta-icone { border-radius: 8px; }
