:root {
    --color-primary: #3a5ea6;
    --color-secondary: #2996cc;
    --color-accent: #f4c542;
    --color-bg: #f0f2f5;
    --color-surface: #ffffff;
    --color-text: #2a4558;
    --color-border: #dbe2ea;
    --color-success: #35775f;
    --color-warning: #9a6a1f;
    --color-danger: #b43b42;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 22px;
    --space-6: 32px;
    --space-7: 48px;
    --bg: var(--color-bg);
    --surface: var(--color-surface);
    --surface-raised: #ffffff;
    --surface-soft: #f4f7fc;
    --surface-muted: #f8fafc;
    --surface-warning: #fff8eb;
    --surface-danger: #fff0ef;
    --surface-success: #e8f7ee;
    --surface-info: #eaf3f7;
    --text: var(--color-text);
    --text-soft: #2f4b60;
    --muted: #737b80;
    --muted-strong: #505659;
    --line: var(--color-border);
    --line-strong: #acb6bf;
    --primary: var(--color-primary);
    --primary-strong: #325497;
    --primary-soft: #e8eef9;
    --secondary: var(--color-secondary);
    --secondary-strong: #237eaa;
    --secondary-soft: #e9f4fb;
    --accent: var(--color-accent);
    --danger: var(--color-danger);
    --danger-strong: #8f1d14;
    --danger-soft: #fff0ef;
    --warning: var(--color-warning);
    --warning-strong: #6e4306;
    --warning-soft: #fff3dc;
    --success: var(--color-success);
    --success-soft: #e8f7ee;
    --info: #2563eb;
    --info-soft: #eef3f7;
    --focus: rgba(47, 126, 161, 0.24);
    --focus-ring: #2f7ea1;
    --shadow-sm: 0 6px 18px rgba(23, 33, 31, 0.06);
    --shadow: 0 14px 35px rgba(23, 33, 31, 0.08);
    --shadow-md: 0 18px 42px rgba(23, 33, 31, 0.11);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 10px;
    --shadow-card: var(--shadow);
    --border-radius: var(--radius);
    --content-width: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    font-weight: 650;
    text-decoration: none;
    touch-action: manipulation;
}

a:hover {
    color: var(--primary-strong);
    text-decoration: underline;
}

.skip-link {
    background: var(--primary);
    border-radius: 0 0 var(--radius) 0;
    color: #fff;
    font-weight: 850;
    left: 0;
    padding: 10px 14px;
    position: fixed;
    top: 0;
    transform: translateY(-120%);
    z-index: 1000;
}

.skip-link:focus {
    color: #fff;
    outline: 3px solid var(--focus-ring);
    transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

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

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 30;
}

.institutional-strip,
.topbar {
    align-items: center;
    display: flex;
    margin: 0 auto;
    max-width: var(--content-width);
    width: 100%;
}

.institutional-strip {
    background: var(--primary);
    color: #d8eef4;
    font-size: 0.78rem;
    justify-content: space-between;
    max-width: none;
    min-height: 34px;
    padding: 7px clamp(16px, 4vw, 40px);
}

.institutional-strip div {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.institutional-strip span {
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

.institutional-strip strong {
    color: #fff;
    font-weight: 850;
}

.topbar {
    gap: 18px;
    justify-content: space-between;
    min-height: 76px;
    padding: 14px clamp(16px, 4vw, 40px) 12px;
}

.brand {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    flex: 0 0 auto;
    gap: 10px;
    min-width: 0;
}

.brand-text {
    display: grid;
    gap: 2px;
    letter-spacing: 0;
}

.brand-text strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.1;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand:hover {
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    color: #fff;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.brand-logo-lockup {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 10px;
    max-width: 300px;
    min-width: 0;
}

.brand-logo {
    display: block;
    flex: 0 1 auto;
    max-width: 150px;
    width: min(150px, 34vw);
}

.brand-logo-divider {
    align-self: stretch;
    background: var(--line-strong);
    flex: 0 0 1px;
    min-height: 34px;
}

.brand-logo-label {
    color: var(--primary-strong);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.15;
    max-width: 84px;
    text-transform: uppercase;
}

.global-search {
    align-items: center;
    display: flex;
    flex: 1 1 360px;
    gap: 8px;
    max-width: 560px;
    min-width: 240px;
}

.global-search input {
    border-color: var(--line-strong);
    min-height: 38px;
}

.nav {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 auto;
    max-width: var(--content-width);
    padding: 0 clamp(16px, 4vw, 40px) 12px;
    width: 100%;
}

.nav a,
.nav summary {
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 750;
    line-height: 1.25;
    padding: 9px 12px;
}

.nav a:hover,
.nav summary:hover,
.nav a:focus-visible,
.nav summary:focus-visible {
    background: var(--surface-soft);
    color: var(--text);
    text-decoration: none;
}

.nav a[aria-current="page"],
.nav-group-active > summary,
.nav-group[open] > summary {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-item {
    align-items: center;
    display: inline-flex;
    min-height: 38px;
}

.nav-group {
    position: relative;
}

.nav-group summary {
    cursor: pointer;
    display: inline-flex;
    list-style: none;
    min-height: 38px;
    touch-action: manipulation;
    user-select: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-submenu {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: none;
    gap: 4px;
    left: 0;
    min-width: 220px;
    padding: 8px;
    position: absolute;
    top: calc(100% + 6px);
    z-index: 20;
}

.nav-submenu-wide {
    min-width: 260px;
}

.nav-group[open] .nav-submenu,
.nav-group:focus-within .nav-submenu {
    display: grid;
}

.nav-submenu a {
    color: var(--text);
    display: block;
    font-size: 0.9rem;
    padding: 10px 11px;
}

.mobile-nav {
    display: none;
}

.mobile-menu-button {
    align-items: center;
    background: var(--primary);
    border-radius: var(--radius);
    color: #fff;
    cursor: pointer;
    font-weight: 850;
    justify-content: space-between;
    min-height: 46px;
    padding: 12px 14px;
    user-select: none;
}

.mobile-nav[open] .mobile-menu-button,
.mobile-menu-button:focus-visible {
    background: var(--primary-strong);
    color: #fff;
}

.mobile-menu-button::-webkit-details-marker {
    display: none;
}

.hamburger {
    display: grid;
    gap: 4px;
    width: 22px;
}

.hamburger span {
    background: currentColor;
    border-radius: 999px;
    display: block;
    height: 2px;
}

.mobile-nav-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
}

.mobile-nav-panel a,
.mobile-nav-panel summary {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    display: flex;
    font-weight: 800;
    justify-content: space-between;
    min-height: 44px;
    padding: 11px 12px;
}

.mobile-nav-panel a:hover,
.mobile-nav-panel summary:hover,
.mobile-nav-panel a:focus-visible,
.mobile-nav-panel summary:focus-visible,
.mobile-nav-panel a[aria-current="page"] {
    background: var(--surface-soft);
    border-color: var(--line-strong);
    color: var(--primary);
    text-decoration: none;
}

.mobile-nav-panel details {
    display: grid;
    gap: 8px;
}

.mobile-nav-panel details[open] {
    gap: 8px;
}

.mobile-nav-panel details > a {
    margin-left: 12px;
}

.mobile-nav-panel summary {
    cursor: pointer;
    list-style: none;
}

.mobile-nav-panel summary::-webkit-details-marker {
    display: none;
}

.nav-notification-link {
    align-items: center;
    display: inline-flex;
    gap: 7px;
}

.nav-badge {
    background: var(--secondary);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 850;
    justify-content: center;
    line-height: 1;
    min-width: 22px;
    padding: 5px 7px;
}

.nav-badge-urgent {
    background: var(--danger);
}

.quick-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
}

.user-menu {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
}

.user-menu form {
    margin: 0;
}

.environment-pill {
    background: var(--success-soft);
    border: 1px solid #addfc2;
    border-radius: 999px;
    color: var(--success);
    font-size: 0.78rem;
    font-weight: 850;
    padding: 5px 9px;
}

.content {
    flex: 1 0 auto;
    margin: 0 auto;
    max-width: var(--content-width);
    padding: var(--space-6) clamp(16px, 4vw, 40px) var(--space-7);
    width: 100%;
}

.content:focus {
    outline: 3px solid transparent;
    outline-offset: 8px;
}

.breadcrumbs {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.86rem;
    gap: 7px;
    margin: -10px 0 22px;
}

.breadcrumbs a {
    color: var(--muted-strong);
    font-weight: 800;
}

.breadcrumbs span {
    color: var(--text);
    font-weight: 800;
}

.breadcrumbs a::after {
    color: var(--muted);
    content: "/";
    font-weight: 700;
    margin-left: 7px;
}

.page-header,
.panel-heading,
.section-title {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.page-header {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.dashboard-header {
    align-items: flex-end;
    border-left-color: var(--secondary);
}

.executive-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f5faf8 52%, #eef5f8 100%);
    border-left-color: var(--success);
}

.page-subtitle {
    color: var(--muted);
    margin: 8px 0 0;
    max-width: 760px;
}

.page-header h1,
.section-heading h1,
.danger-zone h1 {
    font-size: clamp(1.7rem, 2vw, 2.2rem);
    line-height: 1.1;
    margin: 0;
}

.panel h2,
.panel-heading h2 {
    font-size: 1.12rem;
    margin: 0 0 14px;
}

.panel-heading h2 {
    margin: 0;
}

.panel h3 {
    font-size: 1rem;
    margin: 24px 0 8px;
}

.eyebrow {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.lead {
    color: var(--secondary);
    font-size: 1.06rem;
    font-weight: 650;
}

.panel,
.metric,
.login-panel,
.card,
.stat-card,
.quick-card {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel,
.card {
    margin-bottom: 22px;
    padding: 22px;
}

.section-title {
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.section-title h2,
.section-title h3 {
    margin: 0;
}

.metrics-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.metric,
.stat-card {
    border-top: 4px solid var(--line);
    min-height: 118px;
    padding: 20px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.metric-primary {
    border-top-color: var(--primary);
}

.metric-success {
    border-top-color: var(--success);
}

.metric-danger {
    border-top-color: var(--danger);
}

.metric-warning {
    border-top-color: var(--warning);
}

.metric-secondary {
    border-top-color: var(--secondary);
}

.metric-link {
    color: var(--text);
    display: block;
}

.metric-link:hover {
    background: var(--surface-soft);
    color: var(--text);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transform: translateY(-1px);
}

.metric span {
    color: var(--muted);
    display: block;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.metric strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    overflow-wrap: anywhere;
}

.metric small {
    color: var(--muted);
    display: block;
    margin-top: 12px;
}

.metric-wide {
    grid-column: span 2;
}

.dashboard-simple-header {
    align-items: center;
}

.dashboard-simple-header .actions {
    justify-content: flex-end;
}

.dashboard-guide {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 22px;
}

.dashboard-guide a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 0.45rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(17, 53, 103, 0.055);
    color: var(--text);
    text-decoration: none;
}

.dashboard-guide a:hover {
    background: var(--surface-soft);
    text-decoration: none;
}

.dashboard-guide span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-row: span 2;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.82rem;
    font-weight: 900;
}

.dashboard-guide strong,
.dashboard-guide small {
    display: block;
    min-width: 0;
}

.dashboard-guide strong {
    font-size: 0.98rem;
}

.dashboard-guide small {
    color: var(--muted);
    font-weight: 650;
}

.dashboard-simple-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-simple-metrics .metric {
    min-height: 106px;
    padding: 16px;
}

.dashboard-simple-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.dashboard-simple-grid .panel {
    min-width: 0;
}

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

.dashboard-simple-deadlines .stack-list {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.executive-metrics .metric {
    min-height: 130px;
}

.executive-decision-panel {
    border-top: 4px solid var(--warning);
}

.chefia-hero {
    border-top: 4px solid var(--primary);
}

.chefia-summary-panel {
    border-left: 4px solid var(--primary);
}

.chefia-metrics .metric strong {
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.chefia-main-grid {
    align-items: stretch;
}

.monthly-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f7fbfb 56%, #eef6f2 100%);
    border-left-color: var(--primary);
}

.monthly-metrics .metric {
    min-height: 128px;
}

.filters-monthly {
    align-items: end;
    grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
}

.monthly-filter-actions {
    grid-template-columns: repeat(2, max-content);
}

.monthly-movement-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.monthly-risk-item {
    border-left: 5px solid var(--warning);
}

.monthly-split {
    align-items: start;
}

.usage-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbf7 55%, #edf5f7 100%);
    border-left-color: var(--secondary);
}

.usage-metrics .metric {
    min-height: 126px;
}

.filters-usage {
    align-items: end;
    grid-template-columns: repeat(2, minmax(150px, 220px)) auto;
}

.usage-note {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-left: 5px solid var(--secondary);
    border-radius: var(--radius);
    color: var(--muted-strong);
    margin: -8px 0 22px;
    padding: 12px 14px;
}

.usage-note strong {
    color: var(--text);
}

.usage-split {
    align-items: start;
}

.usage-operation-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.usage-alert-item {
    border-left: 5px solid var(--line-strong);
}

.usage-alert-danger {
    background: var(--surface-danger);
    border-color: #fac8c3;
    border-left-color: var(--danger);
}

.usage-alert-warning {
    background: var(--surface-warning);
    border-color: #f3d49b;
    border-left-color: var(--warning);
}

.usage-alert-success {
    background: var(--surface-success);
    border-color: #addfc2;
    border-left-color: var(--success);
}

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

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

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

.detail-summary {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 22px;
}

.detail-summary article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
    padding: 18px;
}

.detail-summary article > span {
    color: var(--muted);
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
}

.detail-summary strong {
    display: block;
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.definition-grid {
    display: grid;
    gap: 10px 18px;
    grid-template-columns: minmax(130px, 0.45fr) 1fr;
    margin: 0;
}

.definition-grid dt {
    color: var(--muted);
    font-weight: 700;
}

.definition-grid dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 13px 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-muted);
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

td {
    color: var(--text-soft);
}

tbody tr:hover td {
    background: #fbfdfd;
}

tr:last-child td {
    border-bottom: 0;
}

.row-muted td {
    color: var(--muted);
}

.row-deadline-vencido td,
.row-danger td {
    background: #fff7f6;
}

.row-deadline-vence-30 td,
.row-warning td,
.row-pending td {
    background: #fffaf0;
}

.row-deadline-vence-60 td,
.row-deadline-vence-90 td,
.row-attention td {
    background: #fffdf1;
}

.row-missing td {
    background: #f8fbfb;
}

.row-deadline-vencido td:first-child,
.row-danger td:first-child {
    border-left: 5px solid var(--danger);
}

.row-deadline-vence-30 td:first-child,
.row-warning td:first-child,
.row-pending td:first-child {
    border-left: 5px solid var(--warning);
}

.row-deadline-vence-60 td:first-child,
.row-deadline-vence-90 td:first-child,
.row-attention td:first-child {
    border-left: 5px solid #d8a018;
}

.row-missing td:first-child {
    border-left: 5px solid var(--secondary);
}

.row-danger.row-pending td,
.row-deadline-vencido.row-pending td {
    background: #fff7f6;
}

.row-danger.row-pending td:first-child,
.row-deadline-vencido.row-pending td:first-child {
    border-left-color: var(--danger);
}

.audit-table {
    min-width: 1160px;
}

.consulta-table {
    min-width: 1320px;
}

.mobile-card-table td[data-label]::before {
    content: none;
}

.audit-description,
.audit-value {
    max-width: 340px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.audit-meta {
    color: var(--muted);
    display: block;
    font-size: 0.86rem;
    margin-top: 3px;
}

.empty {
    color: var(--muted);
    padding: 34px 16px;
    text-align: center;
}

.empty-inline,
.empty-state {
    background: var(--surface-muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    margin: 0;
    padding: 18px;
    text-align: center;
}

.table-empty-title {
    color: var(--text);
    display: block;
    font-weight: 850;
    margin-bottom: 4px;
}

.cell-title {
    color: var(--text);
    display: block;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.cell-muted {
    color: var(--muted);
    display: block;
    font-size: 0.86rem;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.table-actions,
.actions,
.form-actions,
.action-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-actions {
    gap: 6px;
    justify-content: flex-end;
    min-width: max-content;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.table-actions a,
.table-actions button,
.inline-action {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 800;
    justify-content: center;
    min-height: 32px;
    padding: 6px 9px;
    text-decoration: none;
    white-space: nowrap;
}

.table-actions a:hover,
.table-actions button:hover,
.inline-action:hover {
    background: var(--surface-soft);
    border-color: var(--line-strong);
    color: var(--text);
    text-decoration: none;
}

.filters,
.filter-panel {
    align-items: end;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 22px;
    padding: 16px;
}

.filter-panel {
    margin-bottom: 22px;
}

.filter-help {
    color: var(--muted);
    font-size: 0.88rem;
    margin: -10px 0 12px;
}

.active-filters {
    align-items: center;
    background: var(--secondary-soft);
    border: 1px solid #d5e2ea;
    border-radius: var(--radius);
    color: var(--secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: space-between;
    margin: -8px 0 22px;
    padding: 12px 14px;
}

.active-filters span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
}

.active-filters strong {
    margin-right: auto;
}

.filters-compact {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.filters-contracts {
    align-items: end;
    grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(130px, 1fr)) auto;
}

.filters-consulta {
    align-items: end;
    grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(130px, 1fr));
}

.filters-reports {
    align-items: end;
    grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(130px, 1fr)) auto;
}

.filters-audit {
    align-items: end;
    grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1fr) minmax(160px, 0.7fr) minmax(140px, 0.5fr) auto;
}

.filters-contracts .field-search {
    grid-column: auto;
}

.filters-consulta .field-search {
    grid-column: span 2;
}

.filters-reports .field-search {
    grid-column: auto;
}

.field-search {
    grid-column: span 2;
}

.filter-actions {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, max-content);
}

.filter-actions .button-ghost {
    color: var(--muted-strong);
}

.checkbox-stack {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd7d3;
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    min-height: 44px;
    padding: 8px 10px;
}

.checkbox-control-compact {
    min-height: 28px;
}

.checkbox-control-compact span {
    font-size: 0.9rem;
    font-weight: 700;
}

.list-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.list-stats article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    padding: 16px 18px;
}

.deadline-stat-danger {
    border-left: 5px solid var(--danger) !important;
}

.deadline-stat-warning {
    border-left: 5px solid var(--warning) !important;
}

.deadline-stat-attention {
    border-left: 5px solid #d8a018 !important;
}

.deadline-stat-info {
    border-left: 5px solid var(--secondary) !important;
}

.deadline-stat-success {
    border-left: 5px solid var(--success) !important;
}

.deadline-stat-neutral {
    border-left: 5px solid var(--line) !important;
}

.list-stats span {
    color: var(--muted);
    display: block;
    font-size: 0.86rem;
    font-weight: 800;
}

.list-stats strong {
    display: block;
    font-size: 1.35rem;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.list-stats-wide {
    grid-column: span 2;
}

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

.report-link-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-nav {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-bottom: 22px;
}

.report-nav a {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    display: block;
    min-width: 0;
    padding: 12px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.report-nav a:hover {
    background: var(--surface-soft);
    text-decoration: none;
}

.report-nav a:focus-visible,
.stack-item:focus-visible,
.quick-card:focus-visible,
.stat-card:focus-visible,
.management-card:focus-visible,
.home-quick-card:focus-visible,
.home-alert-card:focus-visible,
.home-service-card:focus-visible,
.metric-link:focus-visible {
    box-shadow: 0 0 0 3px var(--focus);
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
    text-decoration: none;
}

.report-nav span,
.report-nav small {
    display: block;
    overflow-wrap: anywhere;
}

.report-nav span {
    font-weight: 850;
}

.report-nav small {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 3px;
}

.report-nav-active {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px var(--focus);
}

.report-card-selected {
    background: #f7fbfa !important;
    box-shadow: 0 0 0 2px var(--focus);
}

.report-card-link {
    color: var(--text);
    display: block;
}

.report-card-link:hover {
    color: var(--text);
    text-decoration: none;
}

.report-card-link small {
    color: var(--muted);
    display: block;
    font-size: 0.84rem;
    margin-top: 7px;
}

.report-export-link {
    display: inline-block;
    font-size: 0.88rem;
    margin-top: 12px;
}

.management-hero {
    align-items: flex-start;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbfb 100%);
    border-left-color: var(--secondary);
}

.management-hero .actions {
    justify-content: flex-end;
}

.management-context {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.88rem;
    gap: 8px;
    margin-top: 12px;
}

.management-context span {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-weight: 750;
    padding: 5px 9px;
}

.management-intro-grid,
.management-split-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    margin-bottom: 22px;
}

.management-section-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 22px;
}

.panel .management-section-grid {
    margin-bottom: 0;
}

.management-split-grid .management-section-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.management-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--secondary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    display: block;
    min-width: 0;
    padding: 16px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.management-card:hover {
    background: var(--surface-soft);
    box-shadow: var(--shadow-md);
    color: var(--text);
    text-decoration: none;
    transform: translateY(-1px);
}

.management-card span,
.management-card small {
    color: var(--muted);
    display: block;
}

.management-card span {
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.management-card strong {
    display: block;
    font-size: 1.08rem;
    margin-top: 7px;
    overflow-wrap: anywhere;
}

.management-card small {
    font-size: 0.86rem;
    margin-top: 7px;
}

.management-card-danger {
    border-left-color: var(--danger);
}

.management-card-warning {
    border-left-color: var(--warning);
}

.management-card-success {
    border-left-color: var(--success);
}

.management-card-info {
    border-left-color: var(--primary);
}

.risk-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.risk-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    padding: 15px;
}

.risk-card span,
.risk-card small {
    color: var(--muted);
    display: block;
}

.risk-card span {
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.risk-card strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.05;
    margin-top: 6px;
    overflow-wrap: anywhere;
}

.risk-card small {
    font-size: 0.86rem;
    margin-top: 6px;
}

.risk-card-danger {
    background: var(--surface-danger);
    border-color: #fac8c3;
    border-left-color: var(--danger);
}

.risk-card-warning {
    background: var(--surface-warning);
    border-color: #f3d49b;
    border-left-color: var(--warning);
}

.risk-card-success {
    background: var(--surface-success);
    border-color: #addfc2;
    border-left-color: var(--success);
}

.risk-card-info {
    background: var(--surface-info);
    border-color: #c8dce7;
    border-left-color: var(--primary);
}

.risk-level-chart {
    display: grid;
    gap: 10px;
}

.risk-level-row {
    align-items: center;
    color: var(--text);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(150px, 220px) minmax(140px, 1fr) 64px;
    text-decoration: none;
}

.risk-level-row:hover .risk-level-track,
.risk-level-row:focus-visible .risk-level-track {
    border-color: var(--primary);
}

.risk-level-label {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.risk-level-label strong,
.risk-level-label small {
    overflow-wrap: anywhere;
}

.risk-level-label small,
.risk-level-percent {
    color: var(--muted);
    font-size: 0.86rem;
}

.risk-level-track {
    background: #eef3f5;
    border: 1px solid var(--line);
    border-radius: 999px;
    min-height: 14px;
    overflow: hidden;
}

.risk-level-fill {
    display: block;
    height: 14px;
    min-width: 2px;
    width: var(--risk-width, 0%);
}

.risk-level-fill-critico {
    background: var(--danger);
}

.risk-level-fill-alto {
    background: var(--warning);
}

.risk-level-fill-medio {
    background: #d89b2b;
}

.risk-level-fill-baixo {
    background: var(--primary);
}

.risk-level-fill-regular {
    background: var(--success);
}

.calendar-filter-panel {
    border-left-color: var(--primary);
}

.calendar-period-nav {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 22px;
    padding: 12px;
    text-align: center;
}

.calendar-period-nav strong {
    color: var(--text);
    min-width: 180px;
}

.calendar-panel {
    overflow: hidden;
}

.calendar-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.calendar-legend-item {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    display: inline-flex;
    gap: 7px;
    padding: 6px 10px;
}

.calendar-dot {
    border-radius: 999px;
    display: inline-block;
    height: 12px;
    width: 12px;
}

.calendar-grid {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.calendar-weekdays,
.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
    background: var(--primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.calendar-weekdays span {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding: 9px 8px;
    text-align: center;
}

.calendar-day {
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-top: 1px solid var(--line);
    min-height: 132px;
    min-width: 0;
    padding: 8px;
}

.calendar-week .calendar-day:last-child,
.calendar-weekdays span:last-child {
    border-right: 0;
}

.calendar-day-out {
    background: var(--surface-muted);
    color: var(--muted);
}

.calendar-day-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
}

.calendar-day-header time {
    color: var(--text);
    font-weight: 850;
}

.calendar-day-header span {
    background: var(--primary-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 850;
    min-width: 22px;
    padding: 2px 6px;
    text-align: center;
}

.calendar-day-events {
    display: grid;
    gap: 5px;
}

.calendar-event {
    border: 1px solid var(--line);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius-sm);
    color: var(--text);
    display: grid;
    gap: 2px;
    line-height: 1.2;
    min-width: 0;
    padding: 6px 7px;
}

.calendar-event:hover,
.calendar-event:focus-visible {
    border-color: var(--primary);
    color: var(--text);
    text-decoration: none;
}

.calendar-event strong,
.calendar-event span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event strong {
    font-size: 0.82rem;
}

.calendar-event span {
    color: var(--muted);
    font-size: 0.74rem;
}

.calendar-event-vencido {
    background: var(--surface-danger);
    border-left-color: var(--danger);
}

.calendar-event-vence-30 {
    background: var(--surface-warning);
    border-left-color: var(--warning);
}

.calendar-event-vence-60,
.calendar-event-vence-90 {
    background: #fffdf1;
    border-left-color: #d8a018;
}

.calendar-event-vigente {
    background: var(--surface-success);
    border-left-color: var(--success);
}

.calendar-event-sem-vencimento {
    background: var(--surface-info);
    border-left-color: var(--primary);
}

.calendar-table {
    min-width: 1120px;
}

.calendar-criteria-card strong {
    font-size: 0.95rem;
    line-height: 1.35;
}

.manager-filter-panel {
    border-left-color: var(--secondary);
}

.report-toolbar {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 12px 14px;
}

.report-toolbar strong {
    color: var(--text);
}

.report-toolbar p {
    color: var(--muted);
    margin: 0;
}

.panel-subsection {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.panel-subsection h3 {
    margin: 0 0 4px;
}

.admin-sensitive {
    border-left: 5px solid var(--danger);
}

.admin-sensitive-note {
    background: var(--surface-warning);
    border: 1px solid #f3d49b;
    border-radius: var(--radius);
    color: var(--warning-strong);
    margin-bottom: 22px;
    padding: 13px 15px;
}

.empty-state-compact {
    background: var(--surface-muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    padding: 14px;
}

.management-table {
    min-width: 920px;
}

.public-notice {
    border-left: 5px solid var(--warning);
}

.public-notice h2 {
    margin-top: 0;
}

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

.operational-form {
    display: grid;
    gap: 24px;
}

.operational-form.panel,
.panel.operational-form {
    border-top: 4px solid var(--primary);
}

.form-intro {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    color: var(--text-soft);
    display: grid;
    gap: 4px;
    padding: 14px 16px;
}

.form-intro strong,
.form-intro p {
    margin: 0;
}

.form-intro p {
    color: var(--muted);
}

.form-section {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid #d5e2ea;
    border-radius: var(--radius);
    display: grid;
    gap: 16px;
    padding: 18px;
}

.form-section:last-of-type {
    border-bottom: 1px solid var(--line);
}

.form-section-header {
    display: grid;
    gap: 4px;
}

.form-section-header h2 {
    margin: 0;
}

.form-section-header p {
    color: var(--muted);
    margin: 0;
}

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

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

.span-2 {
    grid-column: 1 / -1;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field-invalid input,
.field-invalid select,
.field-invalid textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

label {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 700;
}

.required-mark {
    color: var(--danger);
    margin-left: 3px;
}

.required-chip {
    background: var(--danger-soft);
    border-radius: 999px;
    color: var(--danger);
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
    margin-left: 7px;
    padding: 4px 7px;
    vertical-align: middle;
}

.required-note {
    color: var(--muted);
    font-size: 0.88rem;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #cbd7d3;
    border-radius: var(--radius);
    color: var(--text);
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

select {
    min-width: 0;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input[type="checkbox"] {
    align-self: flex-start;
    height: 20px;
    min-height: 20px;
    width: 20px;
}

.checkbox-control {
    align-items: center;
    display: inline-flex;
    gap: 10px;
    min-height: 44px;
}

.checkbox-control span {
    color: var(--text);
    font-weight: 700;
}

.field-help {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.form-footer {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 18px;
    position: sticky;
    bottom: 0;
    z-index: 5;
}

.form-footer .button-primary {
    min-width: 170px;
}

.form-helper-card {
    background: var(--surface-muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    display: grid;
    gap: 8px;
    padding: 14px;
}

.form-helper-card p {
    color: var(--muted);
    margin: 0;
}

.attachment-form {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 18px;
    padding: 16px;
}

.attachment-form .form-actions {
    justify-content: flex-end;
    margin-top: 14px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus);
    outline: 0;
}

.button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 9px 14px;
    text-decoration: none;
    touch-action: manipulation;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.button-small {
    font-size: 0.88rem;
    min-height: 38px;
    padding: 6px 10px;
}

.button:hover {
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transform: translateY(-1px);
}

.button-primary {
    background: var(--primary);
    color: #fff;
}

.button-primary:hover {
    background: var(--primary-strong);
    color: #fff;
}

.button-secondary {
    background: var(--secondary);
    color: #fff;
}

.button-secondary:hover {
    background: var(--secondary-strong);
    color: #fff;
}

.button-ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--text);
}

.button-ghost:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.button-danger {
    background: var(--danger);
    color: #fff;
}

.button-danger:hover {
    background: var(--danger-strong);
    color: #fff;
}

.full-width {
    width: 100%;
}

.status,
.status-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    padding: 7px 10px;
    white-space: nowrap;
}

.status-badge {
    background: var(--secondary-soft);
    color: var(--primary);
}

.status-badge-success {
    background: var(--success-soft);
    color: var(--success);
}

.status-badge-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-badge-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-vigente {
    background: var(--success-soft);
    color: var(--success);
}

.status-importado {
    background: var(--success-soft);
    color: var(--success);
}

.status-aprovada,
.status-aplicada {
    background: var(--success-soft);
    color: var(--success);
}

.status-dry_run {
    background: var(--secondary-soft);
    color: var(--secondary);
}

.status-aberta,
.status-em_analise,
.status-em_andamento,
.status-aguardando,
.status-planejada,
.status-em_execucao {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-concluida {
    background: var(--success-soft);
    color: var(--success);
}

.status-descartada {
    background: #f2f4f3;
    color: #4b5a56;
}

.status-pendente {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-vencido {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-encerrado,
.status-rescindido,
.status-excluido,
.status-inativo,
.status-rejeitada,
.status-cancelada {
    background: #f2f4f3;
    color: #4b5a56;
}

.status-vence_30,
.status-vencendo,
.status-atencao_60,
.status-monitorar_90,
.status-suspenso,
.status-requer-atencao,
.status-pendente-saneamento {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-sem_vencimento,
.status-sem-informacao,
.status-outro {
    background: var(--secondary-soft);
    color: var(--secondary);
}

.priority {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    padding: 7px 10px;
    white-space: nowrap;
}

.priority-baixa {
    background: var(--secondary-soft);
    color: var(--secondary);
}

.priority-media {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.priority-alta {
    background: var(--warning-soft);
    color: var(--warning);
}

.priority-urgente {
    background: #fee8e4;
    color: var(--danger);
}

.kanban-board {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(6, minmax(180px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
}

.kanban-column {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-width: 180px;
    padding: 12px;
}

.kanban-column h3 {
    align-items: center;
    display: flex;
    font-size: 0.95rem;
    justify-content: space-between;
    margin: 0 0 10px;
}

.kanban-column h3 span {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.78rem;
    padding: 4px 8px;
}

.kanban-items {
    display: grid;
    gap: 10px;
}

.kanban-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    display: grid;
    gap: 5px;
    padding: 10px;
    text-decoration: none;
}

.kanban-card:hover {
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.kanban-card strong {
    font-size: 0.92rem;
}

.kanban-card span,
.kanban-card small {
    color: var(--muted);
    font-size: 0.82rem;
}

.help-search {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
    padding: 16px;
}

.help-search label {
    color: var(--text);
    font-weight: 800;
}

.help-search > div {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.help-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.help-card {
    align-content: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 12px;
    min-height: 220px;
    padding: 18px;
}

.help-card h2 {
    font-size: 1.05rem;
    margin: 0 0 6px;
}

.help-card p {
    color: var(--muted);
    margin: 0;
}

.help-card-icon {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary-strong);
    display: inline-flex;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.help-layout {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: 260px minmax(0, 1fr);
}

.help-sidebar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    position: sticky;
    top: 94px;
}

.help-sidebar h2 {
    font-size: 1rem;
    margin: 0 0 12px;
}

.help-sidebar nav,
.help-link-list {
    display: grid;
    gap: 8px;
}

.help-sidebar a,
.help-link-list a {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 700;
    padding: 10px 12px;
    text-decoration: none;
}

.help-sidebar a:hover,
.help-link-list a:hover,
.help-sidebar a[aria-current="page"] {
    background: var(--surface-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
    text-decoration: none;
}

.help-content {
    display: grid;
    gap: 18px;
}

.help-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
}

.filters-approvals {
    grid-template-columns: repeat(5, minmax(130px, 1fr)) minmax(240px, 1.5fr) auto;
}

.filters-approval-report {
    grid-template-columns: repeat(5, minmax(130px, 1fr)) repeat(2, minmax(150px, 1fr)) minmax(240px, 1.4fr) auto;
}

.approval-table {
    min-width: 1040px;
}

.approval-json-grid,
.approval-action-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.json-block {
    background: #0f1f1d;
    border-radius: var(--radius);
    color: #e8f7ee;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
    margin: 0;
    max-height: 430px;
    overflow: auto;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.approval-action-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    padding: 16px;
}

.governance-users-table {
    min-width: 1900px;
}

.integrity-table {
    min-width: 1320px;
}

.governance-action-form {
    display: grid;
    gap: 10px;
    min-width: 260px;
}

.governance-action-form label {
    display: grid;
    gap: 5px;
}

.governance-action-form span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.governance-action-form select,
.governance-action-form textarea {
    font-size: 0.9rem;
}

.governance-action-form textarea {
    min-height: 70px;
}

.deadline-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1;
    padding: 7px 10px;
    white-space: nowrap;
}

.deadline-badge-vencido {
    background: var(--danger-soft);
    color: var(--danger);
}

.deadline-badge-vence-30 {
    background: var(--warning-soft);
    color: var(--warning);
}

.deadline-badge-vence-60 {
    background: #fff8d7;
    color: #866006;
}

.deadline-badge-vence-90 {
    background: #fff8d7;
    color: #866006;
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.message {
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 700;
    padding: 12px 14px;
}

.message-success {
    background: var(--success-soft);
    border-color: #addfc2;
    color: var(--success);
}

.message-info {
    background: var(--secondary-soft);
    border-color: #d5e2ea;
    color: var(--secondary);
}

.message-warning {
    background: var(--warning-soft);
    border-color: #f3d49b;
    color: var(--warning-strong);
}

.message-error,
.message-danger,
.form-errors,
.field-errors {
    background: var(--danger-soft);
    color: var(--danger);
}

.form-errors,
.field-errors {
    border: 1px solid #fac8c3;
    border-radius: var(--radius);
    font-size: 0.9rem;
    padding: 10px 12px;
}

.form-errors-wide {
    margin-bottom: -6px;
}

.field-errors ul,
.form-errors ul {
    margin: 0;
    padding-left: 18px;
}

.pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding-top: 20px;
}

.pagination a,
.pagination span {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px 11px;
}

.pagination a {
    color: var(--text);
    font-weight: 800;
}

.pagination a:hover {
    background: var(--surface-soft);
    color: var(--text);
    text-decoration: none;
}

.pagination span {
    color: var(--muted);
    font-weight: 800;
}

.pagination .pagination-current {
    background: var(--primary-soft);
    border-color: #bddad5;
    color: var(--primary-strong);
}

.result-count {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

.stack-list {
    display: grid;
    gap: 10px;
}

.stack-item,
.quick-card {
    align-items: center;
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    min-width: 0;
    padding: 14px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.stack-item:hover,
.quick-card:hover {
    background: var(--surface-soft);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    text-decoration: none;
}

.stack-item-vencido,
.stack-item-danger,
.contract-row-vencido {
    background: #fff7f6;
    border-color: #f4b8b2;
    border-left: 5px solid var(--danger);
}

.stack-item-vence-30,
.contract-row-vence-30 {
    background: #fffaf0;
    border-color: #eccb91;
    border-left: 5px solid var(--warning);
}

.stack-item-vence-60,
.contract-row-vence-60 {
    background: #fffdf1;
    border-color: #ead487;
    border-left: 5px solid #d8a018;
}

.stack-item-vence-90,
.contract-row-vence-90 {
    background: #fffdf1;
    border-color: #ead487;
    border-left: 5px solid #d8a018;
}

.contract-row-vigente {
    background: #f4fbf6;
    border-color: #b8dec5;
    border-left: 5px solid var(--success);
}

.contract-row-pendente {
    box-shadow: inset 0 0 0 2px rgba(161, 92, 7, 0.18);
}

.contract-row-missing {
    box-shadow: inset 0 0 0 2px rgba(33, 71, 97, 0.12);
}

.contract-row-pending-approval {
    box-shadow: inset 0 0 0 2px rgba(161, 92, 7, 0.22);
}

.contract-row-pendente.contract-row-pending-approval,
.contract-row-missing.contract-row-pending-approval {
    box-shadow: inset 0 0 0 2px rgba(161, 92, 7, 0.22), inset 0 0 0 4px rgba(33, 71, 97, 0.08);
}

.stack-item-vencido:hover,
.contract-row-vencido:hover {
    background: #fff3f1;
    border-color: #e79a92;
}

.stack-item-vence-30:hover,
.contract-row-vence-30:hover {
    background: #fff5e2;
    border-color: #d7aa5a;
}

.stack-item-vence-60:hover,
.contract-row-vence-60:hover {
    background: #fff8dc;
    border-color: #d8b84f;
}

.stack-item-vence-90:hover,
.contract-row-vence-90:hover {
    background: #fff8dc;
    border-color: #d8b84f;
}

.contract-row-vigente:hover {
    background: #ecf8ef;
    border-color: #8ac79e;
}

.stack-item span {
    min-width: 0;
}

.stack-item strong,
.stack-item small {
    display: block;
    overflow-wrap: anywhere;
}

.stack-item small,
.stack-meta {
    color: var(--muted);
    font-size: 0.88rem;
}

.stack-meta {
    flex: 0 0 auto;
    font-weight: 800;
    text-align: right;
}

.stack-meta small {
    display: block;
    font-weight: 700;
    margin-top: 3px;
}

.status-distribution {
    display: grid;
    gap: 10px;
}

.status-pill-row {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
}

.status-pill-row:hover {
    background: var(--surface-soft);
    color: var(--text);
    text-decoration: none;
}

.status-pill-row strong {
    font-size: 1.08rem;
}

.contract-list {
    display: grid;
    gap: 12px;
}

.contract-row {
    align-items: stretch;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.25fr);
    padding: 16px;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.contract-row:hover {
    background: #ffffff;
    border-color: #bfd0cc;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.contract-main,
.contract-side {
    min-width: 0;
}

.contract-title {
    color: var(--text);
    display: inline-block;
    font-size: 1.02rem;
    font-weight: 850;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.contract-title:hover {
    color: var(--primary);
}

.contract-main p {
    color: var(--muted);
    margin: 7px 0 0;
}

.contract-note {
    color: var(--warning) !important;
    font-weight: 700;
}

.contract-kicker,
.contract-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.88rem;
    gap: 8px 14px;
    margin-bottom: 8px;
}

.contract-meta {
    margin: 10px 0 0;
}

.contract-kicker span,
.contract-meta span {
    overflow-wrap: anywhere;
}

.contract-side {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: right;
}

.contract-side strong {
    color: var(--secondary);
    overflow-wrap: anywhere;
}

.contract-side small {
    color: var(--muted);
}

.contract-list-header .actions {
    justify-content: flex-end;
}

.filter-panel-contracts {
    grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(130px, 1fr));
}

.filter-panel-contracts .field-search {
    grid-column: span 2;
}

.contract-filter-actions {
    align-self: stretch;
    grid-column: span 2;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.contract-summary-grid {
    grid-template-columns: minmax(130px, 0.8fr) minmax(220px, 1.4fr) repeat(4, minmax(130px, 0.8fr));
}

.contracts-panel {
    overflow: hidden;
}

.contracts-table {
    min-width: 1280px;
}

.contracts-table th:last-child,
.contracts-table td:last-child {
    text-align: right;
}

.contracts-table td {
    font-size: 0.92rem;
}

.contracts-table .status,
.contracts-table .deadline-badge {
    margin-top: 6px;
}

.contract-object-cell {
    max-width: 360px;
}

.cell-title {
    color: var(--text);
    display: inline-block;
    font-weight: 850;
    text-decoration: none;
}

.cell-title:hover {
    color: var(--primary);
}

.table-note {
    color: var(--muted);
    display: block;
    font-size: 0.82rem;
    line-height: 1.35;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.table-note-warning {
    color: var(--warning);
    font-weight: 800;
}

.money-cell {
    color: var(--secondary);
    font-weight: 850;
    white-space: nowrap;
}

.responsible-line {
    display: block;
    overflow-wrap: anywhere;
}

.responsible-line + .responsible-line {
    margin-top: 6px;
}

.table-actions-column {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 86px;
}

.table-actions-column a {
    width: 100%;
}

.row-pending-approval td {
    box-shadow: inset 0 0 0 9999px rgba(161, 92, 7, 0.04);
}

.contract-mobile-list {
    display: none;
}

.contract-mobile-card {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 12px;
    padding: 14px;
}

.contract-mobile-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.contract-mobile-head strong,
.contract-number {
    display: block;
}

.contract-number {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
}

.contract-mobile-facts {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding-top: 12px;
}

.contract-mobile-facts div {
    min-width: 0;
}

.contract-mobile-facts dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.contract-mobile-facts dd {
    color: var(--text-soft);
    margin: 0;
    overflow-wrap: anywhere;
}

.contract-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contract-detail-hero {
    align-items: flex-start;
    border-left-color: var(--secondary);
}

.contract-detail-title {
    min-width: 0;
}

.contract-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.contract-detail-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    min-width: min(420px, 100%);
}

.contract-detail-actions .button {
    width: 100%;
}

.contract-overview-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 18px;
}

.overview-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    padding: 16px;
}

.overview-card span {
    color: var(--muted);
    display: block;
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
}

.overview-card strong {
    display: block;
    margin-top: 7px;
    overflow-wrap: anywhere;
}

.overview-card-money {
    border-top: 4px solid var(--secondary);
}

.detail-section-nav {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    padding: 10px;
}

.detail-section-nav a {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 850;
    padding: 8px 10px;
    text-decoration: none;
}

.detail-section-nav a:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.detail-grid-main {
    margin-bottom: 22px;
}

.detail-section {
    scroll-margin-top: 140px;
}

.detail-section-wide {
    grid-column: span 2;
}

.detail-section .section-title {
    align-items: flex-start;
    margin-bottom: 16px;
}

.detail-text {
    color: var(--text-soft);
    line-height: 1.65;
    margin: 0;
}

.executive-summary-panel {
    border-top: 4px solid var(--primary);
}

.executive-summary-text {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 16px;
}

.executive-summary-grid {
    margin-bottom: 16px;
}

.executive-summary-columns {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.executive-summary-columns h3 {
    font-size: 0.94rem;
    margin: 0 0 8px;
}

.compact-list {
    margin: 0;
    padding-left: 18px;
}

.compact-list li + li {
    margin-top: 5px;
}

.detail-note {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-top: 16px;
    padding: 14px;
}

.detail-note p {
    margin: 6px 0 0;
}

.detail-notice {
    margin: 0;
}

.data-state,
.missing-data {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1;
    padding: 7px 10px;
    white-space: nowrap;
}

.data-state-empty,
.missing-data {
    background: var(--surface-muted);
    color: var(--muted-strong);
}

.data-state-missing {
    background: var(--secondary-soft);
    color: var(--secondary);
}

.data-state-saneamento {
    background: var(--warning-soft);
    color: var(--warning);
}

.data-state-attention {
    background: var(--danger-soft);
    color: var(--danger);
}

.missing-data-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.missing-data-list span,
.missing-data-list strong {
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 850;
    padding: 7px 10px;
}

.missing-data-list span {
    background: var(--surface-muted);
    color: var(--muted);
}

.missing-data-list strong {
    background: var(--warning-soft);
    color: var(--warning);
}

.compact-empty {
    text-align: left;
}

.compact-empty p {
    margin: 6px 0 0;
}

.detail-attachment-form {
    margin-top: 16px;
}

.attachment-list {
    display: grid;
    gap: 12px;
}

.attachment-card {
    align-items: flex-start;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
    padding: 14px;
}

.attachment-card-muted {
    opacity: 0.72;
}

.attachment-main {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.attachment-icon {
    align-items: center;
    background: var(--secondary-soft);
    border: 1px solid #c7dde1;
    border-radius: var(--radius-sm);
    color: var(--secondary);
    display: inline-flex;
    flex: 0 0 44px;
    font-size: 0.78rem;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    text-transform: uppercase;
}

.attachment-title {
    color: var(--text);
    display: inline-block;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.attachment-title:hover {
    color: var(--primary);
}

.attachment-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.84rem;
    gap: 6px 12px;
    margin-top: 5px;
}

.attachment-main p {
    color: var(--text-soft);
    margin: 8px 0 0;
}

.attachment-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.timeline-list {
    display: grid;
    gap: 0;
}

.timeline-item {
    display: grid;
    gap: 12px;
    grid-template-columns: 18px minmax(0, 1fr);
    padding: 0 0 18px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    background: var(--line);
    content: "";
    left: 8px;
    position: absolute;
    top: 18px;
    bottom: 0;
    width: 2px;
}

.timeline-marker {
    background: var(--secondary);
    border: 3px solid var(--secondary-soft);
    border-radius: 999px;
    height: 18px;
    margin-top: 2px;
    width: 18px;
    z-index: 1;
}

.contract-timeline-list {
    gap: 0;
}

.contract-timeline-item {
    grid-template-columns: 22px minmax(0, 1fr);
    padding-bottom: 20px;
}

.contract-timeline-item:not(:last-child)::before {
    left: 10px;
}

.contract-timeline-item .timeline-marker {
    height: 22px;
    width: 22px;
}

.timeline-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--secondary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    padding: 14px;
}

.timeline-event-danger .timeline-marker,
.timeline-event-danger .timeline-card {
    border-left-color: var(--danger);
}

.timeline-event-danger .timeline-marker {
    background: var(--danger);
}

.timeline-event-warning .timeline-marker,
.timeline-event-warning .timeline-card {
    border-left-color: var(--warning);
}

.timeline-event-warning .timeline-marker {
    background: var(--warning);
}

.timeline-event-success .timeline-marker,
.timeline-event-success .timeline-card {
    border-left-color: var(--success);
}

.timeline-event-success .timeline-marker {
    background: var(--success);
}

.timeline-event-info .timeline-marker,
.timeline-event-info .timeline-card {
    border-left-color: var(--primary);
}

.timeline-event-info .timeline-marker {
    background: var(--primary);
}

.timeline-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
}

.timeline-head span,
.timeline-item small {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 750;
}

.timeline-head strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.timeline-head time {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.timeline-item p {
    color: var(--text-soft);
    margin: 6px 0;
}

.timeline-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.84rem;
    font-weight: 750;
    gap: 8px 14px;
    margin-top: 8px;
}

.timeline-detail-grid {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: grid;
    gap: 0;
    grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr);
    margin: 12px 0 0;
    overflow: hidden;
}

.timeline-detail-grid dt,
.timeline-detail-grid dd {
    border-bottom: 1px solid var(--line);
    margin: 0;
    min-width: 0;
    padding: 8px 10px;
}

.timeline-detail-grid dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.timeline-detail-grid dd {
    overflow-wrap: anywhere;
}

.timeline-detail-grid dt:last-of-type,
.timeline-detail-grid dd:last-of-type {
    border-bottom: 0;
}

.timeline-actions {
    margin-top: 12px;
}

.timeline-filter-panel {
    border-left-color: var(--primary);
}

.task-list {
    display: grid;
    gap: 12px;
}

.task-item {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-left: 5px solid var(--secondary);
    border-radius: var(--radius);
    padding: 14px;
}

.task-item p {
    color: var(--muted);
    margin: 6px 0 0;
}

.task-item-warning {
    background: var(--surface-warning);
    border-color: #f3d49b;
    border-left-color: var(--warning);
}

.task-item-danger {
    background: var(--surface-danger);
    border-color: #fac8c3;
    border-left-color: var(--danger);
}

.task-item-info {
    background: var(--surface-info);
    border-color: #c8dce7;
}

.panel-subtitle {
    color: var(--muted);
    margin: 6px 0 0;
}

.deadline-section .panel-heading {
    align-items: flex-start;
}

.notice,
.alert-box {
    border: 1px solid var(--line);
    border-left-width: 5px;
    border-radius: var(--radius);
    margin-top: 18px;
    padding: 14px 16px;
}

.notice p,
.alert-box p {
    margin: 6px 0 0;
}

.notice-warning {
    background: var(--surface-warning);
    border-color: #f3d49b;
    color: var(--warning-strong);
}

.notice-danger {
    background: var(--surface-danger);
    border-color: #fac8c3;
    color: var(--danger);
}

.notice-success {
    background: var(--surface-success);
    border-color: #addfc2;
    color: var(--success);
}

.notice-info,
.alert-box-info {
    background: var(--surface-info);
    border-color: #c8dce7;
    color: var(--primary);
}

.alert-box-warning {
    background: var(--surface-warning);
    border-color: #f3d49b;
    color: var(--warning-strong);
}

.alert-box-danger {
    background: var(--surface-danger);
    border-color: #fac8c3;
    color: var(--danger);
}

.health-notices {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
}

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

.system-overview {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.system-overview h2 {
    margin-top: 12px;
}

.system-overview p {
    color: var(--muted);
    margin: 6px 0 0;
}

.system-table {
    min-width: 560px;
}

.status-online {
    background: var(--success-soft);
    color: var(--success);
}

.status-informacao {
    background: var(--secondary-soft);
    color: var(--secondary);
}

.status-baixa,
.status-media {
    background: var(--secondary-soft);
    color: var(--secondary);
}

.status-alta {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-atencao {
    background: var(--warning-soft);
    color: var(--warning);
}

.context-help-box {
    margin: -8px 0 22px;
}

.context-help-details {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.context-help-trigger {
    cursor: pointer;
    display: inline-flex;
    font-weight: 850;
    list-style: none;
    margin: 14px 16px;
    width: fit-content;
}

.context-help-trigger::-webkit-details-marker {
    display: none;
}

.context-help-trigger::before {
    align-items: center;
    background: var(--primary-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary);
    content: "?";
    display: inline-flex;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    margin-right: 8px;
    width: 22px;
}

.context-help-details[open] .context-help-trigger {
    margin-bottom: 0;
}

.context-help-content {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 18px;
    padding: 18px;
}

.context-help-heading {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.context-help-heading h2 {
    font-size: 1.12rem;
    line-height: 1.2;
    margin: 0;
}

.context-help-grid,
.context-help-faq-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.context-help-grid article,
.context-help-faq-grid article {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
}

.context-help-box h3 {
    font-size: 0.95rem;
    margin: 0 0 8px;
}

.context-help-box p,
.context-help-box ul {
    color: var(--muted-strong);
    margin: 0;
}

.context-help-box ul {
    padding-left: 19px;
}

.context-help-box li + li {
    margin-top: 6px;
}

.context-help-profile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-top: 12px;
    padding: 12px;
}

.context-help-profile strong,
.context-help-faq-grid strong {
    color: var(--text);
    display: block;
    margin-bottom: 5px;
}

.context-help-faq {
    display: grid;
    gap: 10px;
}

.status-urgente {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-critico {
    background: #b42318;
    color: #fff;
}

.status-alto {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-medio {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-baixo {
    background: var(--secondary-soft);
    color: var(--secondary);
}

.status-regular {
    background: var(--success-soft);
    color: var(--success);
}

.status-erro {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-nao_verificado {
    background: var(--warning-soft);
    color: var(--warning);
}

.docs-block {
    margin: 0;
    white-space: pre-wrap;
}

.login-wrap {
    display: grid;
    min-height: calc(100vh - 150px);
    place-items: center;
}

.login-panel {
    max-width: 430px;
    padding: 30px;
    width: 100%;
}

.login-page {
    --login-brand: #3a5ea6;
    --login-brand-strong: #325497;
    --login-brand-dark: #113567;
    --login-brand-soft: #e8eef9;
    --login-muted: #737b80;
    --login-surface: #f0f2f5;
    --login-line: #dbe2ea;
    --login-line-strong: #acb6bf;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(115deg, rgba(17, 53, 103, 0.05) 0 1px, transparent 1px 120px),
        linear-gradient(180deg, #ffffff 0, var(--login-surface) 48%, #e6ebf3 100%);
    color: #2a4558;
    font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.login-shell {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 28rem);
    align-content: center;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: clamp(1rem, 3vw, 2rem);
}

.login-shell::before {
    position: absolute;
    inset: -0.35rem -0.35rem auto;
    z-index: -1;
    height: calc(44% + 0.7rem);
    min-height: 20.7rem;
    content: "";
    background: url("../img/iguape-login-bg.4e5f67560836.jpg") center 58% / cover no-repeat;
    box-shadow: inset 0 -4.5rem 5rem rgba(240, 242, 245, 0.74);
    filter: blur(2.4px) saturate(0.92) contrast(0.96);
    opacity: 0.96;
    transform: scale(1.018);
    transform-origin: top center;
}

.login-shell::after {
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    height: 58%;
    content: "";
    background: linear-gradient(180deg, rgba(240, 242, 245, 0), var(--login-surface) 34%, #e6ebf3 100%);
}

.login-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-self: center;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 28rem;
    padding: clamp(1.45rem, 3vw, 2.1rem);
    border: 1px solid #d7dfeb;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 22px 60px rgba(17, 53, 103, 0.14);
    backdrop-filter: blur(8px);
}

.login-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 0.3rem;
    content: "";
    background: var(--login-brand);
}

.login-card-brand {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.login-logo-lockup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    padding: 0.45rem 0.65rem;
    color: var(--login-brand-strong);
}

.login-brand-logo {
    max-width: none;
    width: 11.75rem;
    filter:
        drop-shadow(0 0 1px #fff)
        drop-shadow(0 1px 0 #fff)
        drop-shadow(0 -1px 0 #fff)
        drop-shadow(1px 0 0 #fff)
        drop-shadow(-1px 0 0 #fff);
}

.login-logo-divider {
    align-self: stretch;
    flex: 0 0 1px;
    min-height: 2.35rem;
    background: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 0 1px rgba(17, 53, 103, 0.35));
}

.login-logo-label {
    color: var(--login-brand-strong);
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.15;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 1px 2px rgba(17, 53, 103, 0.18);
    text-transform: uppercase;
    white-space: nowrap;
}

.login-card-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.3rem;
}

.login-card-header > div {
    min-width: 0;
}

.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-basis: 2.875rem;
    width: 2.875rem;
    height: 2.875rem;
    border-radius: 0.5rem;
    background: var(--login-brand-soft);
    color: var(--login-brand-strong);
    font-size: 1.2rem;
}

.login-card h1 {
    margin: 0;
    color: #2a4558;
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1.2;
}

.login-card-header p {
    margin: 0.15rem 0 0;
    color: var(--login-muted);
    font-size: 0.92rem;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
    border-color: rgba(180, 59, 66, 0.24);
    background: #fff0f1;
    color: #7e252b;
    font-size: 0.92rem;
}

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

.login-form .form-label {
    margin-bottom: 0.4rem;
    color: #2a4558;
    font-size: 0.86rem;
    font-weight: 750;
}

.login-input-group .input-group-text {
    width: 3rem;
    justify-content: center;
    border-color: var(--login-line-strong);
    background: #f8fafc;
    color: var(--login-muted);
}

.login-input-group .form-control {
    min-height: 3rem;
}

.login-input-group:focus-within .input-group-text {
    border-color: var(--login-brand);
    color: var(--login-brand);
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 3rem;
    margin-top: 0.15rem;
    border-color: var(--login-brand);
    border-radius: 0.5rem;
    background: var(--login-brand);
    box-shadow: 0 10px 22px rgba(58, 94, 166, 0.2);
    font-weight: 650;
}

.login-submit:hover,
.login-submit:focus-visible {
    border-color: var(--login-brand-strong);
    background: var(--login-brand-strong);
}

.login-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 1rem;
}

.login-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
    min-height: 2rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--login-line);
    border-radius: 999px;
    background: #f8fafc;
    color: #505659;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.login-footnote {
    margin: 1.05rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--login-line);
    color: var(--login-muted);
    font-size: 0.82rem;
    line-height: 1.35;
    text-align: center;
}

.login-footnote span {
    display: block;
}

.error-page {
    display: grid;
    min-height: calc(100vh - 150px);
    place-items: center;
}

.error-panel {
    max-width: 680px;
    width: 100%;
}

.error-code {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.danger-zone {
    border-color: #fac8c3;
    border-left: 5px solid var(--danger);
    max-width: 680px;
}

.code-block {
    background: #17211f;
    border-radius: var(--radius);
    color: #eef5f3;
    overflow-x: auto;
    padding: 16px;
}

.notification-filters {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 22px;
}

.notification-filters a {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    min-width: 0;
    padding: 13px 14px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.notification-filters a:hover {
    background: var(--surface-soft);
    text-decoration: none;
}

.notification-filters a[aria-current="page"] {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--focus);
}

.notification-filters span,
.notification-filters strong {
    display: block;
    overflow-wrap: anywhere;
}

.notification-filters span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.notification-list,
.notification-compact-list {
    display: grid;
    gap: 12px;
}

.notification-item {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-left: 5px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px;
}

.notification-item h3 {
    margin: 8px 0 6px;
}

.notification-item p {
    color: var(--text-soft);
    margin: 0;
    overflow-wrap: anywhere;
}

.notification-informacao {
    border-left-color: var(--secondary);
}

.notification-atencao {
    border-left-color: var(--warning);
}

.notification-urgente,
.notification-critico {
    border-left-color: var(--danger);
}

.notification-read {
    opacity: 0.72;
}

.notification-meta {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.86rem;
    gap: 8px 12px;
}

.notification-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-actions form {
    margin: 0;
}

.notification-compact {
    border-left-width: 5px;
    border-left-style: solid;
}

.mobile-stack {
    display: grid;
    gap: var(--space-3);
}

.site-footer {
    background: var(--primary);
    color: #d8eef4;
    flex-shrink: 0;
    margin-top: auto;
}

.site-footer-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: 1.2fr 1fr 1fr;
    margin: 0 auto;
    max-width: var(--content-width);
    padding: 30px clamp(16px, 4vw, 40px);
}

.site-footer h2 {
    color: #fff;
    font-size: 0.95rem;
    margin: 0 0 10px;
}

.site-footer p {
    margin: 0 0 8px;
}

.site-footer nav {
    display: grid;
    gap: 8px;
}

.site-footer a {
    color: #fff;
    font-weight: 800;
}

.site-footer a:hover {
    color: #fff;
}

.home-hero {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(18, 59, 82, 0.96), rgba(15, 118, 110, 0.9)),
        var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: #fff;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 28px;
    padding: clamp(24px, 4vw, 42px);
}

.home-hero .eyebrow,
.home-hero p,
.home-hero h1 {
    color: #fff;
}

.home-hero h1 {
    font-size: clamp(2rem, 3vw, 3.1rem);
    line-height: 1.05;
    margin: 0;
}

.home-hero p {
    font-size: 1.04rem;
    margin: 12px 0 0;
    max-width: 720px;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.home-hero-actions .button-primary {
    background: #fff;
    color: var(--primary);
}

.home-hero-actions .button-primary:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.home-hero-actions .button-secondary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.home-hero-actions .button-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.home-section {
    margin-bottom: 28px;
}

.home-quick-grid,
.home-stat-grid,
.home-alert-grid,
.home-activity-grid,
.home-services-grid {
    display: grid;
    gap: 16px;
}

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

.home-quick-card {
    align-items: flex-start;
    min-height: 118px;
}

.home-quick-card strong,
.home-quick-card span,
.home-service-card strong,
.home-service-card span {
    display: block;
}

.home-quick-card strong,
.home-service-card strong {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 6px;
}

.home-quick-card span,
.home-service-card span {
    color: var(--muted);
    font-weight: 650;
}

.home-stat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.home-stat-grid .stat-card {
    color: var(--text);
    min-height: 132px;
}

.home-stat-grid .stat-card:hover {
    text-decoration: none;
}

.home-stat-grid .stat-card span,
.home-stat-grid .stat-card small {
    color: var(--muted);
    display: block;
    font-weight: 750;
}

.home-stat-grid .stat-card strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1.05;
    margin: 10px 0;
    overflow-wrap: anywhere;
}

.home-stat-wide {
    grid-column: span 2;
}

.home-alert-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-alert-card {
    display: grid;
    gap: 6px;
    margin-top: 0;
    min-height: 116px;
    text-decoration: none;
}

.home-alert-card strong,
.home-alert-card span {
    display: block;
}

.home-alert-card:hover {
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
}

.home-activity-grid {
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-activity-card {
    margin-bottom: 0;
}

.home-activity-card h3 {
    font-size: 1rem;
    margin: 0 0 14px;
}

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

.home-service-card {
    color: var(--text);
    min-height: 124px;
    text-decoration: none;
}

.home-service-card:hover {
    background: var(--surface-soft);
    color: var(--text);
    text-decoration: none;
}

/* Portal municipal / transparência */
.site-header {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
}

.institutional-strip {
    background: linear-gradient(90deg, #0b3a5b 0%, #0f6b63 58%, #2f7b43 100%);
}

.brand-mark {
    background: linear-gradient(135deg, #0b3a5b 0%, #0f766e 60%, #2f7b43 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.brand-text strong {
    max-width: 360px;
}

.nav {
    border-top: 1px solid rgba(217, 226, 223, 0.7);
}

.nav a[aria-current="page"],
.nav-group-active > summary,
.nav-group[open] > summary {
    box-shadow: inset 0 -2px 0 var(--secondary);
}

.transparency-hero,
.home-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(241, 249, 247, 0.96) 52%, rgba(232, 243, 248, 0.96) 100%);
    border-left-color: var(--secondary);
}

.transparency-hero {
    align-items: flex-start;
}

.portal-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.portal-context span {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 0.84rem;
    font-weight: 800;
    padding: 6px 10px;
}

.transparency-summary {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.transparency-summary .list-stats-wide {
    grid-column: span 2;
}

.transparency-filter-card {
    border-left: 5px solid var(--secondary);
}

.transparency-filters {
    border: 0;
    box-shadow: none;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    margin-bottom: 0;
    padding: 0;
}

.transparency-filters .field-search {
    grid-column: span 2;
}

.transparency-filter-actions {
    align-self: end;
    grid-column: span 2;
}

.transparency-results-panel {
    border-left: 5px solid var(--primary);
}

.transparency-table {
    min-width: 1900px;
}

.transparency-table th {
    background: #eef6f4;
    color: #183a34;
}

.transparency-table td {
    font-size: 0.92rem;
}

.transparency-table td:nth-child(5) {
    min-width: 280px;
}

.transparency-detail-grid {
    align-items: start;
}

.transparency-detail-summary article {
    border-top: 4px solid var(--secondary);
}

.detail-section-nav {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    padding: 10px;
}

.detail-section-nav a {
    border-radius: var(--radius-sm);
    color: var(--muted-strong);
    font-size: 0.9rem;
    font-weight: 800;
    padding: 8px 10px;
}

.detail-section-nav a:hover,
.detail-section-nav a:focus-visible {
    background: var(--surface-soft);
    color: var(--primary);
    text-decoration: none;
}

.status-info {
    background: var(--surface-info);
    color: var(--primary);
}

/* Consulta técnica inspirada em portal público de contratos */
.consulta-page {
    display: grid;
    gap: 18px;
}

.consulta-header {
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 20px;
}

.consulta-header h1 {
    font-size: clamp(1.55rem, 2.2vw, 2.15rem);
    letter-spacing: 0;
    margin: 0;
}

.consulta-header .page-subtitle {
    margin-bottom: 0;
    max-width: 900px;
}

.consulta-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.filtros-panel,
.consulta-results,
.consulta-page .detail-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.filtros-panel {
    padding: 16px;
}

.filtros-panel-heading {
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
}

.filtros-panel-heading h2,
.consulta-results-heading h2,
.consulta-page .detail-section h2 {
    font-size: 1.05rem;
    margin: 0;
}

.filtros-panel-heading p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 4px 0 0;
}

.filtros-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(135px, 1fr));
}

.filtro-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.filtro-field-wide {
    grid-column: span 2;
}

.filtro-field-radio {
    border: 1px solid #cbd7d3;
    border-radius: var(--radius);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0;
    min-height: 44px;
    padding: 8px 10px;
}

.filtro-field-radio legend {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0 4px;
}

.radio-control {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    gap: 6px;
}

.radio-control input {
    min-height: auto;
    width: auto;
}

.consulta-actions {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-column: span 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.results-toolbar {
    align-items: center;
    background: #f8fbfb;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
}

.results-toolbar > div:first-child {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.results-toolbar strong {
    color: var(--primary);
    font-size: 1.2rem;
}

.results-actions,
.rows-select {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rows-select label {
    color: var(--muted-strong);
}

.rows-select select {
    min-height: 38px;
    padding: 7px 28px 7px 9px;
    width: auto;
}

.active-filters {
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--secondary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(170px, auto) minmax(0, 1fr) auto;
    padding: 12px 14px;
}

.active-filters > div {
    display: grid;
    gap: 2px;
}

.active-filters > div strong {
    color: var(--text);
    font-size: 0.95rem;
}

.active-filters > div span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 750;
}

.active-filters ul {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.active-filters li {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: inline-flex;
    gap: 6px;
    max-width: 100%;
    min-height: 32px;
    padding: 5px 8px;
}

.active-filters li span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
    white-space: nowrap;
}

.active-filters li strong {
    color: var(--text);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.consulta-results {
    padding: 0;
}

.consulta-results-heading {
    padding: 16px 16px 0;
}

.consulta-table-wrap {
    border: 0;
    margin: 0;
}

.contracts-table-sigecon {
    border-collapse: collapse;
    min-width: 1840px;
}

.contracts-table-sigecon th {
    background: #edf2f5;
    border-bottom: 1px solid #cfd8de;
    color: #17211f;
    font-size: 0.76rem;
    padding: 9px 8px;
}

.contracts-table-sigecon td {
    font-size: 0.88rem;
    overflow-wrap: anywhere;
    padding: 9px 8px;
    vertical-align: top;
}

.contracts-table-sigecon .object-cell {
    min-width: 320px;
    max-width: 460px;
}

.contract-card-mobile {
    scroll-margin-top: 90px;
}

.object-more {
    margin-top: 6px;
}

.object-more summary {
    color: var(--primary);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 800;
}

.object-more p {
    margin: 6px 0 0;
}

.download-cell {
    min-width: 160px;
}

.download-button {
    align-items: center;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    color: #fff;
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 850;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.download-button:hover {
    background: var(--primary-strong);
    color: #fff;
    text-decoration: none;
}

.badge-vigente {
    background: var(--success-soft);
    color: var(--success);
}

.badge-nao-vigente {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-pendente {
    background: var(--warning-soft);
    color: var(--warning-strong);
}

.detail-consulta-header {
    border-left-color: var(--secondary);
}

.detail-keyline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.detail-keyline span {
    background: #f8fbfb;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted-strong);
    font-size: 0.84rem;
    font-weight: 750;
    padding: 6px 8px;
}

.consulta-section-nav {
    margin-bottom: 0;
}

.consulta-detail-grid {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.consulta-page .detail-section {
    padding: 16px;
}

.consulta-page .detail-section-wide {
    grid-column: 1 / -1;
}

.consulta-page .detail-section-title {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.consulta-page .detail-section-title span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.consulta-page .detail-section > h2 {
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.consulta-page .detail-section .lead {
    color: var(--text);
    font-weight: 800;
}

.home-timeline-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-timeline-grid .empty-inline {
    grid-column: 1 / -1;
}

.home-timeline-grid small {
    color: var(--muted);
    display: block;
    font-weight: 700;
    margin-top: 8px;
}

.home-deadline-vencido {
    border-left: 5px solid var(--danger);
}

.home-deadline-vence-30,
.home-deadline-vence-60,
.home-deadline-vence-90 {
    border-left: 5px solid var(--warning);
}

@media (max-width: 980px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav,
    .quick-actions,
    .user-menu,
    .global-search,
    .mobile-nav {
        width: 100%;
    }

    .nav {
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .nav-submenu {
        min-width: 200px;
    }

    .user-menu {
        justify-content: space-between;
    }

    .quick-actions {
        justify-content: flex-start;
    }

    .global-search {
        max-width: none;
    }

    .site-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .home-hero,
    .home-activity-grid {
        grid-template-columns: 1fr;
    }

    .home-hero-actions {
        justify-content: flex-start;
    }

    .home-quick-grid,
    .home-services-grid,
    .home-timeline-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .executive-summary-columns {
        grid-template-columns: 1fr;
    }

    .attachment-card {
        grid-template-columns: 1fr;
    }

    .attachment-actions {
        align-items: flex-start;
    }

    .metrics-grid,
    .approval-action-grid,
    .approval-json-grid,
    .detail-grid,
    .dashboard-grid,
    .help-grid,
    .management-intro-grid,
    .management-section-grid,
    .management-split-grid,
    .risk-grid,
    .system-grid,
    .system-overview,
    .notification-filters,
    .report-nav,
    .report-link-grid,
	    .detail-summary,
	    .filters,
	    .filter-panel,
	    .form-grid-compact,
	    .list-stats {
	        grid-template-columns: repeat(2, minmax(0, 1fr));
	    }

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

    .transparency-filter-actions,
    .transparency-summary .list-stats-wide {
        grid-column: span 2;
    }

    .metric-wide {
        grid-column: span 2;
    }

    .field-search {
        grid-column: span 2;
    }

	    .filters-contracts .field-search {
	        grid-column: span 2;
	    }

	    .filter-panel-contracts .field-search,
	    .contract-filter-actions {
	        grid-column: span 2;
	    }

    .filters-consulta .field-search {
        grid-column: span 2;
    }

    .calendar-day {
        min-height: 112px;
        padding: 7px;
    }

    .calendar-event strong {
        font-size: 0.78rem;
    }

    .filters-reports .field-search {
        grid-column: span 2;
    }

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

    .help-layout {
        grid-template-columns: 1fr;
    }

    .help-sidebar {
        position: static;
    }
}

@media (max-width: 680px) {
    .site-header {
        position: static;
    }

    .institutional-strip {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .content {
        padding: 18px 12px 42px;
    }

    .calendar-period-nav {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .calendar-period-nav strong {
        min-width: 0;
    }

    .calendar-weekdays {
        display: none;
    }

    .calendar-grid {
        border: 0;
        display: grid;
        gap: 10px;
        overflow: visible;
    }

    .calendar-week {
        display: grid;
        gap: 10px;
        grid-template-columns: 1fr;
    }

    .calendar-day {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        min-height: 0;
    }

    .calendar-day-out {
        display: none;
    }

    .calendar-event strong,
    .calendar-event span {
        white-space: normal;
    }

    .topbar {
        gap: 10px;
        padding: 12px;
        position: static;
    }

    .brand {
        min-width: 0;
    }

    .brand-text {
        white-space: normal;
    }

    .brand-text small {
        display: none;
    }

    .global-search {
        display: grid;
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
        padding: 0 12px 12px;
    }

    .mobile-menu-button {
        display: flex;
    }

    .mobile-nav-panel details > a {
        margin-left: 0;
    }

    .nav {
        align-items: stretch;
        display: grid;
        gap: 8px;
        grid-template-columns: 1fr;
        overflow-x: visible;
        width: 100%;
    }

    .nav.desktop-nav {
        display: none;
    }

    .nav a,
    .nav summary {
        min-height: 46px;
        padding: 12px 14px;
        justify-content: space-between;
        text-align: left;
        width: 100%;
    }

    .nav-group {
        min-width: 0;
    }

    .nav-group summary::after {
        color: var(--muted);
        content: "Abrir";
        font-size: 0.78rem;
        font-weight: 800;
    }

    .nav-group[open] summary::after {
        content: "Fechar";
    }

    .nav-submenu {
        box-shadow: none;
        grid-column: 1 / -1;
        left: auto;
        margin-top: 6px;
        min-width: 0;
        position: static;
        width: 100%;
    }

    .nav-submenu a {
        justify-content: flex-start;
        min-height: 44px;
        text-align: left;
    }

    .quick-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .site-footer-grid {
        grid-template-columns: 1fr;
        padding: 24px 12px;
    }

    .home-hero {
        border-radius: var(--radius);
        margin-bottom: 22px;
        padding: 22px 18px;
    }

    .home-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .home-quick-grid,
    .home-stat-grid,
    .home-alert-grid,
    .home-activity-grid,
    .home-services-grid,
    .home-timeline-grid {
        grid-template-columns: 1fr;
    }

    .home-stat-wide {
        grid-column: auto;
    }

    .contract-overview-grid,
    .contract-detail-actions {
        grid-template-columns: 1fr;
    }

    .detail-section-wide {
        grid-column: auto;
    }

    .detail-section-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .detail-section-nav a {
        white-space: nowrap;
    }

    .attachment-main,
    .attachment-actions,
    .timeline-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .contract-timeline-item {
        gap: 9px;
        grid-template-columns: 18px minmax(0, 1fr);
    }

    .contract-timeline-item:not(:last-child)::before {
        left: 8px;
    }

    .contract-timeline-item .timeline-marker {
        height: 18px;
        width: 18px;
    }

    .timeline-card {
        padding: 12px;
    }

    .timeline-detail-grid {
        grid-template-columns: 1fr;
    }

    .timeline-detail-grid dt {
        border-bottom: 0;
        padding-bottom: 2px;
    }

    .timeline-detail-grid dd {
        padding-top: 2px;
    }

    .page-header,
    .panel-heading,
    .section-title,
    .context-help-heading,
    .report-toolbar,
    .action-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-header h1,
    .section-heading h1,
    .danger-zone h1 {
        font-size: 1.75rem;
    }

    .metrics-grid,
    .approval-action-grid,
    .approval-json-grid,
    .detail-grid,
    .dashboard-grid,
    .help-grid,
    .management-intro-grid,
    .management-section-grid,
    .management-split-grid,
    .risk-grid,
    .system-grid,
    .system-overview,
    .context-help-grid,
    .context-help-faq-grid,
    .notification-filters,
    .report-nav,
    .report-link-grid,
	    .detail-summary,
	    .filters,
	    .filter-panel,
	    .filters-compact,
	    .list-stats,
	    .form-grid,
    .form-grid-compact,
    .form-wide {
        grid-template-columns: 1fr;
    }

    .transparency-summary,
    .transparency-filters {
        grid-template-columns: 1fr;
    }

    .help-search > div {
        grid-template-columns: 1fr;
    }

    .context-help-trigger {
        justify-content: center;
        width: calc(100% - 32px);
    }

	    .metric-wide,
	    .list-stats-wide,
	    .field-search,
        .transparency-filters .field-search,
        .transparency-filter-actions,
        .transparency-summary .list-stats-wide,
	    .filter-panel-contracts .field-search,
	    .contract-filter-actions,
	    .span-2 {
	        grid-column: auto;
	    }

    .filters-contracts .field-search {
        grid-column: auto;
    }

    .filters-consulta .field-search {
        grid-column: auto;
    }

    .filters-reports .field-search {
        grid-column: auto;
    }

    .management-split-grid .management-section-grid {
        grid-template-columns: 1fr;
    }

    .definition-grid {
        grid-template-columns: 1fr;
    }

    .panel,
    .login-panel,
    .card {
        padding: 18px;
    }

    .button {
        min-height: 46px;
        width: 100%;
        white-space: normal;
    }

    .button-small {
        min-height: 42px;
        padding: 8px 11px;
    }

    .quick-actions .button {
        min-width: 0;
        white-space: normal;
    }

    .active-filters {
        align-items: flex-start;
        flex-direction: column;
    }

    .actions,
    .form-actions,
    .form-footer,
    .filter-actions {
        width: 100%;
    }

    .form-footer {
        align-items: stretch;
        flex-direction: column-reverse;
        position: static;
    }

    .filter-actions {
        grid-template-columns: 1fr;
    }

	    .table-wrap {
	        border-radius: var(--radius);
	        margin-left: -2px;
	        margin-right: -2px;
	    }

	    .contracts-table-wrap {
	        display: none;
	    }

	    .contract-mobile-list {
	        display: grid;
	        gap: 12px;
	    }

	    .contract-mobile-head {
	        align-items: flex-start;
	        flex-direction: column;
	    }

	    .contract-mobile-facts {
	        grid-template-columns: 1fr;
	    }

	    .contract-mobile-card .table-actions {
	        align-items: stretch;
	        display: grid;
	        grid-template-columns: 1fr;
	    }

    .mobile-card-table {
        border-collapse: separate;
        border-spacing: 0 12px;
        min-width: 0;
    }

    .mobile-card-table thead {
        display: none;
    }

    .mobile-card-table,
    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td {
        display: block;
        width: 100%;
    }

    .mobile-card-table tr {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    .mobile-card-table tr:last-child td {
        border-bottom: 1px solid var(--line);
    }

    .mobile-card-table td {
        border-bottom: 1px solid var(--line);
        padding: 11px 12px;
    }

    .mobile-card-table td[data-label] {
        display: grid;
        gap: 4px;
        grid-template-columns: minmax(105px, 0.42fr) minmax(0, 1fr);
    }

    .mobile-card-table td[data-label]::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 0.78rem;
        font-weight: 850;
        text-transform: uppercase;
    }

    .mobile-card-table td.mobile-full {
        display: block;
    }

    .mobile-card-table td.mobile-full::before {
        display: block;
        margin-bottom: 8px;
    }

    .mobile-card-table td.empty {
        display: block;
        padding: 20px 14px;
    }

    .mobile-card-table td.empty::before {
        content: none;
    }

    .mobile-card-table .table-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
        min-width: 0;
    }

    .mobile-card-table .table-actions a,
    .mobile-card-table .table-actions button,
    .table-actions a,
    .table-actions button {
        min-height: 42px;
        width: 100%;
    }

    .mobile-card-table tr td:last-child {
        border-bottom: 0;
    }

    .stack-item,
    .contract-row,
    .notification-item {
        grid-template-columns: 1fr;
    }

    .stack-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .stack-meta,
    .contract-side,
    .notification-actions {
        align-items: flex-start;
        text-align: left;
    }

    .contract-side,
    .notification-actions {
        border-top: 1px solid var(--line);
        padding-top: 12px;
    }
}

@media (max-width: 420px) {
    .content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .brand {
        gap: 8px;
    }

    .brand-mark {
        height: 36px;
        width: 36px;
    }

    .brand-text strong {
        font-size: 0.92rem;
    }

    .page-header,
    .panel,
    .card,
    .login-panel {
        padding: 16px;
    }

    .page-header h1,
    .section-heading h1,
    .danger-zone h1 {
        font-size: 1.55rem;
        line-height: 1.15;
    }

    .metric strong,
    .risk-card strong,
    .home-stat-grid .stat-card strong {
        font-size: 1.45rem;
    }

    .mobile-card-table td[data-label] {
        grid-template-columns: 1fr;
    }

    .mobile-card-table td[data-label]::before {
        margin-bottom: 2px;
    }

    .table-actions,
    .actions,
    .form-actions,
    .action-bar,
    .home-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .status,
    .status-badge,
    .deadline-badge {
        white-space: normal;
    }
}

@media (max-width: 980px) {
    .consulta-header,
    .filtros-panel-heading,
    .results-toolbar,
    .active-filters,
    .consulta-page .detail-section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .consulta-header-actions,
    .results-actions,
    .rows-select {
        justify-content: flex-start;
        width: 100%;
    }

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

    .consulta-actions,
    .filtro-field-wide {
        grid-column: span 2;
    }
}

@media (max-width: 680px) {
    .consulta-header,
    .filtros-panel,
    .consulta-results,
    .active-filters,
    .consulta-page .detail-section {
        border-radius: var(--radius);
    }

    .consulta-header-actions,
    .results-actions,
    .rows-select,
    .active-filters,
    .consulta-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .active-filters ul {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .active-filters li {
        align-items: flex-start;
        display: grid;
    }

    .filtros-grid,
    .consulta-detail-grid {
        grid-template-columns: 1fr;
    }

    .consulta-actions,
    .filtro-field-wide {
        grid-column: auto;
    }

    .filtro-field-radio {
        flex-direction: column;
    }

    .risk-level-row {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .risk-level-percent {
        text-align: left;
    }

    .rows-select select {
        width: 100%;
    }

    .contracts-table-sigecon {
        min-width: 0;
    }

    .contract-card-mobile {
        border-left: 4px solid var(--primary);
    }
}

/* Layout institucional inspirado no Sistema Cemiterial */
.app-authenticated {
    --sidebar-width: 288px;
    background:
        linear-gradient(180deg, #ffffff 0, #f7f9fc 18rem, var(--surface) 42rem),
        linear-gradient(135deg, rgba(58, 94, 166, 0.08), transparent 32rem);
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    background:
        linear-gradient(180deg, #113567 0, var(--primary-strong) 64%, #24406f 100%);
    color: #fff;
}

.desktop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: var(--sidebar-width);
    min-height: 100vh;
    padding: 0.85rem 0.72rem;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
}

.sidebar-brand {
    display: flex;
    justify-content: center;
    margin: 0 0 0.6rem;
    padding: 0.1rem 0 0.25rem;
}

.app-logo-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.42rem 0.55rem;
    border: 0;
    border-radius: 0.5rem;
    color: var(--primary-strong);
    text-decoration: none;
}

.app-logo-lockup:hover {
    color: var(--primary-strong);
    text-decoration: none;
}

.app-logo-lockup .app-brand-logo {
    display: block;
    flex: 0 0 auto;
    width: 10.75rem;
    max-width: min(10.75rem, 100%);
    height: auto;
    object-fit: contain;
    filter:
        drop-shadow(0 0 1px #fff)
        drop-shadow(0 1px 0 #fff)
        drop-shadow(0 -1px 0 #fff)
        drop-shadow(1px 0 0 #fff)
        drop-shadow(-1px 0 0 #fff);
}

.app-logo-divider {
    align-self: stretch;
    flex: 0 0 1px;
    min-height: 2.35rem;
    background: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 0 1px rgba(17, 53, 103, 0.35));
}

.app-logo-label {
    flex: 0 1 auto;
    max-width: 5.9rem;
    color: var(--primary-strong);
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.15;
    text-align: left;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 1px 2px rgba(17, 53, 103, 0.18);
    text-transform: uppercase;
    white-space: normal;
}

.sidebar-brand .app-logo-lockup {
    justify-content: center;
    width: 100%;
    max-width: 16.8rem;
}

.sidebar-brand .app-brand-logo {
    width: 9.4rem;
    max-width: 9.4rem;
}

.sidebar-brand .app-logo-label {
    max-width: 4.9rem;
    font-size: 0.74rem;
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding-bottom: 0.75rem;
}

.app-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.58rem;
    min-height: 2.28rem;
    padding: 0.48rem 0.62rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.84rem;
    font-weight: 680;
    line-height: 1.18;
    text-decoration: none;
}

.app-nav .nav-link i {
    flex: 0 0 1.15rem;
    width: 1.15rem;
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.95rem;
    text-align: center;
}

.app-nav .nav-link span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.app-nav .nav-link:hover,
.app-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.app-nav .nav-link.active {
    box-shadow: inset 4px 0 0 var(--accent);
}

.app-nav .nav-link:hover i,
.app-nav .nav-link.active i {
    color: #fff;
}

.nav-section {
    margin: 0.72rem 0.62rem 0.18rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-nav .nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 1.35rem;
    min-height: 1.35rem;
    margin-left: auto;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 850;
}

.app-nav .nav-badge-urgent {
    background: var(--danger);
}

.main {
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 34rem) auto;
    align-items: center;
    gap: 1rem;
    min-height: 76px;
    max-width: none;
    padding: 0.85rem 1.35rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(17, 53, 103, 0.04);
    backdrop-filter: blur(14px);
}

.topbar-without-heading {
    grid-template-columns: auto minmax(18rem, 34rem) auto;
}

.topbar-title,
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.topbar-logo-lockup,
.mobile-navigation {
    display: none;
}

.page-heading {
    min-width: 0;
}

.page-title {
    max-width: 100%;
    overflow: hidden;
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-subtitle {
    color: var(--muted);
    font-size: 0.875rem;
}

.shell-search {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    background: #fff;
}

.shell-search i {
    color: var(--muted);
    padding-left: 0.55rem;
}

.shell-search input {
    min-width: 0;
    min-height: 2.3rem;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.shell-search input:focus {
    outline: 0;
}

.user-menu {
    justify-content: flex-end;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    background: #fff;
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.user-name {
    max-width: 16rem;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    max-width: 9rem;
    padding: 0.22rem 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(58, 94, 166, 0.24);
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.shell-logout {
    width: auto;
}

.content-wrap {
    width: min(100%, 1440px);
    max-width: 100%;
    margin: 0 auto;
    padding: 1.35rem;
}

.breadcrumbs {
    margin-bottom: 1rem;
}

.page-header,
.panel,
.card,
.metric,
.quick-card,
.alert-box,
.detail-section,
.overview-card,
.attachment-card,
.filter-panel,
.form-panel {
    border-color: var(--line);
    border-radius: 0.45rem;
    box-shadow: 0 10px 24px rgba(17, 53, 103, 0.055);
}

.page-header,
.panel-heading,
.section-title {
    border-color: var(--line);
}

.page-header {
    background: linear-gradient(180deg, #fff 0, #f8fafc 100%);
}

.metric,
.stat-card,
.risk-card {
    overflow: hidden;
}

.public-shell {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #ffffff 0, #f7f9fc 18rem, var(--surface) 42rem),
        linear-gradient(135deg, rgba(58, 94, 166, 0.08), transparent 32rem);
}

.public-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 76px;
    padding: 0.85rem 1.35rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(17, 53, 103, 0.04);
    backdrop-filter: blur(14px);
}

.public-logo .app-logo-divider {
    background: var(--line-strong);
}

.public-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.public-content {
    padding-top: 1.35rem;
}

@media (max-width: 1180px) {
    .app-authenticated {
        --sidebar-width: 0px;
    }

    .desktop-sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .topbar-without-heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .topbar-logo-lockup,
    .mobile-navigation {
        display: inline-flex;
    }

    .topbar-logo-lockup {
        flex: 0 0 auto;
        gap: 0.45rem;
        padding: 0.3rem 0.45rem;
    }

    .topbar-logo-lockup .app-brand-logo {
        width: 6.25rem;
    }

    .topbar-logo-lockup .app-logo-divider {
        min-height: 1.65rem;
    }

    .topbar-logo-lockup .app-logo-label {
        max-width: 4.4rem;
        font-size: 0.58rem;
    }

    .shell-search {
        display: none;
    }
}

@media (max-width: 860px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    .user-menu {
        justify-content: space-between;
        width: 100%;
    }

    .user-name {
        max-width: 52vw;
    }
}

@media (max-width: 575px) {
    .topbar,
    .public-topbar {
        padding-inline: 0.75rem;
    }

    .content-wrap {
        padding: 0.85rem;
    }

    .page-subtitle,
    .topbar-logo-lockup .app-logo-divider,
    .topbar-logo-lockup .app-logo-label,
    .user-role {
        display: none;
    }

    .topbar-logo-lockup .app-brand-logo {
        width: 5.75rem;
    }

    .page-title {
        font-size: 0.98rem;
    }

    .shell-logout span {
        display: none;
    }

    .shell-logout {
        width: 2.5rem;
        padding-inline: 0;
    }

    .public-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .public-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
}

.mobile-navigation {
    position: relative;
}

.mobile-navigation summary {
    list-style: none;
}

.mobile-navigation summary::-webkit-details-marker {
    display: none;
}

.mobile-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.mobile-menu-trigger i {
    font-size: 1.2rem;
}

.mobile-navigation[open]::before {
    position: fixed;
    inset: 0;
    z-index: 49;
    content: "";
    background: rgba(17, 53, 103, 0.24);
}

.mobile-navigation-panel {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(21rem, 92vw);
    overflow-y: auto;
    padding: 0.75rem;
    background:
        linear-gradient(180deg, #113567 0, var(--primary-strong) 64%, #24406f 100%);
    box-shadow: 18px 0 46px rgba(17, 53, 103, 0.24);
}

.mobile-navigation-header {
    padding: 0 0 0.75rem;
}

@media (max-width: 760px) {
    .brand-logo-lockup {
        max-width: 210px;
    }

    .brand-logo {
        width: min(118px, 42vw);
    }

    .brand-logo-divider,
    .brand-logo-label {
        display: none;
    }

    .login-shell {
        grid-template-columns: minmax(0, 27rem);
        align-content: center;
        align-items: center;
        min-height: 100svh;
        padding-block: 1rem;
    }

    .login-shell::before {
        height: 22rem;
        min-height: 22rem;
        background-position: center 48%;
    }
}

@media (max-width: 575px) {
    .login-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .login-shell::before {
        height: 18rem;
        min-height: 18rem;
        background-position: center top;
    }

    .login-card {
        padding: 1.1rem;
    }

    .login-logo-lockup {
        gap: 0.55rem;
        padding: 0.4rem 0.5rem;
    }

    .login-brand-logo {
        width: 8.25rem;
    }

    .login-logo-divider {
        min-height: 2rem;
    }

    .login-logo-label {
        max-width: 6.25rem;
        font-size: 0.72rem;
        white-space: normal;
    }

    .login-card-header {
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .login-icon {
        flex-basis: 2.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .login-card h1 {
        font-size: 1.2rem;
    }

    .login-input-group .input-group-text {
        width: 2.65rem;
    }

    .login-input-group .form-control {
        min-height: 2.75rem;
    }

    .login-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .dashboard-simple-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-guide {
        grid-template-columns: 1fr;
    }

    .dashboard-simple-grid,
    .dashboard-simple-deadlines .stack-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-simple-metrics,
    .dashboard-simple-links {
        grid-template-columns: 1fr;
    }
}

/* Ajustes finais de layout e responsividade do sistema de contratos */
.topbar-without-heading {
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 42rem) auto;
}

.shell-search {
    max-width: 42rem;
    justify-self: center;
    width: 100%;
}

.page-header {
    gap: 1rem;
}

.page-header .actions,
.action-bar,
.home-hero-actions,
.management-actions {
    flex-wrap: wrap;
}

.dashboard-simple-grid {
    align-items: start;
}

.dashboard-simple-grid .panel {
    min-height: 0;
}

.dashboard-simple-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
}

.home-quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.required-chip {
    display: none;
}

.operational-form {
    gap: 1.1rem;
}

.operational-form .field-help {
    display: none;
}

.form-section {
    gap: 1rem;
    padding: 1.25rem;
}

.form-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
}

.form-footer {
    position: static;
    z-index: auto;
    padding-top: 0.6rem;
    border-top: 0;
    background: transparent;
}

.contracts-table {
    min-width: 0;
    table-layout: fixed;
}

.contracts-table th,
.contracts-table td {
    padding: 0.85rem 0.9rem;
}

.contracts-table th:nth-child(1),
.contracts-table td:nth-child(1) {
    width: 12%;
}

.contracts-table th:nth-child(2),
.contracts-table td:nth-child(2) {
    width: 24%;
}

.contracts-table th:nth-child(3),
.contracts-table td:nth-child(3) {
    width: 30%;
}

.contracts-table th:nth-child(4),
.contracts-table td:nth-child(4) {
    width: 13%;
}

.contracts-table th:nth-child(5),
.contracts-table td:nth-child(5) {
    width: 10%;
}

.contracts-table th:nth-child(6),
.contracts-table td:nth-child(6) {
    width: 11%;
}

.contracts-table th:last-child,
.contracts-table td:last-child {
    text-align: left;
}

.contracts-table .table-actions-column {
    align-items: flex-start;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-start;
    min-width: 0;
}

.contracts-table .table-actions-column a {
    width: auto;
    min-height: 2rem;
    padding: 0.32rem 0.5rem;
}

.contract-object-cell {
    max-width: none;
}

@media (min-width: 641px) and (max-width: 1180px) {
    .topbar,
    .topbar-without-heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .user-menu {
        justify-self: end;
        width: auto;
    }

    .user-name {
        max-width: 15rem;
    }

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

@media (max-width: 900px) {
    .contracts-table-wrap {
        display: none;
    }

    .contract-mobile-list {
        display: grid;
        gap: 0.85rem;
    }

    .contract-mobile-card {
        background: #fff;
    }

    .contract-mobile-card .table-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(5.4rem, 1fr));
        gap: 0.45rem;
    }

    .contract-mobile-card .table-actions a {
        width: 100%;
    }

    .form-grid,
    .form-grid-compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar,
    .topbar-without-heading {
        grid-template-columns: 1fr;
    }

    .dashboard-simple-metrics {
        grid-template-columns: 1fr;
    }

    .page-header .actions,
    .action-bar,
    .home-hero-actions,
    .management-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .form-section {
        padding: 1rem;
    }

    .contract-mobile-card {
        padding: 1rem;
    }

    .contract-mobile-card .table-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Camada de simplificação: mantém a ação visível e remove textos repetitivos. */
.breadcrumbs,
.eyebrow,
.page-subtitle,
.panel-subtitle,
.filter-help,
.management-context,
.context-help-box {
    display: none !important;
}

.page-header {
    align-items: center;
}

.page-header h1 {
    margin-top: 0;
}

.panel-heading h2,
.section-title h2,
.form-section-header h2 {
    margin-bottom: 0;
}

.empty,
.empty-inline,
.empty-state {
    color: var(--muted-strong);
}

.data-state-saneamento {
    color: var(--warning-strong);
}

.app-nav-compact {
    gap: 0.2rem;
}

.app-nav-compact .nav-link {
    min-height: 2.45rem;
}

@media print {
    .site-header,
    .site-footer,
    .desktop-sidebar,
    .topbar,
    .mobile-navigation,
    .public-topbar,
    .breadcrumbs,
    .detail-section-nav,
    .consulta-section-nav,
    .results-toolbar,
    .filtros-panel,
    .contract-detail-actions,
    .attachment-form,
    .table-actions,
    .button,
    .inline-action,
    .print-button {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .content {
        max-width: none;
        padding: 0;
    }

    .page-header,
    .consulta-header,
    .panel,
    .detail-section,
    .overview-card,
    .attachment-card {
        box-shadow: none;
        break-inside: avoid;
    }

    .detail-grid,
    .consulta-detail-grid,
    .contract-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    a {
        color: #000;
        text-decoration: none;
    }
}

/* Padronização comum com o Sistema de Gestão de Cemitérios. */
.app-authenticated {
    --sidebar-width: 288px;
}

.topbar-with-heading {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 34rem) auto;
}

.topbar-with-heading .page-heading {
    display: block;
}

.topbar-with-heading .topbar-title {
    min-width: 0;
}

.topbar-with-heading .shell-search {
    justify-self: stretch;
}

.page-heading {
    display: block;
}

.page-title {
    letter-spacing: 0;
}

.page-subtitle {
    letter-spacing: 0;
}

.app-nav .nav-section:first-child {
    margin-top: 0.15rem;
}

.button,
.btn {
    border-radius: 0.5rem;
    letter-spacing: 0;
}

.page-header,
.panel,
.metric,
.stat-card,
.management-card,
.overview-card,
.quick-card,
.filter-panel,
.filters,
.operational-form {
    border-radius: var(--radius);
}

.filters,
.filters-compact,
.filter-panel {
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.messages {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.message {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.8rem 0.95rem;
    background: #fff;
    color: var(--text);
    font-weight: 650;
}

.message-success {
    border-color: rgba(53, 119, 95, 0.25);
    background: var(--success-soft);
    color: var(--success);
}

.message-error,
.message-danger {
    border-color: rgba(180, 59, 66, 0.25);
    background: var(--danger-soft);
    color: var(--danger);
}

.message-warning {
    border-color: rgba(154, 106, 31, 0.28);
    background: var(--warning-soft);
    color: var(--warning-strong);
}

.message-info {
    border-color: rgba(41, 150, 204, 0.25);
    background: var(--secondary-soft);
    color: var(--primary-strong);
}

.login-card h1 {
    overflow-wrap: anywhere;
}

.login-meta,
.login-footnote {
    letter-spacing: 0;
}

@media (min-width: 992px) and (max-width: 1180px) {
    .app-authenticated {
        --sidebar-width: 248px;
    }

    .desktop-sidebar.d-lg-flex {
        display: flex !important;
    }

    .main {
        margin-left: var(--sidebar-width);
    }

    .mobile-navigation.d-lg-none,
    .topbar-logo-lockup.d-lg-none {
        display: none !important;
    }

    .topbar,
    .topbar-with-heading,
    .topbar-without-heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .shell-search {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .app-authenticated {
        --sidebar-width: 0px;
    }

    .desktop-sidebar {
        display: none !important;
    }

    .main {
        margin-left: 0;
    }

    .mobile-navigation.d-lg-none,
    .topbar-logo-lockup.d-lg-none {
        display: inline-flex !important;
    }

    .topbar,
    .topbar-with-heading,
    .topbar-without-heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .shell-search {
        display: none;
    }
}

@media (max-width: 640px) {
    .topbar-with-heading {
        grid-template-columns: 1fr;
    }

    .topbar-title {
        width: 100%;
    }

    .page-heading {
        min-width: 0;
    }
}

/* Iguape Admin UI: padronizacao final comum com cemiterio e frota. */
:root {
    --brand: var(--primary);
    --brand-strong: var(--primary-strong);
    --brand-dark: #113567;
    --brand-soft: var(--primary-soft);
    --ink: var(--text);
    --panel: var(--surface);
    --content-width: 1440px;
    --control-height: 2.625rem;
    --control-radius: var(--radius);
    --panel-radius: var(--radius);
    --shadow-soft: 0 10px 24px rgba(17, 53, 103, 0.055);
}

.app-authenticated {
    background:
        linear-gradient(180deg, #ffffff 0, #f7f9fc 18rem, var(--surface) 42rem),
        linear-gradient(135deg, rgba(58, 94, 166, 0.08), transparent 32rem);
}

.content-wrap {
    width: min(100%, var(--content-width));
    max-width: 100%;
}

.topbar,
.topbar-with-heading,
.topbar-without-heading {
    min-height: 76px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(17, 53, 103, 0.04);
    backdrop-filter: blur(14px);
}

.topbar-with-heading {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 32rem) auto;
}

.page-title,
.page-subtitle,
.eyebrow,
.button,
.btn,
input,
select,
textarea {
    letter-spacing: 0;
}

.page-subtitle {
    display: block !important;
}

.eyebrow {
    display: block !important;
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.app-authenticated .page-header {
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.app-authenticated .page-header h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 850;
    line-height: 1.15;
}

.page-header .actions,
.page-header .action-bar,
.actions,
.action-bar,
.form-actions,
.form-footer,
.table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.page-header .actions,
.page-header .action-bar {
    justify-content: flex-end;
}

.button,
.btn,
.table-actions a,
.table-actions button,
.inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 2.5rem;
    border-radius: var(--control-radius);
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
}

.btn-primary,
.button-primary {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.button-primary:hover,
.button-primary:focus {
    border-color: var(--brand-strong);
    background: var(--brand-strong);
    color: #fff;
}

.btn-outline-primary,
.button-secondary {
    border-color: #c9d7ee;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.button-secondary:hover,
.button-secondary:focus {
    border-color: #b4c7e6;
    background: #dfe8f7;
    color: var(--brand-strong);
}

.btn-outline-secondary,
.button-ghost,
.table-actions a,
.table-actions button,
.inline-action {
    border-color: var(--line-strong);
    background: #fff;
    color: var(--ink);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.button-ghost:hover,
.button-ghost:focus,
.table-actions a:hover,
.table-actions button:hover,
.inline-action:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.button-danger {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

.button-danger:hover,
.button-danger:focus {
    border-color: var(--danger-strong);
    background: var(--danger-strong);
    color: #fff;
}

.button-small,
.btn-sm {
    min-height: 2rem;
}

.button:hover,
.btn:hover,
.table-actions a:hover,
.table-actions button:hover {
    text-decoration: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea,
.form-control,
.form-select {
    min-height: var(--control-height);
    border: 1px solid var(--line-strong);
    border-radius: var(--control-radius);
    background: #fff;
    color: var(--ink);
}

textarea {
    min-height: 7rem;
}

.field > label,
.form-label,
label {
    color: var(--ink);
    font-weight: 750;
}

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

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(58, 94, 166, 0.16);
}

.panel,
.card,
.metric,
.stat-card,
.quick-card,
.management-card,
.overview-card,
.attachment-card,
.detail-section,
.filter-panel,
.filters,
.operational-form,
.list-stats article,
.contract-mobile-card,
.message {
    border-radius: var(--panel-radius);
    box-shadow: var(--shadow-soft);
}

.panel-heading {
    min-height: 3.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.section-title h2,
.form-section-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 800;
}

.metrics-grid {
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric,
.stat-card {
    position: relative;
    min-height: 108px;
    padding: 0.95rem 1rem 1rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-left: 0.3rem solid var(--brand);
    border-top-color: var(--line);
    background: #fff;
}

.metric-primary,
.stat-primary,
.stat-info {
    border-left-color: var(--brand);
}

.metric-secondary,
.stat-secondary,
.stat-dark {
    border-left-color: #505659;
}

.metric-success,
.stat-success {
    border-left-color: var(--success);
}

.metric-warning,
.stat-warning {
    border-left-color: var(--warning);
}

.metric-danger,
.stat-danger {
    border-left-color: var(--danger);
}

.metric span,
.list-stats span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
}

.metric strong {
    margin-top: 0.45rem;
    color: var(--ink);
    font-size: 2.1rem;
    font-weight: 850;
    line-height: 1;
}

.filter-panel,
.filters {
    border-left: 0;
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
    align-items: end;
    gap: 1rem;
    padding: 1rem;
}

.filter-panel-contracts .field-search,
.field-search {
    grid-column: auto;
}

.filter-actions,
.contract-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.list-stats {
    gap: 1rem;
    margin-bottom: 1rem;
}

.list-stats article {
    position: relative;
    min-height: 92px;
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
    background: #fff;
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border-color: var(--line);
    scrollbar-color: var(--line-strong) transparent;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table th,
.data-table td {
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.data-table tbody tr:hover td {
    background: #f8fafc;
}

.table-actions {
    justify-content: flex-end;
    min-width: 0;
}

.table-actions a,
.table-actions button,
.inline-action {
    min-height: 2rem;
    padding: 0.35rem 0.55rem;
}

.empty,
.empty-inline,
.empty-state {
    color: var(--muted);
    font-weight: 750;
}

.empty-inline,
.empty-state {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    text-align: left;
}

.operational-form {
    display: grid;
    gap: 1.15rem;
}

.form-grid,
.form-grid-compact,
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.field,
.form-section,
.contract-mobile-card,
.stack-item {
    min-width: 0;
}

.span-2 {
    grid-column: 1 / -1;
}

.form-footer {
    justify-content: flex-end;
}

.shell-search {
    border-radius: 0.6rem;
    box-shadow: none;
}

.shell-search input {
    border: 0 !important;
}

.contract-mobile-list {
    gap: 0.85rem;
}

.contract-mobile-card {
    border: 1px solid var(--line);
    background: #fff;
}

.contract-mobile-head {
    gap: 0.75rem;
}

.mobile-navigation-panel .app-logo-label,
.sidebar .app-logo-label {
    color: var(--brand-strong);
}

.messages {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.message {
    border: 1px solid var(--line);
    padding: 0.8rem 0.95rem;
    background: #fff;
    color: var(--text);
    font-weight: 650;
}

.message-success {
    border-color: rgba(53, 119, 95, 0.25);
    background: var(--success-soft);
    color: var(--success);
}

.message-error,
.message-danger {
    border-color: rgba(180, 59, 66, 0.25);
    background: var(--danger-soft);
    color: var(--danger);
}

.message-warning {
    border-color: rgba(154, 106, 31, 0.28);
    background: var(--warning-soft);
    color: var(--warning-strong);
}

.message-info {
    border-color: rgba(58, 94, 166, 0.25);
    background: var(--brand-soft);
    color: var(--brand-strong);
}

@media (min-width: 992px) and (max-width: 1199px) {
    .app-authenticated {
        --sidebar-width: 248px;
    }

    .desktop-sidebar.d-lg-flex {
        display: flex !important;
    }

    .main {
        margin-left: var(--sidebar-width);
    }

    .mobile-navigation.d-lg-none,
    .topbar-logo-lockup.d-lg-none {
        display: none !important;
    }

    .topbar,
    .topbar-with-heading,
    .topbar-without-heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .shell-search {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .app-authenticated {
        --sidebar-width: 0px;
    }

    .desktop-sidebar {
        display: none !important;
    }

    .main {
        margin-left: 0;
    }

    .topbar,
    .topbar-with-heading,
    .topbar-without-heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .mobile-navigation.d-lg-none,
    .topbar-logo-lockup.d-lg-none {
        display: inline-flex !important;
    }

    .shell-search {
        display: none;
    }

    .form-grid,
    .form-grid-compact,
    .detail-grid,
    .dashboard-simple-grid,
    .dashboard-simple-deadlines .stack-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    body.app-authenticated .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-header .actions,
    .page-header .action-bar,
    .form-footer,
    .filter-actions,
    .contract-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .page-header .button,
    .form-footer .button,
    .filter-actions .button,
    .contract-filter-actions .button {
        width: 100%;
    }

    .list-stats,
    .dashboard-simple-metrics {
        grid-template-columns: 1fr;
    }

    .contract-mobile-card .table-actions,
    .table-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
        width: 100%;
        justify-content: stretch;
    }

    .contract-mobile-card .table-actions a,
    .table-actions a,
    .table-actions button {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .topbar,
    .topbar-with-heading,
    .topbar-without-heading {
        grid-template-columns: 1fr;
    }

    .topbar-title {
        width: 100%;
    }

    .user-menu {
        width: 100%;
    }

    .page-subtitle {
        display: none !important;
    }

    .public-actions {
        grid-template-columns: 1fr;
    }
}

.login-page,
.login-shell {
    max-width: 100vw;
    overflow-x: hidden;
}

.login-shell::before {
    inset-inline: 0;
    transform: none;
}

.login-logo-lockup,
.login-card-header,
.login-input-group {
    min-width: 0;
}

@media (max-width: 575px) {
    .login-card {
        max-width: calc(100vw - 1.5rem);
    }

    .login-brand-logo {
        max-width: min(8.25rem, 42vw);
    }
}

/* Revisao de responsividade: cabecalho e menu em celulares estreitos. */
@media (max-width: 575px) {
    .topbar,
    .topbar-with-heading,
    .topbar-without-heading {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .topbar-title {
        width: auto;
        min-width: 0;
    }

    .topbar-logo-lockup.d-lg-none {
        display: none !important;
    }

    .user-menu {
        width: auto;
        min-width: 2.5rem;
        justify-content: flex-end;
    }

    .user-identity {
        display: none;
    }

    .shell-logout span {
        display: none;
    }

    .shell-logout {
        width: 2.5rem;
        padding-inline: 0;
    }
}

@media (max-width: 430px) {
    .mobile-navigation-panel {
        width: 100vw;
        max-width: 100vw;
    }
}

.mobile-navigation-panel {
    height: 100vh;
    min-height: 100svh;
}

@supports (height: 100dvh) {
    .mobile-navigation-panel {
        height: 100dvh;
    }
}

/* Iguape Admin UI: camada institucional comum. */
:root {
    --brand: #3a5ea6;
    --brand-strong: #325497;
    --brand-dark: #113567;
    --brand-soft: #e8eef9;
    --brand-sky: #2996cc;
    --accent: #f4c542;
    --success: #35775f;
    --warning: #9a6a1f;
    --danger: #b43b42;
    --ink: #2a4558;
    --muted: #737b80;
    --surface: #f0f2f5;
    --surface-strong: #e9f0f2;
    --panel: #ffffff;
    --line: #dbe2ea;
    --line-strong: #acb6bf;
    --shadow-soft: 0 10px 24px rgba(17, 53, 103, .055);
    --shadow: 0 16px 36px rgba(17, 53, 103, .09);
    --radius: 8px;
    --sidebar-width: 288px;
    --content-width: 1440px;
}

body,
.app-shell {
    background:
        linear-gradient(180deg, #ffffff 0, #f7f9fc 18rem, var(--surface) 42rem),
        linear-gradient(135deg, rgba(58, 94, 166, .08), transparent 32rem);
    color: var(--ink);
    font-family: Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.desktop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    min-height: 100vh;
    padding: .85rem .72rem;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(180deg, var(--brand-dark) 0, var(--brand-strong) 64%, #24406f 100%);
}

.main {
    margin-left: var(--sidebar-width);
}

.sidebar-brand .app-logo-lockup,
.topbar-logo-lockup,
.mobile-navigation-header .app-logo-lockup {
    gap: .6rem;
    padding: .38rem .5rem;
    border-radius: var(--radius);
}

.sidebar-brand .app-brand-logo {
    width: 8.5rem;
    max-width: 8.5rem;
}

.app-logo-label {
    max-width: 6.8rem;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.08;
    text-transform: uppercase;
}

.app-nav .nav-link {
    min-height: 2.42rem;
    border-radius: var(--radius);
    font-size: .86rem;
}

.app-nav .nav-link.active,
.app-nav .nav-link[aria-current="page"] {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.topbar {
    min-height: 76px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-soft);
}

.content-wrap {
    width: min(100%, var(--content-width));
    max-width: 100%;
    padding: 1.25rem;
}

.button,
.btn {
    border-radius: .5rem;
    font-weight: 700;
    white-space: nowrap;
}

.button-primary,
.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.button-primary:hover,
.btn-primary:hover {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
}

.button-secondary,
.btn-outline-primary {
    background: var(--brand-soft);
    border-color: rgba(58, 94, 166, .38);
    color: var(--brand);
}

.button-ghost,
.btn-outline-secondary {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--ink);
}

.card,
.stat-card,
.quick-card,
.management-card,
.risk-card,
.overview-card,
.attachment-card,
.table-card,
.form-card,
.panel,
.detail-card,
.filter-card,
.report-card,
.documents-card,
.content-toolbar,
.message {
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

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

.login-page {
    background:
        linear-gradient(115deg, rgba(17, 53, 103, .05) 0 1px, transparent 1px 120px),
        linear-gradient(180deg, #ffffff 0, var(--surface) 48%, #e6ebf3 100%);
}

.login-card {
    max-width: 28rem;
    border: 1px solid #d7dfeb;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 22px 60px rgba(17, 53, 103, .14);
}

@media (max-width: 1199px) {
    :root {
        --sidebar-width: 248px;
    }

    .desktop-sidebar {
        padding: .7rem .55rem;
    }

    .sidebar-brand .app-brand-logo {
        width: 7.9rem;
        max-width: 7.9rem;
    }
}

@media (min-width: 992px) and (max-width: 1180px) {
    .app-authenticated {
        --sidebar-width: 248px;
    }

    .desktop-sidebar {
        display: flex;
    }

    .main {
        margin-left: var(--sidebar-width);
    }
}

@media (max-width: 991px) {
    .main {
        margin-left: 0;
    }

    .topbar {
        min-height: 68px;
        padding: .75rem 1rem;
    }

    .content-wrap {
        padding: 1rem;
    }

    .mobile-navigation-panel {
        background: linear-gradient(180deg, var(--brand-dark) 0, var(--brand-strong) 64%, #24406f 100%);
    }
}

@media (max-width: 767px) {
    .button,
    .btn {
        white-space: normal;
    }

    .user-identity {
        display: none;
    }
}

@media (max-width: 575px) {
    .page-subtitle,
    .topbar-logo-lockup .app-logo-divider,
    .topbar-logo-lockup .app-logo-label {
        display: none;
    }

    .content-wrap {
        padding: .85rem;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .user-menu .button span,
    .user-menu .btn span {
        display: none;
    }
}

/* Login institucional padronizado. */
.login-page {
    --login-bg-image: url("../img/iguape-login-bg.4e5f67560836.jpg");
    --login-brand: var(--brand, #3a5ea6);
    --login-brand-strong: var(--brand-strong, #325497);
    --login-brand-dark: var(--brand-dark, #113567);
    --login-brand-soft: var(--brand-soft, #e8eef9);
    --login-accent: var(--accent, #f4c542);
    --login-ink: var(--ink, #2a4558);
    --login-muted: var(--muted, #737b80);
    --login-surface: var(--surface, #f0f2f5);
    --login-line: var(--line, #dbe2ea);
    --login-line-strong: var(--line-strong, #acb6bf);
    min-width: 320px;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        linear-gradient(115deg, rgba(17, 53, 103, .05) 0 1px, transparent 1px 120px),
        linear-gradient(180deg, #ffffff 0, var(--login-surface) 54%, #e6ebf3 100%);
    color: var(--login-ink);
}

.login-shell {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, min(29rem, 100%));
    align-content: center;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    max-width: 100vw;
    padding: clamp(1rem, 3vw, 2.25rem);
    overflow-x: hidden;
}

@supports (min-height: 100dvh) {
    .login-page,
    .login-shell {
        min-height: 100dvh;
    }
}

.login-shell::before,
.login-shell::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.login-shell::before {
    inset: 0 0 auto;
    height: clamp(17rem, 40vh, 24rem);
    min-height: 17rem;
    background: var(--login-bg-image) center 54% / cover no-repeat;
    box-shadow: inset 0 -5rem 5rem rgba(240, 242, 245, .78);
    filter: saturate(.96) contrast(.98);
    transform: none;
}

.login-shell::after {
    inset: auto 0 0;
    height: 60%;
    background: linear-gradient(180deg, rgba(240, 242, 245, 0), var(--login-surface) 36%, #e6ebf3 100%);
}

.login-card {
    position: relative;
    display: flex;
    align-self: center;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 29rem;
    min-width: 0;
    padding: clamp(1.15rem, 2.4vw, 1.9rem);
    overflow: hidden;
    border: 1px solid #d7dfeb;
    border-radius: var(--radius, 8px);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 64px rgba(17, 53, 103, .16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: .32rem;
    content: "";
    background: linear-gradient(90deg, var(--login-brand-dark), var(--login-brand), var(--login-accent));
}

.login-card-brand {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-bottom: 1.2rem;
    padding: 0;
    background: transparent;
}

.login-card-brand .login-logo-lockup,
.login-logo-lockup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: .35rem .25rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
}

.login-brand-logo {
    flex: 0 1 auto;
    width: clamp(9.25rem, 38vw, 11.75rem);
    max-width: 58%;
    height: auto;
    filter: none;
}

.login-logo-divider {
    align-self: stretch;
    flex: 0 0 1px;
    min-height: 2.35rem;
    background: #cbd7e7;
    filter: none;
}

.login-logo-label {
    max-width: 8.5rem;
    color: var(--login-brand-strong);
    font-size: .78rem;
    font-weight: 850;
    line-height: 1.12;
    text-shadow: none;
    text-transform: uppercase;
    white-space: normal;
}

.login-card-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.2rem;
    padding: 0;
}

.login-card-header > div {
    min-width: 0;
}

.login-card .login-icon,
.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.875rem;
    width: 2.875rem;
    height: 2.875rem;
    border: 1px solid #c9d7ee;
    border-radius: var(--radius, 8px);
    background: var(--login-brand-soft);
    color: var(--login-brand-strong);
    font-size: 1.2rem;
}

.login-card h1,
.login-card h2 {
    margin: 0;
    color: var(--login-ink);
    font-size: 1.28rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.login-card-header p {
    margin: .18rem 0 0;
    color: var(--login-muted);
    font-size: .91rem;
    line-height: 1.35;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin: 0 0 1rem;
    padding: .8rem .9rem;
    border-color: rgba(180, 59, 66, .26);
    border-radius: var(--radius, 8px);
    background: #fff0f1;
    color: #7e252b;
    font-size: .9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.login-form {
    display: grid;
    gap: .95rem;
    padding: 0;
}

.login-form .form-label {
    margin-bottom: .38rem;
    color: var(--login-ink);
    font-size: .84rem;
    font-weight: 750;
}

.login-input-group {
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    border-radius: var(--radius, 8px);
}

.login-input-group .input-group-text {
    flex: 0 0 3rem;
    width: 3rem;
    justify-content: center;
    border-color: var(--login-line-strong);
    background: #f8fafc;
    color: var(--login-muted);
}

.login-input-group .form-control {
    min-width: 0;
    min-height: 3rem;
    border-color: var(--login-line-strong);
    color: var(--login-ink);
    font-size: 1rem;
}

.login-input-group:focus-within {
    box-shadow: 0 0 0 .2rem rgba(58, 94, 166, .16);
}

.login-input-group:focus-within .input-group-text,
.login-input-group:focus-within .form-control {
    border-color: var(--login-brand);
}

.login-input-group:focus-within .input-group-text {
    color: var(--login-brand);
}

.login-input-group .form-control:focus {
    box-shadow: none;
}

.login-submit {
    width: 100%;
    min-height: 3rem;
    margin-top: .1rem;
    border-color: var(--login-brand);
    background: var(--login-brand);
    box-shadow: 0 10px 22px rgba(58, 94, 166, .2);
    font-weight: 750;
    white-space: normal;
}

.login-submit:hover,
.login-submit:focus {
    border-color: var(--login-brand-strong);
    background: var(--login-brand-strong);
}

.login-submit:focus-visible {
    outline: 3px solid rgba(244, 197, 66, .65);
    outline-offset: 2px;
}

.login-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin-top: 1rem;
    padding: 0;
}

.login-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-width: 0;
    min-height: 2rem;
    padding: .38rem .6rem;
    border: 1px solid var(--login-line);
    border-radius: 999px;
    background: #f8fafc;
    color: #505659;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
}

.login-meta span i {
    flex: 0 0 auto;
}

.login-footnote {
    display: block;
    margin: 1rem 0 0;
    padding: .95rem 0 0;
    border-top: 1px solid var(--login-line);
    color: var(--login-muted);
    font-size: .8rem;
    line-height: 1.35;
    text-align: center;
}

.login-footnote span {
    display: block;
}

.login-footnote span + span {
    margin-top: .18rem;
}

@media (max-width: 575px) {
    .login-shell {
        grid-template-columns: minmax(0, 1fr);
        padding: .75rem;
    }

    .login-shell::before {
        height: 17.5rem;
        min-height: 17.5rem;
        background-position: center 46%;
    }

    .login-card {
        max-width: calc(100vw - 1.5rem);
        padding: 1rem;
    }

    .login-card-brand {
        margin-bottom: .95rem;
    }

    .login-logo-lockup,
    .login-card-brand .login-logo-lockup {
        gap: .5rem;
        padding-inline: 0;
    }

    .login-brand-logo {
        width: clamp(7.5rem, 42vw, 9rem);
        max-width: 52%;
    }

    .login-logo-divider {
        min-height: 2rem;
    }

    .login-logo-label {
        max-width: 6.3rem;
        font-size: .7rem;
    }

    .login-card-header {
        align-items: flex-start;
        gap: .7rem;
        margin-bottom: 1rem;
    }

    .login-card .login-icon,
    .login-icon {
        flex-basis: 2.45rem;
        width: 2.45rem;
        height: 2.45rem;
    }

    .login-card h1,
    .login-card h2 {
        font-size: 1.1rem;
    }

    .login-card-header p,
    .login-alert {
        font-size: .84rem;
    }

    .login-input-group .input-group-text {
        flex-basis: 2.65rem;
        width: 2.65rem;
    }

    .login-input-group .form-control,
    .login-submit {
        min-height: 2.85rem;
    }

    .login-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 680px) {
    .login-shell {
        align-content: start;
        align-items: start;
        padding-block: .75rem;
    }

    .login-shell::before {
        height: 15rem;
        min-height: 15rem;
    }

    .login-card {
        padding: 1rem;
    }

    .login-card-brand,
    .login-card-header {
        margin-bottom: .8rem;
    }

    .login-form {
        gap: .75rem;
    }

    .login-input-group .form-control,
    .login-submit {
        min-height: 2.75rem;
    }

    .login-meta {
        margin-top: .75rem;
    }

    .login-footnote {
        margin-top: .75rem;
        padding-top: .75rem;
    }
}

/* Superficies LGPD padronizadas */
.login-privacy-link {
    color: var(--login-brand);
    font-weight: 800;
    text-decoration: none;
}

.login-privacy-link:hover,
.login-privacy-link:focus {
    color: var(--login-brand-strong);
    text-decoration: underline;
}

.privacy-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .65rem;
    margin-top: 1.5rem;
    padding: .9rem 0 0;
    border-top: 1px solid var(--line, #dbe2ea);
    color: var(--muted, #737b80);
    font-size: .82rem;
    font-weight: 650;
}

.privacy-footer a {
    color: var(--brand, #3a5ea6);
    font-weight: 850;
    text-decoration: none;
}

.privacy-footer a:hover,
.privacy-footer a:focus {
    color: var(--brand-strong, #325497);
    text-decoration: underline;
}

.privacy-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, #fff 0, #f7f9fc 18rem, #f0f2f5 42rem),
        linear-gradient(135deg, rgba(58, 94, 166, .08), transparent 32rem);
    color: var(--ink, #2a4558);
    font-family: Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.privacy-shell {
    width: min(100% - 2rem, 1180px);
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) 0 3rem;
}

.privacy-hero,
.privacy-card {
    border: 1px solid var(--line, #dbe2ea);
    border-radius: var(--radius, 8px);
    background: #fff;
    box-shadow: var(--shadow-soft, 0 10px 24px rgba(17, 53, 103, .055));
}

.privacy-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.privacy-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
}

.privacy-brand-logo {
    width: 10.25rem;
    max-width: 42vw;
}

.privacy-brand span {
    align-self: stretch;
    width: 1px;
    min-height: 2.35rem;
    background: var(--line-strong, #acb6bf);
}

.privacy-brand strong {
    color: var(--brand-strong, #325497);
    font-size: .86rem;
    font-weight: 850;
    line-height: 1.15;
    text-transform: uppercase;
}

.privacy-back {
    flex: 0 0 auto;
    text-decoration: none;
}

.privacy-card {
    padding: clamp(1rem, 3vw, 1.5rem);
}

.privacy-card .eyebrow {
    margin: 0 0 .35rem;
    color: var(--muted, #737b80);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.privacy-card h1 {
    margin: 0;
    color: var(--ink, #2a4558);
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    font-weight: 850;
    line-height: 1.12;
}

.privacy-card h2 {
    margin: 0 0 .45rem;
    color: var(--ink, #2a4558);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.2;
}

.privacy-card p {
    margin: .7rem 0 0;
    color: var(--muted, #737b80);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.58;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    margin-top: 1.2rem;
}

.privacy-grid article,
.privacy-list {
    border: 1px solid var(--line, #dbe2ea);
    border-radius: var(--radius, 8px);
    background: #f8fafc;
}

.privacy-grid article {
    min-width: 0;
    padding: 1rem;
}

.privacy-list {
    display: grid;
    gap: .85rem;
    margin-top: .85rem;
    padding: 1rem;
}

.privacy-list h2:not(:first-child) {
    margin-top: .35rem;
}

.privacy-list p,
.privacy-grid p {
    margin-top: 0;
}

.privacy-version {
    padding-top: .95rem;
    border-top: 1px solid var(--line, #dbe2ea);
    font-size: .82rem !important;
}

@media (max-width: 720px) {
    .privacy-hero,
    .privacy-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .privacy-grid {
        grid-template-columns: 1fr;
    }

    .privacy-brand span,
    .privacy-brand strong {
        display: none;
    }
}

/* Internal shell standard 2026 */
.app-standard-shell {
    --std-sidebar-width: 288px;
    --std-sidebar-width-compact: 248px;
    --std-content-max: 1480px;
    --std-radius: 8px;
    --std-line: #dbe2ea;
    --std-panel: #ffffff;
    --std-surface: #f4f6f9;
    --std-soft: #f8fafc;
    --std-ink: #2a4558;
    --std-muted: #737b80;
    --std-brand: #3a5ea6;
    --std-brand-strong: #325497;
    --std-shadow: 0 14px 32px rgba(17, 53, 103, .075);
    min-width: 320px;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, #ffffff 0, #f8fafc 16rem, var(--std-surface) 42rem),
        linear-gradient(135deg, rgba(58, 94, 166, .08), transparent 34rem);
}

.app-standard-shell .app-shell {
    min-height: 100dvh;
    background: transparent;
}

@media (min-width: 992px) {
    .app-standard-shell {
        --sidebar-width: var(--std-sidebar-width);
    }

    .app-standard-shell .desktop-sidebar.d-lg-flex {
        display: flex !important;
    }
}

@media (min-width: 992px) and (max-width: 1280px) {
    .app-standard-shell {
        --sidebar-width: var(--std-sidebar-width-compact);
    }
}

.app-standard-shell .desktop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: var(--sidebar-width, var(--std-sidebar-width));
    min-width: var(--sidebar-width, var(--std-sidebar-width));
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid var(--std-line);
    background: rgba(255, 255, 255, .96);
    box-shadow: 8px 0 24px rgba(17, 53, 103, .055);
}

.app-standard-shell .sidebar-brand {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 1rem;
    border-bottom: 1px solid var(--std-line);
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(10px);
}

.app-standard-shell .app-logo-lockup {
    min-width: 0;
}

.app-standard-shell .sidebar-brand .app-brand-logo,
.app-standard-shell .mobile-navigation-header .app-brand-logo {
    width: 10rem;
    max-width: 70%;
}

.app-standard-shell .app-logo-label {
    color: var(--std-brand-strong);
    font-size: .78rem;
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: 0;
    text-transform: uppercase;
}

.app-standard-shell .app-nav {
    display: grid;
    gap: .25rem;
    padding: .9rem;
}

.app-standard-shell .nav-section {
    margin: .85rem .45rem .25rem;
    color: var(--std-muted);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.app-standard-shell .nav-link {
    display: grid;
    grid-template-columns: 1.35rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    min-height: 2.55rem;
    padding: .58rem .7rem;
    border: 1px solid transparent;
    border-radius: var(--std-radius);
    color: var(--std-ink);
    font-size: .9rem;
    font-weight: 750;
    line-height: 1.18;
    text-decoration: none;
}

.app-standard-shell .nav-link i {
    color: var(--std-brand);
    font-size: 1rem;
}

.app-standard-shell .nav-link span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.app-standard-shell .nav-link:hover,
.app-standard-shell .nav-link:focus,
.app-standard-shell .nav-link.active,
.app-standard-shell .nav-link[aria-current="page"] {
    border-color: rgba(58, 94, 166, .24);
    background: #e8eef9;
    color: var(--std-brand-strong);
    text-decoration: none;
}

.app-standard-shell .main {
    min-width: 0;
    margin-left: var(--sidebar-width, var(--std-sidebar-width));
}

.app-standard-shell .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
    min-height: 4.75rem;
    padding: .75rem clamp(1rem, 2.4vw, 1.5rem);
    border-bottom: 1px solid var(--std-line);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 24px rgba(17, 53, 103, .055);
    backdrop-filter: blur(10px);
}

.app-standard-shell .topbar-title {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.app-standard-shell .page-heading {
    min-width: 0;
}

.app-standard-shell .page-title {
    color: var(--std-ink);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.app-standard-shell .page-subtitle {
    margin-top: .2rem;
    color: var(--std-muted);
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.app-standard-shell .user-menu {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
    margin: 0;
}

.app-standard-shell .user-identity {
    display: grid;
    min-width: 0;
    text-align: right;
}

.app-standard-shell .user-name,
.app-standard-shell .user-role {
    min-width: 0;
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-standard-shell .user-name {
    color: var(--std-ink);
    font-size: .88rem;
    font-weight: 800;
}

.app-standard-shell .user-role {
    color: var(--std-muted);
    font-size: .72rem;
    font-weight: 750;
    text-transform: uppercase;
}

.app-standard-shell .shell-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: min(28rem, 34vw);
    padding: .35rem;
    border: 1px solid var(--std-line);
    border-radius: var(--std-radius);
    background: #fff;
}

.app-standard-shell .shell-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--std-ink);
    font: inherit;
}

.app-standard-shell .content-wrap {
    width: min(100%, var(--std-content-max));
    margin-inline: auto;
    padding: clamp(1rem, 2.4vw, 1.5rem);
}

.app-standard-shell .messages {
    display: grid;
    gap: .65rem;
    margin-bottom: 1rem;
}

.app-standard-shell .message {
    border-radius: var(--std-radius);
    border: 1px solid var(--std-line);
    box-shadow: none;
}

.app-standard-shell .button,
.app-standard-shell .btn,
.app-standard-shell .table-actions a,
.app-standard-shell .table-actions button {
    max-width: 100%;
    min-height: 2.5rem;
    border-radius: .5rem;
    font-weight: 750;
    line-height: 1.1;
    white-space: normal;
}

.app-standard-shell .button:hover,
.app-standard-shell .btn:hover,
.app-standard-shell .table-actions a:hover,
.app-standard-shell .table-actions button:hover {
    transform: none;
}

.app-standard-shell .panel,
.app-standard-shell .card,
.app-standard-shell .stat-card,
.app-standard-shell .table-card,
.app-standard-shell .form-card,
.app-standard-shell .detail-card,
.app-standard-shell .filter-card,
.app-standard-shell .report-card,
.app-standard-shell .documents-card,
.app-standard-shell .overview-card,
.app-standard-shell .attachment-card,
.app-standard-shell .access-card,
.app-standard-shell .management-card,
.app-standard-shell .quick-card,
.app-standard-shell .operational-form {
    border: 1px solid var(--std-line);
    border-radius: var(--std-radius);
    background: var(--std-panel);
    box-shadow: var(--std-shadow);
}

.app-standard-shell .panel,
.app-standard-shell .form-card,
.app-standard-shell .detail-card,
.app-standard-shell .filter-card,
.app-standard-shell .table-card,
.app-standard-shell .operational-form {
    padding: clamp(1rem, 2vw, 1.25rem);
}

.app-standard-shell .panel-header,
.app-standard-shell .panel-heading,
.app-standard-shell .form-card-header,
.app-standard-shell .form-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .85rem;
    margin-bottom: 1rem;
}

.app-standard-shell .panel-header h1,
.app-standard-shell .panel-header h2,
.app-standard-shell .panel-heading h1,
.app-standard-shell .panel-heading h2,
.app-standard-shell .form-card-header h1,
.app-standard-shell .form-card-header h2 {
    margin: 0;
    color: var(--std-ink);
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0;
}

.app-standard-shell .panel-header p,
.app-standard-shell .panel-heading p,
.app-standard-shell .form-card-header p,
.app-standard-shell .panel-subtitle {
    margin: .25rem 0 0;
    color: var(--std-muted);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.45;
}

.app-standard-shell .form-grid,
.app-standard-shell .form-grid-compact,
.app-standard-shell .filter-panel,
.app-standard-shell .fleet-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 1rem;
}

.app-standard-shell .form-control,
.app-standard-shell .form-select,
.app-standard-shell input[type="text"],
.app-standard-shell input[type="search"],
.app-standard-shell input[type="email"],
.app-standard-shell input[type="number"],
.app-standard-shell input[type="date"],
.app-standard-shell input[type="password"],
.app-standard-shell textarea,
.app-standard-shell select {
    max-width: 100%;
    border-radius: .5rem;
}

.app-standard-shell textarea {
    min-height: 8rem;
    resize: vertical;
}

.app-standard-shell .form-actions,
.app-standard-shell .form-footer,
.app-standard-shell .filter-actions,
.app-standard-shell .detail-actions,
.app-standard-shell .table-actions,
.app-standard-shell .row-actions,
.app-standard-shell .action-group,
.app-standard-shell .document-actions,
.app-standard-shell .document-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
}

.app-standard-shell .table-wrap,
.app-standard-shell .table-responsive,
.app-standard-shell .contracts-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--std-radius);
}

.app-standard-shell table,
.app-standard-shell .data-table,
.app-standard-shell .system-table,
.app-standard-shell .contracts-table,
.app-standard-shell .management-table,
.app-standard-shell .document-table,
.app-standard-shell .approval-table,
.app-standard-shell .governance-users-table,
.app-standard-shell .integrity-table {
    width: 100%;
    min-width: 720px;
}

.app-standard-shell th,
.app-standard-shell td,
.app-standard-shell .data-table th,
.app-standard-shell .data-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

.app-standard-shell th,
.app-standard-shell .data-table th {
    color: #505659;
    background: #f8fafc;
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.app-standard-shell .stat-card {
    min-width: 0;
    padding: 1rem;
}

.app-standard-shell .stat-card strong,
.app-standard-shell .stat-card span,
.app-standard-shell .stat-card small {
    overflow-wrap: anywhere;
}

.app-standard-shell .privacy-footer {
    margin-top: 1.75rem;
}

@media (max-width: 991.98px) {
    .app-standard-shell {
        --sidebar-width: 0px;
    }

    .app-standard-shell .desktop-sidebar {
        display: none !important;
    }

    .app-standard-shell .main {
        margin-left: 0 !important;
    }

    .app-standard-shell .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        min-height: auto;
        padding: .75rem 1rem;
    }

    .app-standard-shell .topbar-title {
        width: 100%;
    }

    .app-standard-shell .user-menu {
        margin-left: auto;
    }

    .app-standard-shell .shell-search {
        order: 3;
        width: 100%;
        min-width: 0;
    }

    .app-standard-shell .mobile-menu-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.55rem;
        height: 2.55rem;
        border: 1px solid var(--std-line);
        border-radius: var(--std-radius);
        background: #fff;
        color: var(--std-ink);
        cursor: pointer;
    }

    .app-standard-shell .mobile-navigation-panel {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        width: min(88vw, 370px);
        max-width: calc(100vw - 1rem);
        height: 100dvh;
        overflow-y: auto;
        padding: 1rem;
        border-right: 1px solid var(--std-line);
        border-radius: 0 var(--std-radius) var(--std-radius) 0;
        background: #fff;
        box-shadow: 0 18px 48px rgba(17, 53, 103, .22);
    }

    .app-standard-shell .mobile-navigation[open]::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(24, 32, 42, .38);
    }
}

@media (max-width: 640px) {
    .app-standard-shell .topbar {
        gap: .7rem;
    }

    .app-standard-shell .topbar-logo-lockup .app-logo-divider,
    .app-standard-shell .topbar-logo-lockup .app-logo-label {
        display: none;
    }

    .app-standard-shell .page-title {
        font-size: 1rem;
    }

    .app-standard-shell .page-subtitle {
        font-size: .76rem;
    }

    .app-standard-shell .user-identity {
        display: none;
    }

    .app-standard-shell .content-wrap {
        padding: .85rem;
    }

    .app-standard-shell .panel,
    .app-standard-shell .form-card,
    .app-standard-shell .detail-card,
    .app-standard-shell .filter-card,
    .app-standard-shell .table-card,
    .app-standard-shell .operational-form {
        padding: .9rem;
    }

    .app-standard-shell .panel-header,
    .app-standard-shell .panel-heading,
    .app-standard-shell .form-card-header,
    .app-standard-shell .form-section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .app-standard-shell .form-actions,
    .app-standard-shell .form-footer,
    .app-standard-shell .filter-actions,
    .app-standard-shell .detail-actions,
    .app-standard-shell .table-actions,
    .app-standard-shell .row-actions,
    .app-standard-shell .action-group,
    .app-standard-shell .document-actions,
    .app-standard-shell .document-actions-row {
        align-items: stretch;
        flex-direction: column;
    }

    .app-standard-shell .button,
    .app-standard-shell .btn,
    .app-standard-shell .form-actions .button,
    .app-standard-shell .form-footer .button,
    .app-standard-shell .filter-actions .button,
    .app-standard-shell .detail-actions .button,
    .app-standard-shell .table-actions a,
    .app-standard-shell .table-actions button,
    .app-standard-shell .row-actions .button {
        width: 100%;
        justify-content: center;
    }

    .app-standard-shell table,
    .app-standard-shell .data-table,
    .app-standard-shell .system-table,
    .app-standard-shell .contracts-table,
    .app-standard-shell .management-table,
    .app-standard-shell .document-table,
    .app-standard-shell .approval-table,
    .app-standard-shell .governance-users-table,
    .app-standard-shell .integrity-table {
        min-width: 640px;
    }
}

/* Alignment refinement 2026-06 */
.app-standard-shell,
.app-standard-shell * {
    box-sizing: border-box;
}

.app-standard-shell {
    --std-gap: 1rem;
    --std-gap-sm: .65rem;
    --std-focus: 0 0 0 .2rem rgba(58, 94, 166, .16);
}

.app-standard-shell .main {
    width: calc(100% - var(--sidebar-width, var(--std-sidebar-width)));
    min-height: 100dvh;
}

.app-standard-shell .content-wrap {
    display: grid;
    align-content: start;
    gap: var(--std-gap);
}

.app-standard-shell .page-header,
.app-standard-shell .dashboard-header,
.app-standard-shell .list-header,
.app-standard-shell .contract-list-header,
.app-standard-shell .consulta-header,
.app-standard-shell .detail-consulta-header,
.app-standard-shell .documents-header,
.app-standard-shell .form-page-header,
.app-standard-shell .content-toolbar,
.app-standard-shell .report-toolbar,
.app-standard-shell .results-toolbar,
.app-standard-shell .action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--std-gap);
    width: 100%;
    margin: 0 0 var(--std-gap);
}

.app-standard-shell .page-header > *,
.app-standard-shell .dashboard-header > *,
.app-standard-shell .list-header > *,
.app-standard-shell .contract-list-header > *,
.app-standard-shell .consulta-header > *,
.app-standard-shell .detail-consulta-header > *,
.app-standard-shell .documents-header > *,
.app-standard-shell .form-page-header > *,
.app-standard-shell .content-toolbar > *,
.app-standard-shell .report-toolbar > *,
.app-standard-shell .results-toolbar > *,
.app-standard-shell .action-bar > * {
    min-width: 0;
}

.app-standard-shell .page-header h1,
.app-standard-shell .dashboard-header h1,
.app-standard-shell .list-header h1,
.app-standard-shell .contract-list-header h1,
.app-standard-shell .consulta-header h1,
.app-standard-shell .detail-consulta-header h1,
.app-standard-shell .documents-header h1,
.app-standard-shell .form-page-header h1,
.app-standard-shell .section-title {
    margin: 0;
    color: var(--std-ink);
    font-size: clamp(1.15rem, 1.9vw, 1.55rem);
    font-weight: 850;
    line-height: 1.18;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.app-standard-shell .dashboard-grid,
.app-standard-shell .dashboard-simple-grid,
.app-standard-shell .dashboard-grid-wide,
.app-standard-shell .dashboard-panel-grid,
.app-standard-shell .chefia-main-grid,
.app-standard-shell .chefia-secondary-grid,
.app-standard-shell .executive-panels,
.app-standard-shell .management-section-grid,
.app-standard-shell .management-split-grid,
.app-standard-shell .contract-overview-grid,
.app-standard-shell .contract-summary-grid,
.app-standard-shell .report-link-grid,
.app-standard-shell .reports-grid,
.app-standard-shell .risk-grid,
.app-standard-shell .home-quick-grid,
.app-standard-shell .system-grid,
.app-standard-shell .fleet-report-grid,
.app-standard-shell .detail-grid,
.app-standard-shell .definition-grid,
.app-standard-shell .consulta-detail-grid,
.app-standard-shell .transparency-detail-grid,
.app-standard-shell .timeline-detail-grid,
.app-standard-shell .approval-json-grid,
.app-standard-shell .fleet-detail-grid,
.app-standard-shell .filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: var(--std-gap);
    align-items: stretch;
}

.app-standard-shell .stat-grid,
.app-standard-shell .home-stat-grid,
.app-standard-shell .dashboard-stat-grid,
.app-standard-shell .metrics-grid,
.app-standard-shell .metrics-grid-main,
.app-standard-shell .chefia-metrics,
.app-standard-shell .executive-metrics,
.app-standard-shell .dashboard-simple-metrics,
.app-standard-shell .monthly-metrics,
.app-standard-shell .usage-metrics,
.app-standard-shell .list-stats,
.app-standard-shell .list-stats-wide,
.app-standard-shell .monthly-movement-grid,
.app-standard-shell .usage-operation-grid,
.app-standard-shell .access-grid,
.app-standard-shell .privacy-grid,
.app-standard-shell .approval-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
    gap: var(--std-gap);
    align-items: stretch;
}

.app-standard-shell .panel,
.app-standard-shell .card,
.app-standard-shell .stat-card,
.app-standard-shell .metric,
.app-standard-shell .overview-card,
.app-standard-shell .management-card,
.app-standard-shell .quick-card,
.app-standard-shell .home-quick-card,
.app-standard-shell .risk-card,
.app-standard-shell .attachment-card,
.app-standard-shell .contract-mobile-card,
.app-standard-shell .checkbox-card,
.app-standard-shell .danger-card,
.app-standard-shell .calendar-criteria-card,
.app-standard-shell .help-card,
.app-standard-shell .report-card,
.app-standard-shell .documents-card,
.app-standard-shell .table-card,
.app-standard-shell .form-card,
.app-standard-shell .detail-card,
.app-standard-shell .filter-card {
    min-width: 0;
}

.app-standard-shell .panel > :first-child,
.app-standard-shell .card > :first-child,
.app-standard-shell .table-card > :first-child,
.app-standard-shell .form-card > :first-child,
.app-standard-shell .detail-card > :first-child,
.app-standard-shell .filter-card > :first-child {
    margin-top: 0;
}

.app-standard-shell .panel > :last-child,
.app-standard-shell .card > :last-child,
.app-standard-shell .table-card > :last-child,
.app-standard-shell .form-card > :last-child,
.app-standard-shell .detail-card > :last-child,
.app-standard-shell .filter-card > :last-child {
    margin-bottom: 0;
}

.app-standard-shell .filter-card form,
.app-standard-shell form.filter-panel,
.app-standard-shell form.fleet-filter,
.app-standard-shell .search-form,
.app-standard-shell .filters,
.app-standard-shell .filters-compact,
.app-standard-shell .filters-reports,
.app-standard-shell .filters-audit,
.app-standard-shell .filters-usage,
.app-standard-shell .filters-monthly,
.app-standard-shell .filters-approvals,
.app-standard-shell .filters-approval-report,
.app-standard-shell .filtros-grid,
.app-standard-shell .transparency-filters,
.app-standard-shell .notification-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: var(--std-gap);
    align-items: end;
}

.app-standard-shell .form-grid > .form-actions,
.app-standard-shell .form-grid-compact > .form-actions,
.app-standard-shell .filter-card form > .filter-actions,
.app-standard-shell .filter-panel > .filter-actions,
.app-standard-shell .fleet-filter > .fleet-filter-actions,
.app-standard-shell .search-form > .actions {
    grid-column: 1 / -1;
}

.app-standard-shell .form-field,
.app-standard-shell .form-group,
.app-standard-shell .detail-item,
.app-standard-shell .metric,
.app-standard-shell .stat-card,
.app-standard-shell .list-item,
.app-standard-shell .stack-list > *,
.app-standard-shell .detail-list > * {
    min-width: 0;
}

.app-standard-shell .form-label,
.app-standard-shell label {
    color: var(--std-ink);
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.25;
}

.app-standard-shell .form-control:focus,
.app-standard-shell .form-select:focus,
.app-standard-shell input:focus,
.app-standard-shell select:focus,
.app-standard-shell textarea:focus,
.app-standard-shell .button:focus-visible,
.app-standard-shell .btn:focus-visible,
.app-standard-shell .nav-link:focus-visible {
    outline: 0;
    box-shadow: var(--std-focus);
}

.app-standard-shell .badge,
.app-standard-shell span[class*="badge-"],
.app-standard-shell strong[class*="badge-"],
.app-standard-shell small[class*="badge-"],
.app-standard-shell a[class*="badge-"],
.app-standard-shell div[class*="badge-"],
.app-standard-shell .status-informacao,
.app-standard-shell .status-sem-informacao,
.app-standard-shell .deadline-badge,
.app-standard-shell .nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    max-width: 100%;
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 850;
    line-height: 1.1;
    text-align: center;
    overflow-wrap: anywhere;
    white-space: normal;
}

.app-standard-shell .actions,
.app-standard-shell .consulta-actions,
.app-standard-shell .contract-detail-actions,
.app-standard-shell .management-actions,
.app-standard-shell .notification-actions,
.app-standard-shell .timeline-actions,
.app-standard-shell .results-actions,
.app-standard-shell .public-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--std-gap-sm);
    margin-left: auto;
}

.app-standard-shell .pagination,
.app-standard-shell .pagination-contracts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin-top: var(--std-gap);
}

.app-standard-shell .table-card,
.app-standard-shell .contracts-panel,
.app-standard-shell .transparency-results-panel,
.app-standard-shell .approval-actions-panel,
.app-standard-shell .executive-decision-panel {
    overflow: hidden;
}

.app-standard-shell .table-wrap,
.app-standard-shell .table-responsive,
.app-standard-shell .contracts-table-wrap,
.app-standard-shell .consulta-table-wrap {
    -webkit-overflow-scrolling: touch;
}

.app-standard-shell .empty-state,
.app-standard-shell .empty,
.app-standard-shell .compact-empty,
.app-standard-shell .data-state-empty,
.app-standard-shell .empty-inline,
.app-standard-shell .empty-documents {
    display: grid;
    justify-items: center;
    gap: .5rem;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px dashed var(--std-line);
    border-radius: var(--std-radius);
    background: var(--std-soft);
    color: var(--std-muted);
    text-align: center;
}

.login-card {
    width: min(100%, 30rem);
    margin-inline: auto;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(17, 53, 103, .075);
}

.login-card-brand,
.login-card-header,
.login-form {
    min-width: 0;
}

.login-card-header {
    text-align: left;
}

.login-form {
    display: grid;
    gap: .9rem;
}

.login-form .form-control,
.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    max-width: 100%;
    border-radius: .5rem;
}

.login-form .button,
.login-form .btn,
.login-form button[type="submit"] {
    width: 100%;
    justify-content: center;
    min-height: 2.65rem;
    white-space: normal;
}

@media (max-width: 991.98px) {
    .app-standard-shell .main {
        width: 100%;
    }

    .app-standard-shell .content-wrap {
        width: 100%;
        max-width: none;
    }

    .app-standard-shell .topbar-title {
        flex: 1 1 100%;
    }

    .app-standard-shell .page-header,
    .app-standard-shell .dashboard-header,
    .app-standard-shell .list-header,
    .app-standard-shell .contract-list-header,
    .app-standard-shell .consulta-header,
    .app-standard-shell .detail-consulta-header,
    .app-standard-shell .documents-header,
    .app-standard-shell .form-page-header,
    .app-standard-shell .content-toolbar,
    .app-standard-shell .report-toolbar,
    .app-standard-shell .results-toolbar,
    .app-standard-shell .action-bar {
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .app-standard-shell {
        --std-gap: .8rem;
    }

    .app-standard-shell .dashboard-grid,
    .app-standard-shell .dashboard-simple-grid,
    .app-standard-shell .dashboard-grid-wide,
    .app-standard-shell .dashboard-panel-grid,
    .app-standard-shell .chefia-main-grid,
    .app-standard-shell .chefia-secondary-grid,
    .app-standard-shell .executive-panels,
    .app-standard-shell .management-section-grid,
    .app-standard-shell .management-split-grid,
    .app-standard-shell .contract-overview-grid,
    .app-standard-shell .contract-summary-grid,
    .app-standard-shell .report-link-grid,
    .app-standard-shell .reports-grid,
    .app-standard-shell .risk-grid,
    .app-standard-shell .home-quick-grid,
    .app-standard-shell .system-grid,
    .app-standard-shell .fleet-report-grid,
    .app-standard-shell .detail-grid,
    .app-standard-shell .definition-grid,
    .app-standard-shell .consulta-detail-grid,
    .app-standard-shell .transparency-detail-grid,
    .app-standard-shell .timeline-detail-grid,
    .app-standard-shell .approval-json-grid,
    .app-standard-shell .fleet-detail-grid,
    .app-standard-shell .filter-grid,
    .app-standard-shell .stat-grid,
    .app-standard-shell .home-stat-grid,
    .app-standard-shell .dashboard-stat-grid,
    .app-standard-shell .metrics-grid,
    .app-standard-shell .metrics-grid-main,
    .app-standard-shell .chefia-metrics,
    .app-standard-shell .executive-metrics,
    .app-standard-shell .dashboard-simple-metrics,
    .app-standard-shell .monthly-metrics,
    .app-standard-shell .usage-metrics,
    .app-standard-shell .list-stats,
    .app-standard-shell .list-stats-wide,
    .app-standard-shell .monthly-movement-grid,
    .app-standard-shell .usage-operation-grid,
    .app-standard-shell .access-grid,
    .app-standard-shell .privacy-grid,
    .app-standard-shell .approval-action-grid,
    .app-standard-shell .filter-card form,
    .app-standard-shell form.filter-panel,
    .app-standard-shell form.fleet-filter,
    .app-standard-shell .search-form,
    .app-standard-shell .filters,
    .app-standard-shell .filters-compact,
    .app-standard-shell .filters-reports,
    .app-standard-shell .filters-audit,
    .app-standard-shell .filters-usage,
    .app-standard-shell .filters-monthly,
    .app-standard-shell .filters-approvals,
    .app-standard-shell .filters-approval-report,
    .app-standard-shell .filtros-grid,
    .app-standard-shell .transparency-filters,
    .app-standard-shell .notification-filters {
        grid-template-columns: 1fr;
    }

    .app-standard-shell .actions,
    .app-standard-shell .consulta-actions,
    .app-standard-shell .contract-detail-actions,
    .app-standard-shell .management-actions,
    .app-standard-shell .notification-actions,
    .app-standard-shell .timeline-actions,
    .app-standard-shell .results-actions,
    .app-standard-shell .public-actions {
        width: 100%;
        margin-left: 0;
        justify-content: stretch;
    }
}

@media (max-width: 575px) {
    .login-card {
        width: 100%;
        border-radius: 8px;
    }
}

/* Color, alignment and responsive polish 2026-06 */
.app-standard-shell {
    --std-brand: #305a9f;
    --std-brand-strong: #214a86;
    --std-accent: #0f766e;
    --std-info: #256d85;
    --std-success: #24724f;
    --std-warning: #936300;
    --std-danger: #a7352a;
    --std-ink: #1f3446;
    --std-muted: #5f6b75;
    --std-line: #d7dee7;
    --std-surface: #f3f6f9;
    --std-soft: #f8fafc;
    --std-shadow: 0 12px 28px rgba(21, 48, 82, .08);
    background:
        linear-gradient(180deg, #ffffff 0, #f8fafc 15rem, var(--std-surface) 44rem),
        linear-gradient(135deg, rgba(48, 90, 159, .09), transparent 30rem),
        linear-gradient(315deg, rgba(15, 118, 110, .07), transparent 28rem);
}

.app-standard-shell .content-wrap {
    gap: 1.1rem;
}

.app-standard-shell .desktop-sidebar,
.app-standard-shell .topbar {
    background: rgba(255, 255, 255, .98);
    border-color: var(--std-line);
}

.app-standard-shell .sidebar-brand {
    border-bottom-color: var(--std-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(248, 250, 252, .98));
}

.app-standard-shell .app-logo-label,
.app-standard-shell .page-title,
.app-standard-shell .page-header h1,
.app-standard-shell .dashboard-header h1,
.app-standard-shell .list-header h1,
.app-standard-shell .section-title {
    color: var(--std-ink);
}

.app-standard-shell .page-title {
    font-size: 1.28rem;
}

.app-standard-shell .page-header h1,
.app-standard-shell .dashboard-header h1,
.app-standard-shell .list-header h1,
.app-standard-shell .section-title {
    font-size: 1.42rem;
}

.app-standard-shell .page-subtitle,
.app-standard-shell .panel-subtitle,
.app-standard-shell .panel-header p,
.app-standard-shell .panel-heading p,
.app-standard-shell .form-card-header p {
    color: var(--std-muted);
}

.app-standard-shell .nav-section {
    color: #687787;
}

.app-standard-shell .nav-link {
    border-left: 3px solid transparent;
    color: var(--std-ink);
}

.app-standard-shell .nav-link i {
    color: var(--std-info);
}

.app-standard-shell .nav-link:hover,
.app-standard-shell .nav-link:focus {
    border-color: rgba(48, 90, 159, .22);
    border-left-color: var(--std-info);
    background: #f1f6fb;
}

.app-standard-shell .nav-link.active,
.app-standard-shell .nav-link[aria-current="page"] {
    border-color: rgba(48, 90, 159, .28);
    border-left-color: var(--std-brand);
    background: linear-gradient(90deg, rgba(48, 90, 159, .14), rgba(15, 118, 110, .07));
    color: var(--std-brand-strong);
}

.app-standard-shell .panel,
.app-standard-shell .card,
.app-standard-shell .stat-card,
.app-standard-shell .metric,
.app-standard-shell .overview-card,
.app-standard-shell .management-card,
.app-standard-shell .quick-card,
.app-standard-shell .home-quick-card,
.app-standard-shell .risk-card,
.app-standard-shell .attachment-card,
.app-standard-shell .contract-mobile-card,
.app-standard-shell .checkbox-card,
.app-standard-shell .danger-card,
.app-standard-shell .calendar-criteria-card,
.app-standard-shell .help-card,
.app-standard-shell .report-card,
.app-standard-shell .documents-card,
.app-standard-shell .table-card,
.app-standard-shell .form-card,
.app-standard-shell .detail-card,
.app-standard-shell .filter-card {
    border-color: var(--std-line);
    background: #ffffff;
    box-shadow: var(--std-shadow);
}

.app-standard-shell .stat-card,
.app-standard-shell .metric,
.app-standard-shell .overview-card,
.app-standard-shell .quick-card,
.app-standard-shell .home-quick-card {
    border-top: 4px solid var(--std-brand);
}

.app-standard-shell .stat-card:nth-child(4n + 2),
.app-standard-shell .metric:nth-child(4n + 2),
.app-standard-shell .overview-card:nth-child(4n + 2),
.app-standard-shell .quick-card:nth-child(4n + 2),
.app-standard-shell .home-quick-card:nth-child(4n + 2) {
    border-top-color: var(--std-success);
}

.app-standard-shell .stat-card:nth-child(4n + 3),
.app-standard-shell .metric:nth-child(4n + 3),
.app-standard-shell .overview-card:nth-child(4n + 3),
.app-standard-shell .quick-card:nth-child(4n + 3),
.app-standard-shell .home-quick-card:nth-child(4n + 3) {
    border-top-color: var(--std-warning);
}

.app-standard-shell .stat-card:nth-child(4n),
.app-standard-shell .metric:nth-child(4n),
.app-standard-shell .overview-card:nth-child(4n),
.app-standard-shell .quick-card:nth-child(4n),
.app-standard-shell .home-quick-card:nth-child(4n) {
    border-top-color: var(--std-info);
}

.app-standard-shell .stat-card strong,
.app-standard-shell .metric strong,
.app-standard-shell .overview-card strong {
    color: var(--std-ink);
}

.app-standard-shell .button,
.app-standard-shell .btn,
.app-standard-shell .table-actions a,
.app-standard-shell .table-actions button {
    border-color: transparent;
    box-shadow: none;
}

.app-standard-shell .button-primary,
.app-standard-shell .btn-primary,
.app-standard-shell .button:not(.button-secondary):not(.button-danger):not(.button-ghost) {
    background: var(--std-brand);
    border-color: var(--std-brand);
    color: #ffffff;
}

.app-standard-shell .button-primary:hover,
.app-standard-shell .btn-primary:hover,
.app-standard-shell .button:not(.button-secondary):not(.button-danger):not(.button-ghost):hover {
    background: var(--std-brand-strong);
    border-color: var(--std-brand-strong);
    color: #ffffff;
}

.app-standard-shell .button-secondary,
.app-standard-shell .btn-secondary {
    background: #eef3f8;
    border-color: #cfd9e4;
    color: var(--std-ink);
}

.app-standard-shell .button-ghost,
.app-standard-shell .btn-light {
    background: #ffffff;
    border-color: var(--std-line);
    color: var(--std-brand-strong);
}

.app-standard-shell .button-danger,
.app-standard-shell .btn-danger {
    background: var(--std-danger);
    border-color: var(--std-danger);
    color: #ffffff;
}

.app-standard-shell .form-control,
.app-standard-shell .form-select,
.app-standard-shell input[type="text"],
.app-standard-shell input[type="search"],
.app-standard-shell input[type="email"],
.app-standard-shell input[type="number"],
.app-standard-shell input[type="date"],
.app-standard-shell input[type="password"],
.app-standard-shell textarea,
.app-standard-shell select {
    border: 1px solid #cfd9e4;
    background-color: #ffffff;
    color: var(--std-ink);
}

.app-standard-shell .form-control:focus,
.app-standard-shell .form-select:focus,
.app-standard-shell input:focus,
.app-standard-shell select:focus,
.app-standard-shell textarea:focus {
    border-color: var(--std-brand);
}

.app-standard-shell th,
.app-standard-shell .data-table th {
    background: #edf2f7;
    color: #314253;
}

.app-standard-shell tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.app-standard-shell tbody tr:hover td {
    background: #f3f7fb;
}

.app-standard-shell .badge-success,
.app-standard-shell .badge-vigente,
.app-standard-shell .status-informacao {
    background: #edf7f1;
    color: var(--std-success);
}

.app-standard-shell .badge-warning,
.app-standard-shell .badge-pendente,
.app-standard-shell .deadline-badge-vence-30,
.app-standard-shell .deadline-badge-vence-60,
.app-standard-shell .deadline-badge-vence-90 {
    background: #fff7e6;
    color: var(--std-warning);
}

.app-standard-shell .badge-danger,
.app-standard-shell .badge-nao-vigente,
.app-standard-shell .deadline-badge-vencido {
    background: #fff0ee;
    color: var(--std-danger);
}

.app-standard-shell .badge-muted,
.app-standard-shell .status-sem-informacao {
    background: #eef2f6;
    color: var(--std-muted);
}

.app-standard-shell .risk-card-danger,
.app-standard-shell .management-card-danger,
.app-standard-shell .danger-card {
    border-left: 4px solid var(--std-danger);
}

.app-standard-shell .risk-card-warning,
.app-standard-shell .management-card-warning {
    border-left: 4px solid var(--std-warning);
}

.app-standard-shell .risk-card-success {
    border-left: 4px solid var(--std-success);
}

.login-card {
    border-top: 4px solid #305a9f;
}

.login-card-header h1,
.login-card-header h2 {
    color: #1f3446;
}

.login-form button[type="submit"],
.login-form .button-primary,
.login-form .btn-primary {
    background: #305a9f;
    border-color: #305a9f;
    color: #ffffff;
}

.login-form button[type="submit"]:hover,
.login-form .button-primary:hover,
.login-form .btn-primary:hover {
    background: #214a86;
    border-color: #214a86;
}

@media (max-width: 768px) {
    .app-standard-shell .topbar {
        padding: .75rem;
        gap: .65rem;
    }

    .app-standard-shell .content-wrap {
        padding: .75rem;
        gap: .8rem;
    }

    .app-standard-shell .page-title,
    .app-standard-shell .page-header h1,
    .app-standard-shell .dashboard-header h1,
    .app-standard-shell .list-header h1,
    .app-standard-shell .section-title {
        font-size: 1.08rem;
    }

    .app-standard-shell .panel,
    .app-standard-shell .form-card,
    .app-standard-shell .detail-card,
    .app-standard-shell .filter-card,
    .app-standard-shell .table-card,
    .app-standard-shell .operational-form,
    .app-standard-shell .stat-card,
    .app-standard-shell .metric {
        padding: .85rem;
    }

    .app-standard-shell .button,
    .app-standard-shell .btn,
    .app-standard-shell .table-actions a,
    .app-standard-shell .table-actions button {
        min-height: 2.75rem;
    }
}
