/* =========================================================
   VARIÁVEIS GLOBAIS E TEMA CLARO
   ========================================================= */
:root {
    --font-scale: 1;
    --brand-primary: #1D4ED8;
    --brand-primary-dark: #1E3A8A;
    --brand-primary-soft: #EFF6FF;
    --brand-primary-border: #93C5FD;
    --brand-primary-contrast: #FFFFFF;
    --color-primary: var(--brand-primary);
    --color-primary-dark: var(--brand-primary-dark);
    --color-secondary: #475569;
    --color-success: #15803d;
    --color-warning: #b45309;
    --color-danger: #b91c1c;
    --color-info: #0369a1;
    --color-background: #f8fafc;
    --color-surface: #ffffff;
    --color-hover: #eff6ff;
    --color-table-head-bg: #dbeafe;
    --color-table-row-alt: #f3f7ff;
    --color-table-row-hover: #e8f0ff;
    --color-table-heading: var(--color-primary-dark);
    --color-border: #e2e8f0;
    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --container-width: 1280px;
    --z-sidebar: 1000;
    --z-overlay: 999;
    --z-panel: 1100;
    --z-skip-link: 2000;
}

/* =========================================================
   TEMA ESCURO
   ========================================================= */
html[data-theme="dark"] {
    --color-background: #0f172a;
    --color-surface: #1e293b;
    --color-border: #334155;
    --color-text: #f8fafc;
    --color-text-muted: #cbd5e1;
    --color-hover: #334155;
    --color-table-head-bg: #263b61;
    --color-table-row-alt: #17233a;
    --color-table-row-hover: #243451;
    --color-table-heading: #dbeafe;
}

/* =========================================================
   RESET BÁSICO
   ========================================================= */
* {
    box-sizing: border-box;
}

html {
    font-size: calc(16px * var(--font-scale));
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

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

/* =========================================================
   CONTAINER CENTRALIZADO
   ========================================================= */
.container {
    width: min(calc(100% - 32px), var(--container-width));
    margin-inline: auto;
}

/* =========================================================
   CARD (COMPONENTE BASE)
   ========================================================= */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

/* =========================================================
   TIPOGRAFIA
   ========================================================= */
h1, h2, h3, h4 {
    margin-top: 0;
    color: var(--color-text);
}

h1 {
    font-size: 1.75rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.4rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.15rem;
}

/* =========================================================
   BOTÕES
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--brand-primary-contrast, #ffffff);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* =========================================================
   ESTRUTURA PRINCIPAL DA APLICAÇÃO
   ========================================================= */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   HEADER (CABEÇALHO)
   ========================================================= */
.app-header {
    min-height: 80px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.app-logo {
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}

.app-subtitle {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header__actions {
    display: flex;
    position: relative;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* =========================================================
   BOTÕES DO HEADER
   ========================================================= */
.header-button,
.header-user {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    white-space: nowrap;
}

.header-button > i,
.header-user__avatar > i {
    font-size: 1rem;
}

.header-button__label {
    display: inline;
}

.header-button:hover,
.header-user:hover {
    background: var(--color-background);
}

/* =========================================================
   AVATAR DO USUÁRIO
   ========================================================= */
.header-user__avatar {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.85rem;
}

/* =========================================================
   CORPO DA APLICAÇÃO (LAYOUT PRINCIPAL)
   ========================================================= */
.app-body {
    flex: 1;
    display: flex;
}

/* =========================================================
   SIDEBAR (MENU LATERAL)
   ========================================================= */
.app-sidebar {
    width: 238px;
    flex-shrink: 0;
    padding: 12px 9px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
}

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

/* =========================================================
   SEÇÕES DA SIDEBAR
   ========================================================= */
.sidebar-section {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-section__title {
    padding: 0 9px 4px;
    color: var(--color-text-muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* =========================================================
   LINKS DA SIDEBAR
   ========================================================= */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.86rem;
    line-height: 1.15;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-link:hover {
    background: var(--color-hover);
    color: var(--color-primary);
}

.sidebar-link:hover .sidebar-link__icon {
    color: var(--color-primary);
}

/* Estado ativo: destaca claramente a seção atual sem depender apenas da cor. */
.sidebar-link.is-active,
.sidebar-link[aria-current="page"] {
    background: var(--color-primary);
    color: var(--brand-primary-contrast, #ffffff);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.sidebar-link.is-active .sidebar-link__icon,
.sidebar-link[aria-current="page"] .sidebar-link__icon {
    color: var(--brand-primary-contrast, #ffffff);
}

.sidebar-link.is-active:hover,
.sidebar-link[aria-current="page"]:hover {
    background: var(--color-primary-dark);
    color: #ffffff;
}

.sidebar-link.is-active:hover .sidebar-link__icon,
.sidebar-link[aria-current="page"]:hover .sidebar-link__icon {
    color: #ffffff;
}

.sidebar-link__icon {
    width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.88rem;
    transition: color var(--transition-fast);
}

/* =========================================================
   ÁREA PRINCIPAL DE CONTEÚDO
   ========================================================= */
.app-main {
    flex: 1;
    min-width: 0;
    padding: 32px;
    overflow-x: auto;
}

.app-content {
    width: min(100%, var(--container-width));
    margin-inline: auto;
}

/* =========================================================
   CABEÇALHO DAS PÁGINAS
   ========================================================= */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-header > .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.page-description {
    margin-bottom: 0;
    color: var(--color-text-muted);
}

/* =========================================================
   DASHBOARD (GRID DE CARDS)
   ========================================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-card {
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.dashboard-card__label {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.dashboard-card__value {
    display: block;
    margin-top: 8px;
    color: var(--color-text);
    font-size: 2rem;
}

/* =========================================================
   MENU MOBILE (BOTÃO TOGGLE)
   ========================================================= */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 1.25rem;
}

.menu-toggle:hover {
    background: var(--color-background);
}

/* =========================================================
   HEADER DA SIDEBAR (MOBILE)
   ========================================================= */
.sidebar-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 1rem;
}

.sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 1.5rem;
}

.sidebar-overlay {
    display: none;
}

/* =========================================================
   ACESSIBILIDADE - SKIP LINK
   ========================================================= */
.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: var(--z-skip-link);
    padding: 10px 16px;
    background: var(--color-text);
    color: var(--color-surface);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transform: translateY(-150%);
    transition: transform var(--transition-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

/* =========================================================
   PAINEL DE ACESSIBILIDADE
   ========================================================= */
.header-accessibility {
    position: relative;
}

.accessibility-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: var(--z-panel);
    width: min(360px, calc(100vw - 32px));
    padding: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.accessibility-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.accessibility-panel__title {
    margin: 0;
    font-size: 1.1rem;
}

.accessibility-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    cursor: pointer;
}

.accessibility-panel__section h3 {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* =========================================================
   CONTROLES DE FONTE (ACESSIBILIDADE)
   ========================================================= */
.accessibility-font-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.accessibility-control {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.accessibility-control:hover {
    background: var(--color-hover);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.accessibility-control span:first-child {
    font-size: 1.25rem;
    font-weight: 700;
}

/* =========================================================
   OPÇÕES DE ACESSIBILIDADE (TOGGLES)
   ========================================================= */
.accessibility-option {
    width: 100%;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.accessibility-option:hover {
    border-color: var(--color-primary);
    background: var(--color-hover);
}

.accessibility-option[aria-pressed="true"] {
    border-color: var(--color-primary);
    background: var(--color-hover);
    color: var(--color-primary);
}

.accessibility-option__icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 1rem;
}

.accessibility-option__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accessibility-option__content strong {
    font-size: 0.9rem;
}

.accessibility-option__content small {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.accessibility-option__status {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* =========================================================
   DISPLAY DE TAMANHO DE FONTE
   ========================================================= */
.accessibility-font-size-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.accessibility-font-size-display strong {
    color: var(--color-text);
    font-size: 0.9rem;
}

/* =========================================================
   ALTO CONTRASTE
   ========================================================= */
html[data-contrast="high"] {
    --color-background: #000000;
    --color-surface: #000000;
    --color-border: #ffffff;
    --color-text: #ffffff;
    --color-text-muted: #ffffff;
    --color-hover: #222222;
}

/* =========================================================
   RESPONSIVIDADE - TABLET (1000px)
   ========================================================= */
@media (max-width: 1000px) {
    .app-header {
        padding: 0 18px;
    }
    
    .app-subtitle {
        max-width: 220px;
    }
    
    .header-accessibility {
        font-size: 0.875rem;
    }
    
    .header-theme {
        padding-inline: 10px;
    }
}

/* =========================================================
   RESPONSIVIDADE - TABLET PEQUENO (900px)
   ========================================================= */
@media (max-width: 900px) {
    .app-sidebar {
        width: 210px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   RESPONSIVIDADE - MOBILE (768px)
   ========================================================= */
@media (max-width: 768px) {
    /* Container */
    .container {
        width: min(calc(100% - 24px), var(--container-width));
    }
    
    /* Cards */
    .card {
        padding: 18px;
    }
    
    /* Tipografia */
    h1 {
        font-size: 1.5rem;
    }
    
    /* Header Mobile */
    .app-header {
        min-height: 60px;
        padding: 0 12px;
        gap: 10px;
        justify-content: flex-start;
    }
    
    .app-header__brand {
        gap: 8px;
        flex: 1;
    }
    
    .app-logo {
        font-size: 1.15rem;
    }
    
    .app-subtitle {
        display: none;
    }
    
    .app-header__actions {
        gap: 6px;
    }
    
    /* Conteúdo Principal */
    .app-main {
        padding: 20px 16px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    /* Header User */
    .header-user__name {
        display: none;
    }
    
    .header-accessibility,
    .header-theme {
        display: none;
    }
    
    .header-user {
        min-width: 38px;
        width: 38px;
        padding: 0;
    }
    
    /* Page Header */
    .page-header {
        flex-direction: column;
    }
    
    /* Menu Toggle Mobile */
    .menu-toggle {
        display: inline-flex;
    }
    
    /* Sidebar Mobile */
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: var(--z-sidebar);
        width: min(280px, 85vw);
        height: 100vh;
        padding: 20px 12px;
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        box-shadow: 4px 0 20px rgba(15, 23, 42, 0.15);
        overflow-y: auto;
    }
    
    .app-sidebar.is-open {
        transform: translateX(0);
    }
    
    .sidebar-header {
        display: flex;
    }
    
    /* Overlay Mobile */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: var(--z-overlay);
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        display: block;
        transition: opacity var(--transition-normal);
    }
    
    .sidebar-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    /* Painel de Acessibilidade Mobile */
    .accessibility-panel {
        position: fixed;
        top: 60px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }
}

/* =========================================================
   ACESSIBILIDADE POR TECLADO — FOCO
   ========================================================= */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

/* =========================================================
   FORMULÁRIOS — ESTRUTURA E ACESSIBILIDADE
   ========================================================= */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control::placeholder {
    color: var(--color-text-muted);
    opacity: 0.8;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.form-help {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.form-error {
    color: var(--color-danger);
    font-size: 0.8rem;
    font-weight: 600;
}

.form-required {
    color: var(--color-danger);
}

/* =========================================================
   FORMULÁRIOS — ESTADOS DE VALIDAÇÃO
   ========================================================= */
.form-control.is-invalid {
    border-color: var(--color-danger);
}

.form-control.is-invalid:focus {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.form-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 2px;
    color: var(--color-danger);
    font-size: 0.8rem;
    font-weight: 600;
}

.form-error[hidden] {
    display: none;
}

/* =========================================================
   FORMULÁRIOS — PADRÃO PROFISSIONAL
   ========================================================= */
.form-section {
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

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

.form-section__title {
    margin-bottom: 4px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

.form-section__description {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.form-required {
    color: var(--color-danger);
    font-weight: 700;
}

.form-summary {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid var(--color-danger);
    border-radius: var(--radius-sm);
    background: rgba(185, 28, 28, 0.06);
    color: var(--color-danger);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-summary[hidden] {
    display: none;
}

.form-summary__icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .form-section {
        padding: 16px;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }
}


/* =========================================================
   FORMULÁRIOS — GRID RESPONSIVO
   ========================================================= */
.form-grid {
    display: grid;
    gap: 18px;
}

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

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

.form-grid__span-2 {
    grid-column: span 2;
}

.form-grid__span-full {
    grid-column: 1 / -1;
}

.form-control--textarea {
    min-height: 108px;
    padding: 10px 12px;
    resize: vertical;
}

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

    .form-grid--3 .form-grid__span-2 {
        grid-column: span 2;
    }
}

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

    .form-grid__span-2,
    .form-grid__span-full,
    .form-grid--3 .form-grid__span-2 {
        grid-column: auto;
    }
}

/* =========================================================
   ACESSIBILIDADE — FOCO DO TECLADO
   ========================================================= */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

.form-control:focus-visible,
.btn:focus-visible,
.header-button:focus-visible,
.header-user:focus-visible,
.sidebar-link:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.form-control:focus {
    border-color: var(--color-primary);
}

.form-control.is-invalid:focus-visible {
    outline-color: var(--color-danger);
}

/* =========================================================
   FEEDBACK DO SISTEMA — MENSAGENS
   ========================================================= */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert__icon {
    flex-shrink: 0;
    width: 20px;
    margin-top: 2px;
    text-align: center;
}

.alert__content {
    flex: 1;
    min-width: 0;
}

.alert__title {
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
}

.alert__message {
    margin: 0;
}

/* ---------------------------------------------------------
   MENSAGEM DE SUCESSO
   --------------------------------------------------------- */
.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* ---------------------------------------------------------
   MENSAGEM DE ERRO
   --------------------------------------------------------- */
.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ---------------------------------------------------------
   MENSAGEM DE ALERTA
   --------------------------------------------------------- */
.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

/* ---------------------------------------------------------
   MENSAGEM INFORMATIVA
   --------------------------------------------------------- */
.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* ---------------------------------------------------------
   MENSAGENS EM TEMA ESCURO
   --------------------------------------------------------- */
[data-theme="dark"] .alert-success {
    background: #052e16;
    border-color: #166534;
    color: #bbf7d0;
}

[data-theme="dark"] .alert-danger {
    background: #450a0a;
    border-color: #991b1b;
    color: #fecaca;
}

[data-theme="dark"] .alert-warning {
    background: #451a03;
    border-color: #92400e;
    color: #fde68a;
}

[data-theme="dark"] .alert-info {
    background: #172554;
    border-color: #1e40af;
    color: #bfdbfe;
}

/* =========================================================
   MODAIS E DIÁLOGOS
   ========================================================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal[hidden] {
    display: none;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.modal__title {
    margin: 0;
    font-size: 1.15rem;
}

.modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

.modal__close:hover {
    background: var(--color-background);
}

.modal__body {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
}

.modal__icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 1.15rem;
}

.modal__icon--danger {
    background: rgba(185, 28, 28, 0.08);
    color: var(--color-danger);
}

.modal__message {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 600;
}

.modal__support {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.modal__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
}

.btn-danger {
    background: var(--color-danger);
    color: #ffffff;
}

.btn-danger:hover {
    filter: brightness(0.92);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {

    .modal {
        padding: 16px;
    }

    .modal__header {
        padding: 18px;
    }

    .modal__body {
        padding: 20px 18px;
    }

    .modal__actions {
        flex-direction: column-reverse;
        align-items: stretch;
        padding: 16px 18px 18px;
    }

    .modal__actions .btn {
        width: 100%;
    }

}

.modal__icon--warning {
    background: rgba(180, 83, 9, 0.10);
    color: var(--color-warning);
}

.modal__icon--danger {
    background: rgba(185, 28, 28, 0.10);
    color: var(--color-danger);
}

.modal__icon--info {
    background: rgba(3, 105, 161, 0.10);
    color: var(--color-info);
}

/* =========================================================
   TABELAS — PADRÃO GLOBAL DO SGPM
   Toda tabela de interface nova deve usar .table. A classe
   .sgpm-table permanece como alias compatível com telas antigas.
   ========================================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table,
.sgpm-table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td,
.sgpm-table th,
.sgpm-table td {
    padding: 10px 9px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: middle;
}

.table thead th,
.sgpm-table thead th {
    background: var(--color-table-head-bg);
    color: var(--color-table-heading);
    border-top: 1px solid #bfdbfe;
    border-bottom: 2px solid var(--color-primary);
    font-weight: 700;
}

.table tbody td,
.sgpm-table tbody td {
    font-size: 0.75rem;
    line-height: 1.30;
}

.table tbody tr,
.sgpm-table tbody tr {
    background: var(--color-surface);
    transition: background-color var(--transition-fast);
}

.table tbody tr:nth-child(even),
.sgpm-table tbody tr:nth-child(even) {
    background: var(--color-table-row-alt);
}

.table tbody tr:hover,
.sgpm-table tbody tr:hover {
    background: var(--color-table-row-hover);
}

.table tbody tr:last-child td,
.sgpm-table tbody tr:last-child td {
    border-bottom: 0;
}

.table tfoot td,
.sgpm-table tfoot td {
    padding: 8px 9px;
    border-top: 2px solid var(--color-primary);
    border-bottom: 0;
    background: var(--color-table-head-bg);
    color: var(--color-table-heading);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    vertical-align: middle;
}

.table tfoot td:not(:first-child),
.sgpm-table tfoot td:not(:first-child) {
    border-left: 1px solid var(--color-border);
}

.table-summary-muted {
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Textos compactos e previsíveis em tabelas extensas. */
.table-head-secondary { font-size: .78em; font-weight: 700; }
.table-cell-nowrap { white-space: nowrap; }
.table-cell-clamp { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.table-cell-clamp--2 { -webkit-line-clamp: 2; line-clamp: 2; }
.table-cell-clamp--3 { -webkit-line-clamp: 3; line-clamp: 3; }

/* Bens Tombados: prioriza leitura sem deixar textos longos deformarem a grade. */
.table--bens { min-width: 1180px; table-layout: fixed; }
.table--bens th, .table--bens td { padding: 11px 10px; }
.table--bens thead th { font-size: .78rem; line-height: 1.25; }
.table--bens tbody td { font-size: .76rem; line-height: 1.32; }
.table--bens tbody small { font-size: .70rem; }
.table--bens tfoot td { padding: 9px 10px; font-size: .74rem; }
.table--bens th:nth-child(1) { width: 9%; }
.table--bens th:nth-child(2) { width: 9%; }
.table--bens th:nth-child(3) { width: 12%; }
.table--bens th:nth-child(4) { width: 12%; }
.table--bens th:nth-child(5) { width: 11%; }
.table--bens th:nth-child(6) { width: 13%; }
.table--bens th:nth-child(7) { width: 13%; }
.table--bens th:nth-child(8) { width: 9%; }
.table--bens th:nth-child(9) { width: 7%; }
.table--bens th:nth-child(10) { width: 7%; }


/* =========================================================
   SEARCH SELECT (SELEÇÃO PESQUISÁVEL)
   ========================================================= */
.search-select { position: relative; }
.search-select__control { position: relative; }
.search-select__input { padding-right: 2.75rem; }
.search-select__clear { position: absolute; top: 50%; right: .65rem; transform: translateY(-50%); width: 2rem; height: 2rem; border: 0; border-radius: .4rem; background: transparent; color: inherit; cursor: pointer; }
.search-select__clear:hover, .search-select__clear:focus-visible { background: rgba(127, 127, 127, .14); outline: 2px solid currentColor; outline-offset: 1px; }
.search-select__results { position: absolute; z-index: 50; top: calc(100% + .25rem); left: 0; right: 0; max-height: 18rem; margin: 0; padding: .35rem; list-style: none; overflow-y: auto; border: 1px solid var(--color-border); border-radius: .5rem; background: var(--color-surface); box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .12); }
.search-select__option, .search-select__empty { padding: .7rem .8rem; border-radius: .35rem; line-height: 1.35; }
.search-select__option { cursor: pointer; }
.search-select__option:hover, .search-select__option.is-active { background: rgba(127, 127, 127, .14); }
.search-select__status { margin-top: .35rem; }
.search-select__input:disabled { cursor: not-allowed; opacity: .7; }

/* =========================================================
   ESTADOS VAZIOS / RETORNOS SEM REGISTROS
   Mantém o ícone ao lado do título e o conteúdo alinhado.
   ========================================================= */
.empty-state {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: .75rem;
    row-gap: .45rem;
}

.empty-state > i:first-child {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    line-height: 1;
}

.empty-state > h1,
.empty-state > h2,
.empty-state > h3,
.empty-state > h4,
.empty-state > h5,
.empty-state > h6 {
    grid-column: 2;
    margin-top: 0;
    margin-bottom: 0;
}

.empty-state > p,
.empty-state > .btn,
.empty-state > a:not(.btn),
.empty-state > div:not(:first-child) {
    grid-column: 2;
}

.empty-state > p {
    margin-top: 0;
    margin-bottom: 0;
}

.empty-state > .btn {
    justify-self: start;
    margin-top: .25rem;
}


/* =========================================================
   RESUMO DE PREPARAÇÃO PARA GERAÇÃO DE BENS
   ========================================================= */
.generation-summary { margin: 0 0 1.25rem; padding: 1rem; border: 1px solid var(--color-border); border-left: 4px solid var(--color-info); border-radius: var(--radius-md); background: var(--color-background); }
.generation-summary.is-available { border-left-color: var(--color-success); }
.generation-summary.is-partial { border-left-color: var(--color-warning); }
.generation-summary.is-complete { border-left-color: var(--color-success); }
.generation-summary.is-incomplete { border-left-color: var(--color-info); }
.generation-summary.is-inconsistent { border-left-color: var(--color-danger); }
.generation-summary__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.generation-summary__eyebrow { display: block; margin-bottom: .2rem; color: var(--color-text-muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.generation-summary__title { margin: 0; font-size: 1rem; }
.generation-summary__status { display: inline-flex; align-items: center; gap: .45rem; min-height: 2rem; padding: .35rem .65rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-size: .84rem; font-weight: 700; white-space: nowrap; }
.generation-summary.is-available .generation-summary__status, .generation-summary.is-complete .generation-summary__status { color: var(--color-success); }
.generation-summary.is-partial .generation-summary__status { color: var(--color-warning); }
.generation-summary.is-incomplete .generation-summary__status { color: var(--color-info); }
.generation-summary.is-inconsistent .generation-summary__status { color: var(--color-danger); }
.generation-summary__metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.generation-metric { min-width: 0; padding: .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.generation-metric--emphasis { border-width: 2px; }
.generation-metric__label { display: block; color: var(--color-text-muted); font-size: .78rem; line-height: 1.3; }
.generation-metric__value { display: block; margin-top: .3rem; font-size: 1.15rem; line-height: 1.1; }
.generation-summary__messages { margin-top: .9rem; padding: .75rem .85rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.generation-summary__messages--danger { border-color: var(--color-danger); }
.generation-summary__messages strong { display: flex; align-items: center; gap: .4rem; }
.generation-summary__messages ul { margin: .45rem 0 0 1.15rem; padding: 0; }
.generation-summary__messages li + li { margin-top: .25rem; }
.generation-summary__note { display: flex; align-items: flex-start; gap: .5rem; margin: .9rem 0 0; color: var(--color-text-muted); font-size: .875rem; }
.generation-summary__note i { margin-top: .18rem; flex-shrink: 0; }

@media (max-width: 992px) {
    .generation-summary__metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .generation-summary__header { flex-direction: column; }
    .generation-summary__status { white-space: normal; }
    .generation-summary__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .generation-summary__metrics { grid-template-columns: 1fr; }
}

/* =========================================================
   PREPARAÇÃO DA GERAÇÃO PATRIMONIAL — C4B4C1
   ========================================================= */
.generation-preparation { margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.generation-preparation.is-disabled { background: var(--color-background); }
.generation-preparation__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.generation-preparation__title { margin: 0 0 .35rem; font-size: 1.05rem; }
.generation-preparation__badge { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .7rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-background); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.generation-preparation__fields { margin-top: .25rem; }
.generation-preparation__preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.generation-preparation__preview > div { padding: .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); }
.generation-preparation__preview span { display: block; color: var(--color-text-muted); font-size: .78rem; line-height: 1.3; }
.generation-preparation__preview strong { display: block; margin-top: .3rem; font-size: 1.1rem; }
.generation-preparation__actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.generation-preparation__actions .form-help { display: inline-flex; align-items: flex-start; gap: .45rem; margin: 0; }
.generation-preparation__locked { display: flex; align-items: flex-start; gap: .75rem; padding: .85rem; border: 1px dashed var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); }
.generation-preparation__locked > i { margin-top: .2rem; flex-shrink: 0; }
.generation-preparation__locked strong { display: block; }
.generation-preparation__locked p { margin: .2rem 0 0; color: var(--color-text-muted); }

@media (max-width: 768px) {
    .generation-preparation__header, .generation-preparation__actions { flex-direction: column; align-items: stretch; }
    .generation-preparation__badge { align-self: flex-start; white-space: normal; }
    .generation-preparation__preview { grid-template-columns: 1fr; }
    .generation-preparation__actions .btn { width: 100%; }
}


/* =========================================================
   RESUMO DINÂMICO / CONFIRMAÇÃO DA GERAÇÃO — C4B4C2
   ========================================================= */
.generation-preparation__feedback { display: flex; align-items: flex-start; gap: .55rem; margin-top: .85rem; padding: .75rem .85rem; border: 1px solid var(--color-success); border-radius: var(--radius-sm); background: var(--color-background); color: var(--color-success); }
.generation-preparation__feedback i { margin-top: .15rem; flex-shrink: 0; }
.modal__details { margin-top: 1rem; }
.generation-confirm { display: grid; gap: .9rem; }
.generation-confirm__heading { display: flex; align-items: center; gap: .55rem; padding-bottom: .7rem; border-bottom: 1px solid var(--color-border); }
.generation-confirm__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .9rem; }
.generation-confirm__row { min-width: 0; padding: .6rem .7rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); }
.generation-confirm__label { display: block; color: var(--color-text-muted); font-size: .76rem; line-height: 1.3; }
.generation-confirm__value { display: block; margin-top: .2rem; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.35; }
.generation-confirm__note { display: flex; align-items: flex-start; gap: .55rem; margin: 0; padding: .75rem .85rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); color: var(--color-text-muted); font-size: .84rem; line-height: 1.45; }
.generation-confirm__note i { margin-top: .18rem; flex-shrink: 0; }

@media (max-width: 640px) {
    .generation-confirm__grid { grid-template-columns: 1fr; }
}

.modal.modal--has-details .modal__dialog { width: min(100%, 760px); }

/* =========================================================
   RETORNO PÓS-GERAÇÃO PATRIMONIAL — C4B4C4 PARTE 1
   ========================================================= */
.generation-result-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; margin: 0 0 1.25rem; padding: 1rem; border: 1px solid var(--color-success); border-radius: var(--radius-md); background: var(--color-surface); }
.generation-result-card__icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid var(--color-success); border-radius: 50%; color: var(--color-success); font-size: 1.25rem; }
.generation-result-card__content { min-width: 0; }
.generation-result-card__eyebrow { display: block; margin-bottom: .2rem; color: var(--color-success); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.generation-result-card h2 { margin: 0; font-size: 1.1rem; }
.generation-result-card p { margin: .4rem 0 0; color: var(--color-text-muted); }
.generation-result-card__metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.generation-result-card__metrics > div { min-width: 0; padding: .75rem .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); }
.generation-result-card__metrics span { display: block; color: var(--color-text-muted); font-size: .76rem; line-height: 1.3; }
.generation-result-card__metrics strong { display: block; margin-top: .25rem; overflow-wrap: anywhere; font-size: 1rem; }
.generation-result-card__numbers { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.generation-result-card__numbers span { padding: .28rem .5rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-background); font-size: .78rem; font-weight: 700; }
.generation-result-card__numbers .is-more { color: var(--color-text-muted); font-weight: 600; }
.generation-result-card__actions { margin-top: 1rem; }
.form-section { scroll-margin-top: 1rem; }
.table-row-highlight { outline: 2px solid var(--color-success); outline-offset: -2px; background: var(--color-background); }
.table-inline-badge { display: inline-flex; align-items: center; gap: .3rem; margin-top: .3rem; padding: .2rem .4rem; border: 1px solid var(--color-success); border-radius: 999px; color: var(--color-success); font-size: .72rem; font-weight: 700; }

@media (max-width: 768px) {
    .generation-result-card { grid-template-columns: 1fr; }
    .generation-result-card__metrics { grid-template-columns: 1fr; }
    .generation-result-card__actions .btn { width: 100%; }
}


/* =========================================================
   RETORNO DE REJEIÇÃO/ERRO DA GERAÇÃO — C4B4C4 PARTE 2
   ========================================================= */
.generation-issue-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; margin: 0 0 1.25rem; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.generation-issue-card--warning { border-color: var(--color-warning); }
.generation-issue-card--danger { border-color: var(--color-danger); }
.generation-issue-card__icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid currentColor; border-radius: 50%; font-size: 1.15rem; }
.generation-issue-card--warning .generation-issue-card__icon, .generation-issue-card--warning .generation-issue-card__eyebrow { color: var(--color-warning); }
.generation-issue-card--danger .generation-issue-card__icon, .generation-issue-card--danger .generation-issue-card__eyebrow { color: var(--color-danger); }
.generation-issue-card__content { min-width: 0; }
.generation-issue-card__eyebrow { display: block; margin-bottom: .2rem; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.generation-issue-card h2 { margin: 0; font-size: 1.1rem; }
.generation-issue-card p { margin: .4rem 0 0; color: var(--color-text-muted); }
.generation-issue-card__hint { display: flex; align-items: flex-start; gap: .5rem; margin-top: .8rem !important; padding: .7rem .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); }
.generation-issue-card__hint i { margin-top: .18rem; flex-shrink: 0; }
.generation-issue-card__actions { margin-top: 1rem; }
@media (max-width: 768px) { .generation-issue-card { grid-template-columns: 1fr; } .generation-issue-card__actions .btn { width: 100%; } }


/* =========================================================
   DOCUMENTOS DA AQUISIÇÃO — C5B2.3
   ========================================================= */
#documentos-aquisicao { scroll-margin-top: 1rem; }
.document-count { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .7rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-background); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.document-badge { display: inline-flex; align-items: center; gap: .3rem; margin-left: .35rem; padding: .18rem .4rem; border: 1px solid var(--color-warning); border-radius: 999px; color: var(--color-warning); font-size: .7rem; font-weight: 700; vertical-align: middle; }
.document-form-section { margin-top: 1.25rem; }
.document-principal { align-self: end; }
.checkbox-control { display: flex; align-items: center; gap: .55rem; min-height: 42px; padding: .65rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); cursor: pointer; }
.checkbox-control input { width: 1rem; height: 1rem; flex: 0 0 auto; }
.form-error { margin-bottom: 1rem; padding: .75rem .85rem; border: 1px solid var(--color-danger); border-radius: var(--radius-sm); color: var(--color-danger); background: var(--color-background); font-size: .88rem; font-weight: 600; }
@media (max-width: 768px) { .document-count { white-space: normal; align-self: flex-start; } }


/* =========================================================
   ARQUIVOS DOS DOCUMENTOS — C5C2
   ========================================================= */
.document-file-count { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .45rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-background); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.document-files-row > td { padding-top: 0 !important; background: var(--color-background); }
.document-files-panel { margin: 0 .15rem .7rem; padding: .9rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.document-files-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.document-files-panel__header strong, .document-files-panel__header span { display: block; }
.document-files-panel__header span { margin-top: .2rem; color: var(--color-text-muted); font-size: .78rem; }
.document-files-empty { display: flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; color: var(--color-text-muted); font-size: .84rem; }
.document-file-list { display: grid; gap: .55rem; margin-bottom: .85rem; }
.document-file-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem .7rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); }
.document-file-item__info { display: flex; align-items: flex-start; gap: .55rem; min-width: 0; }
.document-file-item__info > i { margin-top: .2rem; flex: 0 0 auto; }
.document-file-item__info div { min-width: 0; }
.document-file-item__info strong, .document-file-item__info span, .document-file-item__info small { display: block; overflow-wrap: anywhere; }
.document-file-item__info span, .document-file-item__info small { margin-top: .12rem; color: var(--color-text-muted); font-size: .76rem; }
.document-upload-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto; align-items: end; gap: .75rem; padding-top: .8rem; border-top: 1px solid var(--color-border); }
.document-upload-form .form-group { margin: 0; }
.document-upload-form__action { display: flex; align-items: end; }
.btn-sm { min-height: 34px; padding: .42rem .65rem; font-size: .78rem; }
@media (max-width: 900px) { .document-upload-form { grid-template-columns: 1fr; } .document-upload-form__action .btn { width: 100%; } }
@media (max-width: 640px) { .document-file-item { align-items: stretch; flex-direction: column; } .document-file-item .btn { width: 100%; } }

/* =========================================================
   PROCESSOS ADMINISTRATIVOS DA AQUISIÇÃO — C5D3
   ========================================================= */
#processos-aquisicao { scroll-margin-top: 1rem; }
.process-count { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .7rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-background); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.process-form-section { margin-top: 1.25rem; }
.process-status { display: inline-flex; align-items: center; padding: .22rem .45rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-background); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.process-note-row > td { padding-top: .45rem !important; color: var(--color-text-muted); font-size: .78rem; }
@media (max-width: 768px) { .process-count { white-space: normal; align-self: flex-start; } }

/* =========================================================
   SANFONA / ACCORDION DE SEÇÕES EXTENSAS — PADRÃO SGPM
   ========================================================= */
/* Seções fechadas permanecem recortadas; abertas liberam overlays internos (ex.: Search Select). */
.sgpm-accordion-section { overflow: hidden; }
.sgpm-accordion-section.is-open { overflow: visible; }
.sgpm-accordion-section.is-open:focus-within { position: relative; z-index: 20; }
.sgpm-accordion-section > .page-header,
.sgpm-accordion-section > .form-section__title { position: relative; cursor: pointer; user-select: none; outline: none; }
.sgpm-accordion-section > .page-header { margin-bottom: 0; padding-right: 2.75rem; }
.sgpm-accordion-section > .form-section__title { width: 100%; padding-right: 2.5rem; }
.sgpm-accordion-section > .page-header::after,
.sgpm-accordion-section > .form-section__title::after { content: '\f078'; position: absolute; top: 50%; right: .35rem; transform: translateY(-50%) rotate(-90deg); font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .9rem; color: var(--color-text-muted); transition: transform .18s ease; }
.sgpm-accordion-section.is-open > .page-header::after,
.sgpm-accordion-section.is-open > .form-section__title::after { transform: translateY(-50%) rotate(0deg); }
.sgpm-accordion-section > .page-header:focus-visible,
.sgpm-accordion-section > .form-section__title:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 4px; border-radius: var(--radius-sm); }
.sgpm-accordion-section:not(.is-open) > .page-header,
.sgpm-accordion-section:not(.is-open) > .form-section__title { padding-bottom: 0; }
.sgpm-accordion-content { padding-top: 1rem; }
fieldset.sgpm-accordion-section > .sgpm-accordion-content { padding-top: .85rem; }
.sgpm-accordion-section:not(.is-open) > .sgpm-accordion-content { display: none; }
.sgpm-accordion-section.is-open > .sgpm-accordion-content { display: block; }
.sgpm-accordion-section > .page-header:hover::after,
.sgpm-accordion-section > .form-section__title:hover::after { color: var(--color-primary); }
@media (max-width: 640px) { .sgpm-accordion-section > .page-header { padding-right: 2.25rem; } .sgpm-accordion-section > .page-header::after, .sgpm-accordion-section > .form-section__title::after { right: .15rem; } }
@media (prefers-reduced-motion: reduce) { .sgpm-accordion-section > .page-header::after, .sgpm-accordion-section > .form-section__title::after { transition: none; } }


/* =========================================================
   DOCUMENTO ↔ ITEM DA AQUISIÇÃO — C5E3
   ========================================================= */
.document-items-panel { margin: 0 .15rem .9rem; padding: .9rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.document-items-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.document-items-panel__header strong, .document-items-panel__header span { display: block; }
.document-items-panel__header span { margin-top: .2rem; color: var(--color-text-muted); font-size: .78rem; }
.document-item-count { display: inline-flex !important; align-items: center; gap: .35rem; flex: 0 0 auto; margin-top: 0 !important; padding: .25rem .45rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-background); color: var(--color-text) !important; font-size: .75rem !important; font-weight: 700; white-space: nowrap; }
.document-items-empty, .document-items-complete { display: flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; color: var(--color-text-muted); font-size: .84rem; }
.document-items-complete { margin-bottom: 0; color: var(--color-success); font-weight: 600; }
.document-linked-items { display: grid; gap: .5rem; margin-bottom: .8rem; }
.document-linked-item { display: flex; align-items: flex-start; gap: .55rem; padding: .6rem .7rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); }
.document-linked-item > i { margin-top: .2rem; color: var(--color-success); flex: 0 0 auto; }
.document-linked-item strong, .document-linked-item span { display: block; }
.document-linked-item span { margin-top: .12rem; color: var(--color-text-muted); font-size: .76rem; }
.document-linked-item__info { min-width: 0; flex: 1 1 auto; }
.document-item-unlink { position: relative; margin-left: auto; flex: 0 0 auto; }
.document-item-unlink > summary { list-style: none; cursor: pointer; }
.document-item-unlink > summary::-webkit-details-marker { display: none; }
.document-item-unlink > form { position: absolute; z-index: 16; right: 0; top: calc(100% + .4rem); width: min(25rem, 80vw); padding: .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); box-shadow: 0 .75rem 2rem rgba(0,0,0,.16); }
.document-item-unlink textarea { resize: vertical; }
@media (max-width: 640px) { .document-linked-item { flex-wrap: wrap; } .document-item-unlink { width: 100%; margin-left: 0; } .document-item-unlink > form { position: fixed; left: 5%; right: 5%; top: 18%; width: 90%; max-height: 70vh; overflow: auto; } }
.document-items-form { padding-top: .8rem; border-top: 1px solid var(--color-border); }
.document-items-form fieldset { min-width: 0; margin: 0 0 .75rem; padding: 0; border: 0; }
.document-items-form legend { margin-bottom: .55rem; font-size: .82rem; font-weight: 700; }
.document-item-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.document-item-option { display: flex; align-items: flex-start; gap: .55rem; padding: .65rem .7rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); cursor: pointer; }
.document-item-option:hover { border-color: var(--color-primary); }
.document-item-option input { width: 1rem; height: 1rem; margin-top: .18rem; flex: 0 0 auto; }
.document-item-option span, .document-item-option strong, .document-item-option small { display: block; min-width: 0; }
.document-item-option small { margin-top: .12rem; color: var(--color-text-muted); font-size: .76rem; }
@media (max-width: 900px) { .document-item-options { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .document-items-panel__header { flex-direction: column; } .document-item-count { white-space: normal; } .document-items-form .btn { width: 100%; } }


/* =========================================================
   C5F1 — VISÃO DOCUMENTAL CONSOLIDADA
   ========================================================= */
.document-overview { margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--color-border); border-left: 4px solid var(--color-info); border-radius: var(--radius-sm); background: var(--color-background); }
.document-overview.is-ok { border-left-color: var(--color-success); }
.document-overview.is-warning { border-left-color: var(--color-warning); }
.document-overview.is-neutral { border-left-color: var(--color-info); }
.document-overview__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.document-overview__eyebrow { display: block; margin-bottom: .2rem; color: var(--color-text-muted); font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.document-overview__header h3 { margin: 0; font-size: 1rem; }
.document-overview__header p { max-width: 760px; margin: .3rem 0 0; color: var(--color-text-muted); font-size: .8rem; }
.document-overview__status { display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto; padding: .4rem .65rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.document-overview.is-ok .document-overview__status { color: var(--color-success); }
.document-overview.is-warning .document-overview__status { color: var(--color-warning); }
.document-overview__metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.document-overview-metric { min-width: 0; padding: .7rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.document-overview-metric span { display: block; color: var(--color-text-muted); font-size: .74rem; line-height: 1.3; }
.document-overview-metric strong { display: block; margin-top: .25rem; font-size: 1.08rem; }
.document-overview__alerts { display: flex; flex-wrap: wrap; gap: .55rem 1rem; margin-top: .75rem; padding-top: .7rem; border-top: 1px solid var(--color-border); color: var(--color-warning); font-size: .78rem; font-weight: 600; }
.document-overview__alerts span { display: inline-flex; align-items: center; gap: .35rem; }
@media (max-width: 900px) { .document-overview__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .document-overview__header { flex-direction: column; } .document-overview__status { white-space: normal; } .document-overview__metrics { grid-template-columns: 1fr; } }


/* C5F2 — Cartões documentais compactos */
.document-card-list { display: grid; gap: .7rem; margin-bottom: 1rem; }
.document-card { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.document-card__trigger { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; cursor: pointer; user-select: none; outline: none; }
.document-card__trigger:hover { background: var(--color-background); }
.document-card__trigger:focus-visible { outline: 3px solid var(--color-primary); outline-offset: -3px; }
.document-card__identity { display: flex; align-items: flex-start; gap: .65rem; min-width: 0; }
.document-card__chevron { display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; min-height: 1.3rem; color: var(--color-text-muted); transition: transform .18s ease; }
.document-card.is-open .document-card__chevron { transform: rotate(90deg); color: var(--color-primary); }
.document-card__title { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.document-card__title strong { font-size: .9rem; overflow-wrap: anywhere; }
.document-card__meta { display: flex; flex-wrap: wrap; gap: .3rem .65rem; margin-top: .25rem; color: var(--color-text-muted); font-size: .75rem; }
.document-card__meta span + span::before { content: '•'; margin-right: .65rem; }
.document-card__summary { flex: 0 0 auto; text-align: right; }
.document-card__summary strong, .document-card__summary span { display: block; }
.document-card__summary strong { font-size: .84rem; }
.document-card__summary span { display: flex; justify-content: flex-end; gap: .35rem .55rem; margin-top: .25rem; color: var(--color-text-muted); font-size: .74rem; }
.document-card__content { padding: .9rem; border-top: 1px solid var(--color-border); background: var(--color-background); }
.document-card__details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; margin-bottom: .8rem; }
.document-card__details > div { min-width: 0; padding: .55rem .65rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.document-card__details span, .document-card__details strong { display: block; overflow-wrap: anywhere; }
.document-card__details span { color: var(--color-text-muted); font-size: .7rem; }
.document-card__details strong { margin-top: .15rem; font-size: .78rem; }
.document-card .document-files-panel { margin: 0; }
.document-card-list__summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .45rem .2rem 0; color: var(--color-text-muted); font-size: .75rem; }
@media (max-width: 900px) { .document-card__details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .document-card__trigger { align-items: flex-start; flex-direction: column; } .document-card__summary { padding-left: 1.8rem; text-align: left; } .document-card__summary span { justify-content: flex-start; } .document-card__details { grid-template-columns: 1fr; } .document-card-list__summary { align-items: flex-start; flex-direction: column; gap: .2rem; } }
@media (prefers-reduced-motion: reduce) { .document-card__chevron { transition: none; } }

/* C5F3 — Organização das ações documentais */
.document-content-section { padding: .95rem; border-top: 1px solid var(--color-border); }
.document-content-section:first-child { border-top: 0; }
.document-content-section > h4, .document-section-heading h4 { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: .9rem; }
.document-content-section > h4 i, .document-section-heading h4 i { color: var(--color-primary); }
.document-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.document-section-heading p, .document-actions-intro { margin: .25rem 0 0; color: var(--color-text-muted); font-size: .78rem; }
.document-text-details { margin-top: .7rem; padding: .7rem .8rem; border-radius: var(--radius-sm); background: var(--color-background); font-size: .8rem; overflow-wrap: anywhere; }
.document-text-details p { margin: .25rem 0; }
.document-actions-section { background: color-mix(in srgb, var(--color-background) 55%, transparent); }
.document-action-disclosures { display: grid; gap: .55rem; margin-top: .7rem; }
.document-action-disclosure, .document-create-disclosure { border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.document-action-disclosure > summary, .document-create-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; cursor: pointer; list-style: none; font-weight: 700; font-size: .82rem; }
.document-action-disclosure > summary::-webkit-details-marker, .document-create-disclosure > summary::-webkit-details-marker { display: none; }
.document-action-disclosure > summary::after, .document-create-disclosure > summary::after { content: '+'; margin-left: auto; color: var(--color-primary); font-size: 1.05rem; }
.document-action-disclosure[open] > summary::after, .document-create-disclosure[open] > summary::after { content: '−'; }
.document-action-disclosure > summary span, .document-create-disclosure > summary span { display: inline-flex; align-items: center; gap: .45rem; }
.document-action-disclosure > summary small, .document-create-disclosure > summary small { margin-left: auto; color: var(--color-text-muted); font-weight: 500; font-size: .72rem; }
.document-action-disclosure > summary:focus-visible, .document-create-disclosure > summary:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.document-action-disclosure > form { margin: 0; padding: .85rem; border-top: 1px solid var(--color-border); }
.document-action-complete { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: .78rem; }
.document-action-complete i { color: var(--color-success); }
.document-create-disclosure { margin-top: 1rem; }
.document-create-disclosure > summary { padding: .85rem 1rem; font-size: .88rem; }
.document-create-disclosure > .document-form-section { margin: 0; border: 0; border-top: 1px solid var(--color-border); border-radius: 0; }
@media (max-width: 768px) {
  .document-section-heading, .document-action-disclosure > summary, .document-create-disclosure > summary { align-items: flex-start; flex-direction: column; gap: .3rem; }
  .document-action-disclosure > summary small, .document-create-disclosure > summary small { margin-left: 0; }
  .document-action-disclosure > summary::after, .document-create-disclosure > summary::after { position: absolute; right: .8rem; }
  .document-action-disclosure > summary, .document-create-disclosure > summary { position: relative; padding-right: 2.2rem; }
}


/* C5F4 — Indicadores e alertas documentais objetivos */
.document-indicators { margin-top: .85rem; padding-top: .8rem; border-top: 1px solid var(--color-border); }
.document-indicators__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.document-indicators__header h4 { margin: 0; font-size: .88rem; }
.document-indicators__count { flex: 0 0 auto; padding: .28rem .5rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text-muted); font-size: .7rem; font-weight: 700; }
.document-indicators__list { display: grid; gap: .45rem; }
.document-indicator { display: flex; align-items: flex-start; gap: .5rem; padding: .58rem .65rem; border: 1px solid var(--color-border); border-left-width: 3px; border-radius: var(--radius-sm); background: var(--color-surface); font-size: .77rem; line-height: 1.4; }
.document-indicator i { margin-top: .12rem; }
.document-indicator.is-warning { border-left-color: var(--color-warning); }
.document-indicator.is-warning i { color: var(--color-warning); }
.document-indicator.is-info { border-left-color: var(--color-info); }
.document-indicator.is-info i { color: var(--color-info); }
.document-indicators__note { display: flex; align-items: flex-start; gap: .4rem; margin: .6rem 0 0; color: var(--color-text-muted); font-size: .72rem; line-height: 1.4; }
.document-indicators__note i { margin-top: .1rem; color: var(--color-info); }
.document-indicators--clear { display: flex; align-items: center; gap: .45rem; color: var(--color-success); font-size: .78rem; font-weight: 600; }
@media (max-width: 640px) { .document-indicators__header { flex-direction: column; gap: .35rem; } }

/* C5G5.2 — Inativação controlada de arquivos documentais */
.document-files-subtitle { display: flex; align-items: center; gap: .4rem; margin: .8rem 0 .55rem; font-size: .8rem; }
.document-files-subtitle:first-of-type { margin-top: 0; }
.document-files-subtitle i { color: var(--color-primary); }
.document-files-subtitle span { margin-left: .2rem; padding: .12rem .4rem; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted); font-size: .68rem; }
.document-file-item__actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.document-file-inactivate { position: relative; }
.document-file-inactivate > summary { list-style: none; cursor: pointer; }
.document-file-inactivate > summary::-webkit-details-marker { display: none; }
.document-file-inactivate > form { position: absolute; z-index: 15; right: 0; top: calc(100% + .4rem); width: min(25rem, 80vw); padding: .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); box-shadow: 0 .75rem 2rem rgba(0,0,0,.16); }
.document-file-inactivate textarea { resize: vertical; }
.document-inactive-files { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--color-border); }
.document-file-item--inactive { opacity: .82; background: var(--color-background); }
.document-file-item--inactive .document-file-item__info > i { color: var(--color-text-muted); }
.document-inactive-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .45rem; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted); font-size: .68rem; font-weight: 700; white-space: nowrap; }
.document-inactive-note { display: flex; align-items: flex-start; gap: .4rem; margin: .55rem 0 0; color: var(--color-text-muted); font-size: .72rem; line-height: 1.4; }
.document-inactive-note i { margin-top: .1rem; color: var(--color-info); }
@media (max-width: 640px) { .document-file-item__actions { width: 100%; } .document-file-inactivate > form { position: fixed; left: 5%; right: 5%; top: 18%; width: 90%; max-height: 70vh; overflow: auto; } }


/* C5G5.4.3 — Inativação controlada e histórico de Documentos */
.document-action-disclosure--danger > summary { color: var(--color-danger); }
.document-inactivate-form { display: grid; gap: .8rem; }
.document-history { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--color-border); }
.document-history__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.document-history__heading h3 { margin: 0; font-size: .95rem; }
.document-history__heading p { margin: .2rem 0 0; color: var(--color-text-muted); font-size: .76rem; }
.document-history__heading > span { padding: .25rem .5rem; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.document-history-list { display: grid; gap: .65rem; }
.document-history-card { padding: .8rem; border: 1px solid var(--color-border); border-left: 3px solid var(--color-text-muted); border-radius: var(--radius-sm); background: var(--color-background); }
.document-history-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.document-history-card > div:first-child > span { color: var(--color-text-muted); font-size: .7rem; font-weight: 700; }
.document-history-card dl { display: grid; grid-template-columns: minmax(8rem, .35fr) 1fr; gap: .35rem .8rem; margin: .65rem 0 0; font-size: .75rem; }
.document-history-card dl > div { display: contents; }
.document-history-card dt { color: var(--color-text-muted); }
.document-history-card dd { margin: 0; }
.document-history-card > p { display: flex; gap: .4rem; margin: .65rem 0 0; color: var(--color-text-muted); font-size: .72rem; line-height: 1.4; }
@media (max-width: 640px) { .document-history__heading, .document-history-card > div:first-child { flex-direction: column; } .document-history-card dl { grid-template-columns: 1fr; } .document-history-card dl > div { display: block; } }

/* Parte 45-C5G5.4.4.2 — Correção controlada de Documento */
.document-correction-form { display: grid; gap: 1rem; }
.document-correction-notice { display: flex; gap: .65rem; align-items: flex-start; padding: .8rem .9rem; border: 1px solid var(--color-border); border-radius: .65rem; background: color-mix(in srgb, var(--color-primary) 7%, var(--color-background)); font-size: .82rem; line-height: 1.45; }
.document-correction-notice i { margin-top: .15rem; color: var(--color-primary); }
.document-action-disclosure--correction > summary i { color: var(--color-primary); }
@media (max-width: 767px) { .document-correction-form .form-grid { grid-template-columns: 1fr; } }

/* C5G6.1 — Consulta e histórico de Auditoria */
.audit-total { display:inline-flex; align-items:center; gap:.4rem; padding:.4rem .65rem; border:1px solid var(--color-border); border-radius:999px; color:var(--color-text-muted); font-size:.75rem; font-weight:700; white-space:nowrap; }
.audit-total i { color:var(--color-primary); }
.audit-filters { display:grid; grid-template-columns:2fr repeat(5, minmax(8rem, 1fr)); gap:.75rem; align-items:end; padding:1rem; margin:1rem 0; border:1px solid var(--color-border); border-radius:var(--radius-sm); background:var(--color-background); }
.audit-filter-actions { display:flex; gap:.5rem; grid-column:1 / -1; }
.audit-list { display:grid; gap:.7rem; }
.audit-event { border:1px solid var(--color-border); border-radius:var(--radius-sm); overflow:hidden; background:var(--color-surface); }
.audit-event__summary { display:flex; justify-content:space-between; gap:1rem; padding:.85rem 1rem; }
.audit-event__summary > div:first-child { display:grid; gap:.2rem; }
.audit-event__summary strong { font-size:.86rem; }
.audit-event__summary small, .audit-event__meta { color:var(--color-text-muted); font-size:.7rem; }
.audit-event__action { width:max-content; padding:.2rem .45rem; border-radius:999px; background:color-mix(in srgb, var(--color-primary) 10%, var(--color-background)); color:var(--color-primary); font-size:.68rem; font-weight:800; }
.audit-event__meta { display:flex; flex-direction:column; align-items:flex-end; gap:.25rem; white-space:nowrap; }
.audit-event__details { border-top:1px solid var(--color-border); }
.audit-event__details > summary { cursor:pointer; list-style:none; padding:.65rem 1rem; color:var(--color-primary); font-size:.75rem; font-weight:700; }
.audit-event__details > summary::-webkit-details-marker { display:none; }
.audit-event__body { padding:0 1rem 1rem; }
.audit-change-table { display:grid; border:1px solid var(--color-border); border-radius:var(--radius-sm); overflow:hidden; font-size:.72rem; }
.audit-change-row { display:grid; grid-template-columns:minmax(8rem,.7fr) 1fr 1fr; }
.audit-change-row > * { padding:.55rem .65rem; border-bottom:1px solid var(--color-border); overflow-wrap:anywhere; }
.audit-change-row > * + * { border-left:1px solid var(--color-border); }
.audit-change-row:last-child > * { border-bottom:0; }
.audit-change-head { background:color-mix(in srgb, var(--color-primary) 9%, var(--color-surface)); }
.audit-change-row.is-changed { background:color-mix(in srgb, var(--color-warning) 7%, var(--color-surface)); }
.audit-no-snapshot { display:flex; gap:.4rem; color:var(--color-text-muted); font-size:.75rem; }
.audit-technical { display:grid; grid-template-columns:auto auto 1fr; gap:.6rem; margin: .8rem 0 0; padding-top:.7rem; border-top:1px dashed var(--color-border); font-size:.7rem; }
.audit-technical div { display:flex; gap:.3rem; min-width:0; } .audit-technical dt { color:var(--color-text-muted); } .audit-technical dd { margin:0; overflow-wrap:anywhere; }
.audit-pagination { display:flex; justify-content:center; align-items:center; gap:.75rem; margin-top:1rem; font-size:.75rem; }
@media (max-width:1100px) { .audit-filters { grid-template-columns:repeat(3,1fr); } .audit-search { grid-column:span 2; } }
@media (max-width:767px) { .audit-filters { grid-template-columns:1fr; } .audit-search { grid-column:auto; } .audit-event__summary { flex-direction:column; } .audit-event__meta { align-items:flex-start; } .audit-change-row { grid-template-columns:1fr; } .audit-change-row > * + * { border-left:0; } .audit-change-row > * { border-bottom:1px solid var(--color-border); } .audit-technical { grid-template-columns:1fr; } }


/* C5G6.2 — Apresentação administrativa da Auditoria */
.audit-section { margin-top:.9rem; }
.audit-section h3 { display:flex; align-items:center; gap:.4rem; margin:0 0 .55rem; font-size:.78rem; color:var(--color-text); }
.audit-section h3 i { color:var(--color-primary); }
.audit-section-count { display:inline-flex; align-items:center; justify-content:center; min-width:1.35rem; height:1.35rem; padding:0 .35rem; border-radius:999px; background:color-mix(in srgb, var(--color-primary) 12%, var(--color-surface)); color:var(--color-primary); font-size:.65rem; }
.audit-event-info { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.55rem; margin:0; }
.audit-event-info div { padding:.55rem .65rem; border:1px solid var(--color-border); border-radius:var(--radius-sm); background:var(--color-background); min-width:0; }
.audit-event-info dt { color:var(--color-text-muted); font-size:.66rem; font-weight:700; }
.audit-event-info dd { margin:.15rem 0 0; font-size:.73rem; overflow-wrap:anywhere; }
.audit-reason { padding:.7rem .8rem; border-left:3px solid var(--color-primary); border-radius:0 var(--radius-sm) var(--radius-sm) 0; background:color-mix(in srgb, var(--color-primary) 5%, var(--color-surface)); }
.audit-reason h3 { margin-bottom:.3rem; }
.audit-reason p { margin:0; font-size:.74rem; line-height:1.55; }
.audit-snapshot, .audit-technical-details { margin-top:.85rem; border-top:1px dashed var(--color-border); padding-top:.7rem; }
.audit-snapshot > summary, .audit-technical-details > summary { cursor:pointer; color:var(--color-primary); font-size:.72rem; font-weight:700; }
.audit-snapshot > .audit-change-table { margin-top:.6rem; }
.audit-technical-details .audit-technical { margin-top:.6rem; padding-top:0; border-top:0; }
@media (max-width:900px) { .audit-event-info { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:480px) { .audit-event-info { grid-template-columns:1fr; } }

/* Auditoria - acabamento operacional C5G6.3 */
.audit-active-filters { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem; margin:-.25rem 0 1rem; font-size:.7rem; }
.audit-active-filters__label { display:inline-flex; align-items:center; gap:.35rem; color:var(--color-text-muted); font-weight:700; }
.audit-filter-chip { display:inline-flex; gap:.25rem; padding:.3rem .5rem; border:1px solid var(--color-border); border-radius:999px; background:var(--color-background); overflow-wrap:anywhere; }
.audit-filter-chip strong { color:var(--color-text-muted); }
.audit-clear-inline { color:var(--color-primary); font-weight:700; text-decoration:none; padding:.3rem .2rem; }
.audit-clear-inline:hover, .audit-clear-inline:focus-visible { text-decoration:underline; }
.audit-event__details > summary:focus-visible, .audit-snapshot > summary:focus-visible, .audit-technical-details > summary:focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; border-radius:var(--radius-sm); }
.audit-pagination .is-disabled { opacity:.45; pointer-events:none; }
.audit-page .empty-state .btn { margin-top:.5rem; }
@media (max-width:480px) { .audit-filter-actions { flex-direction:column; } .audit-filter-actions .btn { width:100%; justify-content:center; } .audit-active-filters { align-items:flex-start; } .audit-pagination { gap:.4rem; flex-wrap:wrap; } }

/* C6A — Fundação da Ficha Patrimonial */
.patrimonial-sheet__header { align-items: flex-start; gap: 1rem; }
.patrimonial-sheet__eyebrow { display: inline-block; margin-bottom: .35rem; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-color, #2457a6); }
.patrimonial-sheet__actions, .patrimonial-sheet__section-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.patrimonial-sheet__status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.patrimonial-sheet__status > div { padding: .85rem 1rem; border: 1px solid var(--border-color, #dfe4ea); border-radius: .65rem; background: var(--surface-muted, rgba(127,127,127,.06)); }
.patrimonial-sheet__status span { display: block; margin-bottom: .25rem; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.patrimonial-sheet__status strong { display: block; line-height: 1.35; }
.patrimonial-data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1rem; margin: 0; }
.patrimonial-data-grid > div { min-width: 0; padding: .7rem .8rem; border-left: 3px solid var(--border-color, #dfe4ea); background: var(--surface-muted, rgba(127,127,127,.04)); border-radius: .2rem .5rem .5rem .2rem; }
.patrimonial-data-grid dt { margin: 0 0 .28rem; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; opacity: .68; }
.patrimonial-data-grid dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; line-height: 1.45; }
.patrimonial-data-grid dd small { font-weight: 400; opacity: .72; }
.patrimonial-data-grid__wide { grid-column: span 3; }
.patrimonial-text { white-space: pre-wrap; font-weight: 400 !important; }
.patrimonial-sheet__section-actions { margin-top: 1rem; }
.empty-state--compact { padding: 1.25rem; min-height: auto; }
.empty-state--compact h3 { margin: .35rem 0 .25rem; }
@media (max-width: 900px) { .patrimonial-sheet__status { grid-template-columns: repeat(2, minmax(0, 1fr)); } .patrimonial-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .patrimonial-data-grid__wide { grid-column: span 2; } }
@media (max-width: 600px) { .patrimonial-sheet__header { flex-direction: column; } .patrimonial-sheet__status, .patrimonial-data-grid { grid-template-columns: 1fr; } .patrimonial-data-grid__wide { grid-column: span 1; } .patrimonial-sheet__actions .btn { width: 100%; justify-content: center; } }

/* =========================================================
   TABELAS DE LISTAGEM — PADRÃO COMPACTO REUTILIZÁVEL
   C6A.1.3
   ========================================================= */
.table--compact { table-layout: fixed; min-width: 820px; }
.table--compact th, .table--compact td { padding: 10px 9px; }
.table--compact thead th { font-size: .78rem; line-height: 1.22; }
.table--compact tbody td { font-size: .75rem; line-height: 1.30; }
.table--compact tbody small, .table--compact tbody .table-cell-secondary { font-size: .69rem; }
.table--compact tfoot td { padding: 8px 9px; font-size: .72rem; line-height: 1.25; }
.table--compact .btn { white-space: nowrap; }
.table-cell-secondary { display: inline-block; color: var(--color-text-muted); }

.table--aquisicoes { min-width: 1050px; }
.table--aquisicoes th:nth-child(1) { width: 10%; }
.table--aquisicoes th:nth-child(2) { width: 11%; }
.table--aquisicoes th:nth-child(3) { width: 16%; }
.table--aquisicoes th:nth-child(4) { width: 13%; }
.table--aquisicoes th:nth-child(5) { width: 11%; }
.table--aquisicoes th:nth-child(6) { width: 9%; }
.table--aquisicoes th:nth-child(7) { width: 6%; }
.table--aquisicoes th:nth-child(8) { width: 11%; }
.table--aquisicoes th:nth-child(9) { width: 13%; }

.table--classificacoes th:nth-child(1) { width: 12%; }
.table--classificacoes th:nth-child(2) { width: 25%; }
.table--classificacoes th:nth-child(3) { width: 48%; }
.table--classificacoes th:nth-child(4) { width: 15%; }

.table--unidades { min-width: 900px; }
.table--unidades th:nth-child(1) { width: 10%; }
.table--unidades th:nth-child(2) { width: 8%; }
.table--unidades th:nth-child(3) { width: 12%; }
.table--unidades th:nth-child(4) { width: 22%; }
.table--unidades th:nth-child(5) { width: 36%; }
.table--unidades th:nth-child(6) { width: 12%; }

.table--subunidades { min-width: 900px; }
.table--subunidades th:nth-child(1) { width: 24%; }
.table--subunidades th:nth-child(2) { width: 11%; }
.table--subunidades th:nth-child(3) { width: 8%; }
.table--subunidades th:nth-child(4) { width: 14%; }
.table--subunidades th:nth-child(5) { width: 31%; }
.table--subunidades th:nth-child(6) { width: 12%; }

.table--estabelecimentos th:nth-child(1) { width: 15%; }
.table--estabelecimentos th:nth-child(2) { width: 45%; }
.table--estabelecimentos th:nth-child(3) { width: 25%; }
.table--estabelecimentos th:nth-child(4) { width: 15%; }

.table--localizacoes { min-width: 900px; }
.table--localizacoes th:nth-child(1) { width: 11%; }
.table--localizacoes th:nth-child(2) { width: 25%; }
.table--localizacoes th:nth-child(3) { width: 12%; }
.table--localizacoes th:nth-child(4) { width: 27%; }
.table--localizacoes th:nth-child(5) { width: 12%; }
.table--localizacoes th:nth-child(6) { width: 13%; }

.table--fornecedores { min-width: 900px; }
.table--fornecedores th:nth-child(1) { width: 30%; }
.table--fornecedores th:nth-child(2) { width: 14%; }
.table--fornecedores th:nth-child(3) { width: 18%; }
.table--fornecedores th:nth-child(4) { width: 25%; }
.table--fornecedores th:nth-child(5) { width: 13%; }

.table--responsaveis th:nth-child(1) { width: 31%; }
.table--responsaveis th:nth-child(2) { width: 17%; }
.table--responsaveis th:nth-child(3) { width: 37%; }
.table--responsaveis th:nth-child(4) { width: 15%; }

/* C6B.1 — Histórico Patrimonial */
.patrimonial-timeline { list-style: none; margin: .5rem 0 0; padding: 0; }
.patrimonial-timeline__item { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .75rem; padding: 0 0 1.1rem; }
.patrimonial-timeline__item:not(:last-child)::before { content: ''; position: absolute; left: .94rem; top: 1.8rem; bottom: 0; width: 2px; background: var(--border-color, #dfe4ea); }
.patrimonial-timeline__marker { position: relative; z-index: 1; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; background: var(--primary-color, #2457a6); color: #fff; font-size: .72rem; }
.patrimonial-timeline__content { padding: .1rem 0 .35rem; min-width: 0; }
.patrimonial-timeline__meta { display: flex; flex-wrap: wrap; gap: .45rem .7rem; align-items: center; margin-bottom: .25rem; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .72; }
.patrimonial-timeline__content h3 { margin: 0 0 .25rem; font-size: .98rem; }
.patrimonial-timeline__content p { margin: 0 0 .3rem; line-height: 1.45; }
.patrimonial-timeline__content small { opacity: .72; }

/* C6B.2 — Tipos padronizados do Histórico Patrimonial */
.patrimonial-timeline__type { display: inline-flex; align-items: center; min-height: 1.25rem; padding: .08rem .42rem; border: 1px solid var(--border-color, #dfe4ea); border-radius: 999px; background: var(--surface-soft, #f6f8fb); font-size: .68rem; line-height: 1.15; }

/* C6C.1 — detalhes compactos de eventos de movimentação */
.patrimonial-timeline__details{display:grid;gap:.2rem;margin:.45rem 0;font-size:.82rem;line-height:1.4}.patrimonial-timeline__details span{display:block}

/* C6D.1 — Central de Movimentações Patrimoniais */
.movement-total { display:inline-flex; align-items:center; gap:.4rem; flex:0 0 auto; font-size:.74rem; color:var(--color-text-muted); font-weight:700; white-space:nowrap; }
.movement-total i { color:var(--color-primary); }
.movement-filters { display:grid; grid-template-columns:minmax(15rem,2fr) minmax(10rem,1fr) minmax(9rem,.8fr) minmax(9rem,.8fr) auto; gap:.65rem; align-items:end; margin:1rem 0; }
.movement-filter-actions { display:flex; gap:.45rem; align-items:center; }
.movement-table th, .movement-table td { vertical-align:middle; }
.movement-table th:nth-child(1) { width:8.5rem; } .movement-table th:nth-child(2) { width:9rem; } .movement-table th:nth-child(3) { width:12rem; } .movement-table th:nth-child(4), .movement-table th:nth-child(5) { width:16rem; } .movement-table th:nth-child(7) { width:6.5rem; }
.movement-subline { display:-webkit-box; margin-top:.2rem; color:var(--color-text-muted); font-size:.68rem; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; }
.movement-type { display:inline-flex; align-items:center; padding:.25rem .45rem; border-radius:999px; background:color-mix(in srgb,var(--color-primary) 9%,var(--color-surface)); color:var(--color-primary); font-size:.66rem; font-weight:800; line-height:1.2; }
.movement-pagination { display:flex; justify-content:center; align-items:center; gap:.75rem; margin-top:1rem; font-size:.75rem; }
.movement-pagination .is-disabled { opacity:.45; pointer-events:none; }
@media (max-width:1100px) { .movement-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .movement-search { grid-column:span 2; } }
@media (max-width:767px) { .movement-filters { grid-template-columns:1fr; } .movement-search { grid-column:auto; } .movement-filter-actions { flex-direction:column; } .movement-filter-actions .btn { width:100%; justify-content:center; } .movement-pagination { flex-wrap:wrap; gap:.4rem; } }

/* C6F.4.5 — largura equilibrada da coluna Motivo na Central de Movimentações */
.movement-table{min-width:1360px;table-layout:fixed}
.movement-table th:nth-child(1){width:10%}
.movement-table th:nth-child(2){width:11%}
.movement-table th:nth-child(3){width:15%}
.movement-table th:nth-child(4),.movement-table th:nth-child(5){width:18%}
.movement-table th:nth-child(6){width:20%}
.movement-table th:nth-child(7){width:8%}

/* C6F.4.6 — Data/hora e identificação do bem em linhas separadas */
.movement-date,.movement-time,.movement-asset-number,.movement-asset-name{display:block}
.movement-time,.movement-asset-name{margin-top:.18rem;color:var(--color-text-muted);font-size:.72rem;line-height:1.35}

/* C6D.2 — Detalhamento da Movimentação Patrimonial */
.movement-row-actions{display:flex;gap:.35rem;align-items:center;white-space:nowrap}.movement-detail__summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem;margin:1rem 0}.movement-detail__summary>div{padding:.75rem;border:1px solid var(--color-border);border-radius:.6rem;background:var(--color-surface-soft)}.movement-detail__summary span{display:block;margin-bottom:.2rem;color:var(--color-text-muted);font-size:.68rem;font-weight:700;text-transform:uppercase}.movement-detail__summary strong{font-size:.86rem}.movement-compare{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:.8rem;align-items:stretch}.movement-compare article{padding:.85rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface)}.movement-compare h3{display:flex;gap:.4rem;align-items:center;margin:0 0 .7rem;font-size:.88rem}.movement-compare dl{display:grid;gap:.6rem;margin:0}.movement-compare dl div{padding-top:.55rem;border-top:1px solid var(--color-border)}.movement-compare dt{margin-bottom:.18rem;color:var(--color-text-muted);font-size:.68rem;font-weight:700}.movement-compare dd{margin:0;font-size:.82rem;line-height:1.45}.movement-compare__arrow{display:flex;align-items:center;color:var(--color-primary)}.movement-detail__integrity{display:flex;gap:.7rem;align-items:flex-start;margin-top:1rem;padding:.8rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface-soft)}.movement-detail__integrity i{margin-top:.15rem;color:var(--color-primary)}.movement-detail__integrity strong{font-size:.8rem}.movement-detail__integrity p{margin:.15rem 0 0;color:var(--color-text-muted);font-size:.74rem;line-height:1.45}@media(max-width:900px){.movement-detail__summary{grid-template-columns:repeat(2,minmax(0,1fr))}.movement-compare{grid-template-columns:1fr}.movement-compare__arrow{justify-content:center;transform:rotate(90deg)}}@media(max-width:520px){.movement-detail__summary{grid-template-columns:1fr}.movement-row-actions{flex-direction:column;align-items:stretch}}


/* C6D.3 — Indicadores operacionais da Central de Movimentações */
.movement-indicators{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem;margin:1rem 0 .45rem}.movement-indicator{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:.72rem .8rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface-soft)}.movement-indicator span{display:flex;align-items:center;gap:.4rem;color:var(--color-text-muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.02em}.movement-indicator span i{color:var(--color-primary)}.movement-indicator strong{font-size:1.15rem;line-height:1;color:var(--color-text)}.movement-latest{display:flex;align-items:center;gap:.4rem;margin:.15rem 0 .8rem;color:var(--color-text-muted);font-size:.7rem}.movement-latest i{color:var(--color-primary)}@media(max-width:900px){.movement-indicators{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.movement-indicators{grid-template-columns:1fr}}


/* C6E.1 UX — Termos de Responsabilidade */
.responsibility-terms-table{width:100%;table-layout:fixed;min-width:760px}.responsibility-terms-table th:nth-child(1){width:18%}.responsibility-terms-table th:nth-child(2){width:17%}.responsibility-terms-table th:nth-child(3){width:31%}.responsibility-terms-table th:nth-child(4){width:8%;text-align:center}.responsibility-terms-table th:nth-child(5){width:13%;text-align:center}.responsibility-terms-table th:nth-child(6){width:13%;text-align:center}.responsibility-terms-table td:nth-child(4),.responsibility-terms-table td:nth-child(5),.responsibility-terms-table td:nth-child(6){text-align:center}.responsibility-terms-table td{overflow-wrap:anywhere}.responsibility-terms-table td:last-child .btn{white-space:nowrap}
@media(max-width:767px){.responsibility-terms-table{min-width:0;table-layout:auto}.responsibility-terms-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.responsibility-terms-table,.responsibility-terms-table tbody,.responsibility-terms-table tr,.responsibility-terms-table td{display:block;width:100%}.responsibility-terms-table tbody{display:grid;gap:.75rem}.responsibility-terms-table tr{padding:.35rem .75rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface)}.responsibility-terms-table td{display:grid;grid-template-columns:minmax(6.5rem,38%) minmax(0,1fr);gap:.65rem;align-items:center;padding:.55rem 0!important;border:0!important;border-bottom:1px solid var(--color-border)!important;text-align:left!important}.responsibility-terms-table td:last-child{border-bottom:0!important}.responsibility-terms-table td::before{content:attr(data-label);color:var(--color-text-muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.02em}.responsibility-terms-table td:last-child .btn{justify-self:start}.responsibility-terms-table .movement-subline{margin-top:.1rem}}

/* C6E.2.1 — Termo formal para impressão */
.page-header__actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.document-print-body{margin:0;background:#eef1f5;color:#111;font-family:Arial,Helvetica,sans-serif}.document-toolbar{position:sticky;top:0;z-index:10;display:flex;justify-content:flex-end;gap:.5rem;padding:.7rem 5%;background:#fff;border-bottom:1px solid #d9dee7}.official-document{box-sizing:border-box;width:min(210mm,calc(100% - 2rem));min-height:297mm;margin:1rem auto;padding:15mm 14mm;background:#fff;box-shadow:0 .15rem 1rem rgba(0,0,0,.08);font-size:10pt;line-height:1.4}.official-document__header{display:flex;align-items:center;gap:12px;padding-bottom:10px;border-bottom:2px solid #111}.official-document__seal{display:grid;place-items:center;width:50px;height:50px;border:2px solid #111;border-radius:50%;font-size:10pt;font-weight:800}.official-document__seal--image{overflow:hidden;border:0!important;border-radius:0!important;background:transparent!important}.official-document__seal--image img{display:block;max-width:46px;max-height:46px;width:auto;height:auto;object-fit:contain}.official-document__header strong,.official-document__header span,.official-document__header small{display:block}.official-document__header strong{font-size:13pt;text-transform:uppercase}.official-document__header span{font-size:9pt}.official-document__header small{margin-top:2px;font-size:8pt}.official-document__title{text-align:center;margin:18px 0 14px}.official-document__title h1{margin:0 0 4px;font-size:14pt;letter-spacing:.03em}.official-document__title strong{font-size:11pt}.official-document__meta{display:grid;grid-template-columns:2fr 1fr 1fr;border:1px solid #777}.official-document__meta div{padding:7px 9px;border-right:1px solid #aaa}.official-document__meta div:last-child{border-right:0}.official-document__meta span{display:block;font-size:7.5pt;text-transform:uppercase}.official-document__meta strong{font-size:9pt}.official-document__section,.official-document__declaration{margin-top:16px}.official-document__section h2,.official-document__declaration h2{margin:0 0 7px;padding-bottom:3px;border-bottom:1px solid #777;font-size:10pt;text-transform:uppercase}.official-document__responsible{display:grid;grid-template-columns:2fr 1fr 1.5fr;gap:0;margin:0;border:1px solid #aaa}.official-document__responsible div{padding:6px 8px;border-right:1px solid #aaa}.official-document__responsible div:last-child{border-right:0}.official-document__responsible dt{font-size:7.5pt;text-transform:uppercase}.official-document__responsible dd{margin:2px 0 0;font-weight:700}.official-document__table{width:100%;border-collapse:collapse;font-size:8pt}.official-document__table th,.official-document__table td{padding:5px 6px;border:1px solid #888;vertical-align:top}.official-document__table th{background:#eee;text-align:left;font-size:7.5pt;text-transform:uppercase}.official-document__table th:nth-child(1){width:13%}.official-document__table th:nth-child(2){width:25%}.official-document__table th:nth-child(3){width:7%;text-align:center}.official-document__table td:nth-child(3){text-align:center}.official-document__count{margin:5px 0 0;text-align:right;font-size:8pt;font-weight:700}.official-document__declaration p{margin:6px 0;text-align:justify}.official-document__signatures{display:grid;grid-template-columns:1fr 1fr;gap:35mm;margin-top:25mm}.official-document__signatures div{text-align:center}.official-document__signatures span{display:block;border-top:1px solid #111;margin-bottom:4px}.official-document__signatures strong,.official-document__signatures small{display:block}.official-document__signatures small{font-size:8pt}.official-document__footer{margin-top:18mm;padding-top:5px;border-top:1px solid #aaa;text-align:center;font-size:7pt;color:#444}@media(max-width:767px){.page-header__actions{width:100%}.page-header__actions .btn{flex:1;justify-content:center}.official-document{width:calc(100% - 1rem);padding:1rem}.official-document__meta,.official-document__responsible{grid-template-columns:1fr}.official-document__meta div,.official-document__responsible div{border-right:0;border-bottom:1px solid #aaa}.official-document__meta div:last-child,.official-document__responsible div:last-child{border-bottom:0}.official-document__table{min-width:760px}.official-document__section:has(.official-document__table){overflow-x:auto}.official-document__signatures{gap:1rem}}
@media print{@page{size:A4 portrait;margin:12mm}.no-print{display:none!important}.document-print-body{background:#fff}.official-document{width:auto;min-height:0;margin:0;padding:0;box-shadow:none}.official-document__header,.official-document__title,.official-document__meta,.official-document__responsible,.official-document__declaration,.official-document__signatures,.official-document__footer{break-inside:avoid}.official-document__table thead{display:table-header-group}.official-document__table tr{break-inside:avoid}.official-document__table th{background:#eee!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.official-document__signatures{margin-top:20mm}.official-document__footer{margin-top:12mm}}

/* C6E.2.1 - refinamentos de impressão do Termo de Responsabilidade */
.official-document__section--no-rule>h2{border-bottom:0;padding-bottom:0}
@media print{
  .official-document__meta{display:grid!important;grid-template-columns:2fr 1fr 1fr!important}
  .official-document__meta div{border-right:1px solid #aaa!important;border-bottom:0!important}
  .official-document__meta div:last-child{border-right:0!important}
  .official-document__section--assets{overflow:visible!important}
  .official-document__table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
  .official-document__table th,.official-document__table td{overflow-wrap:anywhere;word-break:normal}
}

/* C6E.2.2 — ciclo de vida dos Termos de Responsabilidade */
.term-cancelled-alert{display:flex;gap:.8rem;align-items:flex-start;margin:0 0 1rem;padding:1rem;border:1px solid #b42318;border-radius:.65rem;background:#fff4f2;color:#7a271a}.term-cancelled-alert>i{margin-top:.15rem;font-size:1.2rem}.term-cancelled-alert strong{font-weight:800}.term-cancelled-alert p{margin:.25rem 0 0}.term-cancel-panel{margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--color-border)}.movement-type--cancelled{background:#fee4e2;color:#912018}.official-document__cancelled{margin:0 0 12px;padding:8px 10px;border:2px solid #8a1c13;text-align:center;color:#8a1c13}.official-document__cancelled strong,.official-document__cancelled span{display:block}.official-document__cancelled strong{font-size:11pt;letter-spacing:.04em}.official-document__cancelled span{margin-top:3px;font-size:8pt}.official-document--cancelled .official-document__title h1{color:#6b211a}@media print{.official-document__cancelled{break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* C6E.3.1 — Ficha/Carga Patrimonial do Responsável */
.responsibility-load__identity{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.85rem;align-items:center;margin:1rem 0;padding:1rem;border:1px solid var(--color-border);border-radius:.7rem;background:var(--color-surface-soft)}.responsibility-load__avatar{display:grid;place-items:center;width:2.8rem;height:2.8rem;border-radius:50%;background:color-mix(in srgb,var(--color-primary) 12%,var(--color-surface));color:var(--color-primary);font-size:1.15rem}.responsibility-load__identity span,.responsibility-load__identity small{display:block;color:var(--color-text-muted)}.responsibility-load__identity span{font-size:.68rem;font-weight:800;text-transform:uppercase}.responsibility-load__identity strong{display:block;margin:.1rem 0;font-size:1rem}.responsibility-load__identity small{font-size:.72rem}.responsibility-load__status{text-align:right}.responsibility-load__status strong{font-size:.78rem;color:var(--color-primary)}.responsibility-load__indicators{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin:0 0 1.2rem}.responsibility-load__indicators>div{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem .85rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface-soft)}.responsibility-load__indicators span{display:flex;align-items:center;gap:.4rem;color:var(--color-text-muted);font-size:.68rem;font-weight:800;text-transform:uppercase}.responsibility-load__indicators i{color:var(--color-primary)}.responsibility-load__indicators strong{font-size:1.15rem}.responsibility-load__section{margin-top:1.4rem;padding-top:1rem;border-top:1px solid var(--color-border)}.responsibility-load__section-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:.75rem}.responsibility-load__section-head h2{margin:0;font-size:1rem}.responsibility-load__section-head p{margin:.2rem 0 0;color:var(--color-text-muted);font-size:.74rem}.responsibility-load__section-head>span{flex:0 0 auto;font-size:.7rem;font-weight:800;color:var(--color-text-muted)}.responsibility-load-table{min-width:1000px;table-layout:fixed}.responsibility-load-table th:nth-child(1){width:12%}.responsibility-load-table th:nth-child(2){width:20%}.responsibility-load-table th:nth-child(3){width:20%}.responsibility-load-table th:nth-child(4){width:22%}.responsibility-load-table th:nth-child(5){width:17%}.responsibility-load-table th:nth-child(6){width:9%}.responsibility-load-terms{min-width:720px;table-layout:fixed}.responsibility-load-terms th:nth-child(1){width:22%}.responsibility-load-terms th:nth-child(2){width:23%}.responsibility-load-terms th:nth-child(3){width:18%;text-align:center}.responsibility-load-terms th:nth-child(4){width:18%;text-align:center}.responsibility-load-terms th:nth-child(5){width:19%;text-align:center}.responsibility-load-terms td:nth-child(3),.responsibility-load-terms td:nth-child(4),.responsibility-load-terms td:nth-child(5){text-align:center}
.table--responsaveis{min-width:880px}.table--responsaveis th:nth-child(1){width:27%}.table--responsaveis th:nth-child(2){width:15%}.table--responsaveis th:nth-child(3){width:31%}.table--responsaveis th:nth-child(4){width:12%}.table--responsaveis th:nth-child(5){width:15%}
@media(max-width:767px){.responsibility-load__identity{grid-template-columns:auto minmax(0,1fr)}.responsibility-load__status{grid-column:1/-1;text-align:left;padding-top:.65rem;border-top:1px solid var(--color-border)}.responsibility-load__indicators{grid-template-columns:1fr}.responsibility-load__section-head{flex-direction:column}.responsibility-load-table,.responsibility-load-terms{min-width:0;table-layout:auto}.responsibility-load-table thead,.responsibility-load-terms thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.responsibility-load-table,.responsibility-load-table tbody,.responsibility-load-table tr,.responsibility-load-table td,.responsibility-load-terms,.responsibility-load-terms tbody,.responsibility-load-terms tr,.responsibility-load-terms td{display:block;width:100%}.responsibility-load-table tbody,.responsibility-load-terms tbody{display:grid;gap:.75rem}.responsibility-load-table tr,.responsibility-load-terms tr{padding:.35rem .75rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface)}.responsibility-load-table td,.responsibility-load-terms td{display:grid;grid-template-columns:minmax(7rem,38%) minmax(0,1fr);gap:.65rem;align-items:center;padding:.55rem 0!important;border:0!important;border-bottom:1px solid var(--color-border)!important;text-align:left!important}.responsibility-load-table td:last-child,.responsibility-load-terms td:last-child{border-bottom:0!important}.responsibility-load-table td::before,.responsibility-load-terms td::before{content:attr(data-label);color:var(--color-text-muted);font-size:.68rem;font-weight:800;text-transform:uppercase}.responsibility-load-table td:last-child .btn,.responsibility-load-terms td:last-child .btn{justify-self:start}}


/* C6E.3.3 — Conciliação entre Carga Atual e Termo Vigente */
.load-reconciliation{margin:0 0 1.2rem;padding:1rem;border:1px solid var(--color-border);border-radius:.7rem;background:var(--color-surface-soft)}.load-reconciliation--ok{border-left:4px solid #16803c}.load-reconciliation--warning{border-left:4px solid #b54708}.load-reconciliation--neutral{border-left:4px solid var(--color-primary)}.load-reconciliation__head{display:flex;gap:.7rem;align-items:flex-start}.load-reconciliation__head>i{margin-top:.15rem;font-size:1.05rem}.load-reconciliation--ok .load-reconciliation__head>i{color:#16803c}.load-reconciliation--warning .load-reconciliation__head>i{color:#b54708}.load-reconciliation__head strong{display:block;font-size:.9rem}.load-reconciliation__head p{margin:.2rem 0 0;color:var(--color-text-muted);font-size:.75rem}.load-reconciliation__reference{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin:.8rem 0 0;padding-top:.7rem;border-top:1px solid var(--color-border);font-size:.74rem}.load-reconciliation__reference>span{color:var(--color-text-muted);font-weight:700}.load-reconciliation__reference a{text-decoration:none}.load-reconciliation__reference small{color:var(--color-text-muted)}.load-reconciliation__changes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin-top:.8rem}.load-reconciliation__changes>div{padding:.75rem;border:1px solid var(--color-border);border-radius:.55rem;background:var(--color-surface)}.load-reconciliation__changes h3{display:flex;justify-content:space-between;gap:.5rem;margin:0 0 .5rem;font-size:.78rem}.load-reconciliation__changes h3 span{display:grid;place-items:center;min-width:1.4rem;height:1.4rem;padding:0 .3rem;border-radius:999px;background:var(--color-surface-soft);font-size:.68rem}.load-reconciliation__changes ul{margin:0;padding-left:1.1rem;font-size:.73rem}.load-reconciliation__changes li+li{margin-top:.3rem}.load-reconciliation__empty{margin:0;color:var(--color-text-muted);font-size:.73rem}.load-reconciliation__note{display:flex;gap:.45rem;align-items:flex-start;margin:.75rem 0 0;color:var(--color-text-muted);font-size:.72rem}@media(max-width:767px){.load-reconciliation__changes{grid-template-columns:1fr}.load-reconciliation__reference{align-items:flex-start;flex-direction:column;gap:.2rem}}

/* C6E.3.4 — vigência e substituição dos Termos de Responsabilidade */
.movement-type--substituted{background:#eef2f6;color:#475467}.term-substituted-alert{display:flex;gap:.8rem;align-items:flex-start;margin:0 0 1rem;padding:1rem;border:1px solid #667085;border-radius:.65rem;background:#f8f9fb;color:#344054}.term-substituted-alert>i{margin-top:.15rem;font-size:1.2rem}.term-substituted-alert strong{font-weight:800}.term-substituted-alert p{margin:.25rem 0 0}.term-substituted-alert a{font-weight:800}.official-document__substituted{margin:0 0 12px;padding:8px 10px;border:2px solid #667085;text-align:center;color:#344054}.official-document__substituted strong,.official-document__substituted span{display:block}.official-document__substituted strong{font-size:11pt;letter-spacing:.04em}.official-document__substituted span{margin-top:3px;font-size:8pt}.official-document--substituted .official-document__title h1{color:#344054}@media print{.official-document__substituted{break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* C6F.3 — Documento formal A4 do Termo de Movimentação */
.official-document__meta--movement{grid-template-columns:1.5fr 1.15fr 1.15fr .7fr}.official-document__asset{grid-template-columns:1fr 3fr}.official-document__movement-grid{display:grid;grid-template-columns:1fr 1fr;margin:0;border:1px solid #aaa}.official-document__movement-grid div{padding:6px 8px;border-right:1px solid #aaa;border-bottom:1px solid #aaa}.official-document__movement-grid div:nth-child(even){border-right:0}.official-document__movement-grid div:nth-last-child(-n+2){border-bottom:0}.official-document__movement-grid .official-document__movement-wide{grid-column:1/-1;border-right:0;border-bottom:0}.official-document__movement-grid dt{font-size:7.5pt;text-transform:uppercase}.official-document__movement-grid dd{margin:2px 0 0;font-weight:700}.official-document__signatures--movement{grid-template-columns:repeat(3,1fr);gap:12mm}.official-document--movement .official-document__section p{margin:6px 0;text-align:justify}@media(max-width:767px){.official-document__meta--movement,.official-document__asset,.official-document__movement-grid,.official-document__signatures--movement{grid-template-columns:1fr}.official-document__movement-grid div,.official-document__movement-grid div:nth-child(even),.official-document__movement-grid div:nth-last-child(-n+2){border-right:0;border-bottom:1px solid #aaa}.official-document__movement-grid .official-document__movement-wide{grid-column:auto;border-bottom:0}}@media print{.official-document__movement-grid,.official-document__asset,.official-document--movement .official-document__section,.official-document__signatures--movement{break-inside:avoid}.official-document__signatures--movement{grid-template-columns:repeat(3,1fr);gap:12mm;margin-top:18mm}}

/* C6F.3 ajuste de impressao: preservar grades inline no A4 */
.official-document__section--no-rule>h2{border-bottom:0;padding-bottom:0}
@media print{.official-document__meta.official-document__meta--movement{grid-template-columns:1.5fr 1.15fr 1.15fr .7fr!important}.official-document__asset{grid-template-columns:1fr 3fr}.official-document__movement-grid{grid-template-columns:1fr 1fr}.official-document__movement-grid div{border-right:1px solid #aaa;border-bottom:1px solid #aaa}.official-document__movement-grid div:nth-child(even){border-right:0}.official-document__movement-grid div:nth-last-child(-n+2){border-bottom:0}.official-document__movement-grid .official-document__movement-wide{grid-column:1/-1;border-right:0;border-bottom:0}}

/* C6F.4 — Central de Termos de Movimentação */
.movement-filters--terms{grid-template-columns:minmax(15rem,2fr) minmax(10rem,1fr) minmax(8rem,.7fr) minmax(8rem,.7fr) minmax(8rem,.7fr) auto}.movement-terms-table{width:100%;table-layout:fixed;min-width:980px}.movement-terms-table th:nth-child(1){width:15%}.movement-terms-table th:nth-child(2){width:14%}.movement-terms-table th:nth-child(3){width:15%}.movement-terms-table th:nth-child(4){width:20%}.movement-terms-table th:nth-child(5){width:17%}.movement-terms-table th:nth-child(6){width:8%;text-align:center}.movement-terms-table th:nth-child(7){width:11%;text-align:center}.movement-terms-table td:nth-child(6),.movement-terms-table td:nth-child(7){text-align:center}.movement-terms-table td{overflow-wrap:anywhere}.movement-terms-table .movement-row-actions{justify-content:center}.movement-term-route{display:block;margin-top:.2rem;color:var(--color-text-muted);font-size:.68rem;line-height:1.35}@media(max-width:1100px){.movement-filters--terms{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:767px){.movement-filters--terms{grid-template-columns:1fr}}
@media(max-width:767px){.movement-terms-table{min-width:0;table-layout:auto}.movement-terms-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.movement-terms-table,.movement-terms-table tbody,.movement-terms-table tr,.movement-terms-table td{display:block;width:100%}.movement-terms-table tbody{display:grid;gap:.75rem}.movement-terms-table tr{padding:.35rem .75rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface)}.movement-terms-table td{display:grid;grid-template-columns:minmax(7rem,38%) minmax(0,1fr);gap:.65rem;align-items:center;padding:.55rem 0!important;border:0!important;border-bottom:1px solid var(--color-border)!important;text-align:left!important}.movement-terms-table td:last-child{border-bottom:0!important}.movement-terms-table td::before{content:attr(data-label);color:var(--color-text-muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.02em}.movement-terms-table .movement-row-actions{justify-content:flex-start}}

/* C6F.4.1 — tabela dos Termos alinhada ao padrão visual das listagens */
.table--termos-movimentacao{min-width:1080px}
.table--termos-movimentacao th,.table--termos-movimentacao td{vertical-align:middle}
.table--termos-movimentacao tbody td{height:3.8rem}
.table--termos-movimentacao tfoot td{white-space:nowrap}
.table--termos-movimentacao tfoot td:nth-child(3){font-size:.68rem}
.table--termos-movimentacao .sgpm-table-text-2{display:block;max-width:100%;margin-top:.15rem;color:var(--color-text-muted);font-size:.69rem;line-height:1.35;vertical-align:middle}
@media(max-width:767px){
  .table--termos-movimentacao{min-width:0}
  .table--termos-movimentacao tbody td{height:auto}
  .table--termos-movimentacao tfoot{display:block;margin-top:.75rem}
  .table--termos-movimentacao tfoot tr{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:0;border:2px solid var(--color-primary);border-radius:.65rem;overflow:hidden;background:var(--color-table-head-bg)}
  .table--termos-movimentacao tfoot td{display:block!important;width:auto!important;padding:.55rem .7rem!important;border:0!important;border-bottom:1px solid var(--color-border)!important;background:transparent;text-align:left!important}
  .table--termos-movimentacao tfoot td::before{content:none}
  .table--termos-movimentacao tfoot td:nth-last-child(-n+2){border-bottom:0!important}
}

/* C6F.4.2 — tabela de Bens no detalhe do Termo de Responsabilidade */
.table--termo-responsabilidade-itens{min-width:960px}
.table--termo-responsabilidade-itens th:nth-child(1){width:10%}
.table--termo-responsabilidade-itens th:nth-child(2){width:18%}
.table--termo-responsabilidade-itens th:nth-child(3){width:28%}
.table--termo-responsabilidade-itens th:nth-child(4){width:29%}
.table--termo-responsabilidade-itens th:nth-child(5){width:15%;text-align:center}
.table--termo-responsabilidade-itens td:nth-child(5){text-align:center}
.table--termo-responsabilidade-itens td{overflow-wrap:anywhere}
.term-responsibility-observations{margin-top:1.6rem;padding-top:.15rem}
.term-responsibility-observations .section-title{margin:0 0 .7rem}
.term-responsibility-observations p{margin:0;line-height:1.55}
@media(max-width:767px){
  .table--termo-responsabilidade-itens{min-width:0;table-layout:auto}
  .table--termo-responsabilidade-itens thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .table--termo-responsabilidade-itens,.table--termo-responsabilidade-itens tbody,.table--termo-responsabilidade-itens tr,.table--termo-responsabilidade-itens td{display:block;width:100%}
  .table--termo-responsabilidade-itens tbody{display:grid;gap:.75rem}
  .table--termo-responsabilidade-itens tbody tr{padding:.35rem .75rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface)}
  .table--termo-responsabilidade-itens tbody td{display:grid;grid-template-columns:minmax(7rem,38%) minmax(0,1fr);gap:.65rem;align-items:center;padding:.55rem 0!important;border:0!important;border-bottom:1px solid var(--color-border)!important;text-align:left!important}
  .table--termo-responsabilidade-itens tbody td:last-child{border-bottom:0!important}
  .table--termo-responsabilidade-itens tbody td::before{content:attr(data-label);color:var(--color-text-muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.02em}
  .table--termo-responsabilidade-itens tfoot td:not(:first-child){display:none}
}

/* C6F.4.3 — rodapés responsivos das tabelas patrimoniais padronizadas */
@media(max-width:767px){
  .responsibility-terms-table tfoot,.responsibility-load-table tfoot,.responsibility-load-terms tfoot{display:block;margin-top:.75rem}
  .responsibility-terms-table tfoot tr,.responsibility-load-table tfoot tr,.responsibility-load-terms tfoot tr{display:flex!important;flex-wrap:wrap;gap:0;padding:0;border:2px solid var(--color-primary);border-radius:.65rem;overflow:hidden;background:var(--color-table-head-bg)}
  .responsibility-terms-table tfoot td,.responsibility-load-table tfoot td,.responsibility-load-terms tfoot td{display:block!important;flex:1 1 12rem;width:auto!important;padding:.55rem .7rem!important;border:0!important;border-right:1px solid var(--color-border)!important;background:transparent;text-align:left!important}
  .responsibility-terms-table tfoot td::before,.responsibility-load-table tfoot td::before,.responsibility-load-terms tfoot td::before{content:none}
  .responsibility-terms-table tfoot .table-summary-muted,.responsibility-load-table tfoot .table-summary-muted,.responsibility-load-terms tfoot .table-summary-muted{display:none!important}
}

/* C6F.4.4 — impressão: dados do responsável sempre em uma única linha */
@media print{
  .official-document__responsible.official-document__responsible--person{display:grid!important;grid-template-columns:2fr 1fr 1.5fr!important}
  .official-document__responsible.official-document__responsible--person>div{border-right:1px solid #aaa!important;border-bottom:0!important}
  .official-document__responsible.official-document__responsible--person>div:last-child{border-right:0!important}
}

/* C6G.1 — Fundação e Central de Inventários Patrimoniais */
.inventory-indicators{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem;margin:1rem 0 .45rem}
.inventory-indicators>div{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:.72rem .8rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface-soft)}
.inventory-indicators span{display:flex;align-items:center;gap:.4rem;color:var(--color-text-muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.02em}
.inventory-indicators span i{color:var(--color-primary)}
.inventory-indicators strong{font-size:1.15rem;line-height:1;color:var(--color-text)}
.inventory-latest{display:flex;align-items:center;gap:.4rem;margin:.15rem 0 .8rem;color:var(--color-text-muted);font-size:.7rem}
.inventory-latest i{color:var(--color-primary)}
.inventory-filters{display:grid;grid-template-columns:minmax(16rem,2fr) minmax(10rem,1fr) minmax(10rem,1fr) auto;gap:.65rem;align-items:end;margin:1rem 0}
.inventory-filter-actions{display:flex;gap:.45rem;align-items:center}
.inventory-table{min-width:1080px;table-layout:fixed}
.inventory-table th:nth-child(1){width:13%}.inventory-table th:nth-child(2){width:9%}.inventory-table th:nth-child(3){width:20%}.inventory-table th:nth-child(4){width:9%}.inventory-table th:nth-child(5){width:17%}.inventory-table th:nth-child(6){width:11%;text-align:center}.inventory-table th:nth-child(7){width:12%;text-align:center}.inventory-table th:nth-child(8){width:9%;text-align:center}
.inventory-table td:nth-child(6),.inventory-table td:nth-child(7),.inventory-table td:nth-child(8){text-align:center}.inventory-table td{vertical-align:middle;overflow-wrap:anywhere}.inventory-table .sgpm-table-text-2{display:block;margin-top:.18rem;color:var(--color-text-muted);font-size:.69rem;line-height:1.35}
.inventory-progress-text{display:block;margin-top:.15rem;color:var(--color-text-muted);font-size:.67rem}
.inventory-status{display:inline-flex;align-items:center;padding:.22rem .48rem;border-radius:999px;background:#eef2f6;color:#344054;font-size:.66rem;font-weight:800;text-transform:uppercase;line-height:1.2}
.inventory-status--em-preparacao{background:#eef4ff;color:#1d4ed8}.inventory-status--em-andamento{background:#ecfdf3;color:#067647}.inventory-status--em-conciliacao{background:#fffaeb;color:#b54708}.inventory-status--concluido{background:#dcfae6;color:#166534}.inventory-status--cancelado{background:#fee4e2;color:#912018}
.inventory-integrity{display:flex;gap:.7rem;align-items:flex-start;margin:1rem 0;padding:.85rem;border:1px solid var(--color-border);border-left:4px solid var(--color-primary);border-radius:.65rem;background:var(--color-surface-soft)}
.inventory-integrity>i{margin-top:.15rem;color:var(--color-primary)}.inventory-integrity strong{font-size:.82rem}.inventory-integrity p{margin:.18rem 0 0;color:var(--color-text-muted);font-size:.74rem;line-height:1.45}
@media(max-width:1000px){.inventory-indicators{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-search{grid-column:span 2}}
@media(max-width:767px){.inventory-indicators,.inventory-filters{grid-template-columns:1fr}.inventory-search{grid-column:auto}.inventory-filter-actions{flex-direction:column}.inventory-filter-actions .btn{width:100%;justify-content:center}.inventory-table{min-width:0;table-layout:auto}.inventory-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.inventory-table,.inventory-table tbody,.inventory-table tr,.inventory-table td{display:block;width:100%}.inventory-table tbody{display:grid;gap:.75rem}.inventory-table tbody tr{padding:.35rem .75rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface)}.inventory-table tbody td{display:grid;grid-template-columns:minmax(7rem,38%) minmax(0,1fr);gap:.65rem;align-items:center;padding:.55rem 0!important;border:0!important;border-bottom:1px solid var(--color-border)!important;text-align:left!important}.inventory-table tbody td:last-child{border-bottom:0!important}.inventory-table tbody td::before{content:attr(data-label);color:var(--color-text-muted);font-size:.68rem;font-weight:800;text-transform:uppercase}.inventory-table tfoot td{display:block!important;width:100%!important;text-align:left!important}.inventory-table tfoot .table-summary-muted{display:none!important}}

/* C6G.2 — Preparação e abertura da Conferência Patrimonial */
.inventory-detail__meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem;margin:1rem 0}
.inventory-detail__meta>div,.inventory-detail__indicators>div{min-width:0;padding:.8rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface)}
.inventory-detail__meta span,.inventory-detail__notes span{display:block;margin-bottom:.3rem;color:var(--color-text-muted);font-size:.67rem;font-weight:800;text-transform:uppercase;letter-spacing:.025em}
.inventory-detail__meta strong{display:block;overflow-wrap:anywhere;font-size:.82rem;line-height:1.4}
.inventory-detail__notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin-bottom:1rem}
.inventory-detail__notes>div{padding:.8rem;border-left:3px solid var(--color-primary);border-radius:.2rem .55rem .55rem .2rem;background:var(--color-surface-soft)}
.inventory-detail__notes p{margin:0;font-size:.76rem;line-height:1.5;white-space:normal}
.inventory-detail__indicators{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem;margin:1rem 0}
.inventory-detail__indicators>div{display:flex;align-items:center;justify-content:space-between;gap:.6rem;background:var(--color-surface-soft)}
.inventory-detail__indicators span{display:flex;align-items:center;gap:.4rem;color:var(--color-text-muted);font-size:.67rem;font-weight:800;text-transform:uppercase}
.inventory-detail__indicators i{color:var(--color-primary)}.inventory-detail__indicators strong{font-size:1.15rem}
.inventory-detail__section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin:1.2rem 0 .65rem}
.inventory-detail__section-head h2{margin:0;font-size:1.15rem}.inventory-detail__section-head p{margin:.2rem 0 0;color:var(--color-text-muted);font-size:.74rem}.inventory-detail__section-head>span{color:var(--color-text-muted);font-size:.72rem;font-weight:800;white-space:nowrap}
.inventory-items-table{min-width:1220px;table-layout:fixed}.inventory-items-table th:nth-child(1){width:8%}.inventory-items-table th:nth-child(2){width:14%}.inventory-items-table th:nth-child(3){width:17%}.inventory-items-table th:nth-child(4){width:16%}.inventory-items-table th:nth-child(5){width:13%}.inventory-items-table th:nth-child(6){width:11%}.inventory-items-table th:nth-child(7){width:9%}.inventory-items-table th:nth-child(8){width:12%}
.inventory-items-table th,.inventory-items-table td{vertical-align:middle;overflow-wrap:anywhere}.inventory-item-subline{display:block;margin-top:.18rem;color:var(--color-text-muted);font-size:.68rem;line-height:1.35}
.inventory-result{display:inline-flex;padding:.22rem .45rem;border-radius:999px;background:#eef2f6;color:#344054;font-size:.64rem;font-weight:800;text-transform:uppercase;line-height:1.2}.inventory-result--localizado{background:#dcfae6;color:#166534}.inventory-result--nao-localizado,.inventory-result--divergente{background:#fee4e2;color:#912018}.inventory-result--sobra-fisica{background:#fffaeb;color:#b54708}.inventory-result--pendente{background:#eef4ff;color:#1d4ed8}
@media(max-width:900px){.inventory-detail__meta,.inventory-detail__indicators{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){.inventory-detail__meta,.inventory-detail__notes,.inventory-detail__indicators{grid-template-columns:1fr}.inventory-detail__section-head{align-items:flex-start;flex-direction:column}.inventory-items-table{min-width:0;table-layout:auto}.inventory-items-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.inventory-items-table,.inventory-items-table tbody,.inventory-items-table tr,.inventory-items-table td{display:block;width:100%}.inventory-items-table tbody{display:grid;gap:.75rem}.inventory-items-table tbody tr{padding:.35rem .75rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface)}.inventory-items-table tbody td{display:grid;grid-template-columns:minmax(7rem,38%) minmax(0,1fr);gap:.65rem;align-items:center;padding:.55rem 0!important;border:0!important;border-bottom:1px solid var(--color-border)!important;text-align:left!important}.inventory-items-table tbody td:last-child{border-bottom:0!important}.inventory-items-table tbody td::before{content:attr(data-label);color:var(--color-text-muted);font-size:.68rem;font-weight:800;text-transform:uppercase}.inventory-items-table tfoot td:first-child{display:block!important;width:100%!important}.inventory-items-table tfoot .table-summary-muted{display:none!important}}

/* C6G.3 — Conferência física e registro de divergências */
.inventory-item-observed{display:block;margin-top:.3rem;padding-left:.4rem;border-left:2px solid #b54708;color:#b54708;font-size:.68rem;font-weight:700;line-height:1.35}
.inventory-item-actions{display:flex;flex-direction:column;align-items:stretch;gap:.35rem}.inventory-item-actions .btn{justify-content:center}
.inventory-conference__snapshot{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;margin:1rem 0}
.inventory-conference__snapshot>div{min-width:0;padding:.8rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface-soft)}
.inventory-conference__snapshot span{display:block;margin-bottom:.3rem;color:var(--color-text-muted);font-size:.67rem;font-weight:800;text-transform:uppercase;letter-spacing:.025em}.inventory-conference__snapshot strong{display:block;overflow-wrap:anywhere;font-size:.8rem;line-height:1.4}
.inventory-conference__form{display:grid;gap:1rem}.inventory-conference__form .form-section{margin:0}
.inventory-conference__choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem}
.inventory-conference__choice{position:relative;display:block;cursor:pointer}.inventory-conference__choice input{position:absolute;opacity:0;pointer-events:none}.inventory-conference__choice span{display:block;height:100%;padding:.85rem;border:2px solid var(--color-border);border-radius:.65rem;background:var(--color-surface);transition:border-color .15s,background .15s}.inventory-conference__choice strong,.inventory-conference__choice small{display:block}.inventory-conference__choice strong{font-size:.8rem}.inventory-conference__choice small{margin-top:.25rem;color:var(--color-text-muted);font-size:.69rem;line-height:1.4}.inventory-conference__choice input:checked+span{border-color:var(--color-primary);background:color-mix(in srgb,var(--color-primary) 8%,var(--color-surface))}.inventory-conference__choice input:focus-visible+span{outline:3px solid color-mix(in srgb,var(--color-primary) 30%,transparent);outline-offset:2px}
.inventory-conference__check{display:flex;align-items:center;padding:.8rem;border:1px solid var(--color-border);border-radius:.55rem;background:var(--color-surface-soft)}.inventory-conference__check label{display:flex;align-items:flex-start;gap:.6rem;cursor:pointer}.inventory-conference__check input{margin-top:.2rem}.inventory-conference__check strong,.inventory-conference__check small{display:block}.inventory-conference__check strong{font-size:.78rem}.inventory-conference__check small{margin-top:.2rem;color:var(--color-text-muted);font-size:.68rem;line-height:1.35}
@media(max-width:900px){.inventory-conference__snapshot{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-conference__choices{grid-template-columns:1fr}}
@media(max-width:600px){.inventory-conference__snapshot{grid-template-columns:1fr}.inventory-conference__form .form-actions{align-items:stretch;flex-direction:column-reverse}.inventory-conference__form .form-actions .btn{width:100%;justify-content:center}}

/* C6G.7 — Relatório Final do Inventário */
.official-document__meta--inventory{grid-template-columns:1fr 1.25fr 1fr .8fr}
.official-document__inventory-summary{display:grid;grid-template-columns:repeat(4,1fr);margin:0;border:1px solid #aaa}
.official-document__inventory-summary>div{padding:7px 9px;border-right:1px solid #aaa;text-align:center}
.official-document__inventory-summary>div:last-child{border-right:0}
.official-document__inventory-summary dt{font-size:7.5pt;text-transform:uppercase}
.official-document__inventory-summary dd{margin:2px 0 0;font-size:12pt;font-weight:800}
.official-document__table--inventory th:nth-child(1){width:12%}.official-document__table--inventory th:nth-child(2){width:25%}.official-document__table--inventory th:nth-child(3){width:28%}.official-document__table--inventory th:nth-child(4){width:20%}.official-document__table--inventory th:nth-child(5){width:15%}
.official-document__table--inventory-divergences th:nth-child(1){width:12%}.official-document__table--inventory-divergences th:nth-child(2){width:13%}.official-document__table--inventory-divergences th:nth-child(3){width:22%}.official-document__table--inventory-divergences th:nth-child(4){width:21%}.official-document__table--inventory-divergences th:nth-child(5){width:32%}
@media(max-width:767px){.official-document__meta--inventory,.official-document__inventory-summary{grid-template-columns:1fr}.official-document__inventory-summary>div{border-right:0;border-bottom:1px solid #aaa}.official-document__inventory-summary>div:last-child{border-bottom:0}}
@media print{.official-document__meta--inventory{grid-template-columns:1fr 1.25fr 1fr .8fr!important}.official-document__inventory-summary{grid-template-columns:repeat(4,1fr)!important;break-inside:avoid}.official-document__inventory-summary>div{border-right:1px solid #aaa!important;border-bottom:0!important}.official-document__inventory-summary>div:last-child{border-right:0!important}.official-document__table--inventory,.official-document__table--inventory-divergences{table-layout:fixed!important}.official-document--inventory-report .official-document__section{break-inside:auto}}

/* C6G.7.1 — Relatório Final: remove a régua duplicada dos títulos que antecedem tabelas */
.official-document--inventory-report .official-document__section--assets > h2 {
  border-bottom: 0;
  padding-bottom: 0;
}

/* C6G.8 — Relatório específico de Divergências do Inventário */
.official-document__table--inventory-divergence-detail th:nth-child(1){width:17%}
.official-document__table--inventory-divergence-detail th:nth-child(2){width:20%}
.official-document__table--inventory-divergence-detail th:nth-child(3){width:24%}
.official-document__table--inventory-divergence-detail th:nth-child(4){width:20%}
.official-document__table--inventory-divergence-detail th:nth-child(5){width:19%}
.official-document--inventory-divergence-report .official-document__section--assets > h2{border-bottom:0;padding-bottom:0}
@media print{.official-document__table--inventory-divergence-detail{table-layout:fixed!important}.official-document--inventory-divergence-report .official-document__section{break-inside:auto}}

/* C6G.9 — Evidências da conferência física */
.inventory-evidence { margin-top: 1.25rem; }
.inventory-evidence h2 { display:flex; align-items:center; gap:.55rem; margin:0 0 .35rem; font-size:1.05rem; }
.inventory-evidence__form { margin-top:1rem; padding-top:1rem; border-top:1px solid var(--border-color, #d9e0ea); }
.inventory-evidence .empty-state { display:flex; align-items:center; gap:.5rem; margin:.75rem 0; }

/* C6G.10 — Evidências no histórico, conciliação e relatórios */
.inventory-evidence--readonly{margin-top:1rem}
.inventory-evidence__empty{display:flex;align-items:center;gap:.5rem;color:var(--color-text-muted);font-size:.76rem}
.inventory-evidence__cards{display:grid;gap:.55rem;margin-top:.75rem}
.inventory-evidence__cards article{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem;border:1px solid var(--color-border);border-radius:.6rem;background:var(--color-surface-soft)}
.inventory-evidence__cards strong,.inventory-evidence__cards small{display:block}.inventory-evidence__cards small{margin-top:.18rem;color:var(--color-text-muted);font-size:.68rem}
.inventory-evidence__gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem;margin-top:1rem}
.inventory-evidence__card{overflow:hidden;border:1px solid var(--color-border);border-radius:.7rem;background:var(--color-surface)}
.inventory-evidence__card img{display:block;width:100%;height:180px;object-fit:cover;background:var(--color-surface-soft)}
.inventory-evidence__file-icon{display:grid;place-items:center;height:180px;background:var(--color-surface-soft);font-size:3rem;color:var(--color-primary)}
.inventory-evidence__card-body{display:grid;gap:.35rem;padding:.75rem}.inventory-evidence__card-body p{margin:0;font-size:.74rem}.inventory-evidence__card-body small{color:var(--color-text-muted);font-size:.67rem}.inventory-evidence__card-body .btn{margin-top:.25rem;justify-self:start}
.official-document__evidence-intro{margin:0 0 7px;font-size:8pt}.official-document__evidence-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.official-document__evidence-card{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px;padding:6px;border:1px solid #aaa;break-inside:avoid}.official-document__evidence-card img{width:105px;height:78px;object-fit:cover}.official-document__evidence-file{display:grid;place-items:center;width:105px;height:78px;background:#f2f2f2;border:1px solid #ccc;font-weight:800}.official-document__evidence-card strong,.official-document__evidence-card span,.official-document__evidence-card small{display:block}.official-document__evidence-card strong{font-size:7.5pt}.official-document__evidence-card span{margin-top:3px;font-size:7pt}.official-document__evidence-card small{margin-top:4px;color:#555;font-size:6.5pt;overflow-wrap:anywhere}
@media(max-width:900px){.inventory-evidence__gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.inventory-evidence__gallery{grid-template-columns:1fr}.inventory-evidence__cards article{align-items:flex-start;flex-direction:column}}
@media print{.official-document__evidence-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.official-document__evidence-card{break-inside:avoid!important}.official-document__evidence-card img{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* =========================================================
   C6G10.2 — INVENTÁRIO / TRATAR DIVERGÊNCIA
   Padronização visual da comparação e constatação
   ========================================================= */
.inventory-reconciliation-form .page-header{
    margin-bottom:1rem;
}

.inventory-reconciliation-comparison{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.75rem;
    margin:1rem 0;
}

.inventory-reconciliation-comparison>div{
    min-width:0;
    padding:.9rem 1rem;
    border:1px solid var(--color-border);
    border-radius:.65rem;
    background:var(--color-surface);
}

.inventory-reconciliation-comparison span,
.inventory-reconciliation-comparison strong,
.inventory-reconciliation-comparison small{
    display:block;
}

.inventory-reconciliation-comparison span{
    margin-bottom:.35rem;
    color:var(--color-text-muted);
    font-size:.7rem;
    font-weight:800;
    line-height:1.3;
    letter-spacing:.02em;
    text-transform:uppercase;
}

.inventory-reconciliation-comparison strong{
    color:var(--color-text);
    font-size:.92rem;
    line-height:1.4;
    overflow-wrap:anywhere;
}

.inventory-reconciliation-comparison small{
    margin-top:.35rem;
    color:var(--color-text-muted);
    font-size:.74rem;
    line-height:1.4;
    overflow-wrap:anywhere;
}

.inventory-reconciliation-constatacao{
    margin:0 0 1rem;
    padding:.9rem 1rem;
    border:1px solid var(--color-border);
    border-left:4px solid var(--color-primary);
    border-radius:.65rem;
    background:var(--color-surface-soft);
}

.inventory-reconciliation-constatacao strong{
    display:block;
    margin-bottom:.35rem;
    color:var(--color-text);
    font-size:.84rem;
}

.inventory-reconciliation-constatacao p{
    margin:0;
    color:var(--color-text);
    font-size:.78rem;
    line-height:1.55;
}

.inventory-reconciliation-form .inventory-evidence--readonly{
    margin:0 0 1rem;
    padding:1rem;
    border:1px solid var(--color-border);
    border-radius:.65rem;
    background:var(--color-surface);
}

.inventory-reconciliation-decision{
    margin-top:0;
    padding:1rem;
    border:1px solid var(--color-border);
    border-radius:.65rem;
    background:var(--color-surface);
}

.inventory-reconciliation-decision .form-actions{
    margin-top:.25rem;
}

@media(max-width:767px){
    .inventory-reconciliation-comparison{
        grid-template-columns:1fr;
    }

    .inventory-reconciliation-form .inventory-evidence--readonly,
    .inventory-reconciliation-decision{
        padding:.8rem;
    }
}

/* =========================================================
   C6G10.3 — INVENTÁRIO / CONCILIAÇÃO
   Restaura os cards de indicadores após C6G10.2
   ========================================================= */
.inventory-reconciliation__summary{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:.75rem;
    margin:1rem 0;
}
.inventory-reconciliation__summary>div{
    min-width:0;
    padding:.85rem .95rem;
    border:1px solid var(--color-border);
    border-radius:.65rem;
    background:var(--color-surface-soft);
}
.inventory-reconciliation__summary span{
    display:block;
    color:var(--color-text-muted);
    font-size:.72rem;
    font-weight:800;
    line-height:1.3;
    text-transform:uppercase;
    letter-spacing:.02em;
}
.inventory-reconciliation__summary strong{
    display:block;
    margin-top:.4rem;
    color:var(--color-text);
    font-size:1.25rem;
    line-height:1;
}
@media(max-width:1000px){
    .inventory-reconciliation__summary{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:600px){
    .inventory-reconciliation__summary{grid-template-columns:1fr;}
}


/* =========================================================
   C6H.5.1 — SIDEBAR RECOLHÍVEL (DESKTOP)
   ========================================================= */
@media (min-width: 769px) {
    .app-sidebar {
        position: relative;
        transition: width var(--transition-normal), padding var(--transition-normal);
    }

    .sidebar-collapse-toggle {
        position: absolute;
        top: 14px;
        right: -15px;
        z-index: 5;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        padding: 0;
        border: 1px solid var(--color-border);
        border-radius: 50%;
        background: var(--color-surface);
        color: var(--color-text-muted);
        box-shadow: var(--shadow-sm);
        cursor: pointer;
        transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-normal);
    }

    .sidebar-collapse-toggle:hover,
    .sidebar-collapse-toggle:focus-visible {
        color: var(--color-primary);
        background: var(--color-hover);
    }

    .app-sidebar.is-collapsed {
        width: 64px;
        padding-inline: 8px;
    }

    .app-sidebar.is-collapsed .sidebar-section__title,
    .app-sidebar.is-collapsed .sidebar-link > span:not(.sidebar-link__icon) {
        display: none;
    }

    .app-sidebar.is-collapsed .sidebar-section {
        margin-top: 8px;
    }

    .app-sidebar.is-collapsed .sidebar-link {
        position: relative;
        justify-content: center;
        min-height: 40px;
        padding-inline: 0;
        gap: 0;
    }

    .app-sidebar.is-collapsed .sidebar-link__icon {
        width: 24px;
        font-size: 1rem;
    }

    .app-sidebar.is-collapsed .sidebar-collapse-toggle {
        transform: rotate(180deg);
    }

    .app-sidebar.is-collapsed .sidebar-link[data-sidebar-tooltip]::after {
        content: attr(data-sidebar-tooltip);
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        z-index: 20;
        transform: translateY(-50%);
        padding: 7px 10px;
        border-radius: var(--radius-sm);
        background: var(--color-text);
        color: var(--color-surface);
        font-size: .78rem;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        box-shadow: var(--shadow-sm);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity var(--transition-fast);
    }

    .app-sidebar.is-collapsed .sidebar-link[data-sidebar-tooltip]:hover::after,
    .app-sidebar.is-collapsed .sidebar-link[data-sidebar-tooltip]:focus-visible::after {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    .sidebar-collapse-toggle { display: none; }
}

/* C6J.5.1 — Ajustes visuais do Termo de Baixa Patrimonial */
.official-document--baixa .official-document__section--baixa-assets{overflow:visible}
.official-document__table--baixa{width:100%;min-width:0;table-layout:fixed}
.official-document__table--baixa th,.official-document__table--baixa td{white-space:normal;overflow-wrap:anywhere;word-break:normal}
.official-document__table--baixa th:nth-child(1){width:16%}
.official-document__table--baixa th:nth-child(2){width:27%}
.official-document__table--baixa th:nth-child(3){width:18%}
.official-document__table--baixa th:nth-child(4){width:17%}
.official-document__table--baixa th:nth-child(5){width:22%}
.official-document--baixa .official-document__section--execution>h2{border-bottom:0;padding-bottom:0}
.official-document__signatures--baixa{grid-template-columns:1fr 1fr;width:min(145mm,100%);gap:18mm;margin:25mm auto 0}
@media(max-width:767px){.official-document__table--baixa{min-width:0}.official-document__signatures--baixa{grid-template-columns:1fr;width:100%;gap:18mm;margin-left:auto;margin-right:auto}}
@media print{.official-document--baixa .official-document__section--baixa-assets{overflow:visible!important}.official-document__table--baixa{width:100%!important;min-width:0!important;table-layout:fixed!important}.official-document__signatures--baixa{grid-template-columns:1fr 1fr!important;width:145mm!important;gap:18mm!important;margin:20mm auto 0!important}}

/* C6J.5.2 — correção definitiva do Termo de Baixa */
.official-document--baixa .official-document__section--execution .official-document__responsible,
.official-document--baixa .official-document__section--execution .official-document__asset {
  border-top: 0 !important;
}
.official-document--baixa .official-document__signatures.official-document__signatures--movement.official-document__signatures--baixa {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 72% !important;
  max-width: 145mm !important;
  gap: 18mm !important;
  margin: 25mm auto 0 !important;
  padding: 0 !important;
}
@media print {
  .official-document--baixa .official-document__section--execution .official-document__responsible,
  .official-document--baixa .official-document__section--execution .official-document__asset {
    border-top: 0 !important;
  }
  .official-document--baixa .official-document__signatures.official-document__signatures--movement.official-document__signatures--baixa {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 72% !important;
    max-width: 145mm !important;
    gap: 18mm !important;
    margin: 20mm auto 0 !important;
  }
}


/* C6J.6 — Relatórios e Consultas de Baixas Patrimoniais */
.baixa-report-filters{display:grid;grid-template-columns:minmax(15rem,2fr) repeat(5,minmax(8rem,1fr));gap:.65rem;align-items:end;margin:1rem 0}.baixa-report-actions{display:flex;gap:.45rem;grid-column:1/-1}.baixa-report-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.65rem;margin:1rem 0}.baixa-report-summary>div,.baixa-report-print-summary>div{border:1px solid var(--color-border);border-radius:var(--radius-sm);padding:.7rem;text-align:center;background:var(--color-background)}.baixa-report-summary span,.baixa-report-print-summary span{display:block;font-size:.7rem;color:var(--color-text-muted);font-weight:700;text-transform:uppercase}.baixa-report-summary strong,.baixa-report-print-summary strong{font-size:1.15rem}.baixa-report-table small{display:block;margin-top:.15rem;color:var(--color-text-muted)}.baixa-report-table tfoot td{font-size:.75rem}.baixa-report-print-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:2mm;margin:4mm 0}.baixa-report-print-summary>div{padding:2mm;border-color:#aaa}.baixa-report-print-summary span{font-size:7pt}.baixa-report-print-summary strong{font-size:11pt}.baixa-report-print-table{width:100%;table-layout:fixed;font-size:7.2pt}.baixa-report-print-table th,.baixa-report-print-table td{padding:1.6mm;overflow-wrap:anywhere;vertical-align:top}.baixa-report-print-table th:nth-child(1){width:9%}.baixa-report-print-table th:nth-child(2){width:14%}.baixa-report-print-table th:nth-child(3){width:14%}.baixa-report-print-table th:nth-child(4){width:24%}.baixa-report-print-table th:nth-child(5){width:11%}.baixa-report-print-table th:nth-child(6){width:17%}.baixa-report-print-table th:nth-child(7){width:11%}
@media(max-width:1200px){.baixa-report-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.baixa-report-search{grid-column:span 2}.baixa-report-summary{grid-template-columns:repeat(3,1fr)}}@media(max-width:767px){.baixa-report-filters{grid-template-columns:1fr}.baixa-report-search{grid-column:auto}.baixa-report-actions{flex-direction:column}.baixa-report-summary{grid-template-columns:repeat(2,1fr)}}
@media print{.official-document--baixa-report{max-width:none}.baixa-report-print-summary>div{background:#fff!important}.baixa-report-print-table{font-size:7pt}.baixa-report-print-table tr{break-inside:avoid;page-break-inside:avoid}}


/* C6K.1.1 — Indicadores da central de Dados Contábeis */
.accounting-indicators{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin:1rem 0}
.accounting-indicators>div{display:flex;align-items:center;justify-content:space-between;gap:.7rem;min-width:0;padding:.78rem .9rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface-soft)}
.accounting-indicators span{display:flex;align-items:center;gap:.42rem;min-width:0;color:var(--color-text-muted);font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.02em}
.accounting-indicators span i{color:var(--color-primary)}
.accounting-indicators strong{flex:0 0 auto;font-size:1.2rem;line-height:1;color:var(--color-text)}
@media(max-width:767px){.accounting-indicators{grid-template-columns:1fr}}

/* C6K.2 — Histórico de depreciação */
.accounting-history td,.accounting-history th{white-space:nowrap}.accounting-history td:nth-child(1){font-variant-numeric:tabular-nums}

/* C6K.4 — Relatórios contábeis */
.accounting-report-filters{display:grid;grid-template-columns:minmax(14rem,2fr) repeat(4,minmax(9rem,1fr));gap:.65rem;align-items:end;margin:1rem 0}.accounting-report-filters label span{display:block;margin-bottom:.25rem;font-size:.75rem;font-weight:700;color:var(--color-text-muted)}.accounting-report-search{grid-column:span 2}.accounting-report-actions{display:flex;gap:.45rem;grid-column:1/-1}.accounting-report-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.65rem;margin:1rem 0}.accounting-report-summary>div,.accounting-print-summary>div{border:1px solid var(--color-border);border-radius:var(--radius-sm);padding:.7rem;text-align:center;background:var(--color-background)}.accounting-report-summary span,.accounting-print-summary span{display:block;font-size:.68rem;color:var(--color-text-muted);font-weight:700;text-transform:uppercase}.accounting-report-summary strong,.accounting-print-summary strong{font-size:1.05rem}.accounting-report-table small{display:block;margin-top:.15rem;color:var(--color-text-muted)}.accounting-report-table tfoot td{font-size:.74rem}.accounting-report-accordion{margin-top:1rem}.accounting-print-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:2mm;margin:4mm 0}.accounting-print-summary>div{padding:2mm;border-color:#aaa}.accounting-print-summary span{font-size:6.5pt}.accounting-print-summary strong{font-size:9pt}.accounting-print-table{width:100%;table-layout:fixed;font-size:6.8pt}.accounting-print-table th,.accounting-print-table td{padding:1.4mm;overflow-wrap:anywhere;vertical-align:top}.accounting-print-table th:nth-child(1){width:20%}.accounting-print-table th:nth-child(2){width:18%}.accounting-print-table th:nth-child(3){width:6%}.accounting-print-table th:nth-child(4){width:12%}.accounting-print-table th:nth-child(5){width:12%}.accounting-print-table th:nth-child(6){width:12%}.accounting-print-table th:nth-child(7){width:12%}.accounting-print-table th:nth-child(8){width:8%}.accounting-print-group{width:100%;table-layout:fixed;font-size:7.2pt}.accounting-print-group th,.accounting-print-group td{padding:1.5mm;overflow-wrap:anywhere}
@media(max-width:1200px){.accounting-report-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.accounting-report-summary{grid-template-columns:repeat(3,1fr)}}@media(max-width:767px){.accounting-report-filters{grid-template-columns:1fr}.accounting-report-search{grid-column:auto}.accounting-report-actions{flex-direction:column}.accounting-report-summary{grid-template-columns:1fr 1fr}}
@media print{.official-document--accounting-report{max-width:none}.accounting-print-summary>div{background:#fff!important}.accounting-print-table tr,.accounting-print-group tr{break-inside:avoid;page-break-inside:avoid}}


/* =========================================================
   C6K.4.1 — ESPAÇAMENTO DAS SANFONAS EM DADOS CONTÁBEIS
   Mantém o espaçamento padrão quando a última seção do form
   é seguida por outra sanfona fora do formulário.
   ========================================================= */
.contabilidade-dados-form > .form-section:last-child {
    margin-bottom: 28px;
}


/* C6L.1 — QR Code e Etiquetagem Patrimonial */
.qr-label-workspace{display:flex;justify-content:center;padding:24px 0}.qr-label{width:420px;max-width:100%;border:2px solid var(--border-color,#cbd5e1);border-radius:14px;background:#fff;color:#111;padding:16px}.qr-label__heading{text-align:center;font-weight:800;letter-spacing:.08em;border-bottom:1px solid #d1d5db;padding-bottom:8px}.qr-label__body{display:flex;gap:16px;align-items:center;padding:14px 0}.sgpm-qr{width:150px;min-width:150px}.sgpm-qr svg{display:block;width:100%;height:auto}.qr-label__info{display:flex;flex-direction:column;gap:7px}.qr-label__info strong{font-size:1.15rem}.qr-label__footer{text-align:center;border-top:1px solid #d1d5db;padding-top:8px;font-size:.8rem}.qr-actions{justify-content:center;margin-bottom:24px}.qr-public-body{margin:0;background:#f1f5f9;font-family:Arial,sans-serif;color:#172033}.qr-public-main{max-width:760px;margin:0 auto;padding:28px 16px}.qr-public-card{background:#fff;border:1px solid #dbe2ea;border-radius:18px;padding:24px;box-shadow:0 12px 30px rgba(15,23,42,.08)}.qr-public-brand{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid #e5e7eb;padding-bottom:14px;margin-bottom:20px}.qr-public-brand strong{font-size:1.3rem}.qr-public-card h1{margin-bottom:6px}.qr-public-description{font-size:1.08rem}.qr-public-note{margin-top:20px;padding:12px;border-radius:10px;background:#f8fafc;font-size:.9rem;color:#475569}


/* C6L.2 — Configuração e personalização de etiquetas */
.label-config-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.label-config-wide{grid-column:1/-1}.checkbox-row{display:flex;align-items:center;gap:8px}.qr-label-workspace{overflow:auto}.qr-label{position:relative;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;gap:1.2mm 2mm;width:50mm;height:30mm;max-width:none;padding:2.2mm;border-radius:1.5mm;background:var(--label-bg,#fff);background-image:var(--label-bg-image,none);background-size:cover;background-position:center;color:#000;font-family:var(--label-font,Arial,sans-serif);overflow:hidden;box-shadow:0 8px 22px rgba(15,23,42,.12)}.qr-label--100x60{width:100mm;height:60mm;padding:4mm;gap:2.5mm 4mm;border-radius:2mm}.qr-label--bordered{border:.35mm solid #000}.qr-label--borderless{border:0}.qr-label__identity{grid-column:1;grid-row:1;display:flex;align-items:center;gap:1.5mm;min-width:0;z-index:1}.qr-label__logo{width:8mm;height:8mm;object-fit:contain;flex:0 0 auto}.qr-label--100x60 .qr-label__logo{width:16mm;height:16mm}.qr-label__entity{font-weight:800;font-size:7pt;line-height:1.05;text-transform:uppercase;overflow-wrap:anywhere}.qr-label--100x60 .qr-label__entity{font-size:15pt}.qr-label__patrimony{grid-column:1;grid-row:2;align-self:end;display:flex;flex-direction:column;z-index:1}.qr-label__patrimony span{font-size:5.5pt;font-weight:800}.qr-label__patrimony strong{font-family:'Arial Narrow',Arial,sans-serif;font-size:18pt;line-height:.95;letter-spacing:.4px;color:#000}.qr-label--100x60 .qr-label__patrimony span{font-size:11pt}.qr-label--100x60 .qr-label__patrimony strong{font-size:38pt}.qr-label__qrbox{grid-column:2;grid-row:1/3;align-self:center;justify-self:end;display:flex;align-items:center;justify-content:center;background:#fff;padding:1mm;z-index:2}.qr-label__qrbox .sgpm-qr{width:var(--qr-mm,18mm);height:var(--qr-mm,18mm);min-width:10mm;background:#fff}.qr-label__qrbox .sgpm-qr svg{display:block;width:100%;height:100%;shape-rendering:crispEdges}.qr-actions{align-items:center;gap:12px}.qr-actions small{max-width:440px;color:var(--color-text-muted)}
@media(max-width:900px){.label-config-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.label-config-grid{grid-template-columns:1fr}.label-config-wide{grid-column:auto}.qr-label-workspace{justify-content:flex-start}}


/* C6L.2.1 — padrão global e refinamentos do configurador */
.label-global-config-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;margin:0 0 22px;padding:16px 18px;border:1px solid var(--border-color,#dbe2ea);border-radius:12px;background:var(--surface-subtle,#f8fafc);color:inherit;text-decoration:none}.label-global-config-card:hover{border-color:var(--color-primary,#2563eb)}.label-global-config-card__icon{display:grid;place-items:center;width:42px;height:42px;border-radius:10px;background:rgba(37,99,235,.1);color:var(--color-primary,#2563eb);font-size:1.15rem}.label-global-config-card div:nth-child(2){display:flex;flex-direction:column;gap:3px}.label-global-config-card span{font-weight:600}.label-global-config-card small{color:var(--color-text-muted,#64748b)}.label-pattern-notice{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:20px;border:1px solid var(--border-color,#dbe2ea);border-radius:10px;background:var(--surface-subtle,#f8fafc)}.label-pattern-notice>div{display:grid;grid-template-columns:auto 1fr;gap:2px 9px;align-items:center}.label-pattern-notice>div>i{grid-row:1/3;color:var(--color-primary,#2563eb)}.label-pattern-notice span{grid-column:2;color:var(--color-text-muted,#64748b);font-size:.9rem}.label-settings-layout .form-section{margin-bottom:28px}.qr-label__entity{font-size:var(--entity-pt,7pt)!important}.qr-label__patrimony span{font-size:var(--patrimony-pt,5.5pt)!important}.qr-label__patrimony strong{font-size:var(--number-pt,18pt)!important}.qr-label--100x60 .qr-label__entity,.qr-label--100x60 .qr-label__patrimony span,.qr-label--100x60 .qr-label__patrimony strong{font-size:inherit}.qr-label--100x60 .qr-label__entity{font-size:var(--entity-pt,15pt)!important}.qr-label--100x60 .qr-label__patrimony span{font-size:var(--patrimony-pt,11pt)!important}.qr-label--100x60 .qr-label__patrimony strong{font-size:var(--number-pt,38pt)!important}.qr-label__qrbox{padding:.55mm}.qr-label{background-color:var(--label-bg,#F5F5F5)}
@media(max-width:700px){.label-pattern-notice{align-items:flex-start;flex-direction:column}.label-global-config-card{grid-template-columns:auto 1fr}.label-global-config-card>i:last-child{display:none}}

/* C6L.2.2 — Etiquetas: hierarquia, borda, impressão individual e folha A4 */
.qr-label--bordered{border:var(--border-mm,.35mm) solid var(--border-color,#000)!important}.qr-label__names{display:flex;flex-direction:column;min-width:0;line-height:1.02}.qr-label__secondary{font-size:var(--secondary-pt,5.5pt);font-weight:700;overflow-wrap:anywhere;margin-top:.45mm}.qr-label{padding:1.8mm}.qr-label--100x60{padding:3mm}.label-single-workspace{background:repeating-linear-gradient(45deg,#f8fafc,#f8fafc 8px,#f1f5f9 8px,#f1f5f9 16px);border:1px dashed var(--border-color,#cbd5e1);border-radius:10px;padding:18px}.label-copy-control{margin:0;min-width:210px}.label-copy-control input{max-width:120px}.copies-print-area{display:none}.table-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.inline-form{display:inline-flex}.btn[disabled]{opacity:.45;cursor:not-allowed}.a4-label-sheet{width:210mm;min-height:297mm;margin:0 auto;padding:10mm;box-sizing:border-box;display:grid;grid-template-columns:repeat(3,max-content);grid-auto-rows:max-content;gap:4mm;align-content:start;justify-content:center;background:#fff}.a4-label-slot{padding:0;margin:0;break-inside:avoid}.a4-label-slot .qr-label{box-shadow:none}


/* C6L.2.3 — estilos independentes dos textos e QR compacto */
.label-text-style{padding:10px 12px;border:1px solid var(--border-color,#dbe2ea);border-radius:10px;background:var(--surface-subtle,#f8fafc)}
.label-text-style>strong{display:block;margin-bottom:8px}.label-text-style__grid{display:grid;grid-template-columns:minmax(120px,.7fr) minmax(150px,1fr) auto auto;gap:12px;align-items:end}.label-text-style__grid .form-group{margin:0}.label-text-style__grid .checkbox-row{padding-bottom:9px}
.qr-label__entity{color:var(--entity-color,#000);text-align:var(--entity-align,left);font-weight:var(--entity-weight,700);font-style:var(--entity-style,normal);width:100%}
.qr-label__secondary{color:var(--secondary-color,#000);text-align:var(--secondary-align,left);font-weight:var(--secondary-weight,700);font-style:var(--secondary-style,normal);width:100%}
.qr-label__patrimony span{color:var(--patrimony-color,#000);text-align:var(--patrimony-align,left);font-weight:var(--patrimony-weight,700);font-style:var(--patrimony-style,normal);width:100%;display:block}
.qr-label__patrimony strong{color:var(--number-color,#000)!important;text-align:var(--number-align,left);font-weight:var(--number-weight,700);font-style:var(--number-style,normal);width:100%;display:block}
.qr-label__qrbox{padding:.30mm}
@media(max-width:800px){.label-text-style__grid{grid-template-columns:1fr 1fr}.label-text-style__grid .checkbox-row{padding-bottom:0}}


/* C6L.2.4 — Layout modular por contêineres e tarjas institucionais */
.qr-label{--stripe-v1:#172554;--stripe-v2:#22C55E;--stripe-h1:#172554;--stripe-h2:#22C55E;display:flex!important;flex-direction:column!important;gap:0!important;padding:1.25mm!important;isolation:isolate}
.qr-label--100x60{padding:2.5mm!important}
.qr-label__top,.qr-label__bottom{position:relative;z-index:2;display:grid;min-width:0;min-height:0}
.qr-label__top{grid-template-columns:minmax(8mm,28%) minmax(0,72%);align-items:center;flex:1 1 48%;padding:.55mm .65mm .45mm}
.qr-label__bottom{grid-template-columns:minmax(0,68%) minmax(10mm,32%);align-items:center;flex:1 1 52%;padding:.45mm .65mm .55mm}
.qr-label--100x60 .qr-label__top{grid-template-columns:minmax(16mm,28%) minmax(0,72%);padding:1.1mm 1.3mm .9mm}
.qr-label--100x60 .qr-label__bottom{grid-template-columns:minmax(0,70%) minmax(20mm,30%);padding:.9mm 1.3mm 1.1mm}
.qr-label__logo-cell{height:100%;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;padding:.35mm}
.qr-label__logo{width:auto!important;height:auto!important;max-width:100%;max-height:100%;object-fit:contain}
.qr-label__names{display:flex;flex-direction:column;justify-content:center;min-width:0;height:100%;padding:0 .55mm;overflow:hidden}
.qr-label__entity,.qr-label__secondary{width:100%;color:var(--entity-color,#000);text-align:var(--entity-align,left);font-weight:var(--entity-weight,700);font-style:var(--entity-style,normal);line-height:1.03;overflow-wrap:anywhere}
.qr-label__secondary{color:var(--secondary-color,#000);text-align:var(--secondary-align,left);font-weight:var(--secondary-weight,700);font-style:var(--secondary-style,normal);margin-top:.35mm}
.qr-label__patrimony{display:flex!important;flex-direction:column;justify-content:center;align-self:stretch!important;min-width:0;padding:0 .55mm;z-index:2}
.qr-label__patrimony span,.qr-label__patrimony strong{display:block;width:100%;color:var(--patrimony-color,#000);text-align:var(--patrimony-align,left);font-weight:var(--patrimony-weight,700);font-style:var(--patrimony-style,normal)}
.qr-label__patrimony strong{color:var(--number-color,#000);text-align:var(--number-align,left);font-weight:var(--number-weight,700);font-style:var(--number-style,normal)}
.qr-label__qrbox{display:flex!important;align-items:center;justify-content:center;align-self:stretch!important;justify-self:stretch!important;background:transparent!important;padding:.15mm!important;z-index:2;min-width:0;min-height:0}
.qr-label__qrbox .sgpm-qr{background:#fff;padding:.12mm;box-sizing:border-box;max-width:100%;max-height:100%;aspect-ratio:1/1}
.qr-label__stripe-v,.qr-label__stripe-h{display:none;position:absolute;z-index:3;pointer-events:none;overflow:hidden}
.qr-label--vstripe .qr-label__stripe-v{display:flex;flex-direction:column;top:0;bottom:0;width:1.8mm}
.qr-label--100x60.qr-label--vstripe .qr-label__stripe-v{width:3.2mm}
.qr-label--vstripe-left .qr-label__stripe-v{left:0}.qr-label--vstripe-right .qr-label__stripe-v{right:0}
.qr-label__stripe-v i{display:block;flex:1}.qr-label__stripe-v i:first-child{background:var(--stripe-v1)}.qr-label__stripe-v i:last-child{background:var(--stripe-v2)}
.qr-label--vstripe-left{padding-left:2.55mm!important}.qr-label--vstripe-right{padding-right:2.55mm!important}
.qr-label--100x60.qr-label--vstripe-left{padding-left:4.5mm!important}.qr-label--100x60.qr-label--vstripe-right{padding-right:4.5mm!important}
.qr-label--hstripe .qr-label__stripe-h{display:flex;left:0;right:0;top:0;height:1.45mm}
.qr-label--100x60.qr-label--hstripe .qr-label__stripe-h{height:2.6mm}
.qr-label__stripe-h i{display:block;flex:1}.qr-label__stripe-h i:first-child{background:var(--stripe-h1)}.qr-label__stripe-h i:last-child{background:var(--stripe-h2)}
.qr-label--hstripe{padding-top:2.15mm!important}.qr-label--100x60.qr-label--hstripe{padding-top:3.8mm!important}
.qr-label--hstripe.qr-label--vstripe .qr-label__stripe-h{z-index:4}
.label-layout-options{padding:14px;border:1px solid var(--border-color,#dbe2ea);border-radius:10px;background:var(--surface-subtle,#f8fafc)}
.label-layout-options>strong{display:block;margin-bottom:4px}


/* C6L.2.5 — configurador compacto, tarja inferior e fluxo A4 */
.label-config-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 14px}
.label-text-style__grid--compact{grid-template-columns:minmax(90px,.55fr) minmax(80px,.45fr) minmax(150px,1fr) auto auto}
.label-text-style__grid--compact .checkbox-row{white-space:nowrap}
.qr-label{--stripe-b1:#172554;--stripe-b2:#22C55E}
.qr-label__stripe-b{display:none;position:absolute;z-index:3;pointer-events:none;overflow:hidden}
.qr-label--bstripe .qr-label__stripe-b{display:flex;left:0;right:0;bottom:0;height:1.45mm}
.qr-label--100x60.qr-label--bstripe .qr-label__stripe-b{height:2.6mm}
.qr-label__stripe-b i{display:block;flex:1}.qr-label__stripe-b i:first-child{background:var(--stripe-b1)}.qr-label__stripe-b i:last-child{background:var(--stripe-b2)}
.qr-label--bstripe{padding-bottom:2.15mm!important}.qr-label--100x60.qr-label--bstripe{padding-bottom:3.8mm!important}
.qr-label--bstripe.qr-label--vstripe .qr-label__stripe-b{z-index:4}
.a4-label-page .page-header{display:flex!important}
.a4-label-page .a4-label-sheet{display:grid!important}
@media(max-width:900px){.label-text-style__grid--compact{grid-template-columns:1fr 1fr 1.2fr}.label-text-style__grid--compact .checkbox-row{padding-bottom:0}}
@media(max-width:620px){.label-text-style__grid--compact{grid-template-columns:1fr 1fr}.label-config-grid{grid-template-columns:1fr}}


/* C6L.2.5.2 — tarja inferior usa exatamente o mesmo grid da tarja superior */

/* C6L.2.5.3 - blocos horizontais independentes */
.tarja-horizontal-block{display:block;width:100%;}
.tarja-horizontal-block+.tarja-horizontal-block{margin-top:2px;}
.tarja-horizontal-colors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:12px;}
@media(max-width:620px){.tarja-horizontal-colors{grid-template-columns:1fr;}}

/* =========================================================
   QR CODE / ETIQUETAS — CENTRAL (C6L.2.6.1)
   Padronização visual conforme as tabelas do SGPM.
   ========================================================= */
.qr-label-table-wrap {
    margin-top: 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}
.qr-label-table { margin: 0; }
.qr-label-table th:nth-child(1) { width: 13%; }
.qr-label-table th:nth-child(2) { width: 31%; }
.qr-label-table th:nth-child(3) { width: 17%; }
.qr-label-table th:nth-child(4) { width: 16%; }
.qr-label-table th:nth-child(5) { width: 23%; }
.qr-label-patrimonio { font-size: .82rem; letter-spacing: .025em; }
.qr-label-description { font-weight: 600; color: var(--color-text); }
.qr-label-status,
.qr-label-version {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    width: fit-content;
    padding: .24rem .5rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}
.qr-label-status { text-transform: uppercase; }
.qr-label-status--active { background: #dcfae6; color: #166534; }
.qr-label-status--warning { background: #fffaeb; color: #b54708; }
.qr-label-status--danger { background: #fee4e2; color: #912018; }
.qr-label-status--muted { background: #eef2f6; color: #475467; }
.qr-label-status--neutral { background: #eef4ff; color: #1d4ed8; }
.qr-label-version { background: var(--color-background); border: 1px solid var(--color-border); color: var(--color-primary-dark); }
.qr-label-version--pending { color: var(--color-text-muted); font-weight: 700; }
.qr-label-actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.qr-label-actions .inline-form { margin: 0; }
.qr-label-empty { margin-top: 14px; }

[data-theme="dark"] .qr-label-status--active { background: #163c2b; color: #a6f4c5; }
[data-theme="dark"] .qr-label-status--warning { background: #473713; color: #fedf89; }
[data-theme="dark"] .qr-label-status--danger { background: #4a2020; color: #fecdca; }
[data-theme="dark"] .qr-label-status--muted { background: #273142; color: #d0d5dd; }
[data-theme="dark"] .qr-label-status--neutral { background: #243451; color: #bfdbfe; }

@media (max-width: 760px) {
    .qr-label-table { min-width: 760px; }
}

/* C6L.2.6.3 — Grade física fixa para impressão de cópias da mesma etiqueta */


/* C6L.2.6.4 — Margem vertical de segurança em todas as páginas A4 de cópias */




/* =========================================================
   QR CODE / ETIQUETAS — HISTÓRICO DE IDENTIFICAÇÕES (C6L.2.6.5)
   Mantém o mesmo padrão visual das tabelas consolidadas do SGPM.
   ========================================================= */
.qr-history-table-wrap {
    margin-top: 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}
.qr-history-table { margin: 0; }
.qr-history-table th:nth-child(1) { width: 10%; }
.qr-history-table th:nth-child(2) { width: 22%; }
.qr-history-table th:nth-child(3) { width: 16%; }
.qr-history-table th:nth-child(4) { width: 22%; }
.qr-history-table th:nth-child(5) { width: 30%; }
.qr-history-version {
    color: var(--color-primary-dark);
    font-size: .78rem;
    letter-spacing: .02em;
}
.qr-history-status {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    width: fit-content;
    padding: .24rem .5rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}
.qr-history-status--active { background: #dcfae6; color: #166534; }
.qr-history-status--danger { background: #fee4e2; color: #912018; }
.qr-history-status--muted { background: #eef2f6; color: #475467; }
.qr-history-reason { overflow-wrap: anywhere; }
[data-theme="dark"] .qr-history-status--active { background: #163c2b; color: #a6f4c5; }
[data-theme="dark"] .qr-history-status--danger { background: #4a2020; color: #fecdca; }
[data-theme="dark"] .qr-history-status--muted { background: #273142; color: #d0d5dd; }
@media (max-width: 760px) {
    .qr-history-table { min-width: 720px; }
}

/* C6L.3 — Consulta Patrimonial Pública */
.qr-public-body{min-height:100vh;background:linear-gradient(180deg,#eef4fb 0,#f8fafc 100%);color:#142033}
.qr-public-main{max-width:820px;margin:0 auto;padding:28px 16px 40px}
.qr-public-shell{display:grid;gap:18px}.qr-public-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.qr-public-mark{display:flex;align-items:center;gap:12px}.qr-public-mark__icon{display:grid;place-items:center;width:54px;height:54px;border-radius:14px;background:#1f56d8;color:#fff;font-weight:800;font-size:.82rem;letter-spacing:.03em}.qr-public-mark strong,.qr-public-mark small{display:block}.qr-public-mark strong{font-size:1.05rem}.qr-public-mark small{margin-top:3px;color:#64748b}.qr-public-verified{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border-radius:999px;background:#eaf8ef;color:#16743a;font-size:.85rem;font-weight:700}.qr-public-verified span{display:grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#1c8b4c;color:#fff}.qr-public-card{background:#fff;border:1px solid #dbe4ef;border-radius:18px;padding:26px;box-shadow:0 14px 34px rgba(15,23,42,.07)}.qr-public-hero{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding-bottom:22px;border-bottom:1px solid #e6ebf2}.qr-public-kicker{font-size:.74rem;font-weight:800;letter-spacing:.08em;color:#64748b}.qr-public-hero h1{font-size:2.25rem;line-height:1;margin:6px 0 9px;color:#10224a}.qr-public-hero p{margin:0;font-size:1.08rem}.qr-public-status{min-width:180px;padding:12px 14px;border-radius:12px;background:#f4f7fb}.qr-public-status span,.qr-public-grid span,.qr-public-reference span{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.055em;color:#64748b;font-weight:700;margin-bottom:5px}.qr-public-status strong{color:#1f56d8}.qr-public-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:#e5eaf1;margin:20px 0;border:1px solid #e5eaf1;border-radius:12px;overflow:hidden}.qr-public-grid>div{background:#fff;padding:13px 14px;min-width:0}.qr-public-grid__wide{grid-column:1/-1}.qr-public-grid strong{font-size:.92rem;overflow-wrap:anywhere}.qr-public-privacy{padding:14px 16px;border-radius:12px;background:#f5f8fc;border-left:4px solid #1f56d8}.qr-public-privacy strong{color:#173d91}.qr-public-privacy p{margin:5px 0 0;color:#5c697a;font-size:.88rem;line-height:1.5}.qr-public-card--inactive{text-align:center;padding:38px 28px}.qr-public-inactive-icon{display:grid;place-items:center;margin:0 auto 15px;width:58px;height:58px;border-radius:50%;background:#fff3df;color:#a55a00;border:1px solid #f2d3a4;font-size:1.6rem;font-weight:800}.qr-public-card--inactive h1{font-size:1.5rem;margin:0 0 10px}.qr-public-card--inactive>p{max-width:620px;margin:0 auto;color:#5f6b7a;line-height:1.6}.qr-public-reference{max-width:420px;margin:22px auto 0;padding:12px;border-radius:10px;background:#f6f8fb}.qr-public-footer{text-align:center;color:#7b8796;font-size:.78rem;padding-top:2px}@media(max-width:620px){.qr-public-main{padding:18px 12px 30px}.qr-public-header{align-items:flex-start}.qr-public-verified{font-size:0;width:36px;height:36px;padding:8px;justify-content:center}.qr-public-verified span{font-size:.85rem}.qr-public-card{padding:18px}.qr-public-hero{display:block}.qr-public-status{margin-top:16px}.qr-public-grid{grid-template-columns:1fr}.qr-public-grid__wide{grid-column:auto}.qr-public-hero h1{font-size:1.9rem}}

/* C6L.3.1 — Fotos do Bem e galeria pública controlada */
.bem-photo-warning{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:1rem}.bem-photo-upload{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,1.4fr);gap:.8rem 1rem;align-items:end;margin-bottom:1rem}.bem-photo-upload>label,.bem-photo-upload>div:last-child{align-self:center}.checkbox-inline{display:inline-flex;align-items:center;gap:.4rem;margin-right:1rem}.bem-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:1rem;margin-top:1rem}.bem-photo-card{border:1px solid var(--border-color,#d9e0ea);border-radius:12px;padding:.75rem;background:var(--surface,#fff);display:flex;flex-direction:column;gap:.7rem}.bem-photo-card>img{width:100%;height:170px;object-fit:cover;border-radius:8px;background:#eef2f7}.bem-photo-card form{display:flex;flex-wrap:wrap;gap:.55rem;align-items:center}.bem-photo-card form input[type=text]{flex:1 1 100%;min-width:0}.public-photo-section{margin-top:1rem;padding-top:1rem;border-top:1px solid #e3e8ef}.public-photo-heading{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:.8rem}.public-photo-heading span{display:block;font-size:.72rem;letter-spacing:.08em;font-weight:800;color:#65758b}.public-photo-heading h2{font-size:1.05rem;margin:.18rem 0 0;color:#15233c}.public-photo-heading small{color:#68778b}.public-photo-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.public-photo-gallery--single{grid-template-columns:1fr}.public-photo-item{position:relative;display:block;overflow:hidden;border-radius:10px;border:1px solid #dbe2eb;background:#eef2f7;text-decoration:none}.public-photo-item img{display:block;width:100%;height:190px;object-fit:cover}.public-photo-gallery--single .public-photo-item img{height:min(360px,42vw)}.public-photo-badge{position:absolute;top:.55rem;left:.55rem;padding:.28rem .5rem;border-radius:999px;background:rgba(21,35,60,.88);color:#fff;font-size:.72rem;font-weight:700}.public-photo-caption{display:block;padding:.55rem .7rem;color:#26354b;background:#fff;font-size:.82rem}.public-photo-help{margin:.65rem 0 0;color:#68778b;font-size:.78rem}.public-photo-help i{margin-right:.3rem}@media(max-width:700px){.bem-photo-upload{grid-template-columns:1fr}.public-photo-gallery{grid-template-columns:1fr}.public-photo-item img,.public-photo-gallery--single .public-photo-item img{height:auto;max-height:420px;object-fit:contain}.public-photo-heading{align-items:flex-start;flex-direction:column;gap:.2rem}}

/* C6M.1 — Dashboard patrimonial gerencial */
.dashboard-page-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.dashboard-header-actions{display:flex;gap:.6rem;flex-wrap:wrap}.dashboard-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin-bottom:1rem}.dashboard-summary-card{display:flex;gap:.9rem;align-items:center;padding:1rem;border:1px solid var(--color-border);border-radius:12px;background:var(--color-surface,#fff);min-width:0}.dashboard-summary-icon{width:42px;height:42px;flex:0 0 42px;border-radius:10px;display:grid;place-items:center;background:var(--color-primary-soft,#eef4ff);color:var(--color-primary)}.dashboard-summary-card>div{min-width:0}.dashboard-summary-card span:not(.dashboard-summary-icon){display:block;color:var(--color-text-muted);font-size:.75rem;font-weight:700}.dashboard-summary-card strong{display:block;font-size:1.65rem;line-height:1.1;margin:.18rem 0}.dashboard-summary-card small{display:block;color:var(--color-text-muted);font-size:.68rem;line-height:1.3}.dashboard-content-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:1rem;margin-bottom:1rem}.dashboard-panel{border:1px solid var(--color-border);border-radius:12px;background:var(--color-surface,#fff);padding:1rem}.dashboard-panel__header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:.85rem}.dashboard-panel__header h2{font-size:1rem;margin:.12rem 0 0}.dashboard-panel__header>a{font-size:.78rem;font-weight:700;color:var(--color-primary-dark);text-decoration:none}.dashboard-panel__eyebrow{font-size:.66rem;letter-spacing:.07em;font-weight:800;color:var(--color-text-muted)}.dashboard-pending-list{display:grid;gap:.45rem}.dashboard-pending-item{display:grid;grid-template-columns:1fr auto 14px;gap:.7rem;align-items:center;padding:.72rem .75rem;border:1px solid var(--color-border);border-radius:9px;text-decoration:none;color:var(--color-text)}.dashboard-pending-item:hover{border-color:var(--color-primary);background:var(--color-primary-soft,#f5f8ff)}.dashboard-pending-item>span{font-size:.78rem;font-weight:700}.dashboard-pending-item>span i{margin-right:.35rem;color:var(--color-primary)}.dashboard-pending-item>strong{font-size:.95rem}.dashboard-pending-item>i{font-size:.7rem;color:var(--color-text-muted)}.dashboard-panel__note{margin:.75rem 0 0;color:var(--color-text-muted);font-size:.7rem;line-height:1.45}.dashboard-panel__note i{margin-right:.3rem}.dashboard-status-list{display:grid;gap:.7rem}.dashboard-status-row{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(100px,1fr) 52px;gap:.65rem;align-items:center}.dashboard-status-row>div:first-child strong,.dashboard-status-row>div:first-child span{display:block}.dashboard-status-row>div:first-child strong{font-size:.76rem}.dashboard-status-row>div:first-child span{font-size:.66rem;color:var(--color-text-muted);margin-top:.08rem}.dashboard-status-track{height:7px;border-radius:999px;background:var(--color-background);overflow:hidden}.dashboard-status-track>span{display:block;height:100%;border-radius:inherit;background:var(--color-primary)}.dashboard-status-row>b{text-align:right;font-size:.7rem;color:var(--color-text-muted)}.dashboard-recent-panel{margin-bottom:1rem}.dashboard-table-wrap{border:1px solid var(--color-border);border-radius:10px;overflow:auto}.dashboard-table{margin:0}.dashboard-table td{font-size:.72rem}.dashboard-status-badge{display:inline-flex;padding:.23rem .48rem;border-radius:999px;background:var(--color-primary-soft,#eef4ff);color:var(--color-primary-dark);font-size:.65rem;font-weight:800;white-space:nowrap}@media(max-width:1100px){.dashboard-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-content-grid{grid-template-columns:1fr}}@media(max-width:680px){.dashboard-page-header{display:block}.dashboard-header-actions{margin-top:.8rem}.dashboard-summary-grid{grid-template-columns:1fr}.dashboard-status-row{grid-template-columns:1fr 50px}.dashboard-status-track{grid-column:1/2;grid-row:2}.dashboard-status-row>b{grid-column:2;grid-row:2}.dashboard-table{min-width:760px}}


/* =========================================================
   C6M.1.1 — AÇÕES DO DASHBOARD PATRIMONIAL
   Mantém os links de ação no mesmo padrão visual do SGPM.
   ========================================================= */
.dashboard-header-actions .btn{min-height:38px}
.dashboard-btn-secondary{background:var(--color-surface,#fff);color:var(--color-primary);border-color:var(--color-primary);box-shadow:none}
.dashboard-btn-secondary:hover{background:var(--color-primary-soft,#eef4ff);color:var(--color-primary-dark);border-color:var(--color-primary-dark)}
.dashboard-panel-link{display:inline-flex;align-items:center;gap:.38rem;min-height:32px;padding:.35rem .65rem;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-surface,#fff);color:var(--color-primary)!important;text-decoration:none!important;font-size:.75rem!important;font-weight:700!important;white-space:nowrap}
.dashboard-panel-link:hover{border-color:var(--color-primary);background:var(--color-primary-soft,#eef4ff);color:var(--color-primary-dark)!important}
.dashboard-table td:last-child,.dashboard-table th:last-child{text-align:center}
.dashboard-table td:last-child .btn{min-width:72px}
@media(max-width:680px){.dashboard-header-actions .btn{flex:1 1 auto}.dashboard-panel__header{align-items:center}}

/* C6M.2 — Central de Relatórios e Consulta Patrimonial */
.report-hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:20px}.report-hub-card{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:14px;padding:18px;border:1px solid var(--border-color,#dfe5ee);border-radius:12px;background:var(--surface,#fff);color:inherit;text-decoration:none;transition:.18s ease}.report-hub-card:hover{transform:translateY(-1px);border-color:var(--primary,#2457d6);box-shadow:0 6px 18px rgba(15,23,42,.07)}.report-hub-card>i:first-child{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:rgba(37,87,214,.09);color:var(--primary,#2457d6);font-size:18px}.report-hub-card div{display:grid;gap:4px}.report-hub-card strong{font-size:1rem}.report-hub-card span{font-size:.88rem;color:var(--text-muted,#667085);line-height:1.35}.report-hub-card>i:last-child{color:var(--text-muted,#667085)}.report-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0;padding:16px;border:1px solid var(--border-color,#dfe5ee);border-radius:12px;background:var(--surface-subtle,#f8fafc)}.report-filter-grid label{display:grid;gap:6px;font-size:.85rem;font-weight:600}.report-filter-grid input,.report-filter-grid select{width:100%}.report-filter-actions{display:flex;align-items:end;gap:8px;grid-column:span 2}.empty-table-cell{text-align:center;padding:28px!important;color:var(--text-muted,#667085)}@media(max-width:980px){.report-hub-grid{grid-template-columns:1fr}.report-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.report-filter-grid{grid-template-columns:1fr}.report-filter-actions{grid-column:auto;flex-wrap:wrap}}

/* C6M.2.1 — acabamento do Relatório Geral do Patrimônio */
.report-patrimony-summary{grid-template-columns:repeat(4,minmax(0,1fr));}
.report-patrimony-table{width:100%;table-layout:auto;}
.report-patrimony-table th,.report-patrimony-table td{vertical-align:middle;}
.report-patrimony-table td:last-child,.report-patrimony-table th:last-child{text-align:center;white-space:nowrap;}
@media(max-width:900px){.report-patrimony-summary{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:560px){.report-patrimony-summary{grid-template-columns:1fr;}}

/* =========================================================
   SIDEBAR — AGRUPAMENTO FUNCIONAL (2026-09)
   Mantém as áreas do SGPM visualmente separadas sem criar
   submenus ou cliques adicionais.
   ========================================================= */
.sidebar-section--first {
    margin-top: 0;
}

.sidebar-section + .sidebar-section {
    padding-top: 7px;
    border-top: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
}

.sidebar-section__title {
    line-height: 1.2;
    white-space: normal;
}

@media (min-width: 769px) {
    .app-sidebar.is-collapsed .sidebar-section + .sidebar-section {
        padding-top: 6px;
        border-top-color: var(--color-border);
    }
}

/* =========================================================
   SIDEBAR — CABEÇALHOS DE ÁREA EM DESTAQUE (C6M.6.1)
   Faixa institucional para identificação imediata das áreas.
   ========================================================= */
.sidebar-section__title {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 5px;
    padding: 6px 9px;
    border-radius: 4px;
    background: #dedede;
    color: #333333;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.sidebar-section + .sidebar-section {
    padding-top: 5px;
    border-top: 0;
}

@media (min-width: 769px) {
    .app-sidebar.is-collapsed .sidebar-section__title {
        display: none;
    }

    .app-sidebar.is-collapsed .sidebar-section + .sidebar-section {
        padding-top: 3px;
        border-top: 0;
    }
}

/* C6M.13 — consolidação visual da Central de Relatórios */
.report-hub .page-header{align-items:center;gap:20px}.report-hub-overview{display:flex;align-items:baseline;gap:7px;flex:0 0 auto;padding:10px 14px;border:1px solid var(--border-color,#dfe5ee);border-radius:10px;background:var(--surface-subtle,#f8fafc);color:var(--text-muted,#667085);white-space:nowrap}.report-hub-overview strong{font-size:1.15rem;color:var(--primary,#2457d6)}.report-hub-overview span{font-size:.84rem;font-weight:600}.report-hub-section{margin-top:24px}.report-hub-section__title{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;margin-bottom:12px;border-radius:7px;background:#dedede;color:#333}.report-hub-section__title>i{display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;color:#4b5563}.report-hub-section__title>div{display:grid;gap:1px}.report-hub-section__title strong{font-size:.9rem;letter-spacing:.025em;text-transform:uppercase}.report-hub-section__title span{font-size:.78rem;font-weight:500;color:#555;line-height:1.3}.report-hub-section .report-hub-grid{margin-top:0}.report-hub-section .report-hub-card{min-height:92px}
[data-theme="dark"] .report-hub-section__title,.theme-dark .report-hub-section__title{background:#3f4650;color:#fff}[data-theme="dark"] .report-hub-section__title>i,[data-theme="dark"] .report-hub-section__title span,.theme-dark .report-hub-section__title>i,.theme-dark .report-hub-section__title span{color:#eef2f7}
@media(max-width:760px){.report-hub .page-header{align-items:flex-start;flex-direction:column}.report-hub-overview{align-self:flex-start}.report-hub-section__title{align-items:flex-start}.report-hub-section__title span{font-size:.75rem}}

/* C6N.1.1.1 — Cabeçalho de Entidades/Fundos e Exercícios */
.contexto-admin-page-header > div:first-child{min-width:0;flex:1 1 auto}
.contexto-admin-page-header .contexto-admin-header-actions{flex:0 0 auto;flex-wrap:nowrap;align-items:center;white-space:nowrap}
@media(max-width:900px){
  .contexto-admin-page-header{flex-wrap:wrap}
  .contexto-admin-page-header .contexto-admin-header-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}
}
@media(max-width:680px){
  .contexto-admin-page-header .contexto-admin-header-actions{display:grid;grid-template-columns:1fr;white-space:normal}
}

/* =========================================================
   HEADER — CONTEXTO DO USUÁRIO LOGADO
   ========================================================= */
.app-header__brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-header__context {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-user-block {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.header-user {
    align-items: center;
    text-decoration: none;
    justify-content: flex-start;
    min-width: 0;
    max-width: 320px;
}

.header-user__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.header-user__name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-user__meta {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    line-height: 1.2;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.header-logout-form {
    display: inline-flex;
}

/* =========================================================
   AUTENTICAÇÃO — TELA DE LOGIN
   ========================================================= */
.auth-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.14), transparent 32%),
        radial-gradient(circle at bottom right, rgba(30, 58, 138, 0.10), transparent 30%),
        linear-gradient(135deg, #f4f7fb 0%, #edf2f7 100%);
    color: var(--color-text);
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
}

.auth-shell {
    width: 100%;
    max-width: 1280px;
}

.auth-card--login {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 1fr);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    backdrop-filter: blur(6px);
}

.auth-panel {
    position: relative;
    padding: 32px;
}

.auth-panel--brand {
    display: flex;
    flex-direction: column;
    gap: 28px;
    background:
        linear-gradient(160deg, rgba(29, 78, 216, 0.98) 0%, rgba(30, 64, 175, 0.94) 42%, rgba(15, 23, 42, 0.96) 100%);
    color: #ffffff;
}

.auth-brand-topbar {
    display: flex;
    justify-content: flex-end;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-brand {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.auth-brand__logo {
    width: 82px;
    height: 82px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-brand__logo svg {
    width: 58px;
    height: 58px;
}

.auth-brand__eyebrow,
.auth-form__eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: currentColor;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
}

.auth-brand__title,
.auth-form__title {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 2vw, 2.55rem);
    line-height: 1.1;
}

.auth-brand__description,
.auth-form__subtitle {
    margin: 0;
    line-height: 1.65;
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.84);
}

.auth-brand__highlights {
    display: grid;
    gap: 14px;
    margin-top: auto;
}

.auth-highlight {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-highlight i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-highlight strong,
.auth-highlight span {
    display: block;
}

.auth-highlight strong {
    margin-bottom: 4px;
    font-size: 0.94rem;
}

.auth-highlight span {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.8);
}

.auth-panel--form {
    background: rgba(255, 255, 255, 0.96);
}

.auth-form__header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}

.auth-form__subtitle {
    color: var(--color-text-muted);
}

.auth-form__illustration {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-form__illustration > span,
.auth-identity-card__avatar {
    width: 96px;
    height: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(29, 78, 216, 0.10) 0%, rgba(29, 78, 216, 0.18) 100%);
    color: var(--color-primary);
    border: 1px solid rgba(29, 78, 216, 0.16);
    font-size: 2.4rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 18px 20px;
}

.auth-form__field {
    margin-bottom: 0;
}

.auth-form__field--full {
    grid-column: 1 / -1;
}

.auth-form__field--wide {
    grid-column: 1;
}

.auth-form__field--icon-card {
    grid-column: 2;
    grid-row: 2 / span 2;
}

.auth-form__field--narrow {
    grid-column: 1;
    max-width: 240px;
}

.auth-field-with-icon {
    position: relative;
}

.auth-field-with-icon .form-control {
    min-height: 52px;
    padding-right: 46px;
    border-radius: 14px;
}

.auth-field-with-icon--readonly .form-control {
    background: #f8fafc;
    cursor: default;
}

.auth-field-icon,
.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--color-text-muted);
}

.auth-password-toggle {
    background: transparent;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    background: rgba(29, 78, 216, 0.08);
    color: var(--color-primary);
    outline: none;
}

.auth-identity-card {
    height: 100%;
    min-height: 154px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 16px;
    text-align: center;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
}

.auth-identity-card__avatar {
    width: 74px;
    height: 74px;
    border-radius: 18px;
    font-size: 1.8rem;
}

.auth-identity-card strong {
    font-size: 0.9rem;
}

.auth-identity-card small {
    color: var(--color-text-muted);
    line-height: 1.4;
}

.auth-first-access-actions {
    margin: -6px 0 8px;
}

.auth-form__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 4px;
}

.btn-lg {
    min-height: 48px;
    padding: 0 18px;
}

[data-theme="dark"] .auth-page {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 28%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.08), transparent 26%),
        linear-gradient(135deg, #0f172a 0%, #111827 100%);
}

[data-theme="dark"] .auth-card--login,
[data-theme="dark"] .auth-panel--form {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(71, 85, 105, 0.42);
}

[data-theme="dark"] .auth-form__subtitle,
[data-theme="dark"] .auth-identity-card small {
    color: #94a3b8;
}

[data-theme="dark"] .auth-identity-card,
[data-theme="dark"] .auth-field-with-icon--readonly .form-control {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(71, 85, 105, 0.42);
}

@media (max-width: 1080px) {
    .auth-card--login {
        grid-template-columns: 1fr;
    }

    .auth-panel--brand {
        order: 2;
    }

    .auth-panel--form {
        order: 1;
    }
}

@media (max-width: 820px) {

    .auth-form__grid {
        grid-template-columns: 1fr;
    }

    .auth-form__field--icon-card,
    .auth-form__field--narrow,
    .auth-form__field--wide,
    .auth-form__field--full {
        grid-column: auto;
        grid-row: auto;
        max-width: none;
    }

    .auth-identity-card {
        min-height: 0;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    .auth-identity-card__avatar {
        flex-shrink: 0;
    }
}

@media (max-width: 640px) {
    .auth-main {
        padding: 18px 12px;
    }

    .auth-panel {
        padding: 22px 18px;
    }

    .auth-brand,
    .auth-form__header {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-form__actions,
    .auth-first-access-actions .btn {
        width: 100%;
    }

    .auth-form__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .app-header__context,
    .header-user__meta {
        display: none;
    }
}

/* =========================================================
   C6N.1.3.2 — LOGIN: LINKS DE AJUDA E RECUPERAÇÃO
   ========================================================= */
.auth-field-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
    font-size: 0.82rem;
}

.auth-field-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-field-links a:hover,
.auth-field-links a:focus-visible {
    text-decoration: underline;
}

.auth-field-links > span {
    color: var(--color-text-muted);
}

.auth-shell--compact {
    max-width: 720px;
}

.auth-recovery-card {
    padding: 42px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.13);
}

.auth-recovery-card__icon {
    width: 68px;
    height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 20px;
    background: var(--color-hover);
    color: var(--color-primary);
    font-size: 1.7rem;
}

.auth-recovery-card h1 {
    margin: 0 0 12px;
    color: var(--color-text);
    font-size: 2rem;
}

.auth-recovery-card > p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.auth-recovery-info {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.auth-recovery-info > div {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-background);
}

.auth-recovery-info i {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--color-hover);
    color: var(--color-primary);
}

.auth-recovery-info span {
    color: var(--color-text-muted);
    line-height: 1.5;
}

.auth-recovery-info strong {
    display: block;
    margin-bottom: 2px;
    color: var(--color-text);
}

.auth-recovery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

[data-theme="dark"] .auth-recovery-card {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(71, 85, 105, 0.42);
}

@media (max-width: 640px) {
    .auth-field-links {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-field-links > span {
        display: none;
    }

    .auth-recovery-card {
        padding: 28px 20px;
    }

    .auth-recovery-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   C6N.1.3.3 — LOGIN COMPACTO + IDENTIDADE SGPM
   ========================================================= */
.auth-page {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
}

.auth-main {
    height: 100svh;
    min-height: 0;
    padding: 14px 18px;
    overflow: hidden;
}

.auth-shell {
    max-width: 1320px;
    max-height: 100%;
}

.auth-card--login {
    height: min(820px, calc(100svh - 28px));
    min-height: 650px;
}

.auth-panel {
    min-height: 0;
    padding: 26px 30px;
}

.auth-panel--brand {
    gap: 18px;
}

.auth-brand-topbar {
    min-height: 34px;
}

.auth-brand {
    gap: 16px;
}

.auth-brand__logo {
    width: 76px;
    height: 76px;
    padding: 10px;
}

.auth-brand__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-brand__eyebrow {
    color: #dbeafe;
}

.auth-brand__title {
    color: #f8fafc;
    font-size: clamp(1.75rem, 2vw, 2.3rem);
    text-shadow: 0 1px 0 rgba(15, 23, 42, 0.14);
}

.auth-brand__description {
    color: rgba(239, 246, 255, 0.92);
    font-size: 0.93rem;
    line-height: 1.5;
}

.auth-brand__highlights {
    gap: 10px;
}

.auth-highlight {
    padding: 12px 15px;
    border-radius: 15px;
}

.auth-highlight i {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.auth-highlight strong {
    font-size: 0.9rem;
}

.auth-highlight span {
    font-size: 0.8rem;
    line-height: 1.35;
}

.auth-form__header {
    margin-bottom: 14px;
}

.auth-form__title {
    font-size: clamp(1.65rem, 2vw, 2.15rem);
}

.auth-form__subtitle {
    line-height: 1.5;
}

.auth-form__illustration > span {
    width: 78px;
    height: 78px;
    border-radius: 20px;
    font-size: 2rem;
}

.auth-form {
    gap: 14px;
}

.auth-form__grid {
    gap: 12px 18px;
}

.auth-field-with-icon .form-control {
    min-height: 46px;
}

.auth-identity-card {
    min-height: 128px;
    gap: 8px;
    padding: 12px;
}

.auth-identity-card__avatar {
    width: 60px;
    height: 60px;
    font-size: 1.55rem;
}

.auth-form__actions {
    gap: 10px;
    padding-top: 0;
}

.auth-panel--form > .alert {
    margin-bottom: 12px;
    padding: 10px 12px;
}

.auth-help-links {
    margin-top: 6px;
}

@media (min-width: 1081px) and (max-height: 820px) {
    .auth-card--login {
        height: calc(100svh - 20px);
        min-height: 0;
    }

    .auth-main {
        padding: 10px 14px;
    }

    .auth-panel {
        padding: 20px 24px;
    }

    .auth-panel--brand {
        gap: 12px;
    }

    .auth-brand__logo {
        width: 64px;
        height: 64px;
    }

    .auth-brand__description {
        font-size: 0.86rem;
    }

    .auth-highlight {
        padding: 9px 12px;
    }

    .auth-highlight span {
        font-size: 0.75rem;
    }

    .auth-form__illustration > span {
        width: 66px;
        height: 66px;
    }

    .auth-form__header {
        margin-bottom: 10px;
    }

    .auth-form,
    .auth-form__grid {
        gap: 10px 14px;
    }

    .auth-field-with-icon .form-control {
        min-height: 42px;
    }

    .auth-identity-card {
        min-height: 110px;
    }
}

@media (max-width: 1080px) {
    .auth-page {
        height: auto;
        min-height: 100svh;
        overflow: auto;
    }

    .auth-main {
        height: auto;
        min-height: 100svh;
        overflow: visible;
    }

    .auth-card--login {
        height: auto;
        min-height: 0;
    }
}

/* =========================================================
   C6N.1.3.4 — LOGIN MULTIMUNICÍPIO + IDENTIDADE DINÂMICA
   ========================================================= */
.auth-brand--compact {
    align-items: center;
}

.auth-brand--compact .auth-brand__title {
    margin-bottom: 0;
}

.auth-commercial {
    margin-top: 2px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.09);
    text-align: center;
}

.auth-commercial__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: rgba(219, 234, 254, 0.92);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-commercial > strong {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 1rem;
}

.auth-commercial__contacts {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: rgba(239, 246, 255, 0.94);
    font-size: 0.78rem;
    font-weight: 700;
}

.auth-commercial__contacts span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auth-form__header--municipio {
    grid-template-columns: minmax(0, 1fr) 88px;
}

.auth-form__municipio-logo {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    border: 1px solid rgba(29, 78, 216, 0.16);
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
    overflow: hidden;
}

.auth-form__municipio-logo > span,
.auth-form__municipio-logo > img {
    width: 100%;
    height: 100%;
}

.auth-form__municipio-logo > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 2rem;
}

.auth-form__municipio-logo > img {
    display: block;
    padding: 10px;
    object-fit: contain;
    background: #ffffff;
}

.auth-form__municipio-logo > img[hidden],
.auth-form__municipio-logo > span[hidden] {
    display: none !important;
}

.auth-form__field select.form-control {
    appearance: auto;
}

@media (min-width: 1081px) {
    .auth-panel--brand {
        gap: 12px;
    }

    .auth-brand__highlights {
        gap: 8px;
    }

    .auth-highlight {
        padding: 9px 12px;
    }

    .auth-highlight i {
        width: 34px;
        height: 34px;
    }

    .auth-commercial {
        padding: 10px 12px;
    }
}

@media (min-width: 1081px) and (max-height: 780px) {
    .auth-panel {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .auth-brand-topbar {
        min-height: 28px;
    }

    .auth-brand__logo {
        width: 58px;
        height: 58px;
    }

    .auth-brand__title {
        font-size: 1.65rem;
    }

    .auth-highlight {
        padding: 7px 10px;
    }

    .auth-highlight span {
        font-size: 0.72rem;
    }

    .auth-commercial {
        padding: 8px 10px;
    }

    .auth-commercial__contacts {
        font-size: 0.72rem;
    }

    .auth-form__municipio-logo {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 1080px) {
    .auth-commercial__contacts {
        justify-content: flex-start;
    }

    .auth-commercial {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .auth-form__header--municipio {
        grid-template-columns: 1fr;
    }

    .auth-form__municipio-logo {
        width: 72px;
        height: 72px;
    }
}

/* =========================================================
   C6N.1.3.5 — BUSCA DE MUNICÍPIO NO LOGIN
   ========================================================= */
.auth-municipio-search {
    position: relative;
}

.auth-municipio-search .auth-field-with-icon {
    position: relative;
    z-index: 2;
}

.auth-municipio-results {
    position: absolute;
    z-index: 80;
    top: calc(100% - 18px);
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.auth-municipio-results[hidden] {
    display: none !important;
}

.auth-municipio-option {
    width: 100%;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
}

.auth-municipio-option:hover,
.auth-municipio-option:focus-visible,
.auth-municipio-option.is-active {
    background: var(--color-hover);
    outline: none;
}

.auth-municipio-option__icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--color-primary);
}

.auth-municipio-option strong,
.auth-municipio-option small {
    display: block;
}

.auth-municipio-option strong {
    font-size: .9rem;
}

.auth-municipio-option small,
.auth-municipio-help {
    color: var(--color-text-muted);
    font-size: .75rem;
}

.auth-municipio-help {
    display: block;
    margin-top: 6px;
    line-height: 1.35;
}

.auth-municipio-empty {
    padding: 14px 12px;
    color: var(--color-text-muted);
    text-align: center;
    font-size: .85rem;
}

[data-theme="dark"] .auth-municipio-option__icon {
    background: rgba(59, 130, 246, .12);
}

/* =========================================================
   MUNICÍPIOS / CLIENTES — IDENTIDADE INSTITUCIONAL
   ========================================================= */
.municipio-client-logo-cell {
    width: 86px;
}

.municipio-client-logo {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    padding: 5px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
}

.municipio-client-logo--fallback {
    color: var(--color-primary);
    background: var(--color-hover);
    font-size: 1.35rem;
}

.municipio-client-form .form-accordion + .form-accordion {
    margin-top: 12px;
}

.municipio-client-form .form-grid__full {
    grid-column: 1 / -1;
}

.municipio-identity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.municipio-identity-upload {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-background);
}

.municipio-identity-preview {
    width: 116px;
    height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    border: 1px dashed var(--color-border);
    border-radius: 18px;
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 2rem;
}

.municipio-identity-preview--wide {
    width: 132px;
}

.municipio-identity-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.municipio-admin-inicial[hidden] {
    display: none !important;
}

.form-actions--bottom {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 960px) {
    .municipio-identity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .municipio-identity-upload {
        grid-template-columns: 1fr;
    }

    .municipio-identity-preview,
    .municipio-identity-preview--wide {
        width: 100%;
        max-width: 180px;
    }

    .form-actions--bottom {
        flex-direction: column-reverse;
    }

    .form-actions--bottom .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   C6N.1.4.1 — MUNICÍPIOS / CLIENTES
   Ajustes de sanfona e pré-visualização da identidade
   ========================================================= */
.municipio-client-form .form-accordion {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.municipio-client-form .form-accordion + .form-accordion {
    margin-top: 14px;
}

.municipio-client-form .form-accordion > summary {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 12px 48px 12px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: var(--color-background);
    border-bottom: 1px solid transparent;
}

.municipio-client-form .form-accordion > summary::-webkit-details-marker {
    display: none;
}

.municipio-client-form .form-accordion[open] > summary {
    border-bottom-color: var(--color-border);
}

.municipio-client-form .form-accordion > summary::after {
    content: '\f078';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--color-text-muted);
    transition: transform .18s ease, color .18s ease;
}

.municipio-client-form .form-accordion[open] > summary::after {
    transform: translateY(-50%) rotate(0deg);
    color: var(--color-primary);
}

.municipio-accordion-heading {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.municipio-accordion-heading strong {
    color: var(--color-text);
    font-size: .94rem;
    line-height: 1.25;
}

.municipio-accordion-heading small {
    display: block;
    color: var(--color-text-muted);
    font-size: .76rem;
    font-weight: 500;
    line-height: 1.35;
}

.municipio-client-form .form-accordion__content {
    padding: 18px 16px;
}

.municipio-identity-grid {
    align-items: stretch;
}

.municipio-identity-upload {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.municipio-identity-field {
    width: 100%;
    margin: 0;
}

.municipio-identity-preview-block {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.municipio-identity-preview-label {
    color: var(--color-text-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.municipio-identity-preview,
.municipio-identity-preview--wide {
    width: 100%;
    height: 190px;
    max-width: none;
    padding: 14px;
    border-radius: 14px;
    background: var(--color-background);
}

.municipio-identity-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--color-text-muted);
    text-align: center;
}

.municipio-identity-preview-placeholder i {
    color: var(--color-primary);
    font-size: 2rem;
}

.municipio-identity-preview-placeholder small {
    font-size: .76rem;
}

.municipio-identity-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 640px) {
    .municipio-client-form .form-accordion > summary {
        padding-right: 42px;
    }

    .municipio-identity-preview,
    .municipio-identity-preview--wide {
        height: 160px;
        max-width: none;
    }
}

/* =========================================================
   C6N.2 / C6N.3 — CONTEXTO ATIVO E AUTORIZAÇÃO EFETIVA
   ========================================================= */
.header-context {
    text-decoration: none;
}

.context-session-page {
    max-width: 980px;
    margin: 0 auto;
}

.context-session-current {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px 16px;
    align-items: center;
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-background);
}

.context-session-current > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-primary);
    font-weight: 800;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.context-session-current > strong {
    color: var(--color-text);
    font-size: 1rem;
}

.context-session-current > small {
    color: var(--color-text-muted);
    font-weight: 700;
}

.context-session-form {
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.context-session-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--color-hover);
    color: var(--color-text-muted);
    font-size: .85rem;
    line-height: 1.45;
}

.context-session-note i {
    margin-top: 2px;
    color: var(--color-primary);
}

.access-denied-card {
    max-width: 760px;
    margin: 30px auto;
}

.access-denied-permission {
    display: block;
    margin-top: 10px;
    color: var(--color-text-muted);
}

.access-denied-permission code {
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--color-hover);
    color: var(--color-primary);
}

.empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 760px) {
    .context-session-current {
        grid-template-columns: 1fr;
    }

    .header-context .header-button__label {
        display: none;
    }
}

/* =========================================================
   C6N.4 — ADMINISTRAÇÃO DE USUÁRIOS, PERFIS E PERMISSÕES
   ========================================================= */
.form-readonly-value {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-background);
    color: var(--color-text-muted);
}

.form-inline-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
}

.form-inline-checks .checkbox-control {
    min-width: min(100%, 280px);
    flex: 1 1 280px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-background);
}

.permission-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.permission-check-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-background);
    cursor: pointer;
}

.permission-check-card:hover {
    border-color: var(--color-primary);
    background: var(--color-hover);
}

.permission-check-card.is-locked {
    cursor: default;
    opacity: .88;
}

.permission-check-card input {
    margin-top: 3px;
}

.permission-check-card strong,
.permission-check-card small,
.permission-check-card em {
    display: block;
}

.permission-check-card small {
    margin-top: 3px;
    color: var(--color-text-muted);
    font-size: .78rem;
}

.permission-check-card em {
    margin-top: 5px;
    color: var(--color-text-muted);
    font-size: .76rem;
    font-style: normal;
    line-height: 1.4;
}

.profile-permission-matrix {
    display: grid;
    gap: 16px;
}

.permission-module {
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.permission-module legend {
    padding: 0 8px;
    color: var(--color-primary);
    font-weight: 800;
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.profile-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}

.profile-summary-row p {
    margin-top: 0;
}

.table-action-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.user-password-card {
    max-width: 980px;
}

@media (max-width: 760px) {
    .permission-check-grid {
        grid-template-columns: 1fr;
    }

    .profile-summary-row {
        flex-direction: column;
    }
}

/* =========================================================
   C6N.4.1 — FOTO DE PERFIL DOS USUÁRIOS
   ========================================================= */
.usuario-foto-upload {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    max-width: 760px;
}

.usuario-foto-upload--edit {
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.usuario-foto-preview {
    width: 118px;
    height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-hover);
    color: var(--color-primary);
    font-size: 2.35rem;
    position: relative;
}

.usuario-foto-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.usuario-foto-preview img[hidden] {
    display: none !important;
}

.usuario-foto-placeholder {
    width: 100%;
    height: 100%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.usuario-foto-placeholder[hidden] {
    display: none !important;
}

.usuario-foto-placeholder__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--color-primary);
}

.usuario-foto-placeholder__text {
    font-size: 0.78rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--color-text-muted);
}

.usuario-foto-remove {
    margin-top: 10px;
}

.usuario-list-identidade {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.usuario-list-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-hover);
}

.usuario-list-avatar--fallback {
    color: var(--color-primary);
}

.header-user__avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

@media (max-width: 640px) {
    .usuario-foto-upload {
        grid-template-columns: 1fr;
    }
}

/* C6N.5.4 — cabeçalho institucional livre */
.official-document__header{align-items:stretch}.official-document__header .official-document__seal--image{display:flex!important;align-items:center;justify-content:center;flex:0 0 78px;width:78px;height:auto;min-height:68px;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important}.official-document__header .official-document__seal--image img{display:block;max-width:100%;max-height:68px;width:auto;height:auto;object-fit:contain}.official-document__brand-line{display:block;line-height:1.22}.official-document__brand-line--1{font-size:13pt;font-weight:700}.official-document__brand-line--2{margin-top:2px;font-size:9.5pt}.official-document__brand-line--3{margin-top:2px;font-size:9pt}

/* C6N.5.5 — identidade institucional padronizada em documentos operacionais */
.official-document__header--institutional{display:flex;align-items:stretch;gap:14px}
.official-document__header--institutional .official-document__brand-image{display:flex;align-items:center;justify-content:center;flex:0 0 78px;min-height:72px;overflow:hidden;background:transparent;border:0!important}
.official-document__header--institutional .official-document__brand-image--logo{flex-basis:108px}
.official-document__header--institutional .official-document__brand-image img{display:block;max-width:100%;max-height:72px;width:auto;height:auto;object-fit:contain}
.official-document__header--institutional .official-document__brand-lines{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:center}
.official-document__header--institutional .official-document__brand-line{display:block;margin:0;line-height:1.22}
.official-document__header--institutional .official-document__brand-line--1{font-size:13pt;font-weight:700}
.official-document__header--institutional .official-document__brand-line--2{font-size:9.5pt;margin-top:2px}
.official-document__header--institutional .official-document__brand-line--3{font-size:9pt;margin-top:2px}
.official-document__header--institutional .official-document__brand-cnpj{display:block;margin-top:3px;font-size:8pt}


/* C6N.5.6 — local e data formal dos documentos */
.official-document__place-date{margin:12mm 0 0;text-align:right;font-size:9pt;color:#222}.official-document__place-date+.official-document__signatures{margin-top:16mm}@media print{.official-document__place-date{break-after:avoid}.official-document__place-date+.official-document__signatures{margin-top:14mm}}


/* C6N.6.1 — Dashboard gerencial consolidado */
.dashboard-context-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    margin-bottom:1rem;
    padding:.75rem 1rem;
    border:1px solid var(--color-border);
    border-radius:12px;
    background:var(--color-surface,#fff);
}
.dashboard-context-card>div{
    display:flex;
    align-items:center;
    gap:.75rem;
    min-width:0;
}
.dashboard-context-card>div>i{
    display:grid;
    place-items:center;
    width:36px;
    height:36px;
    flex:0 0 36px;
    border-radius:9px;
    background:var(--color-primary-soft,#eef4ff);
    color:var(--color-primary);
}
.dashboard-context-card span,
.dashboard-context-card strong{
    display:block;
}
.dashboard-context-card span{
    color:var(--color-text-muted);
    font-size:.68rem;
    font-weight:700;
}
.dashboard-context-card strong{
    margin-top:.1rem;
    font-size:.82rem;
}
.dashboard-context-card>a{
    display:inline-flex;
    align-items:center;
    gap:.4rem;
    white-space:nowrap;
    font-size:.74rem;
    font-weight:700;
    color:var(--color-primary);
    text-decoration:none;
}
.dashboard-summary-grid--six{
    grid-template-columns:repeat(3,minmax(0,1fr));
}
.dashboard-summary-card__money{
    font-size:1.15rem!important;
}
.dashboard-content-grid--balanced{
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.dashboard-panel-counter{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:32px;
    min-height:28px;
    padding:.2rem .55rem;
    border-radius:999px;
    background:var(--color-primary-soft,#eef4ff);
    color:var(--color-primary-dark);
    font-size:.78rem;
    font-weight:800;
}
.dashboard-flow-list{
    display:grid;
    gap:.45rem;
}
.dashboard-flow-item{
    display:grid;
    grid-template-columns:34px minmax(0,1fr) auto 14px;
    gap:.65rem;
    align-items:center;
    padding:.6rem .7rem;
    border:1px solid var(--color-border);
    border-radius:9px;
    color:var(--color-text);
    text-decoration:none;
}
.dashboard-flow-item:hover{
    border-color:var(--color-primary);
    background:var(--color-primary-soft,#f5f8ff);
}
.dashboard-flow-item__icon{
    display:grid;
    place-items:center;
    width:30px;
    height:30px;
    border-radius:8px;
    background:var(--color-background);
    color:var(--color-primary);
}
.dashboard-flow-item>span:nth-child(2){
    min-width:0;
    font-size:.76rem;
    font-weight:700;
}
.dashboard-flow-item>strong{
    font-size:.9rem;
}
.dashboard-flow-item>i{
    font-size:.68rem;
    color:var(--color-text-muted);
}
.dashboard-status-panel{
    margin-bottom:1rem;
}
.dashboard-status-list--columns{
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:1.25rem;
}
@media(max-width:1100px){
    .dashboard-summary-grid--six{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .dashboard-content-grid--balanced,
    .dashboard-status-list--columns{
        grid-template-columns:1fr;
    }
}
@media(max-width:680px){
    .dashboard-context-card{
        align-items:flex-start;
        flex-direction:column;
    }
    .dashboard-summary-grid--six{
        grid-template-columns:1fr;
    }
}


/* C6N.6.10A — Regularização de Contexto Legado */
.contexto-legado-page-header{
    margin-bottom:1rem;
}
.contexto-legado-page-header .page-header__actions .btn{
    min-height:36px;
}
.contexto-legado-destino{
    display:flex;
    align-items:flex-start;
    gap:.8rem;
    margin:0 0 1rem;
    padding:.9rem 1rem;
    border:1px solid var(--color-border);
    border-left:4px solid var(--color-primary);
    border-radius:12px;
    background:var(--color-surface,#fff);
    box-shadow:0 1px 2px rgba(15,23,42,.03);
}
.contexto-legado-destino>i{
    display:grid;
    place-items:center;
    flex:0 0 34px;
    width:34px;
    height:34px;
    border-radius:9px;
    background:var(--color-primary-soft,#eef4ff);
    color:var(--color-primary);
}
.contexto-legado-destino strong{
    display:block;
    margin:.05rem 0 .15rem;
    font-size:.82rem;
}
.contexto-legado-destino p{
    margin:0;
    color:var(--color-text-muted);
    font-size:.72rem;
    line-height:1.45;
}
.contexto-legado-resumo{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:.8rem;
    margin-bottom:1rem;
}
.contexto-legado-resumo-card{
    display:grid;
    grid-template-columns:40px minmax(0,1fr);
    gap:.75rem;
    align-items:center;
    min-width:0;
    padding:.9rem;
    border:1px solid var(--color-border);
    border-radius:12px;
    background:var(--color-surface,#fff);
    color:var(--color-text);
    text-decoration:none!important;
    box-shadow:0 1px 2px rgba(15,23,42,.025);
    transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease,background .15s ease;
}
.contexto-legado-resumo-card:hover{
    border-color:var(--color-primary);
    background:var(--color-primary-soft,#f5f8ff);
    box-shadow:0 4px 12px rgba(15,23,42,.06);
    transform:translateY(-1px);
}
.contexto-legado-resumo-card.is-active{
    border-color:var(--color-primary);
    background:var(--color-primary-soft,#eef4ff);
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--color-primary) 18%,transparent);
}
.contexto-legado-resumo-card__icon{
    display:grid;
    place-items:center;
    width:40px;
    height:40px;
    border-radius:10px;
    background:var(--color-primary-soft,#eef4ff);
    color:var(--color-primary);
}
.contexto-legado-resumo-card.is-active .contexto-legado-resumo-card__icon{
    background:var(--color-primary);
    color:#fff;
}
.contexto-legado-resumo-card>div{
    min-width:0;
}
.contexto-legado-resumo-card>div>span,
.contexto-legado-resumo-card>div>strong,
.contexto-legado-resumo-card>div>small{
    display:block;
    text-decoration:none;
}
.contexto-legado-resumo-card>div>span{
    color:var(--color-text);
    font-size:.72rem;
    font-weight:800;
    line-height:1.25;
}
.contexto-legado-resumo-card>div>strong{
    margin:.12rem 0;
    color:var(--color-primary);
    font-size:1.45rem;
    line-height:1;
}
.contexto-legado-resumo-card>div>small{
    color:var(--color-text-muted);
    font-size:.66rem;
    line-height:1.25;
}
.contexto-legado-card{
    overflow:hidden;
    padding:0;
}
.contexto-legado-card__header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:1rem;
    padding:1rem 1rem .85rem;
    border-bottom:1px solid var(--color-border);
}
.contexto-legado-card__header h2{
    margin:0 0 .18rem;
    font-size:1.05rem;
}
.contexto-legado-card__header p{
    margin:0;
    color:var(--color-text-muted);
    font-size:.72rem;
    line-height:1.45;
}
.contexto-legado-total{
    display:inline-flex;
    align-items:center;
    gap:.35rem;
    flex:0 0 auto;
    padding:.34rem .58rem;
    border-radius:999px;
    background:var(--color-warning-soft,#fff7e6);
    color:var(--color-warning-dark,#8a5a00);
    font-size:.68rem;
    font-weight:800;
    white-space:nowrap;
}
.contexto-legado-tabs{
    display:flex;
    gap:.35rem;
    overflow-x:auto;
    padding:.65rem 1rem;
    border-bottom:1px solid var(--color-border);
    background:var(--color-surface-soft,#f8fafc);
    scrollbar-width:thin;
}
.contexto-legado-tab{
    display:inline-flex;
    align-items:center;
    gap:.4rem;
    flex:0 0 auto;
    padding:.42rem .62rem;
    border:1px solid transparent;
    border-radius:8px;
    color:var(--color-text-muted);
    text-decoration:none!important;
    font-size:.69rem;
    font-weight:750;
    line-height:1;
}
.contexto-legado-tab span{
    display:inline-grid;
    place-items:center;
    min-width:20px;
    height:20px;
    padding:0 .28rem;
    border-radius:999px;
    background:var(--color-background);
    color:var(--color-text);
    font-size:.62rem;
    font-weight:800;
}
.contexto-legado-tab:hover{
    color:var(--color-primary);
    border-color:var(--color-border);
    background:var(--color-surface,#fff);
}
.contexto-legado-tab.is-active{
    border-color:var(--color-primary);
    background:var(--color-primary);
    color:#fff;
}
.contexto-legado-tab.is-active span{
    background:rgba(255,255,255,.2);
    color:#fff;
}
.contexto-legado-table-wrap{
    margin:1rem 1rem 0;
    border:1px solid var(--color-border);
    border-radius:10px;
    overflow:auto;
}
.contexto-legado-table{
    min-width:720px;
    margin:0;
}
.contexto-legado-table th:first-child,
.contexto-legado-table td:first-child{
    width:44px;
    text-align:center;
}
.contexto-legado-table td{
    vertical-align:middle;
}
.contexto-legado-table tbody td:nth-child(2){
    width:22%;
}
.contexto-legado-table tbody td:nth-child(4){
    width:145px;
}
.contexto-legado-form-grid{
    padding:1rem 1rem 0;
}
.contexto-legado-form-grid textarea{
    min-height:86px;
    resize:vertical;
}
.contexto-legado-confirmacao{
    display:flex;
    align-items:flex-start;
    gap:.65rem;
    margin:1rem;
    padding:.8rem .9rem;
    border:1px solid var(--color-border);
    border-radius:10px;
    background:var(--color-surface-soft,#f8fafc);
    cursor:pointer;
}
.contexto-legado-confirmacao:hover{
    border-color:var(--color-primary);
}
.contexto-legado-confirmacao>input{
    flex:0 0 auto;
    margin-top:.18rem;
}
.contexto-legado-confirmacao>span{
    min-width:0;
}
.contexto-legado-confirmacao strong,
.contexto-legado-confirmacao small{
    display:block;
}
.contexto-legado-confirmacao strong{
    margin-bottom:.15rem;
    font-size:.76rem;
}
.contexto-legado-confirmacao small{
    color:var(--color-text-muted);
    font-size:.69rem;
    line-height:1.45;
}
.contexto-legado-actions{
    justify-content:flex-end;
    margin:0;
    padding:0 1rem 1rem;
}
.contexto-legado-actions .btn{
    min-width:190px;
    justify-content:center;
}
.contexto-legado-card>.empty-state{
    margin:1rem;
}
@media(max-width:1100px){
    .contexto-legado-resumo{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:767px){
    .contexto-legado-card__header{
        flex-direction:column;
    }
    .contexto-legado-total{
        white-space:normal;
    }
    .contexto-legado-resumo{
        grid-template-columns:1fr;
    }
    .contexto-legado-table-wrap{
        margin:.75rem .75rem 0;
    }
    .contexto-legado-form-grid{
        padding:.75rem .75rem 0;
    }
    .contexto-legado-confirmacao{
        margin:.75rem;
    }
    .contexto-legado-actions{
        padding:0 .75rem .75rem;
    }
    .contexto-legado-actions .btn{
        width:100%;
    }
}


/* C6N.6.11 — Auditoria de Integridade de Contexto */
.context-integrity-status{
    display:grid;
    grid-template-columns:48px minmax(0,1fr) auto;
    gap:.9rem;
    align-items:center;
    margin-bottom:1rem;
    padding:1rem;
    border:1px solid var(--color-border);
    border-radius:12px;
    background:var(--color-surface,#fff);
}
.context-integrity-status.is-ok{border-left:4px solid #2f855a}
.context-integrity-status.has-errors{border-left:4px solid #c53030}
.context-integrity-status__icon{
    display:grid;
    place-items:center;
    width:48px;height:48px;
    border-radius:12px;
    background:var(--color-primary-soft,#eef4ff);
    font-size:1.15rem;
}
.context-integrity-status.is-ok .context-integrity-status__icon{color:#2f855a}
.context-integrity-status.has-errors .context-integrity-status__icon{color:#c53030}
.context-integrity-status strong{display:block;font-size:.9rem}
.context-integrity-status p{margin:.15rem 0 0;color:var(--color-text-muted);font-size:.72rem}
.context-integrity-status__numbers{display:flex;gap:.55rem;flex-wrap:wrap;justify-content:flex-end}
.context-integrity-status__numbers span{padding:.45rem .65rem;border-radius:9px;background:var(--color-background);font-size:.68rem}
.context-integrity-status__numbers b{font-size:.9rem}
.context-integrity-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:.8rem;
    margin-bottom:1rem;
}
.context-integrity-card{
    padding:.9rem;
    border:1px solid var(--color-border);
    border-radius:12px;
    background:var(--color-surface,#fff);
}
.context-integrity-card.is-ok{border-top:3px solid #2f855a}
.context-integrity-card.is-warning{border-top:3px solid #d69e2e}
.context-integrity-card.has-errors{border-top:3px solid #c53030}
.context-integrity-card__top{display:flex;align-items:center;justify-content:space-between;gap:.6rem}
.context-integrity-card__top strong{font-size:1.4rem}
.context-integrity-card__icon{
    display:grid;place-items:center;
    width:34px;height:34px;
    border-radius:9px;
    background:var(--color-background);
}
.context-integrity-card h2{margin:.65rem 0 .25rem;font-size:.8rem}
.context-integrity-card p{min-height:44px;margin:0 0 .65rem;color:var(--color-text-muted);font-size:.67rem;line-height:1.4}
.context-integrity-card>a,
.context-integrity-card__ok,
.context-integrity-card__error{
    display:inline-flex;align-items:center;gap:.35rem;
    font-size:.66rem;font-weight:800;
}
.context-integrity-card>a{text-decoration:none;color:var(--color-primary)}
.context-integrity-card__ok{color:#2f855a}
.context-integrity-card__error{color:#c53030}
.context-integrity-notes h2{margin:0 0 .55rem;font-size:.9rem}
.context-integrity-notes p{margin:.25rem 0;color:var(--color-text-muted);font-size:.72rem;line-height:1.5}
@media(max-width:1200px){.context-integrity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){
    .context-integrity-status{grid-template-columns:42px minmax(0,1fr)}
    .context-integrity-status__numbers{grid-column:1/-1;justify-content:flex-start}
    .context-integrity-grid{grid-template-columns:1fr}
}


/* C6N.6.11A — Auditoria como submenu recolhível na sidebar */
.sidebar-submenu{
    margin:0;
    padding:0;
}
.sidebar-submenu>summary{
    list-style:none;
}
.sidebar-submenu>summary::-webkit-details-marker{
    display:none;
}
.sidebar-submenu__summary{
    display:flex;
    align-items:center;
    gap:.65rem;
    min-height:38px;
    padding:.55rem .65rem;
    border-radius:var(--radius-sm);
    color:var(--color-text-muted);
    font-size:.78rem;
    font-weight:600;
    cursor:pointer;
    user-select:none;
    transition:background var(--transition-fast),color var(--transition-fast);
}
.sidebar-submenu__summary:hover,
.sidebar-submenu__summary:focus-visible{
    background:var(--color-hover);
    color:var(--color-primary);
    outline:none;
}
.sidebar-submenu__summary.is-active{
    background:var(--color-primary);
    color:#fff;
}
.sidebar-submenu__label{
    min-width:0;
    flex:1 1 auto;
}
.sidebar-submenu__chevron{
    display:grid;
    place-items:center;
    width:16px;
    flex:0 0 16px;
    font-size:.64rem;
    transition:transform var(--transition-fast);
}
.sidebar-submenu[open] .sidebar-submenu__chevron{
    transform:rotate(180deg);
}
.sidebar-submenu__items{
    display:grid;
    gap:.15rem;
    margin:.18rem 0 .25rem 1.15rem;
    padding-left:.65rem;
    border-left:1px solid var(--color-border);
}
.sidebar-submenu__link{
    display:flex;
    align-items:center;
    gap:.55rem;
    min-height:34px;
    padding:.42rem .55rem;
    border-radius:var(--radius-sm);
    color:var(--color-text-muted);
    text-decoration:none;
    font-size:.73rem;
    font-weight:600;
    line-height:1.2;
    transition:background var(--transition-fast),color var(--transition-fast);
}
.sidebar-submenu__link:hover,
.sidebar-submenu__link:focus-visible{
    background:var(--color-hover);
    color:var(--color-primary);
    outline:none;
}
.sidebar-submenu__link.is-active{
    background:var(--color-primary-soft,#eef4ff);
    color:var(--color-primary);
    font-weight:800;
}
.sidebar-submenu__icon{
    display:grid;
    place-items:center;
    width:20px;
    flex:0 0 20px;
    font-size:.72rem;
}
@media (min-width:769px){
    .app-sidebar.is-collapsed .sidebar-submenu__summary{
        justify-content:center;
        padding-inline:0;
        gap:0;
    }
    .app-sidebar.is-collapsed .sidebar-submenu__label,
    .app-sidebar.is-collapsed .sidebar-submenu__chevron,
    .app-sidebar.is-collapsed .sidebar-submenu__items{
        display:none;
    }
}


/* C6N.6.11B — Contraste do item Auditoria ativo na sidebar */
.sidebar-submenu__summary.is-active,
.sidebar-submenu__summary.is-active .sidebar-link__icon,
.sidebar-submenu__summary.is-active .sidebar-submenu__label,
.sidebar-submenu__summary.is-active .sidebar-submenu__chevron,
.sidebar-submenu__summary.is-active i{
    color:#fff!important;
}
.sidebar-submenu__summary.is-active .sidebar-link__icon{
    opacity:1!important;
}


/* =========================================================
   FASE 02.5.01 — RODAPÉ DE RASTREABILIDADE / AUDITORIA
   ========================================================= */
.app-main {
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1 0 auto;
}

.app-footer {
    width: min(100%, var(--container-width));
    margin: 28px auto 0;
    padding-top: 0;
    border-top: 0;
    color: var(--color-text-muted);
}

.app-footer__inner {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.app-footer__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-primary) 4%, var(--color-surface));
}

.app-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-footer__brand-icon {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--color-primary);
    color: var(--brand-primary-contrast, #fff);
    font-size: .88rem;
}

.app-footer__brand strong,
.app-footer__brand small {
    display: block;
}

.app-footer__brand strong {
    color: var(--color-text);
    font-size: .76rem;
    line-height: 1.2;
}

.app-footer__brand small {
    margin-top: 2px;
    font-size: .63rem;
    line-height: 1.35;
}

.app-footer__version {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-background);
    font-size: .62rem;
    white-space: nowrap;
}

.app-footer__version strong {
    color: var(--color-primary);
}

.app-footer__audit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--color-border);
}

.app-footer__audit-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    min-width: 0;
    min-height: 74px;
    padding: 10px 12px;
    background: var(--color-surface);
}

.app-footer__audit-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--color-hover);
    color: var(--color-primary);
    font-size: .72rem;
}

.app-footer__audit-item > div {
    min-width: 0;
}

.app-footer__audit-item small,
.app-footer__audit-item strong,
.app-footer__audit-item span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-footer__audit-item small {
    margin-bottom: 1px;
    color: var(--color-text-muted);
    font-size: .56rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.app-footer__audit-item strong {
    color: var(--color-text);
    font-size: .7rem;
    line-height: 1.3;
}

.app-footer__audit-item span {
    margin-top: 1px;
    color: var(--color-text-muted);
    font-size: .59rem;
}

.app-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 12px;
    border-top: 1px solid var(--color-border);
    background: var(--color-background);
    font-size: .57rem;
    line-height: 1.35;
}

.app-footer__bottom > span {
    min-width: 0;
}

.app-footer__bottom code {
    color: var(--color-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .56rem;
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .app-footer__audit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 620px) {
    .app-footer {
        margin-top: 24px;
    }

    .app-footer__heading {
        align-items: flex-start;
    }

    .app-footer__brand small {
        display: none;
    }

    .app-footer__audit-grid {
        grid-template-columns: 1fr;
    }

    .app-footer__audit-item {
        min-height: 64px;
    }

    .app-footer__version {
        font-size: .56rem;
    }
}

@media print {
    .app-footer {
        display: none !important;
    }
}


/* FASE 02.5.01A — AJUSTES DO RODAPÉ */
.app-footer__audit-icon > i,
.app-footer__brand-icon > i {
    color: inherit !important;
    font-size: inherit;
    line-height: 1;
}


/* FASE 02.5.01B — ÍCONES SVG DO RODAPÉ */
.app-footer__svg {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: currentColor;
}

.app-footer__brand-icon .app-footer__svg {
    width: 18px;
    height: 18px;
}

.app-footer__audit-icon .app-footer__svg {
    width: 15px;
    height: 15px;
}

.app-footer__svg--inline {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 3px;
    vertical-align: -2px;
}


/* FASE 02.5.01C — CORREÇÃO VISUAL DEFINITIVA DOS ÍCONES */
.app-footer__audit-icon {
    background: var(--color-primary) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}

.app-footer__audit-icon .app-footer__svg {
    width: 17px !important;
    height: 17px !important;
    color: var(--brand-primary-contrast, #fff) !important;
    opacity: 1 !important;
}

.app-footer__brand-icon .app-footer__svg {
    color: #fff !important;
    opacity: 1 !important;
}


/* FASE 02.5.01D — ALINHAMENTO E COR DOS ÍCONES DO RODAPÉ */
.app-footer__audit-item {
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 8px;
}

.app-footer__audit-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: center !important;
    align-self: center !important;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: #f1f5fb !important;
    color: #71839a !important;
    box-shadow: none !important;
}

.app-footer__audit-icon .app-footer__svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #71839a !important;
    opacity: 1 !important;
    transform: none !important;
}

.app-footer__brand-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.app-footer__brand-icon .app-footer__svg {
    display: block !important;
    margin: 0 !important;
    transform: none !important;
}


/* =========================================================
   FASE 02.5.02 — IDENTIDADE VISUAL POR MUNICÍPIO / CLIENTE
   ========================================================= */
.municipio-brand-config {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 18px;
    align-items: stretch;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.municipio-brand-color-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.municipio-brand-color-picker {
    width: 58px;
    height: 42px;
    padding: 3px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: pointer;
}

.municipio-brand-color-hex {
    width: 132px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-transform: uppercase;
}

.municipio-brand-preview {
    --preview-brand: #1D4ED8;
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-background);
}

.municipio-brand-preview__label {
    color: var(--color-text);
    font-size: .72rem;
    font-weight: 800;
}

.municipio-brand-preview__canvas {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
}

.municipio-brand-preview__menu,
.municipio-brand-preview__button,
.municipio-brand-preview__icon {
    border: 0;
    border-radius: 7px;
    background: var(--preview-brand);
    color: #fff;
    font-weight: 700;
}

.municipio-brand-preview__menu {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: .67rem;
}

.municipio-brand-preview__button {
    min-height: 34px;
    padding: 0 11px;
    font-size: .67rem;
}

.municipio-brand-preview__icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
}

.municipio-brand-preview > small {
    color: var(--color-text-muted);
    font-size: .62rem;
    line-height: 1.4;
}

.municipio-color-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-surface);
    border-radius: 999px;
    background: var(--municipio-color, #1D4ED8);
    box-shadow: 0 0 0 1px var(--color-border);
    vertical-align: middle;
}

@media (max-width: 900px) {
    .municipio-brand-config {
        grid-template-columns: 1fr;
    }
}


/* FASE 02.5.02A — AJUSTE DA TABELA MUNICÍPIOS / CLIENTES */
.municipio-client-table,
.table-responsive > .table {
    width: 100%;
}

.municipio-color-column,
.municipio-color-cell {
    width: 86px;
    text-align: center !important;
    white-space: nowrap;
}

.municipio-color-cell {
    vertical-align: middle;
}

.municipio-color-value {
    display: block;
    margin-top: 4px;
    color: var(--color-text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .58rem;
    letter-spacing: .01em;
}

@media (max-width: 900px) {
    .municipio-color-value {
        display: none;
    }

    .municipio-color-column,
    .municipio-color-cell {
        width: 48px;
    }
}


/* =========================================================
   FASE 02.5.03 — VOLTAR AO TOPO
   ========================================================= */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1200;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--color-primary) 65%, var(--color-border));
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--brand-primary-contrast, #fff);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast),
        visibility var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast);
}

.back-to-top[hidden] {
    display: none !important;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .24);
}

.back-to-top:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 28%, transparent);
    outline-offset: 3px;
}

.back-to-top__icon {
    display: block;
    width: 20px;
    height: 20px;
    color: currentColor;
}

@media (max-width: 768px) {
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
}

@media print {
    .back-to-top {
        display: none !important;
    }
}


/* =========================================================
   FASE 02.5.04 — BREADCRUMBS GLOBAIS
   ========================================================= */
.app-breadcrumbs {
    width: 100%;
    margin: 0 0 12px;
    color: var(--color-text-muted);
}

.app-breadcrumbs__list {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-breadcrumbs__item {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    color: var(--color-text-muted);
    font-size: .66rem;
    line-height: 1.25;
}

.app-breadcrumbs__link,
.app-breadcrumbs__label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 4px 5px;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.app-breadcrumbs__link {
    transition:
        color var(--transition-fast),
        background var(--transition-fast);
}

.app-breadcrumbs__link:hover,
.app-breadcrumbs__link:focus-visible {
    background: var(--brand-primary-soft, var(--color-hover));
    color: var(--color-primary);
    outline: none;
}

.app-breadcrumbs__link:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.app-breadcrumbs__item.is-current {
    min-width: 0;
    color: var(--color-text);
    font-weight: 750;
}

.app-breadcrumbs__item.is-current .app-breadcrumbs__label {
    overflow: hidden;
    color: var(--color-primary);
    text-overflow: ellipsis;
}

.app-breadcrumbs__item.is-current .app-breadcrumbs__label > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-breadcrumbs__separator {
    display: block;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    color: color-mix(in srgb, var(--color-text-muted) 65%, transparent);
}

.app-breadcrumbs__home-icon {
    display: block;
    flex: 0 0 13px;
    width: 13px;
    height: 13px;
}

@media (max-width: 760px) {
    .app-breadcrumbs {
        margin-bottom: 9px;
        overflow: hidden;
    }

    .app-breadcrumbs__list {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .app-breadcrumbs__list::-webkit-scrollbar {
        display: none;
    }

    .app-breadcrumbs__item {
        flex: 0 0 auto;
        font-size: .62rem;
    }

    .app-breadcrumbs__item:not(:first-child):not(:nth-last-child(2)):not(:last-child) {
        display: none;
    }

    .app-breadcrumbs__link,
    .app-breadcrumbs__label {
        max-width: 185px;
    }
}

@media print {
    .app-breadcrumbs {
        display: none !important;
    }
}


/* =========================================================
   FASE 02.5.05 — RECURSOS / PERSONALIZAÇÕES + LIGHTBOX
   ========================================================= */
.personalization-intro {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.personalization-intro__icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.personalization-intro h2,
.personalization-intro p {
    margin: 0;
}

.personalization-intro h2 {
    margin-bottom: 3px;
    font-size: .95rem;
}

.personalization-intro p {
    color: var(--color-text-muted);
    font-size: .72rem;
    line-height: 1.5;
}

.personalization-form .card-header {
    align-items: center;
}

.switch-field {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.switch-field > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-field__control {
    position: relative;
    width: 42px;
    height: 23px;
    border-radius: 999px;
    background: var(--color-border);
    transition: background var(--transition-fast);
}

.switch-field__control::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15,23,42,.24);
    transition: transform var(--transition-fast);
}

.switch-field > input:checked + .switch-field__control {
    background: var(--color-primary);
}

.switch-field > input:checked + .switch-field__control::after {
    transform: translateX(19px);
}

.switch-field > input:focus-visible + .switch-field__control {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
    outline-offset: 2px;
}

.switch-field strong,
.switch-field small {
    display: block;
}

.switch-field strong {
    color: var(--color-text);
    font-size: .72rem;
}

.switch-field small {
    color: var(--color-text-muted);
    font-size: .61rem;
}

.personalization-media-section,
.personalization-options,
.personalization-preview {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.personalization-media-section[hidden] {
    display: none !important;
}

.personalization-media-section h3,
.personalization-options h3 {
    margin: 0 0 12px;
    color: var(--color-text);
    font-size: .78rem;
}

.personalization-current-media {
    overflow: hidden;
    width: min(100%, 280px);
    margin-bottom: 8px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-background);
}

.personalization-current-media img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: contain;
}

.checkbox-card--compact {
    margin: 0;
    padding: .65rem .75rem;
}

.personalization-preview {
    display: grid;
    gap: 8px;
}

.personalization-preview__eyebrow {
    color: var(--color-text-muted);
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.personalization-preview__box {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--brand-primary-border);
    border-radius: 12px;
    background: var(--brand-primary-soft);
}

.personalization-preview__box strong {
    display: block;
    color: var(--color-text);
    font-size: .9rem;
}

.personalization-preview__box p {
    margin: 5px 0 0;
    color: var(--color-text-muted);
    white-space: pre-line;
    font-size: .72rem;
}

.personalization-preview__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--brand-primary-contrast, #fff);
    font-size: .56rem;
    font-weight: 800;
}

body.lightbox-open {
    overflow: hidden;
}

.system-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.system-lightbox[hidden] {
    display: none !important;
}

.system-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 22, .74);
    opacity: 0;
    transition: opacity .18s ease;
    backdrop-filter: blur(2px);
}

.system-lightbox__dialog {
    position: relative;
    z-index: 1;
    overflow: hidden;
    width: min(820px, 100%);
    max-height: min(88vh, 900px);
    border: 1px solid color-mix(in srgb, var(--color-border) 80%, transparent);
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow: 0 28px 80px rgba(0,0,0,.35);
    opacity: 0;
    transform: translateY(14px) scale(.985);
    transition: opacity .18s ease, transform .18s ease;
}

.system-lightbox.is-open .system-lightbox__backdrop {
    opacity: 1;
}

.system-lightbox.is-open .system-lightbox__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.system-lightbox__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 999px;
    background: rgba(15,23,42,.72);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
    cursor: pointer;
}

.system-lightbox__close svg {
    width: 17px;
    height: 17px;
}

.system-lightbox__close:hover {
    background: rgba(15,23,42,.92);
}

.system-lightbox__close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 45%, #fff);
    outline-offset: 2px;
}

.system-lightbox__media {
    overflow: hidden;
    background: #050b16;
}

.system-lightbox__media img,
.system-lightbox__media video,
.system-lightbox__media iframe {
    display: block;
    width: 100%;
    max-height: 56vh;
    border: 0;
}

.system-lightbox__media img {
    object-fit: contain;
}

.system-lightbox__media video {
    background: #000;
}

.system-lightbox__media iframe {
    aspect-ratio: 16 / 9;
}

.system-lightbox__content {
    padding: 22px 24px 24px;
}

.system-lightbox__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--color-primary);
    font-size: .62rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.system-lightbox__content h2 {
    margin: 0;
    padding-right: 34px;
    color: var(--color-text);
    font-size: 1.35rem;
    line-height: 1.25;
}

.system-lightbox__content p {
    margin: 10px 0 0;
    color: var(--color-text-muted);
    white-space: pre-line;
    font-size: .84rem;
    line-height: 1.62;
}

.system-lightbox__action {
    margin-top: 18px;
}

@media (max-width: 720px) {
    .system-lightbox {
        padding: 12px;
    }

    .system-lightbox__dialog {
        max-height: 92vh;
        border-radius: 13px;
    }

    .system-lightbox__content {
        padding: 18px;
    }

    .system-lightbox__content h2 {
        font-size: 1.05rem;
    }

    .system-lightbox__content p {
        font-size: .76rem;
    }

    .personalization-form .card-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .system-lightbox__backdrop,
    .system-lightbox__dialog {
        transition: none;
    }
}

@media print {
    .system-lightbox {
        display: none !important;
    }
}


/* FASE 02.5.05A — RECURSOS / PERSONALIZAÇÕES EM SANFONA */
.personalization-resources {
    display: grid;
    gap: 12px;
}

.personalization-resource-accordion {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.personalization-resource-accordion > summary {
    min-height: 64px;
    padding: 14px 16px;
    background: color-mix(in srgb, var(--color-primary) 4%, var(--color-surface));
}

.personalization-resource-accordion[open] > summary {
    border-bottom: 1px solid var(--color-border);
}

.personalization-resource-accordion > summary .municipio-accordion-heading {
    min-width: 0;
    flex: 1 1 auto;
}

.personalization-resource-accordion > summary .municipio-accordion-heading strong {
    display: flex;
    align-items: center;
    gap: 7px;
}

.personalization-resource-accordion > summary .municipio-accordion-heading strong i {
    color: var(--color-primary);
}

.personalization-resource-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 62px;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-background);
    color: var(--color-text-muted);
    font-size: .56rem;
    font-weight: 850;
    letter-spacing: .04em;
}

.personalization-resource-accordion[open] .personalization-resource-status {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.personalization-resource-accordion__content {
    padding: 0 !important;
}

.personalization-form--accordion {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.personalization-form--accordion > .card-header {
    margin: 0;
    border-radius: 0;
}

.personalization-resource-accordion .form-actions {
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .personalization-resource-accordion > summary {
        align-items: flex-start;
        gap: 8px;
    }

    .personalization-resource-status {
        min-width: auto;
    }
}


/* FASE 02.5.05B — ESPAÇAMENTO INTERNO + PREVIEW DE IMAGEM/VÍDEO */
.personalization-resource-accordion__content {
    padding: 18px !important;
}

.personalization-form--accordion {
    padding: 0;
}

.personalization-form--accordion > .card-header {
    margin-bottom: 16px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--color-border);
}

.personalization-form--accordion .form-grid,
.personalization-form--accordion .personalization-media-section,
.personalization-form--accordion .personalization-options,
.personalization-form--accordion .personalization-preview,
.personalization-form--accordion .form-actions {
    padding-left: 0;
    padding-right: 0;
}

.personalization-format-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 7px;
    padding: 8px 10px;
    border: 1px solid var(--brand-primary-border);
    border-radius: 8px;
    background: var(--brand-primary-soft);
    color: var(--color-text-muted);
    font-size: .63rem;
    line-height: 1.45;
}

.personalization-format-note i {
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--color-primary);
}

.personalization-live-preview {
    display: grid;
    place-items: center;
    overflow: hidden;
    min-height: 180px;
    border: 1px dashed var(--brand-primary-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand-primary-soft) 42%, var(--color-surface));
}

.personalization-live-preview--image img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    background: var(--color-background);
}

.personalization-live-preview--video {
    min-height: 240px;
    background: #050b16;
}

.personalization-live-preview--video video,
.personalization-live-preview--video iframe {
    display: block;
    width: 100%;
    max-height: 420px;
    border: 0;
    background: #000;
}

.personalization-live-preview--video iframe {
    aspect-ratio: 16 / 9;
}

.personalization-live-preview__empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 28px 18px;
    color: var(--color-text-muted);
    text-align: center;
    font-size: .68rem;
}

.personalization-live-preview__empty i {
    color: var(--color-primary);
    font-size: 1.35rem;
}

@media (max-width: 720px) {
    .personalization-resource-accordion__content {
        padding: 14px !important;
    }

    .personalization-live-preview {
        min-height: 150px;
    }

    .personalization-live-preview--video {
        min-height: 190px;
    }
}


/* FASE 02.5.05C — PREVIEW ÚNICO DE IMAGEM */
.personalization-current-media--live {
    display: grid;
    place-items: center;
    width: min(100%, 360px);
    min-height: 150px;
    margin-bottom: 8px;
}

.personalization-current-media--live img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.personalization-current-media__empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 24px 16px;
    color: var(--color-text-muted);
    text-align: center;
    font-size: .66rem;
}

.personalization-current-media__empty i {
    color: var(--color-primary);
    font-size: 1.25rem;
}


/* FASE 02.5.05D — FALLBACK ILUSTRADO DA IMAGEM */
.personalization-current-media__empty--illustrated {
    min-width: 100%;
    min-height: 150px;
}

.personalization-current-media__illustration {
    display: block;
    width: 112px;
    height: auto;
    color: var(--color-primary);
}

.personalization-current-media__empty--illustrated strong {
    color: var(--color-text);
    font-size: .72rem;
}

.personalization-current-media__empty--illustrated span {
    max-width: 260px;
    line-height: 1.4;
}


/* =========================================================
   FASE 02.5.06 — CONTROLES FIXOS À DIREITA
   Acessibilidade + Tema somente por ícones
   ========================================================= */
.fixed-utility-rail {
    position: fixed;
    top: 50%;
    right: 16px;
    z-index: 1450;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-50%);
}

.fixed-utility-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
    cursor: pointer;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.fixed-utility-button > i {
    font-size: 1rem;
}

.fixed-utility-button:hover {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .16);
    transform: translateX(-2px);
}

.fixed-utility-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 28%, transparent);
    outline-offset: 3px;
}

.fixed-utility-button[aria-expanded="true"] {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--brand-primary-contrast, #fff);
}

.accessibility-panel--fixed {
    position: absolute;
    top: 0;
    right: calc(100% + 12px);
    left: auto;
    width: min(360px, calc(100vw - 92px));
    max-height: min(78vh, 650px);
    overflow-y: auto;
    z-index: 1460;
}

@media (max-width: 768px) {
    .fixed-utility-rail {
        top: auto;
        right: 12px;
        bottom: 72px;
        transform: none;
    }

    .fixed-utility-button {
        width: 40px;
        height: 40px;
        border-radius: 9px;
    }

    .accessibility-panel--fixed {
        position: fixed;
        top: 70px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - 100px);
    }
}

@media print {
    .fixed-utility-rail {
        display: none !important;
    }
}


/* FASE 02.5.06A — CONTROLES FIXOS MAIS ALTOS */
.fixed-utility-rail {
    top: 26% !important;
    transform: translateY(-26%) !important;
}

.accessibility-panel--fixed {
    top: -24px !important;
    max-height: calc(100vh - 48px) !important;
}

@media (max-width: 768px) {
    .fixed-utility-rail {
        top: 82px !important;
        right: 12px;
        bottom: auto !important;
        transform: none !important;
    }

    .accessibility-panel--fixed {
        top: 58px !important;
        right: 64px !important;
        left: 12px !important;
        width: auto !important;
        max-height: calc(100vh - 82px) !important;
    }
}


/* =========================================================
   FASE 02.5.07 — IDENTIDADE DO MUNICÍPIO NO CABEÇALHO
   ========================================================= */
.app-logo--municipio {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 78px;
    min-height: 60px;
    padding: 6px 3px;
    overflow: hidden;
    border-radius: 8px;
    background: transparent;
}

.app-logo__municipio-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.app-logo__fallback {
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

@media (max-width: 768px) {
    .app-header {
        min-height: 72px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .app-logo--municipio {
        width: 54px;
        min-height: 48px;
        padding: 4px 2px;
    }

    .app-logo__fallback {
        font-size: 1rem;
    }
}


/* =========================================================
   FASE 02.5.08 — MENU PRINCIPAL HORIZONTAL + PESQUISA GLOBAL
   ========================================================= */
.app-header__brand {
    flex: 0 1 360px;
}

.app-header__center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.header-main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.header-main-nav__group {
    position: relative;
}

.header-main-nav__trigger,
.header-global-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--color-text);
    font-size: .76rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.header-main-nav__trigger:hover,
.header-main-nav__trigger[aria-expanded="true"],
.header-global-search-button:hover {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.header-main-nav__trigger:focus-visible,
.header-global-search-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 24%, transparent);
    outline-offset: 2px;
}

.header-main-nav__trigger > i:first-child {
    font-size: .9rem;
}

.header-main-nav__chevron {
    font-size: .55rem;
    transition: transform var(--transition-fast);
}

.header-main-nav__trigger[aria-expanded="true"] .header-main-nav__chevron {
    transform: rotate(180deg);
}

.header-main-nav__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 1650;
    width: min(520px, 76vw);
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
    transform: translateX(-50%);
}

.header-main-nav__dropdown--wide {
    width: min(620px, 78vw);
}

.header-main-nav__dropdown--right {
    right: 0;
    left: auto;
    transform: none;
}

.header-main-nav__dropdown[hidden] {
    display: none !important;
}

.header-main-nav__dropdown-title {
    margin: 2px 4px 9px;
    color: var(--color-text-muted);
    font-size: .6rem;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.header-main-nav__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.header-main-nav__grid > a {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 9px;
    border-radius: 9px;
    color: var(--color-text);
    text-decoration: none;
}

.header-main-nav__grid > a:hover,
.header-main-nav__grid > a:focus-visible {
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    outline: none;
}

.header-main-nav__grid > a > i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--color-primary) 9%, var(--color-surface));
    color: var(--color-primary);
}

.header-main-nav__grid strong,
.header-main-nav__grid small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-main-nav__grid strong {
    font-size: .68rem;
}

.header-main-nav__grid small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .57rem;
}

.header-global-search-button {
    flex: 0 0 40px;
    width: 40px;
    padding: 0;
    border-color: var(--color-border);
    background: var(--color-surface);
    box-shadow: 0 2px 8px rgba(15,23,42,.06);
}

body.global-search-open {
    overflow: hidden;
}

.global-search {
    position: fixed;
    inset: 0;
    z-index: 5600;
    display: grid;
    place-items: start center;
    padding: min(12vh, 110px) 18px 30px;
}

.global-search[hidden] {
    display: none !important;
}

.global-search__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 9, 20, .78);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .18s ease;
}

.global-search__dialog {
    position: relative;
    z-index: 1;
    overflow: hidden;
    width: min(820px, 100%);
    max-height: min(76vh, 760px);
    border: 1px solid color-mix(in srgb, var(--color-border) 80%, transparent);
    border-radius: 18px;
    background: var(--color-surface);
    box-shadow: 0 30px 90px rgba(0,0,0,.38);
    opacity: 0;
    transform: translateY(-12px) scale(.985);
    transition: opacity .18s ease, transform .18s ease;
}

.global-search.is-open .global-search__backdrop {
    opacity: 1;
}

.global-search.is-open .global-search__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.global-search__topbar {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 36px;
    align-items: center;
    gap: 10px;
    padding: 16px 18px 11px;
}

.global-search__brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.global-search__topbar h2,
.global-search__topbar p {
    margin: 0;
}

.global-search__topbar h2 {
    color: var(--color-text);
    font-size: 1rem;
}

.global-search__topbar p {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .65rem;
}

.global-search__close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-background);
    color: var(--color-text-muted);
    cursor: pointer;
}

.global-search__field-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 18px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-background);
    box-shadow: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.global-search__field-wrap:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.global-search__field-wrap > i {
    color: var(--color-primary);
}

.global-search__input {
    min-width: 0;
    flex: 1;
    height: 50px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font-size: .9rem;
}

.global-search__input:focus,
.global-search__input:focus-visible {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.global-search__field-wrap kbd,
.global-search__help kbd {
    padding: 2px 5px;
    border: 1px solid var(--color-border);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-family: inherit;
    font-size: .55rem;
}

.global-search__help {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 18px 11px;
    color: var(--color-text-muted);
    font-size: .58rem;
}

.global-search__status {
    min-height: 18px;
    padding: 0 18px 5px;
    color: var(--color-text-muted);
    font-size: .6rem;
}

.global-search__results {
    overflow-y: auto;
    max-height: min(50vh, 480px);
    padding: 0 12px 14px;
}

.global-search__empty-state {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 34px 22px 38px;
    color: var(--color-text-muted);
    text-align: center;
}

.global-search__empty-state > i {
    margin-bottom: 5px;
    color: var(--color-primary);
    font-size: 1.75rem;
}

.global-search__empty-state strong {
    color: var(--color-text);
    font-size: .8rem;
}

.global-search__empty-state span {
    max-width: 540px;
    font-size: .64rem;
    line-height: 1.5;
}

.global-search__group-title {
    padding: 10px 8px 5px;
    color: var(--color-text-muted);
    font-size: .56rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.global-search__result {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 10px;
    color: var(--color-text);
    text-decoration: none;
}

.global-search__result:hover,
.global-search__result:focus-visible,
.global-search__result.is-active {
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    outline: none;
}

.global-search__result-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-primary) 9%, var(--color-surface));
    color: var(--color-primary);
}

.global-search__result strong,
.global-search__result small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search__result strong {
    font-size: .7rem;
}

.global-search__result small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .58rem;
}

.global-search__result > i:last-child {
    color: var(--color-text-muted);
    font-size: .65rem;
}

@media (max-width: 1450px) {
    .app-header__brand { flex-basis: 300px; }
    .header-main-nav__trigger { padding: 0 8px; }
    .header-main-nav__trigger span { display: none; }
    .header-main-nav__chevron { display: none; }
}

@media (max-width: 1120px) {
    .header-main-nav { display: none; }
    .app-header__center { justify-content: flex-end; }
}

@media (max-width: 768px) {
    .app-header__center { flex: 0 0 auto; }
    .header-global-search-button { width: 38px; height: 38px; min-height: 38px; }
    .global-search { padding: 66px 10px 14px; }
    .global-search__dialog { max-height: calc(100vh - 80px); border-radius: 14px; }
    .global-search__topbar { grid-template-columns: 36px minmax(0,1fr) 34px; padding: 12px; }
    .global-search__brand-icon { width: 36px; height: 36px; }
    .global-search__topbar p { display: none; }
    .global-search__field-wrap { margin: 0 12px; }
    .global-search__help { padding: 8px 12px 10px; }
    .global-search__help span:first-child { display: none; }
    .global-search__results { max-height: 54vh; }
}

@media (prefers-reduced-motion: reduce) {
    .global-search__backdrop,
    .global-search__dialog,
    .header-main-nav__chevron { transition: none; }
}

@media print {
    .app-header__center,
    .global-search { display: none !important; }
}


/* =========================================================
   FASE 02.5.09 — SUPORTE / BASE DE CONHECIMENTO / ATALHOS / CONTATO
   ========================================================= */
.header-main-nav__dropdown--support {
    width: min(360px, 78vw);
}

.header-main-nav__grid--single {
    grid-template-columns: 1fr;
}

.support-page-header {
    align-items: flex-end;
}

.support-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: var(--color-primary);
    font-size: .63rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.support-hero,
.support-shortcut-intro {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.support-hero__icon {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    font-size: 1.05rem;
}

.support-hero h2,
.support-shortcut-intro h2 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.support-hero p,
.support-shortcut-intro p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .73rem;
    line-height: 1.55;
}

.support-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.support-topic-card {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 11px;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.support-topic-card > i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-topic-card h3 {
    margin: 1px 0 4px;
    font-size: .76rem;
}

.support-topic-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .64rem;
    line-height: 1.5;
}

.support-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.support-section-heading span {
    display: block;
    margin-bottom: 2px;
    color: var(--color-primary);
    font-size: .56rem;
    font-weight: 850;
    letter-spacing: .07em;
}

.support-section-heading h2 {
    margin: 0;
    font-size: .92rem;
}

.support-faq__item {
    border-top: 1px solid var(--color-border);
}

.support-faq__item:last-child {
    border-bottom: 1px solid var(--color-border);
}

.support-faq__item summary {
    position: relative;
    padding: 13px 34px 13px 2px;
    color: var(--color-text);
    font-size: .72rem;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
}

.support-faq__item summary::-webkit-details-marker {
    display: none;
}

.support-faq__item summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 6px;
    color: var(--color-primary);
    font-size: 1rem;
    transform: translateY(-50%);
}

.support-faq__item[open] summary::after {
    content: "−";
}

.support-faq__item > div {
    padding: 0 34px 13px 2px;
}

.support-faq__item p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .67rem;
    line-height: 1.6;
}

.support-next-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
    margin-top: 16px;
}

.support-next-card {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
}

.support-next-card:hover,
.support-next-card:focus-visible {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    outline: none;
}

.support-next-card > i:first-child {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-next-card strong,
.support-next-card small {
    display: block;
}

.support-next-card strong {
    font-size: .7rem;
}

.support-next-card small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .59rem;
}

.support-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.support-shortcut-card {
    display: grid;
    grid-template-columns: minmax(120px,.55fr) minmax(0,1fr);
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
}

.support-shortcut-card__keys {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.support-shortcut-card kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid var(--color-border);
    border-bottom-width: 3px;
    border-radius: 7px;
    background: var(--color-background);
    color: var(--color-text);
    font: inherit;
    font-size: .68rem;
    font-weight: 850;
}

.support-shortcut-card h3 {
    margin: 0 0 4px;
    font-size: .75rem;
}

.support-shortcut-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .64rem;
    line-height: 1.5;
}

.support-tip-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
}

.support-tip-card > i {
    margin-top: 2px;
    color: var(--color-primary);
}

.support-tip-card strong {
    display: block;
    margin-bottom: 3px;
    font-size: .7rem;
}

.support-tip-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .63rem;
}

.support-contact-layout {
    display: grid;
    grid-template-columns: minmax(240px, .36fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.support-contact-sidebar {
    display: grid;
    gap: 12px;
    position: sticky;
    top: 18px;
}

.support-company-card {
    text-align: center;
}

.support-company-card__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 10px;
    border-radius: 14px;
    background: var(--color-primary);
    color: var(--brand-primary-contrast,#fff);
    font-size: 1.2rem;
}

.support-company-card h2 {
    margin: 0 0 5px;
    font-size: .95rem;
}

.support-company-card > p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .65rem;
    line-height: 1.5;
}

.support-company-card__list {
    display: grid;
    gap: 8px;
    margin: 15px 0 0;
    padding: 13px 0 0;
    border-top: 1px solid var(--color-border);
    list-style: none;
    text-align: left;
}

.support-company-card__list li {
    display: grid;
    grid-template-columns: 20px minmax(0,1fr);
    gap: 7px;
    align-items: start;
    color: var(--color-text-muted);
    font-size: .61rem;
    line-height: 1.45;
}

.support-company-card__list i {
    color: var(--color-primary);
    text-align: center;
}

.support-contact-tip {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.support-contact-tip > i {
    color: var(--color-primary);
    margin-top: 2px;
}

.support-contact-tip strong {
    display: block;
    margin-bottom: 3px;
    font-size: .67rem;
}

.support-contact-tip p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .6rem;
    line-height: 1.45;
}

.support-contact-form {
    padding: 18px;
}

.support-form-section + .support-form-section {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.form-label-optional {
    color: var(--color-text-muted);
    font-size: .6rem;
    font-weight: 500;
}

.support-context-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 18px;
    padding: 11px 12px;
    border: 1px solid var(--brand-primary-border);
    border-radius: 9px;
    background: var(--brand-primary-soft);
}

.support-context-note > i {
    color: var(--color-primary);
    margin-top: 2px;
}

.support-context-note strong {
    display: block;
    margin-bottom: 2px;
    font-size: .66rem;
}

.support-context-note p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .59rem;
    line-height: 1.45;
}

.support-consent {
    margin-top: 12px;
}

.support-contact-actions {
    justify-content: space-between;
}

@media (max-width: 1050px) {
    .support-topic-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .support-contact-layout {
        grid-template-columns: 1fr;
    }

    .support-contact-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 720px) {
    .support-topic-grid,
    .support-shortcut-grid,
    .support-next-actions,
    .support-contact-sidebar {
        grid-template-columns: 1fr;
    }

    .support-shortcut-card {
        grid-template-columns: 1fr;
    }

    .support-contact-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .support-contact-actions .btn {
        width: 100%;
    }
}


/* =========================================================
   FASE 02.5.10 — MENU PRINCIPAL COM HOVER NO 2º NÍVEL
   ========================================================= */
.header-main-nav__group::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

@media (hover: none) {
    .header-main-nav__group::after {
        display: none;
    }
}


/* =========================================================
   FASE 02.5.10A — BOTÃO SAIR EM DESTAQUE
   ========================================================= */
.header-logout {
    border-color: var(--color-danger) !important;
    background: var(--color-danger) !important;
    color: #ffffff !important;
    font-weight: 750;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--color-danger) 22%, transparent);
}

.header-logout > i,
.header-logout .header-button__label {
    color: #ffffff !important;
}

.header-logout:hover {
    border-color: color-mix(in srgb, var(--color-danger) 82%, #000000) !important;
    background: color-mix(in srgb, var(--color-danger) 82%, #000000) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--color-danger) 30%, transparent);
}

.header-logout:active {
    transform: translateY(1px);
}

.header-logout:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-danger) 38%, transparent) !important;
    outline-offset: 3px;
}

[data-theme="dark"] .header-logout {
    color: #ffffff !important;
}


/* =========================================================
   FASE 02.5.11 — NOTAS FISCAIS NO CADASTRO DE AQUISIÇÃO
   ========================================================= */
.acquisition-invoice-section {
    margin-top: 16px;
}

.acquisition-invoice-section .form-section__title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.acquisition-invoice-section .form-section__title i {
    color: var(--color-primary);
}

.acquisition-invoice-upload {
    display: grid;
    grid-template-columns: 48px minmax(0,1fr);
    gap: 13px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: color-mix(in srgb, var(--brand-primary-soft) 32%, var(--color-surface));
}

.acquisition-invoice-upload__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 11px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    font-size: 1.05rem;
}

.acquisition-invoice-upload__content {
    min-width: 0;
}

.acquisition-invoice-upload__input {
    margin-top: 4px;
}

.acquisition-invoice-selection {
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.acquisition-invoice-selection[hidden] {
    display: none !important;
}

.acquisition-invoice-selection__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-bottom: 1px solid var(--color-border);
    background: var(--brand-primary-soft);
    color: var(--color-text);
    font-size: .66rem;
}

.acquisition-invoice-selection__header strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.acquisition-invoice-selection__header strong i {
    color: var(--color-primary);
}

.acquisition-invoice-selection__header > span {
    color: var(--color-primary);
    font-weight: 800;
}

.acquisition-invoice-selection__list {
    display: grid;
}

.acquisition-invoice-file {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 9px;
    align-items: center;
    padding: 9px 11px;
    border-bottom: 1px solid var(--color-border);
}

.acquisition-invoice-file:last-child {
    border-bottom: 0;
}

.acquisition-invoice-file__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-primary);
}

.acquisition-invoice-file__meta {
    min-width: 0;
}

.acquisition-invoice-file__meta strong,
.acquisition-invoice-file__meta small {
    display: block;
}

.acquisition-invoice-file__meta strong {
    overflow: hidden;
    color: var(--color-text);
    font-size: .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acquisition-invoice-file__meta small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .57rem;
}

.acquisition-invoice-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid var(--brand-primary-border);
    border-radius: 9px;
    background: var(--brand-primary-soft);
}

.acquisition-invoice-note > i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--color-primary);
}

.acquisition-invoice-note p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .61rem;
    line-height: 1.5;
}

@media (max-width: 680px) {
    .acquisition-invoice-upload {
        grid-template-columns: 1fr;
    }

    .acquisition-invoice-upload__icon {
        width: 42px;
        height: 42px;
    }
}


/* =========================================================
   FASE 02.5.12 — CABEÇALHO STICKY INTELIGENTE
   ========================================================= */
html {
    scroll-padding-top: 76px;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1500;
    transition:
        min-height .18s ease,
        padding .18s ease,
        box-shadow .18s ease,
        border-color .18s ease,
        background .18s ease;
}

.app-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    pointer-events: none;
    background: transparent;
    transition: background .18s ease;
}

.app-header.is-scrolled {
    min-height: 64px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-bottom-color: color-mix(in srgb, var(--color-border) 75%, var(--color-primary));
    background: var(--color-surface);
    box-shadow: 0 7px 24px rgba(15, 23, 42, .10);
}

.app-header.is-scrolled::after {
    background: color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.app-header .app-logo--municipio,
.app-header .app-logo__municipio-image,
.app-header .app-header__brand-text,
.app-header .app-subtitle,
.app-header .app-header__context,
.app-header .header-user,
.app-header .header-button,
.app-header .header-main-nav__trigger,
.app-header .header-global-search-button {
    transition:
        width .18s ease,
        min-height .18s ease,
        height .18s ease,
        padding .18s ease,
        gap .18s ease,
        font-size .18s ease,
        opacity .18s ease,
        transform .18s ease;
}

.app-header.is-scrolled .app-logo--municipio {
    width: 60px;
    min-height: 46px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.app-header.is-scrolled .app-subtitle {
    font-size: .76rem;
}

.app-header.is-scrolled .app-header__context {
    font-size: .68rem;
}

.app-header.is-scrolled .header-button,
.app-header.is-scrolled .header-user,
.app-header.is-scrolled .header-main-nav__trigger,
.app-header.is-scrolled .header-global-search-button {
    min-height: 36px;
}

.app-header.is-scrolled .header-user__avatar {
    width: 26px;
    height: 26px;
}

.app-header.is-scrolled .header-user__name {
    font-size: .72rem;
}

.app-header.is-scrolled .header-user__meta {
    font-size: .58rem;
}

/* Mantém os dropdowns do Menu Principal acima do conteúdo
   quando o cabeçalho está em modo sticky. */
.app-header .header-main-nav__dropdown {
    z-index: 1700;
}

/* Evita que âncoras internas fiquem escondidas atrás do cabeçalho. */
[id] {
    scroll-margin-top: 76px;
}

@media (max-width: 980px) {
    .app-header.is-scrolled .app-header__brand-text {
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    .app-header {
        top: 0;
    }

    .app-header.is-scrolled {
        min-height: 60px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .app-header.is-scrolled .app-logo--municipio {
        width: 46px;
        min-height: 40px;
        padding: 1px;
    }

    .app-header.is-scrolled .app-header__brand-text {
        max-width: 150px;
    }

    [id] {
        scroll-margin-top: 70px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-header,
    .app-header::after,
    .app-header .app-logo--municipio,
    .app-header .app-logo__municipio-image,
    .app-header .app-header__brand-text,
    .app-header .app-subtitle,
    .app-header .app-header__context,
    .app-header .header-user,
    .app-header .header-button,
    .app-header .header-main-nav__trigger,
    .app-header .header-global-search-button {
        transition: none !important;
    }
}

@media print {
    .app-header {
        position: static !important;
        box-shadow: none !important;
    }
}


/* =========================================================
   FASE 02.5.12A — RESPIRO SUPERIOR DA SIDEBAR
   ========================================================= */
@media (min-width: 769px) {
    .sidebar-nav {
        padding-top: 10px;
    }
}


/* =========================================================
   FASE 02.5.12C — CONTEXTO INSTITUCIONAL EM MAIÚSCULAS
   ========================================================= */
.app-header__brand-text .app-header__context {
    text-transform: uppercase;
    letter-spacing: .015em;
}


/* =========================================================
   FASE 02.5.13 — CENTRAL ADMINISTRATIVA DE CHAMADOS
   ========================================================= */
.support-admin-page-header,
.support-ticket-detail-header {
    align-items: flex-end;
}

.support-admin-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.support-admin-stat {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 9px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.support-admin-stat:hover,
.support-admin-stat:focus-visible {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    outline: none;
}

.support-admin-stat__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-admin-stat__icon--danger {
    background: color-mix(in srgb, var(--color-danger) 12%, var(--color-surface));
    color: var(--color-danger);
}

.support-admin-stat small,
.support-admin-stat strong {
    display: block;
}

.support-admin-stat small {
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: .57rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-admin-stat strong {
    margin-top: 2px;
    font-size: 1.15rem;
}

.support-admin-filter-card {
    margin-bottom: 14px;
}

.support-admin-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(130px, .72fr)) auto;
    gap: 10px;
    align-items: end;
}

.support-admin-filters__actions {
    display: flex;
    gap: 7px;
    align-items: center;
    padding-bottom: 1px;
}

.support-admin-table-card {
    overflow: hidden;
}

.support-admin-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.support-admin-table-heading h2,
.support-admin-table-heading p {
    margin: 0;
}

.support-admin-table-heading h2 {
    font-size: .9rem;
}

.support-admin-table-heading p {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .6rem;
}

.support-admin-table-heading__total {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    font-size: .61rem;
    font-weight: 800;
}

.support-admin-ticket-link {
    display: grid;
    gap: 2px;
    color: var(--color-text);
    text-decoration: none;
}

.support-admin-ticket-link:hover strong {
    color: var(--color-primary);
}

.support-admin-ticket-link strong {
    font-size: .65rem;
}

.support-admin-ticket-link span {
    max-width: 300px;
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: .59rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-ticket-status,
.support-ticket-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .56rem;
    font-weight: 850;
    letter-spacing: .015em;
    white-space: nowrap;
}

.support-ticket-status--open {
    border-color: color-mix(in srgb, var(--color-primary) 32%, transparent);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-ticket-status--working {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.support-ticket-status--waiting-user {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.support-ticket-status--waiting-support {
    border-color: #ddd6fe;
    background: #f5f3ff;
    color: #6d28d9;
}

.support-ticket-status--resolved {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.support-ticket-status--closed {
    border-color: var(--color-border);
    background: var(--color-background);
    color: var(--color-text-muted);
}

.support-ticket-priority--critical {
    border-color: color-mix(in srgb, var(--color-danger) 42%, transparent);
    background: color-mix(in srgb, var(--color-danger) 10%, var(--color-surface));
    color: var(--color-danger);
}

.support-ticket-priority--high {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.support-ticket-priority--normal {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-ticket-priority--low {
    border-color: var(--color-border);
    background: var(--color-background);
    color: var(--color-text-muted);
}

.support-ticket-detail-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.support-ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .55fr);
    gap: 14px;
    align-items: start;
}

.support-ticket-main,
.support-ticket-sidebar {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.support-ticket-sidebar {
    position: sticky;
    top: 82px;
}

.support-ticket-message-card__header {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) auto;
    gap: 9px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.support-ticket-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-ticket-message-card__header strong,
.support-ticket-message-card__header span {
    display: block;
}

.support-ticket-message-card__header strong {
    font-size: .72rem;
}

.support-ticket-message-card__header span,
.support-ticket-message-card__header time {
    color: var(--color-text-muted);
    font-size: .59rem;
}

.support-ticket-message-card__body {
    padding-top: 15px;
    color: var(--color-text);
    font-size: .72rem;
    line-height: 1.7;
}

.support-ticket-history-count {
    color: var(--color-text-muted);
    font-size: .6rem;
}

.support-ticket-timeline {
    position: relative;
    display: grid;
    gap: 13px;
    margin: 4px 0 18px;
}

.support-ticket-timeline::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 17px;
    width: 2px;
    background: var(--color-border);
}

.support-ticket-event {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr);
    gap: 10px;
}

.support-ticket-event__dot {
    z-index: 1;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 4px solid var(--color-surface);
    border-radius: 50%;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-ticket-event--internal .support-ticket-event__dot {
    background: #fff7ed;
    color: #c2410c;
}

.support-ticket-event__content {
    padding: 11px 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-background);
}

.support-ticket-event--internal .support-ticket-event__content {
    border-color: #fed7aa;
    background: #fffaf5;
}

.support-ticket-event__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.support-ticket-event__meta strong {
    font-size: .65rem;
}

.support-ticket-event__meta time {
    color: var(--color-text-muted);
    font-size: .56rem;
}

.support-ticket-event__content p {
    margin: 8px 0 0;
    color: var(--color-text);
    font-size: .67rem;
    line-height: 1.6;
}

.support-ticket-event__footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 9px;
    color: var(--color-text-muted);
    font-size: .55rem;
}

.support-ticket-reply {
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.support-ticket-reply__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.support-ticket-reply__tabs label {
    cursor: pointer;
}

.support-ticket-reply__tabs input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.support-ticket-reply__tabs span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: .62rem;
    font-weight: 750;
}

.support-ticket-reply__tabs input:checked + span {
    border-color: var(--color-primary);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-ticket-reply__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.support-ticket-workflow-card .btn-block {
    width: 100%;
    margin-top: 10px;
}

.support-ticket-data-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.support-ticket-data-list > div {
    display: grid;
    gap: 2px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.support-ticket-data-list > div:last-child {
    border-bottom: 0;
}

.support-ticket-data-list dt {
    color: var(--color-text-muted);
    font-size: .55rem;
    font-weight: 750;
    text-transform: uppercase;
}

.support-ticket-data-list dd {
    margin: 0;
    color: var(--color-text);
    font-size: .64rem;
    line-height: 1.45;
}

.support-ticket-data-list__break {
    overflow-wrap: anywhere;
}

[data-theme="dark"] .support-ticket-status--working,
[data-theme="dark"] .support-ticket-status--waiting-user,
[data-theme="dark"] .support-ticket-status--waiting-support,
[data-theme="dark"] .support-ticket-status--resolved,
[data-theme="dark"] .support-ticket-priority--high,
[data-theme="dark"] .support-ticket-event--internal .support-ticket-event__content {
    background: var(--color-background);
}

@media (max-width: 1280px) {
    .support-admin-summary {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }

    .support-admin-filters {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }

    .support-admin-filters__search {
        grid-column: span 2;
    }
}

@media (max-width: 980px) {
    .support-ticket-layout {
        grid-template-columns: 1fr;
    }

    .support-ticket-sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    .support-admin-summary,
    .support-admin-filters {
        grid-template-columns: 1fr;
    }

    .support-admin-filters__search {
        grid-column: auto;
    }

    .support-admin-filters__actions,
    .support-ticket-reply__footer,
    .support-ticket-detail-header__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .support-admin-filters__actions .btn,
    .support-ticket-reply__footer .btn,
    .support-ticket-detail-header__actions .btn {
        width: 100%;
    }

    .support-ticket-event__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}


/* =========================================================
   FASE 02.5.14 — MEUS CHAMADOS
   ========================================================= */
.support-my-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.support-my-stat {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 9px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.support-my-stat:hover,
.support-my-stat:focus-visible {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    outline: none;
}

.support-my-stat > i {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-my-stat small,
.support-my-stat strong {
    display: block;
}

.support-my-stat small {
    color: var(--color-text-muted);
    font-size: .58rem;
}

.support-my-stat strong {
    margin-top: 2px;
    font-size: 1.1rem;
}

.support-my-filter-card {
    margin-bottom: 14px;
}

.support-my-filters {
    display: grid;
    grid-template-columns: minmax(260px,1.5fr) minmax(180px,.6fr) auto;
    gap: 10px;
    align-items: end;
}

.support-my-filters__actions {
    display: flex;
    gap: 7px;
}

.support-my-ticket-list {
    display: grid;
    gap: 10px;
}

.support-my-ticket-card {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 15px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition:
        border-color var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.support-my-ticket-card:hover,
.support-my-ticket-card:focus-visible {
    border-color: var(--brand-primary-border);
    background: color-mix(in srgb, var(--brand-primary-soft) 35%, var(--color-surface));
    box-shadow: 0 8px 24px rgba(15,23,42,.08);
    transform: translateY(-1px);
    outline: none;
}

.support-my-ticket-card__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-my-ticket-card__content {
    min-width: 0;
}

.support-my-ticket-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.support-my-ticket-card__top > strong {
    color: var(--color-primary);
    font-size: .61rem;
}

.support-my-ticket-card h2 {
    margin: 4px 0 6px;
    overflow: hidden;
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-my-ticket-card__meta {
    display: flex;
    gap: 13px;
    flex-wrap: wrap;
    color: var(--color-text-muted);
    font-size: .57rem;
}

.support-my-ticket-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.support-my-ticket-card__chevron {
    color: var(--color-text-muted);
}

.support-my-detail-header {
    align-items: flex-end;
}

.support-my-detail-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-my-detail-layout {
    display: grid;
    grid-template-columns: minmax(0,1.5fr) minmax(280px,.5fr);
    gap: 14px;
    align-items: start;
}

.support-my-detail-main,
.support-my-detail-sidebar {
    display: grid;
    gap: 14px;
}

.support-my-detail-sidebar {
    position: sticky;
    top: 82px;
}

.support-my-conversation__timeline {
    display: grid;
    gap: 10px;
}

.support-my-message {
    max-width: 88%;
    padding: 11px 12px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
}

.support-my-message--user {
    justify-self: end;
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
}

.support-my-message--admin {
    justify-self: start;
    background: var(--color-background);
}

.support-my-message__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.support-my-message__header strong {
    font-size: .61rem;
}

.support-my-message__header time {
    color: var(--color-text-muted);
    font-size: .54rem;
}

.support-my-message__body {
    color: var(--color-text);
    font-size: .67rem;
    line-height: 1.6;
}

.support-my-reply {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.support-my-closed-note {
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) auto;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-background);
}

.support-my-closed-note > i {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--color-border);
    color: var(--color-text-muted);
}

.support-my-closed-note strong,
.support-my-closed-note p {
    display: block;
    margin: 0;
}

.support-my-closed-note strong {
    font-size: .67rem;
}

.support-my-closed-note p {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .59rem;
}

.support-my-help-card {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
}

.support-my-help-card > i {
    margin-top: 2px;
    color: var(--color-primary);
}

.support-my-help-card strong {
    display: block;
    margin-bottom: 3px;
    font-size: .65rem;
}

.support-my-help-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .58rem;
    line-height: 1.5;
}

@media (max-width: 980px) {
    .support-my-detail-layout {
        grid-template-columns: 1fr;
    }

    .support-my-detail-sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    .support-my-summary {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .support-my-filters {
        grid-template-columns: 1fr;
    }

    .support-my-filters__actions,
    .support-my-detail-header__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .support-my-filters__actions .btn,
    .support-my-detail-header__actions .btn {
        width: 100%;
    }

    .support-my-ticket-card {
        grid-template-columns: 40px minmax(0,1fr) auto;
        padding: 12px;
    }

    .support-my-ticket-card__top {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .support-my-message {
        max-width: 96%;
    }

    .support-my-closed-note {
        grid-template-columns: 36px minmax(0,1fr);
    }

    .support-my-closed-note .btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}


/* =========================================================
   FASE 02.5.15 — ANEXOS EM CHAMADOS DE SUPORTE
   ========================================================= */
.support-attachment-uploader {
    display: grid;
    grid-template-columns: 48px minmax(0,1fr);
    gap: 12px;
    align-items: flex-start;
    padding: 13px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: color-mix(in srgb, var(--brand-primary-soft) 30%, var(--color-surface));
}

.support-attachment-uploader__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 11px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    font-size: 1.05rem;
}

.support-attachment-uploader__content {
    min-width: 0;
}

.support-attachment-selection {
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.support-attachment-selection[hidden] {
    display: none !important;
}

.support-attachment-selection__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-bottom: 1px solid var(--color-border);
    background: var(--brand-primary-soft);
    font-size: .62rem;
}

.support-attachment-selection__header strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.support-attachment-selection__header strong i,
.support-attachment-selection__header > span {
    color: var(--color-primary);
}

.support-attachment-selection__header > span {
    font-weight: 800;
}

.support-attachment-selection__list {
    display: grid;
}

.support-attachment-file {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 9px;
    align-items: center;
    padding: 9px 11px;
    border-bottom: 1px solid var(--color-border);
}

.support-attachment-file:last-child {
    border-bottom: 0;
}

.support-attachment-file__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-primary);
}

.support-attachment-file__meta {
    min-width: 0;
}

.support-attachment-file__meta strong,
.support-attachment-file__meta small {
    display: block;
}

.support-attachment-file__meta strong {
    overflow: hidden;
    color: var(--color-text);
    font-size: .63rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-attachment-file__meta small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .56rem;
}

.support-attachment-security {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid var(--brand-primary-border);
    border-radius: 9px;
    background: var(--brand-primary-soft);
}

.support-attachment-security > i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--color-primary);
}

.support-attachment-security p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .59rem;
    line-height: 1.5;
}

.support-ticket-attachments {
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid var(--color-border);
}

.support-ticket-attachments__title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: .63rem;
}

.support-ticket-attachments__title i {
    color: var(--color-primary);
}

.support-ticket-attachments__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
}

.support-ticket-attachment {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 9px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-background);
    color: var(--color-text);
    text-decoration: none;
}

.support-ticket-attachment:hover,
.support-ticket-attachment:focus-visible {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    outline: none;
}

.support-ticket-attachment__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.support-ticket-attachment__meta {
    min-width: 0;
}

.support-ticket-attachment__meta strong,
.support-ticket-attachment__meta small {
    display: block;
}

.support-ticket-attachment__meta strong {
    overflow: hidden;
    font-size: .6rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-ticket-attachment__meta small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .54rem;
}

.support-ticket-attachment__download {
    color: var(--color-primary);
}

.support-my-message__attachments {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid color-mix(in srgb, var(--color-border) 75%, transparent);
}

.support-my-message__attachments > strong {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .58rem;
}

.support-my-message__attachments > a {
    display: grid;
    grid-template-columns: 20px minmax(0,1fr) auto;
    gap: 6px;
    align-items: center;
    padding: 6px 7px;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
}

.support-my-message__attachments > a:hover,
.support-my-message__attachments > a:focus-visible {
    border-color: var(--brand-primary-border);
    color: var(--color-primary);
    outline: none;
}

.support-my-message__attachments > a > i {
    color: var(--color-primary);
}

.support-my-message__attachments > a > span {
    overflow: hidden;
    font-size: .57rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-my-message__attachments > a > small {
    color: var(--color-text-muted);
    font-size: .52rem;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .support-attachment-uploader {
        grid-template-columns: 1fr;
    }

    .support-ticket-attachments__grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   FASE 02.5.16 — PESQUISA INTELIGENTE DE BENS
   ========================================================= */
.asset-search-page-header {
    align-items: flex-end;
}

.asset-search-eyebrow,
.asset-search-results__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-size: .57rem;
    font-weight: 850;
    letter-spacing: .055em;
}

.asset-search-page-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.asset-search-hero {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--brand-primary-soft) 56%, var(--color-surface)),
            var(--color-surface) 66%
        );
    box-shadow: var(--shadow-sm);
}

.asset-search-main-field {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 7px 7px 7px 14px;
    border: 1px solid var(--brand-primary-border);
    border-radius: 12px;
    background: var(--color-surface);
    box-shadow: 0 5px 20px rgba(15,23,42,.06);
}

.asset-search-main-field:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.asset-search-main-field > i {
    color: var(--color-primary);
    font-size: .9rem;
}

.asset-search-main-field input {
    min-width: 0;
    height: 42px;
    padding: 0 4px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: .73rem;
}

.asset-search-main-field input::placeholder {
    color: var(--color-text-muted);
}

.asset-search-main-field__clear {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--color-text-muted);
    text-decoration: none;
}

.asset-search-main-field__clear:hover {
    background: var(--color-background);
    color: var(--color-text);
}

.asset-search-quick-hints {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin: 9px 2px 0;
}

.asset-search-quick-hints span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-surface) 82%, transparent);
    color: var(--color-text-muted);
    font-size: .53rem;
}

.asset-search-quick-hints i {
    color: var(--color-primary);
}

.asset-search-filters {
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
}

.asset-search-filters summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.asset-search-filters summary::-webkit-details-marker {
    display: none;
}

.asset-search-filters summary > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-text);
    font-size: .64rem;
    font-weight: 800;
}

.asset-search-filters summary > span:first-child i {
    color: var(--color-primary);
}

.asset-search-filters__summary-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: .55rem;
}

.asset-search-filters__summary-help i {
    transition: transform .18s ease;
}

.asset-search-filters[open] .asset-search-filters__summary-help i {
    transform: rotate(180deg);
}

.asset-search-filters__body {
    padding: 0 12px 12px;
    border-top: 1px solid var(--color-border);
}

.asset-search-filter-group {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.asset-search-filter-group:last-of-type {
    border-bottom: 0;
}

.asset-search-filter-group__title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    color: var(--color-text);
    font-size: .61rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.asset-search-filter-group__title i {
    color: var(--color-primary);
}

.asset-search-filter-grid {
    display: grid;
    gap: 9px;
}

.asset-search-filter-grid--2 {
    grid-template-columns: repeat(2, minmax(0,1fr));
}

.asset-search-filter-grid--3 {
    grid-template-columns: repeat(3, minmax(0,1fr));
}

.asset-search-filter-grid--4 {
    grid-template-columns: repeat(4, minmax(0,1fr));
}

.asset-search-filter-grid--nested {
    gap: 7px;
}

.asset-search-date-range,
.asset-search-value-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 7px;
}

.asset-search-filters__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
}

.asset-search-results__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.asset-search-results__header h2,
.asset-search-results__header p {
    margin: 0;
}

.asset-search-results__header h2 {
    margin-top: 2px;
    font-size: .9rem;
}

.asset-search-results__header p {
    margin-top: 3px;
    color: var(--color-text-muted);
    font-size: .58rem;
}

.asset-search-view-toggle {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-surface);
}

.asset-search-view-toggle button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    font: inherit;
    font-size: .56rem;
    font-weight: 750;
}

.asset-search-view-toggle button.is-active {
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.asset-search-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
}

.asset-result-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition:
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.asset-result-card:hover,
.asset-result-card:focus-visible {
    border-color: var(--brand-primary-border);
    box-shadow: 0 9px 26px rgba(15,23,42,.09);
    transform: translateY(-1px);
    outline: none;
}

.asset-result-card__top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border-bottom: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--brand-primary-soft) 48%, var(--color-surface));
}

.asset-result-card__tomb {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-primary);
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .025em;
}

.asset-result-card__status {
    overflow: hidden;
    max-width: 44%;
    color: var(--color-text-muted);
    font-size: .54rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-result-card__body {
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 11px 10px;
}

.asset-result-card__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.asset-result-card__main {
    min-width: 0;
}

.asset-result-card__main h3,
.asset-result-card__main p {
    margin: 0;
}

.asset-result-card__main h3 {
    overflow: hidden;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-result-card__main p {
    margin-top: 3px;
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: .57rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-result-card__arrow {
    color: var(--color-primary);
    opacity: .65;
}

.asset-result-card__facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 1px;
    margin: 0 11px 10px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-border);
}

.asset-result-card__facts > span {
    min-width: 0;
    padding: 8px;
    background: var(--color-background);
    color: var(--color-text-muted);
    font-size: .53rem;
}

.asset-result-card__facts > span > i {
    margin-right: 4px;
    color: var(--color-primary);
}

.asset-result-card__facts strong {
    display: block;
    margin: 3px 0 2px;
    color: var(--color-text);
    font-size: .52rem;
    text-transform: uppercase;
}

.asset-result-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 11px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: .53rem;
}

.asset-search-table-wrap[hidden],
.asset-search-cards[hidden] {
    display: none !important;
}

.asset-search-table td > strong {
    display: block;
}

.asset-search-empty {
    min-height: 250px;
}

@media (max-width: 1180px) {
    .asset-search-filter-grid--4 {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .asset-result-card__facts {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 820px) {
    .asset-search-cards,
    .asset-search-filter-grid--3,
    .asset-search-filter-grid--4 {
        grid-template-columns: 1fr;
    }

    .asset-search-main-field {
        grid-template-columns: auto minmax(0,1fr) auto;
    }

    .asset-search-main-field .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .asset-search-main-field__clear {
        grid-column: 3;
    }

    .asset-search-page-header__actions,
    .asset-search-results__header {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .asset-search-filter-grid--2,
    .asset-search-date-range,
    .asset-search-value-range,
    .asset-result-card__facts {
        grid-template-columns: 1fr;
    }

    .asset-search-filters summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .asset-search-filters__actions,
    .asset-search-view-toggle {
        width: 100%;
    }

    .asset-search-filters__actions {
        flex-direction: column-reverse;
    }

    .asset-search-filters__actions .btn,
    .asset-search-view-toggle button {
        width: 100%;
        justify-content: center;
    }

    .asset-result-card__footer {
        flex-direction: column;
    }
}


/* =========================================================
   FASE 02.5.17 — PESQUISAS SALVAS E RECENTES
   ========================================================= */
.asset-search-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.asset-search-shortcuts__column {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.asset-search-shortcuts__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.asset-search-shortcuts__heading h2 {
    margin: 2px 0 0;
    font-size: .76rem;
}

.asset-search-shortcuts__empty {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 9px;
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: .58rem;
}

.asset-search-shortcuts__empty i {
    color: var(--color-primary);
}

.asset-search-saved-list,
.asset-search-recent-list {
    display: grid;
    gap: 6px;
}

.asset-search-saved-item {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 5px;
    align-items: stretch;
}

.asset-search-saved-item > a,
.asset-search-recent-item {
    display: grid;
    grid-template-columns: 32px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-text);
    text-decoration: none;
}

.asset-search-saved-item > a:hover,
.asset-search-saved-item > a:focus-visible,
.asset-search-recent-item:hover,
.asset-search-recent-item:focus-visible {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    outline: none;
}

.asset-search-saved-item__icon,
.asset-search-recent-item__icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.asset-search-saved-item__text,
.asset-search-recent-item__text {
    min-width: 0;
}

.asset-search-saved-item__text strong,
.asset-search-saved-item__text small,
.asset-search-recent-item__text strong,
.asset-search-recent-item__text small {
    display: block;
}

.asset-search-saved-item__text strong,
.asset-search-recent-item__text strong {
    overflow: hidden;
    font-size: .61rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-search-saved-item__text small,
.asset-search-recent-item__text small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: .53rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-search-saved-item > form {
    display: flex;
}

.asset-search-saved-item > form button {
    width: 34px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
}

.asset-search-saved-item > form button:hover,
.asset-search-saved-item > form button:focus-visible {
    border-color: color-mix(in srgb, var(--color-danger) 40%, var(--color-border));
    background: color-mix(in srgb, var(--color-danger) 8%, var(--color-surface));
    color: var(--color-danger);
    outline: none;
}

.asset-search-save-dialog {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: 18px;
}

.asset-search-save-dialog[hidden] {
    display: none !important;
}

.asset-search-save-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.54);
    backdrop-filter: blur(3px);
}

.asset-search-save-dialog__panel {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
    box-shadow: 0 26px 70px rgba(15,23,42,.24);
}

.asset-search-save-dialog__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-text-muted);
    cursor: pointer;
}

.asset-search-save-dialog__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    font-size: 1rem;
}

.asset-search-save-dialog__panel h2 {
    margin: 0;
    font-size: .9rem;
}

.asset-search-save-dialog__panel > p {
    margin: 4px 0 13px;
    color: var(--color-text-muted);
    font-size: .61rem;
    line-height: 1.5;
}

@media (max-width: 820px) {
    .asset-search-shortcuts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .asset-search-shortcuts__heading {
        align-items: stretch;
        flex-direction: column;
    }

    .asset-search-shortcuts__heading .btn {
        width: 100%;
    }
}


/* =========================================================
   FASE 02.5.18 — ORDENAÇÃO E PAGINAÇÃO DA PESQUISA DE BENS
   ========================================================= */
.asset-search-results__header {
    flex-wrap: wrap;
}

.asset-search-result-controls {
    display: flex;
    gap: 7px;
    align-items: flex-end;
    margin-left: auto;
}

.asset-search-result-controls label {
    display: grid;
    gap: 3px;
}

.asset-search-result-controls label > span {
    color: var(--color-text-muted);
    font-size: .51rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.asset-search-result-controls select {
    min-height: 34px;
    padding: 5px 28px 5px 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: .57rem;
    cursor: pointer;
}

.asset-search-result-controls select:focus {
    border-color: var(--color-primary);
    outline: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.asset-search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
}

.asset-search-pagination__pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.asset-search-pagination__pages a,
.asset-search-pagination__arrow {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 7px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    font-size: .58rem;
    font-weight: 750;
}

.asset-search-pagination__pages a:hover,
.asset-search-pagination__arrow:hover {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.asset-search-pagination__pages a.is-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.asset-search-pagination__pages span {
    padding: 0 2px;
    color: var(--color-text-muted);
}

.asset-search-pagination__arrow.is-disabled {
    pointer-events: none;
    opacity: .38;
}

@media (max-width: 900px) {
    .asset-search-result-controls {
        width: 100%;
        margin-left: 0;
    }

    .asset-search-result-controls label {
        flex: 1 1 0;
    }

    .asset-search-result-controls select {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .asset-search-result-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .asset-search-pagination {
        gap: 4px;
    }

    .asset-search-pagination__pages a,
    .asset-search-pagination__arrow {
        min-width: 30px;
        height: 30px;
        padding: 0 5px;
    }
}


/* =========================================================
   FASE 02.5.19 — VERSÃO DO SISTEMA NA TELA DE LOGIN
   ========================================================= */
.auth-system-version {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 5px 8px;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, #ffffff 10%, transparent);
    color: inherit;
    font-size: .54rem;
    line-height: 1;
    opacity: .9;
}

.auth-system-version i {
    font-size: .58rem;
    opacity: .9;
}

.auth-system-version span {
    font-weight: 700;
    letter-spacing: .025em;
}

.auth-system-version strong {
    font-weight: 850;
}

@media (max-width: 720px) {
    .auth-system-version {
        margin-top: 6px;
        padding: 4px 7px;
    }
}


/* =========================================================
   FASE 02.5.20 — CONSULTA PATRIMONIAL PÚBLICA
   ========================================================= */
.qr-public-shell--search {
    width: min(1040px, calc(100% - 32px));
    margin-inline: auto;
}

.qr-public-mark--link {
    color: inherit;
    text-decoration: none;
}

.qr-public-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.qr-public-login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid #d7dfeb;
    border-radius: 9px;
    background: #fff;
    color: #475569;
    font-size: .62rem;
    font-weight: 750;
    text-decoration: none;
}

.qr-public-login-link:hover,
.qr-public-login-link:focus-visible {
    border-color: #93b4ff;
    color: #1d4ed8;
    outline: none;
}

.public-lookup-hero {
    display: grid;
    grid-template-columns: 64px minmax(0,1fr);
    gap: 15px;
    align-items: center;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid #d9e2ef;
    border-radius: 15px;
    background:
        linear-gradient(135deg, rgba(37,99,235,.09), rgba(255,255,255,.96) 58%);
    box-shadow: 0 10px 30px rgba(15,23,42,.06);
}

.public-lookup-hero__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(145deg, #2b61dd, #1d4ed8);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 10px 22px rgba(37,99,235,.22);
}

.public-lookup-kicker {
    display: block;
    margin-bottom: 3px;
    color: #2563eb;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .07em;
}

.public-lookup-hero h1,
.public-lookup-hero p {
    margin: 0;
}

.public-lookup-hero h1 {
    color: #0f172a;
    font-size: 1.3rem;
}

.public-lookup-hero p {
    margin-top: 5px;
    color: #64748b;
    font-size: .72rem;
    line-height: 1.5;
}

.public-lookup-form {
    padding: 18px;
    border: 1px solid #d9e2ef;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15,23,42,.06);
}

.public-lookup-form__grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 12px;
}

.public-lookup-form .form-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.public-lookup-form .form-label i {
    color: #2563eb;
}

.public-lookup-form__actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.public-lookup-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 11px 12px;
    border-radius: 10px;
}

.public-lookup-alert > i {
    margin-top: 2px;
}

.public-lookup-alert strong,
.public-lookup-alert p {
    display: block;
    margin: 0;
}

.public-lookup-alert strong {
    font-size: .67rem;
}

.public-lookup-alert p {
    margin-top: 2px;
    font-size: .6rem;
    line-height: 1.5;
}

.public-lookup-alert--warning {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.public-lookup-alert--not-found {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.public-lookup-explanation {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 9px;
    margin-top: 12px;
}

.public-lookup-explanation > div {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    column-gap: 8px;
    align-items: start;
    padding: 10px;
    border: 1px solid #dde5f0;
    border-radius: 10px;
    background: rgba(255,255,255,.7);
}

.public-lookup-explanation > div > i {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2563eb;
}

.public-lookup-explanation strong {
    font-size: .62rem;
}

.public-lookup-explanation p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: .55rem;
    line-height: 1.45;
}

.public-lookup-result-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.public-lookup-result-toolbar > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: .57rem;
    font-weight: 700;
}

.public-lookup-result-toolbar > span i {
    color: #2563eb;
}

.public-lookup-inactive-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.qr-public-privacy strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.qr-public-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.qr-public-footer span:last-child {
    color: #94a3b8;
    font-size: .54rem;
}

@media (max-width: 760px) {
    .qr-public-shell--search {
        width: min(100% - 20px, 1040px);
    }

    .qr-public-header,
    .qr-public-header__actions,
    .public-lookup-result-toolbar {
        align-items: flex-start;
    }

    .qr-public-header,
    .public-lookup-result-toolbar {
        flex-direction: column;
    }

    .public-lookup-form__grid,
    .public-lookup-explanation {
        grid-template-columns: 1fr;
    }

    .public-lookup-form__actions,
    .public-lookup-inactive-actions {
        flex-direction: column;
    }

    .public-lookup-form__actions .btn,
    .public-lookup-inactive-actions .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .public-lookup-hero {
        grid-template-columns: 1fr;
    }

    .public-lookup-hero__icon {
        width: 52px;
        height: 52px;
        border-radius: 13px;
        font-size: 1.05rem;
    }

    .qr-public-footer {
        flex-direction: column;
    }
}


/* =========================================================
   FASE 02.5.20A — IDENTIDADE VISUAL DO MUNICÍPIO NA CONSULTA
   ========================================================= */
.public-municipio-identity {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    padding: 8px;
    overflow: hidden;
    border: 1px solid #cbdaf5;
    border-radius: 16px;
    background:
        linear-gradient(145deg, #f8fbff, #eaf1ff);
    box-shadow: 0 8px 22px rgba(37,99,235,.12);
}

.public-municipio-identity img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.public-municipio-identity img[hidden],
.public-municipio-identity span[hidden] {
    display: none !important;
}

.public-municipio-identity > span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 13px;
    background: linear-gradient(145deg, #3268e5, #1d4ed8);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 8px 18px rgba(37,99,235,.22);
}

.public-municipio-identity.has-image {
    background: #fff;
}

.public-lookup-hero {
    grid-template-columns: 74px minmax(0,1fr);
}

.public-lookup-hero p strong {
    color: #334155;
    font-weight: 800;
}

@media (max-width: 520px) {
    .public-municipio-identity {
        width: 62px;
        height: 62px;
        border-radius: 14px;
    }

    .public-municipio-identity > span {
        width: 46px;
        height: 46px;
        border-radius: 11px;
        font-size: .95rem;
    }
}


/* =========================================================
   FASE 02.5.20B — PESQUISA DE MUNICÍPIO/CLIENTE
   ========================================================= */
.public-municipio-combobox {
    position: relative;
}

.public-municipio-combobox__field {
    position: relative;
}

.public-municipio-combobox__field > i {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: #64748b;
    transform: translateY(-50%);
    pointer-events: none;
}

.public-municipio-combobox__field .form-control {
    padding-left: 38px;
    padding-right: 40px;
}

.public-municipio-combobox__clear {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transform: translateY(-50%);
}

.public-municipio-combobox__clear:hover,
.public-municipio-combobox__clear:focus-visible {
    background: #eef2f7;
    color: #1d4ed8;
    outline: none;
}

.public-municipio-combobox__clear[hidden] {
    display: none !important;
}

.public-municipio-combobox__options {
    position: absolute;
    z-index: 1600;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #d9e2ef;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15,23,42,.15);
}

.public-municipio-combobox__options[hidden] {
    display: none !important;
}

.public-municipio-option {
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) 22px;
    gap: 9px;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 7px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #0f172a;
    cursor: pointer;
    text-align: left;
}

.public-municipio-option:hover,
.public-municipio-option.is-active {
    background: #f1f5ff;
}

.public-municipio-option.is-selected {
    background: #eef4ff;
}

.public-municipio-option__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 4px;
    overflow: hidden;
    border: 1px solid #dbe6f7;
    border-radius: 8px;
    background: #f8fbff;
    color: #2563eb;
}

.public-municipio-option__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.public-municipio-option__text {
    min-width: 0;
}

.public-municipio-option__text strong,
.public-municipio-option__text small {
    display: block;
}

.public-municipio-option__text strong {
    overflow: hidden;
    font-size: .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-municipio-option__text small {
    margin-top: 2px;
    color: #64748b;
    font-size: .55rem;
    font-weight: 700;
}

.public-municipio-option__check {
    color: #2563eb;
    opacity: 0;
}

.public-municipio-option.is-selected .public-municipio-option__check {
    opacity: 1;
}

.public-municipio-combobox__empty {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 18px 10px;
    color: #64748b;
    text-align: center;
}

.public-municipio-combobox__empty[hidden] {
    display: none !important;
}

.public-municipio-combobox__empty i {
    margin-bottom: 3px;
    color: #94a3b8;
    font-size: 1rem;
}

.public-municipio-combobox__empty strong {
    color: #334155;
    font-size: .63rem;
}

.public-municipio-combobox__empty span {
    font-size: .55rem;
}

@media (max-width: 760px) {
    .public-municipio-combobox__options {
        max-height: 250px;
    }
}


/* =========================================================
   FASE 02.5.20C — SALVAR/PDF E IMPRIMIR NA CONSULTA PÚBLICA
   ========================================================= */
.public-lookup-result-toolbar__left,
.public-lookup-result-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.public-lookup-result-toolbar__left > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: .57rem;
    font-weight: 700;
}

.public-lookup-result-toolbar__left > span i {
    color: #2563eb;
}

.public-print-heading,
.public-print-meta {
    display: none;
}

@media (max-width: 760px) {
    .public-lookup-result-toolbar__left,
    .public-lookup-result-toolbar__actions {
        width: 100%;
    }

    .public-lookup-result-toolbar__actions .btn {
        flex: 1 1 0;
        justify-content: center;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 14mm;
    }

    html,
    body {
        background: #fff !important;
    }

    body {
        min-height: auto !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .public-layout,
    .public-content,
    .qr-public-shell,
    .qr-public-shell--search {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .qr-public-header,
    .public-lookup-result-toolbar,
    .qr-public-footer,
    .public-photo-help {
        display: none !important;
    }

    .public-print-heading {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom: 2px solid #1d4ed8;
    }

    .public-print-heading > div {
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .public-print-heading__brand {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 8px;
        background: #1d4ed8 !important;
        color: #fff !important;
        font-size: 11pt;
        font-weight: 900;
    }

    .public-print-heading strong,
    .public-print-heading small {
        display: block;
    }

    .public-print-heading strong {
        font-size: 12pt;
    }

    .public-print-heading small,
    .public-print-heading > span {
        color: #64748b !important;
        font-size: 8.5pt;
    }

    .qr-public-card {
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .qr-public-hero {
        background: #eef4ff !important;
    }

    .qr-public-hero h1 {
        font-size: 25pt !important;
    }

    .qr-public-hero p {
        font-size: 12pt !important;
    }

    .qr-public-grid {
        break-inside: avoid;
    }

    .qr-public-grid > div {
        border-color: #dbe3ee !important;
        background: #fff !important;
    }

    .public-photo-section {
        break-inside: avoid;
    }

    .public-photo-gallery {
        grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    }

    .public-photo-item {
        break-inside: avoid;
    }

    .public-print-meta {
        display: flex !important;
        justify-content: space-between;
        gap: 12px;
        margin-top: 12px;
        padding-top: 8px;
        border-top: 1px solid #dbe3ee;
        color: #64748b !important;
        font-size: 8pt;
    }

    .qr-public-privacy {
        margin-top: 10px !important;
        border: 1px solid #dbe3ee !important;
        background: #f8fafc !important;
        color: #334155 !important;
        break-inside: avoid;
    }

    .btn,
    button,
    a {
        box-shadow: none !important;
    }
}


/* =========================================================
   FASE 02.5.20D — LOGIN INVERTIDO: FORMULÁRIO À ESQUERDA
   ========================================================= */
.auth-card--login {
    grid-template-columns: minmax(360px, 1fr) minmax(320px, 1.05fr);
}

.auth-panel--form {
    order: 1;
}

.auth-panel--brand {
    order: 2;
}

@media (max-width: 1080px) {
    .auth-card--login {
        grid-template-columns: 1fr;
    }

    .auth-panel--form {
        order: 1;
    }

    .auth-panel--brand {
        order: 2;
    }
}


/* =========================================================
   FASE 02.5.22 — CONTINUIDADE PATRIMONIAL ENTRE EXERCÍCIOS
   ========================================================= */
.asset-search-scope-note,
.dashboard-acervo-context-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 13px;
    padding: 9px 11px;
    border: 1px solid var(--brand-primary-border);
    border-radius: 9px;
    background: var(--brand-primary-soft);
    color: var(--color-text);
}

.asset-search-scope-note > i,
.dashboard-acervo-context-note > i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--color-primary);
}

.asset-search-scope-note strong,
.dashboard-acervo-context-note strong {
    font-weight: 850;
}

.asset-search-scope-note > div {
    display: grid;
    gap: 2px;
}

.asset-search-scope-note > div > strong {
    font-size: .62rem;
}

.asset-search-scope-note > div > span,
.dashboard-acervo-context-note > span {
    color: var(--color-text-muted);
    font-size: .56rem;
    line-height: 1.5;
}

@media (max-width: 720px) {
    .asset-search-scope-note,
    .dashboard-acervo-context-note {
        align-items: flex-start;
    }
}


/* =========================================================
   FASE 02.5.23 — DUPLICAÇÃO E IMPORTAÇÃO INTELIGENTE DE BENS
   ========================================================= */
.asset-tombamento-header {
    align-items: flex-end;
}

.asset-tombamento-header__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.asset-copy-page-header {
    align-items: flex-end;
}

.asset-copy-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: var(--color-primary);
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .055em;
}

.asset-copy-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.asset-copy-tabs > a {
    display: grid;
    grid-template-columns: 40px minmax(0,1fr);
    gap: 9px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.asset-copy-tabs > a > i {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: var(--color-background);
    color: var(--color-text-muted);
}

.asset-copy-tabs strong,
.asset-copy-tabs small {
    display: block;
}

.asset-copy-tabs strong {
    font-size: .65rem;
}

.asset-copy-tabs small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .54rem;
}

.asset-copy-tabs > a.is-active {
    border-color: var(--brand-primary-border);
    background: var(--brand-primary-soft);
}

.asset-copy-tabs > a.is-active > i,
.asset-copy-tabs > a.is-active strong {
    color: var(--color-primary);
}

.asset-copy-tabs > a.is-active > i {
    background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
}

.asset-copy-card {
    padding: 16px;
}

.asset-copy-section-heading {
    display: grid;
    grid-template-columns: 46px minmax(0,1fr);
    gap: 11px;
    align-items: start;
    margin-bottom: 14px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--color-border);
}

.asset-copy-section-heading__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 11px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    font-size: 1rem;
}

.asset-copy-section-heading > div > span,
.asset-copy-results-head > div > span {
    color: var(--color-primary);
    font-size: .53rem;
    font-weight: 900;
    letter-spacing: .055em;
}

.asset-copy-section-heading h2,
.asset-copy-section-heading p,
.asset-copy-results-head h3 {
    margin: 0;
}

.asset-copy-section-heading h2 {
    margin-top: 2px;
    font-size: .82rem;
}

.asset-copy-section-heading p {
    margin-top: 4px;
    color: var(--color-text-muted);
    font-size: .58rem;
    line-height: 1.5;
}

.asset-copy-form-grid {
    display: grid;
    grid-template-columns: minmax(0,1.4fr) minmax(180px,.6fr);
    gap: 10px;
}

.asset-copy-options {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    margin-top: 12px;
}

.asset-copy-check {
    display: grid;
    grid-template-columns: 18px minmax(0,1fr);
    gap: 8px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-background);
    cursor: pointer;
}

.asset-copy-check input {
    margin-top: 2px;
}

.asset-copy-check strong,
.asset-copy-check small {
    display: block;
}

.asset-copy-check strong {
    font-size: .61rem;
}

.asset-copy-check small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .54rem;
    line-height: 1.45;
}

.asset-copy-safety,
.asset-copy-warning,
.asset-copy-start-help {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 10px 11px;
    border-radius: 9px;
}

.asset-copy-safety {
    border: 1px solid var(--brand-primary-border);
    background: var(--brand-primary-soft);
}

.asset-copy-warning {
    border: 1px solid #fde68a;
    background: #fffbeb;
}

.asset-copy-start-help {
    border: 1px dashed var(--color-border);
    background: var(--color-background);
}

.asset-copy-safety > i {
    color: var(--color-primary);
}

.asset-copy-warning > i {
    color: #b45309;
}

.asset-copy-start-help > i {
    color: var(--color-primary);
}

.asset-copy-safety strong,
.asset-copy-safety p,
.asset-copy-warning strong,
.asset-copy-warning p,
.asset-copy-start-help strong,
.asset-copy-start-help p {
    display: block;
    margin: 0;
}

.asset-copy-safety strong,
.asset-copy-warning strong,
.asset-copy-start-help strong {
    font-size: .61rem;
}

.asset-copy-safety p,
.asset-copy-warning p,
.asset-copy-start-help p {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .55rem;
    line-height: 1.5;
}

.asset-copy-import-grid {
    display: grid;
    grid-template-columns: minmax(260px,1.25fr) minmax(170px,.55fr);
    gap: 9px;
    align-items: end;
}

.asset-copy-import-grid__search {
    grid-column: 1;
}

.asset-copy-import-grid__button {
    display: flex;
    align-items: flex-end;
}

.asset-copy-import-grid__button .btn {
    width: 100%;
}

.asset-copy-results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.asset-copy-results-head h3 {
    margin-top: 2px;
    font-size: .74rem;
}

.asset-copy-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .57rem;
    font-weight: 750;
}

.asset-copy-result-list {
    display: grid;
    gap: 6px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 3px;
}

.asset-copy-result {
    display: grid;
    grid-template-columns: 18px 38px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-surface);
    cursor: pointer;
}

.asset-copy-result:hover {
    border-color: var(--brand-primary-border);
    background: color-mix(in srgb, var(--brand-primary-soft) 36%, var(--color-surface));
}

.asset-copy-result:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--brand-primary-soft);
}

.asset-copy-result__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.asset-copy-result__body {
    min-width: 0;
}

.asset-copy-result__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.asset-copy-result__top strong {
    color: var(--color-primary);
    font-size: .56rem;
}

.asset-copy-result__top em {
    color: var(--color-text-muted);
    font-size: .52rem;
    font-style: normal;
}

.asset-copy-result__body > b,
.asset-copy-result__body > small {
    display: block;
}

.asset-copy-result__body > b {
    margin-top: 2px;
    overflow: hidden;
    font-size: .62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-copy-result__body > small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .53rem;
}

.asset-copy-empty {
    min-height: 180px;
}

@media (max-width: 900px) {
    .asset-copy-tabs,
    .asset-copy-form-grid,
    .asset-copy-options,
    .asset-copy-import-grid {
        grid-template-columns: 1fr;
    }

    .asset-copy-import-grid__search {
        grid-column: auto;
    }

    .asset-tombamento-header__actions {
        width: 100%;
    }

    .asset-tombamento-header__actions .btn {
        flex: 1 1 220px;
    }
}

@media (max-width: 560px) {
    .asset-copy-tabs {
        grid-template-columns: 1fr;
    }

    .asset-copy-result__top {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .asset-tombamento-header__actions {
        flex-direction: column;
    }

    .asset-tombamento-header__actions .btn {
        width: 100%;
    }
}


/* =========================================================
   FASE 02.5.24 — ENCERRAMENTO DE EXERCÍCIO
   ========================================================= */
.close-year-page-header {
    align-items: flex-end;
}

.close-year-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: var(--color-primary);
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .055em;
}

.close-year-page-header__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.close-year-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.close-year-context__identity {
    display: flex;
    gap: 10px;
    align-items: center;
}

.close-year-context__icon {
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 13px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    font-size: 1.28rem;
    line-height: 1;
}

.close-year-context__icon > i {
    display: block;
    line-height: 1;
    transform: translateY(0);
}

.close-year-context__identity small,
.close-year-context__identity strong,
.close-year-context__identity span {
    display: block;
}

.close-year-context__identity small {
    color: var(--color-text-muted);
    font-size: .50rem;
    font-weight: 850;
    letter-spacing: .04em;
}

.close-year-context__identity strong {
    margin-top: 2px;
    font-size: .68rem;
}

.close-year-context__identity span {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .54rem;
}

.close-year-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 190px;
    padding: 8px 10px;
    border-radius: 9px;
}

.close-year-status.is-open {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.close-year-status.is-closed {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.close-year-status > i {
    font-size: .82rem;
}

.close-year-status small,
.close-year-status strong {
    display: block;
}

.close-year-status small {
    font-size: .47rem;
    opacity: .72;
}

.close-year-status strong {
    margin-top: 1px;
    font-size: .58rem;
}

.close-year-guidance {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--brand-primary-border);
    border-radius: 9px;
    background: var(--brand-primary-soft);
}

.close-year-guidance > i {
    margin-top: 2px;
    color: var(--color-primary);
}

.close-year-guidance strong,
.close-year-guidance p {
    margin: 0;
}

.close-year-guidance strong {
    font-size: .60rem;
}

.close-year-guidance p {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .55rem;
    line-height: 1.5;
}

.close-year-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.close-year-summary-card {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.close-year-summary-card > i {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.close-year-summary-card span,
.close-year-summary-card strong,
.close-year-summary-card small {
    display: block;
}

.close-year-summary-card span {
    color: var(--color-text-muted);
    font-size: .52rem;
}

.close-year-summary-card strong {
    margin-top: 1px;
    font-size: .82rem;
}

.close-year-summary-card small {
    margin-top: 1px;
    color: var(--color-text-muted);
    font-size: .49rem;
}

.close-year-checklist-card,
.close-year-confirm-card,
.close-year-closed-card,
.close-year-history-card {
    margin-bottom: 12px;
    padding: 14px;
}

.close-year-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.close-year-section-head span {
    color: var(--color-primary);
    font-size: .51rem;
    font-weight: 900;
    letter-spacing: .055em;
}

.close-year-section-head h2,
.close-year-section-head p {
    margin: 0;
}

.close-year-section-head h2 {
    margin-top: 2px;
    font-size: .78rem;
}

.close-year-section-head p {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .54rem;
}

.close-year-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .52rem;
    font-weight: 800;
}

.close-year-pill.is-ok {
    background: #f0fdf4;
    color: #166534;
}

.close-year-pill.is-danger {
    background: #fef2f2;
    color: #991b1b;
}

.close-year-blockers,
.close-year-checks {
    display: grid;
    gap: 6px;
}

.close-year-blockers {
    margin-bottom: 8px;
}

.close-year-check {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) auto 14px;
    gap: 8px;
    align-items: center;
    padding: 8px 9px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-text);
    text-decoration: none;
}

.close-year-check:hover {
    border-color: var(--brand-primary-border);
}

.close-year-check__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.close-year-check.is-ok .close-year-check__icon {
    background: #f0fdf4;
    color: #16a34a;
}

.close-year-check.is-warning .close-year-check__icon {
    background: #fffbeb;
    color: #d97706;
}

.close-year-check.is-blocker {
    border-color: #fecaca;
    background: #fff7f7;
}

.close-year-check.is-blocker .close-year-check__icon {
    background: #fef2f2;
    color: #dc2626;
}

.close-year-check__content {
    min-width: 0;
}

.close-year-check__content strong,
.close-year-check__content small {
    display: block;
}

.close-year-check__content strong {
    font-size: .59rem;
}

.close-year-check__content small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .51rem;
}

.close-year-check > b {
    min-width: 28px;
    text-align: right;
    font-size: .66rem;
}

.close-year-check > i {
    color: var(--color-text-muted);
    font-size: .52rem;
}

.close-year-declarations {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
}

.close-year-declarations > label {
    display: grid;
    grid-template-columns: 18px minmax(0,1fr);
    gap: 8px;
    align-items: start;
    padding: 9px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background);
    cursor: pointer;
}

.close-year-declarations input {
    margin-top: 2px;
}

.close-year-declarations strong,
.close-year-declarations small {
    display: block;
}

.close-year-declarations strong {
    font-size: .59rem;
}

.close-year-declarations small {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .51rem;
    line-height: 1.45;
}

.close-year-final-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.close-year-final-action strong,
.close-year-final-action span {
    display: block;
}

.close-year-final-action strong {
    font-size: .61rem;
}

.close-year-final-action span {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .52rem;
}

.close-year-readonly {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px;
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-text-muted);
    font-size: .57rem;
}

.close-year-closed-hero {
    display: grid;
    grid-template-columns: 54px minmax(0,1fr);
    gap: 11px;
    align-items: center;
}

.close-year-closed-hero__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 1.1rem;
}

.close-year-closed-hero span {
    color: #b91c1c;
    font-size: .52rem;
    font-weight: 900;
    letter-spacing: .05em;
}

.close-year-closed-hero h2,
.close-year-closed-hero p {
    margin: 0;
}

.close-year-closed-hero h2 {
    margin-top: 2px;
    font-size: .82rem;
}

.close-year-closed-hero p {
    margin-top: 3px;
    color: var(--color-text-muted);
    font-size: .55rem;
}

.close-year-record {
    margin-top: 12px;
    padding: 9px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background);
}

.close-year-record strong {
    font-size: .58rem;
}

.close-year-record p {
    margin: 4px 0 0;
    color: var(--color-text-muted);
    font-size: .53rem;
    line-height: 1.5;
}

.close-year-reopen {
    margin-top: 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.close-year-reopen summary {
    padding: 9px 10px;
    cursor: pointer;
    font-size: .58rem;
    font-weight: 800;
}

.close-year-reopen form {
    padding: 0 10px 10px;
}

.close-year-history {
    position: relative;
    display: grid;
    gap: 10px;
}

.close-year-history__item {
    display: grid;
    grid-template-columns: 14px minmax(0,1fr);
    gap: 8px;
}

.close-year-history__dot {
    width: 10px;
    height: 10px;
    margin-top: 3px;
    border-radius: 50%;
}

.close-year-history__dot.is-closed {
    background: #dc2626;
}

.close-year-history__dot.is-open {
    background: #16a34a;
}

.close-year-history__item strong,
.close-year-history__item small {
    display: block;
}

.close-year-history__item strong {
    font-size: .58rem;
}

.close-year-history__item small {
    margin-top: 1px;
    color: var(--color-text-muted);
    font-size: .50rem;
}

.close-year-history__item p {
    margin: 4px 0 0;
    color: var(--color-text-muted);
    font-size: .52rem;
}

@media (max-width: 900px) {
    .close-year-summary-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .close-year-context {
        align-items: stretch;
        flex-direction: column;
    }

    .close-year-status {
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .close-year-summary-grid {
        grid-template-columns: 1fr;
    }

    .close-year-page-header__actions {
        width: 100%;
    }

    .close-year-page-header__actions .btn {
        flex: 1 1 100%;
    }

    .close-year-check {
        grid-template-columns: 32px minmax(0,1fr) auto;
    }

    .close-year-check > i {
        display: none;
    }

    .close-year-final-action {
        align-items: stretch;
        flex-direction: column;
    }

    .close-year-final-action .btn {
        width: 100%;
        justify-content: center;
    }
}


/* =========================================================
   FASE 02.5.24B — ÍCONES SVG DEFINITIVOS + RELATÓRIO FORMAL
   ========================================================= */
.close-year-context__icon {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 62px !important;
    width: 62px !important;
    height: 62px !important;
    min-width: 62px !important;
    min-height: 62px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    background: var(--brand-primary-soft) !important;
    color: var(--color-primary) !important;
    line-height: 1 !important;
}

.close-year-context__icon svg {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: currentColor !important;
    transform: none !important;
}

.close-year-context__identity {
    align-items: center !important;
}


/* =========================================================
   FASE 02.5.25 — ADMINISTRAÇÃO MUNICIPAL DE USUÁRIOS E ACESSOS
   ========================================================= */
.user-access-hub__header,.effective-access__header{align-items:flex-end}.user-access-hub__eyebrow{display:inline-flex;align-items:center;gap:6px;margin-bottom:4px;color:var(--color-primary);font-size:.54rem;font-weight:900;letter-spacing:.055em}.user-access-hub__notice{display:flex;gap:9px;align-items:flex-start;margin-bottom:12px;padding:10px 12px;border:1px solid var(--brand-primary-border);border-radius:9px;background:var(--brand-primary-soft)}.user-access-hub__notice>i{margin-top:2px;color:var(--color-primary)}.user-access-hub__notice strong,.user-access-hub__notice span{display:block}.user-access-hub__notice strong{font-size:.61rem}.user-access-hub__notice span{margin-top:2px;color:var(--color-text-muted);font-size:.54rem;line-height:1.5}.user-access-hub__summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}.user-access-hub__summary>div{display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-areas:"icon label" "icon value" "icon help";column-gap:8px;align-items:center;padding:10px;border:1px solid var(--color-border);border-radius:10px;background:var(--color-surface);box-shadow:var(--shadow-sm)}.user-access-hub__summary i{grid-area:icon;display:grid;place-items:center;width:38px;height:38px;border-radius:9px;background:var(--brand-primary-soft);color:var(--color-primary)}.user-access-hub__summary span{grid-area:label;color:var(--color-text-muted);font-size:.51rem}.user-access-hub__summary strong{grid-area:value;font-size:.8rem}.user-access-hub__summary small{grid-area:help;color:var(--color-text-muted);font-size:.48rem}.user-access-hub__flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}.user-access-hub__step{display:grid;grid-template-columns:26px 35px minmax(0,1fr) 14px;gap:7px;align-items:center;padding:10px;border:1px solid var(--color-border);border-radius:10px;background:var(--color-surface);color:var(--color-text);text-decoration:none}.user-access-hub__step:hover{border-color:var(--brand-primary-border);background:var(--brand-primary-soft)}.user-access-hub__step>span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--color-primary);color:#fff;font-size:.52rem;font-weight:900}.user-access-hub__step>i:nth-of-type(1){display:grid;place-items:center;width:35px;height:35px;border-radius:8px;background:var(--brand-primary-soft);color:var(--color-primary)}.user-access-hub__step>i:last-child{color:var(--color-text-muted);font-size:.5rem}.user-access-hub__step strong,.user-access-hub__step small{display:block}.user-access-hub__step strong{font-size:.59rem}.user-access-hub__step small{margin-top:2px;color:var(--color-text-muted);font-size:.49rem}.user-access-hub__step.is-static{cursor:default}.user-access-hub__card{margin-bottom:12px;padding:14px}.user-access-hub__section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;margin-bottom:10px}.user-access-hub__section-head span{color:var(--color-primary);font-size:.5rem;font-weight:900;letter-spacing:.05em}.user-access-hub__section-head h2,.user-access-hub__section-head p{margin:0}.user-access-hub__section-head h2{font-size:.76rem}.user-access-hub__section-head p{margin-top:2px;color:var(--color-text-muted);font-size:.52rem}.user-access-hub__users{display:grid;gap:6px}.user-access-hub__user{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:9px;align-items:center;padding:8px 9px;border:1px solid var(--color-border);border-radius:9px;background:var(--color-background)}.user-access-hub__avatar,.effective-access__avatar{display:grid;place-items:center;overflow:hidden;border-radius:50%;background:var(--brand-primary-soft);color:var(--color-primary)}.user-access-hub__avatar{width:42px;height:42px}.user-access-hub__avatar img,.effective-access__avatar img{width:100%;height:100%;object-fit:cover}.user-access-hub__user-main strong,.user-access-hub__user-main span,.user-access-hub__user-main small{display:block}.user-access-hub__user-main strong{font-size:.6rem}.user-access-hub__user-main span{margin-top:1px;color:var(--color-text-muted);font-size:.51rem}.user-access-hub__user-main small{margin-top:2px;color:var(--color-text-muted);font-size:.48rem}.user-access-hub__user-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.user-access-hub__security-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.user-access-hub__security-grid>.card{display:grid;grid-template-columns:38px minmax(0,1fr);gap:8px;padding:11px}.user-access-hub__security-grid>.card>i{display:grid;place-items:center;width:38px;height:38px;border-radius:9px;background:var(--brand-primary-soft);color:var(--color-primary)}.user-access-hub__security-grid strong{font-size:.59rem}.user-access-hub__security-grid p{margin:3px 0 0;color:var(--color-text-muted);font-size:.5rem;line-height:1.45}.effective-access__identity{display:grid;grid-template-columns:50px minmax(0,1fr) auto;gap:10px;align-items:center;margin-bottom:10px;padding:11px}.effective-access__avatar{width:50px;height:50px}.effective-access__identity strong,.effective-access__identity span{display:block}.effective-access__identity strong{font-size:.68rem}.effective-access__identity span{margin-top:2px;color:var(--color-text-muted);font-size:.53rem}.effective-access__fallback{display:flex;gap:9px;padding:12px;margin-bottom:10px}.effective-access__fallback>i{color:var(--color-primary)}.effective-access__fallback h2,.effective-access__fallback p{margin:0}.effective-access__fallback h2{font-size:.66rem}.effective-access__fallback p{margin-top:3px;color:var(--color-text-muted);font-size:.52rem}.effective-access__chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.effective-access__chips>span{padding:4px 7px;border-radius:999px;background:var(--brand-primary-soft);color:var(--color-primary);font-size:.5rem;font-weight:750}.effective-access__scopes{display:grid;gap:8px}.effective-access__scope{padding:0;overflow:hidden}.effective-access__scope summary{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;cursor:pointer}.effective-access__scope summary>span{display:flex;align-items:center;gap:7px}.effective-access__scope summary>span>i{color:var(--color-primary)}.effective-access__scope summary strong{font-size:.62rem}.effective-access__scope summary small{color:var(--color-text-muted);font-size:.5rem}.effective-access__scope-body{padding:0 12px 12px;border-top:1px solid var(--color-border)}.effective-access__scope-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:9px 0}.effective-access__scope-meta>div{padding:8px;border-radius:8px;background:var(--color-background)}.effective-access__scope-meta span,.effective-access__scope-meta strong{display:block}.effective-access__scope-meta span{color:var(--color-text-muted);font-size:.49rem}.effective-access__scope-meta strong{margin-top:2px;font-size:.56rem}.effective-access__module{padding-top:8px;border-top:1px solid var(--color-border)}.effective-access__module h3{margin:0 0 5px;font-size:.54rem;color:var(--color-text-muted);letter-spacing:.04em}.effective-access__permissions{display:flex;gap:5px;flex-wrap:wrap}.effective-access__permissions>span{display:inline-flex;align-items:center;gap:4px;padding:4px 6px;border:1px solid var(--color-border);border-radius:7px;background:var(--color-surface);font-size:.49rem}.effective-access__permissions>span i{color:#16a34a}.effective-access__global{margin-top:10px;padding:0}.effective-access__global summary{padding:10px 12px;font-size:.58rem;font-weight:800;cursor:pointer}
@media(max-width:900px){.user-access-hub__summary{grid-template-columns:repeat(2,minmax(0,1fr))}.user-access-hub__flow,.user-access-hub__security-grid{grid-template-columns:1fr}.user-access-hub__user{grid-template-columns:42px minmax(0,1fr)}.user-access-hub__user-actions{grid-column:1/-1;justify-content:flex-start}.effective-access__scope-meta{grid-template-columns:1fr}}@media(max-width:560px){.user-access-hub__summary{grid-template-columns:1fr}.effective-access__identity{grid-template-columns:45px minmax(0,1fr)}.effective-access__identity>.badge{grid-column:1/-1;width:max-content}}


/* =========================================================
   FASE 02.5.26 — DOCUMENTOS AUXILIARES / BIBLIOTECA INTERNA
   ========================================================= */
.docs-library-header{align-items:flex-end}.docs-library-eyebrow{display:inline-flex;align-items:center;gap:6px;margin-bottom:4px;color:var(--color-primary);font-size:.56rem;font-weight:900;letter-spacing:.055em}.docs-library-info{display:flex;gap:9px;align-items:flex-start;margin-bottom:12px;padding:10px 12px;border:1px solid var(--brand-primary-border);border-radius:9px;background:var(--brand-primary-soft)}.docs-library-info>i{margin-top:2px;color:var(--color-primary)}.docs-library-info strong,.docs-library-info span{display:block}.docs-library-info strong{font-size:.60rem}.docs-library-info span{margin-top:2px;color:var(--color-text-muted);font-size:.54rem}.docs-library-upload{margin-bottom:12px;padding:14px}.docs-library-section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.docs-library-section-title span{color:var(--color-primary);font-size:.51rem;font-weight:900;letter-spacing:.05em}.docs-library-section-title h2{margin:2px 0 0;font-size:.78rem}.docs-library-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.docs-library-form-grid__wide{grid-column:1/-1}.docs-library-feature{display:grid;grid-template-columns:18px 1fr;gap:8px;align-items:start;margin-top:9px;padding:9px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-background);cursor:pointer}.docs-library-feature strong,.docs-library-feature small{display:block}.docs-library-feature strong{font-size:.59rem}.docs-library-feature small{margin-top:2px;color:var(--color-text-muted);font-size:.51rem}.docs-library-search{display:grid;grid-template-columns:minmax(280px,1fr) minmax(160px,.35fr) auto auto;gap:7px;align-items:center;margin-bottom:12px;padding:10px}.docs-library-search__query{position:relative}.docs-library-search__query>i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--color-text-muted);pointer-events:none}.docs-library-search__query .form-control{padding-left:36px}.docs-library-results-head{display:flex;align-items:end;justify-content:space-between;margin:4px 0 8px}.docs-library-results-head span{color:var(--color-primary);font-size:.5rem;font-weight:900}.docs-library-results-head h2{margin:2px 0 0;font-size:.72rem}.docs-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.docs-library-card{position:relative;padding:12px}.docs-library-card.is-featured{border-color:var(--brand-primary-border)}.docs-library-card__top{display:grid;grid-template-columns:44px minmax(0,1fr);gap:9px;align-items:start}.docs-library-card__icon{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:var(--brand-primary-soft);color:var(--color-primary);font-size:.9rem}.docs-library-card__title h3{margin:3px 0 0;font-size:.68rem}.docs-library-category{display:inline-block;color:var(--color-text-muted);font-size:.49rem;font-weight:800;text-transform:uppercase}.docs-library-badge{display:inline-flex;align-items:center;gap:3px;margin-right:5px;padding:2px 5px;border-radius:999px;background:#fff7ed;color:#b45309;font-size:.46rem;font-weight:800}.docs-library-card__description{margin:9px 0;color:var(--color-text-muted);font-size:.54rem;line-height:1.5}.docs-library-meta{display:flex;gap:8px;flex-wrap:wrap;padding:7px 0;border-top:1px solid var(--color-border);border-bottom:1px solid var(--color-border);color:var(--color-text-muted);font-size:.49rem}.docs-library-meta span{display:inline-flex;align-items:center;gap:4px}.docs-library-files{display:grid;gap:5px;margin-top:8px}.docs-library-files>a{display:grid;grid-template-columns:28px minmax(0,1fr);gap:7px;align-items:center;padding:7px;border:1px solid var(--color-border);border-radius:7px;color:var(--color-text);text-decoration:none}.docs-library-files>a>i{display:grid;place-items:center;width:28px;height:28px;border-radius:7px;background:var(--brand-primary-soft);color:var(--color-primary)}.docs-library-files strong,.docs-library-files small{display:block}.docs-library-files strong{overflow:hidden;font-size:.54rem;text-overflow:ellipsis;white-space:nowrap}.docs-library-files small{margin-top:1px;color:var(--color-text-muted);font-size:.47rem}.docs-library-files>a:hover{border-color:var(--brand-primary-border);background:var(--brand-primary-soft)}.docs-library-manage{margin-top:8px;border-top:1px dashed var(--color-border);padding-top:7px}.docs-library-manage summary{cursor:pointer;color:var(--color-text-muted);font-size:.51rem;font-weight:700}.docs-library-manage form{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:end;margin-top:7px}.docs-library-manage form .form-label{grid-column:1/-1}.docs-library-empty{min-height:220px}@media(max-width:900px){.docs-library-grid{grid-template-columns:1fr}.docs-library-search{grid-template-columns:1fr 1fr}.docs-library-search__query{grid-column:1/-1}}@media(max-width:600px){.docs-library-form-grid,.docs-library-search{grid-template-columns:1fr}.docs-library-form-grid__wide,.docs-library-search__query{grid-column:auto}.docs-library-manage form{grid-template-columns:1fr}}

/* =========================================================
   FASE 02.5.27 — STATUS DO SISTEMA
   ========================================================= */
.system-status-header{align-items:flex-end}.system-status-kicker{display:inline-flex;gap:6px;align-items:center;color:var(--color-primary);font-size:.55rem;font-weight:900;letter-spacing:.06em}
.system-status-hero{display:flex;align-items:center;gap:18px;margin-bottom:12px;padding:14px;border:1px solid var(--color-border);border-radius:12px;background:var(--color-surface);box-shadow:var(--shadow-sm)}
.system-status-score,.system-status-disk__ring{display:grid;place-items:center;border-radius:50%;background:conic-gradient(var(--color-primary) calc(var(--score,0)*1%),#e5e7eb 0)}.system-status-score{width:92px;height:92px}.system-status-score>div,.system-status-disk__ring>div{display:grid;place-items:center;border-radius:50%;background:var(--color-surface)}.system-status-score>div{width:72px;height:72px}.system-status-score strong{font-size:1.15rem}.system-status-score span{font-size:.5rem;color:var(--color-text-muted)}
.system-status-badge{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:.5rem;font-weight:900}.system-status-badge.is-ok{background:#ecfdf3;color:#166534}.system-status-badge.is-warning{background:#fffbeb;color:#92400e}.system-status-badge.is-danger{background:#fef2f2;color:#991b1b}.system-status-hero__text h2{margin:5px 0 2px;font-size:.85rem}.system-status-hero__text p{margin:0;color:var(--color-text-muted);font-size:.56rem}
.system-status-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin-bottom:12px}.system-status-card{display:flex;gap:8px;align-items:center;padding:9px;border:1px solid var(--color-border);border-radius:9px;background:var(--color-surface)}.system-status-card>i{color:var(--color-primary)}.system-status-card span,.system-status-card strong{display:block}.system-status-card span{font-size:.49rem;color:var(--color-text-muted)}.system-status-card strong{font-size:.74rem}
.system-status-section{padding:13px;margin-bottom:12px}.system-status-section__head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:9px}.system-status-section__head span{color:var(--color-primary);font-size:.5rem;font-weight:900;letter-spacing:.06em}.system-status-section__head h2,.system-status-section__head p{margin:0}.system-status-section__head h2{margin-top:2px;font-size:.76rem}.system-status-section__head p{margin-top:2px;color:var(--color-text-muted);font-size:.52rem}
.system-status-alerts,.system-status-checks{display:grid;gap:6px}.system-status-alert{display:grid;grid-template-columns:30px minmax(0,1fr) 18px;gap:8px;align-items:center;padding:9px;border:1px solid var(--color-border);border-radius:8px;text-decoration:none;color:var(--color-text)}.system-status-alert>i:first-child{font-size:.9rem}.system-status-alert.is-danger>i:first-child{color:#dc2626}.system-status-alert.is-warning>i:first-child{color:#d97706}.system-status-alert.is-info>i:first-child{color:var(--color-primary)}.system-status-alert strong,.system-status-alert p,.system-status-alert small{display:block;margin:0}.system-status-alert strong{font-size:.59rem}.system-status-alert p,.system-status-alert small{margin-top:2px;font-size:.51rem;color:var(--color-text-muted)}
.system-status-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:12px}.system-status-check{display:grid;grid-template-columns:26px minmax(0,1fr) auto;gap:7px;align-items:center;padding:7px 8px;border:1px solid var(--color-border);border-radius:8px;text-decoration:none;color:var(--color-text)}.system-status-check.is-ok>i{color:#16a34a}.system-status-check.is-error>i{color:#dc2626}.system-status-check strong,.system-status-check small{display:block}.system-status-check strong{font-size:.56rem}.system-status-check small{font-size:.48rem;color:var(--color-text-muted)}.system-status-check>span{font-size:.48rem;font-weight:900}
.system-status-runtime{margin:0}.system-status-runtime>div{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px solid var(--color-border)}.system-status-runtime>div:last-child{border:0}.system-status-runtime dt{color:var(--color-text-muted);font-size:.52rem}.system-status-runtime dd{margin:0;font-size:.54rem;font-weight:700}
.system-status-storage-layout{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:18px}.system-status-storage-row{display:grid;grid-template-columns:155px minmax(100px,1fr) 80px 58px;gap:7px;align-items:center;padding:5px 0;text-decoration:none;color:var(--color-text)}.system-status-storage-row>span{font-size:.52rem}.system-status-storage-row>div{height:9px;border-radius:999px;background:#e5e7eb;overflow:hidden}.system-status-storage-row>div>i{display:block;height:100%;border-radius:999px;background:var(--color-primary)}.system-status-storage-row strong,.system-status-storage-row small{font-size:.5rem;text-align:right}.system-status-storage-row small{color:var(--color-text-muted)}.system-status-storage-total{font-size:.72rem}
.system-status-disk{display:grid;justify-items:center;align-content:center}.system-status-disk__ring{--score:var(--disk);width:120px;height:120px;background:conic-gradient(var(--color-primary) calc(var(--disk,0)*1%),#e5e7eb 0)}.system-status-disk__ring>div{width:92px;height:92px}.system-status-disk__ring strong{font-size:1rem}.system-status-disk__ring span{font-size:.49rem;color:var(--color-text-muted)}.system-status-disk dl{width:100%;margin:8px 0 0}.system-status-disk dl>div{display:flex;justify-content:space-between;font-size:.5rem}.system-status-disk dd{margin:0;font-weight:700}
.system-status-empty{display:grid;justify-items:center;gap:3px;padding:18px;text-align:center}.system-status-empty i{font-size:1rem}.system-status-empty.is-ok i{color:#16a34a}.system-status-empty strong{font-size:.6rem}.system-status-empty span{font-size:.51rem;color:var(--color-text-muted)}
.system-status-missing{display:grid;gap:5px}.system-status-missing a{display:grid;grid-template-columns:140px minmax(0,1fr) auto;gap:8px;padding:7px;border:1px solid var(--color-border);border-radius:7px;text-decoration:none;color:var(--color-text);font-size:.51rem}.system-status-missing code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.system-status-migrations code{display:inline-block;margin:2px;padding:3px 5px;border-radius:5px;background:var(--color-background);font-size:.5rem}
@media(max-width:1100px){.system-status-cards{grid-template-columns:repeat(3,1fr)}.system-status-grid,.system-status-storage-layout{grid-template-columns:1fr}}@media(max-width:650px){.system-status-cards{grid-template-columns:repeat(2,1fr)}.system-status-hero{align-items:flex-start;flex-direction:column}.system-status-storage-row{grid-template-columns:1fr 1fr}.system-status-storage-row>div{grid-column:1/-1}.system-status-missing a{grid-template-columns:1fr}}


/* =========================================================
   FASE 02.5.27A — LEGIBILIDADE DO STATUS + TABELA DE CLIENTES
   ========================================================= */

/* A página de Status é informativa/técnica e precisa de leitura confortável. */
.system-status-header .page-description {
    font-size: .82rem;
    line-height: 1.55;
}

.system-status-kicker {
    font-size: .70rem !important;
}

.system-status-score strong {
    font-size: 1.42rem !important;
}

.system-status-score span {
    font-size: .66rem !important;
}

.system-status-badge {
    font-size: .64rem !important;
}

.system-status-hero__text h2 {
    font-size: 1.02rem !important;
}

.system-status-hero__text p {
    font-size: .74rem !important;
    line-height: 1.5;
}

.system-status-card span {
    font-size: .66rem !important;
}

.system-status-card strong {
    font-size: .94rem !important;
}

.system-status-card > i {
    font-size: .92rem;
}

.system-status-section__head span {
    font-size: .64rem !important;
}

.system-status-section__head h2 {
    font-size: .94rem !important;
}

.system-status-section__head p {
    font-size: .70rem !important;
    line-height: 1.45;
}

.system-status-alert strong {
    font-size: .76rem !important;
}

.system-status-alert p,
.system-status-alert small {
    font-size: .68rem !important;
    line-height: 1.45;
}

.system-status-alert > i:last-child {
    font-size: .72rem;
}

.system-status-check strong {
    font-size: .73rem !important;
}

.system-status-check small {
    font-size: .64rem !important;
    line-height: 1.4;
}

.system-status-check > span {
    font-size: .61rem !important;
}

.system-status-runtime dt {
    font-size: .68rem !important;
}

.system-status-runtime dd {
    font-size: .70rem !important;
}

.system-status-storage-row > span {
    font-size: .69rem !important;
}

.system-status-storage-row strong,
.system-status-storage-row small {
    font-size: .65rem !important;
}

.system-status-storage-total {
    font-size: .90rem !important;
}

.system-status-disk__ring strong {
    font-size: 1.20rem !important;
}

.system-status-disk__ring span {
    font-size: .64rem !important;
}

.system-status-disk dl > div {
    font-size: .67rem !important;
}

.system-status-empty strong {
    font-size: .76rem !important;
}

.system-status-empty span {
    font-size: .67rem !important;
}

.system-status-missing a {
    font-size: .66rem !important;
}

.system-status-migrations code,
.system-status-migrations p {
    font-size: .67rem !important;
}

/* Tabela da visão da plataforma no mesmo padrão das tabelas do SGPM. */
.system-status-client-table-wrap {
    margin-top: 4px;
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: 9px;
}

.system-status-client-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.system-status-client-table thead th {
    padding: 10px 11px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    border-bottom: 1px solid var(--brand-primary-border);
    font-size: .72rem !important;
    font-weight: 850;
    text-align: left;
    white-space: nowrap;
}

.system-status-client-table tbody td {
    padding: 10px 11px;
    border-bottom: 1px solid var(--color-border);
    font-size: .72rem !important;
    vertical-align: middle;
}

.system-status-client-table tbody tr:last-child td {
    border-bottom: 0;
}

.system-status-client-table tbody tr:hover {
    background: color-mix(in srgb, var(--brand-primary-soft) 38%, transparent);
}

.system-status-client-table th:nth-child(n+4),
.system-status-client-table td:nth-child(n+4) {
    text-align: center;
}

.system-status-client-table tbody td:first-child strong {
    font-size: .75rem;
}

@media (max-width: 760px) {
    .system-status-header .page-description {
        font-size: .76rem;
    }

    .system-status-client-table {
        min-width: 650px;
    }
}


/* =========================================================
   FASE 02.5.28 — RETIFICAÇÃO CONTROLADA DO MOTIVO DA BAIXA
   ========================================================= */
.baixa-motivo-current{
    min-height:42px;
    padding:9px 10px;
    border:1px solid var(--color-border);
    border-radius:8px;
    background:var(--color-background);
    color:var(--color-text);
    font-size:.72rem;
    line-height:1.5;
    white-space:pre-wrap;
}

.baixa-motivo-control .form-help{
    display:block;
    margin-top:4px;
    color:var(--color-text-muted);
    font-size:.64rem;
}

.baixa-motivo-history td{
    vertical-align:top;
    line-height:1.45;
}

.baixa-motivo-history td:nth-child(1){
    white-space:nowrap;
}

.baixa-motivo-history .badge{
    white-space:nowrap;
}

.baixa-motivo-ref{
    display:block;
    margin-top:4px;
    color:var(--color-text-muted);
    font-size:.62rem;
}

.btn-warning{
    border-color:#d97706;
    background:#d97706;
    color:#fff;
}

.btn-warning:hover,
.btn-warning:focus-visible{
    border-color:#b45309;
    background:#b45309;
    color:#fff;
}


/* =========================================================
   FASE 02.5.29 — FICHA COMPLETA DO FORNECEDOR
   ========================================================= */
.fornecedor-profile-header {
    align-items: flex-end;
}

.fornecedor-profile-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: var(--color-primary);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .055em;
}

.fornecedor-profile-privacy {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 11px 12px;
    border: 1px solid var(--brand-primary-border);
    border-radius: 9px;
    background: var(--brand-primary-soft);
}

.fornecedor-profile-privacy > i {
    margin-top: 2px;
    color: var(--color-primary);
    font-size: .88rem;
}

.fornecedor-profile-privacy strong,
.fornecedor-profile-privacy p {
    display: block;
    margin: 0;
}

.fornecedor-profile-privacy strong {
    font-size: .74rem;
}

.fornecedor-profile-privacy p {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .68rem;
    line-height: 1.5;
}

.fornecedor-profile-hero {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding: 13px 14px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.fornecedor-profile-hero__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 13px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
    font-size: 1.22rem;
}

.fornecedor-profile-hero__identity > span {
    color: var(--color-primary);
    font-size: .63rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fornecedor-profile-hero__identity h2,
.fornecedor-profile-hero__identity p {
    margin: 0;
}

.fornecedor-profile-hero__identity h2 {
    margin-top: 2px;
    font-size: 1rem;
}

.fornecedor-profile-hero__identity p {
    margin-top: 3px;
    color: var(--color-text-muted);
    font-size: .72rem;
}

.fornecedor-profile-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 850;
}

.fornecedor-profile-status.is-active {
    background: #ecfdf3;
    color: #166534;
}

.fornecedor-profile-status.is-inactive {
    background: #fef2f2;
    color: #991b1b;
}

.fornecedor-profile-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.fornecedor-profile-summary > div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: var(--color-surface);
}

.fornecedor-profile-summary i {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--brand-primary-soft);
    color: var(--color-primary);
}

.fornecedor-profile-summary span,
.fornecedor-profile-summary strong {
    display: block;
}

.fornecedor-profile-summary span {
    color: var(--color-text-muted);
    font-size: .62rem;
}

.fornecedor-profile-summary strong {
    margin-top: 1px;
    overflow: hidden;
    font-size: .76rem;
    text-overflow: ellipsis;
}

.fornecedor-profile-card {
    margin-bottom: 12px;
    padding: 14px;
}

.fornecedor-profile-section-head {
    margin-bottom: 10px;
}

.fornecedor-profile-section-head > span {
    color: var(--color-primary);
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .055em;
}

.fornecedor-profile-section-head h2,
.fornecedor-profile-section-head p {
    margin: 0;
}

.fornecedor-profile-section-head h2 {
    margin-top: 2px;
    font-size: .86rem;
}

.fornecedor-profile-section-head p {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: .66rem;
}

.fornecedor-profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    overflow: hidden;
}

.fornecedor-profile-fields > div {
    min-width: 0;
    padding: 9px 10px;
    border-bottom: 1px solid var(--color-border);
}

.fornecedor-profile-fields > div:nth-child(odd):not(.fornecedor-profile-fields__wide) {
    border-right: 1px solid var(--color-border);
}

.fornecedor-profile-fields > div:last-child,
.fornecedor-profile-fields > div:nth-last-child(2) {
    border-bottom: 0;
}

.fornecedor-profile-fields__wide {
    grid-column: 1 / -1;
    border-right: 0 !important;
}

.fornecedor-profile-fields dt {
    margin-bottom: 3px;
    color: var(--color-text-muted);
    font-size: .62rem;
    font-weight: 750;
}

.fornecedor-profile-fields dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: .72rem;
    line-height: 1.5;
}

.fornecedor-profile-fields dd a {
    color: var(--color-primary);
}

.fornecedor-profile-table th,
.fornecedor-profile-table td {
    font-size: .68rem;
}

.fornecedor-profile-empty {
    min-height: 150px;
}

@media (max-width: 900px) {
    .fornecedor-profile-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .fornecedor-profile-hero {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .fornecedor-profile-hero__icon {
        width: 48px;
        height: 48px;
    }

    .fornecedor-profile-status {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .fornecedor-profile-summary,
    .fornecedor-profile-fields {
        grid-template-columns: 1fr;
    }

    .fornecedor-profile-fields > div {
        border-right: 0 !important;
        border-bottom: 1px solid var(--color-border) !important;
    }

    .fornecedor-profile-fields > div:last-child {
        border-bottom: 0 !important;
    }
}


/* =========================================================
   FASE 02.5.29A — CORREÇÃO DA COLUNA AÇÕES EM FORNECEDORES
   ========================================================= */

/*
 * A classe global .table-actions é flex para vários pontos do sistema.
 * Em uma célula <th>/<td>, porém, isso quebra o algoritmo nativo da tabela
 * e fazia a coluna "Ações" escapar para a direita.
 * Aqui restauramos o comportamento table-cell somente nesta tabela.
 */
.table--fornecedores th.table-actions,
.table--fornecedores td.table-actions {
    display: table-cell !important;
    width: 132px;
    min-width: 132px;
    max-width: 132px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.table--fornecedores td.table-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    margin: 0 auto;
}

.table--fornecedores {
    width: 100%;
    min-width: 980px;
}

.table--fornecedores th:nth-child(1) { width: 25%; }
.table--fornecedores th:nth-child(2) { width: 14%; }
.table--fornecedores th:nth-child(3) { width: 18%; }
.table--fornecedores th:nth-child(4) { width: 25%; }
.table--fornecedores th:nth-child(5) { width: 10%; }

.table--fornecedores tfoot td.table-summary-muted:last-child {
    text-align: center;
}

@media (max-width: 1100px) {
    .table--fornecedores {
        min-width: 900px;
    }
}


/* =========================================================
   FASE 02.5.31 — FORNECEDORES: PESQUISA, EDIÇÃO E DADOS AMPLIADOS
   ========================================================= */
.fornecedor-search{
    display:grid;
    grid-template-columns:minmax(280px,1fr) 150px auto auto;
    gap:8px;
    align-items:center;
    margin:0 0 12px;
    padding:10px;
    border:1px solid var(--color-border);
    border-radius:9px;
    background:var(--color-background);
}

.fornecedor-search__query{
    position:relative;
}

.fornecedor-search__query > i{
    position:absolute;
    left:12px;
    top:50%;
    z-index:1;
    transform:translateY(-50%);
    color:var(--color-text-muted);
    pointer-events:none;
}

.fornecedor-search__query .form-control{
    padding-left:34px;
}

.fornecedor-actions{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    white-space:nowrap;
}

.table--fornecedores th.table-actions,
.table--fornecedores td.table-actions{
    width:185px;
    min-width:185px;
    max-width:185px;
}

@media(max-width:820px){
    .fornecedor-search{
        grid-template-columns:1fr 130px;
    }

    .fornecedor-search .btn{
        justify-content:center;
    }
}

@media(max-width:560px){
    .fornecedor-search{
        grid-template-columns:1fr;
    }

    .fornecedor-search__status{
        width:100%;
    }
}


/* =========================================================
   FASE 02.5.32 — COMISSÃO / SERVIDOR DESIGNADO PARA DESFAZIMENTO
   ========================================================= */
.desf-resp-kicker{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin-bottom:4px;
    color:var(--color-primary);
    font-size:.66rem;
    font-weight:900;
    letter-spacing:.055em;
}

.desf-resp-info{
    display:flex;
    gap:10px;
    align-items:flex-start;
    margin-bottom:12px;
    padding:11px 12px;
    border:1px solid var(--brand-primary-border);
    border-radius:9px;
    background:var(--brand-primary-soft);
}

.desf-resp-info > i{
    margin-top:2px;
    color:var(--color-primary);
}

.desf-resp-info strong,
.desf-resp-info p{
    display:block;
    margin:0;
}

.desf-resp-info strong{font-size:.74rem}
.desf-resp-info p{margin-top:2px;color:var(--color-text-muted);font-size:.67rem;line-height:1.5}
.desf-resp-info.is-muted{border-color:var(--color-border);background:var(--color-background)}

.desf-resp-summary{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin-bottom:12px;
}

.desf-resp-summary > div{
    display:grid;
    grid-template-columns:36px minmax(0,1fr);
    align-items:center;
    gap:8px;
    padding:10px;
    border:1px solid var(--color-border);
    border-radius:9px;
    background:var(--color-surface);
}

.desf-resp-summary i{
    grid-row:1/3;
    display:grid;
    place-items:center;
    width:36px;height:36px;
    border-radius:8px;
    background:var(--brand-primary-soft);
    color:var(--color-primary);
}

.desf-resp-summary span{font-size:.62rem;color:var(--color-text-muted)}
.desf-resp-summary strong{font-size:.9rem}

.desf-resp-type{display:inline-flex;align-items:center;gap:6px;font-weight:700}
.desf-resp-table td strong,.desf-resp-table td small{display:block}
.desf-resp-table td small{margin-top:2px;color:var(--color-text-muted);font-size:.61rem}

.desf-resp-form{padding:14px}
.desf-resp-mode{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.desf-resp-mode label{cursor:pointer}
.desf-resp-mode input{position:absolute;opacity:0;pointer-events:none}
.desf-resp-mode label > span{
    display:grid;
    grid-template-columns:32px minmax(0,1fr);
    align-items:center;
    gap:7px;
    min-height:72px;
    padding:10px;
    border:1px solid var(--color-border);
    border-radius:9px;
    background:var(--color-surface);
}
.desf-resp-mode label > span > i{
    grid-row:1/3;
    display:grid;
    place-items:center;
    width:32px;height:32px;
    border-radius:7px;
    background:var(--brand-primary-soft);
    color:var(--color-primary);
}
.desf-resp-mode label > span strong{font-size:.72rem}
.desf-resp-mode label > span small{font-size:.62rem;color:var(--color-text-muted)}
.desf-resp-mode input:checked + span{
    border-color:var(--color-primary);
    box-shadow:0 0 0 2px color-mix(in srgb,var(--color-primary) 15%,transparent);
}

.desf-resp-members-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin:10px 0 6px;
}
.desf-resp-members-head strong,.desf-resp-members-head small{display:block}
.desf-resp-members-head strong{font-size:.72rem}
.desf-resp-members-head small{margin-top:2px;color:var(--color-text-muted);font-size:.62rem}
.desf-resp-member-row{
    display:grid;
    grid-template-columns:minmax(220px,1fr) 150px 42px;
    gap:6px;
    margin-bottom:6px;
}

.desf-resp-profile{
    display:grid;
    grid-template-columns:58px minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
    padding:13px;
    border:1px solid var(--color-border);
    border-radius:10px;
    background:var(--color-surface);
}
.desf-resp-profile__icon{
    display:grid;place-items:center;width:58px;height:58px;border-radius:12px;
    background:var(--brand-primary-soft);color:var(--color-primary);font-size:1.15rem;
}
.desf-resp-profile__identity span{color:var(--color-primary);font-size:.61rem;font-weight:900;letter-spacing:.05em}
.desf-resp-profile__identity h2,.desf-resp-profile__identity p{margin:0}
.desf-resp-profile__identity h2{margin-top:2px;font-size:.95rem}
.desf-resp-profile__identity p{margin-top:2px;color:var(--color-text-muted);font-size:.67rem}

.desf-resp-detail,.desf-resp-danger{margin-bottom:12px;padding:14px}
.desf-resp-section-head{margin-bottom:9px}
.desf-resp-section-head span{color:var(--color-primary);font-size:.61rem;font-weight:900;letter-spacing:.05em}
.desf-resp-section-head h2{margin:2px 0 0;font-size:.82rem}
.desf-resp-danger{border-color:#fecaca}
.desf-resp-danger > p{font-size:.67rem;color:var(--color-text-muted)}
.desf-resp-process-link{margin:8px 0 10px}

@media(max-width:800px){
    .desf-resp-summary,.desf-resp-mode{grid-template-columns:1fr}
    .desf-resp-member-row{grid-template-columns:1fr 130px 42px}
}
@media(max-width:560px){
    .desf-resp-member-row{grid-template-columns:1fr}
    .desf-resp-profile{grid-template-columns:48px 1fr}
    .desf-resp-profile__icon{width:48px;height:48px}
    .desf-resp-profile > .status-badge{grid-column:1/-1;justify-self:start}
}


/* =========================================================
   FASE 02.5.32B — FILTROS DO RELATÓRIO CONTÁBIL
   ========================================================= */
.accounting-report-filter-card{
    margin:16px 0;
    padding:14px;
    border:1px solid var(--color-border);
    border-radius:10px;
    background:var(--color-background);
}

.accounting-report-filter-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:11px 12px;
    align-items:end;
}

.accounting-report-field{
    display:grid;
    min-width:0;
    gap:5px;
}

.accounting-report-field > span{
    display:block;
    color:var(--color-text-muted);
    font-size:.72rem;
    font-weight:750;
    line-height:1.25;
}

.accounting-report-field--search{
    grid-column:span 2;
}

.accounting-report-filter-card .form-control{
    display:block;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
}

.accounting-report-filter-card input[type="month"]{
    min-height:38px;
}

.accounting-report-actions{
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:12px;
    grid-column:auto;
}

@media(max-width:1200px){
    .accounting-report-filter-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .accounting-report-field--search{
        grid-column:span 2;
    }
}

@media(max-width:900px){
    .accounting-report-filter-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:620px){
    .accounting-report-filter-grid{
        grid-template-columns:1fr;
    }

    .accounting-report-field--search{
        grid-column:auto;
    }

    .accounting-report-actions{
        align-items:stretch;
        flex-direction:column;
    }

    .accounting-report-actions .btn{
        width:100%;
        justify-content:center;
    }
}

/* =========================================================
   FASE 02.5.33 — CENTRAL DE OPERAÇÕES EM MASSA
   ========================================================= */
.bulk-kicker{display:inline-flex;align-items:center;gap:6px;color:var(--color-primary);font-size:.66rem;font-weight:900;letter-spacing:.055em}.bulk-warning,.bulk-critical{display:flex;gap:10px;align-items:flex-start;padding:11px 12px;border:1px solid #f59e0b55;border-radius:9px;background:#fffbeb;margin-bottom:12px}.bulk-warning>i,.bulk-critical>i{color:#d97706;margin-top:2px}.bulk-warning strong,.bulk-warning p,.bulk-critical strong,.bulk-critical p{display:block;margin:0}.bulk-warning strong,.bulk-critical strong{font-size:.73rem}.bulk-warning p,.bulk-critical p{margin-top:2px;font-size:.66rem;color:var(--color-text-muted);line-height:1.45}.bulk-card{padding:14px;margin-bottom:12px}.bulk-section-head{margin-bottom:9px}.bulk-section-head>span{font-size:.61rem;font-weight:900;color:var(--color-primary);letter-spacing:.055em}.bulk-section-head h2,.bulk-section-head p{margin:2px 0 0}.bulk-section-head h2{font-size:.86rem}.bulk-section-head p{font-size:.65rem;color:var(--color-text-muted)}.bulk-filter-grid,.bulk-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.bulk-filter-grid label,.bulk-form-grid label,.bulk-fields>label{display:grid;gap:4px;min-width:0}.bulk-filter-grid label>span,.bulk-form-grid label>span,.bulk-fields>label>span{font-size:.64rem;font-weight:750;color:var(--color-text-muted)}.bulk-span2{grid-column:span 2}.bulk-filter-actions{display:flex;align-items:end;gap:7px}.bulk-selection-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:12px 0 7px;padding:8px 10px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-background);font-size:.67rem}.bulk-table-wrap{max-height:420px;overflow:auto;border:1px solid var(--color-border);border-radius:8px}.bulk-table{margin:0}.bulk-table thead th{position:sticky;top:0;z-index:2;background:var(--brand-primary-soft)}.bulk-table td small{display:block;color:var(--color-text-muted)}.bulk-wizard{margin-top:16px;border-top:1px solid var(--color-border);padding-top:14px}.bulk-action-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.bulk-action-grid label{cursor:pointer}.bulk-action-grid input{position:absolute;opacity:0}.bulk-action-grid label>span{display:grid;grid-template-columns:30px 1fr;gap:6px;align-items:center;min-height:74px;padding:9px;border:1px solid var(--color-border);border-radius:8px}.bulk-action-grid i{grid-row:1/3;display:grid;place-items:center;width:30px;height:30px;border-radius:7px;background:var(--brand-primary-soft);color:var(--color-primary)}.bulk-action-grid strong,.bulk-action-grid small{display:block}.bulk-action-grid strong{font-size:.66rem}.bulk-action-grid small{font-size:.58rem;color:var(--color-text-muted)}.bulk-action-grid input:checked+span{border-color:var(--color-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--color-primary) 15%,transparent)}.bulk-fields,.bulk-common,.bulk-review{margin-top:11px;padding:11px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-background)}.bulk-fields[hidden]{display:none!important}.bulk-confirm-example{display:inline-block;margin:4px 0 8px;padding:7px 9px;border-radius:6px;background:#111827;color:#fff;font-family:monospace;font-weight:800}.bulk-review .form-control{max-width:420px;margin-bottom:8px}.bulk-history,.bulk-config{margin-bottom:12px;padding:14px}.bulk-config summary{cursor:pointer;font-size:.72rem;font-weight:800}.bulk-config form{margin-top:10px}.bulk-summary-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:12px}.bulk-summary-grid>div{padding:10px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface)}.bulk-summary-grid span,.bulk-summary-grid strong{display:block}.bulk-summary-grid span{font-size:.6rem;color:var(--color-text-muted)}.bulk-summary-grid strong{margin-top:2px;font-size:.76rem}.btn-danger{background:#b91c1c;border-color:#b91c1c;color:#fff}.btn-danger:hover{background:#991b1b;border-color:#991b1b;color:#fff}@media(max-width:1150px){.bulk-action-grid{grid-template-columns:repeat(3,1fr)}.bulk-filter-grid,.bulk-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:680px){.bulk-action-grid,.bulk-filter-grid,.bulk-form-grid,.bulk-summary-grid{grid-template-columns:1fr}.bulk-span2{grid-column:auto}.bulk-selection-toolbar{align-items:flex-start;flex-direction:column}}


/* =========================================================
   FASE 02.5.33B — ESTABILIZAÇÃO DA CENTRAL DE OPERAÇÕES EM MASSA
   ========================================================= */
.bulk-warning--danger{
    border-color:#fecaca !important;
    background:#fef2f2 !important;
}
.bulk-warning--danger > i{color:#dc2626 !important}
.bulk-warning--info{
    border-color:#bfdbfe !important;
    background:#eff6ff !important;
}
.bulk-warning--info > i{color:#2563eb !important}
.bulk-warning code{
    padding:2px 5px;
    border-radius:4px;
    background:rgba(255,255,255,.65);
    font-size:.92em;
}


/* =========================================================
   FASE 02.5.34 — CENTRAL DE INTEGRAÇÕES / API
   ========================================================= */
.integration-kicker{
    display:inline-flex;align-items:center;gap:6px;margin-bottom:4px;
    color:var(--color-primary);font-size:.66rem;font-weight:900;letter-spacing:.055em;
}
.integration-summary{
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;margin-bottom:12px;
}
.integration-summary>div{
    display:grid;grid-template-columns:36px 1fr;align-items:center;gap:8px;
    padding:10px;border:1px solid var(--color-border);border-radius:9px;background:var(--color-surface);
}
.integration-summary i{
    grid-row:1/3;display:grid;place-items:center;width:36px;height:36px;
    border-radius:8px;background:var(--brand-primary-soft);color:var(--color-primary);
}
.integration-summary span{font-size:.62rem;color:var(--color-text-muted)}
.integration-summary strong{font-size:.9rem}
.integration-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:12px}
.integration-card{margin-bottom:12px;padding:14px}
.integration-card--wide{min-width:0}
.integration-section-head{margin-bottom:10px}
.integration-section-head>span{color:var(--color-primary);font-size:.61rem;font-weight:900;letter-spacing:.055em}
.integration-section-head h2,.integration-section-head p{margin:0}
.integration-section-head h2{margin-top:2px;font-size:.86rem}
.integration-section-head p{margin-top:2px;color:var(--color-text-muted);font-size:.66rem}
.integration-section-head--actions{display:flex;justify-content:space-between;align-items:flex-end;gap:10px}
.integration-table td strong,.integration-table td small{display:block}
.integration-table td small{margin-top:2px;color:var(--color-text-muted);font-size:.61rem}
.integration-scope-summary{display:block;max-width:290px;font-size:.64rem;line-height:1.4}
.integration-feature-list{display:grid;gap:7px}
.integration-feature-list>div{display:grid;grid-template-columns:30px 1fr;align-items:start;gap:7px}
.integration-feature-list>div>i{display:grid;place-items:center;width:30px;height:30px;border-radius:7px;background:var(--brand-primary-soft);color:var(--color-primary)}
.integration-feature-list strong,.integration-feature-list small{display:block}
.integration-feature-list strong{font-size:.69rem}
.integration-feature-list small{margin-top:1px;font-size:.61rem;color:var(--color-text-muted);line-height:1.35}
.integration-token-once{
    margin-bottom:12px;padding:12px;border:1px solid #fbbf24;border-radius:10px;background:#fffbeb;
}
.integration-token-once__head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.integration-token-once__head span,.integration-token-once__head strong{display:block}
.integration-token-once__head span{font-size:.6rem;font-weight:900;letter-spacing:.055em;color:#92400e}
.integration-token-once__head strong{margin-top:2px;font-size:.8rem}
.integration-token-once__head i{font-size:1.15rem;color:#d97706}
.integration-token-once code{
    display:block;width:100%;padding:10px;border:1px dashed #d97706;border-radius:7px;background:#fff;
    color:#111827;font-size:.7rem;overflow-wrap:anywhere;user-select:all;
}
.integration-token-once__actions{display:flex;align-items:center;gap:10px;margin-top:8px}
.integration-token-once__actions small{font-size:.61rem;color:#78350f}
.integration-revoke{position:relative}
.integration-revoke>summary{list-style:none;cursor:pointer}
.integration-revoke>summary::-webkit-details-marker{display:none}
.integration-revoke form{
    position:absolute;right:0;z-index:20;width:270px;margin-top:5px;padding:9px;border:1px solid var(--color-border);
    border-radius:8px;background:var(--color-surface);box-shadow:var(--shadow-md);
}
.integration-revoke label{display:grid;gap:4px;font-size:.64rem;font-weight:700}
.integration-revoke textarea{width:100%;box-sizing:border-box;border:1px solid var(--color-border);border-radius:6px;padding:7px;background:var(--color-surface);color:var(--color-text)}
.integration-revoke button{margin-top:6px;width:100%;justify-content:center}
.integration-docs{display:grid;gap:10px}
.integration-docs__auth,.integration-docs__params{
    padding:9px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-background);
}
.integration-docs__auth strong,.integration-docs__params strong{display:block;margin-bottom:5px;font-size:.69rem}
.integration-docs__auth code{display:block;padding:7px;border-radius:6px;background:var(--color-surface);overflow-wrap:anywhere;font-size:.66rem}
.integration-docs__params p,.integration-docs__params small{margin:0;font-size:.64rem}
.integration-docs__params small{display:block;margin-top:4px;color:var(--color-text-muted)}
.integration-endpoints{display:grid;gap:5px}
.integration-endpoints>div{
    display:grid;grid-template-columns:48px minmax(160px,230px) 1fr auto;gap:8px;align-items:center;
    padding:7px 8px;border:1px solid var(--color-border);border-radius:7px;
}
.integration-endpoints code{font-size:.65rem}
.integration-endpoints>div>span:nth-child(3){font-size:.65rem}
.integration-endpoints small{font-size:.59rem;color:var(--color-text-muted)}
.integration-method{display:inline-grid;place-items:center;padding:3px 5px;border-radius:4px;background:#dcfce7;color:#166534;font-size:.58rem;font-weight:900}
.integration-http-status{display:inline-grid;place-items:center;min-width:38px;padding:3px 5px;border-radius:999px;font-size:.6rem;font-weight:850}
.integration-http-status.is-ok{background:#dcfce7;color:#166534}
.integration-http-status.is-error{background:#fee2e2;color:#991b1b}
.integration-log-table code{font-size:.61rem}
.integration-empty-inline{padding:18px;text-align:center;color:var(--color-text-muted);font-size:.68rem}
.integration-create{padding:14px}
.integration-scope-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.integration-scope-option{cursor:pointer}
.integration-scope-option input{position:absolute;opacity:0;pointer-events:none}
.integration-scope-option span{
    display:block;padding:9px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);
}
.integration-scope-option strong,.integration-scope-option small{display:block}
.integration-scope-option strong{font-size:.69rem}
.integration-scope-option small{margin-top:2px;color:var(--color-text-muted);font-size:.6rem}
.integration-scope-option input:checked+span{border-color:var(--color-primary);background:var(--brand-primary-soft);box-shadow:0 0 0 2px color-mix(in srgb,var(--color-primary) 12%,transparent)}
.integration-security-note{
    display:flex;gap:9px;align-items:flex-start;margin:10px 0;padding:10px;border:1px solid var(--brand-primary-border);border-radius:8px;background:var(--brand-primary-soft);
}
.integration-security-note i{margin-top:2px;color:var(--color-primary)}
.integration-security-note strong,.integration-security-note p{display:block;margin:0}
.integration-security-note strong{font-size:.7rem}
.integration-security-note p{margin-top:2px;font-size:.62rem;color:var(--color-text-muted)}

@media(max-width:1050px){
    .integration-grid{grid-template-columns:1fr}
    .integration-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
    .integration-scope-grid{grid-template-columns:1fr}
    .integration-endpoints>div{grid-template-columns:48px 1fr}
    .integration-endpoints>div>span:nth-child(3),.integration-endpoints small{grid-column:2}
    .integration-section-head--actions{align-items:flex-start;flex-direction:column}
}
@media(max-width:520px){
    .integration-summary{grid-template-columns:1fr}
    .integration-token-once__actions{align-items:stretch;flex-direction:column}
}


/* =========================================================
   FASE 02.5.35 — CRITÉRIOS E DEPRECIAÇÃO GERAL
   ========================================================= */
.depreciation-criteria-kicker{
    display:inline-flex;align-items:center;gap:6px;margin-bottom:4px;
    color:var(--color-primary);font-size:.66rem;font-weight:900;letter-spacing:.055em;
}
.depreciation-criteria-note,.depreciation-criterion-origin-card{
    display:flex;gap:10px;align-items:flex-start;margin-bottom:12px;padding:11px 12px;
    border:1px solid var(--brand-primary-border);border-radius:9px;background:var(--brand-primary-soft);
}
.depreciation-criteria-note>i,.depreciation-criterion-origin-card>i{margin-top:2px;color:var(--color-primary)}
.depreciation-criteria-note strong,.depreciation-criteria-note p,
.depreciation-criterion-origin-card strong,.depreciation-criterion-origin-card p{display:block;margin:0}
.depreciation-criteria-note strong,.depreciation-criterion-origin-card strong{font-size:.72rem}
.depreciation-criteria-note p,.depreciation-criterion-origin-card p{margin-top:2px;font-size:.65rem;line-height:1.45;color:var(--color-text-muted)}
.depreciation-criterion-origin-card{align-items:center}
.depreciation-criterion-origin-card>div{flex:1}
.depreciation-criteria-search,.depreciation-criteria-card{margin-bottom:12px;padding:14px}
.depreciation-criteria-section-head{margin-bottom:10px}
.depreciation-criteria-section-head>span{color:var(--color-primary);font-size:.61rem;font-weight:900;letter-spacing:.055em}
.depreciation-criteria-section-head h2,.depreciation-criteria-section-head p{margin:0}
.depreciation-criteria-section-head h2{margin-top:2px;font-size:.84rem}
.depreciation-criteria-section-head p{margin-top:2px;font-size:.64rem;color:var(--color-text-muted)}
.depreciation-criteria-search__row{display:grid;grid-template-columns:minmax(250px,1fr) auto auto;gap:7px}
.depreciation-criteria-search__input{position:relative}
.depreciation-criteria-search__input i{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--color-text-muted)}
.depreciation-criteria-search__input input{padding-left:32px}
.depreciation-criteria-results{display:grid;gap:5px;margin-top:9px}
.depreciation-criteria-results>a{
    display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) 120px 18px;
    gap:8px;align-items:center;padding:8px;border:1px solid var(--color-border);border-radius:7px;
    color:var(--color-text);text-decoration:none;
}
.depreciation-criteria-results>a:hover{background:var(--brand-primary-soft)}
.depreciation-criteria-results strong,.depreciation-criteria-results small{display:block}
.depreciation-criteria-results strong{font-size:.68rem}
.depreciation-criteria-results small{margin-top:2px;color:var(--color-text-muted);font-size:.6rem}
.depreciation-criteria-origin{font-size:.61rem;font-weight:800;color:var(--color-primary)}
.depreciation-criteria-list{display:grid;gap:7px}
.depreciation-criteria-item{border:1px solid var(--color-border);border-radius:9px;background:var(--color-surface);overflow:hidden}
.depreciation-criteria-item>summary{
    display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;cursor:pointer;list-style:none;
}
.depreciation-criteria-item>summary::-webkit-details-marker{display:none}
.depreciation-criteria-item>summary strong,.depreciation-criteria-item>summary small{display:block}
.depreciation-criteria-item>summary strong{font-size:.72rem}
.depreciation-criteria-item>summary small{margin-top:2px;color:var(--color-text-muted);font-size:.61rem}
.depreciation-criteria-meta{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.depreciation-criteria-meta>span:not(.status-badge){font-size:.59rem;color:var(--color-text-muted)}
.depreciation-criteria-item__body{padding:11px;border-top:1px solid var(--color-border);background:var(--color-background)}
.depreciation-criteria-actions{display:flex;justify-content:flex-end;margin-top:8px}
.depreciation-criteria-apply{
    display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding:9px;
    border:1px dashed var(--brand-primary-border);border-radius:8px;background:var(--brand-primary-soft);
}
.depreciation-criteria-apply strong,.depreciation-criteria-apply small{display:block}
.depreciation-criteria-apply strong{font-size:.67rem}
.depreciation-criteria-apply small{margin-top:2px;font-size:.6rem;color:var(--color-text-muted)}
.depreciation-criteria-readonly{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:0}
.depreciation-criteria-readonly>div{padding:8px;border:1px solid var(--color-border);border-radius:7px;background:var(--color-surface)}
.depreciation-criteria-readonly dt{font-size:.59rem;color:var(--color-text-muted)}
.depreciation-criteria-readonly dd{margin:3px 0 0;font-size:.68rem;font-weight:700}

@media(max-width:800px){
    .depreciation-criteria-readonly{grid-template-columns:repeat(2,1fr)}
    .depreciation-criteria-results>a{grid-template-columns:1fr 1fr}
    .depreciation-criteria-origin,.depreciation-criteria-results>a>i{display:none}
}
@media(max-width:580px){
    .depreciation-criteria-search__row{grid-template-columns:1fr}
    .depreciation-criteria-item>summary{align-items:flex-start;flex-direction:column}
    .depreciation-criteria-meta{justify-content:flex-start}
    .depreciation-criteria-readonly{grid-template-columns:1fr}
    .depreciation-criteria-apply{align-items:stretch;flex-direction:column}
    .depreciation-criterion-origin-card{align-items:flex-start;flex-wrap:wrap}
}


/* =========================================================
   FASE 02.5.36 — AVALIAÇÃO / REAVALIAÇÃO PATRIMONIAL
   ========================================================= */
.valuation-kicker{display:inline-flex;align-items:center;gap:6px;margin-bottom:4px;color:var(--color-primary);font-size:.66rem;font-weight:900;letter-spacing:.055em}
.valuation-note{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px;padding:11px 12px;border:1px solid var(--brand-primary-border);border-radius:9px;background:var(--brand-primary-soft)}
.valuation-note>i{margin-top:2px;color:var(--color-primary)}
.valuation-note>div{flex:1}
.valuation-note strong,.valuation-note p{display:block;margin:0}
.valuation-note strong{font-size:.72rem}
.valuation-note p{margin-top:2px;font-size:.65rem;line-height:1.45;color:var(--color-text-muted)}
.valuation-note.is-warning{border-color:#fde68a;background:#fffbeb}
.valuation-note.is-warning>i{color:#d97706}
.valuation-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
.valuation-summary>div{display:grid;grid-template-columns:36px 1fr;align-items:center;gap:8px;padding:10px;border:1px solid var(--color-border);border-radius:9px;background:var(--color-surface)}
.valuation-summary i{grid-row:1/3;display:grid;place-items:center;width:36px;height:36px;border-radius:8px;background:var(--brand-primary-soft);color:var(--color-primary)}
.valuation-summary span{font-size:.61rem;color:var(--color-text-muted)}
.valuation-summary strong{font-size:.84rem}
.valuation-card{margin-bottom:12px;padding:14px}
.valuation-filter{display:grid;grid-template-columns:minmax(280px,1fr) 190px auto auto;gap:8px}
.valuation-filter__search,.valuation-bem-search>div{position:relative}
.valuation-filter__search i,.valuation-bem-search>div i{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--color-text-muted)}
.valuation-filter__search input,.valuation-bem-search>div input{padding-left:32px}
.valuation-table td strong,.valuation-table td small{display:block}
.valuation-table td small{margin-top:2px;color:var(--color-text-muted);font-size:.6rem}
.valuation-section-head{margin-bottom:10px}
.valuation-section-head>span{color:var(--color-primary);font-size:.61rem;font-weight:900;letter-spacing:.055em}
.valuation-section-head h2{margin:2px 0 0;font-size:.84rem}
.valuation-bem-search{display:grid;grid-template-columns:1fr auto;gap:8px}
.valuation-bem-results{display:grid;gap:5px;margin-top:10px}
.valuation-bem-results>a{display:grid;grid-template-columns:minmax(200px,1fr) 140px 180px 18px;gap:8px;align-items:center;padding:8px;border:1px solid var(--color-border);border-radius:7px;color:var(--color-text);text-decoration:none}
.valuation-bem-results>a:hover{background:var(--brand-primary-soft)}
.valuation-bem-results strong,.valuation-bem-results small{display:block}
.valuation-bem-results strong{font-size:.69rem}
.valuation-bem-results small{margin-top:2px;font-size:.6rem;color:var(--color-text-muted)}
.valuation-selected-bem{display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;margin-bottom:12px;padding:11px;border:1px solid var(--color-border);border-radius:9px;background:var(--color-surface)}
.valuation-selected-bem>i{display:grid;place-items:center;width:42px;height:42px;border-radius:8px;background:var(--brand-primary-soft);color:var(--color-primary)}
.valuation-selected-bem span,.valuation-selected-bem strong,.valuation-selected-bem small{display:block}
.valuation-selected-bem span{font-size:.59rem;font-weight:900;color:var(--color-primary)}
.valuation-selected-bem strong{font-size:.76rem}
.valuation-selected-bem small{margin-top:2px;font-size:.61rem;color:var(--color-text-muted)}
.valuation-checkbox{display:flex;align-items:center;gap:7px;min-height:38px;font-size:.68rem}
.valuation-confirm{display:flex;gap:9px;margin:10px 0;padding:10px;border:1px solid #fde68a;border-radius:8px;background:#fffbeb}
.valuation-confirm>i{color:#d97706}
.valuation-confirm strong,.valuation-confirm p{display:block;margin:0}
.valuation-confirm strong{font-size:.69rem}
.valuation-confirm p{margin-top:2px;font-size:.62rem;color:#78350f}
.valuation-detail-hero{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:12px}
.valuation-detail-hero>div{padding:10px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface)}
.valuation-detail-hero span,.valuation-detail-hero strong{display:block}
.valuation-detail-hero span{font-size:.58rem;font-weight:800;color:var(--color-text-muted)}
.valuation-detail-hero strong{margin-top:3px;font-size:.75rem}
.valuation-detail-hero .is-positive{color:#166534}.valuation-detail-hero .is-negative{color:#991b1b}
.valuation-text-block{margin-top:8px;padding:9px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-background)}
.valuation-text-block strong{font-size:.66rem;color:var(--color-primary)}
.valuation-text-block p{margin:4px 0 0;font-size:.68rem;line-height:1.55}

@media(max-width:1000px){
 .valuation-summary{grid-template-columns:repeat(2,1fr)}
 .valuation-detail-hero{grid-template-columns:repeat(2,1fr)}
 .valuation-filter{grid-template-columns:1fr 180px}
}
@media(max-width:700px){
 .valuation-bem-results>a{grid-template-columns:1fr}
 .valuation-bem-results>a>i{display:none}
 .valuation-selected-bem{grid-template-columns:42px 1fr}
 .valuation-selected-bem>.btn{grid-column:1/-1}
 .valuation-filter{grid-template-columns:1fr}
}
@media(max-width:520px){
 .valuation-summary,.valuation-detail-hero{grid-template-columns:1fr}
 .valuation-bem-search{grid-template-columns:1fr}
}


/* =========================================================
   FASE 02.5.37 — PLANO DE CONTAS / RECLASSIFICAÇÃO CONTÁBIL
   ========================================================= */
.chart-kicker{display:inline-flex;align-items:center;gap:6px;margin-bottom:4px;color:var(--color-primary);font-size:.66rem;font-weight:900;letter-spacing:.055em}
.chart-note,.chart-current-account{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px;padding:11px 12px;border:1px solid var(--brand-primary-border);border-radius:9px;background:var(--brand-primary-soft)}
.chart-note>i,.chart-current-account>i{margin-top:2px;color:var(--color-primary)}
.chart-note>div,.chart-current-account>div{flex:1}
.chart-note strong,.chart-note p,.chart-current-account strong,.chart-current-account p{display:block;margin:0}
.chart-note strong,.chart-current-account strong{font-size:.72rem}
.chart-note p,.chart-current-account p{margin-top:2px;font-size:.65rem;color:var(--color-text-muted);line-height:1.45}
.chart-current-account{align-items:center}
.chart-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
.chart-summary>div{display:grid;grid-template-columns:36px 1fr;align-items:center;gap:8px;padding:10px;border:1px solid var(--color-border);border-radius:9px;background:var(--color-surface)}
.chart-summary i{grid-row:1/3;display:grid;place-items:center;width:36px;height:36px;border-radius:8px;background:var(--brand-primary-soft);color:var(--color-primary)}
.chart-summary span{font-size:.61rem;color:var(--color-text-muted)}
.chart-summary strong{font-size:.88rem}
.chart-layout{display:grid;grid-template-columns:minmax(300px,.75fr) minmax(0,1.75fr);gap:12px}
.chart-card{margin-bottom:12px;padding:14px;min-width:0}
.chart-section-head{margin-bottom:10px}
.chart-section-head>span{color:var(--color-primary);font-size:.61rem;font-weight:900;letter-spacing:.055em}
.chart-section-head h2,.chart-section-head p{margin:0}
.chart-section-head h2{margin-top:2px;font-size:.84rem}
.chart-section-head p{margin-top:2px;font-size:.64rem;color:var(--color-text-muted)}
.chart-account-create{margin-bottom:9px}
.chart-account-create>summary{display:inline-flex;cursor:pointer;list-style:none}
.chart-account-create>summary::-webkit-details-marker{display:none}
.chart-account-create>form{margin-top:8px;padding:9px;border:1px dashed var(--color-border);border-radius:8px;background:var(--color-background)}
.chart-account-list{display:grid;gap:6px}
.chart-account-item{border:1px solid var(--color-border);border-radius:8px;overflow:hidden}
.chart-account-item>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px;cursor:pointer;list-style:none}
.chart-account-item>summary::-webkit-details-marker{display:none}
.chart-account-item>summary strong,.chart-account-item>summary small{display:block}
.chart-account-item>summary strong{font-size:.68rem}
.chart-account-item>summary small{margin-top:2px;font-size:.59rem;color:var(--color-text-muted)}
.chart-account-item__body{padding:9px;border-top:1px solid var(--color-border);background:var(--color-background)}
.chart-filter{display:grid;grid-template-columns:minmax(220px,1fr) 220px 180px auto 38px;gap:7px;margin-bottom:9px}
.chart-filter__search{position:relative}
.chart-filter__search i{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--color-text-muted)}
.chart-filter__search input{padding-left:32px}
.chart-selection-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;padding:8px;border:1px solid var(--color-border);border-radius:7px;background:var(--color-background);font-size:.64rem}
.chart-assets{max-height:430px}
.chart-assets tr.is-disabled{opacity:.62}
.chart-assets td small{display:block;margin-top:2px;font-size:.58rem;color:var(--color-text-muted)}
.chart-reclass-panel{margin-top:12px;padding-top:12px;border-top:1px solid var(--color-border)}
.chart-confirm{display:grid;grid-template-columns:28px 1fr minmax(210px,.6fr);gap:9px;align-items:center;margin-top:10px;padding:9px;border:1px solid #fde68a;border-radius:8px;background:#fffbeb}
.chart-confirm>i{color:#d97706}
.chart-confirm strong,.chart-confirm p{display:block;margin:0}
.chart-confirm strong{font-size:.68rem}
.chart-confirm p{margin-top:2px;font-size:.6rem;color:#78350f}
.chart-confirm code{font-weight:850}
.chart-history td strong,.chart-history td small,.chart-detail-table td strong,.chart-detail-table td small{display:block}
.chart-history td small,.chart-detail-table td small{margin-top:2px;font-size:.59rem;color:var(--color-text-muted)}
.chart-empty-inline{padding:18px;text-align:center;color:var(--color-text-muted);font-size:.68rem}
.chart-detail-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:12px}
.chart-detail-summary>div{padding:10px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface)}
.chart-detail-summary span,.chart-detail-summary strong,.chart-detail-summary small{display:block}
.chart-detail-summary span{font-size:.58rem;color:var(--color-text-muted);font-weight:800}
.chart-detail-summary strong{margin-top:3px;font-size:.73rem}
.chart-detail-summary small{margin-top:2px;font-size:.58rem;color:var(--color-text-muted)}

@media(max-width:1150px){
 .chart-layout{grid-template-columns:1fr}
 .chart-filter{grid-template-columns:1fr 1fr}
 .chart-summary{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:700px){
 .chart-filter{grid-template-columns:1fr}
 .chart-detail-summary{grid-template-columns:repeat(2,1fr)}
 .chart-confirm{grid-template-columns:28px 1fr}
 .chart-confirm input{grid-column:1/-1}
}
@media(max-width:520px){
 .chart-summary,.chart-detail-summary{grid-template-columns:1fr}
 .chart-selection-bar{align-items:flex-start;flex-direction:column}
 .chart-current-account{align-items:flex-start;flex-wrap:wrap}
}


/* =========================================================
   FASE 02.5.38 — RELATÓRIOS PATRIMONIAIS COMPLEMENTARES
   ========================================================= */
.compl-report-kicker{display:inline-flex;align-items:center;gap:6px;margin-bottom:4px;color:var(--color-primary);font-size:.66rem;font-weight:900;letter-spacing:.055em}
.compl-report-note{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px;padding:11px 12px;border:1px solid var(--brand-primary-border);border-radius:9px;background:var(--brand-primary-soft)}
.compl-report-note>i{margin-top:2px;color:var(--color-primary)}
.compl-report-note strong,.compl-report-note p{display:block;margin:0}
.compl-report-note strong{font-size:.71rem}
.compl-report-note p{margin-top:2px;font-size:.64rem;color:var(--color-text-muted);line-height:1.45}
.compl-report-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
.compl-report-summary>div{padding:10px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface)}
.compl-report-summary span,.compl-report-summary strong{display:block}
.compl-report-summary span{font-size:.59rem;color:var(--color-text-muted)}
.compl-report-summary strong{margin-top:3px;font-size:.83rem}
.compl-report-card{margin-bottom:12px;padding:14px}
.compl-range-filter{display:grid;grid-template-columns:180px 180px auto;gap:8px;align-items:end;margin-bottom:12px}
.compl-number-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:6px}
.compl-number-grid>span{display:grid;place-items:center;min-height:34px;padding:5px;border:1px solid var(--color-border);border-radius:7px;background:var(--color-background);font-size:.68rem;font-weight:800;font-variant-numeric:tabular-nums}
.compl-report-muted{margin:8px 0;color:var(--color-text-muted);font-size:.62rem}
.compl-simple-filter{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;gap:7px;margin-bottom:10px}
.compl-simple-filter>div{position:relative}
.compl-simple-filter>div>i{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--color-text-muted)}
.compl-simple-filter input{padding-left:32px}
.compl-history-table td strong{font-size:.69rem}
.compl-incorp-filter{display:grid;grid-template-columns:minmax(240px,1.5fr) 150px 150px minmax(200px,1fr) minmax(150px,.7fr);gap:8px;align-items:end;margin-bottom:10px}
.compl-incorp-actions{display:flex;gap:7px;grid-column:1/-1}
.compl-account-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:6px;margin:10px 0}
.compl-account-summary>div{padding:8px;border:1px solid var(--color-border);border-radius:7px;background:var(--color-background)}
.compl-account-summary span,.compl-account-summary strong,.compl-account-summary small{display:block}
.compl-account-summary span{font-size:.59rem;color:var(--color-primary);font-weight:850}
.compl-account-summary strong{margin-top:2px;font-size:.65rem}
.compl-account-summary small{margin-top:3px;font-size:.59rem;color:var(--color-text-muted)}
.compl-incorp-table td small{display:block;margin-top:2px;font-size:.58rem;color:var(--color-text-muted)}
.text-right{text-align:right}

@media(max-width:1050px){
 .compl-incorp-filter{grid-template-columns:repeat(2,1fr)}
 .compl-report-summary{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:650px){
 .compl-range-filter,.compl-simple-filter,.compl-incorp-filter{grid-template-columns:1fr}
 .compl-incorp-actions{grid-column:auto;flex-direction:column}
 .compl-report-summary{grid-template-columns:1fr}
}

/* =========================================================
   SGPM 1.2.5 — CONSULTA PÚBLICA: MARCA + PESQUISA DISCRETA
   ========================================================= */
.qr-public-mark__brand {
    display: block;
    width: 190px;
    max-width: 34vw;
    height: auto;
    object-fit: contain;
}

.qr-public-mark__copy {
    min-width: 0;
    padding-left: 12px;
    border-left: 1px solid #dbe4ef;
}

@media (max-width: 760px) {
    .qr-public-mark {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .qr-public-mark__brand {
        width: 165px;
        max-width: 72vw;
    }

    .qr-public-mark__copy {
        padding-left: 0;
        border-left: 0;
    }
}

/* =========================================================
   SGPM 1.2.6 — CORREÇÃO DA PESQUISA DE MUNICÍPIO NA CONSULTA PÚBLICA
   Garante que resultados marcados como hidden não permaneçam visíveis
   por causa das regras de display do componente.
   ========================================================= */
.public-municipio-option[hidden],
.public-municipio-combobox__empty[hidden] {
    display: none !important;
}

/* =========================================================
   SGPM 1.2.8 — LOGIN: MARCA OFICIAL +25%
   Evita que a assinatura horizontal do SGPM ocupe altura
   excessiva e empurre os demais conteúdos para fora do box.
   ========================================================= */
.auth-panel--brand {
    gap: 12px;
}

.auth-brand--official {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: -2px 0 2px;
}

.auth-brand__official-logo {
    width: min(100%, 450px);
    max-height: 93px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: hidden;
}

.auth-brand__official-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 450px;
    max-height: 93px;
    object-fit: contain;
    object-position: center;
}

.auth-brand__highlights {
    margin-top: 0;
    gap: 8px;
}

.auth-highlight {
    padding: 10px 14px;
}

.auth-commercial {
    margin-top: 0;
}

@media (min-width: 1081px) and (max-height: 850px) {
    .auth-panel--brand {
        gap: 9px;
    }

    .auth-brand__official-logo,
    .auth-brand__official-logo img {
        width: min(100%, 400px);
        max-width: 400px;
        max-height: 80px;
    }

    .auth-highlight {
        padding: 8px 12px;
    }
}

@media (max-width: 1080px) {
    .auth-brand__official-logo,
    .auth-brand__official-logo img {
        width: min(100%, 413px);
        max-width: 413px;
        max-height: 85px;
    }
}

@media (max-width: 640px) {
    .auth-brand__official-logo,
    .auth-brand__official-logo img {
        width: min(100%, 325px);
        max-width: 325px;
        max-height: 68px;
    }
}

/* =========================================================
   FASE 02.5.24C — AJUSTE DE LEGIBILIDADE / ENCERRAR EXERCÍCIO (v1.2.12)
   ========================================================= */
.close-year-page-header .page-description {
    font-size: .98rem;
    line-height: 1.6;
}

.close-year-eyebrow {
    font-size: .72rem;
}

.close-year-context__identity small {
    font-size: .66rem;
}

.close-year-context__identity strong {
    font-size: 1rem;
    line-height: 1.45;
}

.close-year-context__identity span {
    font-size: .82rem;
}

.close-year-status {
    min-width: 230px;
    padding: 10px 12px;
}

.close-year-status > i {
    font-size: 1rem;
}

.close-year-status small {
    font-size: .62rem;
}

.close-year-status strong {
    font-size: .80rem;
}

.close-year-guidance {
    padding: 12px 14px;
}

.close-year-guidance > i {
    font-size: 1rem;
}

.close-year-guidance strong {
    font-size: .88rem;
}

.close-year-guidance p {
    font-size: .82rem;
}

.close-year-summary-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
}

.close-year-summary-card > i {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.close-year-summary-card span {
    font-size: .72rem;
}

.close-year-summary-card strong {
    font-size: 1.18rem;
}

.close-year-summary-card small {
    font-size: .68rem;
}

.close-year-section-head span {
    font-size: .66rem;
}

.close-year-section-head h2 {
    font-size: 1.12rem;
}

.close-year-section-head p {
    font-size: .82rem;
}

.close-year-pill {
    font-size: .72rem;
}

.close-year-check {
    grid-template-columns: 38px minmax(0, 1fr) auto 16px;
    gap: 10px;
    padding: 10px 11px;
}

.close-year-check__icon {
    width: 38px;
    height: 38px;
}

.close-year-check__content strong {
    font-size: .86rem;
}

.close-year-check__content small {
    font-size: .74rem;
}

.close-year-check > b {
    min-width: 34px;
    font-size: .90rem;
}

.close-year-check > i {
    font-size: .64rem;
}

.close-year-declarations > label {
    grid-template-columns: 20px minmax(0,1fr);
    gap: 10px;
    padding: 12px 12px;
}

.close-year-declarations input {
    width: 16px;
    height: 16px;
}

.close-year-declarations strong {
    font-size: .86rem;
}

.close-year-declarations small {
    font-size: .75rem;
}

.close-year-confirm-card .form-label,
.close-year-closed-card .form-label,
.close-year-history-card .form-label {
    font-size: .88rem;
}

.close-year-confirm-card .form-help,
.close-year-closed-card .form-help,
.close-year-history-card .form-help {
    font-size: .76rem;
    line-height: 1.5;
}

.close-year-confirm-card .form-control,
.close-year-closed-card .form-control,
.close-year-history-card .form-control {
    font-size: .94rem;
    line-height: 1.55;
}

.close-year-final-action strong {
    font-size: .88rem;
}

.close-year-final-action span {
    font-size: .76rem;
}

.close-year-readonly {
    font-size: .80rem;
}

.close-year-closed-hero span {
    font-size: .66rem;
}

.close-year-closed-hero h2 {
    font-size: 1.08rem;
}

.close-year-closed-hero p {
    font-size: .82rem;
}

.close-year-record strong {
    font-size: .84rem;
}

.close-year-record p {
    font-size: .76rem;
}

.close-year-reopen summary {
    font-size: .84rem;
}

.close-year-history__item strong {
    font-size: .84rem;
}

.close-year-history__item small {
    font-size: .74rem;
}

.close-year-history__item p {
    font-size: .76rem;
    line-height: 1.55;
}

@media (max-width: 600px) {
    .close-year-page-header .page-description {
        font-size: .92rem;
    }

    .close-year-context__identity strong {
        font-size: .92rem;
    }

    .close-year-summary-card strong {
        font-size: 1.06rem;
    }

    .close-year-check {
        grid-template-columns: 38px minmax(0,1fr) auto;
    }
}

/* SGPM 1.2.14 — ações de manutenção da classificação patrimonial */
.classification-actions{display:flex;align-items:center;gap:6px;white-space:nowrap}.classification-actions .inline-form{display:inline-flex;margin:0}.classification-actions .btn{white-space:nowrap}@media(max-width:760px){.classification-actions{align-items:stretch;flex-direction:column}.classification-actions .btn,.classification-actions .inline-form,.classification-actions .inline-form .btn{width:100%;justify-content:center}}

/* =========================================================
   SGPM 1.2.15 — CORREÇÃO DE LARGURA / AÇÕES NAS CLASSIFICAÇÕES
   ========================================================= */
.table--classificacoes {
    width: 100%;
    table-layout: fixed;
}

/* A regra antiga foi criada quando a listagem tinha apenas 4 colunas.
   Com a inclusão de Ações, as larguras antigas somavam 100% antes da
   nova coluna e forçavam rolagem horizontal. As regras abaixo passam a
   distribuir corretamente cada página. */
.table--classificacoes-grupos th:nth-child(1),
.table--classificacoes-grupos td:nth-child(1) { width: 9%; }
.table--classificacoes-grupos th:nth-child(2),
.table--classificacoes-grupos td:nth-child(2) { width: 22%; }
.table--classificacoes-grupos th:nth-child(3),
.table--classificacoes-grupos td:nth-child(3) { width: 43%; }
.table--classificacoes-grupos th:nth-child(4),
.table--classificacoes-grupos td:nth-child(4) { width: 10%; }
.table--classificacoes-grupos th:nth-child(5),
.table--classificacoes-grupos td:nth-child(5) { width: 16%; }

.table--classificacoes-subgrupos th:nth-child(1),
.table--classificacoes-subgrupos td:nth-child(1) { width: 8%; }
.table--classificacoes-subgrupos th:nth-child(2),
.table--classificacoes-subgrupos td:nth-child(2) { width: 17%; }
.table--classificacoes-subgrupos th:nth-child(3),
.table--classificacoes-subgrupos td:nth-child(3) { width: 17%; }
.table--classificacoes-subgrupos th:nth-child(4),
.table--classificacoes-subgrupos td:nth-child(4) { width: 31%; }
.table--classificacoes-subgrupos th:nth-child(5),
.table--classificacoes-subgrupos td:nth-child(5) { width: 9%; }
.table--classificacoes-subgrupos th:nth-child(6),
.table--classificacoes-subgrupos td:nth-child(6) { width: 18%; }

.table--classificacoes-tipos th:nth-child(1),
.table--classificacoes-tipos td:nth-child(1) { width: 7%; }
.table--classificacoes-tipos th:nth-child(2),
.table--classificacoes-tipos td:nth-child(2) { width: 16%; }
.table--classificacoes-tipos th:nth-child(3),
.table--classificacoes-tipos td:nth-child(3) { width: 14%; }
.table--classificacoes-tipos th:nth-child(4),
.table--classificacoes-tipos td:nth-child(4) { width: 14%; }
.table--classificacoes-tipos th:nth-child(5),
.table--classificacoes-tipos td:nth-child(5) { width: 25%; }
.table--classificacoes-tipos th:nth-child(6),
.table--classificacoes-tipos td:nth-child(6) { width: 8%; }
.table--classificacoes-tipos th:nth-child(7),
.table--classificacoes-tipos td:nth-child(7) { width: 16%; }

.table--classificacoes td {
    overflow-wrap: anywhere;
    word-break: normal;
}

.classification-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    white-space: normal;
}

.classification-actions .btn {
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
}

.classification-actions .inline-form {
    display: inline-flex;
    margin: 0;
}

@media (max-width: 980px) {
    .table--classificacoes {
        table-layout: auto;
        min-width: 860px;
    }

    .classification-actions {
        justify-content: flex-start;
    }
}

/* =========================================================
   SGPM 1.2.16 — CORREÇÃO FINAL DAS TABELAS DE CLASSIFICAÇÃO
   Evita sobreposição entre Situação e Ações e remove rolagem
   horizontal desnecessária em desktop.
   ========================================================= */
@media (min-width: 981px) {
    .classification-table-responsive {
        overflow-x: hidden !important;
    }

    .classification-table-responsive > .table--classificacoes {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed !important;
    }

    .table--classificacoes-grupos th:nth-child(1),
    .table--classificacoes-grupos td:nth-child(1) { width: 8% !important; }
    .table--classificacoes-grupos th:nth-child(2),
    .table--classificacoes-grupos td:nth-child(2) { width: 22% !important; }
    .table--classificacoes-grupos th:nth-child(3),
    .table--classificacoes-grupos td:nth-child(3) { width: 44% !important; }
    .table--classificacoes-grupos th:nth-child(4),
    .table--classificacoes-grupos td:nth-child(4) { width: 10% !important; }
    .table--classificacoes-grupos th:nth-child(5),
    .table--classificacoes-grupos td:nth-child(5) { width: 16% !important; }

    .table--classificacoes-subgrupos th:nth-child(1),
    .table--classificacoes-subgrupos td:nth-child(1) { width: 7% !important; }
    .table--classificacoes-subgrupos th:nth-child(2),
    .table--classificacoes-subgrupos td:nth-child(2) { width: 18% !important; }
    .table--classificacoes-subgrupos th:nth-child(3),
    .table--classificacoes-subgrupos td:nth-child(3) { width: 18% !important; }
    .table--classificacoes-subgrupos th:nth-child(4),
    .table--classificacoes-subgrupos td:nth-child(4) { width: 30% !important; }
    .table--classificacoes-subgrupos th:nth-child(5),
    .table--classificacoes-subgrupos td:nth-child(5) { width: 9% !important; }
    .table--classificacoes-subgrupos th:nth-child(6),
    .table--classificacoes-subgrupos td:nth-child(6) { width: 18% !important; }

    .table--classificacoes-tipos th:nth-child(1),
    .table--classificacoes-tipos td:nth-child(1) { width: 6% !important; }
    .table--classificacoes-tipos th:nth-child(2),
    .table--classificacoes-tipos td:nth-child(2) { width: 15% !important; }
    .table--classificacoes-tipos th:nth-child(3),
    .table--classificacoes-tipos td:nth-child(3) { width: 14% !important; }
    .table--classificacoes-tipos th:nth-child(4),
    .table--classificacoes-tipos td:nth-child(4) { width: 14% !important; }
    .table--classificacoes-tipos th:nth-child(5),
    .table--classificacoes-tipos td:nth-child(5) { width: 25% !important; }
    .table--classificacoes-tipos th:nth-child(6),
    .table--classificacoes-tipos td:nth-child(6) { width: 8% !important; }
    .table--classificacoes-tipos th:nth-child(7),
    .table--classificacoes-tipos td:nth-child(7) { width: 18% !important; }

    .table--classificacoes th,
    .table--classificacoes td {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .table--classificacoes td:nth-last-child(2) {
        white-space: nowrap;
    }

    .classification-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 5px !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        width: 100% !important;
        min-width: 0 !important;
        white-space: normal !important;
    }

    .classification-actions .btn,
    .classification-actions .inline-form,
    .classification-actions .inline-form .btn {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .classification-actions .btn {
        min-height: 31px !important;
        padding: .34rem .48rem !important;
        justify-content: center !important;
        font-size: .72rem !important;
    }
}

@media (max-width: 980px) {
    .classification-table-responsive {
        overflow-x: auto;
    }

    .classification-table-responsive > .table--classificacoes {
        min-width: 900px !important;
        table-layout: fixed !important;
    }
}

/* =========================================================
   SGPM 1.2.17 — CORREÇÃO ESTRUTURAL DAS AÇÕES EM CLASSIFICAÇÕES
   O TD continua sendo table-cell; o layout flex fica em um wrapper interno.
   ========================================================= */
.table--classificacoes td.classification-actions,
.table--classificacoes th:last-child {
    overflow: visible !important;
    text-overflow: clip !important;
}

.table--classificacoes td.classification-actions {
    display: table-cell !important;
    vertical-align: middle !important;
    white-space: normal !important;
}

.classification-actions__inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.classification-actions__inner .inline-form {
    display: inline-flex;
    margin: 0;
}

.classification-actions__inner .btn,
.classification-actions__inner .inline-form .btn {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 34px !important;
    padding: .42rem .62rem !important;
    margin: 0 !important;
    font-size: .78rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    justify-content: center !important;
}

@media (min-width: 981px) {
    .table--classificacoes-grupos th:nth-child(1),
    .table--classificacoes-grupos td:nth-child(1) { width: 8% !important; }
    .table--classificacoes-grupos th:nth-child(2),
    .table--classificacoes-grupos td:nth-child(2) { width: 21% !important; }
    .table--classificacoes-grupos th:nth-child(3),
    .table--classificacoes-grupos td:nth-child(3) { width: 39% !important; }
    .table--classificacoes-grupos th:nth-child(4),
    .table--classificacoes-grupos td:nth-child(4) { width: 10% !important; }
    .table--classificacoes-grupos th:nth-child(5),
    .table--classificacoes-grupos td:nth-child(5) { width: 22% !important; }

    .table--classificacoes-subgrupos th:nth-child(1),
    .table--classificacoes-subgrupos td:nth-child(1) { width: 7% !important; }
    .table--classificacoes-subgrupos th:nth-child(2),
    .table--classificacoes-subgrupos td:nth-child(2) { width: 17% !important; }
    .table--classificacoes-subgrupos th:nth-child(3),
    .table--classificacoes-subgrupos td:nth-child(3) { width: 17% !important; }
    .table--classificacoes-subgrupos th:nth-child(4),
    .table--classificacoes-subgrupos td:nth-child(4) { width: 28% !important; }
    .table--classificacoes-subgrupos th:nth-child(5),
    .table--classificacoes-subgrupos td:nth-child(5) { width: 9% !important; }
    .table--classificacoes-subgrupos th:nth-child(6),
    .table--classificacoes-subgrupos td:nth-child(6) { width: 22% !important; }

    .table--classificacoes-tipos th:nth-child(1),
    .table--classificacoes-tipos td:nth-child(1) { width: 6% !important; }
    .table--classificacoes-tipos th:nth-child(2),
    .table--classificacoes-tipos td:nth-child(2) { width: 14% !important; }
    .table--classificacoes-tipos th:nth-child(3),
    .table--classificacoes-tipos td:nth-child(3) { width: 13% !important; }
    .table--classificacoes-tipos th:nth-child(4),
    .table--classificacoes-tipos td:nth-child(4) { width: 13% !important; }
    .table--classificacoes-tipos th:nth-child(5),
    .table--classificacoes-tipos td:nth-child(5) { width: 24% !important; }
    .table--classificacoes-tipos th:nth-child(6),
    .table--classificacoes-tipos td:nth-child(6) { width: 8% !important; }
    .table--classificacoes-tipos th:nth-child(7),
    .table--classificacoes-tipos td:nth-child(7) { width: 22% !important; }
}

@media (max-width: 980px) {
    .classification-actions__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .classification-actions__inner .btn,
    .classification-actions__inner .inline-form,
    .classification-actions__inner .inline-form .btn {
        width: 100% !important;
    }
}

/* =========================================================
   SGPM 1.2.18 — CRUD DE LOCALIZAÇÕES FÍSICAS
   ========================================================= */
.location-actions-col {
    width: 190px;
    min-width: 190px;
    white-space: nowrap;
}
.location-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
}
.location-actions form {
    margin: 0;
}
.location-actions .btn {
    min-width: 82px;
    justify-content: center;
}
@media (max-width: 900px) {
    .location-actions-col {
        min-width: 176px;
    }
}


/* =========================================================
   SGPM 1.2.19 — CRUD ESTRUTURA ORGANIZACIONAL
   ========================================================= */
.structure-crud-help { margin-bottom: 14px; }
.structure-actions-col { width: 190px; min-width: 190px; }
.structure-actions { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: nowrap; }
.structure-actions form { margin: 0; }
.structure-actions .btn { white-space: nowrap; }
.crud-active-toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
@media (max-width: 900px) {
  .structure-actions-col { width: 170px; min-width: 170px; }
  .structure-actions { flex-direction: column; align-items: stretch; }
  .structure-actions .btn { width: 100%; justify-content: center; }
}

/* =========================================================
   SGPM 1.2.22 — CORREÇÃO DAS COLUNAS DE AÇÕES
   Tombamento + Relatório Analítico de Movimentações
   ========================================================= */

/* TOMBAMENTO ------------------------------------------------ */
.table--bens {
    min-width: 1280px;
    table-layout: fixed;
}

.table--bens th:nth-child(1) { width: 8%; }
.table--bens th:nth-child(2) { width: 8%; }
.table--bens th:nth-child(3) { width: 11%; }
.table--bens th:nth-child(4) { width: 11%; }
.table--bens th:nth-child(5) { width: 10%; }
.table--bens th:nth-child(6) { width: 12%; }
.table--bens th:nth-child(7) { width: 12%; }
.table--bens th:nth-child(8) { width: 8%; }
.table--bens th:nth-child(9) { width: 8%; }
.table--bens th:nth-child(10) { width: 12%; }

.table--bens th:nth-child(10),
.table--bens td:nth-child(10) {
    min-width: 150px;
    white-space: normal;
}

.table--bens .sgpm-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap;
}

.table--bens .sgpm-row-actions .btn {
    flex: 0 0 auto;
    min-width: 0;
    padding-left: 9px;
    padding-right: 9px;
    white-space: nowrap;
}

/* MOVIMENTAÇÕES -------------------------------------------- */
.movement-table {
    min-width: 1400px;
    table-layout: fixed;
}

.movement-table th:nth-child(1) { width: 9%; }
.movement-table th:nth-child(2) { width: 10%; }
.movement-table th:nth-child(3) { width: 13%; }
.movement-table th:nth-child(4) { width: 17%; }
.movement-table th:nth-child(5) { width: 17%; }
.movement-table th:nth-child(6) { width: 18%; }
.movement-table th:nth-child(7) { width: 16%; }

.movement-table th:nth-child(7),
.movement-table td:nth-child(7) {
    min-width: 220px;
    white-space: normal;
}

.movement-table .movement-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap;
    white-space: normal;
}

.movement-table .movement-row-actions .btn {
    flex: 0 0 auto;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
}

/* Em telas menores, a rolagem horizontal continua proposital
   para preservar a legibilidade das tabelas extensas. */
@media (max-width: 900px) {
    .table--bens .sgpm-row-actions,
    .movement-table .movement-row-actions {
        flex-wrap: wrap;
    }
}


/* =========================================================
   SGPM 1.2.25 — ATALHO FIXO DO WHATSAPP
   ========================================================= */
.fixed-utility-button--whatsapp {
    text-decoration: none;
    border-color: #25D366;
    background: #25D366;
    color: #ffffff;
}

.fixed-utility-button--whatsapp > i {
    font-size: 1.2rem;
}

.fixed-utility-button--whatsapp:hover {
    border-color: #1ebe5d;
    background: #1ebe5d;
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(37, 211, 102, .28);
    transform: translateX(-2px);
}

.fixed-utility-button--whatsapp:focus-visible {
    outline: 3px solid rgba(37, 211, 102, .30);
    outline-offset: 3px;
}

[data-theme="dark"] .fixed-utility-button--whatsapp,
.high-contrast .fixed-utility-button--whatsapp {
    border-color: #25D366;
    background: #25D366;
    color: #ffffff;
}


/* =========================================================
   SGPM 1.2.26 — TEMA ESCURO: LEGIBILIDADE — LOTE 01
   Páginas tratadas:
   - Visão Geral
   - Tombamento
   - QR Code / Etiquetas
   - Movimentações
   - Termos de Movimentação
   ========================================================= */

/* ---------------------------------------------------------
   1. VISÃO GERAL
   O aviso de escopo usava a cor clara do tema institucional.
   --------------------------------------------------------- */
html[data-theme="dark"] .dashboard-acervo-context-note {
    background: #172554;
    border-color: #3156a3;
    color: #f8fafc;
}

html[data-theme="dark"] .dashboard-acervo-context-note > i {
    color: #93c5fd;
}

html[data-theme="dark"] .dashboard-acervo-context-note > span,
html[data-theme="dark"] .dashboard-acervo-context-note strong {
    color: #dbeafe;
}

/* ---------------------------------------------------------
   Botão secundário / ação auxiliar nas cinco páginas
   --------------------------------------------------------- */
html[data-theme="dark"] .table--bens .btn-secondary,
html[data-theme="dark"] .qr-label-table .btn-secondary,
html[data-theme="dark"] .movement-filter-actions .btn-secondary,
html[data-theme="dark"] .movement-table .btn-secondary,
html[data-theme="dark"] .movement-terms-table .btn-secondary {
    background: #263b61;
    border-color: #4f6fa8;
    color: #eaf2ff;
    box-shadow: none;
}

html[data-theme="dark"] .table--bens .btn-secondary:hover,
html[data-theme="dark"] .table--bens .btn-secondary:focus-visible,
html[data-theme="dark"] .qr-label-table .btn-secondary:hover,
html[data-theme="dark"] .qr-label-table .btn-secondary:focus-visible,
html[data-theme="dark"] .movement-filter-actions .btn-secondary:hover,
html[data-theme="dark"] .movement-filter-actions .btn-secondary:focus-visible,
html[data-theme="dark"] .movement-table .btn-secondary:hover,
html[data-theme="dark"] .movement-table .btn-secondary:focus-visible,
html[data-theme="dark"] .movement-terms-table .btn-secondary:hover,
html[data-theme="dark"] .movement-terms-table .btn-secondary:focus-visible {
    background: #31518a;
    border-color: #7aa2e3;
    color: #ffffff;
}

/* ---------------------------------------------------------
   2. TOMBAMENTO
   --------------------------------------------------------- */
html[data-theme="dark"] .table--bens .sgpm-row-actions .btn-secondary i {
    color: #c4d8ff;
}

/* ---------------------------------------------------------
   3. QR CODE / ETIQUETAS
   Corrige o card do padrão institucional e ações da tabela.
   --------------------------------------------------------- */
html[data-theme="dark"] .label-global-config-card,
html[data-theme="dark"] .label-pattern-notice {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

html[data-theme="dark"] .label-global-config-card:hover {
    background: #243451;
    border-color: #60a5fa;
}

html[data-theme="dark"] .label-global-config-card__icon {
    background: #243b67;
    color: #93c5fd;
}

html[data-theme="dark"] .label-global-config-card span,
html[data-theme="dark"] .label-pattern-notice strong {
    color: #f8fafc;
}

html[data-theme="dark"] .label-global-config-card small,
html[data-theme="dark"] .label-pattern-notice span {
    color: #cbd5e1;
}

html[data-theme="dark"] .qr-label-version {
    background: #263b61;
    border-color: #475f88;
    color: #bfdbfe;
}

html[data-theme="dark"] .qr-label-actions .btn-secondary i {
    color: #c4d8ff;
}

/* ---------------------------------------------------------
   4. MOVIMENTAÇÕES
   --------------------------------------------------------- */
html[data-theme="dark"] .movement-filter-actions .btn-secondary {
    min-height: 40px;
}

html[data-theme="dark"] .movement-table .movement-row-actions .btn-secondary i {
    color: #c4d8ff;
}

/* ---------------------------------------------------------
   5. TERMOS DE MOVIMENTAÇÃO
   --------------------------------------------------------- */
html[data-theme="dark"] .movement-terms-table .movement-row-actions .btn-secondary i {
    color: #c4d8ff;
}

/* ---------------------------------------------------------
   Ajustes complementares de contraste nas tabelas do lote
   --------------------------------------------------------- */
html[data-theme="dark"] .table--bens tbody td,
html[data-theme="dark"] .qr-label-table tbody td,
html[data-theme="dark"] .movement-table tbody td,
html[data-theme="dark"] .movement-terms-table tbody td {
    color: #f1f5f9;
}

html[data-theme="dark"] .table--bens tbody small,
html[data-theme="dark"] .qr-label-table tbody small,
html[data-theme="dark"] .movement-table tbody small,
html[data-theme="dark"] .movement-terms-table tbody small,
html[data-theme="dark"] .movement-subline,
html[data-theme="dark"] .movement-term-route {
    color: #cbd5e1;
}

/* =========================================================
   SGPM 1.2.27 — TEMA ESCURO: LEGIBILIDADE — LOTE 02
   Páginas tratadas:
   - Critérios de Depreciação
   - Baixa Patrimonial
   - Aquisições
   - Grupos/Subgrupos/Tipos de Bem
   - Dados Contábeis e Depreciação
   + regra global de legibilidade para ferramentas CRUD no tema escuro
   ========================================================= */

/* ---------------------------------------------------------
   REGRA GLOBAL — CRUD / AÇÕES SECUNDÁRIAS NO TEMA ESCURO
   Evita links e botões roxos/escuros sobre fundo escuro.
   --------------------------------------------------------- */
html[data-theme="dark"] .btn.btn-secondary,
html[data-theme="dark"] a.btn.btn-secondary,
html[data-theme="dark"] button.btn.btn-secondary {
    background: #243b67 !important;
    border-color: #4f6fa8 !important;
    color: #f8fbff !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .btn.btn-secondary i,
html[data-theme="dark"] a.btn.btn-secondary i,
html[data-theme="dark"] button.btn.btn-secondary i {
    color: #bfdbfe !important;
}

html[data-theme="dark"] .btn.btn-secondary:hover,
html[data-theme="dark"] .btn.btn-secondary:focus-visible,
html[data-theme="dark"] a.btn.btn-secondary:hover,
html[data-theme="dark"] a.btn.btn-secondary:focus-visible,
html[data-theme="dark"] button.btn.btn-secondary:hover,
html[data-theme="dark"] button.btn.btn-secondary:focus-visible {
    background: #31518a !important;
    border-color: #7aa2e3 !important;
    color: #ffffff !important;
}

/* Botões/link-actions que não usam .btn-secondary, mas funcionam como CRUD */
html[data-theme="dark"] .classification-actions a,
html[data-theme="dark"] .table-actions a,
html[data-theme="dark"] .crud-actions a,
html[data-theme="dark"] .action-links a,
html[data-theme="dark"] td.actions a:not(.btn-danger):not(.btn-primary),
html[data-theme="dark"] td[class*="action"] a:not(.btn-danger):not(.btn-primary) {
    color: #bfdbfe !important;
}

html[data-theme="dark"] .classification-actions a:hover,
html[data-theme="dark"] .table-actions a:hover,
html[data-theme="dark"] .crud-actions a:hover,
html[data-theme="dark"] .action-links a:hover,
html[data-theme="dark"] td.actions a:not(.btn-danger):not(.btn-primary):hover,
html[data-theme="dark"] td[class*="action"] a:not(.btn-danger):not(.btn-primary):hover {
    color: #ffffff !important;
}

/* ---------------------------------------------------------
   1. CRITÉRIOS DE DEPRECIAÇÃO
   --------------------------------------------------------- */
html[data-theme="dark"] .depreciation-criteria-note {
    background: #172554 !important;
    border-color: #3156a3 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .depreciation-criteria-note > i {
    color: #93c5fd !important;
}

html[data-theme="dark"] .depreciation-criteria-note strong {
    color: #ffffff !important;
}

html[data-theme="dark"] .depreciation-criteria-note p,
html[data-theme="dark"] .depreciation-criteria-note span {
    color: #dbeafe !important;
}

/* ---------------------------------------------------------
   2. BAIXA PATRIMONIAL
   --------------------------------------------------------- */
html[data-theme="dark"] .page-header .btn.btn-secondary[href*="/baixas/relatorio"] {
    background: #243b67 !important;
    border-color: #4f6fa8 !important;
    color: #f8fbff !important;
}

html[data-theme="dark"] .page-header .btn.btn-secondary[href*="/baixas/relatorio"] i {
    color: #bfdbfe !important;
}

/* ---------------------------------------------------------
   3. AQUISIÇÕES
   --------------------------------------------------------- */
html[data-theme="dark"] .table--aquisicoes .btn-secondary {
    background: #243b67 !important;
    border-color: #4f6fa8 !important;
    color: #f8fbff !important;
}

html[data-theme="dark"] .table--aquisicoes .btn-secondary i {
    color: #bfdbfe !important;
}

html[data-theme="dark"] .table--aquisicoes td a:not(.btn-danger):not(.btn-primary) {
    color: #bfdbfe;
}

/* ---------------------------------------------------------
   4. CLASSIFICAÇÃO — GRUPOS / SUBGRUPOS / TIPOS
   --------------------------------------------------------- */
html[data-theme="dark"] .table--classificacoes .classification-actions .btn-secondary,
html[data-theme="dark"] .classification-actions .btn-secondary {
    background: #243b67 !important;
    border-color: #4f6fa8 !important;
    color: #f8fbff !important;
}

html[data-theme="dark"] .table--classificacoes .classification-actions .btn-secondary i,
html[data-theme="dark"] .classification-actions .btn-secondary i {
    color: #bfdbfe !important;
}

html[data-theme="dark"] .page-header .form-actions .btn-secondary[href*="/classificacoes/"] {
    background: #243b67 !important;
    border-color: #4f6fa8 !important;
    color: #f8fbff !important;
}

html[data-theme="dark"] .page-header .form-actions .btn-secondary[href*="/classificacoes/"] i {
    color: #bfdbfe !important;
}

/* ---------------------------------------------------------
   5. DADOS CONTÁBEIS E DEPRECIAÇÃO
   --------------------------------------------------------- */
html[data-theme="dark"] .page-header__actions .btn-secondary[href*="contabilidade-patrimonial"],
html[data-theme="dark"] .table a.btn-secondary[href*="contabilidade-patrimonial/editar"] {
    background: #243b67 !important;
    border-color: #4f6fa8 !important;
    color: #f8fbff !important;
}

html[data-theme="dark"] .page-header__actions .btn-secondary[href*="contabilidade-patrimonial"] i,
html[data-theme="dark"] .table a.btn-secondary[href*="contabilidade-patrimonial/editar"] i {
    color: #bfdbfe !important;
}

/* ---------------------------------------------------------
   PADRÃO GLOBAL DE FOCO — CRUD E LINKS DE AÇÃO
   --------------------------------------------------------- */
html[data-theme="dark"] .btn:focus-visible,
html[data-theme="dark"] .classification-actions a:focus-visible,
html[data-theme="dark"] .table-actions a:focus-visible,
html[data-theme="dark"] .crud-actions a:focus-visible {
    outline: 3px solid rgba(147, 197, 253, .35) !important;
    outline-offset: 2px !important;
}


/* =========================================================
   SGPM 1.2.28 — TEMA ESCURO: LEGIBILIDADE — LOTE 03
   Páginas:
   - Avaliação / Reavaliação
   - Plano de Contas
   - Inventário
   - Relatórios e Consultas
   - Auditoria
   + Hover da Sidebar
   ========================================================= */

/* ---------------------------------------------------------
   PADRÃO GLOBAL — AÇÕES SECUNDÁRIAS / CRUD NO TEMA ESCURO
   --------------------------------------------------------- */
html[data-theme="dark"] .btn-secondary {
    background: #263b61 !important;
    border-color: #4f6fa8 !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .btn-secondary i,
html[data-theme="dark"] .btn-secondary svg {
    color: #bfdbfe !important;
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-secondary:focus-visible {
    background: #31518a !important;
    border-color: #7aa2e3 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .btn-secondary:hover i,
html[data-theme="dark"] .btn-secondary:focus-visible i {
    color: #ffffff !important;
}

/* Links de ação que não usam botão */
html[data-theme="dark"] .form-actions > a,
html[data-theme="dark"] .page-header__actions > a:not(.btn-primary),
html[data-theme="dark"] .table-actions > a:not(.btn-primary) {
    color: #bfdbfe;
}

/* ---------------------------------------------------------
   SIDEBAR — HOVER COM CONTRASTE ADEQUADO
   --------------------------------------------------------- */
html[data-theme="dark"] .sidebar-link:hover {
    background: #263b61;
    color: #ffffff;
}

html[data-theme="dark"] .sidebar-link:hover .sidebar-link__icon {
    color: #bfdbfe;
}

html[data-theme="dark"] .sidebar-link.is-active:hover,
html[data-theme="dark"] .sidebar-link[aria-current="page"]:hover {
    background: #1d4ed8;
    color: #ffffff;
}

html[data-theme="dark"] .sidebar-link.is-active:hover .sidebar-link__icon,
html[data-theme="dark"] .sidebar-link[aria-current="page"]:hover .sidebar-link__icon {
    color: #ffffff;
}

/* ---------------------------------------------------------
   1. AVALIAÇÃO / REAVALIAÇÃO
   --------------------------------------------------------- */
html[data-theme="dark"] .valuation-note {
    background: #172554;
    border-color: #3156a3;
    color: #f8fafc;
}

html[data-theme="dark"] .valuation-note > i {
    color: #93c5fd;
}

html[data-theme="dark"] .valuation-note strong {
    color: #f8fafc;
}

html[data-theme="dark"] .valuation-note p {
    color: #dbeafe;
}

html[data-theme="dark"] .valuation-note.is-warning {
    background: #422006;
    border-color: #a16207;
}

html[data-theme="dark"] .valuation-note.is-warning > i {
    color: #fbbf24;
}

html[data-theme="dark"] .valuation-note.is-warning p {
    color: #fde68a;
}

html[data-theme="dark"] .valuation-card .empty-state h3,
html[data-theme="dark"] .valuation-card .empty-state p {
    color: #f1f5f9;
}

/* ---------------------------------------------------------
   2. PLANO DE CONTAS
   --------------------------------------------------------- */
html[data-theme="dark"] .chart-note,
html[data-theme="dark"] .chart-current-account {
    background: #172554;
    border-color: #3156a3;
    color: #f8fafc;
}

html[data-theme="dark"] .chart-note > i,
html[data-theme="dark"] .chart-current-account > i {
    color: #93c5fd;
}

html[data-theme="dark"] .chart-note strong,
html[data-theme="dark"] .chart-current-account strong {
    color: #f8fafc;
}

html[data-theme="dark"] .chart-note p,
html[data-theme="dark"] .chart-current-account p {
    color: #dbeafe;
}

html[data-theme="dark"] .chart-filter .btn-secondary {
    background: #263b61 !important;
    color: #f8fafc !important;
}

/* ---------------------------------------------------------
   3. INVENTÁRIO
   --------------------------------------------------------- */
html[data-theme="dark"] .inventory-filter-actions .btn-secondary,
html[data-theme="dark"] .inventory-page .btn-secondary {
    background: #263b61 !important;
    border-color: #4f6fa8 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .inventory-filter-actions .btn-secondary i,
html[data-theme="dark"] .inventory-page .btn-secondary i {
    color: #bfdbfe !important;
}

html[data-theme="dark"] .inventory-status--concluido {
    background: #14532d;
    color: #dcfce7;
}

html[data-theme="dark"] .inventory-status--em-preparacao {
    background: #1e3a8a;
    color: #dbeafe;
}

html[data-theme="dark"] .inventory-status--em-andamento {
    background: #064e3b;
    color: #d1fae5;
}

html[data-theme="dark"] .inventory-status--em-conciliacao {
    background: #78350f;
    color: #fef3c7;
}

html[data-theme="dark"] .inventory-status--cancelado {
    background: #7f1d1d;
    color: #fee2e2;
}

/* ---------------------------------------------------------
   4. RELATÓRIOS E CONSULTAS
   Os cards deixavam fundo branco com títulos quase invisíveis.
   --------------------------------------------------------- */
html[data-theme="dark"] .report-hub-card {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

html[data-theme="dark"] .report-hub-card:hover {
    background: #243451;
    border-color: #60a5fa;
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
}

html[data-theme="dark"] .report-hub-card > i:first-child {
    background: #243b67;
    color: #93c5fd;
}

html[data-theme="dark"] .report-hub-card strong {
    color: #f8fafc;
}

html[data-theme="dark"] .report-hub-card span {
    color: #cbd5e1;
}

html[data-theme="dark"] .report-hub-card > i:last-child {
    color: #94a3b8;
}

html[data-theme="dark"] .report-hub-overview {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}

html[data-theme="dark"] .report-hub-overview strong {
    color: #93c5fd;
}

/* ---------------------------------------------------------
   5. AUDITORIA
   --------------------------------------------------------- */
html[data-theme="dark"] .audit-filter-actions .btn-secondary,
html[data-theme="dark"] .audit-pagination .btn-secondary {
    background: #263b61 !important;
    border-color: #4f6fa8 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .audit-pagination .btn-secondary.is-disabled,
html[data-theme="dark"] .audit-pagination .btn-secondary[aria-disabled="true"] {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #64748b !important;
    opacity: .8;
}

html[data-theme="dark"] .audit-event__details > summary {
    color: #93c5fd;
}

html[data-theme="dark"] .audit-event__action {
    background: #243b67;
    color: #bfdbfe;
}

html[data-theme="dark"] .audit-active-filters,
html[data-theme="dark"] .audit-filter-chip {
    color: #e2e8f0;
}

/* ---------------------------------------------------------
   Reforço de acessibilidade para foco de teclado
   --------------------------------------------------------- */
html[data-theme="dark"] .sidebar-link:focus-visible,
html[data-theme="dark"] .btn-secondary:focus-visible,
html[data-theme="dark"] .report-hub-card:focus-visible {
    outline: 3px solid rgba(96,165,250,.45);
    outline-offset: 2px;
}


/* =========================================================
   SGPM 1.2.29 — TEMA ESCURO: LEGIBILIDADE — LOTE 04
   Páginas:
   - Encerrar Exercício
   - Usuários e Acessos
   - Documentos Auxiliares
   - Responsáveis pelo Desfazimento
   - Operações em Massa
   ========================================================= */

/* ---------------------------------------------------------
   1. ENCERRAR EXERCÍCIO
   --------------------------------------------------------- */
html[data-theme="dark"] .close-year-guidance {
    background: #172554 !important;
    border-color: #3156a3 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .close-year-guidance > i {
    color: #93c5fd !important;
}

html[data-theme="dark"] .close-year-guidance strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .close-year-guidance p {
    color: #dbeafe !important;
}

/* ---------------------------------------------------------
   2. USUÁRIOS E ACESSOS
   --------------------------------------------------------- */
html[data-theme="dark"] .user-access-hub__notice {
    background: #172554 !important;
    border-color: #3156a3 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .user-access-hub__notice > i {
    color: #93c5fd !important;
}

html[data-theme="dark"] .user-access-hub__notice strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .user-access-hub__notice span {
    color: #dbeafe !important;
}

html[data-theme="dark"] .user-access-hub__step:hover {
    background: #243451 !important;
    border-color: #60a5fa !important;
}

html[data-theme="dark"] .user-access-hub__step:hover strong,
html[data-theme="dark"] .user-access-hub__step:hover small,
html[data-theme="dark"] .user-access-hub__step:hover > i:last-child {
    color: #f8fafc !important;
}

/* ---------------------------------------------------------
   3. DOCUMENTOS AUXILIARES
   --------------------------------------------------------- */
html[data-theme="dark"] .docs-library-info {
    background: #172554 !important;
    border-color: #3156a3 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .docs-library-info > i {
    color: #93c5fd !important;
}

html[data-theme="dark"] .docs-library-info strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .docs-library-info span {
    color: #dbeafe !important;
}

html[data-theme="dark"] .docs-library-empty,
html[data-theme="dark"] .docs-library-empty h3,
html[data-theme="dark"] .docs-library-empty p {
    color: #f1f5f9 !important;
}

/* ---------------------------------------------------------
   4. RESPONSÁVEIS PELO DESFAZIMENTO
   --------------------------------------------------------- */
html[data-theme="dark"] .desf-resp-info {
    background: #172554 !important;
    border-color: #3156a3 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .desf-resp-info > i {
    color: #93c5fd !important;
}

html[data-theme="dark"] .desf-resp-info strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .desf-resp-info p {
    color: #dbeafe !important;
}

html[data-theme="dark"] .desf-resp-info.is-muted {
    background: #1e293b !important;
    border-color: #475569 !important;
}

/* ---------------------------------------------------------
   5. OPERAÇÕES EM MASSA
   --------------------------------------------------------- */
html[data-theme="dark"] .bulk-warning,
html[data-theme="dark"] .bulk-critical {
    background: #422006 !important;
    border-color: #a16207 !important;
    color: #fef3c7 !important;
}

html[data-theme="dark"] .bulk-warning > i,
html[data-theme="dark"] .bulk-critical > i {
    color: #fbbf24 !important;
}

html[data-theme="dark"] .bulk-warning strong,
html[data-theme="dark"] .bulk-critical strong {
    color: #fef3c7 !important;
}

html[data-theme="dark"] .bulk-warning p,
html[data-theme="dark"] .bulk-critical p {
    color: #fde68a !important;
}

html[data-theme="dark"] .bulk-warning--info {
    background: #172554 !important;
    border-color: #3156a3 !important;
}

html[data-theme="dark"] .bulk-warning--info > i {
    color: #93c5fd !important;
}

html[data-theme="dark"] .bulk-warning--info strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .bulk-warning--info p {
    color: #dbeafe !important;
}

html[data-theme="dark"] .bulk-warning--danger {
    background: #450a0a !important;
    border-color: #991b1b !important;
}

html[data-theme="dark"] .bulk-warning--danger > i {
    color: #f87171 !important;
}

html[data-theme="dark"] .bulk-warning--danger strong,
html[data-theme="dark"] .bulk-warning--danger p {
    color: #fee2e2 !important;
}

html[data-theme="dark"] .bulk-table thead th {
    background: #29446f !important;
    border-color: #42608e !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .bulk-table tbody td {
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .bulk-table tbody td small {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .bulk-selection-toolbar {
    background: #172033 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .bulk-action-grid label > span {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .bulk-action-grid label:hover > span {
    background: #243451 !important;
    border-color: #60a5fa !important;
}

html[data-theme="dark"] .bulk-action-grid strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .bulk-action-grid small {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .bulk-action-grid i {
    background: #243b67 !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .bulk-fields,
html[data-theme="dark"] .bulk-common,
html[data-theme="dark"] .bulk-review {
    background: #172033 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

/* ---------------------------------------------------------
   Reforço geral para banners informativos claros no Tema Escuro
   dentro destas áreas administrativas.
   --------------------------------------------------------- */
html[data-theme="dark"] .close-year-guidance a,
html[data-theme="dark"] .user-access-hub__notice a,
html[data-theme="dark"] .docs-library-info a,
html[data-theme="dark"] .desf-resp-info a,
html[data-theme="dark"] .bulk-warning a {
    color: #bfdbfe !important;
}


/* =========================================================
   SGPM 1.2.30 — TEMA ESCURO: LEGIBILIDADE — LOTE 05
   Páginas:
   - Regularização de Contexto Legado
   - Recursos e Personalizações
   ========================================================= */

/* ---------------------------------------------------------
   1. REGULARIZAÇÃO DE CONTEXTO LEGADO
   --------------------------------------------------------- */
html[data-theme="dark"] .contexto-legado-destino {
    background: #1e293b !important;
    border-color: #475569 !important;
    border-left-color: #3b82f6 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .contexto-legado-destino > i {
    background: #243b67 !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .contexto-legado-destino strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .contexto-legado-destino p {
    color: #cbd5e1 !important;
}

/* Cards-resumo */
html[data-theme="dark"] .contexto-legado-resumo-card {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card__icon {
    background: #243b67 !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card > div > span {
    color: #f8fafc !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card > div > strong {
    color: #60a5fa !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card > div > small {
    color: #cbd5e1 !important;
}

/* HOVER: nunca usar fundo claro */
html[data-theme="dark"] .contexto-legado-resumo-card:hover {
    background: #243451 !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.22) !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card:hover .contexto-legado-resumo-card__icon {
    background: #31518a !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card:hover > div > span,
html[data-theme="dark"] .contexto-legado-resumo-card:hover > div > strong {
    color: #ffffff !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card:hover > div > small {
    color: #dbeafe !important;
}

/* Ativo */
html[data-theme="dark"] .contexto-legado-resumo-card.is-active {
    background: #1e3a8a !important;
    border-color: #60a5fa !important;
    box-shadow: inset 0 0 0 1px rgba(96,165,250,.28) !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card.is-active .contexto-legado-resumo-card__icon {
    background: #2563eb !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card.is-active > div > span,
html[data-theme="dark"] .contexto-legado-resumo-card.is-active > div > strong {
    color: #ffffff !important;
}

html[data-theme="dark"] .contexto-legado-resumo-card.is-active > div > small {
    color: #dbeafe !important;
}

/* Abas */
html[data-theme="dark"] .contexto-legado-tabs {
    background: #172033 !important;
    border-color: #475569 !important;
}

html[data-theme="dark"] .contexto-legado-tab {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .contexto-legado-tab span {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .contexto-legado-tab:hover {
    background: #243451 !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .contexto-legado-tab:hover span {
    background: #31518a !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .contexto-legado-tab.is-active {
    background: #2563eb !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .contexto-legado-tab.is-active span {
    background: rgba(255,255,255,.18) !important;
    color: #ffffff !important;
}

/* Tabela e confirmação */
html[data-theme="dark"] .contexto-legado-table-wrap {
    border-color: #475569 !important;
}

html[data-theme="dark"] .contexto-legado-table thead th {
    background: #29446f !important;
    color: #f8fafc !important;
    border-color: #42608e !important;
}

html[data-theme="dark"] .contexto-legado-table tbody td {
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .contexto-legado-table tbody td small {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .contexto-legado-confirmacao {
    background: #172033 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .contexto-legado-confirmacao:hover {
    background: #1e293b !important;
    border-color: #60a5fa !important;
}

html[data-theme="dark"] .contexto-legado-confirmacao strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .contexto-legado-confirmacao small {
    color: #cbd5e1 !important;
}

/* ---------------------------------------------------------
   2. RECURSOS E PERSONALIZAÇÕES
   --------------------------------------------------------- */
html[data-theme="dark"] .personalization-resource-accordion {
    background: #1e293b !important;
    border-color: #475569 !important;
}

html[data-theme="dark"] .personalization-resource-accordion > summary {
    background: #172033 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .personalization-resource-accordion > summary:hover {
    background: #243451 !important;
}

html[data-theme="dark"] .personalization-resource-accordion > summary .municipio-accordion-heading strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .personalization-resource-accordion > summary .municipio-accordion-heading small {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .personalization-resource-status {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .personalization-resource-accordion[open] .personalization-resource-status {
    background: #243b67 !important;
    border-color: #60a5fa !important;
    color: #bfdbfe !important;
}

/* Preview administrativo */
html[data-theme="dark"] .personalization-preview {
    color: #f8fafc !important;
}

html[data-theme="dark"] .personalization-preview__eyebrow {
    color: #93c5fd !important;
}

html[data-theme="dark"] .personalization-preview__box {
    background: #172554 !important;
    border-color: #3156a3 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .personalization-preview__box strong {
    color: #ffffff !important;
}

html[data-theme="dark"] .personalization-preview__box p {
    color: #dbeafe !important;
}

html[data-theme="dark"] .personalization-preview__badge {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Formulário e mídia */
html[data-theme="dark"] .personalization-form--accordion,
html[data-theme="dark"] .personalization-resource-accordion__content {
    background: #1e293b !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .personalization-current-media,
html[data-theme="dark"] .personalization-live-preview {
    background: #172033 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .personalization-current-media__empty,
html[data-theme="dark"] .personalization-live-preview__empty {
    color: #cbd5e1 !important;
}


/* =========================================================
   SGPM 1.2.31 — USUÁRIOS E ACESSOS: AUMENTO DE LEGIBILIDADE
   ========================================================= */

/* Cabeçalho da página */
.user-access-hub__header .page-description {
    font-size: 1rem;
    line-height: 1.6;
}

.user-access-hub__eyebrow {
    font-size: .72rem;
    letter-spacing: .06em;
}

/* Aviso de isolamento */
.user-access-hub__notice {
    padding: 13px 15px;
    gap: 11px;
}

.user-access-hub__notice > i {
    font-size: 1rem;
}

.user-access-hub__notice strong {
    font-size: .84rem;
}

.user-access-hub__notice span {
    margin-top: 4px;
    font-size: .75rem;
    line-height: 1.55;
}

/* Cards de resumo */
.user-access-hub__summary {
    gap: 10px;
    margin-bottom: 14px;
}

.user-access-hub__summary > div {
    grid-template-columns: 44px minmax(0,1fr);
    column-gap: 10px;
    padding: 12px;
}

.user-access-hub__summary i {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.user-access-hub__summary span {
    font-size: .70rem;
}

.user-access-hub__summary strong {
    font-size: 1rem;
}

.user-access-hub__summary small {
    font-size: .66rem;
}

/* Fluxo Usuários -> Perfis -> Entidades */
.user-access-hub__flow {
    gap: 10px;
    margin-bottom: 14px;
}

.user-access-hub__step {
    grid-template-columns: 30px 40px minmax(0,1fr) 16px;
    gap: 9px;
    padding: 12px;
}

.user-access-hub__step > span {
    width: 30px;
    height: 30px;
    font-size: .68rem;
}

.user-access-hub__step > i:nth-of-type(1) {
    width: 40px;
    height: 40px;
    font-size: .95rem;
}

.user-access-hub__step > i:last-child {
    font-size: .72rem;
}

.user-access-hub__step strong {
    font-size: .82rem;
}

.user-access-hub__step small {
    margin-top: 3px;
    font-size: .69rem;
    line-height: 1.45;
}

/* Bloco de usuários recentes */
.user-access-hub__card {
    padding: 16px;
}

.user-access-hub__section-head span {
    font-size: .68rem;
    letter-spacing: .055em;
}

.user-access-hub__section-head h2 {
    font-size: 1rem;
}

.user-access-hub__section-head p {
    margin-top: 4px;
    font-size: .72rem;
}

.user-access-hub__user {
    grid-template-columns: 50px minmax(0,1fr) auto;
    gap: 11px;
    padding: 11px 12px;
}

.user-access-hub__avatar {
    width: 50px;
    height: 50px;
}

.user-access-hub__user-main strong {
    font-size: .86rem;
}

.user-access-hub__user-main span {
    margin-top: 2px;
    font-size: .72rem;
}

.user-access-hub__user-main small {
    margin-top: 3px;
    font-size: .69rem;
    line-height: 1.45;
}

/* Botões/links do usuário */
.user-access-hub__user-actions .btn,
.user-access-hub__section-head .btn {
    font-size: .78rem;
}

/* Cards inferiores */
.user-access-hub__security-grid {
    gap: 10px;
}

.user-access-hub__security-grid > .card {
    grid-template-columns: 44px minmax(0,1fr);
    gap: 10px;
    padding: 13px;
}

.user-access-hub__security-grid > .card > i {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.user-access-hub__security-grid strong {
    font-size: .82rem;
}

.user-access-hub__security-grid p {
    margin-top: 4px;
    font-size: .70rem;
    line-height: 1.5;
}

/* Também melhora a página "Acessos efetivos", que usa a mesma família */
.effective-access__identity strong {
    font-size: .88rem;
}

.effective-access__identity span {
    font-size: .72rem;
}

.effective-access__fallback h2 {
    font-size: .88rem;
}

.effective-access__fallback p {
    font-size: .72rem;
}

.effective-access__chips > span {
    font-size: .68rem;
}

.effective-access__scope summary strong {
    font-size: .82rem;
}

.effective-access__scope summary small {
    font-size: .68rem;
}

.effective-access__scope-meta span {
    font-size: .66rem;
}

.effective-access__scope-meta strong {
    font-size: .76rem;
}

.effective-access__module h3 {
    font-size: .72rem;
}

.effective-access__permissions > span {
    font-size: .67rem;
    padding: 5px 7px;
}

.effective-access__global summary {
    font-size: .78rem;
}

/* Responsividade */
@media (max-width: 900px) {
    .user-access-hub__header .page-description {
        font-size: .94rem;
    }

    .user-access-hub__step strong {
        font-size: .80rem;
    }
}

@media (max-width: 560px) {
    .user-access-hub__notice strong {
        font-size: .80rem;
    }

    .user-access-hub__notice span {
        font-size: .72rem;
    }

    .user-access-hub__user {
        grid-template-columns: 46px minmax(0,1fr);
    }

    .user-access-hub__avatar {
        width: 46px;
        height: 46px;
    }
}


/* =========================================================
   SGPM 1.2.32 — TIMER DE SESSÃO NO RODAPÉ
   ========================================================= */
.app-footer__session-timer {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    width: fit-content;
    margin-top: 5px;
    padding: 4px 7px;
    border: 1px solid #d9e3f0;
    border-radius: 8px;
    background: #f7faff;
    color: #475569;
    font-size: .67rem;
    line-height: 1.2;
}

.app-footer__session-timer > i {
    color: #2563eb;
    font-size: .72rem;
}

.app-footer__session-timer > span {
    color: inherit;
}

.app-footer__session-timer > strong {
    color: #0f172a;
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

.app-footer__session-timer.is-warning {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

.app-footer__session-timer.is-warning > i,
.app-footer__session-timer.is-warning > strong {
    color: #b45309;
}

.app-footer__session-timer.is-critical {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.app-footer__session-timer.is-critical > i,
.app-footer__session-timer.is-critical > strong {
    color: #b91c1c;
}

.app-footer__session-timer.is-expired {
    border-color: #ef4444;
    background: #fee2e2;
    color: #7f1d1d;
}

html[data-theme="dark"] .app-footer__session-timer {
    border-color: #475569;
    background: #172033;
    color: #cbd5e1;
}

html[data-theme="dark"] .app-footer__session-timer > i {
    color: #93c5fd;
}

html[data-theme="dark"] .app-footer__session-timer > strong {
    color: #f8fafc;
}

html[data-theme="dark"] .app-footer__session-timer.is-warning {
    border-color: #a16207;
    background: #422006;
    color: #fde68a;
}

html[data-theme="dark"] .app-footer__session-timer.is-warning > i,
html[data-theme="dark"] .app-footer__session-timer.is-warning > strong {
    color: #fbbf24;
}

html[data-theme="dark"] .app-footer__session-timer.is-critical,
html[data-theme="dark"] .app-footer__session-timer.is-expired {
    border-color: #991b1b;
    background: #450a0a;
    color: #fecaca;
}

html[data-theme="dark"] .app-footer__session-timer.is-critical > i,
html[data-theme="dark"] .app-footer__session-timer.is-critical > strong,
html[data-theme="dark"] .app-footer__session-timer.is-expired > i,
html[data-theme="dark"] .app-footer__session-timer.is-expired > strong {
    color: #fca5a5;
}

/* =========================================================
   SGPM 1.2.33 — AUDITORIA E CONSOLIDAÇÃO RESPONSIVA GLOBAL
   Escopo: desktop compacto, tablet, celular e uso em campo.
   ========================================================= */

/* ---------- Base resiliente ---------- */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 0;
}

img,
video,
canvas,
iframe {
    max-width: 100%;
}

img,
video,
canvas {
    height: auto;
}

iframe {
    width: 100%;
}

.app-header > *,
.app-body > *,
.app-main > *,
.app-content > *,
.page-header > *,
.page-header__actions > *,
.form-grid > *,
.dashboard-grid > *,
.card > * {
    min-width: 0;
}

button,
a,
input,
select,
textarea,
summary,
[role="button"] {
    touch-action: manipulation;
}

.table-responsive {
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

/* ---------- Áreas de toque ---------- */
@media (max-width: 1024px) {
    .btn,
    .header-button,
    .header-user,
    .menu-toggle,
    .sidebar-close,
    .fixed-utility-button,
    .header-global-search-button,
    .accessibility-panel__close {
        min-height: 44px;
    }

    .btn {
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .sidebar-link,
    .sidebar-submenu__summary,
    .sidebar-submenu__link {
        min-height: 44px;
    }
}

/* =========================================================
   TABLET — 1024px: conteúdo em largura total e sidebar off-canvas
   ========================================================= */
@media (max-width: 1024px) {
    .app-header {
        gap: 9px;
        padding-inline: 14px;
    }

    .menu-toggle {
        display: inline-flex;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
    }

    .app-header__brand {
        flex: 1 1 auto;
        max-width: 300px;
    }

    .app-header__brand-text {
        min-width: 0;
    }

    .app-header__context,
    .app-subtitle {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-user__meta {
        display: none;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: var(--z-sidebar);
        width: min(330px, 90vw);
        height: 100dvh;
        padding: 16px 12px max(18px, env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--color-surface);
        box-shadow: 10px 0 35px rgba(15, 23, 42, .22);
        transform: translateX(-104%);
        transition: transform var(--transition-normal);
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-sidebar.is-collapsed {
        width: min(330px, 90vw);
    }

    .app-sidebar.is-collapsed .sidebar-section__title,
    .app-sidebar.is-collapsed .sidebar-link > span:not(.sidebar-link__icon),
    .app-sidebar.is-collapsed .sidebar-submenu__label,
    .app-sidebar.is-collapsed .sidebar-submenu__chevron,
    .app-sidebar.is-collapsed .sidebar-submenu__items {
        display: initial;
    }

    .app-sidebar.is-collapsed .sidebar-link,
    .app-sidebar.is-collapsed .sidebar-submenu__summary {
        justify-content: flex-start;
        padding-inline: 10px;
    }

    .app-sidebar.is-collapsed .sidebar-link__icon {
        width: 18px;
        margin: 0;
    }

    .sidebar-collapse-toggle {
        display: none !important;
    }

    .sidebar-header {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 3;
        margin: -4px -2px 12px;
        padding: 4px 2px 10px;
        background: var(--color-surface);
    }

    .sidebar-close {
        width: 44px;
        height: 44px;
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: var(--z-overlay);
        background: rgba(2, 6, 23, .58);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-normal);
    }

    .sidebar-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    body.menu-open {
        overflow: hidden;
    }

    .sidebar-section__title {
        font-size: .68rem;
    }

    .sidebar-link,
    .sidebar-submenu__summary,
    .sidebar-submenu__link {
        font-size: .9rem;
    }

    .app-main {
        width: 100%;
        padding: 24px 20px 36px;
        overflow-x: hidden;
    }

    .app-content,
    .app-footer {
        width: 100%;
        max-width: none;
    }

    .page-header,
    .dashboard-page-header,
    .support-page-header,
    .support-admin-page-header,
    .support-ticket-detail-header {
        gap: 14px;
        flex-wrap: wrap;
    }

    .page-header__actions,
    .dashboard-header-actions {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .breadcrumbs {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        white-space: nowrap;
        scrollbar-width: thin;
    }

    .fixed-utility-rail {
        right: max(8px, env(safe-area-inset-right));
    }

    /* Grids extensos passam a 2 colunas em tablet */
    .dashboard-grid,
    .dashboard-summary-grid,
    .close-year-summary-grid,
    .user-access-hub__summary,
    .user-access-hub__security-grid,
    .bulk-summary-grid,
    .document-overview__metrics,
    .patrimonial-data-grid,
    .movement-detail__summary,
    .inventory-detail__indicators,
    .report-filter-grid,
    .accounting-report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* abas e barras horizontais roláveis */
    .sgpm-scroll-tabs,
    [role="tablist"],
    .contexto-legado-tabs {
        display: flex;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .sgpm-scroll-tabs > *,
    [role="tablist"] > *,
    .contexto-legado-tabs > * {
        flex: 0 0 auto;
    }
}

/* =========================================================
   TABLET RETRATO / MOBILE GRANDE — 820px
   Tabelas simples viram cards automaticamente via app.js.
   ========================================================= */
@media (max-width: 820px) {
    .table-responsive.has-mobile-card-table {
        overflow-x: visible;
    }

    table.sgpm-responsive-table {
        min-width: 0 !important;
        width: 100% !important;
        table-layout: auto !important;
        border-collapse: separate;
        border-spacing: 0;
    }

    table.sgpm-responsive-table thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    table.sgpm-responsive-table,
    table.sgpm-responsive-table tbody,
    table.sgpm-responsive-table tbody tr,
    table.sgpm-responsive-table tbody td {
        display: block;
        width: 100%;
    }

    table.sgpm-responsive-table tbody {
        display: grid;
        gap: 12px;
        background: transparent;
    }

    table.sgpm-responsive-table tbody tr {
        overflow: hidden;
        padding: 6px 12px;
        border: 1px solid var(--color-border);
        border-radius: 12px;
        background: var(--color-surface);
        box-shadow: 0 3px 12px rgba(15, 23, 42, .05);
    }

    table.sgpm-responsive-table tbody tr:nth-child(even),
    table.sgpm-responsive-table tbody tr:hover {
        background: var(--color-surface);
    }

    table.sgpm-responsive-table tbody td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        min-height: 42px;
        padding: 10px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid var(--color-border) !important;
        text-align: left !important;
        overflow-wrap: anywhere;
        white-space: normal !important;
    }

    table.sgpm-responsive-table tbody td:last-child {
        border-bottom: 0 !important;
    }

    table.sgpm-responsive-table tbody td::before {
        content: attr(data-label);
        color: var(--color-text-muted);
        font-size: .69rem;
        font-weight: 850;
        line-height: 1.35;
        letter-spacing: .035em;
        text-transform: uppercase;
    }

    table.sgpm-responsive-table tbody td[data-label=""],
    table.sgpm-responsive-table tbody td:not([data-label]) {
        grid-template-columns: 1fr;
    }

    table.sgpm-responsive-table tbody td[data-label*="Aç"],
    table.sgpm-responsive-table tbody td[data-label*="Opç"] {
        grid-template-columns: 1fr;
    }

    table.sgpm-responsive-table tbody td[data-label*="Aç"]::before,
    table.sgpm-responsive-table tbody td[data-label*="Opç"]::before {
        margin-bottom: 2px;
    }

    table.sgpm-responsive-table tbody td[data-label*="Aç"] .table-actions,
    table.sgpm-responsive-table tbody td[data-label*="Aç"] .sgpm-row-actions,
    table.sgpm-responsive-table tbody td[data-label*="Aç"] .movement-row-actions,
    table.sgpm-responsive-table tbody td[data-label*="Opç"] .table-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        width: 100%;
    }

    table.sgpm-responsive-table tbody td[data-label*="Aç"] .btn,
    table.sgpm-responsive-table tbody td[data-label*="Aç"] form,
    table.sgpm-responsive-table tbody td[data-label*="Aç"] form .btn,
    table.sgpm-responsive-table tbody td[data-label*="Opç"] .btn {
        width: 100%;
        justify-content: center;
    }

    table.sgpm-responsive-table tfoot {
        display: block;
        width: 100%;
        margin-top: 10px;
    }

    table.sgpm-responsive-table tfoot tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1px;
        width: 100%;
        overflow: hidden;
        border: 1px solid var(--color-border);
        border-radius: 10px;
        background: var(--color-border);
    }

    table.sgpm-responsive-table tfoot td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 9px 10px !important;
        border: 0 !important;
        background: var(--color-table-head-bg);
        color: var(--color-table-head-text);
        text-align: left !important;
        overflow-wrap: anywhere;
        white-space: normal !important;
    }

    /* tabelas que não puderam ser convertidas continuam roláveis com boa pista visual */
    .table-responsive:not(.has-mobile-card-table) {
        margin-inline: -2px;
        padding-bottom: 4px;
    }
}

/* =========================================================
   MOBILE — 768px
   ========================================================= */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .app-header {
        min-height: 64px;
        gap: 6px;
        padding: 6px max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left));
    }

    .app-logo--municipio {
        width: 48px;
        min-height: 44px;
        padding: 2px;
    }

    .app-header__brand {
        gap: 7px;
        max-width: none;
    }

    .app-header__brand-text {
        max-width: 150px;
    }

    .app-header__context {
        display: none !important;
    }

    .app-header__center {
        flex: 0 0 auto;
    }

    .header-user__content {
        display: none;
    }

    .header-user,
    .header-context,
    .header-logout,
    .header-global-search-button {
        width: 42px;
        min-width: 42px;
        height: 42px;
        padding: 0;
    }

    .header-context .header-button__label,
    .header-logout .header-button__label {
        display: none;
    }

    .header-user__avatar {
        width: 30px;
        height: 30px;
    }

    .app-main {
        padding: 18px 12px 96px;
    }

    .breadcrumbs {
        margin-bottom: 14px;
        padding-bottom: 4px;
        font-size: .72rem;
    }

    .page-header,
    .dashboard-page-header {
        margin-bottom: 18px;
    }

    .page-header h1,
    .dashboard-page-header h1,
    h1 {
        font-size: clamp(1.4rem, 6vw, 1.75rem);
        line-height: 1.15;
    }

    .page-description {
        font-size: .92rem;
        line-height: 1.55;
    }

    .card,
    .dashboard-card,
    .dashboard-panel,
    .bulk-card {
        padding: 14px;
        border-radius: 11px;
    }

    .alert,
    .close-year-guidance,
    .user-access-hub__notice,
    .docs-library-info,
    .desf-resp-info,
    .valuation-note,
    .chart-note,
    .bulk-warning,
    .bulk-critical {
        padding: 12px;
    }

    .form-control,
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        min-height: 44px;
        font-size: 16px;
    }

    textarea {
        min-height: 110px;
    }

    .form-label {
        font-size: .86rem;
    }

    .form-help,
    .help-text {
        font-size: .74rem;
        line-height: 1.45;
    }

    .form-actions,
    .filter-actions,
    .report-filter-actions,
    .movement-filter-actions,
    .inventory-filter-actions,
    .audit-filter-actions,
    .public-lookup-form__actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal__dialog {
        width: 100%;
        max-height: min(88dvh, 760px);
        border-radius: 18px 18px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .modal__header,
    .modal__body,
    .modal__actions {
        padding-inline: 16px;
    }

    .global-search {
        padding: 64px 8px 8px;
    }

    .global-search__dialog {
        width: 100%;
        max-height: calc(100dvh - 72px);
    }

    .accessibility-panel--fixed,
    .accessibility-panel {
        top: 70px !important;
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
        max-height: calc(100dvh - 82px);
        overflow-y: auto;
    }

    .fixed-utility-rail {
        top: auto !important;
        right: max(8px, env(safe-area-inset-right)) !important;
        bottom: calc(72px + env(safe-area-inset-bottom));
        gap: 7px;
    }

    .fixed-utility-button {
        width: 44px;
        height: 44px;
    }

    .back-to-top {
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(16px + env(safe-area-inset-bottom));
        width: 44px;
        height: 44px;
    }

    .app-footer {
        margin-top: 22px;
    }

    .app-footer__heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .app-footer__version {
        align-self: flex-start;
    }

    .app-footer__audit-grid {
        grid-template-columns: 1fr;
    }

    .app-footer__audit-item small,
    .app-footer__audit-item strong,
    .app-footer__audit-item span {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .app-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-footer__session-timer {
        max-width: 100%;
    }

    /* grids principais em uma coluna */
    .dashboard-grid,
    .dashboard-summary-grid,
    .dashboard-content-grid,
    .close-year-summary-grid,
    .user-access-hub__summary,
    .user-access-hub__flow,
    .user-access-hub__security-grid,
    .bulk-summary-grid,
    .bulk-action-grid,
    .report-hub-grid,
    .public-lookup-explanation,
    .document-overview__metrics,
    .patrimonial-data-grid,
    .movement-detail__summary,
    .inventory-detail__indicators,
    .qr-public-grid,
    .support-summary-grid {
        grid-template-columns: 1fr !important;
    }

    .patrimonial-data-grid__wide,
    .form-grid__span-2,
    .form-grid__span-full,
    .bulk-span2 {
        grid-column: auto !important;
    }
}

/* =========================================================
   CELULAR — 560px
   ========================================================= */
@media (max-width: 560px) {
    .app-header__brand-text {
        display: none;
    }

    .app-header__brand {
        flex: 1 1 44px;
    }

    .app-logo--municipio {
        width: 42px;
        min-height: 40px;
    }

    .menu-toggle,
    .header-user,
    .header-context,
    .header-logout,
    .header-global-search-button {
        width: 40px;
        min-width: 40px;
        height: 40px;
    }

    .app-header__actions {
        gap: 4px;
    }

    .app-main {
        padding: 14px 10px 92px;
    }

    .page-header__actions,
    .dashboard-header-actions,
    .table-actions,
    .movement-row-actions,
    .sgpm-row-actions {
        width: 100%;
    }

    .page-header__actions > .btn,
    .page-header__actions > form,
    .page-header__actions > form .btn,
    .dashboard-header-actions > .btn,
    .dashboard-header-actions > a.btn {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }

    .form-actions,
    .filter-actions,
    .report-filter-actions,
    .movement-filter-actions,
    .inventory-filter-actions,
    .audit-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn,
    .filter-actions .btn,
    .report-filter-actions .btn,
    .movement-filter-actions .btn,
    .inventory-filter-actions .btn,
    .audit-filter-actions .btn {
        width: 100%;
        justify-content: center;
    }

    table.sgpm-responsive-table tbody td {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    table.sgpm-responsive-table tbody td::before {
        margin-bottom: 2px;
    }

    table.sgpm-responsive-table tbody td[data-label*="Aç"] .table-actions,
    table.sgpm-responsive-table tbody td[data-label*="Aç"] .sgpm-row-actions,
    table.sgpm-responsive-table tbody td[data-label*="Aç"] .movement-row-actions {
        grid-template-columns: 1fr;
    }

    table.sgpm-responsive-table tfoot tr {
        grid-template-columns: 1fr;
    }

    .modal__body {
        flex-direction: column;
    }

    .accessibility-font-controls {
        grid-template-columns: 1fr;
    }

    .accessibility-control {
        min-height: 52px;
        flex-direction: row;
    }

    .auth-main {
        padding: 10px 8px;
    }

    .auth-panel {
        padding: 18px 14px;
    }

    .auth-panel--brand {
        gap: 12px;
    }

    .auth-brand__highlights {
        display: none;
    }

    .auth-commercial {
        margin-top: 0;
    }

    .auth-brand__official-logo {
        max-width: min(320px, 90vw);
    }

    .auth-form__header {
        gap: 10px;
    }

    .auth-form__illustration {
        display: none;
    }

    .public-lookup-form,
    .qr-public-card {
        padding: 14px;
    }

    .qr-public-header {
        gap: 10px;
    }

    .qr-public-mark__brand {
        max-width: min(240px, 72vw);
    }
}

/* =========================================================
   CELULAR COMPACTO — 380px
   ========================================================= */
@media (max-width: 380px) {
    .app-header {
        gap: 3px;
        padding-inline: 5px;
    }

    .app-logo--municipio {
        width: 36px;
        min-height: 36px;
    }

    .menu-toggle,
    .header-user,
    .header-context,
    .header-logout,
    .header-global-search-button {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

    .header-user__avatar {
        width: 27px;
        height: 27px;
    }

    .app-main {
        padding-inline: 8px;
    }

    .card,
    .dashboard-card,
    .dashboard-panel {
        padding: 12px;
    }
}

/* =========================================================
   LANDSCAPE DE CELULAR / TABLET BAIXO
   ========================================================= */
@media (max-width: 1024px) and (max-height: 560px) and (orientation: landscape) {
    .app-header {
        min-height: 54px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .app-logo--municipio {
        width: 40px;
        min-height: 38px;
    }

    .app-sidebar {
        width: min(360px, 72vw);
    }

    .fixed-utility-rail {
        top: 70px !important;
        bottom: auto !important;
    }

    .modal__dialog,
    .global-search__dialog,
    .accessibility-panel--fixed {
        max-height: calc(100dvh - 16px) !important;
    }
}

/* =========================================================
   AUTH / LOGIN RESPONSIVO
   ========================================================= */
@media (max-width: 1080px) {
    .auth-main {
        align-items: flex-start;
        min-height: 100dvh;
        padding-block: 18px;
    }

    .auth-shell {
        max-width: 760px;
    }

    .auth-card--login {
        min-height: 0;
        border-radius: 22px;
    }

    .auth-panel--brand {
        order: 2;
    }

    .auth-panel--form {
        order: 1;
    }
}

@media (max-width: 640px) {
    .auth-card--login {
        border-radius: 16px;
    }

    .auth-panel--brand {
        padding: 18px 14px;
    }

    .auth-brand-topbar {
        min-height: 0;
    }

    .auth-brand__official-logo {
        margin-inline: auto;
    }

    .auth-commercial__contacts {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-form__grid {
        grid-template-columns: 1fr !important;
    }

    .auth-municipio-results {
        max-height: min(42dvh, 260px);
        overflow-y: auto;
    }
}

/* =========================================================
   CONSULTA PÚBLICA RESPONSIVA
   ========================================================= */
@media (max-width: 760px) {
    .qr-public-main {
        padding: 14px 8px 28px;
    }

    .qr-public-shell,
    .qr-public-shell--search {
        width: 100%;
    }

    .qr-public-header {
        align-items: stretch;
    }

    .qr-public-header__actions {
        width: 100%;
    }

    .qr-public-login-link {
        justify-content: center;
    }

    .public-lookup-form__grid {
        grid-template-columns: 1fr;
    }

    .public-municipio-combobox__options {
        max-height: min(42dvh, 280px);
        overflow-y: auto;
    }

    .public-photo-gallery {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   Tema escuro — cards de tabela móvel
   ========================================================= */
html[data-theme="dark"] table.sgpm-responsive-table tbody tr {
    background: var(--color-surface);
    box-shadow: none;
}

/* =========================================================
   SGPM 1.2.34 — LOGIN MOBILE
   Ajustes exclusivos para celular, sem alterar Desktop/Tablet.
   ========================================================= */

/* A marca adicional existe no HTML, mas fica invisível fora do celular. */
.auth-mobile-sgpm-logo {
    display: none;
}

@media (max-width: 640px) {
    /* Marca colorida acima de "Entrar no sistema" */
    .auth-mobile-sgpm-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0 auto 14px;
        padding: 2px 0 4px;
    }

    .auth-mobile-sgpm-logo img {
        display: block;
        width: min(300px, 78vw);
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    /* Mantém o cabeçalho do formulário bem distribuído após a inclusão da marca. */
    .auth-panel--form .auth-form__header--municipio {
        margin-top: 0;
    }

    /* Centralização do bloco de licenciamento/suporte no rodapé azul do login. */
    .auth-panel--brand .auth-commercial {
        width: 100%;
        margin-inline: auto;
        text-align: center;
        align-items: center;
        justify-content: center;
    }

    .auth-panel--brand .auth-commercial__eyebrow,
    .auth-panel--brand .auth-commercial > strong {
        display: block;
        width: 100%;
        text-align: center;
    }

    .auth-panel--brand .auth-commercial__contacts {
        width: 100%;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .auth-panel--brand .auth-commercial__contacts span {
        justify-content: center;
        text-align: center;
    }

    .auth-panel--brand .auth-system-version {
        margin-inline: auto;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .auth-mobile-sgpm-logo img {
        width: min(270px, 82vw);
    }
}


/* =========================================================
   SGPM 1.2.35 — LOGIN MOBILE: ORDEM NATURAL DO FORMULÁRIO
   Apenas celular (<= 640px). Desktop e Tablet permanecem iguais.
   Ordem:
   Município → Usuário → links → Senha → Exercício →
   Entrar → Consulta pública → Acesso institucional
   ========================================================= */

/* Cópia móvel fica invisível fora do celular. */
.auth-identity-card--mobile {
    display: none;
}

@media (max-width: 640px) {
    /* Remove o card lateral do fluxo móvel sem afetar Desktop/Tablet. */
    .auth-form__field--icon-card {
        display: none !important;
    }

    /* A grade passa a ser uma sequência contínua, sem lacunas. */
    .auth-form__grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .auth-form__field--full,
    .auth-form__field--wide,
    .auth-form__field--narrow {
        grid-column: 1 / -1 !important;
        width: 100%;
        min-width: 0;
    }

    /* Aproxima visualmente Usuário, Senha e Exercício. */
    .auth-form__field--wide,
    .auth-form__field--narrow {
        margin: 0;
    }

    .auth-field-links {
        margin-top: 10px;
        margin-bottom: 0;
    }

    /* Ações imediatamente após Exercício. */
    .auth-form__actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 18px;
    }

    .auth-form__actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Card institucional passa para depois das ações. */
    .auth-identity-card--mobile {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        grid-template-areas:
            "icon title"
            "icon text";
        align-items: center;
        column-gap: 14px;
        row-gap: 3px;
        width: 100%;
        margin-top: 18px;
        padding: 18px;
        border: 1px solid var(--color-border, #dbe3ef);
        border-radius: 18px;
        background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
        text-align: left;
    }

    .auth-identity-card--mobile .auth-identity-card__avatar {
        grid-area: icon;
        width: 64px;
        height: 64px;
        margin: 0;
    }

    .auth-identity-card--mobile strong {
        grid-area: title;
        margin: 0;
        font-size: 1rem;
        line-height: 1.25;
    }

    .auth-identity-card--mobile small {
        grid-area: text;
        margin: 0;
        font-size: .88rem;
        line-height: 1.45;
    }
}

@media (max-width: 380px) {
    .auth-form__grid {
        gap: 14px;
    }

    .auth-identity-card--mobile {
        grid-template-columns: 56px minmax(0, 1fr);
        column-gap: 12px;
        padding: 15px;
    }

    .auth-identity-card--mobile .auth-identity-card__avatar {
        width: 56px;
        height: 56px;
    }
}


/* =========================================================
   SGPM 1.2.36 — LOGIN MOBILE: CABEÇALHO CENTRALIZADO
   Exclusivo para celular (<= 640px).
   Desktop e Tablet permanecem inalterados.
   ========================================================= */

@media (max-width: 640px) {
    /* Bloco marcado no print:
       "ENTRAR NO SISTEMA" + título + descrição */
    .auth-form__intro,
    .auth-form__header,
    .auth-login__intro {
        text-align: center !important;
    }

    .auth-form__intro .eyebrow,
    .auth-form__header .eyebrow,
    .auth-login__intro .eyebrow {
        display: block;
        width: 100%;
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }

    .auth-form__intro h1,
    .auth-form__header h1,
    .auth-login__intro h1 {
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }

    .auth-form__intro p,
    .auth-form__header p,
    .auth-login__intro p {
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
        max-width: 34rem;
    }
}

@media (max-width: 380px) {
    .auth-form__intro h1,
    .auth-form__header h1,
    .auth-login__intro h1 {
        line-height: 1.15;
    }
}


/* =========================================================
   SGPM 1.2.37 — NOVO TOMBAMENTO MOBILE
   Corrige espaçamento excessivo entre:
   - Duplicar bem
   - Importar de outra Entidade/Fundo
   Alteração exclusiva para celular.
   ========================================================= */

@media (max-width: 560px) {
    .asset-tombamento-header {
        gap: 14px;
        align-items: stretch;
    }

    .asset-tombamento-header__actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 2px;
    }

    /* A regra de tablet usava flex-basis: 220px.
       Em coluna, isso virava 220px de altura por botão.
       No celular, anulamos explicitamente esse comportamento. */
    .asset-tombamento-header__actions .btn {
        flex: 0 0 auto !important;
        width: 100%;
        min-height: 44px;
        height: auto;
        margin: 0;
        padding: 10px 12px;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .asset-tombamento-header__actions {
        gap: 7px;
    }

    .asset-tombamento-header__actions .btn {
        min-height: 42px;
        padding: 9px 10px;
    }
}


/* =========================================================
   SGPM 1.2.38 — PADRÃO DE ETIQUETAS / MOBILE
   Organização das opções "Origem do layout"
   Alteração exclusiva para celular (<= 640px).
   ========================================================= */

@media (max-width: 640px) {
    /* Uma opção por linha. */
    .label-mode-cards {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100%;
    }

    /* Cada rádio vira um card organizado e independente. */
    .label-mode-card {
        display: grid !important;
        grid-template-columns: 22px minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 10px !important;
        width: 100%;
        margin: 0 !important;
        padding: 12px 13px !important;
        border: 1px solid var(--color-border, #dbe3ef);
        border-radius: 12px;
        background: var(--color-surface, #ffffff);
        cursor: pointer;
    }

    .label-mode-card input[type="radio"] {
        grid-column: 1;
        margin: 3px 0 0 0 !important;
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
        accent-color: #2563eb;
    }

    /* Ícone + título na primeira linha; explicação abaixo. */
    .label-mode-card > span {
        grid-column: 2;
        display: grid !important;
        grid-template-columns: 20px minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        column-gap: 7px !important;
        row-gap: 4px !important;
        align-items: center !important;
        min-width: 0;
        margin: 0 !important;
    }

    .label-mode-card > span > i {
        grid-column: 1;
        grid-row: 1;
        margin: 0 !important;
        font-size: .95rem;
        line-height: 1;
        color: #2563eb;
    }

    .label-mode-card > span > strong {
        grid-column: 2;
        grid-row: 1;
        display: block;
        margin: 0 !important;
        font-size: .98rem;
        line-height: 1.25;
        color: var(--color-text, #0f172a);
    }

    .label-mode-card > span > small {
        grid-column: 1 / -1;
        grid-row: 2;
        display: block !important;
        margin: 0 !important;
        padding-left: 27px;
        font-size: .82rem;
        line-height: 1.45;
        color: var(--color-text-muted, #64748b);
        white-space: normal !important;
    }

    .label-mode-card:has(input[type="radio"]:checked) {
        border-color: #2563eb;
        background: #eff6ff;
        box-shadow: 0 0 0 1px rgba(37, 99, 235, .10);
    }

    .label-mode-card:has(input[type="radio"]:focus-visible) {
        outline: 3px solid rgba(37, 99, 235, .24);
        outline-offset: 2px;
    }

    html[data-theme="dark"] .label-mode-card {
        background: #1e293b;
        border-color: #475569;
    }

    html[data-theme="dark"] .label-mode-card > span > strong {
        color: #f8fafc;
    }

    html[data-theme="dark"] .label-mode-card > span > small {
        color: #cbd5e1;
    }

    html[data-theme="dark"] .label-mode-card > span > i {
        color: #93c5fd;
    }

    html[data-theme="dark"] .label-mode-card:has(input[type="radio"]:checked) {
        background: #172554;
        border-color: #60a5fa;
    }
}

@media (max-width: 380px) {
    .label-mode-card {
        padding: 11px !important;
        gap: 8px !important;
    }

    .label-mode-card > span > strong {
        font-size: .94rem;
    }

    .label-mode-card > span > small {
        padding-left: 25px;
        font-size: .80rem;
    }
}


/* =========================================================
   SGPM 1.2.41 — HEADER MOBILE: AVATAR CENTRALIZADO
   Exclusivo para celular. Desktop e Tablet permanecem intactos.
   ========================================================= */

@media (max-width: 560px) {
    .app-header .header-user {
        display: grid !important;
        place-items: center !important;
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 5px !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    .app-header .header-user__avatar {
        display: grid !important;
        place-items: center !important;
        flex: 0 0 28px !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        margin: 0 auto !important;
        overflow: hidden;
        border-radius: 50%;
    }

    .app-header .header-user__avatar img {
        display: block;
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
        max-height: 100%;
        margin: 0 !important;
        object-fit: cover;
        object-position: center center;
        border-radius: 50%;
    }
}

@media (max-width: 380px) {
    .app-header .header-user {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        padding: 5px !important;
    }

    .app-header .header-user__avatar {
        flex-basis: 26px !important;
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
    }
}


/* =========================================================
   SGPM 1.2.42 — TERMO DE MOVIMENTAÇÃO / VER
   Correção estrutural Desktop + Tablet + Mobile
   ========================================================= */

.movement-term-view {
    overflow: hidden;
}

.movement-term-view__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.movement-term-view__heading {
    min-width: 0;
    flex: 1 1 auto;
}

.movement-term-view__heading h1 {
    margin: 6px 0 8px;
    overflow-wrap: anywhere;
}

.movement-term-view__heading .page-description {
    max-width: 780px;
    margin-bottom: 0;
}

.movement-term-view__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 1 520px;
}

.movement-term-view__actions .btn {
    min-height: 42px;
    white-space: nowrap;
}

.movement-term-view__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.movement-term-view__summary article {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-soft);
}

.movement-term-view__summary span {
    display: block;
    margin-bottom: 5px;
    color: var(--color-text-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.movement-term-view__summary strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: .94rem;
    line-height: 1.4;
}

.movement-term-view__status {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .76rem !important;
}

.movement-term-view__status--issued {
    background: #dcfce7;
    color: #166534 !important;
}

.movement-term-view__status--cancelled {
    background: #fee2e2;
    color: #991b1b !important;
}

.movement-term-view__sections {
    display: grid;
    gap: 16px;
}

.movement-term-view__section {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
}

.movement-term-view__section-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.movement-term-view__section-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
}

.movement-term-view__section-title h2 {
    margin: 1px 0 3px;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.3;
}

.movement-term-view__section-title p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .79rem;
    line-height: 1.5;
}

.movement-term-view__data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.movement-term-view__data-grid--single {
    grid-template-columns: 1fr;
}

.movement-term-view__data-grid > div {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface-soft);
}

.movement-term-view__data-grid dt,
.movement-term-view__side dt {
    margin: 0 0 5px;
    color: var(--color-text-muted);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.movement-term-view__data-grid dd,
.movement-term-view__side dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.5;
}

.movement-term-view__compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.movement-term-view__side {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-soft);
}

.movement-term-view__side--after {
    border-color: color-mix(in srgb, var(--color-primary) 38%, var(--color-border));
}

.movement-term-view__side-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.movement-term-view__side-heading > i {
    color: var(--color-primary);
}

.movement-term-view__side-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.movement-term-view__side dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.movement-term-view__side dl > div {
    min-width: 0;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.movement-term-view__side dl > div:first-child {
    padding-top: 0;
    border-top: 0;
}

.movement-term-view__side dd small {
    display: block;
    margin-top: 3px;
    color: var(--color-text-muted);
    font-size: .75rem;
    font-weight: 500;
}

.movement-term-view__compare-arrow {
    display: grid;
    place-items: center;
}

.movement-term-view__compare-arrow span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
}

.movement-term-view__cancel {
    margin-top: 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}

.movement-term-view__cancel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    cursor: pointer;
    list-style: none;
    background: var(--color-surface-soft);
    color: var(--color-text);
    font-size: .84rem;
    font-weight: 800;
}

.movement-term-view__cancel > summary::-webkit-details-marker {
    display: none;
}

.movement-term-view__cancel > summary span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.movement-term-view__cancel > summary span i {
    color: #b91c1c;
}

.movement-term-view__cancel[open] > summary > i:last-child {
    transform: rotate(180deg);
}

.movement-term-view__cancel-content {
    padding: 14px;
    border-top: 1px solid var(--color-border);
}

.movement-term-view__cancel-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.movement-term-view__cancelled-note {
    margin-top: 14px;
}

.movement-term-view__integrity {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 32%, var(--color-border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface));
}

.movement-term-view__integrity > i {
    margin-top: 2px;
    color: var(--color-primary);
}

.movement-term-view__integrity strong {
    color: var(--color-text);
    font-size: .85rem;
}

.movement-term-view__integrity p {
    margin: 4px 0 0;
    color: var(--color-text-muted);
    font-size: .76rem;
    line-height: 1.5;
}

/* Tablet */
@media (max-width: 1024px) {
    .movement-term-view__header {
        flex-direction: column;
    }

    .movement-term-view__actions {
        width: 100%;
        flex-basis: auto;
        justify-content: flex-start;
    }

    .movement-term-view__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 640px) {
    .movement-term-view {
        padding: 16px !important;
        border-radius: 12px;
    }

    .movement-term-view__header {
        gap: 16px;
        margin-bottom: 16px;
    }

    .movement-term-view__heading h1 {
        font-size: 1.45rem;
        line-height: 1.15;
    }

    .movement-term-view__heading .page-description {
        font-size: .91rem;
        line-height: 1.55;
    }

    .movement-term-view__actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .movement-term-view__actions .btn {
        width: 100%;
        min-height: 46px;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .movement-term-view__summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .movement-term-view__summary article {
        padding: 12px 13px;
    }

    .movement-term-view__section {
        padding: 14px;
        border-radius: 12px;
    }

    .movement-term-view__section-title {
        gap: 10px;
        margin-bottom: 13px;
    }

    .movement-term-view__section-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .movement-term-view__section-title h2 {
        font-size: .94rem;
    }

    .movement-term-view__section-title p {
        font-size: .76rem;
    }

    .movement-term-view__data-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .movement-term-view__compare {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .movement-term-view__compare-arrow {
        min-height: 32px;
    }

    .movement-term-view__compare-arrow span {
        width: 34px;
        height: 34px;
        transform: rotate(90deg);
    }

    .movement-term-view__side {
        padding: 13px;
    }

    .movement-term-view__cancel > summary {
        align-items: flex-start;
    }

    .movement-term-view__cancel-actions .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    .movement-term-view__integrity {
        padding: 13px;
    }
}

/* Tema escuro */
html[data-theme="dark"] .movement-term-view__summary article,
html[data-theme="dark"] .movement-term-view__data-grid > div,
html[data-theme="dark"] .movement-term-view__side,
html[data-theme="dark"] .movement-term-view__cancel > summary {
    background: #172033;
    border-color: #475569;
}

html[data-theme="dark"] .movement-term-view__section {
    background: #1e293b;
    border-color: #475569;
}

html[data-theme="dark"] .movement-term-view__section-icon {
    background: #243b67;
    color: #93c5fd;
}

html[data-theme="dark"] .movement-term-view__side-badge {
    background: #243b67;
    color: #bfdbfe;
}

html[data-theme="dark"] .movement-term-view__side--after {
    border-color: #60a5fa;
}

html[data-theme="dark"] .movement-term-view__integrity {
    background: #172554;
    border-color: #3156a3;
}

html[data-theme="dark"] .movement-term-view__status--issued {
    background: #14532d;
    color: #dcfce7 !important;
}

html[data-theme="dark"] .movement-term-view__status--cancelled {
    background: #7f1d1d;
    color: #fee2e2 !important;
}


/* =========================================================
   SGPM 1.2.47 — RODAPÉ: PAINEL PRÓPRIO DE SESSÃO
   ========================================================= */
.app-footer__session-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--color-border, #d9e3f0);
    background: var(--color-surface-soft, #f8fafc);
}

.app-footer__session-panel-item {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
    min-height: 72px;
    padding: 11px 13px;
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    background: #ffffff;
    box-sizing: border-box;
}

.app-footer__session-panel-item--timer {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.app-footer__session-panel-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eef4ff;
    color: #2563eb;
    font-size: .92rem;
}

.app-footer__session-panel-item > div {
    min-width: 0;
}

.app-footer__session-panel-item small,
.app-footer__session-panel-item strong,
.app-footer__session-panel-item span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.app-footer__session-panel-item small {
    margin-bottom: 3px;
    color: #64748b;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.app-footer__session-panel-item strong {
    color: #0f172a;
    font-size: .86rem;
    line-height: 1.25;
}

.app-footer__session-panel-item span {
    margin-top: 3px;
    color: #64748b;
    font-size: .68rem;
    line-height: 1.35;
}

.app-footer__session-panel-item--timer strong {
    color: #1d4ed8;
    font-size: 1.08rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .025em;
}

.app-footer__session-panel-item--timer.is-warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.app-footer__session-panel-item--timer.is-warning .app-footer__session-panel-icon,
.app-footer__session-panel-item--timer.is-warning strong {
    color: #b45309;
}

.app-footer__session-panel-item--timer.is-critical,
.app-footer__session-panel-item--timer.is-expired {
    border-color: #ef4444;
    background: #fef2f2;
}

.app-footer__session-panel-item--timer.is-critical .app-footer__session-panel-icon,
.app-footer__session-panel-item--timer.is-critical strong,
.app-footer__session-panel-item--timer.is-expired .app-footer__session-panel-icon,
.app-footer__session-panel-item--timer.is-expired strong {
    color: #b91c1c;
}

html[data-theme="dark"] .app-footer__session-panel {
    border-top-color: #334155;
    background: #111827;
}

html[data-theme="dark"] .app-footer__session-panel-item {
    border-color: #475569;
    background: #172033;
}

html[data-theme="dark"] .app-footer__session-panel-item--timer {
    border-color: #3156a3;
    background: #172554;
}

html[data-theme="dark"] .app-footer__session-panel-icon {
    background: #243b67;
    color: #93c5fd;
}

html[data-theme="dark"] .app-footer__session-panel-item small,
html[data-theme="dark"] .app-footer__session-panel-item span {
    color: #cbd5e1;
}

html[data-theme="dark"] .app-footer__session-panel-item strong {
    color: #f8fafc;
}

html[data-theme="dark"] .app-footer__session-panel-item--timer strong {
    color: #bfdbfe;
}

html[data-theme="dark"] .app-footer__session-panel-item--timer.is-warning {
    border-color: #a16207;
    background: #422006;
}

html[data-theme="dark"] .app-footer__session-panel-item--timer.is-warning .app-footer__session-panel-icon,
html[data-theme="dark"] .app-footer__session-panel-item--timer.is-warning strong {
    color: #fbbf24;
}

html[data-theme="dark"] .app-footer__session-panel-item--timer.is-critical,
html[data-theme="dark"] .app-footer__session-panel-item--timer.is-expired {
    border-color: #991b1b;
    background: #450a0a;
}

html[data-theme="dark"] .app-footer__session-panel-item--timer.is-critical .app-footer__session-panel-icon,
html[data-theme="dark"] .app-footer__session-panel-item--timer.is-critical strong,
html[data-theme="dark"] .app-footer__session-panel-item--timer.is-expired .app-footer__session-panel-icon,
html[data-theme="dark"] .app-footer__session-panel-item--timer.is-expired strong {
    color: #fca5a5;
}

@media (max-width: 900px) {
    .app-footer__session-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .app-footer__session-panel {
        gap: 8px;
        padding: 10px;
    }

    .app-footer__session-panel-item {
        min-height: 66px;
        padding: 10px 11px;
        gap: 10px;
        border-radius: 10px;
    }

    .app-footer__session-panel-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .app-footer__session-panel-item small {
        font-size: .62rem;
    }

    .app-footer__session-panel-item strong {
        font-size: .82rem;
    }

    .app-footer__session-panel-item span {
        font-size: .66rem;
    }

    .app-footer__session-panel-item--timer strong {
        font-size: 1rem;
    }
}


/* =========================================================
   SGPM 1.2.48 — RODAPÉ: CENTRALIZAÇÃO DOS 3 ÍCONES
   Corrige alinhamento visual dos cartões:
   - Saída automática
   - Geolocalização por IP
   - Resolução da tela
   ========================================================= */

.app-footer__session-panel-item {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 12px !important;
}

.app-footer__session-panel-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: center !important;
    align-self: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box;
}

.app-footer__session-panel-icon > i,
.app-footer__session-panel-icon > svg {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.app-footer__session-panel-icon > i {
    width: 1em;
}

.app-footer__session-panel-item > div {
    align-self: center !important;
}

@media (max-width: 640px) {
    .app-footer__session-panel-item {
        grid-template-columns: 38px minmax(0, 1fr) !important;
        column-gap: 10px !important;
    }

    .app-footer__session-panel-icon {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
    }
}


/* =========================================================
   SGPM 1.2.49 — RODAPÉ: 3 ITENS NOVOS IGUAIS AOS DEMAIS
   ========================================================= */

/* O painel isolado das versões 1.2.47/1.2.48 deixou de ser usado. */
.app-footer__session-panel {
    display: none !important;
}

/* Saída automática agora usa o mesmo cartão/célula dos demais itens do rodapé. */
.app-footer__audit-item--timer strong {
    font-variant-numeric: tabular-nums;
}

/* Mantém alerta sem descaracterizar o padrão visual do rodapé. */
.app-footer__audit-item--timer.is-warning {
    background: #fffbeb;
}

.app-footer__audit-item--timer.is-warning .app-footer__audit-icon,
.app-footer__audit-item--timer.is-warning strong {
    color: #b45309;
}

.app-footer__audit-item--timer.is-critical,
.app-footer__audit-item--timer.is-expired {
    background: #fef2f2;
}

.app-footer__audit-item--timer.is-critical .app-footer__audit-icon,
.app-footer__audit-item--timer.is-critical strong,
.app-footer__audit-item--timer.is-expired .app-footer__audit-icon,
.app-footer__audit-item--timer.is-expired strong {
    color: #b91c1c;
}

/* Tema escuro */
html[data-theme="dark"] .app-footer__audit-item--timer.is-warning {
    background: #422006;
}

html[data-theme="dark"] .app-footer__audit-item--timer.is-warning .app-footer__audit-icon,
html[data-theme="dark"] .app-footer__audit-item--timer.is-warning strong {
    color: #fbbf24;
}

html[data-theme="dark"] .app-footer__audit-item--timer.is-critical,
html[data-theme="dark"] .app-footer__audit-item--timer.is-expired {
    background: #450a0a;
}

html[data-theme="dark"] .app-footer__audit-item--timer.is-critical .app-footer__audit-icon,
html[data-theme="dark"] .app-footer__audit-item--timer.is-critical strong,
html[data-theme="dark"] .app-footer__audit-item--timer.is-expired .app-footer__audit-icon,
html[data-theme="dark"] .app-footer__audit-item--timer.is-expired strong {
    color: #fca5a5;
}


/* =========================================================
   SGPM 1.2.50 — LOGIN DESKTOP
   Mais respiro entre a marca SGPM e o primeiro bloco informativo.
   Exclusivo para Desktop; Tablet e Mobile permanecem inalterados.
   ========================================================= */

@media (min-width: 1081px) {
    .auth-card--login .auth-panel--brand .auth-brand__highlights {
        margin-top: 30px !important;
    }
}

/* Em desktops com pouca altura, reduz levemente o respiro
   para preservar todo o conteúdo dentro do painel. */
@media (min-width: 1081px) and (max-height: 760px) {
    .auth-card--login .auth-panel--brand .auth-brand__highlights {
        margin-top: 20px !important;
    }
}


/* =========================================================
   SGPM 1.2.51 — PADRÃO DE ETIQUETAS / DESKTOP
   Organização das opções "Origem do layout"
   Replica no Desktop a solução já aprovada no Mobile.
   Tablet permanece inalterado.
   ========================================================= */

@media (min-width: 1081px) {
    .label-mode-cards {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 980px;
    }

    .label-mode-card {
        display: grid !important;
        grid-template-columns: 22px minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 10px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 12px 14px !important;
        border: 1px solid var(--color-border, #dbe3ef) !important;
        border-radius: 12px !important;
        background: var(--color-surface, #ffffff) !important;
        cursor: pointer;
        box-sizing: border-box;
    }

    .label-mode-card input[type="radio"] {
        grid-column: 1 !important;
        margin: 3px 0 0 0 !important;
        width: 18px !important;
        height: 18px !important;
        accent-color: #2563eb;
    }

    .label-mode-card > span {
        grid-column: 2 !important;
        display: grid !important;
        grid-template-columns: 20px minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        column-gap: 7px !important;
        row-gap: 4px !important;
        align-items: center !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    .label-mode-card > span > i {
        grid-column: 1 !important;
        grid-row: 1 !important;
        margin: 0 !important;
        font-size: .95rem !important;
        line-height: 1 !important;
        color: #2563eb !important;
    }

    .label-mode-card > span > strong {
        grid-column: 2 !important;
        grid-row: 1 !important;
        display: block !important;
        margin: 0 !important;
        font-size: .98rem !important;
        line-height: 1.25 !important;
        color: var(--color-text, #0f172a) !important;
    }

    .label-mode-card > span > small {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        display: block !important;
        margin: 0 !important;
        padding-left: 27px !important;
        font-size: .82rem !important;
        line-height: 1.45 !important;
        color: var(--color-text-muted, #64748b) !important;
        white-space: normal !important;
    }

    .label-mode-card:has(input[type="radio"]:checked) {
        border-color: #2563eb !important;
        background: #eff6ff !important;
        box-shadow: 0 0 0 1px rgba(37, 99, 235, .10) !important;
    }

    .label-mode-card:has(input[type="radio"]:focus-visible) {
        outline: 3px solid rgba(37, 99, 235, .24) !important;
        outline-offset: 2px;
    }

    html[data-theme="dark"] .label-mode-card {
        background: #1e293b !important;
        border-color: #475569 !important;
    }

    html[data-theme="dark"] .label-mode-card > span > strong {
        color: #f8fafc !important;
    }

    html[data-theme="dark"] .label-mode-card > span > small {
        color: #cbd5e1 !important;
    }

    html[data-theme="dark"] .label-mode-card > span > i {
        color: #93c5fd !important;
    }

    html[data-theme="dark"] .label-mode-card:has(input[type="radio"]:checked) {
        background: #172554 !important;
        border-color: #60a5fa !important;
    }
}


/* =========================================================
   SGPM 1.2.52 — PADRÃO DE ETIQUETAS / EDITOR DE ARTE
   Restaura a estrutura visual do bloco "Arte personalizada"
   sem alterar a correção aprovada de "Origem do layout".
   ========================================================= */

.label-custom-section[hidden],
[data-layout-section][hidden] {
    display: none !important;
}

.label-art-file-status {
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background);
}

.label-art-file-status strong,
.label-art-file-status small {
    display: block;
}

.label-art-file-status small {
    margin-top: 3px;
    color: var(--color-text-muted);
}

.label-art-warning {
    margin-top: 14px;
}

.label-dynamic-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-background);
}

.label-dynamic-toolbar > div {
    min-width: 260px;
    margin-right: auto;
}

.label-dynamic-toolbar > div strong,
.label-dynamic-toolbar > div small {
    display: block;
}

.label-dynamic-toolbar > div small {
    margin-top: 2px;
    color: var(--color-text-muted);
}

/* Área visual da arte personalizada */
.label-art-editor-shell {
    position: relative;
    display: inline-block;
    max-width: calc(100% - 34px);
    margin: 28px 0 8px 34px;
    padding: 0;
    vertical-align: top;
}

.label-art-editor {
    position: relative;
    width: 50mm;
    height: 30mm;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    background-color: #fff;
    background-image:
        linear-gradient(to right, rgba(37,99,235,.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(37,99,235,.08) 1px, transparent 1px);
    background-size: 5mm 5mm;
    box-shadow: 0 10px 26px rgba(15,23,42,.12);
    touch-action: none;
    isolation: isolate;
    box-sizing: border-box;
}

.label-art-editor__image {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.label-art-editor__empty {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    text-align: center;
    color: #64748b;
    background:
        repeating-linear-gradient(
            45deg,
            #f8fafc,
            #f8fafc 8px,
            #f1f5f9 8px,
            #f1f5f9 16px
        );
    box-sizing: border-box;
}

.label-art-editor__empty i {
    font-size: 1.4rem;
}

.label-art-editor__empty strong {
    display: block;
    line-height: 1.25;
}

.label-art-editor__empty span {
    display: block;
    max-width: 170px;
    font-size: .66rem;
    line-height: 1.35;
}

/* Campos arrastáveis */
.label-art-field {
    position: absolute;
    z-index: 5;
    margin: 0;
    padding: 1px 3px;
    border: 1px dashed #2563eb;
    border-radius: 3px;
    background: rgba(255,255,255,.88);
    cursor: grab;
    user-select: none;
    touch-action: none;
    box-sizing: border-box;
}

.label-art-field:active {
    cursor: grabbing;
}

.label-art-field:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.label-art-field--number {
    display: flex;
    align-items: center;
    min-height: 5mm;
    white-space: nowrap;
    overflow: hidden;
}

.label-art-field--number .label-art-field__content {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: clip;
}

.label-art-field--qr {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .2mm;
    background: #fff;
}

.label-art-field--qr .sgpm-qr {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    height: 100%;
}

.label-art-field--qr .sgpm-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Guias centrais do editor */
.label-art-guide {
    position: absolute;
    z-index: 4;
    display: none;
    pointer-events: none;
    background: #ef4444;
}

.label-art-guide--x {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
}

.label-art-guide--y {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
}

.label-art-editor.is-snap-y .label-art-guide--x,
.label-art-editor.is-snap-x .label-art-guide--y {
    display: block;
}

/* Réguas */
.label-art-ruler {
    position: absolute;
    color: var(--color-text-muted);
    font-size: .55rem;
    pointer-events: none;
}

.label-art-ruler--top {
    left: 0;
    right: 0;
    bottom: 100%;
    height: 22px;
    border-bottom: 1px solid var(--color-border);
}

.label-art-ruler--left {
    top: 0;
    bottom: 0;
    right: 100%;
    width: 28px;
    border-right: 1px solid var(--color-border);
}

.label-art-ruler span {
    position: absolute;
    font-variant-numeric: tabular-nums;
}

.label-art-ruler--top span {
    bottom: 3px;
    transform: translateX(-50%);
}

.label-art-ruler--top span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    height: 4px;
    border-left: 1px solid var(--color-border);
}

.label-art-ruler--left span {
    right: 4px;
    transform: translateY(-50%);
}

.label-art-ruler--left span::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    width: 4px;
    border-top: 1px solid var(--color-border);
}

/* Coordenadas */
.label-art-coordinates {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    width: fit-content;
    max-width: 100%;
    margin-top: 2px;
    padding: 9px 11px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-text-muted);
    font-size: .72rem;
    line-height: 1.4;
    box-sizing: border-box;
}

.label-art-coordinates span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: normal;
}

.label-art-coordinates strong,
.label-art-coordinates b {
    color: var(--color-text);
}

.label-config-submit {
    display: flex;
    justify-content: flex-end;
    margin: -8px 0 24px;
}

/* Tema escuro */
html[data-theme="dark"] .label-art-file-status,
html[data-theme="dark"] .label-dynamic-toolbar,
html[data-theme="dark"] .label-art-coordinates {
    background: #172033;
    border-color: #475569;
}

html[data-theme="dark"] .label-art-editor {
    border-color: #64748b;
}

/* Tablet e Mobile */
@media (max-width: 760px) {
    .label-art-editor-shell {
        max-width: calc(100% - 30px);
        margin-left: 30px;
    }

    .label-dynamic-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .label-dynamic-toolbar > div {
        min-width: 0;
        margin-right: 0;
    }

    .label-art-editor {
        transform-origin: top left;
    }

    .label-art-coordinates {
        align-items: flex-start;
        flex-direction: column;
        width: 100%;
    }

    .label-art-coordinates span {
        display: flex;
        width: 100%;
    }
}


/* =========================================================
   SGPM 1.2.53 — ARTE PERSONALIZADA: PREVIEW IMEDIATO
   ========================================================= */

/* IMPORTANTE:
   O atributo HTML "hidden" precisa prevalecer mesmo sobre regras com
   display:flex/block do editor. Sem isso, o placeholder podia ficar
   por cima da imagem enviada. */
.label-art-editor__image[hidden],
.label-art-editor__empty[hidden],
.label-art-file-status__thumb[hidden],
.label-art-file-status__thumb img[hidden] {
    display: none !important;
}

.label-art-editor__image:not([hidden]) {
    display: block !important;
}

.label-art-editor__empty:not([hidden]) {
    display: flex !important;
}

/* "Arquivo atual" vira também um preview instantâneo, antes de salvar. */
.label-art-file-status {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
}

.label-art-file-status__thumb {
    display: grid;
    place-items: center;
    flex: 0 0 76px;
    width: 76px;
    height: 52px;
    overflow: hidden;
    border: 1px solid var(--color-border, #dbe3ef);
    border-radius: 8px;
    background: #fff;
}

.label-art-file-status__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.label-art-file-status__text {
    min-width: 0;
}

.label-art-file-status__text strong,
.label-art-file-status__text small {
    display: block;
    overflow-wrap: anywhere;
}

.label-art-file-status.has-preview {
    border-color: #93c5fd;
    background: #eff6ff;
}

html[data-theme="dark"] .label-art-file-status__thumb {
    background: #0f172a;
    border-color: #475569;
}

html[data-theme="dark"] .label-art-file-status.has-preview {
    background: #172554;
    border-color: #3b82f6;
}

/* Garante que a imagem fique atrás apenas dos campos dinâmicos,
   nunca atrás do placeholder quando este estiver oculto. */
.label-art-editor__image {
    z-index: 1 !important;
}

.label-art-editor__empty {
    z-index: 2 !important;
}

.label-art-field {
    z-index: 5 !important;
}

@media (max-width: 640px) {
    .label-art-file-status {
        align-items: flex-start;
        flex-direction: column;
    }

    .label-art-file-status__thumb {
        width: 100%;
        height: 110px;
        flex-basis: auto;
    }
}


/* =========================================================
   SGPM 1.2.55 — ARTE PERSONALIZADA
   1) Controles do número em uma única linha no Desktop
   2) Fundo transparente no campo <000000>
   Mobile/Tablet preservados.
   ========================================================= */

/* DESKTOP — mantém todos os controles de estilo do patrimônio inline:
   Tipografia | Fonte | Cor | Alinhamento | Negrito | Itálico */
@media (min-width: 901px) {
    .label-custom-number-style .label-text-style__grid--compact {
        display: grid !important;
        grid-template-columns:
            minmax(220px, 1.45fr)
            minmax(135px, .78fr)
            92px
            minmax(135px, .72fr)
            max-content
            max-content !important;
        gap: 12px !important;
        align-items: end !important;
        width: 100% !important;
    }

    .label-custom-number-style .label-text-style__grid--compact > .form-group,
    .label-custom-number-style .label-text-style__grid--compact > .checkbox-row {
        min-width: 0 !important;
        margin: 0 !important;
    }

    .label-custom-number-style .label-text-style__grid--compact > .checkbox-row {
        align-self: end !important;
        padding: 0 0 9px !important;
        white-space: nowrap !important;
    }

    .label-custom-number-style .label-text-style__grid--compact select,
    .label-custom-number-style .label-text-style__grid--compact input[type="number"] {
        width: 100% !important;
        min-width: 0 !important;
    }

    .label-custom-number-style .label-text-style__grid--compact input[type="color"] {
        width: 58px !important;
        min-width: 58px !important;
    }
}

/* CAMPO DINÂMICO DO PATRIMÔNIO
   O número fica diretamente sobre a arte enviada, sem retângulo branco. */
.label-art-field--number {
    background: transparent !important;
    box-shadow: none !important;
}

/* Mantém apenas o contorno de edição como referência visual.
   Na impressão ele não faz parte da etiqueta. */
.label-art-field--number:hover,
.label-art-field--number:focus,
.label-art-field--number:focus-visible,
.label-art-field--number:active {
    background: transparent !important;
}

/* Tema escuro: não injeta fundo no campo sobre a arte. */
html[data-theme="dark"] .label-art-field--number {
    background: transparent !important;
}

/* Tablet/Mobile continuam usando as regras responsivas anteriores. */
@media (max-width: 900px) {
    .label-custom-number-style .label-text-style__grid--compact {
        /* preserva o layout responsivo já existente */
    }
}


/* =========================================================
   SGPM 1.2.57 — LICENCIAMENTO POR MUNICÍPIO/CLIENTE
   ========================================================= */
.license-eyebrow{display:inline-flex;align-items:center;gap:6px;color:var(--color-primary,#1d4ed8);font-size:.72rem;font-weight:800;letter-spacing:.045em;text-transform:uppercase}
.license-status-badge{display:inline-flex;align-items:center;width:max-content;padding:5px 9px;border-radius:999px;font-size:.72rem;font-weight:800;background:#e2e8f0;color:#334155}
.license-status-badge--success{background:#dcfce7;color:#166534}.license-status-badge--attention{background:#dbeafe;color:#1d4ed8}.license-status-badge--warning{background:#fef3c7;color:#92400e}.license-status-badge--danger{background:#fee2e2;color:#991b1b}.license-status-badge--info{background:#e0f2fe;color:#075985}
.license-progress{height:8px;overflow:hidden;border-radius:999px;background:#e2e8f0}.license-progress>span{display:block;height:100%;border-radius:inherit;background:var(--color-primary,#1d4ed8);transition:width .3s ease}
.municipio-license-row>td{padding:0 10px 14px!important;background:var(--color-surface-soft,#f8fafc)}
.municipio-license-panel{display:grid;grid-template-columns:92px minmax(260px,1.4fr) minmax(130px,.55fr) minmax(170px,.7fr) max-content;gap:16px;align-items:center;padding:14px 16px;border:1px solid #dbe3ef;border-radius:14px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.05)}
.municipio-license-panel__chart,.client-license-card__chart,.license-admin-overview__ring{--ring-color:var(--color-primary,#1d4ed8);display:grid;place-items:center;align-content:center;width:76px;height:76px;border-radius:50%;background:radial-gradient(circle closest-side,#fff 72%,transparent 74% 99%),conic-gradient(var(--ring-color) calc(var(--license-remaining)*1%),#e2e8f0 0);text-align:center}.municipio-license-panel__chart strong,.client-license-card__chart strong,.license-admin-overview__ring strong{font-size:1rem;line-height:1}.municipio-license-panel__chart span,.client-license-card__chart span,.license-admin-overview__ring span{margin-top:3px;color:#64748b;font-size:.59rem;font-weight:700;text-transform:uppercase}
.municipio-license-panel--warning .municipio-license-panel__chart,.client-license-card--warning .client-license-card__chart,.license-admin-overview--warning .license-admin-overview__ring{--ring-color:#d97706}.municipio-license-panel--danger .municipio-license-panel__chart,.client-license-card--danger .client-license-card__chart,.license-admin-overview--danger .license-admin-overview__ring{--ring-color:#dc2626}.municipio-license-panel__main{display:grid;gap:5px;min-width:0}.municipio-license-panel__title{display:flex;gap:10px;align-items:center;justify-content:space-between}.municipio-license-panel__title>span:first-child{font-size:.75rem;font-weight:800;color:#475569;text-transform:uppercase}.municipio-license-panel__main>strong{font-size:.98rem}.municipio-license-panel__main small,.municipio-license-panel__metric small{color:#64748b}.municipio-license-panel__metric{display:grid;gap:3px}.municipio-license-panel__metric>span{font-size:.68rem;font-weight:800;color:#64748b;text-transform:uppercase}.municipio-license-panel__metric>strong{font-size:.9rem}.municipio-license-panel__action{white-space:nowrap}
.client-license-card{display:grid;grid-template-columns:88px 1fr;gap:16px;align-items:center;margin:14px 0;padding:14px 16px;border:1px solid #dbe3ef;border-left:4px solid var(--color-primary,#1d4ed8);border-radius:14px;background:#fff}.client-license-card__title{display:flex;align-items:center;justify-content:space-between;gap:12px}.client-license-card__title h2{margin:3px 0 5px;font-size:1rem}.client-license-card__body p{margin:0 0 8px;color:#64748b;font-size:.82rem}
.license-admin-overview{display:flex;gap:16px;align-items:center;margin-bottom:16px;padding:14px;border:1px solid #dbe3ef;border-radius:14px;background:#f8fafc}.license-admin-overview h3{margin:3px 0;font-size:1rem}.license-admin-overview p{margin:0 0 4px;color:#64748b}.license-calculated-date{display:flex;align-items:center;min-height:42px;padding:9px 12px;border:1px solid #dbe3ef;border-radius:8px;background:#f8fafc;font-weight:800}.license-history{margin-top:14px}.license-history>summary{cursor:pointer;font-weight:800;color:var(--color-primary,#1d4ed8)}
.license-access-alert{display:flex;gap:12px;margin:0 0 16px;padding:14px 16px;border:1px solid #f59e0b;border-radius:14px;background:#fffbeb}.license-access-alert--danger{border-color:#ef4444;background:#fef2f2}.license-access-alert__icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:10px;background:#fff;color:#b45309}.license-access-alert--danger .license-access-alert__icon{color:#b91c1c}.license-access-alert__content>strong{display:block;margin-bottom:3px}.license-access-alert__content>p{margin:0;color:#475569}.license-payment-details{margin-top:10px}.license-payment-details>summary{cursor:pointer;font-weight:800}.license-payment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.license-payment-grid>div{padding:9px 10px;border:1px solid rgba(148,163,184,.4);border-radius:9px;background:rgba(255,255,255,.65)}.license-payment-grid span,.license-payment-grid strong{display:block}.license-payment-grid span{font-size:.68rem;font-weight:800;color:#64748b;text-transform:uppercase}.license-payment-grid strong{margin-top:2px;font-size:.8rem}.license-payment-note{margin:8px 0 0!important;font-size:.75rem!important}
html[data-theme="dark"] .municipio-license-panel,html[data-theme="dark"] .client-license-card{background:#172033;border-color:#475569}html[data-theme="dark"] .municipio-license-row>td{background:#111827}html[data-theme="dark"] .municipio-license-panel__chart,html[data-theme="dark"] .client-license-card__chart,html[data-theme="dark"] .license-admin-overview__ring{background:radial-gradient(circle closest-side,#172033 72%,transparent 74% 99%),conic-gradient(var(--ring-color) calc(var(--license-remaining)*1%),#334155 0)}html[data-theme="dark"] .license-admin-overview,html[data-theme="dark"] .license-calculated-date{background:#172033;border-color:#475569}html[data-theme="dark"] .license-access-alert{background:#422006;border-color:#a16207}html[data-theme="dark"] .license-access-alert--danger{background:#450a0a;border-color:#991b1b}html[data-theme="dark"] .license-access-alert__icon{background:#172033}html[data-theme="dark"] .license-access-alert__content>p{color:#e2e8f0}html[data-theme="dark"] .license-payment-grid>div{background:#172033;border-color:#475569}
@media(max-width:1100px){.municipio-license-panel{grid-template-columns:78px 1fr 1fr}.municipio-license-panel__action{grid-column:2/-1;width:max-content}.municipio-license-panel__metric:last-of-type{grid-column:3}.municipio-license-panel__chart{grid-row:1/3}}
@media(max-width:700px){.municipio-license-panel{grid-template-columns:1fr}.municipio-license-panel__chart{grid-row:auto}.municipio-license-panel__chart,.client-license-card__chart{justify-self:center}.municipio-license-panel__action{grid-column:auto;width:100%}.municipio-license-panel__metric:last-of-type{grid-column:auto}.municipio-license-panel__title,.client-license-card__title{align-items:flex-start;flex-direction:column}.client-license-card{grid-template-columns:1fr}.license-admin-overview{align-items:flex-start;flex-direction:column}.license-payment-grid{grid-template-columns:1fr}}

.license-payment-admin{margin-top:12px}.license-payment-admin>summary{cursor:pointer;font-weight:800;color:var(--color-primary,#1d4ed8)}


/* =========================================================
   SGPM 1.2.59 — PAINEL COMERCIAL DE LICENÇAS E PAGAMENTOS
   ========================================================= */
.license-control-page{display:grid;gap:18px}.license-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.license-kpi{padding:16px;border:1px solid var(--color-border);border-radius:14px;background:var(--color-surface);box-shadow:0 4px 16px rgba(15,23,42,.04)}.license-kpi span{display:flex;gap:7px;align-items:center;color:var(--color-text-muted);font-size:.78rem;font-weight:800;text-transform:uppercase}.license-kpi strong{display:block;margin:8px 0 2px;font-size:1.55rem;color:var(--color-text)}.license-kpi small{color:var(--color-text-muted)}.license-kpi--warning{border-left:4px solid #f59e0b}.license-kpi--danger{border-left:4px solid #dc2626}.license-kpi--success{border-left:4px solid #16a34a}.license-visuals{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(0,1.2fr);gap:14px}.license-chart-card{padding:18px}.license-chart-card h2{margin:0 0 14px}.license-donut{width:170px;height:170px;margin:10px auto 18px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#16a34a 0 calc(var(--ok)*1%),#f59e0b calc(var(--ok)*1%) calc((var(--ok) + var(--warn))*1%),#dc2626 calc((var(--ok) + var(--warn))*1%) 100%);position:relative}.license-donut:after{content:"";position:absolute;inset:24px;border-radius:50%;background:var(--color-surface)}.license-donut div{z-index:1;text-align:center}.license-donut strong{display:block;font-size:1.8rem}.license-donut span{font-size:.72rem;text-transform:uppercase}.license-chart-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:14px;font-size:.78rem}.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}.dot--ok{background:#16a34a}.dot--warn{background:#f59e0b}.dot--bad{background:#dc2626}.finance-bar{margin:15px 0}.finance-bar>div:first-child{display:flex;justify-content:space-between;gap:15px}.finance-bar__track{height:12px;margin-top:7px;border-radius:999px;background:#e2e8f0;overflow:hidden}.finance-bar__track span{display:block;height:100%;border-radius:inherit}.finance-bar__track .is-success{background:#16a34a}.finance-bar__track .is-primary{background:#2563eb}.finance-bar__track .is-danger{background:#dc2626}.filter-bar{display:grid;grid-template-columns:minmax(260px,1.5fr) repeat(2,minmax(170px,.6fr)) auto auto;gap:10px;align-items:end;padding:14px}.license-sheet{padding:0;overflow:hidden}.license-sheet .section-heading,.license-two-cols .section-heading{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:16px 18px}.license-table td small,.table td small{display:block;color:var(--color-text-muted);line-height:1.35;margin-top:3px}.mini-progress{height:6px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin-top:7px;min-width:100px}.mini-progress span{display:block;height:100%;background:var(--color-primary);border-radius:inherit}.action-stack{display:flex;gap:6px;flex-wrap:wrap}.license-two-cols{display:grid;grid-template-columns:1.1fr .9fr;gap:14px}.license-two-cols>.card{padding:0;overflow:hidden}.section-help{margin:-6px 18px 12px;color:var(--color-text-muted)}.message-list{display:grid;gap:8px;padding:0 14px 14px}.message-row{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:12px;border:1px solid var(--color-border);border-radius:10px;background:var(--color-surface-soft)}.message-row strong{display:block;margin:7px 0 3px}.message-row p{margin:0 0 5px}.payment-reference{padding:0}.payment-reference summary{cursor:pointer;padding:16px 18px;font-weight:800}.license-dialog{border:0;border-radius:16px;padding:0;width:min(760px,calc(100vw - 30px));max-height:90vh;box-shadow:0 24px 70px rgba(15,23,42,.25);background:var(--color-surface);color:var(--color-text)}.license-dialog::backdrop{background:rgba(15,23,42,.58);backdrop-filter:blur(2px)}.dialog-card{padding:0}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;padding:18px 20px;border-bottom:1px solid var(--color-border)}.dialog-head h2{margin:3px 0 0}.dialog-close{border:0;background:transparent;font-size:1.8rem;cursor:pointer;color:var(--color-text-muted)}.dialog-card>.form-grid{padding:18px 20px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;padding:14px 20px;border-top:1px solid var(--color-border)}.status-pill--info{background:#dbeafe;color:#1d4ed8}.status-pill--warning{background:#fef3c7;color:#92400e}.status-pill--danger{background:#fee2e2;color:#991b1b}.status-pill--success{background:#dcfce7;color:#166534}.status-pill--neutral{background:#e2e8f0;color:#475569}
html[data-theme="dark"] .license-kpi,html[data-theme="dark"] .license-chart-card,html[data-theme="dark"] .license-dialog{background:#172033;border-color:#475569}html[data-theme="dark"] .license-donut:after{background:#172033}html[data-theme="dark"] .finance-bar__track,html[data-theme="dark"] .mini-progress{background:#334155}html[data-theme="dark"] .message-row{background:#111827;border-color:#475569}
@media(max-width:1200px){.license-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.license-two-cols,.license-visuals{grid-template-columns:1fr}.filter-bar{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.license-kpis{grid-template-columns:1fr}.filter-bar{grid-template-columns:1fr}.license-table{min-width:1050px}.license-control-page .page-header{align-items:flex-start}.license-control-page .page-header__actions{width:100%;display:grid;grid-template-columns:1fr}.license-control-page .page-header__actions .btn{width:100%}.message-row{flex-direction:column}.license-dialog .form-grid--2{grid-template-columns:1fr}.dialog-actions{flex-direction:column}.dialog-actions .btn{width:100%}}

/* =========================================================
   SGPM 1.2.60 — BACKUP E RECUPERAÇÃO
   ========================================================= */
.backup-admin-page{display:grid;gap:22px}.backup-page-header{align-items:flex-start}.backup-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.backup-kpi{border:1px solid var(--color-border,#dbe3ef);border-radius:14px;background:var(--color-surface,#fff);padding:16px;box-shadow:0 5px 18px rgba(15,23,42,.04);min-width:0}.backup-kpi>span{display:flex;gap:8px;align-items:center;color:var(--color-text-muted,#64748b);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.03em}.backup-kpi>span i{color:var(--color-primary,#1d4ed8)}.backup-kpi>strong{display:block;margin-top:9px;font-size:1.55rem;line-height:1.05;color:var(--color-text,#0f172a);overflow-wrap:anywhere}.backup-kpi>small{display:block;margin-top:6px;color:var(--color-text-muted,#64748b)}
.backup-assurance-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.backup-assurance{display:flex;gap:13px;align-items:flex-start;padding:17px}.backup-assurance__icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:0 0 42px;background:rgba(37,99,235,.10);color:#2563eb;font-size:1.05rem}.backup-assurance strong{display:block;margin-bottom:4px}.backup-assurance p{margin:0;color:var(--color-text-muted,#64748b);font-size:.84rem;line-height:1.45}
.backup-server-card{padding:20px}.backup-diagnostics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.backup-diagnostics>div{border:1px solid var(--color-border,#dbe3ef);border-radius:10px;padding:11px 13px;background:var(--color-background,#f8fafc)}.backup-diagnostics span,.backup-diagnostics strong{display:block}.backup-diagnostics span{color:var(--color-text-muted,#64748b);font-size:.74rem;text-transform:uppercase;font-weight:800}.backup-diagnostics strong{margin-top:3px;font-size:.88rem;overflow-wrap:anywhere}
.backup-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.backup-action-card{padding:0;overflow:visible}.backup-action-card>summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:48px 1fr auto;gap:12px;align-items:center;padding:18px 20px}.backup-action-card>summary::-webkit-details-marker{display:none}.backup-action-card>summary>.fa-chevron-down{transition:transform .2s ease;color:var(--color-text-muted,#64748b)}.backup-action-card[open]>summary>.fa-chevron-down{transform:rotate(180deg)}.backup-action-card__icon{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:rgba(37,99,235,.11);color:#2563eb;font-size:1.1rem}.backup-action-card summary strong,.backup-action-card summary small{display:block}.backup-action-card summary small{margin-top:3px;color:var(--color-text-muted,#64748b);font-weight:500}.backup-action-card__body{border-top:1px solid var(--color-border,#dbe3ef);padding:18px 20px 20px}.backup-action-card__body>p{margin-top:0;color:var(--color-text-muted,#64748b);line-height:1.55}.backup-action-card--ethical{border-color:rgba(22,163,74,.32)}.backup-action-card--ethical .backup-action-card__icon{background:rgba(22,163,74,.11);color:#15803d}.backup-action-card--restore{border-color:rgba(220,38,38,.28)}.backup-action-card--restore .backup-action-card__icon{background:rgba(220,38,38,.10);color:#dc2626}.backup-form{display:grid;gap:14px}.confirmation-input{font-weight:800;letter-spacing:.05em}.info-banner--success{border-color:rgba(22,163,74,.35);background:rgba(22,163,74,.07)}.info-banner--danger{border-color:rgba(220,38,38,.32);background:rgba(220,38,38,.06)}
.backup-history{padding:20px}.backup-filter{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.backup-filter select{width:auto;min-width:180px}.backup-table td{vertical-align:middle}.backup-table td small{display:block;margin-top:4px;color:var(--color-text-muted,#64748b);line-height:1.35}.backup-type{display:flex;gap:10px;align-items:flex-start;min-width:230px}.backup-type__icon{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:rgba(37,99,235,.09);color:#2563eb;flex:0 0 38px}.backup-type strong,.backup-type small{display:block}.backup-type .status-pill{margin-top:6px}.backup-hash{font-size:.72rem;padding:5px 7px;border-radius:6px;background:var(--color-background,#f8fafc);border:1px solid var(--color-border,#dbe3ef);white-space:nowrap}.backup-actions{min-width:132px}.backup-row-tools{position:relative}.backup-row-tools>summary{list-style:none}.backup-row-tools>summary::-webkit-details-marker{display:none}.backup-row-tools__panel{position:absolute;right:0;z-index:30;width:290px;margin-top:6px;padding:13px;border:1px solid var(--color-border,#dbe3ef);border-radius:12px;background:var(--color-surface,#fff);box-shadow:0 16px 40px rgba(15,23,42,.18);display:grid;gap:14px}.backup-row-tools__panel form{display:grid;gap:8px}.backup-row-tools__panel label{font-size:.76rem;font-weight:700}.backup-row-tools__panel .form-control{margin-top:4px}.backup-delete-form{border-top:1px solid var(--color-border,#dbe3ef);padding-top:12px}
.backup-practices{padding:20px}.backup-practice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.backup-practice-grid>div{padding:15px;border:1px solid var(--color-border,#dbe3ef);border-radius:12px;background:var(--color-background,#f8fafc)}.backup-practice-grid i{display:block;color:#2563eb;font-size:1.1rem;margin-bottom:8px}.backup-practice-grid strong{display:block}.backup-practice-grid p{margin:5px 0 0;color:var(--color-text-muted,#64748b);font-size:.82rem;line-height:1.45}
html[data-theme="dark"] .backup-kpi,html[data-theme="dark"] .backup-row-tools__panel{background:#1e293b;border-color:#475569}html[data-theme="dark"] .backup-kpi>strong{color:#f8fafc}html[data-theme="dark"] .backup-diagnostics>div,html[data-theme="dark"] .backup-practice-grid>div,html[data-theme="dark"] .backup-hash{background:#172033;border-color:#475569}.btn-success{background:#15803d;color:#fff;border-color:#15803d}.btn-success:hover{background:#166534;color:#fff}
@media(max-width:1280px){.backup-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.backup-assurance-grid,.backup-practice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.backup-diagnostics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.backup-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.backup-actions-grid{grid-template-columns:1fr}.backup-page-header .page-header__actions{width:100%}.backup-page-header .page-header__actions .btn{flex:1}.backup-filter{justify-content:stretch;width:100%}.backup-filter select,.backup-filter .btn{width:100%}}
@media(max-width:640px){.backup-kpis,.backup-assurance-grid,.backup-diagnostics,.backup-practice-grid{grid-template-columns:1fr}.backup-action-card>summary{grid-template-columns:42px 1fr auto;padding:15px}.backup-action-card__body{padding:15px}.backup-server-card,.backup-history,.backup-practices{padding:15px}.backup-row-tools__panel{position:fixed;left:12px;right:12px;bottom:12px;width:auto;max-height:70vh;overflow:auto}.backup-type{min-width:190px}}

/* SGPM 1.0.0 — Ambiente interno da plataforma */
.platform-environment-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:16px 0;padding:16px 18px;border:1px solid var(--color-border);border-radius:14px;background:var(--color-surface-soft)}
.platform-environment-card__identity{display:flex;align-items:center;gap:14px;min-width:0}.platform-environment-card__identity img{width:124px;max-height:56px;object-fit:contain;flex:0 0 auto}.platform-environment-card__identity h2{margin:5px 0 4px;font-size:1rem}.platform-environment-card__identity p{margin:0;color:var(--color-text-muted);font-size:.78rem;line-height:1.45}.platform-environment-card__meta{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.platform-environment-card__meta>span{padding:8px 10px;border:1px solid var(--color-border);border-radius:9px;background:var(--color-surface);font-size:.72rem;color:var(--color-text-muted)}.platform-environment-card__meta strong{color:var(--color-text)}@media(max-width:900px){.platform-environment-card{align-items:stretch;flex-direction:column}.platform-environment-card__meta{justify-content:flex-start}}@media(max-width:640px){.platform-environment-card__identity{align-items:flex-start;flex-direction:column}.platform-environment-card__identity img{width:110px}.platform-environment-card__meta{display:grid;grid-template-columns:1fr 1fr}.platform-environment-card__meta .btn{grid-column:1/-1;width:100%;justify-content:center}}

/* =========================================================
   SGPM 1.0.0 — ACESSO GLOBAL NO LOGIN (PAINEL À DIREITA)
   ========================================================= */
.auth-platform-access {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    height: 100%;
    padding: 14px;
    border: 1px solid rgba(29, 78, 216, 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(29, 78, 216, 0.05) 0%, rgba(29, 78, 216, 0.08) 100%);
}

.auth-platform-access__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.24);
}

.auth-platform-access__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.auth-platform-access__eyebrow {
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-platform-access__body strong {
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.3;
}

.auth-platform-access__body small {
    color: var(--color-text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.auth-platform-access__button {
    width: 100%;
    justify-content: center;
    min-height: 46px;
}

.auth-form__field--platform-card {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-bottom: 0;
}

.auth-form__field--icon-card {
    display: none;
}

@media (min-width: 1081px) {
    .auth-form__grid {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 270px);
        align-items: start;
    }

    .auth-form__field--full {
        grid-column: 1;
    }
}

@media (max-width: 1080px) {
    .auth-form__field--platform-card {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .auth-form__field--icon-card {
        display: none;
    }
}

@media (max-width: 640px) {
    .auth-platform-access {
        padding: 13px;
    }

    .auth-platform-access__icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .auth-platform-access__button {
        min-height: 44px;
    }
}

[data-theme="dark"] .auth-platform-access,
body.theme-dark .auth-platform-access {
    border-color: rgba(96, 165, 250, 0.28);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.14) 0%, rgba(30, 41, 59, 0.22) 100%);
}

[data-theme="dark"] .auth-platform-access__eyebrow,
body.theme-dark .auth-platform-access__eyebrow {
    color: #93c5fd;
}


/* SGPM 1.0.0 — recuperação de senha e redefinição assistida */
.auth-recovery-form { display:flex; flex-direction:column; gap:16px; margin:22px 0; }
.auth-recovery-form .btn { align-self:flex-start; }
.user-password-options { margin:18px 0; }
.user-password-option-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:16px; padding:18px; border:1px solid var(--color-border); border-radius:16px; background:var(--color-surface); }
.user-password-option-card__icon { display:flex; align-items:center; justify-content:center; width:48px; height:48px; border-radius:14px; background:rgba(29,78,216,.10); color:var(--color-primary); font-size:1.2rem; }
.user-password-option-card p { margin:4px 0; color:var(--color-text-muted); }
.user-password-option-card small { color:var(--color-text-muted); }
@media (max-width:760px){ .user-password-option-card{grid-template-columns:auto 1fr}.user-password-option-card form{grid-column:1/-1}.user-password-option-card .btn{width:100%;justify-content:center}.auth-recovery-form .btn{width:100%;justify-content:center} }
[data-theme="dark"] .user-password-option-card { background:rgba(15,23,42,.72); }
