/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2f6b3d;
    --primary-dark: #234f2d;
    --secondary-color: #1f4e5a;
    --secondary-dark: #163840;
    --accent-color: #6fa36b;
    --accent-dark: #568457;
    --danger-color: #b42318;
    --bg-color: #f6f3ea;
    --surface-color: #fffcf5;
    --text-color: #1f2933;
    --muted-color: #5f6b64;
    --border-color: #d7dfd2;
    --shadow: 0 14px 28px rgba(22, 43, 27, 0.12);
}

html, body {
    font-family: 'Source Sans 3', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(130deg, rgba(246,243,234,0.9), rgba(239,246,236,0.9)), url('../images/bg-milho.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(rgba(31,78,90,0.24), rgba(47,107,61,0.34));
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface-color);
    border-radius: 14px;
    border-top: 5px solid var(--secondary-color);
    box-shadow: var(--shadow);
    padding: 24px;
}

.auth-card h2 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.auth-card p {
    color: #666;
    margin-bottom: 12px;
}

.auth-form {
    display: grid;
    gap: 10px;
}

.auth-form input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.auth-error {
    color: var(--danger-color);
    font-size: 13px;
    margin-top: 8px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1b3f49 0%, #2f6b3d 100%);
    color: white;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 26px rgba(16, 43, 30, 0.38);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.session-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-email {
    font-size: 13px;
    background: rgba(255,255,255,0.18);
    padding: 6px 10px;
    border-radius: 999px;
}

.logo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.logo img {
    width: 260px;
    max-width: 100%;
    height: auto;
    display: block;
}

.logo p {
    font-size: 12px;
    opacity: 0.95;
    color: #e8f4ef;
    letter-spacing: 0.25px;
}

.nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: background-color 0.2s, border-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(111,163,107,0.28);
    border-color: rgba(255,255,255,0.32);
}

/* Main */
.main {
    padding: 18px;
    background: rgba(255,252,245,0.94);
    border-radius: 16px;
    margin-top: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(201, 214, 197, 0.8);
}

body.no-scroll {
    overflow: hidden;
}

.section {
    display: none;
    animation: fadeIn 0.3s;
}

.section.active {
    display: block;
}

.section.active .stat-card,
.section.active .exec-kpi-card,
.section.active .chart-card,
.section.active .table-wrapper,
.section.active .filters,
.section.active .pdf-card {
    opacity: 0;
    transform: translateY(12px);
}

.section.active.animate-in .stat-card,
.section.active.animate-in .exec-kpi-card,
.section.active.animate-in .chart-card,
.section.active.animate-in .table-wrapper,
.section.active.animate-in .filters,
.section.active.animate-in .pdf-card {
    animation: cardEntrance 0.34s ease forwards;
}

.section.active.animate-in .stats-grid .stat-card:nth-child(1),
.section.active.animate-in .exec-kpis .exec-kpi-card:nth-child(1),
.section.active.animate-in .charts .chart-card:nth-child(1) {
    animation-delay: 0.02s;
}

.section.active.animate-in .stats-grid .stat-card:nth-child(2),
.section.active.animate-in .exec-kpis .exec-kpi-card:nth-child(2),
.section.active.animate-in .charts .chart-card:nth-child(2) {
    animation-delay: 0.05s;
}

.section.active.animate-in .stats-grid .stat-card:nth-child(3),
.section.active.animate-in .exec-kpis .exec-kpi-card:nth-child(3),
.section.active.animate-in .charts .chart-card:nth-child(3) {
    animation-delay: 0.08s;
}

.section.active.animate-in .stats-grid .stat-card:nth-child(4),
.section.active.animate-in .exec-kpis .exec-kpi-card:nth-child(4),
.section.active.animate-in .charts .chart-card:nth-child(4) {
    animation-delay: 0.11s;
}

@media (prefers-reduced-motion: reduce) {
    .section,
    .section.active .stat-card,
    .section.active .exec-kpi-card,
    .section.active .chart-card,
    .section.active .table-wrapper,
    .section.active .filters,
    .section.active .pdf-card {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section h2 {
    margin-bottom: 20px;
    font-size: 22px;
    color: var(--secondary-color);
    font-weight: 800;
    letter-spacing: 0.2px;
    border-left: 5px solid var(--accent-color);
    padding-left: 12px;
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: linear-gradient(180deg, #fffef8 0%, #f4f9f1 100%);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #dbe5d8;
    border-top: 4px solid var(--secondary-color);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 26px rgba(23, 51, 34, 0.16);
}

.stat-card h3 {
    color: var(--muted-color);
    margin-bottom: 10px;
    font-size: 14px;
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-dark);
    letter-spacing: 0.3px;
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

/* Executive dashboard */
.exec-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.exec-kpi-card {
    background: linear-gradient(145deg, #fffef8, #f2f8ef);
    border-left: 5px solid var(--primary-color);
    border-radius: 14px;
    border-top: 2px solid #dde8dc;
    padding: 16px;
    box-shadow: var(--shadow);
}

.exec-kpi-card h3 {
    font-size: 13px;
    color: var(--muted-color);
    margin-bottom: 8px;
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

.exec-kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

.exec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.exec-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.exec-ranking {
    display: grid;
    gap: 8px;
}

.exec-ranking-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    background: #f8fbf4;
    border: 1px solid #e0e9db;
    border-radius: 10px;
    padding: 10px 12px;
}

.exec-ranking-doc {
    font-weight: 600;
    color: #34495e;
}

.exec-ranking-value {
    font-weight: 700;
    color: var(--primary-dark);
}

/* Charts */
.charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.chart-card {
    background: linear-gradient(180deg, #fffef8 0%, #f7fbf6 100%);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #dbe4d8;
    border-top: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.chart-card h3 {
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--secondary-color);
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

.year-group-card {
    margin-bottom: 20px;
}

.year-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.year-group-header h3 {
    margin-bottom: 0;
}

.year-select {
    max-width: 180px;
    min-width: 140px;
    flex: 0 0 auto;
}

.year-stats-grid {
    margin-bottom: 0;
}

.monthly-table-wrapper {
    margin-top: 4px;
}

.monthly-table th,
.monthly-table td {
    text-align: right;
}

.monthly-table th:first-child,
.monthly-table td:first-child {
    text-align: left;
}

#year-current-monthly-card.hidden {
    display: none;
}

#chart-vendas-ano,
#chart-despesas-ano,
#chart-categorias,
#chart-compradores-doc,
#chart-vendedores-doc,
#exec-chart-mensal-2025,
#exec-chart-mensal-atual,
#exec-chart-anos-anteriores {
    max-height: 300px;
}

.top-list {
    max-height: 300px;
    overflow-y: auto;
}

.top-list-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.top-list-item:last-child {
    border-bottom: none;
}

.top-list-name {
    flex: 1;
    font-weight: 500;
}

.top-list-valor {
    color: var(--primary-color);
    font-weight: bold;
}

/* Filtros */
.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    background: linear-gradient(180deg, #f7f4eb 0%, #f1f7ee 100%);
    border: 1px solid #d5dfd0;
    border-radius: 12px;
    padding: 12px;
}

.notas-mobile-actions {
    display: none;
    margin-bottom: 10px;
}

.notas-fluxo-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.fluxo-tab {
    border: 1px solid #c9d8ca;
    background: rgba(255, 255, 255, 0.78);
    color: var(--muted-color);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

.fluxo-tab::after {
    content: attr(data-count);
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(47, 107, 61, 0.12);
    color: var(--primary-dark);
}

.fluxo-tab:hover {
    border-color: #a8c2aa;
    color: var(--primary-dark);
}

.fluxo-tab.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(31, 78, 90, 0.18);
}

.fluxo-tab.active::after {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.notas-filters-header {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.notas-filters-backdrop {
    display: none;
}

.notas-categoria-chips {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.categoria-chip {
    border: 1px solid #c8d8ca;
    background: #f2f7ef;
    color: #234f2d;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

.categoria-chip:hover {
    background: #e5f0e4;
    border-color: #b3cbb7;
}

.categoria-chip.active {
    background: linear-gradient(135deg, #2a6037, #5e945f);
    border-color: #2a6037;
    color: #ffffff;
    box-shadow: 0 6px 12px rgba(42, 96, 55, 0.26);
}

.filters > div {
    min-width: 170px;
}

.filters label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-color);
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

.filter-input {
    flex: 1;
    min-width: 150px;
    padding: 9px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: #fffef9;
    font-family: inherit;
}

.filter-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(31,78,90,0.16);
}

textarea.filter-input {
    min-height: 86px;
    resize: vertical;
}

/* Botões */
.btn {
    padding: 9px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 8px 16px rgba(47, 107, 61, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2a6037, #5e945f);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 8px 14px rgba(31, 78, 90, 0.22);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.btn:active {
    transform: translateY(1px);
}

.btn:hover {
    transform: translateY(-1px);
}

/* Tabela */
.table-wrapper {
    background: var(--surface-color);
    border-radius: 14px;
    border: 1px solid #d7e0d1;
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: linear-gradient(135deg, #214f5b 0%, #2f6b3d 100%);
    color: white;
}

.table th {
    padding: 13px 12px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.25px;
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:nth-child(even) {
    background: #fcfdf9;
}

.table tbody tr:hover {
    background-color: #ebf5ec;
}

.table .loading {
    text-align: center;
    color: #999;
}

.table .action-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
}

.table .action-btn:hover {
    background-color: var(--secondary-dark);
}

.table .action-btn + .action-btn {
    margin-left: 6px;
}

.table .action-btn.action-danger {
    background-color: var(--danger-color);
}

.nota-expand-btn {
    background: #edf6ee;
    color: #1f5d34;
    border: 1px solid #bad8bf;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    font-weight: 700;
    cursor: pointer;
}

.nota-expand-btn:hover {
    background: #deefdf;
}

.nota-row-details {
    background: #fbfdf8;
}

.nota-details-container {
    border-top: 1px dashed #d0e2d3;
    padding: 12px;
}

.nota-details-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.nota-items-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #dfe8de;
    border-radius: 10px;
    overflow: hidden;
}

.nota-items-table th,
.nota-items-table td {
    padding: 8px;
    border-bottom: 1px solid #e9efea;
    text-align: left;
    font-size: 13px;
}

.nota-items-table thead {
    background: #e8f2e6;
    color: #2a4f3a;
}

.nota-items-empty {
    color: #7c8a82;
    font-size: 13px;
    padding: 4px 0;
}

.table .action-btn.action-danger:hover {
    background-color: #c0392b;
}

.table tbody tr.row-selected {
    background-color: #ecf8ef;
}

.talhao-tag {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    margin-right: 8px;
    vertical-align: middle;
}

.talhao-map-wrap {
    margin-top: 16px;
    border: 1px solid #d5e2d2;
    border-radius: 12px;
    padding: 12px;
    background: #fbfef9;
}

.talhao-map-wrap h4 {
    color: #355948;
    margin-bottom: 8px;
}

#talhoes-map {
    width: 100%;
    min-height: 360px;
    border-radius: 12px;
    border: 1px solid #d5e2d2;
    background: #f4f9f3;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

#page-info {
    color: #666;
    font-weight: 500;
}

/* PDFs Grid */
.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.pdf-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    border-top: 4px solid var(--secondary-color);
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.pdf-card:hover {
    transform: translateY(-5px);
}

.pdf-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.pdf-name {
    font-weight: 600;
    margin-bottom: 10px;
    word-break: break-word;
    font-size: 14px;
}

.pdf-actions {
    display: flex;
    gap: 10px;
}

.pdf-actions button {
    flex: 1;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.nota-sidepanel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 27, 22, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 1080;
}

.nota-sidepanel-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.nota-sidepanel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(680px, 54vw);
    height: 100vh;
    background: var(--surface-color);
    border-left: 1px solid #d5e2d2;
    box-shadow: -12px 0 26px rgba(17, 37, 24, 0.24);
    transform: translateX(104%);
    transition: transform 0.24s ease;
    z-index: 1090;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

@media (max-width: 1280px) {
    .nota-sidepanel {
        width: min(640px, 62vw);
    }
}

@media (max-width: 992px) {
    .nota-sidepanel {
        width: min(560px, 74vw);
    }
}

.nota-sidepanel.show {
    transform: translateX(0);
}

.nota-sidepanel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #dbe5d8;
    background: linear-gradient(135deg, #1b3f49 0%, #2f6b3d 100%);
    color: #f2f8f3;
}

.nota-sidepanel-header h3 {
    margin: 0;
    font-size: 18px;
    font-family: 'Manrope', 'Source Sans 3', sans-serif;
}

.nota-sidepanel-body {
    padding: 16px;
    overflow-y: auto;
}

.nota-sidepanel-footer {
    padding: 14px 16px;
    border-top: 1px solid #dbe5d8;
    background: #f7fbf5;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--surface-color);
    padding: 24px;
    border-radius: 14px;
    border-top: 5px solid var(--secondary-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    width: 90%;
}

.modal-pdf-content {
    max-width: 900px;
    padding: 0;
}

#pdf-viewer {
    width: 100%;
    height: 600px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.year-group-header {
    border-bottom: 1px solid #dce5d9;
    padding-bottom: 8px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.close-modal {
    cursor: pointer;
}

/* Detalhes Nota */
.nota-details {
    display: grid;
    gap: 10px;
    font-size: 14px;
}

.nota-details-group {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.nota-details-group:last-child {
    border-bottom: none;
}

.nota-field {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px;
}

.nota-field-label {
    font-weight: 600;
    color: var(--muted-color);
}

.nota-field-value {
    word-break: break-word;
}

/* Responsivo */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }

    .logo {
        align-items: center;
        text-align: center;
    }

    .logo img {
        width: 200px;
    }

    .section h2 {
        font-size: 20px;
    }

    .main {
        padding: 12px;
        border-radius: 10px;
    }

    .nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .stats-grid,
    .charts {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px;
    }

    .modal-content {
        width: 95%;
        padding: 16px;
    }

    .filters {
        flex-direction: column;
    }

    .filter-input {
        min-width: unset;
    }

    .filters > div {
        min-width: 100%;
    }

    .btn {
        width: 100%;
    }

    .notas-mobile-actions {
        display: block;
    }

    .notas-fluxo-tabs {
        margin-bottom: 10px;
    }

    .fluxo-tab {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }

    .notas-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        border-radius: 14px 14px 0 0;
        z-index: 1110;
        transform: translateY(105%);
        transition: transform 0.22s ease;
        max-height: 82vh;
        overflow-y: auto;
        box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.24);
    }

    .notas-filters-header,
    #filter-categoria,
    #filter-cliente,
    #filter-categoria-chips {
        grid-column: 1 / -1;
    }

    #filter-categoria {
        order: 1;
    }

    #filter-cliente {
        order: 2;
    }

    #btn-filtrar {
        order: 3;
        width: 100%;
    }

    #btn-limpar {
        order: 4;
        width: 100%;
    }

    .notas-categoria-chips {
        order: 5;
        margin-top: 2px;
    }

    .notas-filters.show {
        transform: translateY(0);
    }

    .notas-filters-header {
        display: flex;
    }

    .notas-filters-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 25, 20, 0.44);
        z-index: 1100;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease;
    }

    .notas-filters-backdrop.show {
        opacity: 1;
        visibility: visible;
        display: block;
    }

    .nota-sidepanel {
        width: 100vw;
    }

    .pagination {
        flex-wrap: wrap;
    }
}
