/* =============================================
   PAINEL - CSS CONSOLIDADO
   Paleta: #0A1C3A (navy) · #1A4592 (azul) · #F0F2F7 (fundo)
   ============================================= */

/* ----- Layout base ----- */
body {
    position: relative;
    min-height: 100vh;
}

body:not(.login-page) {
    background: #F0F2F7;
}

/* ---- Layout principal com CSS Grid ---- */
.row.mt-4.p-4 {
    display: grid !important;
    grid-template-columns: 410px 1fr;
    gap: 1.5rem;
    padding: 1.75rem 2rem !important;
    margin: 0 !important;
    min-height: calc(100vh - 100px);
    align-items: start;
}

/* Reset das classes Bootstrap dentro do grid */
.row.mt-4.p-4>* {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    padding: 0 !important;
    min-width: 0;
}

.row.mt-4.p-4>.painel-sidebar {
    padding: 1.25rem 1.1rem 1.75rem !important;
}

/* ================================================
   INFO-CARD — componente de seção com edição
   ================================================ */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.page-header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0A1C3A 0%, #1A4592 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(26, 69, 146, 0.35);
}

.page-header-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1E2A3A;
    margin: 0 0 3px;
    letter-spacing: -0.02em;
}

.page-header-sub {
    color: #64748B;
    font-size: 0.84rem;
    margin: 0;
}

/* Card */
.info-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(10, 28, 58, 0.07);
    margin-bottom: 1.1rem;
    overflow: hidden;
}

/* Header do card */
.info-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.3rem;
    border-bottom: 1px solid #F0F2F7;
    gap: 0.75rem;
}

.info-card-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-card-icon {
    width: 38px;
    height: 38px;
    background: #EEF2FB;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1A4592;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.info-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1E2A3A;
    margin: 0 0 2px;
}

.info-card-sub {
    font-size: 0.74rem;
    color: #94A3B8;
    margin: 0;
}

/* Botão Editar */
.btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.38rem 0.85rem;
    background: transparent;
    border: 1px solid #E3E6EF;
    border-radius: 9px;
    color: #4A5568;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.btn-edit:hover {
    background: #F0F4FB;
    border-color: #1A4592;
    color: #1A4592;
}

/* Corpo do card - grid de campos */
.info-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.5rem;
    padding: 1.2rem 1.3rem;
}

.info-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.info-field-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94A3B8;
}

/* Valor atual */
.info-field .current-value {
    display: flex;
    align-items: center;
}

.info-field .current-value span {
    font-size: 0.9rem;
    color: #1E2A3A;
    font-weight: 500;
}

/* Input em modo edição */
.info-input {
    border: 1px solid #E3E6EF !important;
    border-radius: 9px !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 0.8rem !important;
    color: #1E2A3A !important;
    background: #F8FAFD !important;
    transition: all 0.2s !important;
}

.info-input:focus {
    border-color: #1A4592 !important;
    box-shadow: 0 0 0 3px rgba(26, 69, 146, 0.1) !important;
    background: #fff !important;
    outline: none !important;
}

/* Área de ações (salvar/cancelar) */
.info-card-actions {
    padding: 0.85rem 1.3rem 1.1rem;
    border-top: 1px solid #F0F2F7;
    background: #FAFBFD;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.5rem 1.1rem;
    background: #1A4592;
    border: none;
    border-radius: 9px;
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.6rem;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(26, 69, 146, 0.3);
    text-decoration: none;
}

.btn-save:hover {
    background: #153775;
    box-shadow: 0 5px 16px rgba(26, 69, 146, 0.45);
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #E3E6EF;
    border-radius: 9px;
    color: #64748B;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #F5F6FA;
    border-color: #CBD5E1;
    color: #4A5568;
}

/* Responsive: empilha em tela pequena */
@media (max-width: 991px) {
    .row.mt-4.p-4 {
        grid-template-columns: 1fr !important;
        padding: 1rem !important;
        gap: 1rem;
    }

    .painel-sidebar {
        position: static;
    }

    .info-fields-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .info-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   NAVBAR - TOPO
   ================================================ */
.painel-navbar {
    background: #0A1C3A !important;
    padding: 0 1.75rem !important;
    min-height: 62px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.painel-navbar .container-fluid {
    padding: 0;
    gap: 1rem;
}

/* Logo */
.painel-navbar-logo {
    max-height: 32px;
    width: auto;
}

/* Links de navegação */
.painel-navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 0.9rem !important;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.painel-navbar .navbar-nav .nav-link:hover,
.painel-navbar .navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
}

/* ---- Mega-menu elegante ---- */
.mega-menu {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 18px !important;
    border: none !important;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.12),
        0 20px 52px -8px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    margin-top: 10px !important;
    min-width: 580px;
    animation: megaIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes megaIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Cabeçalho do mega-menu */
.mega-header {
    background: linear-gradient(135deg, #0A1C3A 0%, #163877 100%);
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mega-header-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mega-header-title {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 2px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.mega-header-sub {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.76rem;
    margin: 0;
}

/* Corpo do mega-menu */
.mega-body {
    display: flex;
    padding: 1rem 0.8rem 1rem;
    gap: 0.25rem;
    background: #fff;
}

.mega-col {
    flex: 1;
    min-width: 0;
    padding: 0 0.4rem;
}

.mega-divider {
    width: 1px;
    background: #EEF0F5;
    flex-shrink: 0;
    margin: 0.2rem 0.3rem;
    align-self: stretch;
}

.mega-section-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94A3B8;
    padding: 0 0.5rem;
    margin-bottom: 0.45rem;
}

/* Item do mega-menu */
.mega-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.6rem;
    border-radius: 10px;
    text-decoration: none !important;
    color: #1E2A3A;
    margin-bottom: 3px;
    transition: all 0.18s ease;
    border-left: 2px solid transparent;
}

.mega-item:hover {
    background: #F0F5FC;
    color: #1A4592;
    border-left-color: #1A4592;
    text-decoration: none !important;
}

.mega-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    background: #EEF2FB;
    color: #1A4592;
    transition: all 0.18s ease;
}

.mega-item:hover .mega-item-icon {
    background: #1A4592;
    color: #fff;
    box-shadow: 0 4px 10px rgba(26, 69, 146, 0.35);
}

.mega-item-title {
    display: block;
    font-size: 0.845rem;
    font-weight: 600;
    line-height: 1.3;
}

.mega-item-desc {
    display: block;
    font-size: 0.73rem;
    color: #64748B;
    line-height: 1.3;
    transition: color 0.18s;
}

.mega-item:hover .mega-item-desc {
    color: #4A72B5;
}

/* Footer do mega-menu */
.mega-footer {
    background: #F8FAFD;
    border-top: 1px solid #EEF0F5;
    padding: 0.7rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mega-footer-text {
    font-size: 0.75rem;
    color: #94A3B8;
    margin: 0;
}

.mega-footer-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1A4592;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.18s;
}

.mega-footer-link:hover {
    gap: 8px;
    color: #0F2E72;
}

/* Dropdown simples (Relatórios) */
.painel-navbar .dropdown-menu:not(.mega-menu) {
    background: #fff;
    border: none;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    padding: 0.6rem;
    margin-top: 8px !important;
    min-width: 260px;
    animation: megaIn 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.painel-navbar .dropdown-menu:not(.mega-menu) .dropdown-item {
    border-radius: 9px;
    padding: 0.5rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1E2A3A;
    font-size: 0.845rem;
    border-left: 2px solid transparent;
    transition: all 0.18s;
}

.painel-navbar .dropdown-menu:not(.mega-menu) .dropdown-item:hover {
    background: #F0F5FC;
    color: #1A4592;
    border-left-color: #1A4592;
}

.painel-navbar .submenu-icon-content {
    width: 36px;
    height: 36px;
    background: #EEF2FB;
    border-radius: 9px;
    color: #1A4592;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s;
}

.painel-navbar .dropdown-menu:not(.mega-menu) .dropdown-item:hover .submenu-icon-content {
    background: #1A4592;
    color: #fff;
    box-shadow: 0 4px 10px rgba(26, 69, 146, 0.35);
}

.painel-navbar .submenu-item {
    font-size: 0.845rem;
    font-weight: 600;
    color: inherit;
    line-height: 1.3;
}

.painel-navbar .submenu-description {
    font-size: 0.73rem;
    color: #64748B;
    line-height: 1.3;
}

/* Seção do usuário no navbar */
.painel-navbar-user .btn-primary {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    padding: 0.35rem 0.75rem !important;
    box-shadow: none !important;
    transition: background 0.2s;
}

.painel-navbar-user .btn-primary:hover {
    background: rgba(255, 255, 255, 0.18) !important;
}

.painel-navbar-user #company_name {
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 0.835rem !important;
    margin-bottom: 0 !important;
}

.painel-navbar-user .dropdown-menu-end {
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
    border: none;
    min-width: 220px;
    margin-top: 6px !important;
}

/* Hamburger mobile */
.painel-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3) !important;
    padding: 0.3rem 0.55rem;
}

.painel-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* ================================================
   SIDEBAR - LATERAL
   ================================================ */
.painel-sidebar {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem 1.1rem 1.75rem;
    box-shadow: 0 2px 10px rgba(10, 28, 58, 0.08);
    position: sticky;
    top: 78px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #E3E6EF transparent;
}

.painel-sidebar::-webkit-scrollbar {
    width: 4px;
}

.painel-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.painel-sidebar::-webkit-scrollbar-thumb {
    background: #E3E6EF;
    border-radius: 4px;
}

.painel-sidebar::-webkit-scrollbar-thumb:hover {
    background: #CBD5E1;
}

.painel-sidebar-group {
    margin-bottom: 1.1rem;
}

.painel-sidebar-group:last-child {
    margin-bottom: 0;
}

.painel-sidebar-group-label {
    display: block;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94A3B8;
    padding: 0 1rem;
    margin-bottom: 0.3rem;
}

/* Link do sidebar */
.painel-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    border-radius: 10px;
    text-decoration: none !important;
    color: inherit;
    margin-bottom: 10px;
}

/* .menu-item dentro do sidebar */
.painel-sidebar-link .menu-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.52rem 1rem;
    border-radius: 10px;
    color: #3D4A5E;
    font-size: 0.845rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.18s;
    background: transparent;
    box-shadow: none;
    border: none;
}

/* Badge "Novo/Nova" para itens não lidos */
.badge-novo {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: #ef4444;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .04em;
    vertical-align: middle;
}

/* Highlight em linhas/cards não lidos */
.ficha-nao-lida { background: #fffbeb !important; }
.ficha-nao-lida:hover { background: #fef9c3 !important; }
.lead-chat-nao-lido { background: #fffbeb !important; }

.sidebar-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: .63rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 20px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.painel-sidebar-link .menu-item i {
    font-size: 0.88rem;
    width: 17px;
    text-align: center;
    color: #8A9BB0;
    flex-shrink: 0;
    transition: color 0.18s;
}

/* Hover */
.painel-sidebar-link:hover .menu-item {
    background: #EEF2FB;
    color: #1A4592;
}

.painel-sidebar-link:hover .menu-item i {
    color: #1A4592;
}

/* Ativo — via JS (menu-item-active) OU via classe direta */
.painel-sidebar-link .menu-item.menu-item-active,
.painel-sidebar-link:has(.menu-item-active) .menu-item {
    background: linear-gradient(90deg, #0A1C3A 0%, #1A4592 100%);
    color: #fff;
}

.painel-sidebar-link .menu-item.menu-item-active i,
.painel-sidebar-link:has(.menu-item-active) .menu-item i {
    color: rgba(255, 255, 255, 0.82);
}

/* Separador */
.painel-sidebar-sep {
    height: 1px;
    background: #EEF0F5;
    margin: 0.5rem 0.6rem 1rem;
}

/* ================================================
   FOOTER
   ================================================ */
.footer-panel {
    background: #0A1C3A;
    width: 100%;
}

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

/* ----- Cards ----- */
.pipe-card {
    background-color: var(--color-neutral-0);
    border-radius: 8px;
    padding: 24px;
}

.card-button-horizontal-line {
    height: 1px;
    border-bottom: 1px solid var(--color-neutral-200);
}

.card-button-horizontal-container {
    background-color: var(--color-neutral-0);
    border-radius: 8px;
}

#success {
    background-color: var(--color-neutral-0);
    border-radius: 8px;
}

/* ----- Buttons ----- */
.btn {
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 7px 15px;
}

/* ----- Grid overrides ----- */
.row {
    --bs-gutter-x: 0rem !important;
}

.row>* {
    padding-right: calc(1.5rem * .5);
    padding-left: calc(1.5rem * .5);
}

/* ----- Images ----- */
img {
    border-radius: 8px;
}

.avatar img {
    border-radius: 50%;
}

.customer-logo {
    max-width: 9rem;
    border-radius: 0;
    max-height: 8rem;
}

/* ----- Icons ----- */
.icon-documentation {
    min-height: 40px;
    min-width: 40px;
    border-radius: 8px;
}

.icon-documentation i {
    font-size: 20px;
}

/* ----- Sub-header ----- */
.sub-header {
    padding: 0;
}

.sub-header-icon {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 16px;
}

.sub-header-intro {
    background-color: var(--color-primary-800);
    color: var(--color-neutral-0);
    padding: 24px 0;
}

.sub-header-link {
    text-decoration: none;
    color: var(--color-neutral-600);
}

/* ----- Table ----- */
thead {
    background-color: var(--color-neutral-100);
}

/* ----- Utilities ----- */
.edit-value {
    display: none;
}

.hidden {
    display: none;
}

.flex-auto {
    flex: auto;
}

.float-right {
    float: right;
}

.justify-around {
    justify-content: space-around;
}

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

.text-decoration-none {
    text-decoration: none !important;
}

.bg-transparent {
    background-color: transparent;
}

.top-2 {
    margin-top: 2px;
}

.height-250 {
    min-height: 250px;
}

/* ----- Placeholder para campos vazios ----- */
.empty-placeholder {
    color: #b0bec5 !important;
    font-style: italic;
    font-size: 0.875em;
    opacity: 0.85;
}

/* ----- SweetAlert2 toast ----- */
.swal2-top-end .swal2-toast {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ----- Login page ----- */
#login {
    width: 100%;
    max-width: 420px;
    margin-top: 80px;
}

.samisales-logo {
    max-width: 180px;
}

.field-spacing {
    margin-bottom: 1rem;
}

.pb-7 {
    padding-bottom: 2.5rem;
}

.observation {
    flex-direction: column;
}

/* ----- Layout ----- */
.panel-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .panel-grid-layout {
        grid-template-columns: 1fr 0.5fr;
    }
}

/* ----- Form Indentation ----- */
.form-indented {
    padding: 1rem 1.3rem !important; 
}.logo-bw { filter: brightness(0) invert(1); opacity: .65; }

/* ================================================================
   NAVBAR — dark, sem Bootstrap, mega menu estilo card-grid
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --n-h:       64px;
    --n-bg:      #0d1424;
    --n-border:  rgba(255,255,255,.07);
    --n-text:    rgba(255,255,255,.6);
    --n-hi:      #fff;
    --n-blue:    #4f8ef7;
    --n-blue-a:  rgba(79,142,247,.13);
    --n-surface: #131e30;
    --n-card:    #1a2840;
    --n-card-hv: #1f3050;
    --n-sep:     rgba(255,255,255,.07);
    --n-radius:  12px;
    --n-ease:    .16s cubic-bezier(.4,0,.2,1);
}

/* ── barra ── */
.pnav {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: var(--n-h);
    background: var(--n-bg);
    border-bottom: 1px solid var(--n-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 0;
}

/* ── logo ── */
.pnav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 20px;
    text-decoration: none;
}
.pnav-brand img { height: 30px; width: auto; display: block; }

/* ── nav central ── */
.pnav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.pnav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--n-text);
    font-size: .845rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background var(--n-ease), color var(--n-ease);
}
.pnav-btn:hover,
.pnav-item.open > .pnav-btn {
    background: var(--n-blue-a);
    color: var(--n-hi);
}
.pnav-chevron {
    font-size: .6rem;
    opacity: .45;
    transition: transform var(--n-ease), opacity var(--n-ease);
}
.pnav-item.open > .pnav-btn .pnav-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--n-blue);
}

.pnav-item { position: relative; }

/* ================================================================
   MEGA MENU — grid de cards
   ================================================================ */
.pmega {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: -12px;
    width: 680px;
    background: var(--n-surface);
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.55);
    overflow: hidden;
    animation: pmegaDrop .17s ease;
    z-index: 100;
}
.pnav-item.open .pmega { display: block; }

@keyframes pmegaDrop {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* topo do mega */
.pmega-top {
    display: flex;
    align-items: stretch;
    background: linear-gradient(100deg, #0f2547 0%, #111d35 100%);
    border-bottom: 1px solid var(--n-border);
}
.pmega-top-bar {
    width: 4px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #4f8ef7 0%, #7c3aed 100%);
}
.pmega-top-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    flex: 1;
}
.pmega-top-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(79,142,247,.18);
    color: var(--n-blue);
    border-radius: 9px;
    font-size: 1rem;
    flex-shrink: 0;
}
.pmega-top-title { font-size: .875rem; font-weight: 700; color: #fff; }
.pmega-top-sub   { font-size: .72rem; color: rgba(255,255,255,.38); margin-top: 2px; }

/* grid */
.pmega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 14px;
}

.pmega-label {
    grid-column: 1 / -1;
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.22);
    padding: 6px 4px 5px;
    border-bottom: 1px solid var(--n-sep);
    margin-bottom: 2px;
}
.pmega-label:first-child { padding-top: 0; }

/* card */
.pmega-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    background: var(--n-card);
    border: 1px solid transparent;
    border-radius: 9px;
    text-decoration: none;
    transition: background var(--n-ease), border-color var(--n-ease), transform var(--n-ease);
    min-width: 0;
    overflow: hidden;
}
.pmega-card:hover {
    background: var(--n-card-hv);
    border-color: rgba(79,142,247,.28);
    transform: translateY(-1px);
}
.pmega-card-icon {
    width: 30px; height: 30px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(79,142,247,.1);
    color: var(--n-blue);
    border-radius: 7px;
    font-size: .82rem;
    transition: background var(--n-ease), color var(--n-ease);
}
.pmega-card:hover .pmega-card-icon {
    background: var(--n-blue);
    color: #fff;
}
.pmega-card-text {
    flex: 1;
    min-width: 0;
}
.pmega-card-title {
    display: block;
    font-size: .775rem;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.pmega-card-desc {
    display: block;
    font-size: .67rem;
    color: rgba(255,255,255,.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* rodapé */
.pmega-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-top: 1px solid var(--n-border);
    background: rgba(0,0,0,.2);
}
.pmega-foot-note {
    font-size: .68rem;
    color: rgba(255,255,255,.25);
    display: flex; align-items: center; gap: 5px;
}
.pmega-foot-link {
    font-size: .71rem;
    color: var(--n-blue);
    text-decoration: none;
    display: flex; align-items: center; gap: 5px;
    transition: gap var(--n-ease);
}
.pmega-foot-link:hover { gap: 8px; }

/* ── dropdown simples ── */
.pdrop {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: var(--n-surface);
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius);
    box-shadow: 0 16px 48px rgba(0,0,0,.5);
    padding: 6px;
    animation: pmegaDrop .17s ease;
    z-index: 100;
}
.pnav-item.open .pdrop { display: block; }

.pdrop-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    text-decoration: none; color: var(--n-text); font-size: .82rem;
    transition: background var(--n-ease), color var(--n-ease);
}
.pdrop-item:hover { background: var(--n-blue-a); color: var(--n-hi); }
.pdrop-icon {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(79,142,247,.1); color: var(--n-blue);
    border-radius: 7px; font-size: .8rem; flex-shrink: 0;
}
.pdrop-title { display: block; font-size: .8rem; font-weight: 500; color: rgba(255,255,255,.82); }
.pdrop-desc  { display: block; font-size: .68rem; color: rgba(255,255,255,.33); }

/* ── usuário ── */
.pnav-user { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.pnav-support {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    color: var(--n-text); font-size: .95rem; text-decoration: none;
    transition: background var(--n-ease), color var(--n-ease);
}
.pnav-support:hover { background: var(--n-blue-a); color: var(--n-blue); }

.pnav-bell-wrap { position: relative; }
.pnav-bell {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    color: var(--n-text); font-size: .95rem;
    background: none; border: none; cursor: pointer;
    transition: background var(--n-ease), color var(--n-ease);
}
.pnav-bell:hover { background: var(--n-blue-a); color: var(--n-blue); }
.pnav-bell-badge {
    position: absolute;
    top: 3px; right: 3px;
    background: #ef4444;
    color: #fff;
    font-size: .58rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 20px;
    min-width: 16px;
    text-align: center;
}

/* Dropdown de notificações */
.pnav-bell-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: var(--n-card, #fff);
    border: 1px solid var(--n-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 9999;
    overflow: hidden;
}
.pnav-bell-wrap.open .pnav-bell-dropdown { display: block; }
.pnav-bell-header {
    padding: 12px 16px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--n-sub, #6b7280);
    border-bottom: 1px solid var(--n-border, #e5e7eb);
}
.pnav-bell-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    text-decoration: none;
    color: var(--n-text, #111);
    transition: background var(--n-ease, .15s);
    border-bottom: 1px solid var(--n-border, #f3f4f6);
}
.pnav-bell-item:last-child { border-bottom: none; }
.pnav-bell-item:hover { background: var(--n-blue-a, #eff6ff); }
.pnav-bell-item-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: var(--n-blue-a, #eff6ff);
    color: var(--n-blue, #3b82f6);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.pnav-bell-item-body { flex: 1; min-width: 0; }
.pnav-bell-item-title { display: block; font-size: .82rem; font-weight: 600; }
.pnav-bell-item-sub   { display: block; font-size: .73rem; color: var(--n-sub, #6b7280); margin-top: 1px; }
.pnav-bell-item-badge {
    background: #ef4444;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
}
.pnav-bell-empty {
    padding: 18px 16px;
    text-align: center;
    font-size: .82rem;
    color: var(--n-sub, #6b7280);
}

.pnav-user-wrap { position: relative; }

.pnav-user-btn {
    display: flex; align-items: center; gap: 9px;
    padding: 5px 10px 5px 5px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--n-border);
    border-radius: 10px; cursor: pointer;
    transition: background var(--n-ease), border-color var(--n-ease);
}
.pnav-user-btn:hover,
.pnav-user-wrap.open .pnav-user-btn {
    background: var(--n-blue-a);
    border-color: rgba(79,142,247,.3);
}
.pnav-avatar {
    width: 30px; height: 30px; border-radius: 7px;
    overflow: hidden; background: var(--n-card); flex-shrink: 0;
}
.pnav-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.pnav-avatar-lg  { width: 40px; height: 40px; border-radius: 9px; }
.pnav-user-info  { display: flex; flex-direction: column; }
.pnav-user-name  { font-size: .78rem; font-weight: 600; color: #fff; white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.pnav-user-role  { font-size: .65rem; color: rgba(255,255,255,.33); }
.pnav-user-chev  { font-size: .6rem; color: rgba(255,255,255,.35); transition: transform var(--n-ease); }
.pnav-user-wrap.open .pnav-user-chev { transform: rotate(180deg); }

.pnav-user-menu {
    display: none;
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 220px;
    background: var(--n-surface);
    border: 1px solid var(--n-border);
    border-radius: var(--n-radius);
    box-shadow: 0 16px 48px rgba(0,0,0,.55);
    padding: 6px;
    animation: pmegaDrop .17s ease;
    z-index: 100;
}
.pnav-user-wrap.open .pnav-user-menu { display: block; }

.pnav-user-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; }
.pnav-user-head-name { font-size: .84rem; font-weight: 600; color: #fff; }
.pnav-user-head-sub  { font-size: .68rem; color: rgba(255,255,255,.33); margin-top: 1px; }
.pnav-sep { height:1px; background: var(--n-sep); margin: 4px 0; }

.pnav-menu-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; border-radius: 7px;
    text-decoration: none; color: var(--n-text); font-size: .8rem;
    transition: background var(--n-ease), color var(--n-ease);
}
.pnav-menu-item:hover { background: var(--n-blue-a); color: var(--n-hi); }
.pnav-menu-item i { width: 15px; text-align: center; flex-shrink: 0; }
.pnav-menu-item--danger { color: #f87171; }
.pnav-menu-item--danger:hover { background: rgba(248,113,113,.1); color: #fca5a5; }

/* ── mobile ── */
.pnav-hamburger {
    display: none; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 34px; height: 34px;
    background: none; border: none; cursor: pointer; border-radius: 7px;
    transition: background var(--n-ease);
}
.pnav-hamburger:hover { background: rgba(255,255,255,.07); }
.pnav-hamburger span { display:block; width:18px; height:2px; background:rgba(255,255,255,.65); border-radius:2px; }

@media (max-width: 860px) {
    .pnav-links { display: none; }
    .pnav-user-info { display: none; }
    .pnav-hamburger { display: flex; }
}