/* Identidade Nexus. Carregar depois dos estilos-base em todas as páginas. */
:root {
    --nexus-cyan: #00c6ff;
    --nexus-dark: #0b0f14;
    --nexus-gray: #9aa4b2;
    --background: #f3f6f8;
    --surface: #ffffff;
    --sidebar: var(--nexus-dark);
    --sidebar-active: #172a34;
    --text: #17212b;
    --muted: #566575;
    --border: #dce4e9;
    --accent: #006d87;
    --nexus-accent-hover: #00556a;
    --nexus-soft: #e9f8fc;
}

/* Logos originais: proporção preservada e sem filtros de cor. */
.nexus-theme .nexus-logo {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.nexus-theme .brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin-bottom: 32px;
}

.nexus-theme .brand .nexus-logo {
    width: 214px;
}

.nexus-theme .brand .nexus-brand-context {
    margin: 0;
    color: #bdc8d2;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Navegação: ciano reservado à identificação da área atual. */
.nexus-theme .sidebar {
    background: var(--nexus-dark);
}

.nexus-theme .nav-label,
.nexus-theme .nav-arrow {
    color: var(--nexus-gray);
}

.nexus-theme .nav-link,
.nexus-theme .nav-group-summary {
    color: #d6dfe7;
}

.nexus-theme .nav-link:hover,
.nexus-theme .nav-group-summary:hover,
.nexus-theme .nav-group[open] > .nav-group-summary {
    color: #ffffff;
    background: var(--sidebar-active);
}

.nexus-theme .nav-link[aria-current="page"] {
    color: var(--nexus-cyan);
    background: var(--sidebar-active);
    box-shadow: inset 3px 0 0 var(--nexus-cyan);
}

.nexus-theme .nav-submenu,
.nexus-theme .menu-toggle {
    border-color: #34444f;
}

.nexus-theme .nav-link-disabled,
.nexus-theme .nav-link-disabled:hover,
.nexus-theme .nav-sub-link small {
    color: #9aa4b2;
}

.nexus-theme .nav-link-disabled:hover {
    background: transparent;
}

.nexus-theme .sidebar-note {
    color: #aebac6;
}

.nexus-theme .sidebar-note strong {
    color: #ffffff;
}

/* Superfícies: mantém as dimensões e a contenção de tabelas existentes. */
.nexus-theme .topbar {
    border-top: 3px solid var(--nexus-cyan);
}

.nexus-theme .metric,
.nexus-theme .panel,
.nexus-theme .plan-card,
.nexus-theme .detail-summary,
.nexus-theme .detail-metric {
    box-shadow: 0 3px 14px rgb(11 15 20 / 3%);
}

.nexus-theme .info-panel,
.nexus-theme .users-admin-callout {
    border-color: #a8dce9;
    background: var(--nexus-soft);
}

.nexus-theme .info-panel {
    border-left-color: var(--nexus-cyan);
}

.nexus-theme .info-panel p {
    color: var(--muted);
}

.nexus-theme .plan-card-highlight {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgb(0 198 255 / 14%);
}

.nexus-theme .plan-badge {
    color: var(--nexus-dark);
    background: var(--nexus-cyan);
}

.nexus-theme .history-marker {
    box-shadow: 0 0 0 1px #8abfcd;
}

/* Ações: texto branco sobre tom escuro; estados de erro mantêm sua cor. */
.nexus-theme .button,
.nexus-theme .auth-submit,
.nexus-theme .invite-button:not(.invite-secondary) {
    color: #ffffff;
    background: var(--accent);
}

.nexus-theme .button:hover,
.nexus-theme .auth-submit:hover,
.nexus-theme .invite-button:not(.invite-secondary):not(:disabled):hover {
    background: var(--nexus-accent-hover);
}

.nexus-theme .platform-logout:hover,
.nexus-theme .invite-secondary:not(:disabled):hover,
.nexus-theme .filter-clear:hover {
    background: var(--nexus-soft);
}

.nexus-theme .create-step-button[aria-current="step"]:not(.has-error) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--nexus-soft);
}

.nexus-theme .create-step-button:not(:disabled):not(.has-error):hover {
    background: var(--nexus-soft);
}

body.nexus-theme :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

body.nexus-theme .sidebar :is(a, button, summary):focus-visible {
    outline-color: var(--nexus-cyan);
}

body.nexus-theme [aria-invalid="true"]:focus-visible {
    outline-color: #942c35;
}

.nexus-theme .footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
}

.nexus-theme .footer strong {
    color: var(--text);
}

/* Login: fundo da marca e formulário claro, com rolagem natural. */
.nexus-theme.auth-page {
    background: radial-gradient(ellipse at top left, #123542, #0b0f14 65%);
}

.nexus-theme .auth-card {
    border-top: 4px solid var(--nexus-cyan);
    box-shadow: 0 24px 70px rgb(0 0 0 / 25%);
}

.nexus-theme .auth-brand {
    display: block;
    margin-bottom: 30px;
}

.nexus-theme .auth-brand .nexus-logo {
    width: 320px;
}

.nexus-theme .auth-product {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

/* Preserva o acordeão e o controle de abertura já usados no mobile. */
@media (max-width: 900px) {
    .nexus-theme .sidebar-header .brand {
        width: auto;
        flex: 1;
        margin-bottom: 0;
    }

    .nexus-theme .brand .nexus-logo {
        width: 180px;
    }

    .nexus-theme .brand .nexus-brand-context {
        display: none;
    }

    .nexus-theme .sidebar-navigation {
        border-top-color: #34444f;
        background: var(--nexus-dark);
    }

    .nexus-theme .sidebar-navigation .nav-group-summary {
        background: #141d25;
    }

    .nexus-theme .sidebar-navigation .nav-group[open] > .nav-group-summary {
        background: var(--sidebar-active);
    }
}

@media (forced-colors: active) {
    body.nexus-theme :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
        outline-color: Highlight;
    }

    .nexus-theme .nav-link[aria-current="page"] {
        outline: 1px solid Highlight;
        outline-offset: -1px;
    }
}