/* Dashboard Layout - Sidebar, Header */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
}

:root {
    --pending-pill-bg: #fff5d9;
    --pending-pill-text: #9a5a28;
}

.dashboard-body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    background: #f5f5f0;
}

/* ============================================
   Sidebar (baseado no CSS fornecido)
   ============================================ */

.sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    padding: 20px;
    height: calc(100vh - 40px);
    background: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .logo-container {
    padding: 20px 10px;
}

.sidebar.collapsed .logo {
    font-size: 20px;
}

.sidebar.collapsed .logo img {
    max-width: 50px;
    height: 50px;
    width: 50px;
    object-fit: contain;
    border-radius: 50%;
}

.sidebar.collapsed .logo .login-logo-text {
    display: none;
}

.sidebar.collapsed .menu-section {
    padding: 20px 10px;
}

.sidebar.collapsed .menu-title {
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 12px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar.collapsed .menu-arrow {
    display: none;
}

.sidebar.collapsed .menu-icon {
    margin-right: 0;
}

.logo-container {
    padding: 20px 0 30px 0;
    text-align: left;
    border-bottom: none;
    margin-bottom: 20px;
}

.logo {
    text-decoration: none;
    display: block;
}

/* Logo CONEXXIA na sidebar = mesmo markup e estilos da tela de login */
.sidebar .logo-container .login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    margin-top: 0;
}
.sidebar .logo-container .login-logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}
.sidebar .logo-container .login-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.logo img {
    max-width: 100%;
    height: auto;
}

/* Contexto do evento (acima de Visão Geral): alinhado ao mockup do hub */
.sidebar .sidebar-event-context {
    margin: 0 0 14px;
    padding: 0 0 2px;
}
.sidebar.collapsed .sidebar-event-context {
    display: none;
}
.sidebar .sidebar-event-context .sidebar-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 4px 10px;
    font-size: 14px;
    color: #19242F;
    margin: 0 0 0;
    text-decoration: none !important;
    font-weight: 500;
}

.sidebar .sidebar-event-context .sidebar-event {
    padding: 10px 4px 10px;
    border-bottom: 1px solid #ede8d8;
}
.sidebar .sidebar-event-context .se-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #b0a890;
    margin-bottom: 3px;
}
.sidebar .sidebar-event-context .se-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e1a10;
    line-height: 1.3;
    word-break: break-word;
}
.sidebar .sidebar-event-context .se-date {
    font-size: 10px;
    color: #8a8070;
    margin-top: 2px;
}

/* Menu Section / Itens (sidebar) */
.menu-section {
    padding: 0;
}

.menu-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: none;
}

/* Evita estilo padrão de link (azul/sublinhado) em todos os links do menu */
.sidebar .menu-section a {
    text-decoration: none !important;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 8px;
    border-radius: 0;
    text-decoration: none;
    color: #64748b;
    transition: color 0.15s ease, background 0.15s ease;
    cursor: pointer;
    position: relative;
    background: transparent;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.35px;
}

.menu-item:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
}

.menu-item.active {
    background: #f1f5f9;
    color: #0f172a;
    box-shadow: none;
}

.menu-item.active:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Marcador ativo: barra vertical em cápsula (pontas arredondadas), como referência de design */
.menu-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 28px;
    background: #0f172a;
    border-radius: 9999px;
}

.menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-text {
    flex: 1;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    color: inherit;
}

.menu-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.menu-item.active .menu-icon svg,
.menu-item:hover .menu-icon svg {
    fill: currentColor;
}

.sidebar.collapsed .menu-item.active::after {
    display: none;
}

.sidebar.collapsed .menu-item {
    color: #64748b;
}

.sidebar.collapsed .menu-item:hover {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
}

.sidebar.collapsed .menu-item.active {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.menu-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Menu grupo (item com submenu) */
.menu-group {
    margin-bottom: 8px;
}

.menu-group-label {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #64748b;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.35px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
    text-align: left;
}

.menu-group-label:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
}

/* Label do grupo: cinza por defeito; com subitem ativo, o realce e o marcador ficam na linha do menu (abaixo) */
.menu-group .menu-group-label {
    background: transparent !important;
    color: #64748b !important;
}
.menu-group.expanded .menu-group-label {
    background: transparent !important;
    color: #64748b !important;
}
.menu-group .menu-group-label:hover {
    background: #FFF !important;
    color: #475569 !important;
    border-radius: 8px;;
}

/* Subitem ativo: borda só no MENU (linha do .menu-group-label), não no link do submenu */
.menu-group:has(.menu-subitem.active) .menu-group-label,
.menu-group.expanded:has(.menu-subitem.active) .menu-group-label {
    position: relative;
    background: #FFF !important;
    color: #0f172a !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    border-right: 2px solid #0f172a;
}

.menu-group:has(.menu-subitem.active) .menu-group-label:hover,
.menu-group.expanded:has(.menu-subitem.active) .menu-group-label:hover {
    background: #F1F5F9 !important;
    color: #0f172a !important;
}



.menu-group:has(.menu-subitem.active) .menu-group-label-link.active::after {
    display: none;
}

.menu-group-label .menu-icon {
    margin-right: 12px;
}

.menu-group-label .menu-text {
    flex: 1;
}

/* Links do menu (Evento, Clientes, Usuários) — mesmo visual dos outros itens */
.sidebar .menu-group-label-link,
.menu-group-label-link {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 0;
    margin: 0 -20px 0 -12px;
    padding: 0 20px 0 12px;
    text-decoration: none !important;
    color: #64748b !important;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    position: relative;
}

.sidebar .menu-group-label-link:hover,
.menu-group-label-link:hover {
    color: #475569 !important;
}

.sidebar .menu-group .menu-group-label-link,
.menu-group .menu-group-label-link {
    color: #64748b !important;
}

.sidebar .menu-group .menu-group-label-link:hover,
.menu-group .menu-group-label-link:hover {
    color: #475569 !important;
}

.sidebar .menu-group-label-link.active,
.menu-group-label-link.active {
    background: #f1f5f9;
    color: #0f172a !important;
    margin-left: -20px;
    padding-left: 20px;
    border-radius: 0;
}

.menu-group-label-link.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 28px;
    background: #0f172a;
    border-radius: 9999px;
}

.menu-group-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    margin: 0 -4px 0 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: 8px;
}

.menu-group-arrow:hover {
    background: rgba(0, 0, 0, 0.08);
}

.menu-group-label .menu-arrow {
    transition: transform 0.2s;
}

.menu-group.expanded .menu-group-label .menu-arrow {
    transform: rotate(180deg);
}

.menu-sub {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

.menu-group.expanded .menu-sub {
    max-height: 420px;
    overflow-y: auto;
}

.menu-group--ecossistema.expanded .menu-sub {
    max-height: 900px;
}

.menu-group--config-white-label.expanded .menu-sub {
    max-height: 640px;
}

/* Ecossistema de Stakeholders: 1º nível (seção) e 2º nível (link) */
.menu-subitem--section {
    display: block;
    padding: 12px 20px 4px 48px;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    border-left: none;
    pointer-events: none;
    cursor: default;
}

.menu-subitem--section:first-child {
    padding-top: 8px;
}

.menu-subitem--nested {
    padding-left: 56px;
}

.menu-subitem {
    display: block;
    margin-left: 28px;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.25px;
    transition: background 0.15s ease, color 0.15s ease;
    border-left: none;
    border-left: 2px solid #E2E8F0;
}

.menu-subitem:hover {
    background: rgba(241, 245, 249, 0.65);
    color: #475569;
}

.menu-subitem.active {
    color: #0f172a;
    font-weight: 600;
    background: #F1F5F9;
}

.menu-subitem.active:hover {
    background: #F1F5F9;
    color: #0f172a;
}

.menu-subitem--disabled {
    color: #9ca3af;
    cursor: default;
    pointer-events: none;
}

.menu-subitem--disabled:hover {
    background: transparent;
    color: #9ca3af;
}

/* Sidebar collapsed: grupos e submenu */
.sidebar.collapsed .menu-group-label {
    justify-content: center;
    padding: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.sidebar.collapsed .menu-group-label .menu-text,
.sidebar.collapsed .menu-group-label .menu-arrow,
.sidebar.collapsed .menu-group-arrow {
    display: none;
}

.sidebar.collapsed .menu-group-label .menu-icon,
.sidebar.collapsed .menu-group-label-link .menu-icon {
    margin-right: 0;
}

.sidebar.collapsed .menu-group-label-link {
    justify-content: center;
}

.sidebar.collapsed .menu-sub {
    display: none;
}

.sidebar.collapsed .menu-group:has(.menu-subitem.active) .menu-group-label::after {
    display: none;
}

/* Submenu flutuante quando sidebar está encolhida */
.sidebar-submenu-flyout {
    position: fixed;
    z-index: 1200;
    min-width: 250px;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.7);
    border-right: none;
    border-radius: 30px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.sidebar-submenu-flyout-title {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: #0f172a;
    margin-bottom: 16px;
}

.sidebar-submenu-flyout-section {
    margin: 14px 0 6px;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

.sidebar-submenu-flyout-section:first-of-type {
    margin-top: 0;
}

.sidebar-submenu-flyout .menu-subitem {
    margin-right: 0;
    border-radius: 10px;
    padding-left: 16px;
}

/* Subnível colapsável dentro de .menu-sub (ex.: Aéreo > Malha aérea, …) */
.menu-nested {
    margin: 0;
}

.menu-nested-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 16px 6px 48px;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s;
}

.menu-nested-toggle:hover {
    color: #374151;
    background: rgba(45, 46, 43, 0.06);
}

.menu-nested-toggle .menu-nested-toggle-text {
    flex: 1;
    min-width: 0;
}

.menu-nested-toggle .menu-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.2s;
}

.menu-nested-toggle .menu-arrow svg {
    display: block;
}

.menu-nested.expanded .menu-nested-toggle .menu-arrow {
    transform: rotate(180deg);
}

.menu-nested-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s ease;
}

.menu-nested.expanded .menu-nested-panel {
    max-height: 560px;
}

.menu-nested-panel .menu-subitem {
    padding-left: 56px;
}

.menu-nested-panel .menu-subitem--deep {
    padding-left: 64px;
}

/* Permite um .menu-nested dentro do painel (3º nível expansível → 4º nível de links) */
.menu-nested-panel > .menu-nested > .menu-nested-toggle {
    padding-left: 56px;
}

.menu-nested-panel > .menu-nested > .menu-nested-panel .menu-subitem {
    padding-left: 64px;
}

/* ---------- Shell global (mesmo chrome da Lista de Convidados) ---------- */
body.dashboard-shell {
    --dashboard-topbar-height: 77px;
    --dashboard-bg-page: #f7f9fc;
    font-family: 'Inter', 'Manrope', 'DM Sans', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    min-height: 100vh;
    color: #333;
    background-image: none;
    /* Fundo único do painel — todas as rotas (ver regra design-system-ficha-convidado.mdc) */
    background-color: var(--dashboard-bg-page);
}

/*
 * Botão de destaque — classe única em todo o painel (.cx-btn-accent).
 * Variantes: --ghost (contorno), --sm (compacto), --icon (quadrado ícone ~28px).
 */
body.dashboard-shell .cx-btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    border-radius: 100px;
    border: 1px solid #ffcf4e;
    background: #ffcf4e;
    color: #1e1a10;
    font-family: 'Inter', 'Manrope', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: -1px -1px 4px 0 #ffffff, 1px 1px 4px 0 #abbccc;
}

body.dashboard-shell button.cx-btn-accent {
    appearance: none;
}

body.dashboard-shell .cx-btn-accent:hover:not(:disabled):not(.cx-nav-disabled),
body.dashboard-shell a.cx-btn-accent:hover {
    background: #ffbf1a;
    border-color: #ffbf1a;
    color: #1e1a10;
}

body.dashboard-shell .cx-btn-accent svg {
    flex-shrink: 0;
    color: #1e1a10;
}

body.dashboard-shell .cx-btn-accent.cx-btn-accent--ghost {
    background: transparent;
    border-color: #ffcf4e;
    color: #1e1a10;
    box-shadow: none;
}

body.dashboard-shell .cx-btn-accent.cx-btn-accent--ghost:hover:not(:disabled):not(.cx-nav-disabled),
body.dashboard-shell a.cx-btn-accent.cx-btn-accent--ghost:hover {
    background: #ffbf1a;
    border-color: #ffbf1a;
    color: #1e1a10;
    box-shadow: -1px -1px 4px 0 #ffffff, 1px 1px 4px 0 #abbccc;
}

body.dashboard-shell .cx-btn-accent.cx-btn-accent--sm {
    padding: 10px 12px;
    border-radius: 100px;
    font-size: 13px;
    gap: 10px;
}

body.dashboard-shell .cx-btn-accent.cx-btn-accent--icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 12px;
    gap: 0;
}

body.dashboard-shell .cx-btn-accent--icon svg {
    width: 14px;
    height: 14px;
}

body.dashboard-shell .topbar .cx-btn-accent svg {
    width: 16px;
    height: 16px;
}

/* Bootstrap .btn-sm não deve encolher o pill amarelo da ficha / topbar */
body.dashboard-shell .cx-btn-accent.btn-sm {
    padding: 12px;
    border-radius: 100px;
    font-size: 14px;
    gap: 12px;
}

body.dashboard-shell .cx-btn-accent.cx-btn-accent--sm.btn-sm {
    padding: 10px 12px;
    font-size: 13px;
    gap: 10px;
}

body.dashboard-shell .cx-btn-accent:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    margin-left: 300px;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    padding-top: var(--dashboard-topbar-height, 77px); /* espaço para a topbar fixa */
    background-color: var(--dashboard-bg-page, #f7f9fc);
}

.main-content.sidebar-collapsed {
    margin-left: 120px;
}

/* ---------- Topbar (breadcrumb + título | ações + usuário) ---------- */
.topbar {
    --tb-purple: #6c5ce7;
    --tb-green-light: #e0f7f2;
    --tb-red-light: #fdecea;
    --tb-blue-light: #e8f4fd;
    --tb-purple-light: #ede9fb;
    --tb-gray-100: #f4f1e8;
    --tb-gray-200: #e8e3d0;
    --tb-gray-500: #8a8070;
    --tb-gray-900: #1e1a10;
    --tb-bg: rgba(255, 255, 255, 0.78);
    background-color: rgba(255, 255, 255, .3)!important;
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-sizing: border-box;
    min-height: var(--dashboard-topbar-height, 77px);
    height: var(--dashboard-topbar-height, 77px);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    position: fixed;
    top: 0;
    left: 300px;
    right: 0;
    z-index: 50;
    font-family: 'Inter', 'Manrope', 'DM Sans', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.topbar-toggle-wrap {
    display: flex;
    align-items: center;
    padding-right: 10px;
    margin-right: 2px;
    border-right: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.topbar-left {
    flex: 1 1 200px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
}

.topbar .breadcrumb {
    font-size: 11px;
    color: var(--tb-gray-500);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 32px 0;
    line-height: 1.25;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.topbar .breadcrumb::-webkit-scrollbar {
    display: none;
}

.topbar .breadcrumb .breadcrumb-separator {
    color: var(--tb-gray-500);
}

/* Todos os itens (links e texto) usam .breadcrumb-current — mesma cor do nome final */
.topbar .breadcrumb .breadcrumb-current {
    color: var(--tb-gray-900);
    font-weight: 500;
    text-decoration: none;
}

.topbar .breadcrumb a.breadcrumb-current:hover {
    text-decoration: underline;
}

.topbar .breadcrumb a.breadcrumb-home.breadcrumb-current svg {
    fill: currentColor;
    vertical-align: -2px;
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tb-gray-900);
    margin: 0;
    line-height: 1.25;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.topbar-title__id {
    display: inline-flex;
    align-items: center;
    gap: 0.28em;
    font-size: 0.88em;
    color: var(--tb-gray-500);
    letter-spacing: -0.02em;
}

.topbar-title__id-prefix {
    font-weight: 600;
}

.topbar-title__id-num {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    font-weight: 600;
}

.topbar-title__id .lc-clipboard-btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    margin: 0 0 0 2px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--tb-gray-400);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.12s, background 0.12s;
}

.topbar-title__id .lc-clipboard-btn:hover {
    color: var(--tb-gray-900);
    background: rgba(0, 0, 0, 0.06);
}

.topbar-title__id .lc-clipboard-btn.is-copied {
    color: #0e7e5c;
}

.convidado-page-v2 .lc-clipboard-btn--card {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transition: color 0.12s, background 0.12s;
}

.convidado-page-v2 .lc-clipboard-btn--card:hover {
    color: var(--gray-800);
    background: var(--gray-100);
}

.convidado-page-v2 .lc-clipboard-btn--card.is-copied {
    color: var(--green);
}

.topbar .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 16px !important;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.topbar .badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
}

.topbar .badge.b-sem::before {
    display: none;
}

.topbar .badge.b-confirmado {
    background: var(--tb-green-light);
    color: #00876a;
}

.topbar .badge.b-pendente {
    background: #fd9f02;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
}

.topbar .badge.b-pendente::before {
    display: none;
}

.topbar .badge.b-declinado {
    background: var(--tb-red-light);
    color: #b02020;
}

.topbar .badge.b-recusado {
    background: rgba(166, 54, 27, 0.2);
    color: #A6361B;
}

.topbar .badge.b-cancelado {
    background: rgba(154, 165, 177, 0.2);
    color: #9aa5b1;
}

.topbar .badge.b-enviado {
    background: var(--tb-blue-light);
    color: #0670c0;
}

.topbar .badge.b-sem {
    background: var(--tb-gray-100);
    color: var(--tb-gray-500);
    font-weight: 500;
}

.topbar .badge.b-pat {
    background: #fff8e1;
    color: #c07800;
}

.topbar-right {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
}

/* Busca rápida de convidado (contexto evento), à esquerda de “Limpar cache” */
.topbar-guest-search-wrap {
    position: relative;
    flex-shrink: 1;
    min-width: 0;
    max-width: min(280px, 36vw);
}

body.dashboard-shell.page-lista-convidados .topbar-guest-search-wrap,
body.dashboard-shell.page-convidado-show .topbar-guest-search-wrap {
    max-width: min(420px, 50vw);
}

.topbar-guest-search-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.topbar-guest-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #92908c;
    border-radius: 999px;
    padding: 12px;
    min-height: 0;
    box-sizing: border-box;
    box-shadow: -1px -1px 4px 0 #ffffff, 1px 1px 4px 0 #abbccc;
}

body.dashboard-shell .topbar-guest-search-field:focus-within {
    border-color: #7a7873;
    box-shadow: -1px -1px 4px 0 #ffffff, 1px 1px 4px 0 #abbccc, 0 0 0 1px rgba(66, 45, 45, 0.12);
}

.topbar-guest-search-ico {
    flex-shrink: 0;
    color: #422d2d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-guest-search-ico svg {
    display: block;
}

.topbar-guest-search-input {
    border: none;
    background: transparent;
    flex: 1 1 0;
    min-width: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    color: #422d2d;
    outline: none;
}

.topbar-guest-search-input::placeholder {
    color: #422d2d;
    opacity: 0.85;
    font-weight: 400;
}

.topbar-guest-search-results {
    position: absolute;
    /* Colado ao campo: o intervalo anterior deixava ver o fundo «vidro» da topbar / conteúdo por trás */
    top: 100%;
    margin-top: -1px;
    right: 0;
    left: 0;
    z-index: 3;
    padding: 4px 0;
    list-style: none;
    background-color: #fff;
    border: 1px solid #92908c;
    border-top-color: #92908c;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    max-height: 280px;
    overflow-y: auto;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* Lista aberta: classe no wrap (a <ul> pode estar em document.body — portal). */
.topbar-guest-search-wrap.topbar-guest-search-wrap--open .topbar-guest-search-field {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

/*
 * Lista em portal (body): backdrop-filter na .topbar cria contexto — fixed+z-index
 * *dentro* da topbar continuava por baixo / a ser recortado. Fora da topbar, z-index basta.
 */
.topbar-guest-search-results.topbar-guest-search-results--fixed {
    position: fixed !important;
    z-index: 10040;
    right: auto;
    margin-top: 0;
    min-width: 0;
}

.topbar-guest-search-results:not([hidden]) {
    display: block;
}

.topbar-guest-search-results[hidden] {
    display: none !important;
}

.topbar-guest-search-results button {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 13px;
    color: #422d2d;
    cursor: pointer;
    line-height: 1.35;
}

.topbar-guest-search-results button:hover,
.topbar-guest-search-results button:focus {
    background: var(--tb-gray-100);
    outline: none;
}

.topbar-guest-search-empty-msg {
    padding: 10px 12px;
    font-size: 12px;
    color: #422d2d;
    list-style: none;
}

.topbar-clear-cache {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

/* Limpar cache: botão circular com ícone de vassoura */
.topbar-right .topbar-clear-cache .topbar-clear-cache-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px;
    border-radius: 100px;
    border: 1px solid #b91c1c;
    background: #fff;
    color: #000000;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: -1px -1px 4px 0 #ffffff, 1px 1px 4px 0 #abbccc;
    line-height: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}

.topbar-right .topbar-clear-cache .topbar-clear-cache-btn svg {
    display: block;
    flex-shrink: 0;
}

.topbar-right .topbar-clear-cache .topbar-clear-cache-btn:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
    box-shadow: -1px -1px 4px 0 #ffffff, 1px 1px 4px 0 #abbccc;
}

.topbar-right .topbar-clear-cache .topbar-clear-cache-btn:focus-visible {
    outline: 2px solid #b91c1c;
    outline-offset: 2px;
}

.topbar-right .topbar-clear-cache .topbar-clear-cache-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.topbar-inline-form {
    display: inline-flex;
    margin: 0;
    align-items: center;
}

/* Ficha convidado: o form do Excluir não vira “caixa” flex — o botão alinha com os <a> ao lado */
.topbar-actions.topbar-actions--context > form.topbar-inline-form,
.topbar-actions.topbar-actions--context .topbar-actions-primary-group form.topbar-inline-form {
    display: contents;
    margin: 0;
    padding: 0;
}

.topbar-actions.topbar-actions--context {
    align-items: center;
}

/* Grupo escuro Excluir / PDF / Excel (referência layout ficha convidado) */
.topbar-actions.topbar-actions--context .topbar-actions-primary-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.topbar-actions.topbar-actions--context .topbar-actions-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-right: 12px;
}

/* Botões na topbar: secundário claro (exceto .cx-btn-accent) */
.topbar-right .btn.btn-secondary.btn-sm:not(.cx-btn-accent) {
    background: #fff;
    border: 1px solid var(--tb-gray-200);
    color: var(--tb-gray-900);
    border-radius: 8px;
}

.topbar-right .btn.btn-secondary.btn-sm:not(.cx-btn-accent):hover {
    background: var(--tb-gray-100);
    border-color: var(--tb-gray-200);
    color: var(--tb-gray-900);
}

.topbar-right .btn.btn-secondary.btn-sm.topbar-btn-ico:not(.cx-btn-accent) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar-right .btn.btn-secondary.btn-sm.topbar-btn-ico:not(.cx-btn-accent) svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--tb-gray-600);
}

.topbar-right .btn.btn-secondary.btn-sm.topbar-btn-ico:not(.cx-btn-accent):hover svg {
    color: var(--tb-gray-900);
}

/* Ajuste da posição da topbar quando a sidebar está recolhida */
.main-content.sidebar-collapsed .topbar {
    left: 120px;
}

/* ---------- Barra fixa inferior: mesmo cromado da topbar (vidro claro + borda) ---------- */
body.dashboard-shell .cx-save-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    box-sizing: border-box;
    min-height: var(--dashboard-topbar-height, 77px);
    padding: 16px 24px;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    font-family: 'Inter', 'Manrope', 'DM Sans', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: rgba(255, 255, 255, .3) !important;
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: none;
}

@media (min-width: 769px) {
    body.dashboard-shell .main-content .cx-save-bar {
        left: 300px;
    }
}

body.dashboard-shell .main-content.sidebar-collapsed .cx-save-bar {
    left: 120px;
}

body.dashboard-shell .cx-save-bar.cx-save-bar--footer-split {
    flex-direction: row;
    align-items: center;
    justify-content: stretch;
    gap: 12px;
}

body.dashboard-shell .cx-save-bar--footer-split .cx-save-bar-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    row-gap: 12px;
    width: 100%;
    min-width: 0;
}

body.dashboard-shell .cx-save-bar--footer-split .cx-save-bar-nav {
    grid-column: 2;
    justify-self: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.dashboard-shell .cx-save-bar--footer-split .cx-save-bar-lista {
    grid-column: 3;
    justify-self: end;
    align-self: center;
}

@media (max-width: 640px) {
    body.dashboard-shell .cx-save-bar--footer-split .cx-save-bar-main {
        grid-template-columns: 1fr;
    }

    body.dashboard-shell .cx-save-bar--footer-split .cx-save-bar-nav {
        grid-column: 1;
        justify-self: center;
    }

    body.dashboard-shell .cx-save-bar--footer-split .cx-save-bar-lista {
        grid-column: 1;
        justify-self: stretch;
        width: 100%;
    }

    body.dashboard-shell .cx-save-bar--footer-split .cx-btn-footer-lista {
        width: 100%;
        justify-content: center;
    }
}

/* Rodapé ficha: tamanho dos ícones nos .cx-btn-accent */
body.dashboard-shell .cx-save-bar .cx-btn-accent svg {
    width: 16px;
    height: 16px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    flex-wrap: nowrap;
}

.topbar-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    text-decoration: none;
}

.topbar-action-btn:hover {
    background: #111827;
    color: #ffffff;
}

.topbar-action-btn--danger {
    border-color: #b91c1c;
    color: #b91c1c;
}

.topbar-action-btn--danger:hover {
    background: #b91c1c;
    color: #ffffff;
}

.topbar-action-icon {
    font-size: 0.9rem;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #333;
    margin-top: 0;
}

.menu-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ---------- User menu ---------- */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

/* Sino de notificações na topbar — círculo branco, borda escura, sombra neumórfica (igual Limpar cache) */
.topbar-notifications-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    padding: 10px;
    border-radius: 100px;
    border: 1px solid #1e1a10;
    background: #ffffff;
    color: #1e1a10;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: -1px -1px 4px 0 #ffffff, 1px 1px 4px 0 #abbccc;
    line-height: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}

.topbar-notifications-btn:hover {
    background: #ffffff;
    border-color: #1e1a10;
    box-shadow: -1px -1px 4px 0 #ffffff, 1px 1px 4px 0 #abbccc;
}

.topbar-notifications-btn:focus-visible {
    outline: 2px solid #1e1a10;
    outline-offset: 2px;
}

.topbar-notifications-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-notifications-icon svg {
    display: block;
}

/* Ponto: vazio = branco com contorno; com notificações = #FFCF4E */
.topbar-notifications-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    box-sizing: border-box;
    border: 2px solid #1e1a10;
    background: #ffffff;
    transform: translate(15%, -15%);
    pointer-events: none;
}

.topbar-notifications-btn.topbar-notifications-btn--has-unread .topbar-notifications-dot {
    background: #ffcf4e;
}

.user-info {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    background: transparent;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.user-info:hover {
    background: rgba(0, 0, 0, 0.06);
}

.user-chip {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    cursor: pointer;
    padding: 6px 8px 6px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.user-chip:hover {
    background: #fff;
}

.user-chip .user-name {
    font-size: 13px;
    line-height: 1.25;
}

.user-chip .user-role {
    font-size: 11px;
    line-height: 1.2;
    color: #6b7280;
}

.user-info.active .user-menu-arrow,
.user-chip.active .user-menu-arrow {
    transform: rotate(180deg);
}

/* Utilizador na topbar: mesmo padrão da Lista de Convidados (só iniciais; nome no dropdown) */
body.dashboard-shell .topbar .user-chip > div:nth-child(2),
body.dashboard-shell .topbar .user-chip .user-menu-arrow {
    display: none !important;
}

body.dashboard-shell .topbar .user-chip {
    padding: 0 !important;
    gap: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

body.dashboard-shell .topbar .user-chip:hover {
    background: transparent !important;
    box-shadow: none !important;
}

body.dashboard-shell .topbar .user-chip .user-avatar.user-avatar--initials {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    color: #ffffff !important;
    background: linear-gradient(to right, #13212e, #192a3b) !important;
    border: none !important;
    border-radius: 50% 50% 0 50% !important;
    box-shadow: none !important;
}

.user-menu-arrow {
    color: #666;
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a4a4a;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
}

/* Iniciais no topo: gradiente escuro, Inter 12 bold, canto inferior direito recto */
.user-avatar.user-avatar--initials {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    background: linear-gradient(to right, #13212e, #192a3b);
    border: none;
    border-radius: 50% 50% 0 50%;
    box-shadow: none;
}

.user-avatar-svg {
    width: 22px;
    height: 22px;
    display: block;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.user-role {
    font-size: 12px;
    color: #666;
}

/* Fechado: fica na .topbar-right (position: relative). Aberto: JS move para body + .user-dropdown--portal
   (a .topbar tem backdrop-filter — fixed aqui dentro não usa o viewport; ver busca convidados). */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    margin: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 0;
    display: none;
    z-index: 2500;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.user-dropdown.user-dropdown--portal {
    position: fixed;
    z-index: 10045;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown-welcome {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.user-dropdown-welcome-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.user-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.user-dropdown-item:hover {
    background: #f3f4f6;
}

.user-dropdown-item svg {
    fill: currentColor;
    flex-shrink: 0;
}

.user-dropdown-form {
    margin: 0;
    padding: 0;
}

.user-dropdown-btn,
a.user-dropdown-logout {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    box-sizing: border-box;
}

.user-dropdown-btn:hover,
a.user-dropdown-logout:hover {
    background: #f3f4f6;
}

.user-dropdown-btn svg,
a.user-dropdown-logout svg {
    fill: currentColor;
    flex-shrink: 0;
}

/* ---------- Content area ---------- */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    padding: 0;
    overflow-y: visible;
}

.page-title-box {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
}

.page-title-box h4 {
    font-size: 20px;
    font-weight: 300;
    color: #333;
    margin: 0;
}

/* Área única de conteúdo: todas as páginas devem respeitar este recuo (sem margin negativa no filho) */
.dashboard-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* ---------- Sidebar (compatibilidade antiga) ---------- */
.dashboard-sidebar {
    width: 260px;
    min-width: 260px;
    background: transparent;
    color: #333;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease, min-width 0.25s ease;
    z-index: 100;
    overflow: hidden;
}

.dashboard-sidebar.collapsed {
    width: 72px;
    min-width: 72px;
}

.dashboard-sidebar.collapsed .sidebar-brand-text,
.dashboard-sidebar.collapsed .sidebar-link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    padding: 0;
    margin: 0;
}

.dashboard-sidebar.collapsed .sidebar-brand {
    padding: 20px 12px;
    justify-content: center;
}

.dashboard-sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 12px;
}

.dashboard-sidebar.collapsed .sidebar-icon {
    margin: 0;
}

.sidebar-brand {
    padding: 24px;
    font-size: 1.125rem;
    font-weight: 700;
    color: #2c3e50;
    border-bottom: none;
    display: flex;
    align-items: center;
    transition: padding 0.25s ease;
}

.sidebar-brand-text {
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.sidebar-nav {
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #333;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: background 0.2s, color 0.2s, padding 0.25s ease;
}

.sidebar-link:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1a1a1a;
}

.sidebar-link.active {
    background: linear-gradient(to right, #2d2e2b 0%, #303030 100%);
    color: #fff;
    border-radius: 50px;
}

.sidebar-icon {
    font-size: 1.125rem;
    width: 1.5rem;
    min-width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link-text {
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

/* ---------- Wrapper (header + main) ---------- */
.dashboard-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-menu-toggle {
    display: flex;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.header-menu-toggle:hover {
    background: #f3f4f6;
}

.hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background: #374151;
    box-shadow: 0 6px 0 #374151, 0 -6px 0 #374151;
}

.header-title {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-user-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
}

.header-user-role {
    font-size: 0.75rem;
    color: #6b7280;
}

.header-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 0 50%;
    background: linear-gradient(to right, #13212e, #192a3b);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}

.header-user-arrow {
    font-size: 0.625rem;
    color: #6b7280;
}

.header-logout-link {
    margin-left: 8px;
    padding: 6px 12px;
    font-size: 0.875rem;
    color: #2d7ab8;
    text-decoration: none;
    border-radius: 6px;
}

.header-logout-link:hover {
    background: #eff6ff;
}

/* ---------- Main content ---------- */
.dashboard-main {
    flex: 1;
    padding: 24px;
    background: linear-gradient(180deg, #faf9f0 0%, #f5f4eb 50%, #f0efe6 100%);
    overflow-y: auto;
}

/* ---------- Dashboard content (cards, lists) ---------- */
.dashboard-page-title {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.dashboard-card {
    background: rgba(255,255,255,.5);
    border-radius: 40px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.dashboard-card h2 {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 16px;
}

.dashboard-events-list {
    list-style: none;
}

.dashboard-events-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-events-list li:last-child {
    border-bottom: none;
}

.dashboard-event-name {
    font-weight: 500;
    color: #1a1a1a;
}

.dashboard-event-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

.dashboard-empty {
    color: #6b7280;
    font-size: 0.95rem;
    padding: 24px 0;
}

/* Cards de resumo (Dashboard Laravel) */
.dashboard-welcome {
    margin-bottom: 24px;
    color: #666;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-cards .dashboard-card {
    margin-bottom: 0;
}

.dashboard-card-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.dashboard-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.dashboard-card-value.accent {
    color: #2d2e2b;
}




.dashboard-events-list .event-name {
    font-weight: 500;
    color: #1a1a1a;
}

.dashboard-events-list .event-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.dashboard-events-list .event-link {
    font-size: 14px;
    color: #2563eb;
    text-decoration: none;
}

.dashboard-events-list .event-link:hover {
    text-decoration: underline;
}

/* ---------- Responsive: mobile = sidebar overlay ---------- */
@media (max-width: 768px) {
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        margin-left: 0;
    }

    .dashboard-sidebar.collapsed {
        transform: translateX(-100%);
        width: 260px;
        min-width: 0;
    }

    .dashboard-sidebar.collapsed .sidebar-brand-text,
    .dashboard-sidebar.collapsed .sidebar-link-text {
        opacity: 1;
        width: auto;
        overflow: visible;
    }

    .dashboard-sidebar.collapsed .sidebar-link {
        justify-content: flex-start;
        padding: 12px 24px;
    }

    .dashboard-wrapper {
        width: 100%;
    }
}

/* ---------- Página Usuários / Cadastro de empresa ---------- */
.cadastro-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
}

.cadastro-grid.cadastro-grid--even {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.cadastro-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

@media (max-width: 768px) {
    .cadastro-grid.cadastro-grid--even {
        grid-template-columns: 1fr;
    }
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
    margin: 4px 0 0 0;
}

.usuarios-intro {
    margin-bottom: 1.5rem;
    color: #374151;
    line-height: 1.6;
    max-width: 720px;
}

/* ---------- Mensagens flash / feedback (painel — barra pastel, borda fina, só texto) ---------- */
:root {
    --msg-radius: 18px;
    --msg-pad-y: 14px;
    --msg-pad-x: 28px;
    --msg-font-size: 0.875rem;
    --msg-success-bg: #e8f5ee;
    --msg-success-border: #b8dfc8;
    --msg-success-text: #1a3d2c;
    --msg-error-bg: #fdf0f1;
    --msg-error-border: #ecc8cb;
    --msg-error-text: #6b1c21;
    --msg-warning-bg: #fff7e8;
    --msg-warning-border: #edd19a;
    --msg-warning-text: #5c3d0f;
}

.usuarios-alert,
.alert.alert-success,
.alert.alert-danger,
.alert.alert-error,
.alert.alert-warning,
.egh-alert,
.cx-alert {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: min(56rem, 100%);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    padding: var(--msg-pad-y) var(--msg-pad-x);
    border-radius: var(--msg-radius);
    border: 1px solid transparent;
    font-family: 'Inter', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    font-size: var(--msg-font-size);
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

.usuarios-alert ul,
.usuarios-alert ol,
.alert.alert-danger ul,
.alert.alert-danger ol,
.alert.alert-error ul,
.egh-alert ul,
.cx-alert ul {
    display: inline-block;
    text-align: left;
    margin: 0.35rem 0 0;
    padding-left: 1.25rem;
}

.usuarios-alert-success,
.alert.alert-success,
.egh-alert.egh-alert--success,
.cx-alert.cx-alert-success {
    background: var(--msg-success-bg);
    border-color: var(--msg-success-border);
    color: var(--msg-success-text);
}

.usuarios-alert-error,
.alert.alert-danger,
.alert.alert-error,
.egh-alert.egh-alert--error,
.cx-alert.cx-alert-error,
.cx-alert.cx-alert-danger {
    background: var(--msg-error-bg);
    border-color: var(--msg-error-border);
    color: var(--msg-error-text);
}

.alert.alert-warning {
    background: var(--msg-warning-bg);
    border-color: var(--msg-warning-border);
    color: var(--msg-warning-text);
}

/* Flash / feedback: portal centrado no ecrã (JS move os alertas para .app-flash-stack) */
.app-flash-portal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: min(5vw, 24px);
    box-sizing: border-box;
    pointer-events: none;
}

.app-flash-stack {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: min(56rem, 100%);
    align-items: stretch;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 16px !important;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    background: rgba(250, 204, 21, 0.35);
    border: 1px solid rgba(202, 138, 4, 0.25);
    white-space: nowrap;
}

.form-section {
    margin-bottom: 1.5rem;
}

.form-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

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

@media (max-width: 640px) {
    .form-grid-2,
    .form-grid-3 { grid-template-columns: 1fr; }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
}

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

/* Alinhado ao Novo Convidado (.convidado-novo-skin .form-label) */
.form-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #191c1e;
    letter-spacing: normal;
    text-transform: none;
    margin-bottom: 0;
    line-height: 1.35;
}

.form-label .required,
.form-label .req {
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
}

/* Base de .form-control: ver geral.css (campos globais) */

.form-control[type="file"] {
    height: auto;
    min-height: 48px;
    padding: 10px 14px;
    cursor: pointer;
}

.form-hint {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}






/* Selects dos formulários com o mesmo visual dos inputs */


.usuarios-list-title {
    font-size: 1.125rem;
    margin-bottom: 1.25rem !important;
    color: #1f2937;
    font-weight: 300;
}

.btn-danger-outline {
    background: transparent;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn-danger-outline:hover {
    background: #fee2e2;
}

/* Níveis de Acesso (matriz) */
.permissions-table-wrap {
    overflow-x: auto;
}

.permissions-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.permissions-table th,
.permissions-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    vertical-align: top;
}

.permissions-table th {
    text-align: left;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
}

.permissions-screen {
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
}

/* Tabela de dados (Eventos, etc.) */
.events-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.7);
    color: #111827;
}

.status-pill--success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.22);
    color: #065f46;
}

.status-pill--patrocinio {
    background: #e5a85a;
    border-color: #d4943a;
    color: #f5f5dc;
}

.status-pill--sem-patrocinio {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #4b5563;
}

.inline-panel {
    margin-top: 12px;
    padding: 16px;
    background: rgba(249, 250, 251, 0.85);
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    width: 100%;
    max-width: 520px;
}

/* Seleção de funções (cargos) — criar/editar colaborador: bloco compacto */
.colaborador-funcoes-cargos {
    max-width: 280px;
}
.colaborador-funcoes-cargos .roles-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.35rem;
}
.colaborador-funcoes-cargos .roles-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
    min-height: 1.75rem;
    padding: 0.15rem 0;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: #475569;
}
.colaborador-funcoes-cargos .roles-checkbox-item span {
    user-select: none;
}

/* Serviços do evento: garantir que os 6 ícones apareçam (quebra de linha se necessário) */
.event-services-icons {
    flex-wrap: wrap;
}
