:root {
    --primary: #1f4f8f;
    --primary-dark: #153761;
    --primary-deep: #0d223b;
    --accent: #20a98b;
    --accent-soft: #dff8f2;
    --primary-soft: #e8f0fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #dde4ee;
    --line-strong: #c8d2df;
    --muted: #667085;
    --text: #182230;
    --bg: #eef3f8;
    --success: #168255;
    --danger: #b42318;
    --warning: #b54708;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow-md: 0 12px 30px rgba(16, 24, 40, .08);
}

body {
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

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

.app-sidebar {
    background:
        linear-gradient(155deg, rgba(32, 169, 139, .2), rgba(32, 169, 139, 0) 34%),
        linear-gradient(180deg, #153761 0%, var(--primary-deep) 100%);
    box-shadow: 12px 0 34px rgba(16, 24, 40, .16);
    color: #fff;
    display: flex !important;
    flex: 0 0 272px;
    flex-direction: column;
    min-height: 100vh;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-sidebar::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0));
    content: "";
    height: 100%;
    left: 0;
    opacity: .45;
    position: absolute;
    top: 0;
    width: 1px;
}

.sidebar-brand {
    align-items: center;
    color: #fff;
    display: flex;
    gap: 12px;
    padding: 8px 8px 22px;
    position: relative;
    text-decoration: none;
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-logo {
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(2, 12, 27, .22);
    flex: 0 0 42px;
    height: 42px;
    object-fit: cover;
    width: 42px;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    font-size: 15px;
    line-height: 1.1;
}

.sidebar-brand small {
    color: rgba(255, 255, 255, .64);
    font-size: 12px;
    margin-top: 3px;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
    overflow-y: auto;
    padding: 2px 2px 8px;
}

.sidebar-group {
    color: rgba(255, 255, 255, .42);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 14px 8px 3px;
    text-transform: uppercase;
}

.sidebar-group:first-child {
    margin-top: 0;
}

.sidebar-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, .76);
    display: flex;
    font-size: 13px;
    font-weight: 650;
    gap: 11px;
    min-height: 44px;
    padding: 8px 11px;
    position: relative;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .1);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-link.active {
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 13px 28px rgba(2, 12, 27, .24);
    color: var(--primary-deep);
}

.sidebar-link.active::before {
    background: var(--accent);
    border-radius: 999px;
    content: "";
    height: 22px;
    left: -3px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
}

.sidebar-icon {
    align-items: center;
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 7px;
    display: inline-flex;
    flex: 0 0 28px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.sidebar-icon svg {
    height: 16px;
    width: 16px;
}

.sidebar-link.active .sidebar-icon {
    background: var(--accent-soft);
    border-color: rgba(32, 169, 139, .2);
    color: #08745f;
}

.sidebar-database {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    color: rgba(255, 255, 255, .78);
    margin: auto 2px 8px;
    padding: 10px;
}

.sidebar-database span,
.sidebar-database strong,
.sidebar-database small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-database span {
    color: rgba(255, 255, 255, .5);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-database strong {
    color: #fff;
    font-size: 13px;
    margin-top: 3px;
}

.sidebar-database small {
    color: rgba(255, 255, 255, .64);
    font-size: 11px;
    margin-top: 2px;
}

.sidebar-user {
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    display: flex;
    gap: 9px;
    margin: 0 2px;
    padding: 10px;
}

.sidebar-user-avatar {
    align-items: center;
    background: rgba(255, 255, 255, .16);
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 30px;
    font-size: 12px;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.sidebar-user-name {
    color: rgba(255, 255, 255, .78);
    flex: 1 1 auto;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user a {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-user a:hover {
    color: #bff2e7;
}

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

.mobile-topbar {
    display: none;
}

.mobile-brand {
    align-items: center;
    color: var(--primary-dark);
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    text-decoration: none;
}

.mobile-brand img {
    border-radius: 7px;
    height: 32px;
    object-fit: cover;
    width: 32px;
}

.mobile-menu-button {
    align-items: center;
    background: var(--primary);
    border: 0;
    border-radius: 7px;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 38px;
}

.mobile-menu-button span:not(.visually-hidden) {
    background: #fff;
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 16px;
}

main.container-fluid {
    max-width: 1440px;
    padding: 22px 22px 34px !important;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 18px;
}

.page-title h1 {
    color: #101828;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
}

.page-title p {
    color: var(--muted);
    margin: 5px 0 0;
    max-width: 760px;
}

.panel, .metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.panel {
    padding: 18px;
}

.metric {
    min-height: 120px;
    overflow: hidden;
    padding: 18px;
    position: relative;
}

.metric::before {
    background: var(--primary-soft);
    border-radius: 999px;
    content: "";
    height: 54px;
    position: absolute;
    right: -16px;
    top: -18px;
    width: 54px;
}

.metric.success::before {
    background: #e7f6ef;
}

.metric.danger::before {
    background: #fdecec;
}

.panel-header, .toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.toolbar {
    justify-content: flex-start;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
}

.panel-header h2 {
    color: #101828;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.metric span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 800;
    letter-spacing: 0;
    margin-top: 12px;
    position: relative;
    word-break: break-word;
}

.metric.success strong { color: var(--success); }
.metric.danger strong { color: var(--danger); }

.quick-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-action {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    color: var(--text);
    display: flex;
    gap: 12px;
    min-height: 76px;
    padding: 14px;
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.quick-action:hover,
.quick-action:focus {
    border-color: #9bb4d8;
    box-shadow: 0 12px 24px rgba(16, 24, 40, .08);
    color: var(--text);
    transform: translateY(-2px);
}

.quick-action-icon {
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 38px;
    font-size: 12px;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    letter-spacing: .02em;
    width: 38px;
}

.quick-action strong,
.quick-action small {
    display: block;
}

.quick-action strong {
    color: #101828;
    font-size: 14px;
    line-height: 1.2;
}

.quick-action small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    margin-top: 3px;
}

.search-form {
    display: flex;
    gap: 8px;
    min-width: min(520px, 100%);
}

.form-label {
    color: #344054;
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border-color: var(--line-strong);
    border-radius: 7px;
    color: var(--text);
    min-height: 39px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(31, 79, 143, .14);
}

.form-control[readonly] {
    background: #f3f6f9;
    color: #475467;
}

.form-check-input {
    border-color: var(--line-strong);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn {
    border-radius: 7px;
    font-weight: 650;
}

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

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

.btn-outline-primary {
    border-color: #98afd0;
    color: var(--primary);
}

.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-danger,
.btn-outline-success {
    background: #fff;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f5f7fa;
    border-bottom: 1px solid var(--line);
    color: #475467;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td {
    border-color: #edf1f5;
    color: #243044;
    vertical-align: middle;
}

.table-hover tbody tr:hover td {
    background: #f8fbff;
}

.table-sortable th {
    cursor: pointer;
    user-select: none;
}

.table-sortable th:hover {
    color: var(--primary);
}

.table tfoot th {
    background: #f5f7fa;
    border-top: 1px solid var(--line-strong);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 20% 18%, rgba(31, 79, 143, .18), transparent 30%),
        linear-gradient(135deg, #eef3f8 0%, #f8fafc 52%, #edf7f2 100%);
}

.login-shell {
    width: min(440px, calc(100vw - 32px));
}

.login-shell.access-shell {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: 440px minmax(680px, 1fr);
    width: min(1360px, calc(100vw - 32px));
}

.login-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 32px;
}

.login-brand {
    align-items: center;
    display: flex;
    gap: 14px;
}

.brand-mark {
    border-radius: 8px;
    flex: 0 0 52px;
    height: 52px;
    object-fit: cover;
    width: 52px;
}

.login-panel h1 {
    color: #101828;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
}

.login-panel p {
    color: var(--muted);
    margin: 4px 0 0;
}

.access-panel {
    padding: 0;
    overflow: hidden;
}

.access-titlebar {
    background: #eef1f5;
    border-bottom: 1px solid var(--line-strong);
    color: #243044;
    font-size: 13px;
    font-weight: 750;
    padding: 10px 14px;
}

.access-panel .alert {
    margin: 12px 14px 0;
}

.access-toolbar {
    background: #f6f7f9;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 6px;
    padding: 8px;
}

.access-toolbar .btn {
    min-width: 70px;
}

.access-grid-form {
    display: grid;
    gap: 12px 16px;
    grid-template-columns: 140px 158px 86px 1fr;
    padding: 14px;
}

.access-grid-form .form-label {
    color: #1d2939;
    font-size: 11px;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.access-grid-form .form-control,
.access-grid-form .form-select {
    min-height: 32px;
}

.access-path {
    grid-column: span 3;
}

.access-table {
    border-top: 1px solid var(--line);
    max-height: 230px;
}

.access-table table {
    min-width: 980px;
}

.access-table th,
.access-table td {
    white-space: nowrap;
}

.access-table tbody tr {
    cursor: pointer;
}

.report-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    padding-top: 10px;
}

.report-page {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    max-width: 1120px;
    padding: 18px;
}

.report-cover {
    align-items: flex-start;
    border-bottom: 2px solid var(--primary);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
    padding-bottom: 14px;
}

.report-kicker {
    color: var(--accent);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.report-cover h1 {
    color: #101828;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
}

.report-cover p {
    color: var(--muted);
    font-size: 12px;
    margin: 5px 0 0;
}

.report-stamp {
    border: 1px solid var(--line);
    border-radius: 8px;
    min-width: 108px;
    padding: 8px 10px;
    text-align: right;
}

.report-stamp strong,
.report-stamp span {
    display: block;
}

.report-stamp strong {
    color: var(--primary-dark);
    font-size: 13px;
}

.report-stamp span {
    color: var(--muted);
    font-size: 12px;
}

.report-filter-panel {
    background: var(--surface-soft);
    box-shadow: none;
}

.report-filter-form .report-date-filter {
    max-width: 180px;
}

.report-filter-form input[type="date"] {
    min-width: 145px;
}

.report-summary {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 12px;
}

.report-summary div {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}

.report-summary span {
    color: var(--muted);
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.report-summary strong {
    color: #101828;
    display: block;
    font-size: 18px;
    margin-top: 3px;
}

.report-section {
    box-shadow: none;
    padding: 12px;
}

.report-section-header {
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
    padding-bottom: 6px;
}

.report-table {
    border-color: var(--line);
    font-size: 12px;
    margin-bottom: 0;
}

.report-table thead th {
    background: #eef3f8;
    border-bottom: 1px solid var(--line-strong);
    color: #243044;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.report-table tbody td,
.report-table tfoot th {
    border-color: #edf1f5;
    vertical-align: top;
}

.report-table tfoot th {
    background: #f8fafc;
    color: #101828;
}

body:has(.cc-compact) main.container-fluid {
    max-width: none;
    padding: 8px 10px 14px !important;
}

.cc-compact {
    margin-top: -2px;
}

.cc-compact .cc-page-title {
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.cc-compact .cc-page-title h1 {
    font-size: 17px;
    line-height: 1.1;
}

.cc-compact .cc-page-title p {
    font-size: 11px;
    line-height: 1;
    margin-top: 0;
}

.cc-compact .cc-panel {
    border-radius: 6px;
    padding: 6px;
}

.cc-compact .cc-toolbar {
    border-radius: 6px;
    gap: 4px;
    margin-bottom: 5px;
    padding: 4px;
}

.cc-compact .cc-toolbar .btn,
.cc-compact .cc-page-title .btn {
    font-size: 11px;
    line-height: 1.15;
    padding: 3px 7px;
}

.cc-compact .form-label {
    font-size: 10px;
    line-height: 1;
    margin-bottom: 1px;
}

.cc-compact .form-control,
.cc-compact .form-select {
    border-radius: 5px;
    font-size: 11px;
    min-height: 25px;
    padding: 2px 6px;
}

.cc-compact .panel-header {
    margin-bottom: 4px;
}

.cc-compact .panel-header h2 {
    font-size: 12px;
    line-height: 1.1;
}

.cc-compact .cc-grid {
    font-size: 11px;
}

.cc-compact .cc-grid thead th {
    font-size: 9px;
    line-height: 1;
    padding: 3px 5px;
}

.cc-compact .cc-grid tbody td {
    line-height: 1.1;
    padding: 2px 5px;
}

.cc-compact .cc-grid .btn-sm {
    font-size: 10px;
    line-height: 1.1;
    padding: 1px 5px;
}

.cc-compact .cc-history {
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empresa-compact .page-title {
    margin-bottom: 5px;
}

.empresa-compact .panel.mb-3 {
    margin-bottom: 6px !important;
}

.empresa-compact .empresa-grid-form {
    align-items: end;
}

.empresa-compact .empresa-grid-form > [class*="col-"] {
    margin-top: 2px;
}

.empresa-compact .empresa-grid-form .col-md-4 {
    flex: 0 0 auto;
    width: 25%;
}

.empresa-compact .empresa-grid-form .col-md-4:nth-child(1) {
    width: 12%;
}

.empresa-compact .empresa-grid-form .col-md-4:nth-child(2),
.empresa-compact .empresa-grid-form .col-md-4:nth-child(3),
.empresa-compact .empresa-grid-form .col-md-4:nth-child(16) {
    width: 38%;
}

.empresa-compact .empresa-grid-form .col-md-4:nth-child(4),
.empresa-compact .empresa-grid-form .col-md-4:nth-child(7),
.empresa-compact .empresa-grid-form .col-md-4:nth-child(8),
.empresa-compact .empresa-grid-form .col-md-4:nth-child(14),
.empresa-compact .empresa-grid-form .col-md-4:nth-child(15),
.empresa-compact .empresa-grid-form .col-md-4:nth-child(17) {
    width: 16%;
}

.empresa-compact .search-form {
    min-width: min(420px, 100%);
}

.favorecido-compact .page-title {
    margin-bottom: 5px;
}

.favorecido-compact .panel.mb-3 {
    margin-bottom: 6px !important;
}

.favorecido-compact .favorecido-grid-form {
    align-items: end;
}

.favorecido-compact .favorecido-grid-form > [class*="col-"] {
    margin-top: 2px;
}

.favorecido-compact .favorecido-grid-form .col-md-4 {
    flex: 0 0 auto;
    width: 20%;
}

.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(1),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(2),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(11),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(12),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(13) {
    width: 40%;
}

.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(4) {
    width: 28%;
}

.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(5),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(8),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(9),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(10),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(15),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(16),
.favorecido-compact .favorecido-grid-form .col-md-4:nth-child(17) {
    width: 16%;
}

.favorecido-compact .search-form {
    min-width: min(460px, 100%);
}

.senha-compact .page-title {
    margin-bottom: 5px;
}

.senha-compact .panel.mb-3 {
    margin-bottom: 6px !important;
}

.senha-compact .senha-grid-form {
    align-items: end;
    max-width: 520px;
}

.senha-compact .senha-grid-form > [class*="col-"] {
    flex: 0 0 auto;
    margin-top: 2px;
    width: 50%;
}

.senha-compact .search-form {
    min-width: min(360px, 100%);
}

@media (max-width: 768px) {
    .report-page {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 12px;
    }

    .report-cover,
    .report-filter-form .d-flex {
        flex-direction: column;
    }

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

    .empresa-compact .empresa-grid-form .col-md-4,
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(1),
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(2),
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(3),
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(4),
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(7),
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(8),
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(14),
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(15),
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(16),
    .empresa-compact .empresa-grid-form .col-md-4:nth-child(17) {
        width: 100%;
    }

    .favorecido-compact .favorecido-grid-form .col-md-4,
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(1),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(2),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(4),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(5),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(8),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(9),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(10),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(11),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(12),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(13),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(15),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(16),
    .favorecido-compact .favorecido-grid-form .col-md-4:nth-child(17) {
        width: 100%;
    }

    .senha-compact .senha-grid-form > [class*="col-"] {
        width: 100%;
    }

    .app-shell {
        display: block;
    }

    .app-sidebar {
        border-radius: 0 0 12px 12px;
        box-shadow: 0 12px 28px rgba(16, 24, 40, .14);
        max-height: calc(100vh - 54px);
        min-height: auto;
        overflow-y: auto;
        padding: 12px;
        position: fixed;
        top: 54px;
        width: 100%;
    }

    .app-sidebar:not(.show) {
        display: none !important;
    }

    .sidebar-brand {
        display: none;
    }

    .sidebar-nav {
        gap: 6px;
        grid-template-columns: 1fr 1fr;
        padding-top: 0;
    }

    .sidebar-group {
        grid-column: 1 / -1;
        margin: 10px 4px 0;
    }

    .sidebar-link {
        transform: none;
    }

    .sidebar-link:hover,
    .sidebar-link:focus {
        transform: none;
    }

    .sidebar-user {
        margin-top: 10px;
        padding: 10px;
    }

    .sidebar-database {
        margin-top: 10px;
    }

    .mobile-topbar {
        align-items: center;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-sm);
        display: flex;
        height: 54px;
        justify-content: space-between;
        padding: 0 12px;
        position: sticky;
        top: 0;
        z-index: 1030;
    }

    main.container-fluid {
        padding: 16px 12px 24px !important;
    }

    .page-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-title h1 {
        font-size: 22px;
    }

    .panel {
        padding: 14px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .toolbar .btn, .search-form .btn {
        width: 100%;
    }

    .toolbar,
    .search-form {
        flex-direction: column;
    }

    .panel-header {
        align-items: stretch;
    }

    .login-panel {
        padding: 24px;
    }

    .login-shell.access-shell {
        grid-template-columns: 1fr;
        width: min(720px, calc(100vw - 24px));
    }

    .access-panel {
        padding: 0;
    }

    .access-grid-form {
        grid-template-columns: 1fr;
    }

    .access-path {
        grid-column: auto;
    }

    .login-brand {
        align-items: flex-start;
    }

    .login-panel h1 {
        font-size: 25px;
    }
}

@media print {
    .app-sidebar, .mobile-topbar, .no-print, .toolbar, .btn { display: none !important; }
    @page {
        size: A4;
        margin: 10mm;
    }

    html,
    body {
        background: #fff !important;
        color: #111827;
        font-size: 10px;
    }

    main.container-fluid {
        padding: 0 !important;
    }

    .app-content {
        width: 100%;
    }

    .panel { border: 0; padding: 0; }

    .report-page {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        max-width: none;
        padding: 0;
    }

    .report-cover {
        border-bottom: 1.5pt solid #153761;
        margin-bottom: 8mm;
        padding-bottom: 5mm;
    }

    .report-cover h1 {
        font-size: 17pt;
    }

    .report-cover p,
    .report-stamp span,
    .report-footer {
        font-size: 8pt;
    }

    .report-stamp {
        border: 1pt solid #d0d5dd;
        border-radius: 4pt;
        padding: 5pt 7pt;
    }

    .report-summary {
        break-inside: avoid;
        gap: 4mm;
        grid-template-columns: repeat(4, 1fr);
        margin-bottom: 6mm;
    }

    .report-summary div {
        border: 1pt solid #d0d5dd;
        border-radius: 4pt;
        padding: 5pt 7pt;
    }

    .report-summary strong {
        font-size: 12pt;
    }

    .report-section {
        break-inside: auto;
        margin-bottom: 6mm !important;
        padding: 0;
    }

    .report-section-header {
        break-after: avoid;
        margin-bottom: 3mm;
        padding-bottom: 2mm;
    }

    .report-table {
        border-collapse: collapse;
        font-size: 7.8pt;
        width: 100%;
    }

    .report-table thead {
        display: table-header-group;
    }

    .report-table tfoot {
        display: table-row-group;
    }

    .report-table tr {
        break-inside: avoid;
    }

    .report-table th,
    .report-table td {
        padding: 3pt 4pt;
    }

    .report-table thead th,
    .report-table tfoot th {
        background: #eef3f8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
