.page {
    display: flex;
    min-height: 100vh;
}

.main-content {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.main-content .container-fluid {
    flex: 1;
}

:root {
    --sade-bg: #eef2f8;
    --sade-surface: #ffffff;
    --sade-surface-soft: #f7f9fc;
    --sade-border: #dfe6f0;
    --sade-border-strong: #cbd5e1;
    --sade-text: #101827;
    --sade-muted: #64748b;
    --sade-primary: #5b4be7;
    --sade-primary-dark: #4338ca;
    --sade-info: #0ea5e9;
    --sade-success: #10b981;
    --sade-warning: #f2aa2e;
    --sade-danger: #ef4444;
    --sade-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --sade-shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body {
    background: var(--sade-bg);
    color: var(--sade-text);
}

.app-content {
    background: var(--sade-bg);
}

.main-content.app-content {
    padding-top: 1.25rem;
}

.main-content .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.app-header {
    border-bottom: 1px solid rgba(203, 213, 225, 0.7);
    box-shadow: var(--sade-shadow-sm);
}

.app-sidebar {
    box-shadow: 10px 0 28px rgba(15, 23, 42, 0.16);
}

.app-sidebar .slide__category .category-name {
    color: rgba(191, 219, 254, 0.7);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.app-sidebar .side-menu__item {
    align-items: center;
    border-radius: 7px;
    display: flex;
    font-size: 0.82rem;
    gap: 0.52rem;
    line-height: 1.2;
    margin: 2px 10px;
    min-height: 38px;
    padding-bottom: 0.48rem;
    padding-top: 0.48rem;
}

.app-sidebar .side-menu__label {
    flex: 1 1 auto;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar .side-menu__icon {
    flex: 0 0 1rem;
    font-size: 1rem;
    margin-inline-end: 0;
    min-width: 1rem;
    opacity: 0.95;
}

.app-sidebar .side-menu__angle {
    flex: 0 0 auto;
    font-size: 0.78rem;
    margin-inline-start: auto;
}

.app-sidebar .slide-menu.child1 .side-menu__item {
    font-size: 0.79rem;
    gap: 0.45rem;
    min-height: 34px;
    padding-bottom: 0.4rem;
    padding-top: 0.4rem;
}


.app-sidebar .slide-menu.child1 .side-menu__label {
    font-size: 0.76rem;
}
.app-sidebar .side-menu__item:hover,
.app-sidebar .slide.active > .side-menu__item,
.app-sidebar .slide.selected > .side-menu__item {
    background: rgba(255, 255, 255, 0.08);
}

.custom-card,
.card.custom-card,
.card {
    background: var(--sade-surface);
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 8px;
    box-shadow: var(--sade-shadow-md);
}

.card-header,
.custom-card .card-header {
    background: var(--sade-surface);
    border-bottom: 1px solid var(--sade-border);
    min-height: 62px;
    padding: 1rem 1.25rem;
}

.card-body,
.custom-card .card-body {
    padding: 1.25rem;
}

.card-title {
    align-items: center;
    color: var(--sade-text);
    display: flex;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 0;
}

.card-title::before {
    background: linear-gradient(180deg, #38bdf8 0%, #7c3aed 100%);
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 18px;
    margin-right: 0.55rem;
    width: 3px;
}

form.row,
.filter-row,
.filters-row {
    background: var(--sade-surface-soft);
    border: 1px solid var(--sade-border);
    border-radius: 8px;
    padding: 0.85rem;
}

.form-control,
.form-select {
    border-color: #d8e1ee;
    border-radius: 7px;
    color: var(--sade-text);
    min-height: 38px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(91, 75, 231, 0.72);
    box-shadow: 0 0 0 0.18rem rgba(91, 75, 231, 0.12);
}

.form-label {
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 600;
}

.table-responsive {
    background: var(--sade-surface);
    border: 1px solid var(--sade-border);
    border-radius: 8px;
}

.table {
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    border-color: #e5ebf3;
    padding: 0.85rem 0.8rem;
    vertical-align: middle;
}

.table thead th,
.table thead td {
    background: #edf3fb;
    border-bottom: 1px solid var(--sade-border-strong);
    color: #263244;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: none;
}

.table tbody tr {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.table tbody tr:nth-child(even) {
    background: #fbfcfe;
}

.table tbody tr:hover {
    background: #f0f7ff;
}

.table td:first-child,
.table th:first-child {
    border-left: 0;
}

.table td:last-child,
.table th:last-child {
    border-right: 0;
}

.btn {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    vertical-align: middle;
}

.btn-sm {
    min-height: 30px;
    padding: 0.42rem 0.68rem;
}

.btn-primary {
    background: var(--sade-primary);
    border-color: var(--sade-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--sade-primary-dark);
    border-color: var(--sade-primary-dark);
}

.btn-secondary,
.btn-info {
    background: var(--sade-info);
    border-color: var(--sade-info);
    color: #ffffff;
}

.btn-warning {
    background: var(--sade-warning);
    border-color: var(--sade-warning);
    color: #1f2937;
}

.btn-danger {
    background: var(--sade-danger);
    border-color: var(--sade-danger);
}

.btn-light {
    background: #edf2f7;
    border-color: #edf2f7;
    color: #334155;
}

.badge {
    border-radius: 6px;
    font-weight: 800;
    padding: 0.35rem 0.5rem;
}

.alert {
    border: 0;
    border-radius: 8px;
    box-shadow: var(--sade-shadow-sm);
}

.pagination {
    gap: 0.25rem;
}

.page-link {
    border-color: var(--sade-border);
    border-radius: 6px;
    color: var(--sade-primary);
}

.active > .page-link,
.page-link.active {
    background: var(--sade-primary);
    border-color: var(--sade-primary);
}

[data-theme-mode="dark"] {
    --sade-bg: #121821;
    --sade-surface: #1b222d;
    --sade-surface-soft: #202936;
    --sade-border: rgba(148, 163, 184, 0.18);
    --sade-border-strong: rgba(148, 163, 184, 0.28);
    --sade-text: #e5edf7;
    --sade-muted: #9aa8ba;
}

[data-theme-mode="dark"] body,
[data-theme-mode="dark"] .app-content {
    background: var(--sade-bg);
    color: var(--sade-text);
}

[data-theme-mode="dark"] .custom-card,
[data-theme-mode="dark"] .card.custom-card,
[data-theme-mode="dark"] .card,
[data-theme-mode="dark"] .card-header,
[data-theme-mode="dark"] .custom-card .card-header,
[data-theme-mode="dark"] .table-responsive {
    background: var(--sade-surface);
    border-color: var(--sade-border);
    color: var(--sade-text);
}

[data-theme-mode="dark"] form.row,
[data-theme-mode="dark"] .filter-row,
[data-theme-mode="dark"] .filters-row {
    background: var(--sade-surface-soft);
    border-color: var(--sade-border);
}

[data-theme-mode="dark"] .table thead th,
[data-theme-mode="dark"] .table thead td {
    background: #263142;
    border-color: var(--sade-border-strong);
    color: #e8eef7;
}

[data-theme-mode="dark"] .table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme-mode="dark"] .table tbody tr:hover {
    background: rgba(56, 189, 248, 0.08);
}

[data-theme-mode="dark"] .table > :not(caption) > * > * {
    border-color: var(--sade-border);
    color: var(--sade-text);
}

[data-theme-mode="dark"] .form-control,
[data-theme-mode="dark"] .form-select {
    background-color: #151c26;
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--sade-text);
}

[data-theme-mode="dark"] .form-control::placeholder {
    color: #7f8da1;
}

[data-theme-mode="dark"] .text-muted,
[data-theme-mode="dark"] .form-label,
[data-theme-mode="dark"] .form-text {
    color: var(--sade-muted) !important;
}

@media (max-width: 768px) {
    .main-content .container-fluid {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .card-body,
    .custom-card .card-body,
    .card-header,
    .custom-card .card-header {
        padding: 0.9rem;
    }

    form.row,
    .filter-row,
    .filters-row {
        padding: 0.75rem;
    }
}
.sade-page-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    width: 100%;
}

.sade-page-header-main {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    min-width: 0;
}

.sade-page-header-icon {
    align-items: center;
    background: linear-gradient(135deg, rgba(91, 75, 231, 0.12), rgba(14, 165, 233, 0.14));
    border: 1px solid rgba(91, 75, 231, 0.12);
    border-radius: 8px;
    color: var(--sade-primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.sade-page-header-icon i {
    font-size: 1.1rem;
}

.sade-page-header-text {
    min-width: 0;
}

.sade-page-header-title {
    color: var(--sade-text);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.sade-page-header-subtitle {
    color: var(--sade-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    margin-top: 0.18rem;
}

.sade-page-header-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
}

.card-header.sade-card-header {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border-bottom: 1px solid var(--sade-border);
    padding: 0.95rem 1.1rem;
}

.card-header.sade-card-header .card-title::before {
    display: none;
}

[data-theme-mode="dark"] .sade-page-header-icon {
    background: rgba(91, 75, 231, 0.18);
    border-color: rgba(125, 152, 210, 0.22);
    color: #aab8ff;
}

[data-theme-mode="dark"] .card-header.sade-card-header {
    background: linear-gradient(180deg, #1f2632 0%, #1b222d 100%);
}

@media (max-width: 768px) {
    .sade-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .sade-page-header-actions {
        width: 100%;
    }
}
/* Cor institucional sem gradiente */
:root {
    --sade-panel-blue: #eaf3ff;
    --sade-panel-blue-strong: #d8e8fb;
    --sade-panel-green: #edf8f3;
    --sade-panel-yellow: #fff7e6;
}

.card-header.sade-card-header {
    background: #eef6ff;
    border-bottom-color: #c9dcef;
}

.sade-page-header-icon {
    background: #dcecff;
    border-color: #b9d4f4;
    color: #245b9c;
}

.sade-page-header-title {
    color: #102a43;
}

.sade-page-header-subtitle {
    color: #486581;
}

form.row,
.filter-row,
.filters-row {
    background: #f0f6fd;
    border-color: #cfe0f2;
}

.table thead th,
.table thead td {
    background: #dfeaf7;
    border-bottom-color: #bfd0e4;
    color: #12324f;
}

.table tbody tr:nth-child(even) {
    background: #f7fbff;
}

.table tbody tr:hover {
    background: #edf6ff;
}

.table td:first-child,
.table th:first-child {
    background-color: rgba(223, 234, 247, 0.34);
}

.custom-card,
.card.custom-card,
.card {
    border-color: #cbdced;
}

.btn-primary {
    background: #5b4be7;
    border-color: #5b4be7;
}

.btn-secondary,
.btn-info {
    background: #2196d3;
    border-color: #2196d3;
}

.btn-light {
    background: #e7edf5;
    border-color: #e7edf5;
    color: #25364a;
}

[data-theme-mode="dark"] .card-header.sade-card-header {
    background: #223049;
    border-bottom-color: rgba(148, 163, 184, 0.24);
}

[data-theme-mode="dark"] .sade-page-header-icon {
    background: #24385c;
    border-color: #365486;
    color: #9fc5ff;
}

[data-theme-mode="dark"] form.row,
[data-theme-mode="dark"] .filter-row,
[data-theme-mode="dark"] .filters-row {
    background: #1f2b3d;
    border-color: rgba(148, 163, 184, 0.22);
}

[data-theme-mode="dark"] .table thead th,
[data-theme-mode="dark"] .table thead td {
    background: #28384e;
    color: #e8f1fb;
}

[data-theme-mode="dark"] .table td:first-child,
[data-theme-mode="dark"] .table th:first-child {
    background-color: rgba(148, 163, 184, 0.08);
}
/* Cartão de módulo com cabeçalho sólido */
.sade-module-card {
    background: #f3f8fc;
    border-color: #bfd2e4;
}

.sade-module-card .card-header.sade-card-header {
    background: #17475f;
    border-bottom-color: #17475f;
    padding: 1.25rem 1.35rem;
}

.sade-module-card .sade-page-header-title {
    color: #ffffff;
    font-size: 1.08rem;
}

.sade-module-card .sade-page-header-subtitle {
    color: #c9dce8;
}

.sade-module-card .sade-page-header-icon {
    background: #0f8a9d;
    border-color: #0f8a9d;
    color: #ffffff;
}

.sade-module-card .card-header.sade-card-header .btn-primary {
    background: #ffffff;
    border-color: #ffffff;
    color: #17475f;
    box-shadow: none;
}

.sade-module-card .card-header.sade-card-header .btn-primary:hover {
    background: #e9f3f8;
    border-color: #e9f3f8;
    color: #12394d;
}

.sade-module-card .card-body {
    background: #eaf3f8;
}

.sade-module-card form.row,
.sade-module-card .filter-row,
.sade-module-card .filters-row {
    background: #dcecf3;
    border-color: #b9d4df;
}

.sade-module-card .table-responsive {
    background: #ffffff;
    border-color: #b9d4df;
}

.sade-module-card .table thead th,
.sade-module-card .table thead td {
    background: #245a72;
    border-color: #245a72;
    color: #ffffff;
}

.sade-module-card .table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.sade-module-card .table tbody tr:nth-child(even) {
    background: #edf6f8;
}

.sade-module-card .table tbody tr:hover {
    background: #dff0f4;
}

.sade-module-card .table td:first-child,
.sade-module-card .table th:first-child {
    background-color: rgba(23, 71, 95, 0.06);
}

.sade-module-card .table thead th:first-child {
    background-color: #1d5067;
}

.sade-module-card td .btn-warning {
    background: #f4b642;
    border-color: #f4b642;
    color: #ffffff;
}

.sade-module-card td .btn-danger {
    background: #e64b3a;
    border-color: #e64b3a;
}

.sade-module-card td .btn-outline-primary {
    background: #ffffff;
    border-color: #6c55f0;
    color: #5b4be7;
}

[data-theme-mode="dark"] .sade-module-card {
    background: #172232;
    border-color: rgba(148, 163, 184, 0.22);
}

[data-theme-mode="dark"] .sade-module-card .card-header.sade-card-header {
    background: #102f40;
    border-bottom-color: #102f40;
}

[data-theme-mode="dark"] .sade-module-card .card-body {
    background: #14202d;
}

[data-theme-mode="dark"] .sade-module-card form.row,
[data-theme-mode="dark"] .sade-module-card .filter-row,
[data-theme-mode="dark"] .sade-module-card .filters-row {
    background: #1c2c3d;
    border-color: rgba(148, 163, 184, 0.24);
}

[data-theme-mode="dark"] .sade-module-card .table thead th,
[data-theme-mode="dark"] .sade-module-card .table thead td {
    background: #24495c;
    color: #ffffff;
}

[data-theme-mode="dark"] .sade-module-card .table tbody tr:nth-child(even) {
    background: rgba(20, 184, 166, 0.06);
}
/* Ajuste azul institucional sem verde */
.sade-module-card .card-header.sade-card-header {
    background: #243b82 !important;
    border-bottom-color: #243b82 !important;
}

.sade-module-card .sade-page-header-title {
    color: #ffffff !important;
}

.sade-module-card .sade-page-header-subtitle {
    color: #dbeafe !important;
}

.sade-module-card .sade-page-header-icon {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

.sade-module-card .card-header.sade-card-header .btn-primary {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #243b82 !important;
}

.sade-module-card .card-header.sade-card-header .btn-primary:hover {
    background: #eff6ff !important;
    border-color: #eff6ff !important;
    color: #1e2f68 !important;
}

.sade-module-card .card-body {
    background: #edf3ff !important;
}

.sade-module-card form.row,
.sade-module-card .filter-row,
.sade-module-card .filters-row {
    background: #dfe8fb !important;
    border-color: #b8c8eb !important;
}

.sade-module-card .table-responsive {
    border-color: #b8c8eb !important;
}

.sade-dropdown-menu-portal {
    z-index: 1090;
}

.sade-module-card .table thead th,
.sade-module-card .table thead td {
    background: #1e3a8a !important;
    border-color: #1e3a8a !important;
    color: #ffffff !important;
}

.sade-module-card .table thead th:first-child,
.sade-module-card .table thead td:first-child {
    background: #1b3275 !important;
}

.sade-module-card .table tbody tr:nth-child(odd) {
    background: #ffffff !important;
}

.sade-module-card .table tbody tr:nth-child(even) {
    background: #f0f5ff !important;
}

.sade-module-card .table tbody tr:hover {
    background: #e4edff !important;
}

.sade-module-card .table td:first-child {
    background-color: rgba(30, 58, 138, 0.07) !important;
}

[data-theme-mode="dark"] .sade-module-card .card-header.sade-card-header {
    background: #1e2f68 !important;
    border-bottom-color: #1e2f68 !important;
}

[data-theme-mode="dark"] .sade-module-card .sade-page-header-icon {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

[data-theme-mode="dark"] .sade-module-card .card-body {
    background: #182235 !important;
}

[data-theme-mode="dark"] .sade-module-card form.row,
[data-theme-mode="dark"] .sade-module-card .filter-row,
[data-theme-mode="dark"] .sade-module-card .filters-row {
    background: #202d46 !important;
    border-color: rgba(147, 169, 214, 0.28) !important;
}

[data-theme-mode="dark"] .sade-module-card .table thead th,
[data-theme-mode="dark"] .sade-module-card .table thead td {
    background: #253b78 !important;
    color: #ffffff !important;
}
/* Correção de contraste do módulo no modo escuro */
[data-theme-mode="dark"] .sade-module-card {
    background: #111827 !important;
    border-color: #334155 !important;
}

[data-theme-mode="dark"] .sade-module-card .card-body {
    background: #111827 !important;
}

[data-theme-mode="dark"] .sade-module-card .table-responsive {
    background: #0f172a !important;
    border-color: #334155 !important;
}

[data-theme-mode="dark"] .sade-module-card .table {
    color: #e5e7eb !important;
}

[data-theme-mode="dark"] .sade-module-card .table tbody tr:nth-child(odd),
[data-theme-mode="dark"] .sade-module-card .table tbody tr:nth-child(odd) td {
    background: #111827 !important;
    color: #e5e7eb !important;
}

[data-theme-mode="dark"] .sade-module-card .table tbody tr:nth-child(even),
[data-theme-mode="dark"] .sade-module-card .table tbody tr:nth-child(even) td {
    background: #172033 !important;
    color: #e5e7eb !important;
}

[data-theme-mode="dark"] .sade-module-card .table tbody tr:hover,
[data-theme-mode="dark"] .sade-module-card .table tbody tr:hover td {
    background: #1e2b44 !important;
    color: #ffffff !important;
}

[data-theme-mode="dark"] .sade-module-card .table td,
[data-theme-mode="dark"] .sade-module-card .table th {
    border-color: #2f3e55 !important;
}

[data-theme-mode="dark"] .sade-module-card .table td:first-child {
    background-color: #1b2740 !important;
    color: #e5e7eb !important;
}

[data-theme-mode="dark"] .sade-module-card .form-control,
[data-theme-mode="dark"] .sade-module-card .form-select {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

[data-theme-mode="dark"] .sade-module-card .form-control::placeholder {
    color: #94a3b8 !important;
}

[data-theme-mode="dark"] .sade-module-card .btn-light {
    background: #263244 !important;
    border-color: #263244 !important;
    color: #f8fafc !important;
}
/* Hover dos botões nos cards de módulo */
.sade-module-card .btn {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sade-module-card .btn:hover,
.sade-module-card .btn:focus {
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.sade-module-card .btn:active {
    box-shadow: none;
    transform: translateY(0);
}

.sade-module-card .btn-primary:hover,
.sade-module-card .btn-primary:focus {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
}

.sade-module-card .card-header.sade-card-header .btn-primary:hover,
.sade-module-card .card-header.sade-card-header .btn-primary:focus {
    background: #dbeafe !important;
    border-color: #dbeafe !important;
    color: #1e3a8a !important;
}

.sade-module-card .btn-secondary:hover,
.sade-module-card .btn-secondary:focus,
.sade-module-card .btn-info:hover,
.sade-module-card .btn-info:focus {
    background: #0369a1 !important;
    border-color: #0369a1 !important;
    color: #ffffff !important;
}

.sade-module-card .btn-light:hover,
.sade-module-card .btn-light:focus {
    background: #d8e2ef !important;
    border-color: #d8e2ef !important;
    color: #172033 !important;
}

.sade-module-card td .btn-warning:hover,
.sade-module-card td .btn-warning:focus {
    background: #d99016 !important;
    border-color: #d99016 !important;
    color: #ffffff !important;
}

.sade-module-card td .btn-danger:hover,
.sade-module-card td .btn-danger:focus {
    background: #c83223 !important;
    border-color: #c83223 !important;
    color: #ffffff !important;
}

.sade-module-card td .btn-outline-primary:hover,
.sade-module-card td .btn-outline-primary:focus {
    background: #5b4be7 !important;
    border-color: #5b4be7 !important;
    color: #ffffff !important;
}

.sade-module-card td .btn-success:hover,
.sade-module-card td .btn-success:focus {
    background: #0f8a52 !important;
    border-color: #0f8a52 !important;
    color: #ffffff !important;
}

[data-theme-mode="dark"] .sade-module-card .btn:hover,
[data-theme-mode="dark"] .sade-module-card .btn:focus {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}

[data-theme-mode="dark"] .sade-module-card .btn-light:hover,
[data-theme-mode="dark"] .sade-module-card .btn-light:focus {
    background: #334155 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}
/* Centralização vertical dos botões em ações de tabela */
.sade-module-card td .btn,
.sade-module-card .card-header.sade-card-header .btn,
.sade-module-card form.row .btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.sade-module-card td form {
    vertical-align: middle;
}

.sade-module-card td .btn-sm {
    min-height: 32px;
    padding-bottom: 0.42rem;
    padding-top: 0.42rem;
}

/* Contexto operacional dentro dos modulos */
.sade-context-card {
    background: #ffffff;
    border: 1px solid #c7d5ee;
    border-radius: 7px;
    box-shadow: 0 1px 2px rgba(30, 58, 138, 0.05);
    padding: 1rem;
}

[data-theme-mode="dark"] .sade-context-card {
    background: #172033;
    border-color: #334155;
    color: #e5e7eb;
}

/* Seleção de prova para lançamento */
.resultado-contexto-item {
    align-items: center;
    display: flex;
    gap: 0.8rem;
    min-height: 78px;
}

.resultado-contexto-icon,
.resultado-secao-icon {
    align-items: center;
    background: #e1ebff;
    border: 1px solid #bfd0f5;
    border-radius: 6px;
    color: #2563eb;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.resultado-contexto-icon {
    height: 36px;
    width: 36px;
}

.resultado-secao-icon {
    height: 32px;
    width: 32px;
}

.resultado-composicoes {
    background: #f8fbff;
    border: 1px solid #c7d5ee;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    padding: 1rem;
}

.resultado-secao-titulo {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.resultado-secao-titulo small {
    color: #64748b;
}

.resultado-composicao-badge {
    align-items: center;
    background: #e7efff !important;
    border: 1px solid #c4d3f4;
    color: #1e3a8a !important;
    display: inline-flex;
    font-weight: 600;
    min-height: 28px;
    padding: 0.45rem 0.65rem;
}

.resultado-etapas-resumo span {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #c4d3f4;
    border-radius: 5px;
    color: #475569;
    display: inline-flex;
    min-height: 30px;
    padding: 0.35rem 0.55rem;
}

.resultado-etapas-resumo strong {
    color: #1e3a8a;
    margin-right: 0.3rem;
}

[data-theme-mode="dark"] .resultado-contexto-icon,
[data-theme-mode="dark"] .resultado-secao-icon {
    background: #22375a;
    border-color: #3d5681;
    color: #93c5fd;
}

[data-theme-mode="dark"] .resultado-composicoes {
    background: #172033;
    border-color: #334155;
    border-left-color: #3b82f6;
}

[data-theme-mode="dark"] .resultado-composicao-badge,
[data-theme-mode="dark"] .resultado-etapas-resumo span {
    background: #22304a !important;
    border-color: #3d4d68;
    color: #dbeafe !important;
}

[data-theme-mode="dark"] .resultado-secao-titulo small {
    color: #94a3b8;
}

[data-theme-mode="dark"] .resultado-etapas-resumo strong {
    color: #93c5fd;
}

/* Área operacional do lançamento de resultados */
.lancamento-module-card {
    background: #e8f0fd;
    border-color: #9fb8e5;
}

.lancamento-module-card .card-header.sade-card-header {
    background: #243b82 !important;
    background-color: #243b82 !important;
    border-bottom-color: #243b82 !important;
    padding: 1.25rem 1.35rem;
}

.lancamento-module-card .sade-page-header-title {
    color: #ffffff;
    font-size: 1.08rem;
}

.lancamento-module-card .sade-page-header-subtitle {
    color: #dbeafe;
}

.lancamento-module-card .sade-page-header-icon {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.lancamento-module-card .card-header.sade-card-header .btn-light {
    background: #ffffff;
    border-color: #ffffff;
    color: #243b82;
}

.lancamento-module-card .card-header.sade-card-header .btn-light:hover,
.lancamento-module-card .card-header.sade-card-header .btn-light:focus {
    background: #eaf1ff;
    border-color: #eaf1ff;
    color: #1e2f68;
}

.lancamento-module-card > .card-body {
    background: #e8f0fd;
}

.lancamento-turma-seletor {
    background: #d4e2fb;
    border: 1px solid #9fb8e5;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.lancamento-turma-seletor .row {
    margin-bottom: 0 !important;
}

.lancamento-contexto .sade-context-card {
    background: #f9fbff;
    border-color: #b7c9e9;
    border-top: 3px solid #3b82f6;
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.08);
}

.lancamento-contexto > div:nth-child(2) .sade-context-card {
    border-top-color: #14a58b;
}

.lancamento-contexto > div:nth-child(3) .sade-context-card {
    border-top-color: #e3a526;
}

.lancamento-contexto > div:nth-child(4) .sade-context-card {
    border-top-color: #2494c4;
}

.lancamento-contexto .text-muted:first-child {
    color: #526581 !important;
    font-weight: 600;
}

.lancamento-status-bar,
.lancamento-actions-footer {
    align-items: center;
    background: #ffffff;
    border: 1px solid #b7c9e9;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.lancamento-status-bar {
    border-radius: 6px;
}

.lancamento-modos {
    background: #d4e2fb;
    border: 1px solid #9fb8e5;
    border-radius: 6px;
    display: inline-grid;
    gap: 0.25rem;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    margin-bottom: 1rem;
    padding: 0.25rem;
}

.lancamento-modo-btn {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #344968;
    display: inline-flex;
    font-weight: 600;
    gap: 0.45rem;
    justify-content: center;
    min-height: 38px;
    padding: 0.45rem 0.85rem;
}

.lancamento-modo-btn.active {
    background: #243b82;
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.2);
    color: #ffffff;
}

.lancamento-view[hidden],
.lancamento-aluno-panel[hidden] {
    display: none !important;
}

.lancamento-aluno-toolbar {
    align-items: end;
    background: #dce8fb;
    border: 1px solid #aabfe4;
    border-radius: 6px 6px 0 0;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 38px minmax(240px, 560px) auto auto 38px;
    padding: 0.85rem 1rem;
}

.lancamento-aluno-toolbar .btn-icon {
    align-items: center;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    padding: 0;
    width: 38px;
}

.lancamento-aluno-seletor .form-label {
    color: #526581;
    font-size: 0.76rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.lancamento-posicao {
    align-self: center;
    color: #526581;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.proximo-pendente-btn {
    align-self: center;
    justify-content: center;
    min-height: 34px;
    white-space: nowrap;
}

.lancamento-aluno-panel {
    background: #ffffff;
    border: 1px solid #aabfe4;
    border-top: 0;
}

.lancamento-aluno-panel.linha-aluno-sem-resposta {
    border-left: 4px solid #e3a526;
}

.lancamento-aluno-cabecalho {
    align-items: center;
    border-bottom: 1px solid #d8e2f0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.15rem;
}

.lancamento-aluno-etiqueta {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
}

.lancamento-aluno-nome {
    color: #172033;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.lancamento-aluno-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lancamento-aluno-indicadores {
    background: #f7faff;
    border-bottom: 1px solid #d8e2f0;
    display: grid;
    grid-template-columns: repeat(5, minmax(105px, 1fr));
}

.lancamento-aluno-indicadores > div {
    border-right: 1px solid #d8e2f0;
    min-width: 0;
    padding: 0.7rem 1rem;
}

.lancamento-aluno-indicadores > div:last-child {
    border-right: 0;
}

.lancamento-aluno-indicadores > div > span:first-child {
    color: #64748b;
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.lancamento-aluno-indicadores strong {
    color: #172033;
    font-size: 1rem;
}

.lancamento-aluno-indicadores small {
    color: #64748b;
    margin-left: 0.1rem;
}

.lancamento-questoes {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    padding: 1rem;
}

.questao-lancamento {
    background: #f8fbff;
    border: 1px solid #c6d5eb;
    border-radius: 6px;
    margin: 0;
    min-height: 104px;
    min-width: 0;
    padding: 0.7rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.questao-lancamento legend {
    align-items: center;
    color: #243b82;
    display: flex;
    font-size: 0.8rem;
    font-weight: 700;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    width: 100%;
}

.questao-lancamento legend small {
    color: #73829a;
    font-size: 0.66rem;
    font-weight: 500;
    margin-left: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.questao-alternativas {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: repeat(4, minmax(32px, 1fr));
}

.questao-alternativas label {
    cursor: pointer;
    margin: 0;
    min-width: 0;
}

.questao-alternativas input {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.questao-alternativas span {
    align-items: center;
    background: #ffffff;
    border: 1px solid #aebfd9;
    border-radius: 4px;
    color: #344968;
    display: flex;
    font-size: 0.8rem;
    font-weight: 700;
    height: 36px;
    justify-content: center;
}

.questao-alternativas input:checked + span {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.questao-alternativas input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.questao-alternativas input:disabled + span {
    cursor: not-allowed;
    opacity: 0.65;
}

.questao-manual-opcao {
    cursor: pointer;
    display: block;
    margin: 0;
}

.questao-manual-opcao input {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.questao-manual-opcao span {
    align-items: center;
    background: #ffffff;
    border: 1px solid #aebfd9;
    border-radius: 4px;
    color: #344968;
    display: flex;
    font-weight: 600;
    gap: 0.35rem;
    justify-content: center;
    min-height: 40px;
}

.questao-manual-opcao input:checked + span {
    background: #14866d;
    border-color: #14866d;
    color: #ffffff;
}

.questao-lancamento.questao-correta {
    background: #e9f8f1;
    border-color: #77c7aa;
}

.questao-lancamento.questao-incorreta {
    background: #fff0ef;
    border-color: #e7a09b;
}

.linha-aluno-sem-resposta .lancamento-questoes {
    opacity: 0.55;
}

.lancamento-navegacao-rodape,
.lancamento-actions-footer,
.lancamento-resumo-cabecalho {
    border-top: 1px solid #d8e2f0;
}

.lancamento-navegacao-rodape {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.85rem 1rem;
}

.lancamento-resumo-cabecalho {
    align-items: center;
    background: #ffffff;
    border: 1px solid #aabfe4;
    border-radius: 6px 6px 0 0;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.lancamento-resumo-cabecalho h2 {
    color: #172033;
    font-size: 1rem;
    margin: 0 0 0.15rem;
}

.lancamento-resumo-cabecalho p {
    color: #64748b;
    font-size: 0.76rem;
    margin: 0;
}

.lancamento-resumo-tabela {
    background: #ffffff;
    border: 1px solid #aabfe4;
    border-top: 0;
}

.lancamento-resumo-tabela table {
    table-layout: fixed;
    width: 100%;
}

.lancamento-resumo-tabela th,
.lancamento-resumo-tabela td {
    overflow-wrap: anywhere;
}

.lancamento-resumo-tabela thead th {
    background: #243b82 !important;
    border-color: #36529a !important;
    color: #ffffff !important;
}

.lancamento-resumo-tabela tbody tr:nth-child(even) td {
    background: #f1f6fd;
}

.lancamento-actions-footer {
    border-radius: 0 0 6px 6px;
    margin-top: 1rem;
}

[data-theme-mode="dark"] .lancamento-module-card {
    background: #111827;
    border-color: #334155;
}

[data-theme-mode="dark"] .lancamento-module-card .card-header.sade-card-header {
    background: #1e2f68 !important;
    background-color: #1e2f68 !important;
    border-bottom-color: #1e2f68 !important;
}

[data-theme-mode="dark"] .lancamento-module-card > .card-body {
    background: #111827;
}

[data-theme-mode="dark"] .lancamento-turma-seletor {
    background: #202d46;
    border-color: rgba(147, 169, 214, 0.28);
}

[data-theme-mode="dark"] .lancamento-contexto .sade-context-card {
    background: #172033;
    border-color: #3c4e6b;
}

[data-theme-mode="dark"] .lancamento-contexto .text-muted:first-child {
    color: #a8b8d2 !important;
}

[data-theme-mode="dark"] .lancamento-status-bar,
[data-theme-mode="dark"] .lancamento-actions-footer,
[data-theme-mode="dark"] .lancamento-aluno-panel,
[data-theme-mode="dark"] .lancamento-resumo-cabecalho,
[data-theme-mode="dark"] .lancamento-resumo-tabela {
    background: #172033;
    border-color: #3c4e6b;
}

[data-theme-mode="dark"] .lancamento-modos,
[data-theme-mode="dark"] .lancamento-aluno-toolbar {
    background: #202d46;
    border-color: #3c4e6b;
}

[data-theme-mode="dark"] .lancamento-modo-btn,
[data-theme-mode="dark"] .lancamento-aluno-seletor .form-label,
[data-theme-mode="dark"] .lancamento-posicao {
    color: #c5d2e8;
}

[data-theme-mode="dark"] .lancamento-modo-btn.active {
    background: #3158a8;
    color: #ffffff;
}

[data-theme-mode="dark"] .lancamento-aluno-cabecalho,
[data-theme-mode="dark"] .lancamento-aluno-indicadores,
[data-theme-mode="dark"] .lancamento-navegacao-rodape {
    border-color: #3c4e6b;
}

[data-theme-mode="dark"] .lancamento-aluno-indicadores,
[data-theme-mode="dark"] .questao-lancamento {
    background: #111827;
}

[data-theme-mode="dark"] .lancamento-aluno-nome,
[data-theme-mode="dark"] .lancamento-aluno-indicadores strong,
[data-theme-mode="dark"] .lancamento-resumo-cabecalho h2 {
    color: #f8fafc;
}

[data-theme-mode="dark"] .questao-lancamento,
[data-theme-mode="dark"] .questao-alternativas span,
[data-theme-mode="dark"] .questao-manual-opcao span {
    border-color: #465a7b;
}

[data-theme-mode="dark"] .questao-alternativas span,
[data-theme-mode="dark"] .questao-manual-opcao span {
    background: #202d46;
    color: #dbeafe;
}

[data-theme-mode="dark"] .questao-lancamento.questao-correta {
    background: #12392f;
    border-color: #2e9276;
}

[data-theme-mode="dark"] .questao-lancamento.questao-incorreta {
    background: #422321;
    border-color: #b85e58;
}

@media (max-width: 991.98px) {
    .lancamento-aluno-indicadores {
        grid-template-columns: repeat(3, minmax(105px, 1fr));
    }

    .lancamento-aluno-indicadores > div:nth-child(3) {
        border-right: 0;
    }

    .lancamento-aluno-indicadores > div:nth-child(n + 4) {
        border-top: 1px solid #d8e2f0;
    }
}

@media (max-width: 767.98px) {
    .lancamento-modos {
        display: grid;
        width: 100%;
    }

    .lancamento-aluno-toolbar {
        align-items: end;
        grid-template-columns: 38px minmax(0, 1fr) 38px;
    }

    .proximo-pendente-btn {
        grid-column: 2;
        grid-row: 2;
    }

    .lancamento-posicao {
        display: none;
    }

    .lancamento-aluno-cabecalho,
    .lancamento-status-bar,
    .lancamento-actions-footer {
        align-items: stretch;
    }

    .lancamento-aluno-acoes,
    .lancamento-status-bar > div,
    .lancamento-actions-footer > div:last-child {
        width: 100%;
    }

    .lancamento-aluno-acoes .btn,
    .lancamento-status-bar .btn,
    .lancamento-actions-footer .btn {
        justify-content: center;
        flex: 1 1 auto;
    }

    .lancamento-aluno-indicadores {
        grid-template-columns: repeat(2, minmax(105px, 1fr));
    }

    .lancamento-aluno-indicadores > div,
    .lancamento-aluno-indicadores > div:nth-child(3) {
        border-right: 1px solid #d8e2f0;
        border-top: 1px solid #d8e2f0;
    }

    .lancamento-aluno-indicadores > div:nth-child(odd) {
        border-right: 1px solid #d8e2f0;
    }

    .lancamento-aluno-indicadores > div:nth-child(even) {
        border-right: 0;
    }

    .lancamento-aluno-indicadores > div:first-child,
    .lancamento-aluno-indicadores > div:nth-child(2) {
        border-top: 0;
    }

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

    .lancamento-resumo-tabela table,
    .lancamento-resumo-tabela tbody,
    .lancamento-resumo-tabela tr,
    .lancamento-resumo-tabela td {
        display: block;
        width: 100%;
    }

    .lancamento-resumo-tabela thead {
        display: none;
    }

    .lancamento-resumo-tabela tr {
        border-bottom: 1px solid #c6d5eb;
        padding: 0.65rem;
    }

    .lancamento-resumo-tabela td {
        border: 0;
        padding: 0.35rem 0.5rem;
        text-align: left !important;
    }

    .lancamento-resumo-tabela td::before {
        color: #64748b;
        content: attr(data-label);
        display: inline-block;
        font-size: 0.7rem;
        font-weight: 700;
        margin-right: 0.5rem;
        min-width: 82px;
    }
}

@media (max-width: 479.98px) {
    .lancamento-modos {
        grid-template-columns: 1fr;
    }

    .lancamento-questoes {
        grid-template-columns: 1fr;
    }
}

/* Integracao Trilhas - publicar este bloco junto com as views da integracao. */
.trilhas-integration-body {
    color: #172033;
}

.trilhas-safety-strip {
    align-items: center;
    background: #dcecff;
    border: 1px solid #bfd7f6;
    border-inline-start: 4px solid #3b82f6;
    border-radius: 6px;
    color: #1e3a5f;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.trilhas-safety-icon {
    align-items: center;
    color: #2563eb;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.15rem;
    justify-content: center;
}

.trilhas-safety-strip strong,
.trilhas-safety-strip span {
    display: block;
}

.trilhas-safety-strip strong {
    font-size: 0.82rem;
    margin-bottom: 0.1rem;
}

.trilhas-safety-strip div > span {
    font-size: 0.76rem;
}

.trilhas-connection-strip {
    background: #f8fbff;
    border: 1px solid #c6d5eb;
    border-radius: 6px;
    display: grid;
    grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.6fr);
    margin-bottom: 1.5rem;
}

.trilhas-connection-status,
.trilhas-endpoint {
    min-width: 0;
    padding: 1rem 1.1rem;
}

.trilhas-connection-status {
    align-items: center;
    border-inline-end: 1px solid #d8e2f0;
    display: flex;
    gap: 0.8rem;
}

.trilhas-connection-icon,
.trilhas-review-heading-icon,
.trilhas-history-heading > span {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.trilhas-connection-icon {
    font-size: 1.15rem;
    height: 2.5rem;
    width: 2.5rem;
}

.trilhas-connection-icon.is-ready {
    background: #dcfce7;
    color: #15803d;
}

.trilhas-connection-icon.is-pending {
    background: #fee2e2;
    color: #b91c1c;
}

.trilhas-connection-status > div,
.trilhas-endpoint {
    display: flex;
    flex-direction: column;
}

.trilhas-section-label {
    color: #64748b;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.trilhas-connection-status strong,
.trilhas-endpoint strong {
    font-size: 0.83rem;
}

.trilhas-connection-status small,
.trilhas-endpoint small {
    color: #718096;
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

.trilhas-result-heading {
    align-items: center;
    border-bottom: 1px solid #c6d5eb;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.2rem 0.15rem 0.9rem;
}

.trilhas-result-heading h5,
.trilhas-review-heading h5,
.trilhas-history-heading h6 {
    color: #172033;
    margin: 0;
}

.trilhas-result-heading h5,
.trilhas-review-heading h5 {
    font-size: 1rem;
}

.trilhas-result-meta {
    color: #718096;
    font-size: 0.72rem;
    margin-top: 0.3rem;
}

.trilhas-result-meta i {
    margin-inline-end: 0.25rem;
}

.trilhas-metrics {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.trilhas-metric {
    background: #f8fbff;
    border: 1px solid #cbd8ea;
    border-block-start: 3px solid #64748b;
    border-radius: 6px;
    min-width: 0;
    padding: 0.85rem 0.9rem;
}

.trilhas-metric span {
    color: #64748b;
    display: block;
    font-size: 0.69rem;
    line-height: 1.2;
    min-height: 1.65em;
}

.trilhas-metric strong {
    color: #172033;
    display: block;
    font-size: 1.35rem;
    line-height: 1;
    margin-top: 0.35rem;
}

.trilhas-metric.is-primary {
    border-block-start-color: #4f46e5;
}

.trilhas-metric.is-primary strong {
    color: #4f46e5;
}

.trilhas-metric.is-success {
    border-block-start-color: #0f9f6e;
}

.trilhas-metric.is-success strong {
    color: #0f9f6e;
}

.trilhas-metric.is-warning {
    border-block-start-color: #d99016;
}

.trilhas-metric.is-warning strong {
    color: #b96e08;
}

.trilhas-metric.is-danger {
    border-block-start-color: #dc4a3d;
}

.trilhas-metric.is-danger strong {
    color: #c83223;
}

.trilhas-review-section {
    background: #f8fbff;
    border: 1px solid #b8c8eb;
    border-radius: 6px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.trilhas-review-heading {
    align-items: center;
    background: #e7eefb;
    border-bottom: 1px solid #c2d0e7;
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
}

.trilhas-review-heading-icon {
    background: #d7e5ff;
    color: #2856b6;
    font-size: 1.05rem;
    height: 2.6rem;
    width: 2.6rem;
}

.trilhas-review-heading p,
.trilhas-history-heading p {
    color: #64748b;
    font-size: 0.72rem;
    margin: 0.2rem 0 0;
}

.trilhas-review-tabs {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem 1rem 0;
}

.trilhas-review-tabs .nav-item {
    min-width: 0;
}

.trilhas-review-tabs .nav-link {
    align-items: center;
    background: #edf3ff;
    border: 1px solid #b9c9e6;
    border-radius: 6px;
    color: #243b68;
    display: flex;
    gap: 0.75rem;
    min-height: 66px;
    padding: 0.75rem 0.9rem;
    text-align: start;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.trilhas-review-tabs .nav-link:hover,
.trilhas-review-tabs .nav-link:focus-visible {
    background: #dce8fb;
    border-color: #7f9ed2;
    box-shadow: 0 3px 10px rgba(30, 58, 138, 0.12);
    color: #1e3a8a;
}

.trilhas-review-tabs .nav-link.active {
    background: #1e3a8a;
    border-color: #1e3a8a;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
    color: #ffffff;
}

.trilhas-tab-icon {
    align-items: center;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 6px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.05rem;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.trilhas-review-tabs .nav-link.active .trilhas-tab-icon {
    background: rgba(255, 255, 255, 0.15);
}

.trilhas-tab-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.trilhas-tab-copy strong {
    font-size: 0.82rem;
}

.trilhas-tab-copy small {
    color: #64748b;
    font-size: 0.67rem;
    margin-top: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trilhas-review-tabs .nav-link.active .trilhas-tab-copy small {
    color: #dbeafe;
}

.trilhas-tab-step {
    align-items: center;
    background: #d8e4f8;
    border-radius: 50%;
    color: #1e3a8a;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 700;
    height: 1.65rem;
    justify-content: center;
    width: 1.65rem;
}

.trilhas-review-tabs .nav-link.active .trilhas-tab-step {
    background: #ffffff;
    color: #1e3a8a;
}

.trilhas-review-content {
    padding: 1rem;
}

.trilhas-tab-intro {
    align-items: center;
    background: #e9f2ff;
    border-inline-start: 3px solid #3b82f6;
    color: #25456f;
    display: flex;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
    padding: 0.7rem 0.85rem;
}

.trilhas-tab-intro > i {
    color: #2563eb;
    flex: 0 0 auto;
    font-size: 1rem;
}

.trilhas-tab-intro strong,
.trilhas-tab-intro span {
    display: block;
}

.trilhas-tab-intro strong {
    font-size: 0.76rem;
}

.trilhas-tab-intro span {
    color: #64748b;
    font-size: 0.68rem;
    margin-top: 0.1rem;
}

.trilhas-history-section {
    border-top: 1px solid #b8c8eb;
    padding-top: 1.25rem;
}

.trilhas-history-heading {
    align-items: center;
    display: flex;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}

.trilhas-history-heading > span {
    background: #dce8fb;
    color: #2856b6;
    height: 2.2rem;
    width: 2.2rem;
}

.trilhas-empty-state {
    align-items: center;
    color: #64748b;
    display: flex;
    flex-direction: column;
    padding: 3.5rem 1rem;
    text-align: center;
}

.trilhas-empty-state > i {
    color: #4772c7;
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.trilhas-empty-state strong {
    color: #172033;
    font-size: 0.9rem;
}

.trilhas-empty-state span {
    font-size: 0.72rem;
    margin-top: 0.25rem;
}

[data-theme-mode="dark"] .trilhas-integration-body {
    color: #e5e7eb;
}

[data-theme-mode="dark"] .trilhas-safety-strip {
    background: #162d4d;
    border-color: #294f7d;
    border-inline-start-color: #60a5fa;
    color: #dbeafe;
}

[data-theme-mode="dark"] .trilhas-safety-icon {
    color: #60a5fa;
}

[data-theme-mode="dark"] .trilhas-connection-strip,
[data-theme-mode="dark"] .trilhas-metric {
    background: #17233a;
    border-color: #334b70;
}

[data-theme-mode="dark"] .trilhas-connection-status {
    border-inline-end-color: #334155;
}

[data-theme-mode="dark"] .trilhas-connection-icon.is-ready {
    background: rgba(16, 185, 129, 0.16);
    color: #4ade80;
}

[data-theme-mode="dark"] .trilhas-connection-icon.is-pending {
    background: rgba(239, 68, 68, 0.16);
    color: #f87171;
}

[data-theme-mode="dark"] .trilhas-section-label,
[data-theme-mode="dark"] .trilhas-connection-status small,
[data-theme-mode="dark"] .trilhas-endpoint small,
[data-theme-mode="dark"] .trilhas-result-meta,
[data-theme-mode="dark"] .trilhas-review-heading p,
[data-theme-mode="dark"] .trilhas-history-heading p,
[data-theme-mode="dark"] .trilhas-tab-intro span {
    color: #93a4c3;
}

[data-theme-mode="dark"] .trilhas-connection-status strong,
[data-theme-mode="dark"] .trilhas-endpoint strong,
[data-theme-mode="dark"] .trilhas-result-heading h5,
[data-theme-mode="dark"] .trilhas-review-heading h5,
[data-theme-mode="dark"] .trilhas-history-heading h6,
[data-theme-mode="dark"] .trilhas-metric strong,
[data-theme-mode="dark"] .trilhas-empty-state strong {
    color: #f8fafc;
}

[data-theme-mode="dark"] .trilhas-result-heading,
[data-theme-mode="dark"] .trilhas-history-section {
    border-color: #334155;
}

[data-theme-mode="dark"] .trilhas-metric span {
    color: #a5b4cc;
}

[data-theme-mode="dark"] .trilhas-metric.is-primary strong {
    color: #a5b4fc;
}

[data-theme-mode="dark"] .trilhas-metric.is-success strong {
    color: #4ade80;
}

[data-theme-mode="dark"] .trilhas-metric.is-warning strong {
    color: #fbbf24;
}

[data-theme-mode="dark"] .trilhas-metric.is-danger strong {
    color: #fb7185;
}

[data-theme-mode="dark"] .trilhas-review-section {
    background: #111b2d;
    border-color: #334b70;
}

[data-theme-mode="dark"] .trilhas-review-heading {
    background: #1a2942;
    border-bottom-color: #334b70;
}

[data-theme-mode="dark"] .trilhas-review-heading-icon,
[data-theme-mode="dark"] .trilhas-history-heading > span {
    background: #243b68;
    color: #93c5fd;
}

[data-theme-mode="dark"] .trilhas-review-tabs .nav-link {
    background: #17233a;
    border-color: #3a4f70;
    color: #dbeafe;
}

[data-theme-mode="dark"] .trilhas-review-tabs .nav-link:hover,
[data-theme-mode="dark"] .trilhas-review-tabs .nav-link:focus-visible {
    background: #203251;
    border-color: #6686bb;
    color: #ffffff;
}

[data-theme-mode="dark"] .trilhas-review-tabs .nav-link.active {
    background: #304f9c;
    border-color: #5d7fd0;
    color: #ffffff;
}

[data-theme-mode="dark"] .trilhas-tab-icon {
    background: rgba(147, 197, 253, 0.12);
}

[data-theme-mode="dark"] .trilhas-tab-copy small {
    color: #93a4c3;
}

[data-theme-mode="dark"] .trilhas-tab-step {
    background: #243b68;
    color: #bfdbfe;
}

[data-theme-mode="dark"] .trilhas-tab-intro {
    background: #192a45;
    border-inline-start-color: #60a5fa;
    color: #dbeafe;
}

[data-theme-mode="dark"] .trilhas-tab-intro > i {
    color: #60a5fa;
}

[data-theme-mode="dark"] .trilhas-empty-state {
    color: #93a4c3;
}

@media (max-width: 1199.98px) {
    .trilhas-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .trilhas-connection-strip,
    .trilhas-review-tabs {
        grid-template-columns: minmax(0, 1fr);
    }

    .trilhas-connection-status {
        border-bottom: 1px solid #d8e2f0;
        border-inline-end: 0;
    }

    [data-theme-mode="dark"] .trilhas-connection-status {
        border-bottom-color: #334155;
    }

    .trilhas-result-heading {
        align-items: flex-start;
    }

    .trilhas-review-heading {
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .trilhas-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trilhas-tab-copy small {
        white-space: normal;
    }

    .trilhas-review-content,
    .trilhas-review-tabs {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
