@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
    /* Brand Tokens: Executive Legislative Intelligence (Dark Theme) */
    --primary: #38bdf8;
    --primary-container: #0c4a6e;
    --primary-hover: #0284c7;
    --on-primary: #080c14;

    --secondary: #38bdf8;
    --secondary-container: #075985;
    --secondary-tint: rgba(56, 189, 248, 0.15);
    --secondary-dim: #7dd3fc;
    --on-secondary: #ffffff;

    --surface-bg: #090d16;
    --surface: #0c101b;
    --surface-card: #111624;
    --surface-card-hover: #161e30;
    --surface-sub: #141a29;
    --surface-container: #1b2337;
    --surface-container-high: #242f49;
    --surface-active: #1e293b;

    --border: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-active: rgba(255, 255, 255, 0.16);
    --border-focus: #38bdf8;

    --on-surface: #f8fafc;
    --on-surface-variant: #94a3b8;
    --on-surface-muted: #64748b;

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.25);

    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(245, 158, 11, 0.25);

    --error: #ef4444;
    --error-container: #450a0a;
    --error-bg: rgba(239, 68, 68, 0.15);
    --on-error: #ffffff;

    /* Legacy compatibility variables mapped to dark palette */
    --ink: #f8fafc;
    --muted: #94a3b8;
    --paper: #090d16;
    --line: rgba(255, 255, 255, 0.1);
    --forest: #1e293b;
    --forest-strong: #38bdf8;
    --teal: #0d9488;
    --amber: #d97706;
    --notice-bg: rgba(239, 68, 68, 0.12);
    --notice-ink: #fca5a5;
    --focus: #38bdf8;
    --space: 1.25rem;

    /* Module Badges (Image 1 Squircles) */
    --mod-parlamentar: #2563eb;
    --mod-sondagens: #8b5cf6;
    --mod-eleitoral: #f97316;
    --mod-pessoas: #0d9488;
    --mod-agenda: #f43f5e;
    --mod-demandas: #3b82f6;
    --mod-estrategia: #d97706;
    --mod-admin: #64748b;

    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--on-surface);
    background: var(--surface-bg);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Base typography & Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
.skip-link:focus {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.5rem;
}

h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.35rem;
}

h3 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1rem;
    color: var(--on-surface-variant);
}

.lead {
    font-size: 1.05rem;
    color: var(--on-surface-variant);
    max-width: 48rem;
    line-height: 1.6;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.muted {
    color: var(--on-surface-muted);
}

.eyebrow {
    margin: 0 0 0.35rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.hero {
    margin-bottom: 2rem;
    padding: 1.25rem 0 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* Material Symbols */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    vertical-align: middle;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    transform: translateY(-150%);
    background: var(--surface-card);
    border: 1px solid var(--border);
    color: var(--on-surface);
    padding: 0.5rem 0.85rem;
    z-index: 1000;
    border-radius: var(--radius);
    text-decoration: none;
}

.skip-link:focus {
    transform: none;
}

/* Layout Containers */
.wrap {
    width: min(75rem, calc(100% - 2rem));
    margin-inline: auto;
}

.wrap.ampla {
    width: min(90rem, calc(100% - 2.5rem));
}

main {
    flex: 1;
    padding: 1.75rem 0 2.5rem;
    outline: none;
}

/* ========================================================
   GLOBAL HEADER & NAVIGATION (FOR _Layout.cshtml)
   ======================================================== */
.site-header {
    background: #080c14;
    border-bottom: 1px solid var(--border);
    color: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 0.75rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.45rem;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
}

.brand-details {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.brand-sub {
    font-size: 0.72rem;
    color: var(--on-surface-variant);
    font-weight: 500;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list li {
    list-style: none;
    display: inline-flex;
    align-items: center;
}

.nav-list a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.nav-list a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

.nav-button {
    font: inherit;
    color: #94a3b8;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.context-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    margin: 0;
    font-size: 0.85rem;
    color: var(--on-surface-variant);
}

/* Link Lists (Used in /inicio) */
.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding: 0;
    margin: 1.25rem 0;
    list-style: none;
}

.link-list li {
    list-style: none;
}

.link-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.2rem;
    background: #111624;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.link-list a:hover {
    border-color: var(--primary);
    background: #162033;
    color: #ffffff;
    text-decoration: none;
}

/* Definition Lists / Facts */
.facts, .status-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.facts div, .status-list div {
    margin: 0;
    background: #0d121d;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

dt {
    font-size: 0.78rem;
    color: var(--on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

dd {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

/* Panels */
.panel {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.panel.narrow {
    max-width: 28rem;
    margin-inline: auto;
}

/* Site Footer */
.site-footer {
    border-top: 1px solid var(--border);
    color: var(--on-surface-muted);
    padding: 1.25rem 0;
    font-size: 0.8125rem;
    margin-top: auto;
    background: #080c14;
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.site-footer p {
    margin: 0;
}

/* Forms & Inputs */
label {
    display: block;
    margin: 0.75rem 0 0.3rem;
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--on-surface-variant);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    font: inherit;
    padding: 0.6rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: #0d121d;
    color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
    outline: none;
}

button[type="submit"]:not(.lc-login-submit):not(.btn-success):not(.btn-danger):not(.btn-secondary):not(.btn-questao):not(.lc-acao-editar):not(.lc-acao-excluir):not(.lc-acao-restaurar),
.btn-primary,
button:not(.nav-button):not(.sidebar-collapse-btn):not(.btn-icon):not(.btn-success):not(.btn-danger):not(.btn-secondary):not(.btn-questao):not(.lc-acao-editar):not(.lc-acao-excluir):not(.lc-acao-restaurar):not(.wizard-anterior):not(.lc-login-submit) {
    font: inherit;
    color: #ffffff;
    background: #2563eb;
    border: 0;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.15s ease;
}

button[type="submit"]:not(.lc-login-submit):not(.btn-success):not(.btn-danger):not(.btn-secondary):not(.btn-questao):not(.lc-acao-editar):not(.lc-acao-excluir):not(.lc-acao-restaurar):hover,
.btn-primary:hover,
button:not(.nav-button):not(.sidebar-collapse-btn):not(.btn-icon):not(.btn-success):not(.btn-danger):not(.btn-secondary):not(.btn-questao):not(.lc-acao-editar):not(.lc-acao-excluir):not(.lc-acao-restaurar):not(.wizard-anterior):not(.lc-login-submit):hover {
    background: #1d4ed8;
}

.btn-success, a.btn-success, button.btn-success {
    background: #198754 !important;
    color: #fff !important;
    border: 0 !important;
}
.btn-success:hover, a.btn-success:hover, button.btn-success:hover {
    background: #157347 !important;
}
.btn-danger, a.btn-danger, button.btn-danger,
.btn-vermelho, a.btn-vermelho, button.btn-vermelho {
    background: #dc3545 !important;
    color: #fff !important;
    border: 0 !important;
}
.btn-danger:hover, a.btn-danger:hover, button.btn-danger:hover,
.btn-vermelho:hover, a.btn-vermelho:hover, button.btn-vermelho:hover {
    background: #bb2d3b !important;
}

/* Notices & Alerts */
.notice, .notice-error {
    background: var(--notice-bg);
    color: var(--notice-ink);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* ========================================================
   PORTAL DE MÓDULOS (IMAGE 1 IDENTITY)
   ======================================================== */
.portal-body {
    background: #080c14;
    color: #f8fafc;
}

.portal-top-bar {
    background: #080c14;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.portal-main-wrap {
    flex: 1;
    padding: 2.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

.portal-container {
    width: 100%;
    max-width: 860px;
    background: #0c101b;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.25rem 2.25rem 1.75rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.portal-frame-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.75rem;
}

.portal-frame-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.portal-frame-icon {
    font-size: 26px;
    color: var(--on-surface);
}

.portal-frame-titles {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.portal-frame-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.portal-frame-sub {
    font-size: 0.75rem;
    color: var(--on-surface-variant);
    font-weight: 500;
}

.portal-badge-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
}

.portal-welcome-section {
    margin-bottom: 1.75rem;
}

.portal-welcome-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.02em;
}

.portal-welcome-desc {
    font-size: 0.875rem;
    color: var(--on-surface-variant);
    margin: 0;
}

.portal-modules-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
}

.module-card-item {
    display: flex;
    flex-direction: column;
    background: #111624;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.module-card-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

.module-squircle-badge {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.module-squircle-badge .material-symbols-outlined {
    font-size: 22px;
}

/* Squircle Colors from Image 1 */
.badge-parlamentar { background-color: #2563eb; }
.badge-sondagens { background-color: #8b5cf6; }
.badge-eleitoral { background-color: #f97316; }
.badge-pessoas { background-color: #0d9488; }
.badge-agenda { background-color: #f43f5e; }
.badge-demandas { background-color: #3b82f6; }
.badge-estrategia { background-color: #d97706; }
.badge-admin { background-color: #64748b; }

.module-card-info {
    flex: 1;
}

.module-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.01em;
}

.module-card-subtitle {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin: 0;
}

.module-card-link {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    transition: color 0.15s ease;
}

.module-card-item:hover .module-card-link {
    color: #f8fafc;
}

.module-card-link .link-arrow {
    font-size: 14px;
}

.portal-footer-note {
    margin-top: 1.75rem;
    padding-top: 1rem;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}

.portal-footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    background: #080c14;
    font-size: 0.8125rem;
    color: var(--on-surface-muted);
}

.portal-footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========================================================
   WORKSPACE WITH CONTEXTUAL SIDEBAR (IMAGES 2, 3, 4)
   ======================================================== */
.module-body {
    background: #080c14;
    color: #f8fafc;
}

.workspace-top-bar {
    height: 52px;
    background: #080c14;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 40;
}

.workspace-top-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-mark-mini {
    width: 28px;
    height: 28px;
    background: var(--surface-active);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    color: #ffffff;
    text-decoration: none;
}

.brand-mark-mini:hover {
    text-decoration: none;
}

.module-pills-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: none;
}

.module-pills-switcher::-webkit-scrollbar {
    display: none;
}

.module-switcher-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.module-switcher-pill:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

/* Active Pill: Solid White matching Images 2, 3, 4 */
.module-switcher-pill.active {
    background: #ffffff;
    color: #080c14;
    border-color: #ffffff;
    font-weight: 700;
}

.module-switcher-pill.active .pill-icon {
    color: #080c14;
}

.module-switcher-pill .pill-icon {
    font-size: 16px;
    color: var(--on-surface-variant);
}

.workspace-top-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.user-badge-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.user-avatar-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface-active);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.tenant-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
}

.user-email {
    font-size: 0.6875rem;
    color: var(--on-surface-muted);
}

.nav-button-icon {
    background: transparent;
    border: none;
    color: var(--on-surface-variant);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button-icon:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

/* Module Shell (Contextual Sidebar + Main) */
.module-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 52px);
    transition: grid-template-columns 0.2s ease;
}

.contextual-aside {
    background: #0c101b;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 52px);
    position: sticky;
    top: 52px;
    z-index: 30;
}

.aside-module-header {
    height: 52px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}

.aside-module-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
}

.module-icon-badge {
    font-size: 20px;
    color: var(--primary);
}

.sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: var(--on-surface-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.sidebar-collapse-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.aside-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.65rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.nav-category {
    margin-bottom: 1.25rem;
}

.nav-category-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    padding: 0.4rem 0.75rem 0.3rem;
}

.nav-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.nav-item-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.nav-item-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    text-decoration: none;
}

.nav-item-link.active {
    background: #1e293b;
    color: #ffffff;
    font-weight: 600;
}

.aside-bottom-bar {
    padding: 0.85rem 0.75rem;
    border-top: 1px solid var(--border-subtle);
    background: #0c101b;
}

.btn-portal-back {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-portal-back:hover {
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.btn-portal-back .material-symbols-outlined {
    font-size: 18px;
}

/* Collapsed Desktop State */
.sidebar-collapsed .module-shell {
    grid-template-columns: 64px 1fr;
}

.sidebar-collapsed .aside-module-title,
.sidebar-collapsed .nav-category-title,
.sidebar-collapsed .link-title,
.sidebar-collapsed .btn-portal-back span:not(.material-symbols-outlined) {
    display: none;
}

.sidebar-collapsed .nav-item-link {
    justify-content: center;
    padding: 0.65rem 0;
}

.sidebar-collapsed .icon-collapse {
    transform: rotate(180deg);
}

.module-main-viewport {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.module-content-breadcrumb {
    padding: 1rem 2rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--on-surface-muted);
}

.breadcrumb-flat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.breadcrumb-sep {
    font-size: 16px;
    color: #475569;
}

.breadcrumb-current {
    font-weight: 600;
    color: #ffffff;
}

.module-main-body {
    flex: 1;
    padding: 0 2rem 2.5rem;
}

/* ========================================================
   WORKSPACE PLACEHOLDER (IMAGES 2, 3, 4)
   ======================================================== */
.workspace-content-wrap {
    padding: 0.5rem 0 2rem;
}

.workspace-page-header {
    margin-bottom: 1.5rem;
}

.workspace-page-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
}

.workspace-placeholder-container {
    max-width: 460px;
}

.workspace-placeholder-card {
    background: #111624;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.workspace-card-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    color: #cbd5e1;
    margin-bottom: 0.85rem;
}

.workspace-card-icon .material-symbols-outlined {
    font-size: 32px;
}

.workspace-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.workspace-card-desc {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
}

.workspace-footer-note {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 2rem;
}

/* ========================================================
   TABLES, STATS, ELEITORAL WIZARD & MISC
   ======================================================== */
.data-table, table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-size: 0.84rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
}

.data-table caption, table caption {
    text-align: left;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.75rem 0.5rem;
    color: #ffffff;
}

.data-table th, table th {
    padding: 0.75rem 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    background: #0d121d;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.data-table td, table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: #e2e8f0;
}

.data-table tr:hover td, table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.status-pill.online {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    font-size: 0.72rem;
    font-weight: 600;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.banner-ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Stepper Navigation Wizard */
.wizard-passos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1rem 0 1.25rem;
}

.wizard-passo {
    background: #141a29;
    color: var(--on-surface-variant);
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.wizard-passo.ativo {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.lista-marca {
    display: grid;
    gap: 0.25rem;
    max-height: 18rem;
    overflow: auto;
    margin-top: 0.7rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: #0d121d;
}

.lista-marca.compacta {
    max-height: none;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.marca {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.4rem 0.5rem;
    border-radius: 0.35rem;
    color: #e2e8f0;
}

.marca:hover {
    background: rgba(255, 255, 255, 0.05);
}

.marca input {
    width: auto;
}

.marca-adicionar {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    color: var(--primary);
    border: none;
    border-radius: 0.35rem;
    padding: 0.45rem 0.55rem;
    cursor: pointer;
}

.marca-adicionar:hover {
    background: rgba(56, 189, 248, 0.1);
}

.wizard-rodape {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.grade-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem;
    margin: 0.8rem 0 1rem;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.8rem;
    margin: 0 0 1.2rem;
}

.kpis div {
    margin: 0;
    background: #111624;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    padding: 0.85rem 1rem;
}

.kpis dd {
    font-size: 1.35rem;
}

/* Action pills (_Acoes.cshtml) */
.nav-pills.eleitoral-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-pill.acao {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    background: #111624;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.nav-pill.acao:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    text-decoration: none;
}

.nav-pill.acao.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.loading-bar {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 100;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    background-size: 40% 100%;
    animation: loading-slide 1s linear infinite;
}

@keyframes loading-slide {
    from { background-position: -40% 0; }
    to { background-position: 140% 0; }
}

body.is-loading {
    cursor: progress;
}

/* Mobile Drawer Controls */
.mobile-drawer-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
}

.sidebar-backdrop {
    display: none;
}

/* Responsive */
@media (max-width: 840px) {
    .portal-modules-grid {
        grid-template-columns: 1fr;
    }

    .portal-container {
        padding: 1.5rem;
    }

    .module-shell {
        grid-template-columns: 1fr;
    }

    .mobile-drawer-toggle {
        display: inline-flex;
    }

    .contextual-aside {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
    }

    .contextual-aside.is-mobile-open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(4px);
        z-index: 99;
        display: none;
    }

    .sidebar-backdrop.is-active {
        display: block;
    }

    .module-main-body {
        padding: 0 1rem 2rem;
    }

    .module-content-breadcrumb {
        padding: 0.75rem 1rem 0.25rem;
    }
}
