/* ============================================================
 * LourisERP — Filament custom overrides
 * ============================================================ */

/* ------------------------------------------------------------------
 * 1. Sidebar: hide scrollbar while keeping scroll functionality
 * ------------------------------------------------------------------ */
.fi-sidebar-nav {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE / Edge legacy */
}

.fi-sidebar-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* ------------------------------------------------------------------
 * 2. Topbar: reorder elements so logo comes BEFORE collapse button
 *    Default order: [collapse btn] [logo]
 *    Desired order: [logo] [collapse btn]
 * ------------------------------------------------------------------ */
.fi-topbar-start {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.625rem !important;
}

/* Logo / brand link → first */
.fi-topbar-start > a {
    order: 1;
}

/* Fallback when no home URL (no <a> wrapper) */
.fi-topbar-start > .fi-logo {
    order: 1;
}

/* Collapse/expand sidebar button → after logo */
.fi-topbar-collapse-sidebar-btn-ctn {
    order: 2;
}

/* ------------------------------------------------------------------
 * 3. Custom brand: logo image + name side-by-side
 * ------------------------------------------------------------------ */
.pulse-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
}

.pulse-brand img {
    height: 1.875rem;
    width: auto;
    flex-shrink: 0;
}

.pulse-brand span {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    color: inherit;
}

/* ------------------------------------------------------------------
 * 4. Relatórios Dashboard — module card grid
 * ------------------------------------------------------------------ */
.rel-dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .rel-dash-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .rel-dash-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.rel-dash-card {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    overflow: hidden;
}

.dark .rel-dash-card {
    border-color: rgb(255 255 255 / 0.1);
    background-color: #111827;
}

.rel-dash-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.rel-dash-mod-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rel-dash-mod-svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #ffffff;
}

.rel-dash-mod-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dark .rel-dash-mod-title {
    color: #ffffff;
}

.rel-dash-divider {
    border-top: 1px solid #f3f4f6;
}

.dark .rel-dash-divider {
    border-color: rgb(255 255 255 / 0.05);
}

.rel-dash-list {
    padding: 0.75rem 1.25rem;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.rel-dash-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    text-decoration: none;
    line-height: 1.4;
}

.rel-dash-item-link {
    color: #374151;
    transition: color 0.15s;
}

.rel-dash-item-link:hover {
    color: var(--primary-600, #2563eb);
}

.dark .rel-dash-item-link {
    color: #d1d5db;
}

.dark .rel-dash-item-link:hover {
    color: var(--primary-400, #60a5fa);
}

.rel-dash-item-disabled {
    color: #9ca3af;
    cursor: not-allowed;
    user-select: none;
}

.dark .rel-dash-item-disabled {
    color: #4b5563;
}

.rel-dash-item-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: #9ca3af;
    transition: color 0.15s;
}

.rel-dash-item-link:hover .rel-dash-item-icon {
    color: var(--primary-500, #3b82f6);
}

/* ------------------------------------------------------------------
 * 5. Stat Cards — used in Relatório de Vendas and similar pages
 * ------------------------------------------------------------------ */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .stat-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.07);
    overflow: hidden;
}

.dark .stat-card {
    border-color: rgb(255 255 255 / 0.1);
    background-color: #1f2937;
}

.stat-card-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
}

.stat-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-svg {
    width: 1.375rem;
    height: 1.375rem;
    color: #ffffff;
}

.stat-card-icon--blue {
    background-color: #2563eb;
}
.stat-card-icon--green {
    background-color: #059669;
}
.stat-card-icon--indigo {
    background-color: #4f46e5;
}
.stat-card-icon--red {
    background-color: #dc2626;
}
.stat-card-icon--orange {
    background-color: #f97316;
}

.stat-card-body {
    min-width: 0;
    flex: 1;
}

.stat-card-label {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .stat-card-label {
    color: #9ca3af;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.dark .stat-card-value {
    color: #f9fafb;
}

.stat-card-value--green {
    color: #059669;
}
.stat-card-value--red {
    color: #dc2626;
}
.stat-card-value--orange {
    color: #d97706;
}

.dark .stat-card-value--green {
    color: #34d399;
}
.dark .stat-card-value--red {
    color: #f87171;
}
.dark .stat-card-value--orange {
    color: #fbbf24;
}

/* ------------------------------------------------------------------
 * 6. DRE — Demonstração do Resultado do Exercício
 * ------------------------------------------------------------------ */

/* Filter card */
.dre-filter {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.dark .dre-filter {
    border-color: rgb(255 255 255 / 0.1);
    background-color: #1f2937;
}

.dre-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

.dre-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dre-filter-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
}

.dark .dre-filter-label {
    color: #d1d5db;
}

.dre-filter-input {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #111827;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.dark .dre-filter-input {
    border-color: rgb(255 255 255 / 0.15);
    background-color: #111827;
    color: #f9fafb;
}

.dre-filter-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    align-self: center;
    margin: 0;
}

/* DRE Card */
.dre-card {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.07);
}

.dark .dre-card {
    border-color: rgb(255 255 255 / 0.1);
    background-color: #1f2937;
}

/* DRE Header */
.dre-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.dark .dre-header {
    border-bottom-color: rgb(255 255 255 / 0.05);
    background-color: #111827;
}

.dre-header-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.dark .dre-header-title {
    color: #f9fafb;
}

.dre-header-period {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

.dark .dre-header-period {
    color: #9ca3af;
}

/* Base DRE row */
.dre-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    transition: background-color 0.1s;
}

.dark .dre-row {
    border-top-color: rgb(255 255 255 / 0.04);
}

.dre-row:hover {
    background-color: #f9fafb;
}

.dark .dre-row:hover {
    background-color: rgb(255 255 255 / 0.03);
}

/* Section row — bold heading within the statement */
.dre-row--section {
    background-color: #fafafa;
    border-top: 1px solid #d1d5db;
}

.dark .dre-row--section {
    background-color: rgb(255 255 255 / 0.025);
    border-top-color: rgb(255 255 255 / 0.1);
}

.dre-row--section .dre-row-label {
    font-weight: 600;
}

/* Item row — indented sub-category */
.dre-row--item {
    padding-left: 2.75rem;
    background-color: #f9fafb;
    border-top-color: transparent;
}

.dark .dre-row--item {
    background-color: rgb(0 0 0 / 0.12);
    border-top-color: transparent;
}

/* Row label and value */
.dre-row-label {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 400;
}

.dark .dre-row-label {
    color: #e5e7eb;
}

.dre-row-value {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Item label/value */
.dre-row-item-label {
    font-size: 0.8125rem;
    color: #6b7280;
}

.dark .dre-row-item-label {
    color: #9ca3af;
}

.dre-row-item-value {
    font-size: 0.8125rem;
    color: #6b7280;
    white-space: nowrap;
}

.dark .dre-row-item-value {
    color: #9ca3af;
}

/* Value color modifiers */
.dre-val--pos {
    color: #059669;
}
.dre-val--neg {
    color: #dc2626;
}
.dre-val--zero {
    color: #9ca3af;
}

.dark .dre-val--pos {
    color: #34d399;
}
.dark .dre-val--neg {
    color: #f87171;
}

/* IR badge */
.dre-ir-badge {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
}

/* Subtotal rows */
.dre-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}

.dre-subtotal-label {
    font-size: 0.875rem;
    font-weight: 700;
}

.dre-subtotal-value {
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
}

.dre-subtotal-label--lg {
    font-size: 0.9375rem;
}
.dre-subtotal-value--lg {
    font-size: 0.9375rem;
}

/* Blue subtotal — Receita Operacional Líquida */
.dre-subtotal--blue {
    background-color: #eff6ff;
    border-top-color: #bfdbfe;
    border-bottom-color: #bfdbfe;
}

.dark .dre-subtotal--blue {
    background-color: rgb(37 99 235 / 0.12);
    border-top-color: rgb(37 99 235 / 0.3);
    border-bottom-color: rgb(37 99 235 / 0.3);
}

.dre-subtotal--blue .dre-subtotal-label {
    color: #1e40af;
}
.dre-subtotal--blue .dre-subtotal-val--pos {
    color: #1e40af;
}
.dre-subtotal--blue .dre-subtotal-val--neg {
    color: #dc2626;
}

.dark .dre-subtotal--blue .dre-subtotal-label {
    color: #93c5fd;
}
.dark .dre-subtotal--blue .dre-subtotal-val--pos {
    color: #93c5fd;
}
.dark .dre-subtotal--blue .dre-subtotal-val--neg {
    color: #f87171;
}

/* Green subtotal — Lucro Bruto */
.dre-subtotal--green {
    background-color: #ecfdf5;
    border-top-color: #6ee7b7;
    border-bottom-color: #6ee7b7;
}

.dark .dre-subtotal--green {
    background-color: rgb(5 150 105 / 0.12);
    border-top-color: rgb(5 150 105 / 0.3);
    border-bottom-color: rgb(5 150 105 / 0.3);
}

.dre-subtotal--green .dre-subtotal-label {
    color: #065f46;
}
.dre-subtotal--green .dre-subtotal-val--pos {
    color: #065f46;
}
.dre-subtotal--green .dre-subtotal-val--neg {
    color: #dc2626;
}

.dark .dre-subtotal--green .dre-subtotal-label {
    color: #6ee7b7;
}
.dark .dre-subtotal--green .dre-subtotal-val--pos {
    color: #6ee7b7;
}
.dark .dre-subtotal--green .dre-subtotal-val--neg {
    color: #f87171;
}

/* Amber subtotal — Resultado Antes do IR/CSLL */
.dre-subtotal--amber {
    background-color: #fffbeb;
    border-top-color: #fde68a;
    border-bottom-color: #fde68a;
}

.dark .dre-subtotal--amber {
    background-color: rgb(245 158 11 / 0.12);
    border-top-color: rgb(245 158 11 / 0.3);
    border-bottom-color: rgb(245 158 11 / 0.3);
}

.dre-subtotal--amber .dre-subtotal-label {
    color: #92400e;
}
.dre-subtotal--amber .dre-subtotal-val--pos {
    color: #92400e;
}
.dre-subtotal--amber .dre-subtotal-val--neg {
    color: #dc2626;
}

.dark .dre-subtotal--amber .dre-subtotal-label {
    color: #fcd34d;
}
.dark .dre-subtotal--amber .dre-subtotal-val--pos {
    color: #fcd34d;
}
.dark .dre-subtotal--amber .dre-subtotal-val--neg {
    color: #f87171;
}

/* Final result — Lucro */
.dre-subtotal--final-pos {
    background-color: #f0fdf4;
    border-top: 2px solid #86efac;
    border-bottom-color: transparent;
}

.dark .dre-subtotal--final-pos {
    background-color: rgb(5 150 105 / 0.18);
    border-top-color: rgb(5 150 105 / 0.45);
}

.dre-subtotal--final-pos .dre-subtotal-label {
    color: #166534;
}
.dre-subtotal--final-pos .dre-subtotal-val--pos {
    color: #166534;
}

.dark .dre-subtotal--final-pos .dre-subtotal-label {
    color: #4ade80;
}
.dark .dre-subtotal--final-pos .dre-subtotal-val--pos {
    color: #4ade80;
}

/* Final result — Prejuízo */
.dre-subtotal--final-neg {
    background-color: #fef2f2;
    border-top: 2px solid #fca5a5;
    border-bottom-color: transparent;
}

.dark .dre-subtotal--final-neg {
    background-color: rgb(220 38 38 / 0.15);
    border-top-color: rgb(220 38 38 / 0.4);
}

.dre-subtotal--final-neg .dre-subtotal-label {
    color: #991b1b;
}
.dre-subtotal--final-neg .dre-subtotal-val--neg {
    color: #991b1b;
}

.dark .dre-subtotal--final-neg .dre-subtotal-label {
    color: #f87171;
}
.dark .dre-subtotal--final-neg .dre-subtotal-val--neg {
    color: #f87171;
}

/* DRE Footer */
.dre-footer {
    padding: 0.75rem 1.5rem;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.dark .dre-footer {
    background-color: #111827;
    border-top-color: rgb(255 255 255 / 0.05);
}

.dre-footer-text {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.5;
}

/* ------------------------------------------------------------------
 * 7. Relatório de Lucratividade
 * ------------------------------------------------------------------ */

/* Filter card */
.lucr-filter {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.dark .lucr-filter {
    border-color: rgb(255 255 255 / 0.1);
    background-color: #1f2937;
}

.lucr-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

.lucr-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lucr-filter-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
}

.dark .lucr-filter-label {
    color: #d1d5db;
}

.lucr-filter-input,
.lucr-filter-select {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #111827;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    min-width: 8rem;
}

.dark .lucr-filter-input,
.dark .lucr-filter-select {
    border-color: rgb(255 255 255 / 0.15);
    background-color: #111827;
    color: #f9fafb;
}

/* Table card */
.lucr-table-card {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.07);
}

.dark .lucr-table-card {
    border-color: rgb(255 255 255 / 0.1);
    background-color: #1f2937;
}

.lucr-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.dark .lucr-table-header {
    border-bottom-color: rgb(255 255 255 / 0.05);
    background-color: #111827;
}

.lucr-table-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.dark .lucr-table-title {
    color: #f9fafb;
}

.lucr-table-count {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Scroll wrapper */
.lucr-table-scroll {
    overflow-x: auto;
}

/* Table */
.lucr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

/* Head */
.lucr-thead {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.dark .lucr-thead {
    background-color: #111827;
    border-bottom-color: rgb(255 255 255 / 0.06);
}

.lucr-th {
    padding: 0.625rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    text-align: left;
    white-space: nowrap;
}

.dark .lucr-th {
    color: #9ca3af;
}

.lucr-th--num {
    text-align: right;
}

/* Body rows */
.lucr-tbody .lucr-tr {
    border-top: 1px solid #f3f4f6;
    transition: background-color 0.1s;
}

.dark .lucr-tbody .lucr-tr {
    border-top-color: rgb(255 255 255 / 0.04);
}

.lucr-tbody .lucr-tr:hover {
    background-color: #f9fafb;
}

.dark .lucr-tbody .lucr-tr:hover {
    background-color: rgb(255 255 255 / 0.03);
}

/* Cells */
.lucr-td {
    padding: 0.625rem 1rem;
    color: #374151;
    white-space: nowrap;
}

.dark .lucr-td {
    color: #d1d5db;
}

.lucr-td--rank {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    width: 2.5rem;
}

.lucr-td--name {
    font-weight: 500;
    color: #111827;
    white-space: normal;
    min-width: 10rem;
    max-width: 18rem;
}

.dark .lucr-td--name {
    color: #f9fafb;
}

.lucr-td--cat {
    color: #6b7280;
    font-size: 0.8125rem;
}

.dark .lucr-td--cat {
    color: #9ca3af;
}

.lucr-td--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.lucr-td--custo {
    color: #6b7280;
}

.dark .lucr-td--custo {
    color: #9ca3af;
}

.lucr-td--lucro-pos {
    color: #059669;
    font-weight: 600;
}

.lucr-td--lucro-neg {
    color: #dc2626;
    font-weight: 600;
}

.dark .lucr-td--lucro-pos {
    color: #34d399;
}
.dark .lucr-td--lucro-neg {
    color: #f87171;
}

/* Margin cell */
.lucr-margem-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 5.5rem;
}

.lucr-margem-pct {
    font-size: 0.8125rem;
    font-weight: 600;
}

.lucr-margem-pct--pos {
    color: #059669;
}
.lucr-margem-pct--neg {
    color: #dc2626;
}

.dark .lucr-margem-pct--pos {
    color: #34d399;
}
.dark .lucr-margem-pct--neg {
    color: #f87171;
}

.lucr-margem-bar-bg {
    height: 0.25rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
    width: 100%;
}

.dark .lucr-margem-bar-bg {
    background-color: rgb(255 255 255 / 0.08);
}

.lucr-margem-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.lucr-margem-bar--pos {
    background-color: #059669;
}
.lucr-margem-bar--neg {
    background-color: #dc2626;
}

.dark .lucr-margem-bar--pos {
    background-color: #34d399;
}
.dark .lucr-margem-bar--neg {
    background-color: #f87171;
}

/* Footer total row */
.lucr-tfoot .lucr-tr {
    background-color: #f3f4f6;
    border-top: 2px solid #d1d5db;
}

.dark .lucr-tfoot .lucr-tr {
    background-color: rgb(255 255 255 / 0.04);
    border-top-color: rgb(255 255 255 / 0.12);
}

.lucr-tf-label {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
}

.dark .lucr-tf-label {
    color: #f9fafb;
}

.lucr-tf {
    font-weight: 700;
    color: #111827;
}

.dark .lucr-tf {
    color: #f9fafb;
}

/* Empty state */
.lucr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    gap: 0.75rem;
}

.lucr-empty-icon {
    width: 3rem;
    height: 3rem;
    color: #d1d5db;
}

.lucr-empty-text {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
}

/* ------------------------------------------------------------------
 * 8. Vendas por Forma de Pagamento — shared helpers
 * ------------------------------------------------------------------ */

/* Tipo badge — colored pill, background/border injected via inline style */
.fpag-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Participation bar — color injected via inline style */
.fpag-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* ------------------------------------------------------------------
 * 9. Vendas por Cliente — badge helpers
 * ------------------------------------------------------------------ */

/* Name cell: flex row with name + badge side by side */
.vcli-name-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Base badge pill */
.vcli-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}

/* Registered customer — green */
.vcli-badge--cad {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.dark .vcli-badge--cad {
    background-color: #14532d;
    color: #86efac;
    border-color: #166534;
}

/* Anonymous customer — gray */
.vcli-badge--anon {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.dark .vcli-badge--anon {
    background-color: #374151;
    color: #9ca3af;
    border-color: #4b5563;
}

/* Right side of table header: search + count grouped together */
.vcli-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Search bar — inside table header */
.vcli-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.vcli-search-icon {
    position: absolute;
    left: 0.625rem;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.vcli-search-svg {
    width: 0.9rem;
    height: 0.9rem;
    color: #9ca3af;
}

.vcli-search-input {
    padding: 0.375rem 2rem 0.375rem 2rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    color: #111827;
    background-color: #ffffff;
    outline: none;
    width: 200px;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.vcli-search-input:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 2px
        color-mix(in srgb, var(--primary-600) 20%, transparent);
}

.dark .vcli-search-input {
    background-color: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.dark .vcli-search-input:focus {
    border-color: var(--primary-500);
}

/* Clear (x) button */
.vcli-search-clear {
    position: absolute;
    right: 0.5rem;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
}

.vcli-search-clear:hover {
    color: #6b7280;
}

.vcli-search-clear-svg {
    width: 0.85rem;
    height: 0.85rem;
}

/* ------------------------------------------------------------------
 * 10. Produtos Mais Vendidos — product cell helpers
 * ------------------------------------------------------------------ */

/* Product name + reference stacked */
.pmv-product-cell {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

/* Reference code — small muted text below product name */
.pmv-ref {
    font-size: 0.7rem;
    color: #9ca3af;
    font-family: monospace;
    line-height: 1;
}

.dark .pmv-ref {
    color: #6b7280;
}

/* Unit of measure — small inline label after quantity */
.pmv-unit {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-left: 0.2rem;
}

.dark .pmv-unit {
    color: #6b7280;
}

/* ------------------------------------------------------------------
 * 11. Estoque Baixo — situation badges + extra stat card colors
 * ------------------------------------------------------------------ */

/* Situation badge base */
.estb-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* Zerado — red */
.estb-badge--zerado {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
.dark .estb-badge--zerado {
    background-color: #450a0a;
    color: #fca5a5;
    border-color: #991b1b;
}

/* Crítico — orange */
.estb-badge--critico {
    background-color: #ffedd5;
    color: #9a3412;
    border-color: #fdba74;
}
.dark .estb-badge--critico {
    background-color: #431407;
    color: #fdba74;
    border-color: #c2410c;
}

/* Baixo — yellow */
.estb-badge--baixo {
    background-color: #fef9c3;
    color: #854d0e;
    border-color: #fde047;
}
.dark .estb-badge--baixo {
    background-color: #422006;
    color: #fde047;
    border-color: #854d0e;
}

/* Extra stat card icon colors used by Estoque Baixo */
.stat-card-icon--red {
    background-color: #fee2e2;
    color: #dc2626;
}
.dark .stat-card-icon--red {
    background-color: #450a0a;
    color: #f87171;
}

.stat-card-icon--yellow {
    background-color: #fef9c3;
    color: #ca8a04;
}
.dark .stat-card-icon--yellow {
    background-color: #422006;
    color: #facc15;
}

.stat-card-value--red {
    color: #dc2626;
}
.dark .stat-card-value--red {
    color: #f87171;
}

.stat-card-value--yellow {
    color: #ca8a04;
}
.dark .stat-card-value--yellow {
    color: #facc15;
}

/* ------------------------------------------------------------------
 * 12. Movimentação de Estoque — operation badge + obs cell
 * ------------------------------------------------------------------ */

/* Entrada / Saída badge with icon */
.mov-op-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

.mov-op-icon {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}

/* Entrada — green */
.mov-op-badge--entrada {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}
.dark .mov-op-badge--entrada {
    background-color: #14532d;
    color: #86efac;
    border-color: #166534;
}

/* Saída — red */
.mov-op-badge--saida {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
.dark .mov-op-badge--saida {
    background-color: #450a0a;
    color: #fca5a5;
    border-color: #991b1b;
}

/* Observation cell — muted, smaller text */
.mov-obs-cell {
    font-size: 0.78rem;
    color: #6b7280;
    max-width: 200px;
}
.dark .mov-obs-cell {
    color: #9ca3af;
}

/* ------------------------------------------------------------------
 * 13. Exibir Produtos — status badge
 * ------------------------------------------------------------------ */

.prod-status-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

.prod-status-badge--ativo {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}
.dark .prod-status-badge--ativo {
    background-color: #14532d;
    color: #86efac;
    border-color: #166534;
}

.prod-status-badge--inativo {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}
.dark .prod-status-badge--inativo {
    background-color: #374151;
    color: #9ca3af;
    border-color: #4b5563;
}

/* ------------------------------------------------------------------
 * 14. Fluxo de Caixa — dual mini bar chart per row
 * ------------------------------------------------------------------ */

.fluxo-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 120px;
}

.fluxo-bar-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.fluxo-bar-label {
    font-size: 0.65rem;
    font-weight: 700;
    width: 0.9rem;
    text-align: center;
    flex-shrink: 0;
}

.fluxo-bar-label--ent {
    color: #16a34a;
}
.fluxo-bar-label--sai {
    color: #dc2626;
}

.fluxo-bar-bg {
    flex: 1;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}
.dark .fluxo-bar-bg {
    background-color: #374151;
}

.fluxo-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.fluxo-bar--ent {
    background-color: #16a34a;
}
.fluxo-bar--sai {
    background-color: #dc2626;
}

/* ------------------------------------------------------------------
 * 15. Ficha de Estoque por Produto
 * ------------------------------------------------------------------ */

/* Card do produto selecionado */
.ficha-produto-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.25rem;
}
.dark .ficha-produto-card {
    background-color: #1f2937;
    border-color: #374151;
}

.ficha-produto-nome {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.35rem;
}
.dark .ficha-produto-nome {
    color: #f9fafb;
}

.ficha-produto-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ficha-meta-item {
    font-size: 0.8rem;
    color: #6b7280;
}
.dark .ficha-meta-item {
    color: #9ca3af;
}
.ficha-meta-item strong {
    color: #374151;
}
.dark .ficha-meta-item strong {
    color: #d1d5db;
}

.ficha-produto-saldo {
    text-align: right;
    flex-shrink: 0;
}

.ficha-saldo-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-bottom: 0.15rem;
}

.ficha-saldo-value {
    font-size: 1.5rem;
    font-weight: 800;
}
.ficha-saldo-value--ok {
    color: #16a34a;
}
.ficha-saldo-value--baixo {
    color: #d97706;
}
.ficha-saldo-value--zerado {
    color: #dc2626;
}

.ficha-saldo-min {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 0.1rem;
}

/* Linha de saldo inicial/final na tabela */
.ficha-saldo-row {
    background-color: #f8fafc;
}
.dark .ficha-saldo-row {
    background-color: #1e293b;
}
.ficha-saldo-row td {
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.82rem;
}
.dark .ficha-saldo-row td {
    border-color: #334155;
    color: #94a3b8;
}
.ficha-saldo-row--final td {
    border-top: 2px solid #cbd5e1;
}
.dark .ficha-saldo-row--final td {
    border-top-color: #475569;
}

/* Saldo corrente colorido */
.ficha-saldo-warn {
    color: #d97706;
    font-weight: 700;
}
.ficha-saldo-danger {
    color: #dc2626;
    font-weight: 700;
}

/* Badge de saída por venda */
.ficha-badge-venda {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.dark .ficha-badge-venda {
    background-color: #450a0a;
    color: #fca5a5;
    border-color: #991b1b;
}
.ficha-badge-venda .mov-op-icon {
    width: 0.8rem;
    height: 0.8rem;
}

/* Coluna de saída por venda */
.ficha-col-venda {
    color: #b91c1c;
    font-weight: 600;
}
.dark .ficha-col-venda {
    color: #fca5a5;
}

/* Badge OK / Divergência na linha de saldo final */
.ficha-badge--ok {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.dark .ficha-badge--ok {
    background-color: #14532d;
    color: #86efac;
    border-color: #166534;
}

.ficha-badge--divergencia {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.dark .ficha-badge--divergencia {
    background-color: #450a0a;
    color: #fca5a5;
    border-color: #991b1b;
}

/* Alerta de divergência acima da tabela */
.ficha-divergencia-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: #fef2f2;
    border-top: 1px solid #fecaca;
    font-size: 0.82rem;
    color: #b91c1c;
    line-height: 1.5;
}
.dark .ficha-divergencia-alert {
    background-color: #450a0a;
    color: #fca5a5;
    border-top-color: #991b1b;
}

.ficha-alert-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #dc2626;
}
.dark .ficha-alert-icon {
    color: #f87171;
}

/* stat-card-icon--orange (reused for saídas ajuste) */
.stat-card-icon--orange {
    background-color: #fff7ed;
    color: #c2410c;
}
.dark .stat-card-icon--orange {
    background-color: #431407;
    color: #fb923c;
}

/* stat-card-value--orange */
.stat-card-value--orange {
    color: #c2410c;
}
.dark .stat-card-value--orange {
    color: #fb923c;
}

/* ------------------------------------------------------------------
 * 16. Contas a Pagar — status badges e linha vencida
 * ------------------------------------------------------------------ */

.cp-status-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

.cp-badge--pago {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}
.dark .cp-badge--pago {
    background-color: #14532d;
    color: #86efac;
    border-color: #166534;
}

.cp-badge--parcial {
    background-color: #fef9c3;
    color: #854d0e;
    border-color: #fde047;
}
.dark .cp-badge--parcial {
    background-color: #422006;
    color: #fde047;
    border-color: #854d0e;
}

.cp-badge--vencido {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.dark .cp-badge--vencido {
    background-color: #450a0a;
    color: #fca5a5;
    border-color: #991b1b;
}

.cp-badge--pendente {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}
.dark .cp-badge--pendente {
    background-color: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

/* Linha com vencimento em atraso */
.cp-row--vencida td {
    background-color: #fff5f5;
}
.dark .cp-row--vencida td {
    background-color: #1c0a0a;
}

/* ------------------------------------------------------------------
 * 17. Clientes — badges de tipo e aniversariantes
 * ------------------------------------------------------------------ */

/* Badge PF / PJ */
.cli-tipo-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.cli-tipo-badge--fisica {
    background-color: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.dark .cli-tipo-badge--fisica {
    background-color: #1e3a5f;
    color: #93c5fd;
    border-color: #1d4ed8;
}

.cli-tipo-badge--juridica {
    background-color: #fdf4ff;
    color: #7e22ce;
    border-color: #e9d5ff;
}
.dark .cli-tipo-badge--juridica {
    background-color: #3b0764;
    color: #d8b4fe;
    border-color: #7e22ce;
}

/* Linha de aniversariante hoje */
.aniv-row--hoje td {
    background-color: #fffbeb;
}
.dark .aniv-row--hoje td {
    background-color: #1c1508;
}

/* Badge "hoje" na coluna Dia */
.aniv-hoje-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.dark .aniv-hoje-badge {
    background-color: #451a03;
    color: #fde68a;
    border-color: #92400e;
}

.aniv-cake-icon {
    width: 0.8rem;
    height: 0.8rem;
}

/* ------------------------------------------------------------------
 * 18. Auditoria — logs, cancelamentos, alterações
 * ------------------------------------------------------------------ */

/* Log level badges */
.log-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.log-badge--error {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.dark .log-badge--error {
    background-color: #450a0a;
    color: #fca5a5;
    border-color: #991b1b;
}

.log-badge--warning {
    background-color: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}
.dark .log-badge--warning {
    background-color: #451a03;
    color: #fde68a;
    border-color: #92400e;
}

.log-badge--info {
    background-color: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.dark .log-badge--info {
    background-color: #1e3a5f;
    color: #93c5fd;
    border-color: #1d4ed8;
}

.log-badge--debug {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}
.dark .log-badge--debug {
    background-color: #374151;
    color: #9ca3af;
    border-color: #4b5563;
}

/* Linha de erro no log */
.log-row--error td,
.log-row--critical td,
.log-row--emergency td,
.log-row--alert td {
    background-color: #fff5f5;
}
.dark .log-row--error td,
.dark .log-row--critical td {
    background-color: #1c0a0a;
}

.log-row--warning td,
.log-row--notice td {
    background-color: #fffdf0;
}
.dark .log-row--warning td {
    background-color: #1a1500;
}

/* Célula de mensagem de log */
.log-mensagem-cell {
    font-size: 0.78rem;
    font-family: monospace;
    color: #374151;
    max-width: 600px;
    word-break: break-all;
}
.dark .log-mensagem-cell {
    color: #d1d5db;
}

/* Grid de rankings lado a lado */
.alt-rankings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 768px) {
    .alt-rankings-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   Section 19: Auditoria Geral
   ============================================= */

/* Badges de operação */
.audit-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.audit-badge--create {
    background: #dcfce7;
    color: #15803d;
}
.audit-badge--update {
    background: #dbeafe;
    color: #1d4ed8;
}
.audit-badge--delete {
    background: #fee2e2;
    color: #b91c1c;
}
.audit-badge--restore {
    background: #e0e7ff;
    color: #4338ca;
}
.audit-badge--login {
    background: #fef9c3;
    color: #854d0e;
}
.audit-badge--default {
    background: #f3f4f6;
    color: #374151;
}

.dark .audit-badge--create {
    background: #14532d;
    color: #86efac;
}
.dark .audit-badge--update {
    background: #1e3a5f;
    color: #93c5fd;
}
.dark .audit-badge--delete {
    background: #450a0a;
    color: #fca5a5;
}
.dark .audit-badge--restore {
    background: #1e1b4b;
    color: #a5b4fc;
}
.dark .audit-badge--login {
    background: #422006;
    color: #fde68a;
}
.dark .audit-badge--default {
    background: #1f2937;
    color: #d1d5db;
}

/* Badge de módulo */
.audit-modulo-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
    white-space: nowrap;
}
.dark .audit-modulo-badge {
    background: #374151;
    color: #d1d5db;
}

/* Células de valores de auditoria */
.audit-valor-cell {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: monospace;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dark .audit-valor-cell {
    color: #9ca3af;
}

/* =============================================
   Section 20: Delivery — Bairro, Tempo, Entregadores
   ============================================= */

/* Badge de bairro com ícone */
.dlv-bairro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}
.dark .dlv-bairro-badge {
    color: #d1d5db;
}
.dlv-bairro-icon {
    width: 13px;
    height: 13px;
    color: #6b7280;
    flex-shrink: 0;
}

/* Barra de progresso de participação */
.dlv-progress-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dlv-progress-bar {
    height: 8px;
    border-radius: 4px;
    background: #6366f1;
    min-width: 2px;
    max-width: 100px;
    flex-shrink: 0;
}
.dark .dlv-progress-bar {
    background: #818cf8;
}
.dlv-progress-label {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}
.dark .dlv-progress-label {
    color: #9ca3af;
}

/* Nome de entregador com ícone */
.dlv-entregador-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #374151;
}
.dark .dlv-entregador-name {
    color: #d1d5db;
}
.dlv-user-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Linha de entregador inativo */
.dlv-row--inativo td {
    opacity: 0.55;
}

/* ═══════════════════════════════════════════════════════════════
   Seção 21 — Botões de Exportação de Relatórios
   ═══════════════════════════════════════════════════════════════ */

/* ── Barra de exportação ── */
.rpt-export-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    width: fit-content;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.dark .rpt-export-bar {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.rpt-export-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-right: 4px;
    white-space: nowrap;
}
.dark .rpt-export-label {
    color: #6b7280;
}

.rpt-export-divider {
    width: 1px;
    height: 32px;
    background: #e5e7eb;
    margin: 0 4px;
    flex-shrink: 0;
}
.dark .rpt-export-divider {
    background: #374151;
}

/* ── Botão base ── */
.rpt-export-btn {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    border: 1.5px solid transparent;
    background: transparent;
    transition:
        background 0.15s,
        border-color 0.15s,
        box-shadow 0.15s,
        transform 0.1s;
    outline: none;
    text-decoration: none;
}
.rpt-export-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.rpt-export-btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}
.rpt-export-btn:active:not(:disabled) {
    transform: translateY(1px);
}

/* ── Inner layout ── */
.rpt-btn-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 7px;
    line-height: 1;
}

.rpt-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.rpt-btn-label {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.rpt-btn-sub {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.7;
    line-height: 1;
    white-space: nowrap;
}

/* ── Ícone ── */
.rpt-btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ── PDF ── */
.rpt-export-btn--pdf {
    border-color: #fca5a5;
    color: #dc2626;
}
.rpt-export-btn--pdf .rpt-btn-inner {
    background: #fef2f2;
}
.rpt-export-btn--pdf:hover:not(:disabled) {
    border-color: #dc2626;
}
.rpt-export-btn--pdf:hover:not(:disabled) .rpt-btn-inner {
    background: #dc2626;
    color: #fff;
}
.rpt-export-btn--pdf:hover:not(:disabled) .rpt-btn-sub {
    opacity: 0.8;
}
.dark .rpt-export-btn--pdf {
    border-color: #7f1d1d;
    color: #f87171;
}
.dark .rpt-export-btn--pdf .rpt-btn-inner {
    background: #450a0a;
}
.dark .rpt-export-btn--pdf:hover:not(:disabled) {
    border-color: #ef4444;
}
.dark .rpt-export-btn--pdf:hover:not(:disabled) .rpt-btn-inner {
    background: #b91c1c;
    color: #fff;
}

/* ── Excel ── */
.rpt-export-btn--excel {
    border-color: #86efac;
    color: #16a34a;
}
.rpt-export-btn--excel .rpt-btn-inner {
    background: #f0fdf4;
}
.rpt-export-btn--excel:hover:not(:disabled) {
    border-color: #16a34a;
}
.rpt-export-btn--excel:hover:not(:disabled) .rpt-btn-inner {
    background: #16a34a;
    color: #fff;
}
.rpt-export-btn--excel:hover:not(:disabled) .rpt-btn-sub {
    opacity: 0.8;
}
.dark .rpt-export-btn--excel {
    border-color: #14532d;
    color: #4ade80;
}
.dark .rpt-export-btn--excel .rpt-btn-inner {
    background: #052e16;
}
.dark .rpt-export-btn--excel:hover:not(:disabled) {
    border-color: #22c55e;
}
.dark .rpt-export-btn--excel:hover:not(:disabled) .rpt-btn-inner {
    background: #15803d;
    color: #fff;
}

/* ── Imprimir ── */
.rpt-export-btn--print {
    border-color: #d1d5db;
    color: #374151;
}
.rpt-export-btn--print .rpt-btn-inner {
    background: #f9fafb;
}
.rpt-export-btn--print:hover:not(:disabled) {
    border-color: #6b7280;
}
.rpt-export-btn--print:hover:not(:disabled) .rpt-btn-inner {
    background: #374151;
    color: #fff;
}
.rpt-export-btn--print:hover:not(:disabled) .rpt-btn-sub {
    opacity: 0.8;
}
.dark .rpt-export-btn--print {
    border-color: #374151;
    color: #d1d5db;
}
.dark .rpt-export-btn--print .rpt-btn-inner {
    background: #111827;
}
.dark .rpt-export-btn--print:hover:not(:disabled) {
    border-color: #9ca3af;
}
.dark .rpt-export-btn--print:hover:not(:disabled) .rpt-btn-inner {
    background: #4b5563;
    color: #fff;
}

/* ── Spin ── */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.rpt-btn-icon--spin {
    animation: spin 1s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════
   Seção 22 — @media print para relatórios
   ═══════════════════════════════════════════════════════════════ */

@media print {
    /* Ocultar navegação, sidebar, header Filament, filtros e botões */
    .fi-sidebar,
    .fi-topbar,
    .fi-header,
    nav,
    header,
    .rpt-export-bar,
    .lucr-filter,
    .fi-breadcrumbs,
    [x-cloak] {
        display: none !important;
    }

    /* Fundo branco, texto preto */
    body,
    .fi-main,
    .fi-main-ctn,
    .fi-page,
    .fi-page-ctn {
        background: white !important;
        color: black !important;
    }

    /* Bordas visíveis em tabelas */
    .lucr-table,
    .lucr-table th,
    .lucr-table td {
        border: 1px solid #999 !important;
        color: black !important;
        background: white !important;
    }

    .lucr-thead th {
        background: #e5e7eb !important;
        color: black !important;
    }

    .stat-card {
        border: 1px solid #d1d5db !important;
        background: white !important;
        color: black !important;
    }

    @page {
        size: A4 landscape;
        margin: 1cm;
    }
}
