input.boxnf-uppercase-field,
textarea.boxnf-uppercase-field,
select {
    text-transform: uppercase;
}

/* Loja: configuracao organizada por secoes, com conteudo rolavel e acoes fixas. */
body.theme-legacy-nfe #lojaEditorModal {
    width: min(1080px, calc(100vw - 28px));
    height: min(720px, calc(100dvh - 28px));
    max-width: calc(100vw - 28px);
    max-height: calc(100dvh - 28px);
    border-radius: 18px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-editor-modal-head {
    min-height: 72px;
    padding: 13px 24px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-heading {
    display: grid;
    gap: 2px;
    min-width: 0;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-heading small {
    color: #88a5c9;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-heading strong {
    overflow: hidden;
    color: #f4f8ff;
    font-size: 20px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe #lojaEditorForm {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    flex: 1 1 auto;
    min-height: 0;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-body {
    display: block;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    width: 100%;
    height: 100%;
    min-height: 0;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin: 0;
    padding: 20px 12px;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(12, 24, 38, 0.72);
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 43px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #b7c9df;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
    text-align: left;
    text-transform: none;
    white-space: normal;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-button:hover {
    border-color: rgba(96, 165, 250, 0.2);
    background: rgba(59, 130, 246, 0.08);
    color: #eaf3ff;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-button.is-active {
    border-color: rgba(72, 151, 255, 0.24);
    background: linear-gradient(90deg, rgba(25, 118, 210, 0.26), rgba(54, 132, 238, 0.1));
    color: #72b7ff;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-content {
    min-width: 0;
    min-height: 0;
    padding: 24px 26px 28px;
    overflow-x: hidden;
    overflow-y: auto;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-panel {
    align-content: start;
    gap: 18px;
    min-width: 0;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-section-heading {
    display: grid;
    gap: 3px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-section-heading strong {
    color: #f4f8ff;
    font-size: 20px;
    line-height: 1.15;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-section-heading small {
    color: #8da7ca;
    font-size: 12px;
    line-height: 1.4;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 12px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field {
    min-width: 0;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field > span {
    color: #91add0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.25;
    text-transform: uppercase;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field input,
body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field select {
    height: 44px;
    min-width: 0;
    padding: 0 12px;
    border-color: rgba(116, 148, 190, 0.42);
    border-radius: 10px;
    font-size: 12px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field input[type="file"] {
    padding: 8px 10px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-list {
    display: grid;
    gap: 8px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid rgba(116, 148, 190, 0.3);
    border-radius: 12px;
    background: rgba(18, 31, 49, 0.56);
    cursor: pointer;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle strong {
    color: #eaf3ff;
    font-size: 12px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle small {
    color: #8da7ca;
    font-size: 11px;
    line-height: 1.35;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle input[type="checkbox"] {
    position: relative;
    width: 46px;
    min-width: 46px;
    height: 25px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background: #3b4b60;
    cursor: pointer;
    transition: background 0.18s ease;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle input[type="checkbox"]::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    content: "";
    transition: transform 0.18s ease;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #0d91b7, #2f68df);
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle input[type="checkbox"]:checked::after {
    transform: translateX(21px);
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-alert-period {
    width: min(330px, 100%);
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-number-suffix {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-number-suffix input {
    border-radius: 10px 0 0 10px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-number-suffix > span {
    display: flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid rgba(116, 148, 190, 0.42);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: rgba(35, 50, 71, 0.92);
    color: #b8cae1;
    font-size: 11px;
    font-weight: 700;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-consolidacao-field {
    gap: 5px;
    padding: 18px 0 0;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0;
    background: transparent;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-consolidacao-field > strong {
    color: #f4f8ff;
    font-size: 15px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-consolidacao-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 24px;
    margin-top: 8px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-consolidacao-option {
    min-width: 0;
    min-height: 30px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #dce9f8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-consolidacao-option input {
    flex: 0 0 auto;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions {
    z-index: 2;
    min-height: 64px;
    padding: 11px 20px;
    background: rgba(9, 18, 30, 0.98);
}

body.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions > small {
    margin-right: auto;
    color: #8096b2;
    font-size: 10px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions > .legacy-button {
    flex: 0 0 auto;
    min-width: 128px;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal {
    border-color: rgba(41, 71, 115, 0.2);
    background: #ffffff;
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-editor-modal-head,
body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions {
    background: #ffffff;
    border-color: rgba(41, 71, 115, 0.14);
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-heading strong,
body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-section-heading strong,
body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-consolidacao-field > strong,
body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle strong {
    color: #13294b;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-heading small,
body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-section-heading small,
body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle small,
body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions > small {
    color: #70829c;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-nav {
    border-color: rgba(41, 71, 115, 0.14);
    background: #f7faff;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-button {
    color: #536984;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-button:hover {
    color: #174f9c;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-button.is-active {
    border-color: rgba(40, 111, 226, 0.12);
    background: linear-gradient(90deg, #e6f1ff, #f1f7ff);
    color: #1767da;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-section-heading,
body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-consolidacao-field {
    border-color: rgba(41, 71, 115, 0.12);
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle {
    border-color: rgba(41, 71, 115, 0.15);
    background: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-consolidacao-option {
    color: #243b5d;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-number-suffix > span {
    border-color: #cbd6e5;
    background: #eef3f9;
    color: #536984;
}

@media (max-width: 820px) {
    body.theme-legacy-nfe #lojaEditorModal {
        width: calc(100vw - 18px);
        height: calc(100dvh - 18px);
        max-width: calc(100vw - 18px);
        max-height: calc(100dvh - 18px);
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-nav {
        flex-direction: row;
        gap: 6px;
        padding: 9px 12px;
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
        overflow-x: auto;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-tab-button {
        flex: 0 0 auto;
        width: auto;
        min-height: 38px;
        padding: 8px 12px;
        white-space: nowrap;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-content {
        padding: 20px;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field.span-3,
    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field.span-4 {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    body.theme-legacy-nfe #lojaEditorModal {
        width: calc(100vw - 8px);
        height: calc(100dvh - 8px);
        max-width: calc(100vw - 8px);
        max-height: calc(100dvh - 8px);
        border-radius: 13px;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-editor-modal-head {
        min-height: 60px;
        padding: 10px 14px;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-heading strong {
        font-size: 16px;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-content {
        padding: 16px 14px 20px;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-section-heading strong {
        font-size: 17px;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-grid,
    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-consolidacao-options {
        grid-template-columns: minmax(0, 1fr);
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field.span-2,
    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field.span-3,
    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-modal-field.span-4 {
        grid-column: span 1;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-rule-toggle {
        gap: 10px;
        padding: 12px;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        min-height: 62px;
        padding: 9px 12px;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions > small {
        display: none;
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions > .legacy-button {
        width: 100%;
        min-width: 0;
    }
}

:root {
    --bg: #f3ecdf;
    --bg-strong: #faf5ec;
    --panel: rgba(255, 250, 243, 0.88);
    --panel-solid: #fffaf2;
    --panel-contrast: rgba(247, 238, 224, 0.86);
    --line: rgba(127, 88, 42, 0.14);
    --line-strong: rgba(127, 88, 42, 0.22);
    --text: #20160c;
    --muted: #756756;
    --accent: #a86c30;
    --accent-dark: #73431b;
    --accent-soft: #f2e1c6;
    --green: #1d7a55;
    --green-soft: #e2f4ea;
    --amber: #a86c30;
    --amber-soft: #f7ead6;
    --neutral-soft: #f0ece4;
    --error: #b04f4f;
    --shadow: 0 24px 60px rgba(74, 48, 20, 0.08);
    --shadow-soft: 0 12px 28px rgba(74, 48, 20, 0.06);
    --sidebar-bg: #101b30;
    --sidebar-bg-strong: #0b1425;
    --sidebar-line: rgba(255, 255, 255, 0.08);
    --sidebar-text: rgba(244, 247, 255, 0.94);
    --sidebar-muted: rgba(206, 217, 237, 0.72);
    --sidebar-active: rgba(255, 255, 255, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html.theme-mode-dark {
    color-scheme: dark;
}

html.theme-mode-light {
    color-scheme: light;
}

body {
    margin: 0;
    font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 22%),
        radial-gradient(circle at top right, rgba(193, 150, 101, 0.14), transparent 18%),
        linear-gradient(180deg, #f8f3ea 0%, #efe5d6 100%);
}

body.theme-monitor {
    background:
        radial-gradient(circle at top center, rgba(114, 155, 239, 0.08), transparent 28%),
        linear-gradient(180deg, #f3f7fd 0%, #eef3fb 100%);
}

body.theme-monitor .content {
    background: transparent;
}

body.theme-monitor .sidebar {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 24%),
        linear-gradient(180deg, #0d1c33 0%, #081526 100%);
}

body.theme-monitor .sidebar-premium {
    background: linear-gradient(180deg, rgba(255, 197, 87, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
}

body.theme-monitor .topbar {
    padding-bottom: 14px;
}

body.theme-monitor .topbar-heading h2 {
    color: #172b4d;
}

body.theme-monitor .topbar-heading p,
body.theme-monitor .search-text,
body.theme-monitor .topbar-profile span {
    color: #6b7a90;
}

body.theme-monitor .search-shell,
body.theme-monitor .topbar-profile {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(22, 43, 77, 0.08);
    box-shadow: 0 14px 28px rgba(28, 53, 92, 0.08);
}

body.theme-monitor .search-icon {
    background: rgba(26, 74, 154, 0.08);
    color: #2b4e86;
}

body.theme-monitor .search-kbd {
    background: #f6f8fc;
    border-color: rgba(22, 43, 77, 0.08);
}

body.theme-monitor .avatar {
    background: linear-gradient(180deg, #b4792c 0%, #9c6522 100%);
}

body.theme-monitor .panel,
body.theme-monitor .table-card,
body.theme-monitor .form-card,
body.theme-monitor .page-header,
body.theme-monitor .stat-card,
body.theme-monitor .alert {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: 0 10px 30px rgba(26, 54, 93, 0.06);
}

body.theme-monitor .card-label,
body.theme-monitor .eyebrow {
    color: #7f90a8;
}

body.theme-monitor .section-heading h3,
body.theme-monitor .page-header h2,
body.theme-monitor .dashboard-hero-copy h3,
body.theme-monitor .stat-row h3 {
    color: #172b4d;
}

body.theme-monitor .section-text,
body.theme-monitor .hero-text,
body.theme-monitor .stat-card p:last-child,
body.theme-monitor .empty-state p {
    color: #566a82;
}

body.theme-monitor .button.primary {
    background: linear-gradient(180deg, #173a70 0%, #102d5a 100%);
    border-color: rgba(16, 44, 88, 0.18);
    box-shadow: 0 12px 26px rgba(16, 44, 88, 0.18);
}

body.theme-monitor .button.secondary,
body.theme-monitor .action-pill,
body.theme-monitor .table-button {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.08);
    color: #39506f;
    box-shadow: 0 6px 18px rgba(26, 54, 93, 0.05);
}

body.theme-monitor .button.secondary:hover,
body.theme-monitor .action-pill:hover,
body.theme-monitor .table-button:hover {
    box-shadow: 0 10px 22px rgba(26, 54, 93, 0.08);
}

body.theme-monitor input,
body.theme-monitor select,
body.theme-monitor textarea {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.08);
    color: #172b4d;
}

body.theme-monitor input:focus,
body.theme-monitor select:focus,
body.theme-monitor textarea:focus {
    border-color: rgba(34, 81, 163, 0.24);
    box-shadow: 0 0 0 3px rgba(34, 81, 163, 0.08);
}

body.theme-monitor .dashboard-hero {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: 0 10px 30px rgba(26, 54, 93, 0.06);
}

body.theme-monitor .dashboard-compact {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
    gap: 16px;
    align-items: stretch;
    padding: 18px;
}

body.theme-monitor .dashboard-compact-main {
    display: grid;
    gap: 16px;
    align-content: start;
}

body.theme-monitor .dashboard-compact-copy {
    display: grid;
    gap: 8px;
}

body.theme-monitor .dashboard-compact-copy h3 {
    margin: 0;
    max-width: 10ch;
    font-size: clamp(1.8rem, 2.6vw, 3rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    color: #172b4d;
}

body.theme-monitor .dashboard-compact-copy .section-text {
    max-width: 44ch;
}

body.theme-monitor .dashboard-compact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.theme-monitor .dashboard-compact-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

body.theme-monitor .dashboard-metric {
    padding: 14px 15px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid rgba(19, 47, 91, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.theme-monitor .dashboard-metric span,
body.theme-monitor .dashboard-metric small {
    color: #708097;
}

body.theme-monitor .dashboard-metric strong {
    display: block;
    margin: 8px 0 6px;
    color: #172b4d;
    font-size: 1.8rem;
    line-height: 0.95;
    letter-spacing: -0.05em;
}

body.theme-monitor .dashboard-metric-spotlight {
    grid-column: span 2;
    background: linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
}

body.theme-monitor .dashboard-metric-spotlight strong {
    font-size: 2.8rem;
}

body.theme-monitor .ribbon-card,
body.theme-monitor .hero-cluster article {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.08);
}

body.theme-monitor .ribbon-primary {
    background: linear-gradient(180deg, #f5f9ff 0%, #edf4ff 100%);
}

body.theme-monitor .ribbon-card strong,
body.theme-monitor .hero-cluster article strong,
body.theme-monitor .hero-spotlight strong {
    color: #172b4d;
}

body.theme-monitor .ribbon-card span,
body.theme-monitor .ribbon-card small,
body.theme-monitor .hero-cluster article span,
body.theme-monitor .hero-cluster article small,
body.theme-monitor .hero-spotlight span,
body.theme-monitor .hero-spotlight small {
    color: #708097;
}

body.theme-monitor .hero-spotlight {
    background:
        radial-gradient(circle at top right, rgba(102, 149, 230, 0.14), transparent 46%),
        linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.theme-monitor .stat-card {
    box-shadow: 0 8px 22px rgba(26, 54, 93, 0.05);
}

body.theme-monitor .accent-amber::before {
    background: linear-gradient(90deg, #4e7cc7 0%, #86aee8 100%);
}

body.theme-monitor .accent-copper::before {
    background: linear-gradient(90deg, #3666b5 0%, #79a0df 100%);
}

body.theme-monitor .accent-sand::before {
    background: linear-gradient(90deg, #5c8cd4 0%, #a8c4ef 100%);
}

body.theme-monitor .accent-green::before {
    background: linear-gradient(90deg, #2fae67 0%, #8adcae 100%);
}

body.theme-monitor .stat-badge {
    background: #f7f9fc;
    border-color: rgba(19, 47, 91, 0.08);
    color: #4a607f;
}

body.theme-monitor .table-link {
    color: #2d4f82;
}

body.theme-monitor .cell-truncate {
    color: #708097;
}

body.theme-monitor .page-header {
    padding: 18px 20px;
}

body.theme-monitor .form-shell {
    gap: 12px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.layout-shell {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: 26px 18px 20px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 24%),
        linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-strong) 100%);
    color: var(--sidebar-text);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-top {
    display: grid;
    gap: 26px;
}

.brand-card {
    padding: 6px 6px 0;
}

.brand-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.brand-title-group {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.brand-card h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.sidebar-label,
.card-label,
.eyebrow,
.nav-title {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.68rem;
}

.sidebar-label,
.nav-title {
    color: rgba(226, 195, 153, 0.82);
}

.sidebar-text {
    margin: 0;
    color: var(--sidebar-muted);
    line-height: 1.7;
    font-size: 0.98rem;
}

.sidebar-client-card {
    display: grid;
    gap: 7px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-client-card-premium {
    background:
        radial-gradient(circle at top right, rgba(92, 145, 231, 0.18), transparent 50%),
        linear-gradient(180deg, rgba(20, 33, 55, 0.94) 0%, rgba(16, 28, 46, 0.84) 100%);
    border-color: rgba(119, 151, 201, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 34px rgba(4, 10, 20, 0.16);
}

.sidebar-client-label {
    color: rgba(159, 193, 239, 0.82);
    font-size: 0.69rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.sidebar-client-label [data-server-greeting] {
    color: #eef5ff;
    font-weight: 800;
}

.sidebar-client-card strong {
    color: #ffffff;
    font-size: 0.98rem;
    line-height: 1.2;
}

.sidebar-client-card small {
    color: var(--sidebar-muted);
    font-size: 0.84rem;
    line-height: 1.4;
}

.sidebar-client-datetime {
    color: #d7e4fb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-loja-switch {
    margin-top: 2px;
}

.sidebar-loja-switch-select {
    width: 100%;
    height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #eef5ff;
    font-size: 0.76rem;
    font-weight: 600;
    color-scheme: dark;
    outline: none;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sidebar-loja-switch-select option {
    background-color: #102238;
    color: #eef5ff;
}

.sidebar-loja-switch-select option:checked {
    background-color: #2d76c9;
    color: #ffffff;
}

body.theme-mode-light .sidebar-loja-switch-select {
    color-scheme: light;
}

body.theme-mode-light .sidebar-loja-switch-select option {
    background-color: #ffffff;
    color: #172b4d;
}

body.theme-mode-light .sidebar-loja-switch-select option:checked {
    background-color: #d9eaff;
    color: #0f4380;
}

.sidebar-loja-switch-select:hover {
    border-color: rgba(159, 193, 239, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-loja-switch-select:focus {
    border-color: rgba(159, 193, 239, 0.42);
    box-shadow: 0 0 0 3px rgba(127, 164, 214, 0.12);
    transform: translateY(-1px);
}

.active-loja-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(195, 150, 91, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(255, 251, 245, 0.92) 0%, rgba(248, 239, 226, 0.88) 100%);
    box-shadow: var(--shadow-soft);
}

.active-loja-banner-compact {
    margin-bottom: 14px;
}

.active-loja-banner-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.active-loja-banner-main {
    display: grid;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.active-loja-banner-label {
    color: var(--muted);
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.active-loja-banner-copy strong {
    color: var(--text);
    font-size: 1.02rem;
    line-height: 1.12;
}

.active-loja-banner-copy small {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.active-loja-banner-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 18px;
    min-width: 0;
}

.active-loja-banner-detail {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.active-loja-banner-detail span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.active-loja-banner-detail strong {
    color: var(--text);
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(34ch, 32vw);
}

.active-loja-banner-value-accent {
    color: var(--accent-dark);
}

.active-loja-banner-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.active-loja-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(127, 88, 42, 0.14);
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.active-loja-chip-primary {
    background: linear-gradient(180deg, rgba(168, 108, 48, 0.14) 0%, rgba(168, 108, 48, 0.08) 100%);
    color: var(--accent-dark);
    border-color: rgba(168, 108, 48, 0.18);
}

.sidebar-client-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(74, 162, 255, 0.14);
    border: 1px solid rgba(74, 162, 255, 0.16);
    color: #dce8fb;
    font-size: 0.74rem;
    font-weight: 700;
}

.sidebar-client-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.theme-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.theme-toggle-button-brand {
    min-width: 50px;
    height: 36px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 22px rgba(4, 10, 20, 0.18);
}

.theme-toggle-button:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.24);
}

.theme-toggle-button:active {
    transform: translateY(1px);
}

.theme-toggle-icon {
    font-size: 13px;
    line-height: 1;
}

.theme-toggle-button[data-theme="dark"] .theme-toggle-icon-sun,
.theme-toggle-button[data-theme="light"] .theme-toggle-icon-moon {
    opacity: 0.42;
}

.theme-toggle-button[data-theme="dark"] .theme-toggle-icon-moon,
.theme-toggle-button[data-theme="light"] .theme-toggle-icon-sun {
    opacity: 1;
}

.sidebar-client-logout-form,
.legacy-topbar-logout-form {
    display: inline-flex;
    margin: 0;
}

.sidebar-client-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #dce8fb;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sidebar-client-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.sidebar-nav {
    display: grid;
    gap: 14px;
}

.nav-group {
    display: grid;
    gap: 6px;
}

.sidebar-nav a {
    display: block;
    padding: 10px 13px;
    border-radius: 13px;
    color: var(--sidebar-muted);
    border: 1px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sidebar-nav a:hover {
    color: var(--sidebar-text);
    transform: translateX(1px);
}

.sidebar-nav a.active {
    color: #fff9ef;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: var(--sidebar-line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-bottom {
    padding-top: 18px;
}

.sidebar-premium {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 199, 102, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 214, 157, 0.12);
}

.sidebar-premium strong {
    font-size: 1rem;
}

.sidebar-premium span {
    color: var(--sidebar-muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.content {
    padding: 18px 24px 26px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 2px 4px 16px;
}

.topbar-heading h2 {
    margin: 0;
    font-size: 1.9rem;
    letter-spacing: -0.05em;
}

.topbar-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-shell,
.topbar-profile,
.panel,
.table-card,
.form-card,
.alert,
.page-header {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.search-shell,
.topbar-profile {
    min-height: 54px;
    background: rgba(255, 251, 245, 0.76);
}

.search-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 360px;
    padding: 0 14px;
    border-radius: 16px;
}

.search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(168, 108, 48, 0.1);
    color: var(--accent-dark);
    font-size: 0.8rem;
    font-weight: 800;
}

.search-text {
    flex: 1;
    color: var(--muted);
    font-size: 0.94rem;
}

.search-kbd {
    padding: 6px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(127, 88, 42, 0.1);
    color: var(--muted);
    font-size: 0.8rem;
}

.topbar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-radius: 16px;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(180deg, #b57535 0%, #8c5524 100%);
    color: #fff8ef;
    font-weight: 800;
}

.topbar-profile strong,
.topbar-profile span {
    display: block;
}

.topbar-profile span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.86rem;
}

.panel,
.table-card,
.form-card,
.alert,
.page-header {
    background: var(--panel);
    border-radius: 24px;
}

.panel {
    padding: 22px;
}

.panel-glow {
    background:
        radial-gradient(circle at top right, rgba(239, 215, 174, 0.46), transparent 42%),
        linear-gradient(180deg, rgba(255, 250, 243, 0.96) 0%, rgba(248, 238, 223, 0.92) 100%);
}

.panel-contrast {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.4), transparent 28%),
        linear-gradient(180deg, rgba(249, 241, 229, 0.95) 0%, rgba(245, 233, 215, 0.88) 100%);
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
    gap: 18px;
    margin-bottom: 16px;
    padding: 22px;
}

.dashboard-hero-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.dashboard-hero-copy {
    display: grid;
    gap: 14px;
    align-content: start;
}

.dashboard-hero-copy h3 {
    margin: 4px 0 0;
    max-width: 13ch;
    font-size: clamp(2.15rem, 3vw, 3.75rem);
    line-height: 0.92;
    letter-spacing: -0.065em;
}

.section-text,
.hero-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-text-wide {
    max-width: 64ch;
}

.hero-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(127, 88, 42, 0.1);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.dashboard-hero-ribbon {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ribbon-card,
.hero-cluster article {
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(127, 88, 42, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.ribbon-card span,
.ribbon-card small,
.hero-spotlight span,
.hero-spotlight small,
.hero-cluster article span,
.hero-cluster article small,
.mini-stat span {
    color: var(--muted);
}

.ribbon-card strong {
    display: block;
    margin: 8px 0 7px;
    font-size: 1.75rem;
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.ribbon-primary {
    background: linear-gradient(180deg, rgba(255, 246, 234, 0.96) 0%, rgba(246, 229, 203, 0.84) 100%);
}

.dashboard-hero-side {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.hero-spotlight {
    display: grid;
    gap: 8px;
    min-height: 170px;
    padding: 20px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(243, 209, 155, 0.42), transparent 42%),
        linear-gradient(180deg, rgba(255, 250, 243, 0.96) 0%, rgba(248, 237, 222, 0.92) 100%);
    border: 1px solid rgba(127, 88, 42, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.hero-spotlight strong {
    font-size: clamp(3rem, 3.2vw, 4.25rem);
    line-height: 0.92;
    letter-spacing: -0.08em;
}

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

.hero-cluster article {
    min-height: 118px;
}

.hero-cluster article strong,
.mini-stat strong {
    display: block;
    margin-top: 6px;
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.button,
.action-pill,
.table-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover,
.action-pill:hover,
.table-button:hover {
    transform: translateY(-1px);
}

.button.primary {
    border: 1px solid rgba(92, 53, 20, 0.18);
    background: linear-gradient(180deg, #b97938 0%, #9d632c 100%);
    color: #fffaf4;
    box-shadow: 0 12px 26px rgba(145, 90, 39, 0.24);
}

.button.secondary,
.action-pill,
.table-button {
    border: 1px solid rgba(127, 88, 42, 0.16);
    background: rgba(255, 252, 246, 0.86);
    color: var(--accent-dark);
    box-shadow: var(--shadow-soft);
}

.stats-grid,
.mini-stats-grid {
    display: grid;
    gap: 14px;
}

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

.mini-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.stat-card {
    position: relative;
    padding: 16px 18px 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 250, 243, 0.8);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    opacity: 0.95;
}

.accent-amber::before {
    background: linear-gradient(90deg, #c98a48 0%, #f2d0a3 100%);
}

.accent-copper::before {
    background: linear-gradient(90deg, #b56d43 0%, #e7bd96 100%);
}

.accent-sand::before {
    background: linear-gradient(90deg, #c8a068 0%, #eddab7 100%);
}

.accent-green::before {
    background: linear-gradient(90deg, #29956c 0%, #bbe8d6 100%);
}

.card-label,
.eyebrow {
    color: #c59a67;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 8px;
}

.stat-row h3 {
    margin: 0;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(127, 88, 42, 0.08);
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card p:last-child,
.mini-stat small {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.alert {
    padding: 14px 16px;
    margin-bottom: 14px;
}

.alert.success {
    border-left: 4px solid var(--green);
}

.alert.error {
    border-left: 4px solid var(--error);
}

.table-card,
.form-card,
.page-header {
    padding: 20px 22px;
}

.page-header {
    margin-bottom: 14px;
}

.page-header h2 {
    margin: 8px 0 10px;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.form-shell {
    display: grid;
    gap: 14px;
    max-width: 1040px;
}

.compact-card {
    padding: 18px 20px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.section-heading h3 {
    margin: 6px 0 0;
    font-size: 1.45rem;
    letter-spacing: -0.04em;
}

.section-heading-compact {
    align-items: center;
}

.section-text {
    max-width: 42ch;
}

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

.compact-grid {
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

label span {
    font-size: 0.92rem;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(127, 88, 42, 0.12);
    border-radius: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
    min-height: 140px;
    padding: 14px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(168, 108, 48, 0.36);
    box-shadow: 0 0 0 3px rgba(168, 108, 48, 0.1);
    background: #fffdf9;
}

input[disabled] {
    color: var(--muted);
    background: rgba(245, 238, 226, 0.72);
}

.full-width {
    grid-column: 1 / -1;
}

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

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 700;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    height: 18px;
    padding: 0;
    border-radius: 4px;
}

.checkbox-row-table {
    justify-content: center;
}

.checkbox-row-table span {
    display: none;
}

.operations-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 16px;
    margin-bottom: 16px;
}

.monitor-page {
    display: grid;
    gap: 14px;
}

.monitor-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border-radius: 18px;
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: 0 10px 30px rgba(26, 54, 93, 0.06);
}

.monitor-summary-primary {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.monitor-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(180deg, #31c06c 0%, #1b9d55 100%);
    color: #f8fffb;
    font-size: 1.15rem;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(49, 192, 108, 0.2);
}

.monitor-summary-copy {
    display: grid;
    gap: 3px;
}

.monitor-summary-copy span,
.monitor-summary-copy small,
.monitor-table-subtitle,
.monitor-key {
    color: #708097;
}

.monitor-summary-copy strong {
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.05em;
    color: #172b4d;
}

.monitor-summary-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.monitor-toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
}

.monitor-toolbar .toolbar-field {
    min-width: 330px;
}

.monitor-inline-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.monitor-ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(19, 47, 91, 0.08);
    color: #40516c;
    box-shadow: 0 6px 18px rgba(26, 54, 93, 0.05);
}

.monitor-sync-button {
    min-width: 132px;
    background: linear-gradient(180deg, #14396f 0%, #102c58 100%);
    box-shadow: 0 12px 26px rgba(16, 44, 88, 0.18);
}

.monitor-stats-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.monitor-stat-card {
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(19, 47, 91, 0.08);
    box-shadow: 0 8px 22px rgba(26, 54, 93, 0.05);
}

.monitor-stat-card span {
    display: block;
    margin-bottom: 9px;
    color: #73829a;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.monitor-stat-card strong {
    display: block;
    color: #172b4d;
    font-size: 0.96rem;
    line-height: 1.4;
}

.monitor-table-card {
    padding: 18px 0 0;
    border-radius: 18px;
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: 0 10px 30px rgba(26, 54, 93, 0.06);
}

.monitor-table-card .section-heading {
    padding: 0 18px 12px;
    margin-bottom: 0;
}

.monitor-table-card h3 {
    margin: 0 0 6px;
    color: #172b4d;
}

.monitor-table-subtitle {
    margin: 0;
}

.monitor-table-card .table-wrap {
    padding: 0 0 8px;
}

.theme-monitor .table-meta span {
    background: #f7f9fc;
    border-color: rgba(19, 47, 91, 0.08);
    color: #65758e;
}

.theme-monitor .data-table thead th {
    color: #8090a7;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.theme-monitor .data-table tbody td {
    border-top: 1px solid rgba(19, 47, 91, 0.06);
}

.theme-monitor .data-table tbody tr:hover {
    background: #f8fbff;
}

.theme-monitor .data-table td strong {
    color: #172b4d;
}

.theme-monitor .monitor-table-card .data-table thead th {
    padding: 8px 6px 9px;
}

.theme-monitor .monitor-table-card .data-table tbody td {
    padding: 9px 6px;
}

.theme-monitor .monitor-table-card .data-table {
    width: fit-content;
    min-width: 0;
}

.theme-monitor .monitor-table-card .data-table td strong {
    font-size: 0.9rem;
}

.theme-monitor .monitor-table-card .data-table td span,
.theme-monitor .monitor-table-card .mono-cell,
.theme-monitor .monitor-table-card .notes-col-key,
.theme-monitor .monitor-table-card .notes-col-doc,
.theme-monitor .monitor-table-card .notes-col-date {
    font-size: 0.8rem;
}

.theme-monitor .notes-col-number {
    width: 74px;
}

.theme-monitor .notes-col-key {
    width: 260px;
}

.theme-monitor .notes-col-supplier {
    width: 220px;
}

.theme-monitor .notes-col-doc {
    width: 128px;
    white-space: nowrap;
}

.theme-monitor .notes-col-date {
    width: 106px;
    white-space: nowrap;
}

.theme-monitor .notes-col-status {
    width: 146px;
}

.theme-monitor .notes-col-key,
.theme-monitor .notes-col-supplier {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-monitor .table-pill-cell {
    text-align: center;
}

.theme-monitor .table-pill-cell .status-pill {
    min-height: 28px;
    min-width: 146px;
    font-size: 0.72rem;
}

.theme-monitor .status-pill.success {
    background: #e8faef;
    color: #1d9d57;
}

.theme-monitor .status-pill.neutral {
    background: #eef3f8;
    color: #61728a;
}

.theme-monitor .mono-cell,
.theme-monitor .data-table td span {
    color: #708097;
}

.command-panel,
.sync-panel {
    min-height: 100%;
}

.command-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
}

.toolbar-form,
.inline-action,
.table-actions form {
    margin: 0;
}

.toolbar-field {
    display: grid;
    gap: 8px;
    min-width: 320px;
}

.sync-status-card {
    display: grid;
    gap: 16px;
}

.sync-status-card h3 {
    margin: 8px 0;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
}

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

.sync-metrics-grid article {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(127, 88, 42, 0.12);
}

.sync-metrics-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sync-metrics-grid strong {
    display: block;
    font-size: 1rem;
    line-height: 1.45;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 10px 12px 12px;
    color: #806d59;
    text-align: left;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.data-table tbody tr {
    transition: background 0.18s ease;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.46);
}

.data-table tbody td {
    padding: 14px 12px;
    border-top: 1px solid rgba(127, 88, 42, 0.1);
    vertical-align: middle;
}

.data-table td strong,
.data-table td span {
    display: block;
}

.data-table td strong {
    font-size: 0.98rem;
}

.data-table td span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.cell-truncate {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
}

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

.table-link {
    color: var(--accent-dark);
}

.table-button {
    cursor: pointer;
}

.table-meta {
    display: flex;
    align-items: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

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

.status-pill.warning {
    background: #fff1da;
    color: #8e5b12;
}

.status-pill.neutral {
    background: var(--neutral-soft);
    color: #665948;
}

.mono-cell {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.88rem;
    color: #665948;
}

.value-cell {
    font-weight: 800;
    white-space: nowrap;
}

.empty-state {
    padding: 8px 0 4px;
}

.empty-state h4 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

@media (max-width: 1220px) {
    .operations-grid,
    .stats-grid,
    .mini-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-monitor .dashboard-compact {
        grid-template-columns: 1fr;
    }

    body.theme-monitor .dashboard-compact-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-ribbon {
        grid-template-columns: 1fr 1fr;
    }

    .operations-grid {
        grid-template-columns: 1fr;
    }

    .monitor-stats-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1280px) and (min-width: 981px) {
    .layout-shell {
        grid-template-columns: 244px minmax(0, 1fr);
    }

    .sidebar {
        padding: 20px 14px 16px;
    }

    .sidebar-top {
        gap: 20px;
    }

    .brand-card h1 {
        font-size: 1.78rem;
    }

    .sidebar-text {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .sidebar-nav {
        gap: 14px;
    }

    .sidebar-nav a {
        padding: 11px 12px;
    }

    .content {
        padding: 14px 18px 20px;
    }

    .topbar {
        gap: 12px;
        padding: 0 2px 12px;
    }

    .topbar-heading h2 {
        font-size: 1.72rem;
    }

    .topbar-heading p {
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .topbar-tools {
        gap: 10px;
    }

    .search-shell {
        min-width: 300px;
        min-height: 48px;
        padding: 0 12px;
    }

    .topbar-profile {
        min-height: 48px;
        padding: 0 12px;
    }

    body.theme-monitor .dashboard-compact {
        grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
        gap: 12px;
        padding: 14px;
    }

    body.theme-monitor .dashboard-compact-copy h3 {
        max-width: 11ch;
        font-size: clamp(1.65rem, 2vw, 2.35rem);
    }

    body.theme-monitor .dashboard-compact-copy .section-text {
        max-width: 36ch;
        font-size: 0.94rem;
        line-height: 1.55;
    }

    body.theme-monitor .dashboard-compact-actions {
        gap: 8px;
    }

    body.theme-monitor .dashboard-compact-actions .button {
        min-height: 38px;
        padding: 0 13px;
    }

    body.theme-monitor .dashboard-compact-metrics {
        gap: 10px;
    }

    body.theme-monitor .dashboard-metric {
        padding: 12px 13px;
    }

    body.theme-monitor .dashboard-metric strong {
        font-size: 1.52rem;
    }

    body.theme-monitor .dashboard-metric small {
        font-size: 0.82rem;
        line-height: 1.35;
    }

    body.theme-monitor .dashboard-metric-spotlight strong {
        font-size: 2.3rem;
    }

    .stats-grid {
        gap: 12px;
        margin-bottom: 14px;
    }

    .stat-card {
        padding: 14px 15px 16px;
    }

    .stat-row h3 {
        font-size: 1.74rem;
    }

    .table-card,
    .form-card,
    .page-header {
        padding: 16px 18px;
    }

    .section-heading {
        margin-bottom: 12px;
    }

    .section-heading h3 {
        font-size: 1.25rem;
    }

    .data-table thead th {
        padding: 8px 10px 10px;
        font-size: 0.72rem;
    }

    .data-table tbody td {
        padding: 12px 10px;
    }

    .data-table td strong {
        font-size: 0.94rem;
    }

    .data-table td span {
        font-size: 0.82rem;
    }

    .cell-truncate {
        max-width: 210px;
    }

    .monitor-summary {
        padding: 12px 14px;
        gap: 12px;
    }

    .monitor-summary-icon {
        width: 44px;
        height: 44px;
        font-size: 0.82rem;
    }

    .monitor-summary-copy strong {
        font-size: 1.7rem;
    }

    .monitor-summary-copy small {
        font-size: 0.84rem;
    }

    .monitor-toolbar .toolbar-field {
        min-width: 260px;
    }

    .monitor-ghost-button,
    .monitor-sync-button {
        min-height: 40px;
        padding: 0 14px;
    }

    .monitor-stats-row {
        gap: 10px;
    }

    .monitor-stat-card {
        padding: 12px;
    }

    .monitor-stat-card span {
        margin-bottom: 7px;
        font-size: 0.68rem;
    }

    .monitor-stat-card strong {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .monitor-table-card {
        padding-top: 14px;
    }

    .monitor-table-card .section-heading {
        padding: 0 14px 10px;
    }

    .theme-monitor .notes-col-key {
        width: 220px;
    }

    .theme-monitor .notes-col-supplier {
        width: 190px;
    }
}

@media (max-width: 980px) {
    .layout-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        min-height: auto;
    }

    .content {
        padding: 16px;
    }

    .topbar,
    .section-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .monitor-summary,
    .monitor-toolbar,
    .monitor-summary-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .search-shell {
        min-width: 0;
    }

    .stats-grid,
    .mini-stats-grid,
    .form-grid,
    .dashboard-hero-ribbon,
    .hero-cluster,
    .sync-metrics-grid,
    .monitor-stats-row {
        grid-template-columns: 1fr;
    }

    body.theme-monitor .dashboard-compact-metrics {
        grid-template-columns: 1fr;
    }

    body.theme-monitor .dashboard-metric-spotlight {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-loja-grid {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-lojas-grid-main,
    body.theme-legacy-nfe .legacy-lojas-grid-cert {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-lojas-filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-lojas-filter-buttons {
        grid-column: span 2;
        margin-top: 0;
    }

    .toolbar-field {
        min-width: 0;
    }

    .cell-truncate {
        max-width: 180px;
    }
}

@media (max-width: 640px) {
    .brand-card h1 {
        font-size: 1.7rem;
    }

    .topbar-heading h2 {
        font-size: 1.55rem;
    }

    .dashboard-hero-copy h3,
    .page-header h2 {
        font-size: 1.8rem;
    }

    .panel,
    .table-card,
    .form-card,
    .page-header {
        padding: 16px;
        border-radius: 20px;
    }

    .button,
    .action-pill,
    .table-button {
        width: 100%;
    }

    .table-actions {
        align-items: stretch;
    }

    body.theme-legacy-nfe .legacy-loja-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-lojas-grid-main,
    body.theme-legacy-nfe .legacy-lojas-grid-cert {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-lojas-field.span-2 {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-lojas-filter-bar {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-lojas-filter-buttons {
        grid-column: span 1;
    }
}

body.theme-legacy-nfe {
    background: #101826;
}

body.theme-legacy-nfe .layout-shell {
    background: #101826;
}

body.theme-legacy-nfe .content {
    padding: 8px 10px 16px;
}

body.theme-legacy-nfe .sidebar {
    background: linear-gradient(180deg, #0d1625 0%, #09111d 100%);
    border-right-color: rgba(255, 255, 255, 0.06);
}

body.theme-legacy-nfe .brand-card h1,
body.theme-legacy-nfe .sidebar-nav a.active,
body.theme-legacy-nfe .sidebar-nav a:hover {
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-nfe-page {
    color: #dce8fb;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 12px;
}

body.theme-legacy-nfe .alert {
    margin-bottom: 10px;
    border-radius: 0;
    background: #172435;
    color: #dce8fb;
    box-shadow: none;
}

body.theme-legacy-nfe .legacy-board,
body.theme-legacy-nfe .legacy-summary-card,
body.theme-legacy-nfe .legacy-table-panel {
    border: 1px solid #77839a;
    background: #162232;
    box-shadow: none;
}

body.theme-legacy-nfe .legacy-board {
    padding: 6px 10px 8px;
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-board-title,
body.theme-legacy-nfe .legacy-panel-title {
    display: inline-block;
    margin-bottom: 8px;
    color: #4aa2ff;
    font-size: 11px;
    letter-spacing: 0.02em;
}

body.theme-legacy-nfe .legacy-panel-title {
    position: relative;
    top: -8px;
    background: #162232;
    padding: 0 4px;
    margin-bottom: -2px;
}

body.theme-legacy-nfe .legacy-board-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

body.theme-legacy-nfe .legacy-board-col {
    display: grid;
    gap: 10px;
}

body.theme-legacy-nfe .legacy-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

body.theme-legacy-nfe .legacy-row span {
    color: #9fc1ef;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-row strong {
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
}

body.theme-legacy-nfe .legacy-row .legacy-success {
    color: #63ff8c;
}

body.theme-legacy-nfe .legacy-row .legacy-warning {
    color: #ffcc61;
}

body.theme-legacy-nfe .legacy-row .legacy-info {
    color: #8ec7ff;
}

body.theme-legacy-nfe .legacy-row .legacy-cert {
    color: #314cff;
}

body.theme-legacy-nfe .legacy-actions-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
}

body.theme-legacy-nfe .legacy-actions-row form {
    margin: 0;
}

body.theme-legacy-nfe .legacy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 154px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid #4a5e78;
    background: #24364d;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-button-primary {
    background: #2254ad;
    border-color: #2254ad;
}

body.theme-legacy-nfe .legacy-button-clean {
    min-width: 66px;
}

body.theme-legacy-nfe .legacy-button-disabled {
    opacity: 0.45;
    pointer-events: none;
}

body.theme-legacy-nfe .legacy-events-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c6d8f1;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-events-toggle label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-summary-card {
    padding: 16px 18px 14px;
}

body.theme-legacy-nfe .legacy-summary-label {
    display: block;
    margin-bottom: 12px;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-summary-card strong {
    display: block;
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    font-weight: 500;
}

body.theme-legacy-nfe .legacy-summary-card small {
    display: block;
    margin-top: 4px;
    color: #dce8fb;
    font-size: 11px;
}

body.theme-legacy-nfe .text-blue {
    color: #4aa2ff;
}

body.theme-legacy-nfe .text-green {
    color: #55ff7d;
}

body.theme-legacy-nfe .text-orange {
    color: #ffb545;
}

body.theme-legacy-nfe .text-cyan {
    color: #38fff8;
}

body.theme-legacy-nfe .text-purple {
    color: #c762ff;
}

body.theme-legacy-nfe .active-loja-banner {
    margin-bottom: 12px;
    padding: 12px 18px;
    background:
        radial-gradient(circle at top right, rgba(92, 145, 231, 0.18), transparent 46%),
        linear-gradient(180deg, rgba(18, 30, 49, 0.94) 0%, rgba(14, 25, 41, 0.9) 100%);
    border-color: rgba(120, 153, 201, 0.16);
    box-shadow: 0 16px 34px rgba(2, 8, 18, 0.22);
}

body.theme-legacy-nfe .active-loja-banner-label,
body.theme-legacy-nfe .active-loja-banner-copy small,
body.theme-legacy-nfe .active-loja-banner-detail span {
    color: #9fc1ef;
}

body.theme-legacy-nfe .active-loja-banner-copy strong,
body.theme-legacy-nfe .active-loja-banner-detail strong {
    color: #ffffff;
}

body.theme-legacy-nfe .active-loja-banner-value-accent {
    color: #5e8cff;
}

body.theme-legacy-nfe .active-loja-chip {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #dce8fb;
}

body.theme-legacy-nfe .active-loja-chip-primary {
    background: rgba(74, 162, 255, 0.14);
    border-color: rgba(74, 162, 255, 0.16);
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-table-panel {
    padding: 0 8px 8px;
}

body.theme-legacy-nfe .legacy-filters {
    display: grid;
    grid-template-columns: 13ch 12ch minmax(26ch, 1.4fr) 11ch 11ch minmax(150px, 17ch) minmax(150px, 17ch) auto;
    column-gap: 10px;
    row-gap: 8px;
    align-items: end;
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-filter-field {
    display: grid;
    gap: 4px;
    align-content: start;
}

body.theme-legacy-nfe .legacy-filter-field span {
    display: block;
    min-height: 14px;
    line-height: 14px;
    color: #a7c0e7;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-field-cnpj {
    grid-column: 1;
    min-width: 0;
}

body.theme-legacy-nfe .legacy-field-numero {
    grid-column: 2;
    min-width: 0;
}

body.theme-legacy-nfe .legacy-field-fornecedor {
    grid-column: 3;
    min-width: 0;
}

body.theme-legacy-nfe .legacy-field-setor {
    grid-column: 4;
    min-width: 0;
}

body.theme-legacy-nfe .legacy-field-status-fluxo {
    grid-column: 5;
    min-width: 0;
}

body.theme-legacy-nfe .legacy-field-data-de {
    grid-column: 6;
    min-width: 150px;
}

body.theme-legacy-nfe .legacy-field-data-ate {
    grid-column: 7;
    min-width: 150px;
}

body.theme-legacy-nfe .legacy-filter-field input,
body.theme-legacy-nfe .legacy-filter-field select {
    width: 100%;
    height: 24px;
    min-height: 24px;
    padding: 0 6px;
    border: 1px solid #617694;
    border-radius: 0;
    background: #162232;
    color: #ffffff;
    font-size: 10px;
    line-height: 22px;
    box-shadow: none;
    appearance: none;
    box-sizing: border-box;
    vertical-align: middle;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

body.theme-legacy-nfe .legacy-filter-field select {
    background: #18273a;
    color: #eef5ff;
}

body.theme-legacy-nfe .legacy-filter-field input:hover,
body.theme-legacy-nfe .legacy-filter-field select:hover {
    border-color: #8aa8d1;
    background: #1b2c41;
}

body.theme-legacy-nfe .legacy-filter-field input:focus,
body.theme-legacy-nfe .legacy-filter-field select:focus {
    border-color: #7ba2dc;
    box-shadow: 0 0 0 2px rgba(96, 144, 221, 0.16);
    outline: none;
}

body.theme-legacy-nfe .legacy-filter-field input[type="date"] {
    min-width: 150px;
    padding-right: 34px;
}

body.theme-legacy-nfe .legacy-filter-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    align-self: end;
    grid-column: 8;
    min-height: 24px;
    margin-top: 18px;
    padding-bottom: 0;
}

body.theme-legacy-nfe .legacy-filter-buttons .legacy-button {
    min-width: 62px;
    height: 24px;
    min-height: 24px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 22px;
    box-sizing: border-box;
}

body.theme-legacy-nfe .legacy-table-wrap {
    max-height: 520px;
    overflow: auto;
    border: 1px solid #53657f;
}

body.theme-legacy-nfe .legacy-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

body.theme-legacy-nfe .legacy-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 5px 6px;
    background: #1d2b40;
    color: #ffffff;
    border-bottom: 1px solid #53657f;
    border-right: 1px solid #405169;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
}

body.theme-legacy-nfe .legacy-col-cnpj {
    width: 16ch;
    min-width: 16ch;
    max-width: 16ch;
}

body.theme-legacy-nfe .legacy-col-numero {
    width: 15ch;
    min-width: 15ch;
    max-width: 15ch;
}

body.theme-legacy-nfe .legacy-col-fornecedor {
    width: 60ch;
    min-width: 60ch;
    max-width: 60ch;
}

body.theme-legacy-nfe .legacy-col-setor {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-setor-cell {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe .legacy-setor-cell strong {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    color: inherit;
}

body.theme-legacy-nfe .legacy-setor-origin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-setor-origin-automatico {
    background: rgba(63, 143, 255, 0.12);
    border-color: rgba(63, 143, 255, 0.24);
    color: #9ac4ff;
}

body.theme-legacy-nfe .legacy-setor-origin-manual {
    background: rgba(56, 199, 121, 0.12);
    border-color: rgba(56, 199, 121, 0.24);
    color: #8ef0b3;
}

body.theme-legacy-nfe .legacy-col-valor {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe .legacy-col-data {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-col-status-fluxo {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-col-boleto {
    width: 10ch;
    min-width: 10ch;
    max-width: 10ch;
}

body.theme-legacy-nfe .legacy-col-chave {
    width: 50ch;
    min-width: 50ch;
    max-width: 50ch;
}

body.theme-legacy-nfe .legacy-col-acoes {
    width: 6ch;
    min-width: 6ch;
    max-width: 6ch;
    text-align: center;
}

body.theme-legacy-nfe .legacy-table tbody td.legacy-col-acoes {
    overflow: visible;
}

body.theme-legacy-nfe .legacy-table tbody td {
    padding: 5px 6px;
    border-top: 1px solid #314255;
    color: #ffffff;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-legacy-nfe .legacy-table tbody tr {
    background: #162232;
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

body.theme-legacy-nfe .legacy-table tbody tr.selected {
    background: linear-gradient(180deg, #2b61c1 0%, #2355af 100%);
    box-shadow: inset 3px 0 0 #8eb7ff;
}

body.theme-legacy-nfe .legacy-table tbody tr:hover {
    background: #1e314c;
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada {
    background: linear-gradient(180deg, #3a1a20 0%, #2d1319 100%);
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada:hover {
    background: linear-gradient(180deg, #442028 0%, #35171f 100%);
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada.selected,
body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada.selected:hover {
    background: linear-gradient(180deg, #4d232b 0%, #3a1a22 100%);
    box-shadow: inset 3px 0 0 #ff8f9d;
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada td,
body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada .legacy-key {
    color: #ffd8dc;
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada {
    background: linear-gradient(180deg, #4b3b08 0%, #392c05 100%);
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada:hover {
    background: linear-gradient(180deg, #5a470a 0%, #433307 100%);
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada.selected,
body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada.selected:hover {
    background: linear-gradient(180deg, #6a530c 0%, #4f3d08 100%);
    box-shadow: inset 3px 0 0 #ffd766;
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada td,
body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada .legacy-key {
    color: #ffefba;
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente {
    background: linear-gradient(180deg, #153040 0%, #102734 100%);
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente:hover {
    background: linear-gradient(180deg, #1a394b 0%, #14303f 100%);
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente.selected,
body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente.selected:hover {
    background: linear-gradient(180deg, #21485d 0%, #18394b 100%);
    box-shadow: inset 3px 0 0 #79d7f2;
}

body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente td,
body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente .legacy-key {
    color: #d9f5ff;
}

body.theme-legacy-nfe .legacy-table tbody tr.selected:hover {
    background: linear-gradient(180deg, #2f67ca 0%, #2558b3 100%);
}

body.theme-legacy-nfe .legacy-table tbody tr.selected td,
body.theme-legacy-nfe .legacy-table tbody tr.selected .legacy-key,
body.theme-legacy-nfe .legacy-table tbody tr.selected .legacy-event {
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-event {
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-event-success {
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-event-info {
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-flow-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    min-width: 100%;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.theme-legacy-nfe .legacy-flow-status-warning {
    background: #4b3600;
    color: #ffd45a;
    border-color: rgba(255, 212, 90, 0.18);
}

body.theme-legacy-nfe .legacy-flow-status-success {
    background: #083524;
    color: #7cf0b3;
    border-color: rgba(124, 240, 179, 0.18);
}

body.theme-legacy-nfe .legacy-flow-status-info {
    background: #173965;
    color: #a8ccff;
    border-color: rgba(168, 204, 255, 0.18);
}

body.theme-legacy-nfe .legacy-flow-status-neutral {
    background: #2e3d55;
    color: #dce8fb;
    border-color: rgba(220, 232, 251, 0.14);
}

body.theme-legacy-nfe .legacy-flow-status-recusada {
    background: rgba(255, 215, 102, 0.2);
    color: #ffe08a;
    border-color: rgba(255, 215, 102, 0.24);
}

body.theme-legacy-nfe .legacy-flow-status-bonificacao {
    background: rgba(126, 87, 194, 0.24);
    color: #decaff;
    border-color: rgba(216, 199, 255, 0.24);
}

body.theme-legacy-nfe .legacy-fornecedores-filter-bar {
    display: grid;
    grid-template-columns: 34ch 28ch 8ch 14ch auto;
    gap: 8px;
    align-items: end;
}

body.theme-legacy-nfe .legacy-fornecedores-col-documento {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-fornecedores-col-razao {
    width: 44ch;
    min-width: 44ch;
    max-width: 44ch;
}

body.theme-legacy-nfe .legacy-fornecedores-col-loja {
    width: 24ch;
    min-width: 24ch;
    max-width: 24ch;
}

body.theme-legacy-nfe .legacy-fornecedores-col-cidade {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-fornecedores-col-contato {
    width: 28ch;
    min-width: 28ch;
    max-width: 28ch;
}

body.theme-legacy-nfe .legacy-fornecedores-col-setor {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-fornecedores-col-origem {
    width: 12ch;
    min-width: 12ch;
    max-width: 12ch;
}

body.theme-legacy-nfe .legacy-fornecedores-col-status {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe .legacy-fornecedores-col-acoes {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe .legacy-fornecedores-col-razao strong {
    display: block;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

body.theme-legacy-nfe .legacy-fornecedor-secondary {
    display: block;
    margin-top: 3px;
    color: #9fc1ef;
    font-size: 10px;
    line-height: 1.4;
}

body.theme-legacy-nfe .legacy-fornecedor-editor-modal {
    width: min(1120px, calc(100vw - 28px));
}

body.theme-legacy-nfe .legacy-fornecedor-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 8px;
}

body.theme-legacy-nfe .legacy-fornecedor-modal-field.span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe .legacy-fornecedor-modal-field.span-4 {
    grid-column: span 4;
}

body.theme-legacy-nfe .legacy-key {
    font-size: 10px;
    color: #dbe9ff;
}

body.theme-legacy-nfe .legacy-actions-trigger {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(120, 148, 191, 0.28);
    background: linear-gradient(180deg, #20324b 0%, #182638 100%);
    color: #eaf3ff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

body.theme-legacy-nfe .legacy-actions-trigger:hover {
    border-color: rgba(96, 149, 235, 0.4);
    background: linear-gradient(180deg, #244066 0%, #1c3150 100%);
}

body.theme-legacy-nfe .legacy-actions-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(96, 149, 235, 0.18);
}

body.theme-legacy-nfe .legacy-filter-field select,
body.theme-legacy-nfe .legacy-status-modal-body select,
body.theme-legacy-nfe .legacy-editor-field select,
body.theme-legacy-nfe .legacy-loja-modal-field select,
body.theme-legacy-nfe .legacy-loja-grid select {
    color-scheme: dark;
}

body.theme-legacy-nfe .legacy-filter-field select option,
body.theme-legacy-nfe .legacy-status-modal-body select option,
body.theme-legacy-nfe .legacy-editor-field select option,
body.theme-legacy-nfe .legacy-loja-modal-field select option,
body.theme-legacy-nfe .legacy-loja-grid select option {
    background: #162232;
    color: #eaf3ff;
}

body.theme-legacy-nfe .legacy-row-menu {
    position: fixed;
    z-index: 50;
    min-width: 148px;
    border: 1px solid #9aa8ba;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

body.theme-legacy-nfe .legacy-row-menu-item {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    background: #ffffff;
    color: #0e1c30;
    text-align: left;
    font-size: 12px;
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-row-menu-item:hover {
    background: #edf2f8;
}

body.theme-legacy-nfe .legacy-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(0, 0, 0, 0.45);
}

body.theme-legacy-nfe .legacy-status-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 61;
    width: 420px;
    max-width: calc(100vw - 32px);
    transform: translate(-50%, -50%);
    border: 1px solid #7f90a9;
    background: #162232;
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-status-modal-head,
body.theme-legacy-nfe .legacy-status-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #314255;
}

body.theme-legacy-nfe .legacy-status-modal-actions {
    justify-content: end;
    border-top: 1px solid #314255;
    border-bottom: 0;
}

body.theme-legacy-nfe .legacy-status-modal-body {
    display: grid;
    gap: 10px;
    padding: 12px;
}

body.theme-legacy-nfe .legacy-status-modal-body p {
    margin: 0;
    font-size: 12px;
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-status-modal-body select {
    width: 100%;
    height: 30px;
    border: 1px solid #617694;
    background: #0f1a2b;
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-modal-close {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.theme-legacy-nfe .legacy-view-grid div {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe .legacy-view-grid span {
    color: #9fc1ef;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-view-grid strong {
    color: #ffffff;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
}

body.theme-legacy-nfe .legacy-danfe-modal {
    width: min(1180px, calc(100vw - 24px));
    max-width: min(1180px, calc(100vw - 24px));
    height: calc(100vh - 48px);
}

body.theme-legacy-nfe .legacy-danfe-modal-body {
    display: flex;
    flex-direction: column;
    padding: 0;
    height: calc(100% - 102px);
}

body.theme-legacy-nfe .legacy-danfe-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid #314255;
    background: #111c2b;
}

body.theme-legacy-nfe .legacy-danfe-tab {
    min-width: 96px;
    height: 28px;
    padding: 0 14px;
    border: 1px solid #3f5573;
    background: #162232;
    color: #dce8fb;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-danfe-tab.is-active {
    background: #2f5cb3;
    border-color: #4f79cc;
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-danfe-tab-panels {
    flex: 1 1 auto;
    min-height: 0;
}

body.theme-legacy-nfe .legacy-danfe-tab-panel {
    height: 100%;
    min-height: 0;
}

body.theme-legacy-nfe .legacy-danfe-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
    display: block;
}

body.theme-legacy-nfe .legacy-xml-frame {
    background: #ffffff;
}

body.theme-legacy-nfe .legacy-inline-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2200;
    padding: 10px 14px;
    border: 1px solid rgba(90, 131, 193, 0.34);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(16, 30, 49, 0.96) 0%, rgba(11, 22, 38, 0.96) 100%);
    color: #f3f8ff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

body.theme-legacy-nfe .legacy-inline-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.theme-legacy-nfe .legacy-empty-cell {
    text-align: center;
    color: #dbe9ff;
}

body.theme-legacy-nfe .legacy-dashboard-page {
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-dashboard-board {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-dashboard-actions {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-dashboard-actions .legacy-button {
    min-width: 136px;
}

body.theme-legacy-nfe .legacy-dashboard-summary {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-dashboard-table {
    padding-top: 0;
}

body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-loja {
    width: 34ch;
    min-width: 34ch;
    max-width: 34ch;
}

body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-id {
    width: 8ch;
    min-width: 8ch;
    max-width: 8ch;
}

body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-cnpj {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-cidade {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-ambiente {
    width: 16ch;
    min-width: 16ch;
    max-width: 16ch;
}

body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-certificado {
    width: 34ch;
    min-width: 34ch;
    max-width: 34ch;
}

body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-auto {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-acoes {
    width: 16ch;
    min-width: 16ch;
    max-width: 16ch;
}

body.theme-legacy-nfe .legacy-dashboard-list tbody td {
    vertical-align: middle;
}

body.theme-legacy-nfe .legacy-dashboard-list tbody td strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #dce8fb;
    font-size: 11px;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-inline-actions a {
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-inline-actions a:hover {
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #dce8fb;
    font: inherit;
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-link-button:hover {
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-loja-modal {
    width: 980px;
    max-width: calc(100vw - 32px);
}

body.theme-legacy-nfe .legacy-loja-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.theme-legacy-nfe .legacy-loja-grid label {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe .legacy-loja-grid span {
    color: #9fc1ef;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-loja-grid input,
body.theme-legacy-nfe .legacy-loja-grid select {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #617694;
    background: #0f1a2b;
    color: #ffffff;
    font-size: 12px;
}

body.theme-legacy-nfe .legacy-loja-grid select {
    background: #162232;
}

body.theme-legacy-nfe .legacy-loja-grid input[type="file"] {
    height: auto;
    padding: 6px 8px;
}

body.theme-legacy-nfe .legacy-loja-grid input:disabled {
    background: #233246;
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-lojas-page {
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-lojas-board,
body.theme-legacy-nfe .legacy-lojas-panel {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-lojas-form {
    display: grid;
    gap: 0;
}

body.theme-legacy-nfe .legacy-lojas-grid {
    display: grid;
    gap: 10px 12px;
}

body.theme-legacy-nfe .legacy-lojas-grid-main,
body.theme-legacy-nfe .legacy-lojas-grid-cert {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.theme-legacy-nfe .legacy-lojas-field {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe .legacy-lojas-field span {
    color: #9fc1ef;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-lojas-field input,
body.theme-legacy-nfe .legacy-lojas-field select {
    width: 100%;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #617694;
    border-radius: 0;
    background: #0f1a2b;
    color: #ffffff;
    font-size: 12px;
    box-shadow: none;
}

body.theme-legacy-nfe .legacy-lojas-field select {
    background: #162232;
}

body.theme-legacy-nfe .legacy-lojas-field input[type="file"] {
    height: auto;
    padding: 5px 8px;
}

body.theme-legacy-nfe .legacy-lojas-field input:disabled {
    background: #233246;
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-lojas-field.span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe .legacy-lojas-actions {
    margin-bottom: 0;
}

body.theme-legacy-nfe .legacy-lojas-list-page {
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-lojas-filter-bar {
    display: grid;
    grid-template-columns: 10ch 38ch 20ch 16ch 1fr;
    gap: 8px;
    align-items: end;
    width: 100%;
}

body.theme-legacy-nfe .legacy-lojas-inline-filters {
    margin: 0 0 10px;
}

body.theme-legacy-nfe .legacy-lojas-filter-buttons {
    grid-column: 5;
    justify-content: flex-start;
    margin-top: 0;
}

body.theme-legacy-nfe .legacy-lojas-summary-grid,
body.theme-legacy-nfe .legacy-lojas-table-panel {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-lojas-info-board {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-lojas-top-board {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-lojas-table-panel > .legacy-lojas-info-board {
    margin-top: -2px;
}

body.theme-legacy-nfe .legacy-lojas-summary-inline {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-lojas-col-id {
    width: 8ch;
    min-width: 8ch;
    max-width: 8ch;
}

body.theme-legacy-nfe .legacy-lojas-col-loja {
    width: 34ch;
    min-width: 34ch;
    max-width: 34ch;
}

body.theme-legacy-nfe .legacy-lojas-col-cnpj {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-lojas-col-cidade {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-lojas-col-ambiente {
    width: 16ch;
    min-width: 16ch;
    max-width: 16ch;
}

body.theme-legacy-nfe .legacy-lojas-col-certificado {
    width: 34ch;
    min-width: 34ch;
    max-width: 34ch;
}

body.theme-legacy-nfe .legacy-lojas-col-sync {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe .legacy-lojas-col-acoes {
    width: 16ch;
    min-width: 16ch;
    max-width: 16ch;
}

body.theme-legacy-nfe .legacy-lojas-edit-button {
    min-width: 100px;
    height: 24px;
    padding: 0 10px;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-loja-editor-modal {
    width: 980px;
    max-width: calc(100vw - 24px);
}

body.theme-legacy-nfe .legacy-editor-form {
    display: grid;
    gap: 0;
}

body.theme-legacy-nfe .legacy-editor-modal-head {
    padding: 12px 14px;
}

body.theme-legacy-nfe .legacy-editor-modal-head strong {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

body.theme-legacy-nfe .legacy-editor-modal-body {
    display: grid;
    gap: 0;
    padding: 12px 14px 14px;
}

body.theme-legacy-nfe .legacy-loja-tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

body.theme-legacy-nfe .legacy-loja-tab-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #365275;
    border-radius: 999px;
    background: #152235;
    color: #cfe2ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

body.theme-legacy-nfe .legacy-loja-tab-button.is-active {
    border-color: rgba(80, 185, 235, 0.48);
    background: linear-gradient(135deg, rgba(19, 108, 138, 0.42), rgba(40, 86, 198, 0.48));
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-loja-tab-button:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

body.theme-legacy-nfe .legacy-loja-tab-panel {
    display: grid;
    gap: 12px;
}

body.theme-legacy-nfe .legacy-loja-inline-note {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(76, 119, 167, 0.45);
    border-radius: 18px;
    background: rgba(18, 31, 49, 0.76);
}

body.theme-legacy-nfe .legacy-loja-inline-note strong {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

body.theme-legacy-nfe .legacy-loja-inline-note small {
    color: #8da7ca;
    font-size: 11px;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-loja-inline-note.is-warning {
    border-color: rgba(226, 180, 76, 0.4);
    background: rgba(62, 44, 12, 0.28);
}

body.theme-legacy-nfe .legacy-editor-grid,
body.theme-legacy-nfe .legacy-loja-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 10px;
}

body.theme-legacy-nfe .legacy-editor-field,
body.theme-legacy-nfe .legacy-loja-modal-field {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe .legacy-loja-consolidacao-field {
    display: grid;
    gap: 7px;
    padding: 12px 14px;
    border: 1px solid rgba(76, 119, 167, 0.45);
    border-radius: 16px;
    background: rgba(18, 31, 49, 0.62);
}

body.theme-legacy-nfe .legacy-loja-consolidacao-field.span-4 {
    grid-column: span 4;
}

body.theme-legacy-nfe .legacy-loja-consolidacao-field > strong {
    color: #ffffff;
    font-size: 12px;
}

body.theme-legacy-nfe .legacy-loja-consolidacao-field > small,
body.theme-legacy-nfe .legacy-loja-consolidacao-empty {
    color: #8da7ca;
    font-size: 11px;
    line-height: 1.4;
}

body.theme-legacy-nfe .legacy-loja-consolidacao-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.theme-legacy-nfe .legacy-loja-consolidacao-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(96, 145, 205, 0.42);
    border-radius: 12px;
    background: #162233;
    color: #dce9f8;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-loja-consolidacao-option input,
body.theme-legacy-nfe .legacy-classification-auto-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #2f72d8;
}

body.theme-mode-light.theme-legacy-nfe .legacy-loja-consolidacao-field {
    border-color: rgba(35, 76, 135, 0.18);
    background: #f4f8ff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-loja-consolidacao-field > strong,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-consolidacao-option {
    color: #17345d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-loja-consolidacao-field > small,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-consolidacao-empty {
    color: #667892;
}

body.theme-mode-light.theme-legacy-nfe .legacy-loja-consolidacao-option {
    border-color: rgba(35, 76, 135, 0.18);
    background: #ffffff;
}

body.theme-legacy-nfe .legacy-editor-field span,
body.theme-legacy-nfe .legacy-loja-modal-field span {
    color: #9fc1ef;
    font-size: 11px;
    font-weight: 600;
}

body.theme-legacy-nfe .legacy-editor-field input,
body.theme-legacy-nfe .legacy-editor-field select,
body.theme-legacy-nfe .legacy-loja-modal-field input,
body.theme-legacy-nfe .legacy-loja-modal-field select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #5e7ea8;
    border-radius: 16px;
    background: #162233;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
}

body.theme-legacy-nfe .legacy-editor-field input:focus,
body.theme-legacy-nfe .legacy-editor-field select:focus,
body.theme-legacy-nfe .legacy-loja-modal-field input:focus,
body.theme-legacy-nfe .legacy-loja-modal-field select:focus {
    outline: none;
    border-color: #7fa4d6;
    box-shadow: 0 0 0 2px rgba(127, 164, 214, 0.12);
}

body.theme-legacy-nfe .legacy-editor-field select,
body.theme-legacy-nfe .legacy-loja-modal-field select {
    background: #1a2739;
}

body.theme-legacy-nfe .legacy-editor-field input[type="file"],
body.theme-legacy-nfe .legacy-loja-modal-field input[type="file"] {
    height: 48px;
    padding: 10px 12px;
}

body.theme-legacy-nfe .legacy-editor-field input:disabled,
body.theme-legacy-nfe .legacy-loja-modal-field input:disabled {
    background: #233247;
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-editor-field.span-2,
body.theme-legacy-nfe .legacy-loja-modal-field.span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe .legacy-editor-field.span-3,
body.theme-legacy-nfe .legacy-loja-modal-field.span-3 {
    grid-column: span 3;
}

body.theme-legacy-nfe .legacy-editor-field.span-4,
body.theme-legacy-nfe .legacy-loja-modal-field.span-4 {
    grid-column: span 4;
}

body.theme-legacy-nfe .legacy-editor-actions {
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 14px;
}

@media (max-width: 820px) {
    body.theme-legacy-nfe .legacy-loja-tab-nav {
        flex-wrap: wrap;
    }

    body.theme-legacy-nfe .legacy-loja-tab-button {
        flex: 1 1 220px;
        justify-content: center;
    }

    body.theme-legacy-nfe .legacy-loja-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-loja-consolidacao-field.span-4,
    body.theme-legacy-nfe .legacy-loja-modal-field.span-3,
    body.theme-legacy-nfe .legacy-loja-modal-field.span-4 {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    body.theme-legacy-nfe .legacy-loja-modal-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body.theme-legacy-nfe .legacy-loja-consolidacao-field.span-4,
    body.theme-legacy-nfe .legacy-loja-modal-field.span-2,
    body.theme-legacy-nfe .legacy-loja-modal-field.span-3,
    body.theme-legacy-nfe .legacy-loja-modal-field.span-4 {
        grid-column: span 1;
    }
}

body.theme-legacy-nfe .legacy-usuarios-top-board,
body.theme-legacy-nfe .legacy-permissoes-top-board,
body.theme-legacy-nfe .legacy-usuarios-table-panel,
body.theme-legacy-nfe .legacy-permissoes-table-panel {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-usuarios-filter-bar {
    display: grid;
    grid-template-columns: 34ch 24ch 16ch auto;
    gap: 8px;
    align-items: end;
    width: 100%;
}

body.theme-legacy-nfe .legacy-usuarios-filter-buttons {
    justify-content: flex-start;
    margin-top: 0;
}

body.theme-legacy-nfe .legacy-usuarios-summary-grid,
body.theme-legacy-nfe .legacy-permissoes-summary-grid {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-usuarios-col-id,
body.theme-legacy-nfe .legacy-permissoes-col-id {
    width: 8ch;
}

body.theme-legacy-nfe .legacy-usuarios-col-nome {
    width: 28ch;
}

body.theme-legacy-nfe .legacy-usuarios-col-login {
    width: 18ch;
}

body.theme-legacy-nfe .legacy-usuarios-col-loja {
    width: 24ch;
}

body.theme-legacy-nfe .legacy-usuarios-col-perfil {
    width: 18ch;
}

body.theme-legacy-nfe .legacy-usuarios-col-email {
    width: 28ch;
}

body.theme-legacy-nfe .legacy-usuarios-col-permissoes {
    width: 12ch;
}

body.theme-legacy-nfe .legacy-usuarios-col-status {
    width: 14ch;
}

body.theme-legacy-nfe .legacy-usuarios-col-acoes {
    width: 16ch;
}

body.theme-legacy-nfe .legacy-usuarios-col-nome,
body.theme-legacy-nfe .legacy-usuarios-col-login,
body.theme-legacy-nfe .legacy-usuarios-col-loja,
body.theme-legacy-nfe .legacy-usuarios-col-perfil,
body.theme-legacy-nfe .legacy-usuarios-col-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-setores-list-page {
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-nfse-page {
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-nfse-top-board,
body.theme-legacy-nfe .legacy-nfse-table-panel {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-nfse-summary-grid {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-nfse-filters {
    grid-template-columns: 26ch 14ch 18ch 34ch 16ch 18ch 18ch auto;
}

body.theme-legacy-nfe .legacy-nfse-col-numero {
    width: 12ch;
}

body.theme-legacy-nfe .legacy-nfse-col-verificacao {
    width: 18ch;
}

body.theme-legacy-nfe .legacy-nfse-col-tomador {
    width: 38ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-nfse-col-documento {
    width: 18ch;
}

body.theme-legacy-nfe .legacy-nfse-col-data {
    width: 18ch;
}

body.theme-legacy-nfe .legacy-nfse-col-valor {
    width: 14ch;
}

body.theme-legacy-nfe .legacy-nfse-col-status {
    width: 20ch;
}

body.theme-legacy-nfe .legacy-nfse-col-cidade {
    width: 20ch;
}

body.theme-legacy-nfe .legacy-nfse-editor-modal {
    width: 920px;
    max-width: calc(100vw - 28px);
}

body.theme-legacy-nfe .legacy-nfse-loading-modal {
    width: 520px;
    max-width: calc(100vw - 32px);
}

body.theme-legacy-nfe .legacy-nfse-result-modal {
    width: 560px;
    max-width: calc(100vw - 32px);
}

body.theme-legacy-nfe .legacy-nfse-loading-body {
    display: grid;
    gap: 10px;
    padding: 18px 18px 20px;
}

body.theme-legacy-nfe .legacy-nfse-loading-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(122, 160, 214, 0.22);
    border-top-color: #3b82f6;
    animation: legacy-spin 0.9s linear infinite;
}

body.theme-legacy-nfe .legacy-nfse-loading-title {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

body.theme-legacy-nfe .legacy-nfse-loading-text {
    margin: 0;
    color: #c9ddfb;
    font-size: 12px;
    line-height: 1.5;
}

body.theme-legacy-nfe .legacy-nfse-status-list {
    display: grid;
    gap: 8px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

body.theme-legacy-nfe .legacy-nfse-status-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9fc1ef;
    font-size: 12px;
    line-height: 1.5;
}

body.theme-legacy-nfe .legacy-nfse-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #5c7498;
    background: rgba(59, 130, 246, 0.12);
    color: #9fc1ef;
    font-size: 11px;
    font-weight: 700;
}

body.theme-legacy-nfe .legacy-nfse-status-step.is-success .legacy-nfse-status-icon {
    background: rgba(34, 197, 94, 0.16);
    border-color: #34d399;
    color: #8ef0b0;
}

body.theme-legacy-nfe .legacy-nfse-status-step.is-error .legacy-nfse-status-icon {
    background: rgba(239, 68, 68, 0.16);
    border-color: #f87171;
    color: #ffb4b4;
}

body.theme-legacy-nfe .legacy-nfse-result-box {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #314255;
}

body.theme-legacy-nfe .legacy-nfse-debug-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #314255;
}

body.theme-legacy-nfe .legacy-nfse-debug-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-nfse-debug-tab {
    min-width: 110px;
    height: 28px;
}

body.theme-legacy-nfe .legacy-nfse-debug-tab.active {
    background: #2f5cb3;
    border-color: #2f5cb3;
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-nfse-debug-content {
    display: grid;
}

body.theme-legacy-nfe .legacy-flow-status-danger {
    background: #4c1717;
    color: #ffb7b7;
    border-color: rgba(255, 183, 183, 0.2);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-panel {
    margin-bottom: 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-panel-label {
    margin: 0 0 4px;
    color: #9fc1ef;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-panel-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-header-copy {
    max-width: 320px;
    color: #b9cdea;
    font-size: 11px;
    line-height: 1.55;
    text-align: right;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 188px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-button svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

[hidden] {
    display: none !important;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-card {
    display: grid;
    justify-items: start;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(101, 127, 167, 0.22);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(13, 26, 42, 0.92), rgba(8, 18, 31, 0.88));
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-card:hover {
    transform: translateY(-1px);
    border-color: rgba(76, 161, 255, 0.28);
    box-shadow: 0 18px 26px rgba(8, 16, 29, 0.2);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-card strong {
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-card small {
    color: #bfd2ed;
    font-size: 11px;
    line-height: 1.5;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-card-secondary strong {
    color: #8bd7ff;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-main {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-grid {
    display: grid;
    gap: 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(112, 140, 185, 0.18);
    border-radius: 18px;
    background: rgba(14, 24, 39, 0.74);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-main strong {
    color: #f3f8ff;
    font-size: 14px;
    font-weight: 700;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-main span {
    color: #97accb;
    font-size: 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-metrics {
    display: grid;
    justify-items: end;
    gap: 4px;
    color: #dbe7fb;
    font-size: 12px;
    font-weight: 600;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-metrics .is-danger {
    color: #ffb4b4;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-metrics .is-neutral {
    color: #9fe4b7;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-empty-panel {
    padding: 18px;
    border: 1px dashed rgba(112, 140, 185, 0.28);
    border-radius: 18px;
    color: #9eb4d4;
    font-size: 13px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-bridge-card {
    display: grid;
    gap: 8px;
    min-height: 100%;
    padding: 18px;
    border: 1px solid rgba(76, 161, 255, 0.2);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(10, 34, 49, 0.94), rgba(8, 20, 34, 0.92));
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-bridge-card strong {
    color: #ffffff;
    font-size: 34px;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-bridge-card small {
    color: #bfd2ed;
    font-size: 12px;
    line-height: 1.55;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-card {
    position: relative;
    min-height: 110px;
    text-decoration: none;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-card .legacy-summary-label {
    margin-bottom: 4px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-card strong {
    font-size: 31px;
    line-height: 1;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-card small {
    font-size: 11px;
    line-height: 1.45;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-card.is-active {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 14px 26px rgba(10, 23, 41, 0.22);
    background: linear-gradient(180deg, rgba(18, 34, 56, 0.96), rgba(10, 18, 31, 0.92));
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-card-neutral {
    cursor: default;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-card-actionable {
    display: grid;
    align-content: start;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-meta {
    margin-top: 6px;
    color: #7fcaf6;
    font-size: 12px;
    font-weight: 700;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal {
    width: min(1180px, calc(100vw - 24px));
    max-width: min(1180px, calc(100vw - 24px));
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal.is-results-view {
    width: min(1440px, calc(100vw - 20px));
    max-width: min(1440px, calc(100vw - 20px));
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal .legacy-status-modal-body {
    position: relative;
    overflow: hidden;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal.is-results-view .legacy-status-modal-body {
    overflow: hidden;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-intro {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(123, 165, 226, 0.24);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(13, 31, 53, 0.88), rgba(9, 20, 34, 0.72));
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-intro strong {
    color: #f4f9ff;
    font-size: 0.92rem;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-intro p {
    margin: 0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal .badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(126, 167, 221, 0.18);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #dcecff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-column {
    display: grid;
    gap: 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-legacy-visual {
    display: none !important;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-field-label {
    color: #9ec0ec;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal .form-control {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: #eef5ff;
    font-size: 0.82rem;
    line-height: 1.55;
    resize: vertical;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal .form-control:hover {
    border-color: rgba(96, 165, 250, 0.24);
    background: rgba(255, 255, 255, 0.075);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal .form-control:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-textarea {
    height: clamp(250px, 38vh, 420px);
    min-height: clamp(250px, 38vh, 420px);
    max-height: 420px;
    resize: none;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-hint {
    color: #8fa7c5;
    font-size: 0.74rem;
    line-height: 1.5;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-footer-slot {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-footer-slot .legacy-financeiro-dda-actions {
    margin-right: auto;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: #dbe8f8;
    font-size: 0.76rem;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge.is-idle {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge.is-running {
    border-color: rgba(59, 130, 246, 0.24);
    background: rgba(59, 130, 246, 0.14);
    color: #dcebff;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge.is-ready {
    border-color: rgba(45, 212, 191, 0.24);
    background: rgba(15, 118, 110, 0.16);
    color: #cffff5;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge.is-error {
    border-color: rgba(248, 113, 113, 0.24);
    background: rgba(127, 29, 29, 0.26);
    color: #ffd0d0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-shell,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-shell,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-shell,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis {
    padding: 14px;
    border: 1px solid rgba(110, 140, 185, 0.24);
    border-radius: 18px;
    background: rgba(11, 20, 34, 0.45);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-shell {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-shell.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-head,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-head,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-head span:not([id]) {
    display: none;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-head #legacyFinanceiroDdaProgressTitle {
    flex: 1 1 auto;
    color: #eef5ff;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.45;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-head span,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-head span,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-head span {
    color: #eef5ff;
    font-size: 0.82rem;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-head strong,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-head small,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-head small {
    color: #8fb8f0;
    font-size: 0.76rem;
    font-weight: 700;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress {
    width: 100%;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-status {
    margin-top: 10px;
    color: #8fb8f0;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.45;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-status.is-idle {
    color: #8fb8f0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-status.is-running {
    color: #f8d27b;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-status.is-ready {
    color: #82f1d2;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-status.is-error {
    color: #ff9b9b;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e 0%, #14b8a6 45%, #2563eb 100%);
    transition: width 0.35s ease;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-list {
    display: grid;
    gap: 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-compose-summary {
    display: none !important;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-compose-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-inline {
    display: none !important;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-inline .legacy-financeiro-dda-step {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 14px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-inline .legacy-financeiro-dda-step small {
    display: none;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-inline .legacy-financeiro-dda-step strong {
    margin-bottom: 0;
    font-size: 0.74rem;
    line-height: 1.3;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-inline .legacy-financeiro-dda-step-index {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 0.76rem;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid rgba(111, 138, 179, 0.18);
    border-radius: 16px;
    background: rgba(13, 23, 37, 0.64);
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step.is-running {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(19, 40, 71, 0.72);
    transform: translateY(-1px);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step.is-done {
    border-color: rgba(45, 212, 191, 0.28);
    background: rgba(10, 36, 35, 0.7);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(112, 140, 185, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: #e9f2ff;
    font-size: 0.92rem;
    font-weight: 900;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step strong {
    display: block;
    color: #f4f9ff;
    font-size: 0.84rem;
    font-weight: 800;
    margin-bottom: 4px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step small {
    display: block;
    color: #9db2c6;
    font-size: 0.74rem;
    line-height: 1.5;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log {
    display: grid;
    gap: 8px;
    max-height: 322px;
    overflow-y: auto;
    padding-right: 2px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-shell {
    display: none !important;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-item {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid rgba(112, 140, 185, 0.16);
    border-radius: 14px;
    background: rgba(13, 23, 37, 0.58);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-item.is-success {
    border-color: rgba(45, 212, 191, 0.2);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-item.is-error {
    border-color: rgba(248, 113, 113, 0.22);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-time {
    color: #8fb8f0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-item p {
    margin: 0;
    color: #e6eef9;
    font-size: 0.78rem;
    line-height: 1.5;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-card {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(112, 140, 185, 0.16);
    border-radius: 16px;
    background: rgba(13, 23, 37, 0.58);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-card span {
    color: #8fa7c5;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-card strong {
    color: #f4f9ff;
    font-size: 1.1rem;
    font-weight: 900;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-card small {
    color: #9db2c6;
    font-size: 0.74rem;
    line-height: 1.45;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-view {
    display: grid;
    gap: 14px;
    min-height: 0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-view {
    height: 100%;
    grid-template-rows: auto auto auto minmax(0, 1fr);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-hero,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-shell {
    padding: 14px;
    border: 1px solid rgba(110, 140, 185, 0.24);
    border-radius: 18px;
    background: rgba(11, 20, 34, 0.45);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-shell {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-hero strong {
    display: block;
    color: #f4f9ff;
    font-size: 0.96rem;
    font-weight: 900;
    margin-bottom: 4px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-hero p {
    margin: 0;
    color: #9db2c6;
    font-size: 0.78rem;
    line-height: 1.55;
    max-width: 72ch;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-summary {
    margin: 0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-tabs .legacy-danfe-tab {
    min-width: 0;
    min-height: 34px;
    height: auto;
    padding: 6px 14px;
    border-radius: 999px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-empty {
    padding: 16px 18px;
    border: 1px dashed rgba(123, 165, 226, 0.24);
    border-radius: 16px;
    background: rgba(13, 23, 37, 0.42);
    color: #a9bfdc;
    font-size: 0.79rem;
    text-align: center;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-list {
    display: grid;
    gap: 0;
    min-height: 0;
    max-height: none;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(112, 140, 185, 0.16);
    border-radius: 16px;
    background: rgba(9, 19, 32, 0.42);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-table-head {
    display: grid;
    grid-template-columns: minmax(132px, 0.88fr) minmax(0, 1.22fr) minmax(96px, 0.62fr) minmax(156px, 1.02fr) minmax(118px, 0.72fr) minmax(244px, 1.34fr);
    gap: 0;
    margin-bottom: 8px;
    padding: 0 1px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-table-head span {
    padding: 0 10px 10px;
    color: #8fa7c5;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-table-head span:nth-child(5) {
    text-align: right;
    padding-right: 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-table-head span:last-child {
    text-align: left;
    padding-right: 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-row {
    display: grid;
    grid-template-columns: minmax(132px, 0.88fr) minmax(0, 1.22fr) minmax(96px, 0.62fr) minmax(156px, 1.02fr) minmax(118px, 0.72fr) minmax(244px, 1.34fr);
    gap: 0;
    align-items: stretch;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-row + .legacy-financeiro-dda-result-row {
    border-top: 1px solid rgba(112, 140, 185, 0.12);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 10px;
    color: #eef5ff;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-beneficiary {
    align-items: flex-start;
    min-height: 52px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-taxid,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-date,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-document {
    overflow: visible;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-highlight {
    color: #dcecff;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-value {
    color: #9df3da;
    justify-content: flex-end;
    text-align: right;
    padding-right: 12px;
    min-width: 118px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-system {
    align-items: flex-start;
    min-height: 52px;
    color: #b7c8df;
    font-weight: 700;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-text {
    display: block;
    width: 100%;
    min-width: 0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-taxid .legacy-financeiro-dda-result-text,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-date .legacy-financeiro-dda-result-text,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-document .legacy-financeiro-dda-result-text {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-beneficiary .legacy-financeiro-dda-result-text {
    display: -webkit-box;
    line-height: 1.26;
    max-height: calc(1.26em * 2);
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-system .legacy-financeiro-dda-result-text {
    display: -webkit-box;
    line-height: 1.3;
    max-height: calc(1.3em * 2);
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-value .legacy-financeiro-dda-result-text {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal {
    width: 860px;
    max-width: calc(100vw - 24px);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal .legacy-status-modal-head {
    padding: 12px 16px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal .legacy-status-modal-body {
    padding: 14px 16px 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal .legacy-status-modal-actions {
    padding: 10px 16px 14px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-body {
    display: grid;
    gap: 8px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal .legacy-status-lookup {
    gap: 6px;
    padding: 8px 9px 9px;
    border-radius: 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal .legacy-status-lookup-row {
    grid-template-columns: minmax(0, 39ch) minmax(98px, 116px);
    justify-content: start;
    gap: 7px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal .legacy-status-lookup-input {
    height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    letter-spacing: 0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal .legacy-status-lookup-row .legacy-button {
    min-width: 98px;
    height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 0.72rem;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal .legacy-status-lookup-hint {
    font-size: 0.66rem;
    line-height: 1.35;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-note {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    background: rgba(13, 27, 43, 0.72);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-note .span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-note span {
    display: block;
    color: #9db2c6;
    font-size: 0.64rem;
    margin-bottom: 1px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-note strong {
    display: block;
    color: #eef5ff;
    font-size: 0.76rem;
    line-height: 1.3;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-results-shell {
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(83, 101, 127, 0.78);
    border-radius: 12px;
    background: rgba(10, 20, 36, 0.9);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table {
    width: 100%;
    table-layout: fixed;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table thead th,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table tbody td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 7px 8px;
    font-size: 0.7rem;
    line-height: 1.24;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table thead th:nth-child(1),
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table tbody td:nth-child(1) {
    width: 10%;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table thead th:nth-child(2),
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table tbody td:nth-child(2) {
    width: 14%;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table thead th:nth-child(3),
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table tbody td:nth-child(3) {
    width: 19%;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table thead th:nth-child(4),
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table tbody td:nth-child(4) {
    width: 15%;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table thead th:nth-child(5),
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table tbody td:nth-child(5) {
    width: 16%;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table thead th:nth-child(6),
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table tbody td:nth-child(6) {
    width: 26%;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table-action-cell {
    text-align: center;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-results-shell + .legacy-status-modal-actions,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-modal .legacy-status-modal-actions {
    padding-top: 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-action-button {
    width: auto;
    min-width: 136px;
    padding: 6px 10px;
    border-color: rgba(90, 174, 255, 0.22);
    background: linear-gradient(135deg, rgba(24, 132, 196, 0.24), rgba(54, 112, 226, 0.26));
    box-shadow: none;
    font-size: 0.68rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.2;
    text-align: center;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 124px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(66, 211, 146, 0.28);
    background: rgba(38, 80, 56, 0.28);
    color: #8de0b5;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-action-button:hover,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-action-button:focus-visible {
    background: linear-gradient(135deg, rgba(28, 150, 214, 0.32), rgba(64, 126, 236, 0.34));
    border-color: rgba(108, 192, 255, 0.34);
    box-shadow: 0 0 0 1px rgba(108, 192, 255, 0.12);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters {
    display: grid;
    width: 100%;
    gap: 10px 12px;
    align-items: end;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-field {
    min-width: 0;
    width: 100%;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters-has-loja {
    grid-template-columns:
        minmax(150px, 0.95fr)
        minmax(110px, 0.8fr)
        minmax(220px, 1.45fr)
        minmax(130px, 0.82fr)
        minmax(130px, 0.9fr)
        minmax(140px, 0.95fr)
        minmax(120px, 0.8fr)
        minmax(150px, 0.95fr)
        minmax(150px, 0.95fr);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters-no-loja {
    grid-template-columns:
        minmax(110px, 0.8fr)
        minmax(220px, 1.45fr)
        minmax(130px, 0.82fr)
        minmax(130px, 0.95fr)
        minmax(140px, 1fr)
        minmax(120px, 0.8fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-loja,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-cnpj,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-fornecedor,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-numero,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-setor,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-sub-setor,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-view,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-field-data-de,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-field-data-ate {
    grid-column: auto;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-field-data-de,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-field-data-ate {
    min-width: 140px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-field span {
    margin-bottom: 4px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-field input,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-field select {
    min-height: 40px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters {
    grid-auto-flow: row;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    margin-left: 0;
    justify-self: stretch;
    margin-top: 2px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-buttons .legacy-button {
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(88, 125, 173, 0.22);
    border-radius: 16px;
    background: rgba(10, 23, 38, 0.78);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-modal {
    width: 720px;
    max-width: calc(100vw - 28px);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-confirm-modal {
    width: 620px;
    max-width: calc(100vw - 28px);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-confirm-copy {
    display: grid;
    gap: 10px;
    padding: 6px 2px 0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-confirm-copy strong {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.35;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-confirm-copy p {
    margin: 0;
    color: rgba(205, 220, 245, 0.82);
    font-size: 13px;
    line-height: 1.55;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-recebimento-modal {
    width: 860px;
    max-width: calc(100vw - 28px);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-recebimento-modal .legacy-recebimento-summary,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-recebimento-modal .legacy-recebimento-grid,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-recebimento-modal .legacy-recebimento-dates {
    gap: 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-recebimento-modal .legacy-choice-list-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-recebimento-modal .legacy-choice-list-inline .legacy-choice-item {
    min-height: 44px;
    margin-bottom: 0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-meta {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-meta strong {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-meta span {
    color: #7fcaf6;
    font-size: 12px;
    font-weight: 700;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-meta small {
    color: #9cb7d6;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-col-select {
    width: 4ch;
    min-width: 4ch;
    max-width: 4ch;
    text-align: center;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-checkline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-checkline input,
body.theme-legacy-nfe.theme-financeiro-page #legacyFinanceiroSelectAll {
    width: 16px;
    height: 16px;
    accent-color: #2f7df6;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-copy strong {
    color: #ffffff;
    font-size: 15px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-copy span {
    color: #7fcaf6;
    font-size: 13px;
    font-weight: 700;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table th {
    padding: 3px 5px;
    font-size: 10px;
    line-height: 1.1;
    vertical-align: middle;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table td {
    padding: 3px 5px;
    font-size: 10px;
    line-height: 1.1;
    vertical-align: middle;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table tbody tr.legacy-financeiro-row-romaneio {
    background: linear-gradient(180deg, rgba(37, 94, 108, 0.16) 0%, rgba(18, 46, 59, 0.16) 100%);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table tbody tr.legacy-financeiro-row-romaneio:hover {
    background: linear-gradient(180deg, rgba(44, 112, 129, 0.2) 0%, rgba(22, 56, 71, 0.2) 100%);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table tbody tr.legacy-financeiro-row-estornado {
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.18) 0%, rgba(69, 10, 10, 0.14) 100%);
    cursor: pointer;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table tbody tr.legacy-financeiro-row-estornado:hover {
    background: linear-gradient(180deg, rgba(153, 27, 27, 0.28) 0%, rgba(91, 15, 15, 0.22) 100%);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-flow-status {
    min-height: 18px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 9px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-actions-trigger {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    font-size: 15px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-col-acoes {
    min-width: 6ch;
    width: 6ch;
    max-width: 6ch;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-col-acoes,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-select {
    text-align: center;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-checkline {
    min-height: 18px;
    justify-content: center;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-checkline input[type="checkbox"],
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table thead input[type="checkbox"] {
    width: 12px;
    height: 12px;
    margin: 0;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-modal .legacy-status-modal-body {
    padding-top: 16px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-cnpj {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-numero {
    width: 10ch;
    min-width: 10ch;
    max-width: 10ch;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-fornecedor {
    width: 34ch;
    min-width: 34ch;
    max-width: 34ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-setor {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-sub-setor {
    width: 20ch;
    min-width: 20ch;
    max-width: 20ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-loja {
    width: 20ch;
    min-width: 20ch;
    max-width: 20ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-parcela {
    width: 10ch;
    min-width: 10ch;
    max-width: 10ch;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-vencimento {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-forma {
    width: 18ch;
    min-width: 18ch;
    max-width: 18ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-valor {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-banco {
    width: 24ch;
    min-width: 24ch;
    max-width: 24ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table .legacy-financeiro-col-status {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-modal {
    width: 760px;
    max-width: calc(100vw - 28px);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-modal {
    width: 680px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-warning {
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(127, 29, 29, 0.16);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-reason {
    display: grid;
    gap: 7px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-reason small {
    color: #91a7c7;
    font-size: 0.68rem;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-audit {
    padding: 14px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 13px;
    background: rgba(54, 14, 20, 0.34);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-audit span {
    display: block;
    margin-bottom: 6px;
    color: #fca5a5;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-audit p {
    margin: 0;
    color: #f8fafc;
    font-size: 0.78rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-button-danger {
    border-color: rgba(248, 113, 113, 0.52);
    background: linear-gradient(135deg, #991b1b, #dc2626);
    color: #fff;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-button-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-row-menu-item-danger {
    color: #fca5a5;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-row-menu-item-danger:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #fecaca;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-modal-body {
    display: grid;
    gap: 14px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview {
    overflow: hidden;
    border: 1px solid rgba(70, 142, 210, 0.3);
    border-radius: 14px;
    background: rgba(8, 20, 34, 0.52);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(110, 140, 185, 0.2);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview-head strong {
    color: #edf6ff;
    font-size: 0.78rem;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview-head span {
    color: #8fc8ff;
    font-size: 0.7rem;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview-warning {
    margin: 10px 12px 0;
    padding: 9px 11px;
    border: 1px solid rgba(248, 113, 113, 0.38);
    border-radius: 10px;
    background: rgba(127, 29, 29, 0.24);
    color: #fecaca;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.4;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview-table {
    max-height: 210px;
    overflow: auto;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.68rem;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview th,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(110, 140, 185, 0.14);
    color: #dce9f7;
    text-align: left;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #122337;
    color: #91a9c3;
    font-size: 0.61rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview td.is-overdue {
    color: #fca5a5;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview td.is-upcoming {
    color: #6ee7b7;
    font-weight: 800;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview {
    border-color: rgba(48, 103, 167, 0.25);
    background: #f8fbff;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview-head strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview td {
    color: #233b58;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview th {
    background: #eaf2fc;
    color: #526c89;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-manual-preview-warning {
    border-color: rgba(185, 28, 28, 0.24);
    background: #fff1f2;
    color: #991b1b;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-payment-box,
body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-paid-box {
    padding: 12px;
    border: 1px solid rgba(110, 140, 185, 0.24);
    border-radius: 18px;
    background: rgba(11, 20, 34, 0.45);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-link {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(45, 212, 191, 0.24);
    border-radius: 18px;
    background: rgba(13, 148, 136, 0.07);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(150px, 1fr);
    gap: 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-competence {
    display: grid;
    align-content: center;
    gap: 5px;
    min-height: 58px;
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-competence span {
    color: #8fa7c2;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-competence strong {
    color: #eaf4ff;
    font-size: 0.86rem;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: fit-content;
    color: #dce8f6;
    cursor: pointer;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-suggestion input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: #14b8a6;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-suggestion span {
    display: grid;
    gap: 2px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-suggestion strong {
    font-size: 0.72rem;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-suggestion small {
    color: #8fa7c2;
    font-size: 0.62rem;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-payment-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 10px;
}

body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-payment-grid > .legacy-editor-field {
    align-content: start;
}

body.theme-mode-light.theme-legacy-nfe .legacy-flow-status-danger {
    background: #ffe3e3;
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.18);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-card.is-active {
    background: linear-gradient(180deg, #f6fbff, #eef5ff);
    border-color: rgba(44, 111, 255, 0.28);
    box-shadow: 0 0 0 1px rgba(44, 111, 255, 0.14), 0 16px 28px rgba(114, 140, 190, 0.18);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-header-copy {
    color: #5a6f91;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-intro,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-shell,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-shell,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-shell,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-hero,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-shell {
    background: #f8fbff;
    border-color: rgba(117, 146, 190, 0.22);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-intro strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-head span,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-head span,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-head span,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-card strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-hero strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-field strong {
    color: #173257;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal .form-control,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-item,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-card,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-list {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(117, 146, 190, 0.18);
    color: #173257;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-intro p,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-hint,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step small,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-item p,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-card small,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-card span,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-log-head small,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-head small,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-hero p,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-empty,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-table-head span {
    color: #5a6f91;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-field-label {
    color: #6d8fbd;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal .badge {
    background: linear-gradient(180deg, #eef5ff, #ddeafe);
    border-color: rgba(109, 143, 189, 0.26);
    color: #40638f;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-modal .form-control::placeholder {
    color: #7b90ae;
    opacity: 1;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-head #legacyFinanceiroDdaProgressTitle,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-head span {
    color: #4c6689;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-head strong {
    color: #245ea8;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-shell {
    box-shadow: 0 18px 36px rgba(114, 140, 190, 0.2);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-status.is-idle {
    color: #5c79a0;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-status.is-running {
    color: #9a6a14;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-status.is-ready {
    color: #16735f;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-progress-status.is-error {
    color: #b42318;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-row + .legacy-financeiro-dda-result-row {
    border-top-color: rgba(117, 146, 190, 0.18);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell {
    color: #173257;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-highlight {
    color: #245ea8;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-value {
    color: #0f766e;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell.is-system {
    color: #5a6f91;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge.is-idle {
    color: #173257;
    background: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge.is-running {
    color: #245ea8;
    background: rgba(36, 94, 168, 0.1);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge.is-ready {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge.is-error {
    color: #b42318;
    background: rgba(180, 35, 24, 0.08);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-meta {
    color: #245ea8;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-payment-box,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-paid-box,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-link {
    background: #f7fbff;
    border-color: rgba(117, 146, 190, 0.22);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-competence {
    background: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-competence strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-suggestion {
    color: #173257;
}

@media (max-width: 720px) {
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-provision-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsividade definitiva baseada na largura real do painel, inclusive com sidebar. */
body.theme-legacy-nfe .legacy-table-panel,
body.theme-legacy-nfe .legacy-fornecedores-table-panel,
body.theme-legacy-nfe .legacy-setores-table-panel,
body.theme-legacy-nfe .legacy-sincronia-table-panel,
body.theme-legacy-nfe .legacy-usuarios-table-panel,
body.theme-legacy-nfe .legacy-lojas-table-panel,
body.theme-legacy-nfe .legacy-nfse-table-panel {
    min-width: 0;
    container-type: inline-size;
}

body.theme-legacy-nfe :is(
    .legacy-filters,
    .legacy-fornecedores-filter-bar,
    .legacy-setores-filter-bar,
    .legacy-usuarios-filter-bar,
    .legacy-lojas-filter-bar,
    .legacy-nfse-filters
) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

body.theme-legacy-nfe :is(
    .legacy-filters,
    .legacy-fornecedores-filter-bar,
    .legacy-setores-filter-bar,
    .legacy-usuarios-filter-bar,
    .legacy-lojas-filter-bar,
    .legacy-nfse-filters
) > * {
    min-width: 0;
    max-width: 100%;
}

@container (max-width: 1280px) {
    body.theme-legacy-nfe :is(
        .legacy-filters,
        .legacy-fornecedores-filter-bar,
        .legacy-setores-filter-bar,
        .legacy-usuarios-filter-bar,
        .legacy-lojas-filter-bar,
        .legacy-nfse-filters
    ) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    body.theme-legacy-nfe :is(
        .legacy-filter-buttons,
        .legacy-fornecedores-filter-buttons,
        .legacy-setores-filter-buttons,
        .legacy-usuarios-filter-buttons,
        .legacy-lojas-filter-buttons,
        .legacy-nfse-filter-buttons
    ) {
        grid-column: 1 / -1 !important;
        justify-self: end !important;
        width: auto !important;
        max-width: 100%;
        flex-wrap: wrap !important;
    }
}

@container (max-width: 760px) {
    body.theme-legacy-nfe :is(
        .legacy-filters,
        .legacy-fornecedores-filter-bar,
        .legacy-setores-filter-bar,
        .legacy-usuarios-filter-bar,
        .legacy-lojas-filter-bar,
        .legacy-nfse-filters
    ) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@container (max-width: 520px) {
    body.theme-legacy-nfe :is(
        .legacy-filters,
        .legacy-fornecedores-filter-bar,
        .legacy-setores-filter-bar,
        .legacy-usuarios-filter-bar,
        .legacy-lojas-filter-bar,
        .legacy-nfse-filters
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.theme-legacy-nfe :is(
        .legacy-filter-buttons,
        .legacy-fornecedores-filter-buttons,
        .legacy-setores-filter-buttons,
        .legacy-usuarios-filter-buttons,
        .legacy-lojas-filter-buttons,
        .legacy-nfse-filter-buttons
    ) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        justify-self: stretch !important;
        width: 100% !important;
    }
}

body.theme-legacy-nfe .legacy-recebimento-lock-note {
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 11px;
    color: #b9dcf4;
    background: rgba(14, 116, 144, 0.14);
    font-size: 0.72rem;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-choice-item.is-locked,
body.theme-legacy-nfe .legacy-recebimento-parcela-card.is-payment-locked {
    cursor: not-allowed;
    opacity: 0.82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-recebimento-lock-note {
    border-color: #9bd8ef;
    color: #15536f;
    background: #edf9fd;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-card,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-bar,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-card,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-bridge-card {
    background: #f8fbff;
    border-color: rgba(117, 146, 190, 0.22);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-main strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-bridge-card strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-meta strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-copy strong,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-card strong {
    color: #173257;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-main span,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-fornecedor-metrics,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-bridge-card small,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-empty-panel,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insight-card small {
    color: #5a6f91;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-meta span,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-copy span {
    color: #245ea8;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table tbody tr.legacy-financeiro-row-romaneio {
    background: linear-gradient(180deg, rgba(190, 231, 235, 0.72) 0%, rgba(206, 239, 242, 0.68) 100%);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table tbody tr.legacy-financeiro-row-romaneio:hover {
    background: linear-gradient(180deg, rgba(176, 224, 229, 0.88) 0%, rgba(193, 234, 238, 0.84) 100%);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table tbody tr.legacy-financeiro-row-estornado {
    background: linear-gradient(180deg, rgba(254, 226, 226, 0.88) 0%, rgba(255, 241, 242, 0.84) 100%);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-table tbody tr.legacy-financeiro-row-estornado:hover {
    background: linear-gradient(180deg, rgba(254, 202, 202, 0.9) 0%, rgba(255, 228, 230, 0.88) 100%);
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-warning,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-audit {
    border-color: rgba(185, 28, 28, 0.2);
    background: #fff5f5;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-audit span,
body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-row-menu-item-danger {
    color: #b91c1c;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-audit p {
    color: #542323;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-reversal-reason small {
    color: #6b7280;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-batch-meta small {
    color: #5f7798;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-confirm-copy strong {
    color: #173257;
}

body.theme-mode-light.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-confirm-copy p {
    color: #5a6f91;
}

@media (max-width: 1520px) {
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters-no-loja,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters-has-loja {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-loja,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-cnpj,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-numero,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-setor,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-sub-setor,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-view {
        min-width: 0;
        max-width: none;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-fornecedor {
        min-width: 0;
        max-width: none;
        grid-column: span 2;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-field-data-de,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-field-data-ate {
        grid-column: span 2;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-buttons {
        grid-column: 1 / -1;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 980px) {
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-analysis-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-inline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-table-head,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-row {
        grid-template-columns: minmax(140px, 0.96fr) minmax(200px, 1.18fr) minmax(100px, 0.72fr) minmax(156px, 0.98fr) minmax(110px, 0.72fr) minmax(220px, 1.14fr);
    }
}

@media (max-width: 640px) {
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-actions {
        align-items: stretch;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-actions .legacy-button {
        width: 100%;
        min-width: 0;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-footer-slot {
        width: 100%;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-status-badge {
        width: 100%;
        justify-content: center;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-index {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-inline {
        grid-template-columns: minmax(0, 1fr);
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-inline .legacy-financeiro-dda-step {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 8px;
        padding: 8px 10px;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-step-inline .legacy-financeiro-dda-step-index {
        width: 28px;
        height: 28px;
        border-radius: 10px;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-hero {
        flex-direction: column;
        align-items: stretch;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-hero .legacy-button {
        width: 100%;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-table-head {
        display: none;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-results-list {
        gap: 10px;
        border: 0;
        background: transparent;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-row {
        grid-template-columns: minmax(0, 1fr);
        border: 1px solid rgba(112, 140, 185, 0.16);
        border-radius: 14px;
        background: rgba(9, 19, 32, 0.42);
        overflow: hidden;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-row + .legacy-financeiro-dda-result-row {
        border-top: 1px solid rgba(112, 140, 185, 0.16);
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell {
        min-height: 0;
        padding: 8px 12px;
        border-top: 1px solid rgba(112, 140, 185, 0.1);
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-dda-result-cell:first-child {
        border-top: 0;
    }
}

@media (max-width: 1080px) {
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters-no-loja,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters-has-loja {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-field-fornecedor,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-buttons {
        grid-column: span 2;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-loja,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-cnpj,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-numero,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-setor,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-financeiro-field-view,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-field-data-de,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-field-data-ate {
        grid-column: auto;
        min-width: 0;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-modal-grid,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-payment-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    body.theme-legacy-nfe.theme-financeiro-page .legacy-panel-header {
        grid-template-columns: 1fr;
        display: grid;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-header-copy {
        text-align: left;
        max-width: none;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-summary-grid,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-insights,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-modal-grid,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-payment-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-modal-grid > .legacy-editor-field.span-2,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-payment-grid > .legacy-editor-field.span-2 {
        grid-column: span 1;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-field-fornecedor,
    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-buttons {
        grid-column: span 1;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-buttons {
        grid-column: 1 / -1;
        justify-content: stretch;
        flex-wrap: wrap;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-filters .legacy-filter-buttons > * {
        flex: 1 1 100%;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-note {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe.theme-financeiro-page .legacy-financeiro-chave-note .span-2 {
        grid-column: span 1;
    }
}

body.theme-legacy-nfe .legacy-nfse-debug-view {
    display: none;
    gap: 8px;
}

body.theme-legacy-nfe .legacy-nfse-debug-view.active {
    display: grid;
}

body.theme-legacy-nfe .legacy-nfse-debug-meta {
    color: #dce8fb;
    font-size: 12px;
}

body.theme-legacy-nfe .legacy-nfse-debug-pre {
    margin: 0;
    padding: 10px;
    max-height: 260px;
    overflow: auto;
    border: 1px solid #314255;
    background: #0f1a2b;
    color: #c9ddfb;
    font-size: 11px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

body.theme-legacy-nfe .legacy-nfse-result-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

body.theme-legacy-nfe .legacy-nfse-result-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-nfse-result-message.success {
    color: #9ef0b7;
}

body.theme-legacy-nfe .legacy-nfse-result-message.error {
    color: #ffb4b4;
}

@keyframes legacy-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

body.theme-legacy-nfe .legacy-nfse-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 10px;
}

body.theme-legacy-nfe .legacy-nfse-modal-field.span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe .legacy-nfse-modal-field.span-3 {
    grid-column: span 3;
}

body.theme-legacy-nfe .legacy-setores-top-board,
body.theme-legacy-nfe .legacy-setores-table-panel {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-setores-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-setores-filter-bar {
    display: grid;
    grid-template-columns: 42ch 26ch 16ch auto;
    gap: 8px;
    width: 100%;
    align-items: end;
}

body.theme-legacy-nfe .legacy-setores-inline-filters {
    margin: 0 0 10px;
}

body.theme-legacy-nfe .legacy-setores-filter-buttons {
    justify-content: flex-start;
    margin-top: 0;
}

body.theme-legacy-nfe .legacy-setores-col-id {
    width: 8ch;
}

body.theme-legacy-nfe .legacy-setores-col-codigo {
    width: 10ch;
}

body.theme-legacy-nfe .legacy-setores-col-loja {
    width: 28ch;
}

body.theme-legacy-nfe .legacy-setores-col-nome {
    width: 24ch;
}

body.theme-legacy-nfe .legacy-setores-col-descricao {
    width: 38ch;
}

body.theme-legacy-nfe .legacy-setores-col-status {
    width: 14ch;
}

body.theme-legacy-nfe .legacy-setores-col-acoes {
    width: 16ch;
}

body.theme-legacy-nfe .legacy-setores-col-loja,
body.theme-legacy-nfe .legacy-setores-col-nome,
body.theme-legacy-nfe .legacy-setores-col-descricao {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-setores-edit-button {
    min-width: 100px;
    height: 24px;
    padding: 0 10px;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-setor-editor-modal {
    width: 780px;
    max-width: calc(100vw - 32px);
}

body.theme-legacy-nfe .legacy-setor-modal-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.theme-legacy-nfe .legacy-setor-modal-field.span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe .legacy-sincronia-list-page {
    color: #dce8fb;
}

body.theme-legacy-nfe .legacy-sincronia-top-board,
body.theme-legacy-nfe .legacy-sincronia-table-panel,
body.theme-legacy-nfe .legacy-sincronia-log-panel {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-sincronia-summary-grid {
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-sincronia-filter-bar {
    display: grid;
    grid-template-columns: 40ch 18ch 16ch auto;
    gap: 8px;
    width: 100%;
    align-items: end;
}

body.theme-legacy-nfe .legacy-sincronia-inline-filters,
body.theme-legacy-nfe .legacy-sincronia-actions {
    margin: 0 0 10px;
}

body.theme-legacy-nfe .legacy-sincronia-filter-buttons {
    justify-content: flex-start;
    margin-top: 0;
}

body.theme-legacy-nfe .legacy-checkbox-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.theme-legacy-nfe .legacy-checkbox-cell input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

body.theme-legacy-nfe .legacy-sincronia-number {
    width: 100%;
    height: 24px;
    min-height: 24px;
    padding: 0 6px;
    border: 1px solid #617694;
    border-radius: 0;
    background: #162232;
    color: #ffffff;
    font-size: 10px;
    line-height: 22px;
    box-sizing: border-box;
}

body.theme-legacy-nfe .legacy-sincronia-col-auto {
    width: 7ch;
}

body.theme-legacy-nfe .legacy-sincronia-col-loja {
    width: 38ch;
}

body.theme-legacy-nfe .legacy-sincronia-loja-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

body.theme-legacy-nfe .legacy-sincronia-force-form {
    display: inline-flex;
    margin: 0;
}

body.theme-legacy-nfe .legacy-sincronia-force-button {
    min-height: 18px;
    padding: 1px 5px;
    border-radius: 999px;
    border: 1px solid rgba(111, 201, 255, 0.2);
    background: linear-gradient(135deg, rgba(17, 98, 138, 0.28), rgba(34, 97, 193, 0.3));
    color: #dff5ff;
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: none;
    white-space: nowrap;
    flex: 0 0 auto;
}

body.theme-legacy-nfe .legacy-sincronia-force-button:hover,
body.theme-legacy-nfe .legacy-sincronia-force-button:focus-visible {
    background: linear-gradient(135deg, rgba(21, 123, 171, 0.34), rgba(43, 112, 216, 0.36));
    border-color: rgba(128, 217, 255, 0.3);
}

body.theme-legacy-nfe .legacy-sincronia-col-loja strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-sincronia-col-intervalo {
    width: 12ch;
}

body.theme-legacy-nfe .legacy-sincronia-col-carga {
    width: 15ch;
}

body.theme-legacy-nfe .legacy-sincronia-col-raw-log {
    width: 10ch;
}

body.theme-legacy-nfe .legacy-sincronia-raw-log-cell {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-sincronia-log-button {
    min-height: 18px;
    padding: 1px 6px;
    border: 1px solid rgba(111, 201, 255, 0.2);
    border-radius: 999px;
    background: rgba(18, 56, 91, 0.62);
    color: #dff5ff;
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: none;
}

body.theme-legacy-nfe .legacy-sincronia-log-button:hover,
body.theme-legacy-nfe .legacy-sincronia-log-button:focus-visible {
    border-color: rgba(128, 217, 255, 0.38);
    background: rgba(25, 82, 130, 0.8);
}

body.theme-legacy-nfe .legacy-sincronia-col-cnpj {
    width: 18ch;
}

body.theme-legacy-nfe .legacy-sincronia-col-ambiente {
    width: 16ch;
}

body.theme-legacy-nfe .legacy-sincronia-col-certificado {
    width: 14ch;
}

body.theme-legacy-nfe .legacy-sincronia-col-data {
    width: 18ch;
}

body.theme-legacy-nfe .legacy-sincronia-col-nsu {
    width: 28ch;
}

body.theme-legacy-nfe .legacy-sincronia-col-nsu strong,
body.theme-legacy-nfe .legacy-sincronia-nsu-detail {
    display: block;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-sincronia-nsu-detail {
    margin-top: 0.2rem;
    color: var(--legacy-muted, #8fa3bd);
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

body.theme-legacy-nfe .legacy-sincronia-col-loja,
body.theme-legacy-nfe .legacy-sincronia-log-col-loja,
body.theme-legacy-nfe .legacy-sincronia-log-col-mensagem {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-sincronia-log-col-loja {
    width: 28ch;
}

body.theme-legacy-nfe .legacy-sincronia-log-col-status {
    width: 14ch;
}

body.theme-legacy-nfe .legacy-sincronia-log-col-small {
    width: 10ch;
}

body.theme-legacy-nfe .legacy-sincronia-log-col-data {
    width: 18ch;
}

body.theme-legacy-nfe .legacy-sincronia-log-col-mensagem {
    width: 54ch;
}

@media (max-width: 1280px) {
    body.theme-legacy-nfe .legacy-setores-filter-bar {
        grid-template-columns: 34ch 22ch 16ch auto;
    }

    body.theme-legacy-nfe .legacy-sincronia-filter-bar {
        grid-template-columns: 32ch 18ch 16ch auto;
    }
}

@media (max-width: 980px) {
    body.theme-legacy-nfe .legacy-setores-summary-grid,
    body.theme-legacy-nfe .legacy-setor-modal-grid {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-setores-filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-setores-filter-buttons {
        grid-column: span 2;
    }

    body.theme-legacy-nfe .legacy-sincronia-filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-sincronia-filter-buttons {
        grid-column: span 2;
    }

    body.theme-legacy-nfe .legacy-usuario-lojas-grid,
    body.theme-legacy-nfe .legacy-usuario-permissions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    body.theme-legacy-nfe .legacy-setor-modal-grid,
    body.theme-legacy-nfe .legacy-setores-filter-bar,
    body.theme-legacy-nfe .legacy-setores-summary-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-setor-modal-field.span-2,
    body.theme-legacy-nfe .legacy-setores-filter-buttons {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-sincronia-filter-bar {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-sincronia-filter-buttons {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-usuario-lojas-grid,
    body.theme-legacy-nfe .legacy-usuario-permissions-grid {
        grid-template-columns: 1fr;
    }
}

body.theme-legacy-nfe .legacy-usuario-editor-modal {
    width: 1080px;
    max-width: calc(100vw - 24px);
}

body.theme-legacy-nfe .legacy-usuario-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 10px;
}

body.theme-legacy-nfe .legacy-usuario-modal-field.span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe .legacy-usuario-modal-field.span-4 {
    grid-column: span 4;
}

body.theme-legacy-nfe .legacy-usuario-lojas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.theme-legacy-nfe .legacy-usuario-loja-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 5px 8px;
    align-items: start;
    padding: 10px 12px;
    border: 1px solid #3e5471;
    border-radius: 12px;
    background: #162233;
}

body.theme-legacy-nfe .legacy-usuario-loja-item input[type="checkbox"] {
    margin: 2px 0 0;
}

body.theme-legacy-nfe .legacy-usuario-loja-item span {
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

body.theme-legacy-nfe .legacy-usuario-loja-item small {
    grid-column: 2;
    color: #9fc1ef;
    font-size: 10px;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-usuario-loja-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.theme-legacy-nfe .legacy-usuario-loja-access,
body.theme-legacy-nfe .legacy-usuario-loja-transfer {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-usuario-loja-access > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

body.theme-legacy-nfe .legacy-usuario-loja-access strong {
    overflow-wrap: anywhere;
}

body.theme-legacy-nfe .legacy-usuario-loja-card .legacy-usuario-loja-access small {
    grid-column: auto;
}

body.theme-legacy-nfe .legacy-usuario-loja-transfer {
    padding-top: 9px;
    border-top: 1px solid rgba(159, 193, 239, 0.18);
}

body.theme-legacy-nfe .legacy-usuario-loja-transfer span {
    color: #7dd3fc;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

body.theme-legacy-nfe .legacy-usuario-loja-note {
    color: #9fc1ef;
    font-size: 10px;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-usuario-permissions-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(122, 150, 186, 0.2);
}

body.theme-legacy-nfe .legacy-usuario-profile-summary {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

body.theme-legacy-nfe .legacy-usuario-profile-summary strong {
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
}

body.theme-legacy-nfe .legacy-usuario-profile-summary span {
    color: #9fc1ef;
    font-size: 0.73rem;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-usuario-profile-summary.is-profile {
    border-color: rgba(45, 212, 191, 0.22);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(37, 99, 235, 0.08));
}

body.theme-legacy-nfe .legacy-usuario-permissions-head {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

body.theme-legacy-nfe .legacy-usuario-permissions-head strong {
    color: #ffffff;
    font-size: 12px;
}

body.theme-legacy-nfe .legacy-usuario-permissions-head span {
    color: #9fc1ef;
    font-size: 11px;
}

body.theme-legacy-nfe .legacy-usuario-permissions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.theme-legacy-nfe .legacy-usuario-permission-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px 8px;
    align-items: start;
    padding: 10px 12px;
    border: 1px solid #3e5471;
    border-radius: 12px;
    background: #162233;
}

body.theme-legacy-nfe .legacy-usuario-permission-item input[type="checkbox"] {
    margin: 2px 0 0;
}

body.theme-legacy-nfe .legacy-usuario-permission-item span {
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

body.theme-legacy-nfe .legacy-usuario-permission-item small {
    grid-column: 2;
    color: #9fc1ef;
    font-size: 10px;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-permissoes-col-nome {
    width: 26ch;
}

body.theme-legacy-nfe .legacy-permissoes-col-chave {
    width: 22ch;
}

body.theme-legacy-nfe .legacy-permissoes-col-descricao {
    width: auto;
}

body.theme-legacy-nfe .legacy-permissoes-col-uso {
    width: 12ch;
}

body.theme-legacy-nfe .legacy-topbar-logout {
    margin-left: 10px;
    min-width: 64px;
    font-family: inherit;
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top, rgba(79, 124, 214, 0.22), transparent 30%),
        #0b1524;
}

body.theme-legacy-nfe .legacy-login-card {
    width: 420px;
    max-width: 100%;
    padding: 22px;
    border: 1px solid #33465f;
    background: #162233;
    box-shadow: 0 24px 60px rgba(2, 8, 18, 0.36);
}

body.theme-legacy-nfe .legacy-login-head {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

body.theme-legacy-nfe .legacy-login-head h1 {
    margin: 0;
    color: #ffffff;
    font-size: 28px;
    line-height: 1.05;
}

body.theme-legacy-nfe .legacy-login-head p {
    margin: 0;
    color: #9fc1ef;
    font-size: 12px;
    line-height: 1.6;
}

body.theme-legacy-nfe .legacy-login-form {
    display: grid;
    gap: 12px;
}

body.theme-legacy-nfe .legacy-login-form .legacy-button {
    margin-top: 4px;
    height: 40px;
}

/* =========================================================
   Login DANFE (login.php) - tema claro padrao + tema escuro
   ========================================================= */
html body.dl-page {
    --dl-bg: #f5f8fb;
    --dl-glow-a: rgba(20, 184, 166, 0.16);
    --dl-glow-b: rgba(37, 99, 235, 0.10);
    --dl-text: #0f172a;
    --dl-strong: #0b1b2b;
    --dl-muted: #475569;
    --dl-soft: #64748b;
    --dl-accent: #0f766e;
    --dl-line: #dbe3ec;
    --dl-key: rgba(15, 118, 110, 0.055);
    --dl-surface: #ffffff;
    --dl-surface-border: #e5ebf2;
    --dl-surface-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    --dl-card-bg: #ffffff;
    --dl-card-border: #e2e8f0;
    --dl-card-shadow: 0 40px 90px rgba(15, 23, 42, 0.14), 0 0 0 6px rgba(20, 184, 166, 0.06);
    --dl-input-bg: #ffffff;
    --dl-input-border: #cbd5e1;
    --dl-input-text: #0f172a;
    --dl-placeholder: #94a3b8;
    --dl-focus: rgba(37, 99, 235, 0.14);
    --dl-focus-border: #2563eb;
    --dl-notice-bg: #ecfdf5;
    --dl-notice-border: #a7f3d0;
    --dl-notice-text: #065f46;
    --dl-warn-bg: #fffbeb;
    --dl-warn-border: #fde68a;
    --dl-warn-text: #92400e;
    --dl-toggle-bg: #ffffff;
    --dl-toggle-border: #e2e8f0;
    --dl-toggle-on-bg: #0f172a;
    --dl-toggle-on-text: #ffffff;
    --dl-paper: #fffdf6;
    --dl-paper-border: #e7e2cf;
    --dl-paper-line: #ece8da;
    --dl-paper-shadow: 0 30px 60px rgba(15, 23, 42, 0.16);
    --dl-paper-opacity: 1;
    --dl-grad-text: linear-gradient(90deg, #0f766e, #2563eb);
    --dl-btn: linear-gradient(135deg, #0f766e, #2563eb);
    --dl-btn-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
    --dl-teal-bg: #f0fdfa;
    --dl-teal-fg: #0f766e;
    --dl-blue-bg: #eff6ff;
    --dl-blue-fg: #2563eb;
    --dl-violet-bg: #faf5ff;
    --dl-violet-fg: #7c3aed;
    --dl-step-amber: #d97706;
    --dl-step-green: #16a34a;
    --dl-step-blue: #2563eb;
    --dl-step-teal: #0d9488;
    --dl-step-violet: #9333ea;
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--dl-text);
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 14px;
    background:
        radial-gradient(800px 600px at 78% 34%, var(--dl-glow-a), transparent 65%),
        radial-gradient(700px 500px at 10% 100%, var(--dl-glow-b), transparent 60%),
        var(--dl-bg);
}

html.theme-mode-dark body.dl-page {
    --dl-bg: #06131d;
    --dl-glow-a: rgba(15, 118, 110, 0.32);
    --dl-glow-b: rgba(37, 99, 235, 0.20);
    --dl-text: #e2e8f0;
    --dl-strong: #f8fafc;
    --dl-muted: #9fb4c4;
    --dl-soft: #7f97a8;
    --dl-accent: #5eead4;
    --dl-line: rgba(255, 255, 255, 0.10);
    --dl-key: rgba(94, 234, 212, 0.04);
    --dl-surface: rgba(255, 255, 255, 0.035);
    --dl-surface-border: rgba(255, 255, 255, 0.08);
    --dl-surface-shadow: none;
    --dl-card-bg: linear-gradient(170deg, rgba(17, 38, 54, 0.94), rgba(9, 25, 38, 0.96));
    --dl-card-border: rgba(94, 234, 212, 0.22);
    --dl-card-shadow: 0 50px 100px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --dl-input-bg: rgba(255, 255, 255, 0.04);
    --dl-input-border: rgba(148, 163, 184, 0.25);
    --dl-input-text: #f1f5f9;
    --dl-placeholder: #64748b;
    --dl-focus: rgba(45, 212, 191, 0.16);
    --dl-focus-border: #2dd4bf;
    --dl-notice-bg: rgba(34, 197, 94, 0.08);
    --dl-notice-border: rgba(74, 222, 128, 0.28);
    --dl-notice-text: #86efac;
    --dl-warn-bg: rgba(245, 158, 11, 0.08);
    --dl-warn-border: rgba(245, 158, 11, 0.28);
    --dl-warn-text: #fcd34d;
    --dl-toggle-bg: rgba(255, 255, 255, 0.05);
    --dl-toggle-border: rgba(255, 255, 255, 0.12);
    --dl-toggle-on-bg: #13293a;
    --dl-toggle-on-text: #e2e8f0;
    --dl-paper: #f5f3ea;
    --dl-paper-border: transparent;
    --dl-paper-line: #e2e0d4;
    --dl-paper-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    --dl-paper-opacity: 0.95;
    --dl-grad-text: linear-gradient(90deg, #5eead4, #60a5fa);
    --dl-btn: linear-gradient(135deg, #14b8a6, #2563eb);
    --dl-btn-shadow: 0 14px 30px rgba(20, 184, 166, 0.25);
    --dl-teal-bg: rgba(20, 184, 166, 0.15);
    --dl-teal-fg: #5eead4;
    --dl-blue-bg: rgba(59, 130, 246, 0.16);
    --dl-blue-fg: #93c5fd;
    --dl-violet-bg: rgba(168, 85, 247, 0.16);
    --dl-violet-fg: #d8b4fe;
    --dl-step-amber: #fbbf24;
    --dl-step-green: #4ade80;
    --dl-step-blue: #60a5fa;
    --dl-step-teal: #2dd4bf;
    --dl-step-violet: #c084fc;
    color-scheme: dark;
}

body.dl-page .dl-ic {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* chave de acesso em marca d'agua */
body.dl-page .dl-keys {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

body.dl-page .dl-keys span {
    position: absolute;
    left: -60px;
    white-space: nowrap;
    font: 600 54px/1 Consolas, "Courier New", monospace;
    letter-spacing: 0.08em;
    color: var(--dl-key);
}

body.dl-page .dl-keys span:nth-child(1) { top: 120px; }
body.dl-page .dl-keys span:nth-child(2) { top: 300px; left: -260px; }
body.dl-page .dl-keys span:nth-child(3) { top: 480px; }

body.dl-page .dl-wrap {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 30px 56px 40px;
}

body.dl-page .dl-wrap *,
body.dl-page .dl-wrap *::before,
body.dl-page .dl-wrap *::after {
    box-sizing: border-box;
}

/* topo */
body.dl-page .dl-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

body.dl-page .dl-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

body.dl-page .dl-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #ffffff;
    font: 800 15px "Bahnschrift", "Segoe UI", sans-serif;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

body.dl-page .dl-brand-copy strong {
    display: block;
    color: var(--dl-accent);
    font: 800 16px "Bahnschrift", "Segoe UI", sans-serif;
    letter-spacing: 0.14em;
}

body.dl-page .dl-brand-copy small {
    color: var(--dl-soft);
    font-size: 12px;
}

body.dl-page .dl-notice {
    order: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 640px;
    margin: 0 0 0 auto;
    padding: 8px 14px;
    border: 1px solid var(--dl-notice-border);
    border-radius: 999px;
    background: var(--dl-notice-bg);
    color: var(--dl-notice-text);
    font-size: 12.5px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

body.dl-page .dl-notice.is-warning {
    border-color: var(--dl-warn-border);
    background: var(--dl-warn-bg);
    color: var(--dl-warn-text);
}

body.dl-page .dl-notice .dl-ic {
    width: 15px;
    height: 15px;
}

body.dl-page .dl-theme {
    order: 3;
    display: flex;
    gap: 2px;
    min-height: 0;
    margin: 0;
    padding: 3px;
    border: 1px solid var(--dl-toggle-border);
    border-radius: 999px;
    background: var(--dl-toggle-bg);
    cursor: pointer;
    box-shadow: none;
}

body.dl-page .dl-theme:focus-visible {
    outline: 2px solid var(--dl-focus-border);
    outline-offset: 3px;
}

body.dl-page .dl-theme-opt {
    display: grid;
    place-items: center;
    width: 32px;
    height: 26px;
    border-radius: 999px;
    color: var(--dl-soft);
    transition: background 0.2s ease, color 0.2s ease;
}

body.dl-page .dl-theme-opt .dl-ic {
    width: 14px;
    height: 14px;
}

html:not(.theme-mode-dark) body.dl-page .dl-theme-opt.is-light,
html.theme-mode-dark body.dl-page .dl-theme-opt.is-dark {
    background: var(--dl-toggle-on-bg);
    color: var(--dl-toggle-on-text);
}

/* area principal: texto, DANFE e acesso */
body.dl-page .dl-main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, clamp(560px, 48vw, 700px));
    grid-template-areas: "hero stage";
    column-gap: 40px;
    row-gap: 32px;
    align-items: start;
    align-content: start;
}

body.dl-page .dl-eyebrow {
    display: block;
    color: var(--dl-accent);
    font: 700 11px "Segoe UI", Tahoma, sans-serif;
    letter-spacing: 0.16em;
}

body.dl-page .dl-hero {
    grid-area: hero;
    min-width: 0;
    padding-top: 14px;
}

body.dl-page .dl-hero h1 {
    margin: 14px 0 0;
    color: var(--dl-strong);
    font: 700 clamp(2rem, 3.6vw, 3.25rem)/1.06 "Bahnschrift", "Segoe UI", sans-serif;
    letter-spacing: -0.015em;
}

body.dl-page .dl-hero h1 em {
    font-style: normal;
    background: var(--dl-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.dl-page .dl-lede {
    max-width: 560px;
    margin: 18px 0 0;
    color: var(--dl-muted);
    font-size: 16px;
    line-height: 1.55;
}

body.dl-page .dl-pillars {
    display: grid;
    gap: 12px;
    max-width: 580px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

body.dl-page .dl-pillars li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--dl-surface-border);
    border-radius: 14px;
    background: var(--dl-surface);
    box-shadow: var(--dl-surface-shadow);
    color: var(--dl-soft);
    font-size: 13px;
    line-height: 1.45;
}

body.dl-page .dl-pillars li strong {
    display: block;
    color: var(--dl-text);
    font: 700 15px "Bahnschrift", "Segoe UI", sans-serif;
}

body.dl-page .dl-pillar-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 10px;
    background: var(--tone-bg);
    color: var(--tone-fg);
}

body.dl-page .is-teal { --tone-bg: var(--dl-teal-bg); --tone-fg: var(--dl-teal-fg); --tone-step: var(--dl-step-teal); }
body.dl-page .is-blue { --tone-bg: var(--dl-blue-bg); --tone-fg: var(--dl-blue-fg); --tone-step: var(--dl-step-blue); }
body.dl-page .is-violet { --tone-bg: var(--dl-violet-bg); --tone-fg: var(--dl-violet-fg); --tone-step: var(--dl-step-violet); }
body.dl-page .is-amber { --tone-step: var(--dl-step-amber); }
body.dl-page .is-green { --tone-step: var(--dl-step-green); }

/* cartao de acesso */
body.dl-page .dl-card {
    grid-area: stage;
    justify-self: end;
    position: relative;
    z-index: 2;
    width: min(430px, 100%);
    padding: 36px 38px;
    border: 1px solid var(--dl-card-border);
    border-radius: 22px;
    background: var(--dl-card-bg);
    box-shadow: var(--dl-card-shadow);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

body.dl-page .dl-card h2 {
    margin: 10px 0 6px;
    color: var(--dl-strong);
    font: 700 28px "Bahnschrift", "Segoe UI", sans-serif;
}

body.dl-page .dl-card-sub {
    margin: 0 0 24px;
    color: var(--dl-soft);
}

body.dl-page .dl-alert {
    margin: 0 0 18px;
    padding: 11px 14px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

body.dl-page .dl-alert.is-error {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(254, 226, 226, 0.7);
    color: #991b1b;
}

body.dl-page .dl-alert.is-success {
    border-color: rgba(22, 163, 74, 0.3);
    background: rgba(220, 252, 231, 0.7);
    color: #166534;
}

html.theme-mode-dark body.dl-page .dl-alert.is-error {
    background: rgba(220, 38, 38, 0.12);
    color: #fca5a5;
}

html.theme-mode-dark body.dl-page .dl-alert.is-success {
    background: rgba(22, 163, 74, 0.12);
    color: #86efac;
}

body.dl-page .dl-form {
    display: grid;
    gap: 18px;
}

body.dl-page .dl-field {
    display: grid;
    gap: 7px;
    margin: 0;
    color: inherit;
    font-weight: 400;
}

body.dl-page .dl-label {
    color: var(--dl-text);
    font-size: 13px;
    font-weight: 600;
}

body.dl-page .dl-input {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 8px 0 14px;
    border: 1px solid var(--dl-input-border);
    border-radius: 12px;
    background: var(--dl-input-bg);
    color: var(--dl-placeholder);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.dl-page .dl-input:focus-within {
    border-color: var(--dl-focus-border);
    box-shadow: 0 0 0 4px var(--dl-focus);
    color: var(--dl-accent);
}

body.dl-page .dl-input input {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 6px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--dl-input-text);
    font-size: 15px;
    outline: none;
}

body.dl-page .dl-input input::placeholder {
    color: var(--dl-placeholder);
    opacity: 1;
}

body.dl-page .dl-input input:-webkit-autofill,
body.dl-page .dl-input input:-webkit-autofill:hover,
body.dl-page .dl-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--dl-input-text);
    box-shadow: 0 0 0 40px transparent inset;
    transition: background-color 9999s ease-in-out 0s;
}

body.dl-page .dl-eye {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-height: 0;
    flex: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    color: var(--dl-soft);
    cursor: pointer;
}

body.dl-page .dl-eye:hover,
body.dl-page .dl-eye:focus-visible {
    background: var(--dl-focus);
    color: var(--dl-text);
    outline: none;
}

body.dl-page .dl-eye .dl-eye-hide,
body.dl-page .dl-eye[aria-pressed="true"] .dl-eye-show {
    display: none;
}

body.dl-page .dl-eye[aria-pressed="true"] .dl-eye-hide {
    display: grid;
}

body.dl-page .dl-eye-show {
    display: grid;
}

body.dl-page .dl-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    min-height: 0;
    margin: 4px 0 0;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--dl-btn);
    box-shadow: var(--dl-btn-shadow);
    color: #ffffff;
    font: 700 15px "Segoe UI", Tahoma, sans-serif;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

body.dl-page .dl-submit .dl-ic {
    width: 16px;
    height: 16px;
    transition: transform 0.18s ease;
}

body.dl-page .dl-submit:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

body.dl-page .dl-submit:hover .dl-ic {
    transform: translateX(3px);
}

body.dl-page .dl-submit:focus-visible {
    outline: 3px solid var(--dl-focus-border);
    outline-offset: 3px;
}

body.dl-page .dl-help {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--dl-line);
    color: var(--dl-soft);
    font-size: 13px;
    line-height: 1.45;
}

body.dl-page .dl-help .dl-ic {
    color: var(--dl-accent);
}

body.dl-page .dl-help p {
    margin: 0;
}

body.dl-page .dl-help strong {
    display: block;
    color: var(--dl-text);
}

/* DANFE ilustrativo */
body.dl-page .dl-danfe {
    grid-area: stage;
    justify-self: start;
    align-self: start;
    position: relative;
    z-index: 1;
    width: min(360px, 62%);
    margin: 42px 0 0 -24px;
    opacity: var(--dl-paper-opacity);
}

body.dl-page .dl-danfe-paper {
    position: relative;
    padding: 20px 20px 120px;
    border: 1px solid var(--dl-paper-border);
    border-radius: 6px;
    background: var(--dl-paper);
    box-shadow: var(--dl-paper-shadow);
    color: #334155;
    font-size: 9.5px;
    line-height: 1.35;
    transform: rotate(-7deg);
}

body.dl-page .dl-danfe-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    border: 1px solid #94a3b8;
}

body.dl-page .dl-danfe-head > div {
    padding: 8px;
}

body.dl-page .dl-danfe-head b {
    display: block;
    font-size: 11px;
}

body.dl-page .dl-danfe-num {
    border-left: 1px solid #94a3b8;
    text-align: center;
    font: 800 15px "Bahnschrift", "Segoe UI", sans-serif;
}

body.dl-page .dl-danfe-num small {
    display: block;
    font-size: 10px;
    font-weight: 600;
}

body.dl-page .dl-danfe-bars {
    height: 38px;
    margin: 10px 0 4px;
    background: repeating-linear-gradient(90deg, #1e293b 0 2px, transparent 2px 4px, #1e293b 4px 5px, transparent 5px 8px, #1e293b 8px 11px, transparent 11px 12px);
}

body.dl-page .dl-danfe-key {
    text-align: center;
    font: 600 10px Consolas, "Courier New", monospace;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
}

body.dl-page .dl-danfe-paper > i {
    display: block;
    width: 100%;
    height: 9px;
    margin-top: 9px;
    border-radius: 2px;
    background: var(--dl-paper-line);
}

body.dl-page .dl-danfe-total {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px solid #94a3b8;
    font: 700 12px "Segoe UI", Tahoma, sans-serif;
}

body.dl-page .dl-danfe-stamp {
    position: absolute;
    left: 40px;
    bottom: 44px;
    padding: 6px 14px;
    border: 3px solid #0f766e;
    border-radius: 8px;
    color: #0f766e;
    font: 800 18px "Bahnschrift", "Segoe UI", sans-serif;
    letter-spacing: 0.14em;
    opacity: 0.85;
    transform: rotate(-14deg);
}

/* caminho da nota */
body.dl-page .dl-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.dl-page .dl-steps li {
    position: relative;
    padding: 30px 24px 0 0;
    border-top: 1px solid var(--dl-line);
    color: var(--dl-soft);
    font-size: 12.5px;
    line-height: 1.4;
}

body.dl-page .dl-steps li::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--tone-step);
    box-shadow: 0 0 0 5px var(--dl-bg);
}

body.dl-page .dl-steps small {
    display: block;
    color: var(--tone-step);
    font: 700 11px "Segoe UI", Tahoma, sans-serif;
    letter-spacing: 0.14em;
}

body.dl-page .dl-steps strong {
    display: block;
    margin: 4px 0 3px;
    color: var(--dl-text);
    font: 700 15px "Bahnschrift", "Segoe UI", sans-serif;
}

/* tablet: acesso primeiro, DANFE ao lado, texto abaixo */
@media (max-width: 1100px) {
    body.dl-page .dl-wrap {
        padding: 26px 32px 36px;
    }

    body.dl-page .dl-main {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "card danfe"
            "hero hero";
    }

    body.dl-page .dl-card {
        grid-area: card;
        justify-self: stretch;
        width: auto;
        max-width: 480px;
    }

    body.dl-page .dl-danfe {
        grid-area: danfe;
        justify-self: center;
        width: min(320px, 92%);
        margin: 24px 0 0;
    }

    body.dl-page .dl-hero {
        padding-top: 0;
    }

    body.dl-page .dl-hero h1 {
        font-size: clamp(2rem, 5vw, 2.75rem);
    }

    body.dl-page .dl-lede,
    body.dl-page .dl-pillars {
        max-width: none;
    }

    body.dl-page .dl-steps {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        row-gap: 26px;
    }
}

/* celular: formulario primeiro, tudo em uma coluna */
@media (max-width: 720px) {
    body.dl-page .dl-keys span {
        font-size: 34px;
    }

    body.dl-page .dl-wrap {
        gap: 28px;
        padding: 18px 16px 32px;
    }

    body.dl-page .dl-notice {
        order: 3;
        flex-basis: 100%;
        max-width: none;
        margin-left: 0;
        border-radius: 14px;
    }

    body.dl-page .dl-theme {
        order: 2;
        margin-left: auto;
    }

    body.dl-page .dl-main {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "card"
            "hero"
            "danfe";
    }

    body.dl-page .dl-card {
        max-width: none;
        padding: 26px 22px;
        border-radius: 18px;
    }

    body.dl-page .dl-card h2 {
        font-size: 24px;
    }

    body.dl-page .dl-danfe {
        width: min(300px, 86%);
        margin: 4px 0 18px;
    }

    body.dl-page .dl-danfe-paper {
        transform: rotate(-4deg);
    }

    body.dl-page .dl-lede {
        font-size: 15px;
    }

    body.dl-page .dl-steps {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0;
    }

    body.dl-page .dl-steps li {
        padding: 0 0 18px 26px;
        border-top: 0;
        border-left: 1px solid var(--dl-line);
    }

    body.dl-page .dl-steps li:last-child {
        padding-bottom: 0;
        border-left-color: transparent;
    }

    body.dl-page .dl-steps li::before {
        top: 2px;
        left: -6px;
    }
}

@media (max-width: 380px) {
    body.dl-page .dl-card {
        padding: 22px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.dl-page .dl-submit,
    body.dl-page .dl-submit .dl-ic,
    body.dl-page .dl-input,
    body.dl-page .dl-theme-opt {
        transition: none;
    }
}

body.theme-legacy-nfe .layout-shell {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 220px),
        radial-gradient(circle at 12% 0%, rgba(45, 212, 191, 0.08), transparent 28%),
        radial-gradient(circle at 88% 4%, rgba(37, 99, 235, 0.08), transparent 30%),
        linear-gradient(135deg, #07111a 0%, #09141f 48%, #050c13 100%);
}

body.theme-legacy-nfe .sidebar {
    padding: 18px 14px 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 120px),
        radial-gradient(circle at 16% 0%, rgba(45, 212, 191, 0.12), transparent 30%),
        radial-gradient(circle at 100% 8%, rgba(37, 99, 235, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(8, 19, 31, 0.98) 0%, rgba(5, 13, 22, 0.98) 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 22px 0 60px rgba(0, 0, 0, 0.18);
}

body.theme-legacy-nfe .sidebar-top {
    gap: 16px;
}

body.theme-legacy-nfe .brand-card {
    padding: 0;
}

body.theme-legacy-nfe .brand-heading {
    padding: 0 6px;
    align-items: center;
    gap: 10px;
}

body.theme-legacy-nfe .brand-title-group {
    gap: 2px;
}

body.theme-legacy-nfe .brand-card h1 {
    color: #2dd4bf;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .brand-subtitle {
    color: #97a9bd;
    font-size: 0.78rem;
    line-height: 1.25;
}

body.theme-legacy-nfe .theme-toggle-button-brand {
    min-width: 78px;
    height: 36px;
    padding: 0 12px;
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

body.theme-legacy-nfe .sidebar-client-card {
    gap: 8px;
    margin-top: 8px;
    padding: 14px 14px 12px;
    border-radius: 22px;
}

body.theme-legacy-nfe .sidebar-client-card-premium {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 110px),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 44%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.18), transparent 38%),
        linear-gradient(180deg, rgba(14, 26, 42, 0.96) 0%, rgba(9, 18, 30, 0.92) 100%);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 24px 52px rgba(0, 0, 0, 0.22);
}

body.theme-legacy-nfe .sidebar-client-label {
    color: #a9f3e8;
    font-size: 0.68rem;
    font-weight: 800;
}

body.theme-legacy-nfe .sidebar-client-card strong {
    font-size: 1.14rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

body.theme-legacy-nfe .sidebar-client-card small {
    color: #a3b3c6;
    font-size: 0.8rem;
}

body.theme-legacy-nfe .sidebar-client-datetime {
    color: #dfeaf7;
    font-weight: 700;
    font-size: 0.78rem;
}

body.theme-legacy-nfe .sidebar-loja-switch-select {
    height: 38px;
    border-radius: 12px;
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: #eef5ff;
    font-size: 0.76rem;
}

body.theme-legacy-nfe .sidebar-client-actions {
    margin-top: 4px;
    gap: 8px;
}

body.theme-legacy-nfe .sidebar-client-badge,
body.theme-legacy-nfe .sidebar-client-logout {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 800;
}

body.theme-legacy-nfe .sidebar-client-badge {
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.2);
    color: #b4fff3;
}

body.theme-legacy-nfe .sidebar-client-logout {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

body.theme-legacy-nfe .sidebar-nav {
    gap: 13px;
}

body.theme-legacy-nfe .nav-group {
    gap: 6px;
}

body.theme-legacy-nfe .nav-title {
    color: #8fa5bc;
    font-size: 0.61rem;
    letter-spacing: 0.18em;
    padding: 0 8px;
}

body.theme-legacy-nfe .sidebar-nav a {
    padding: 9px 13px;
    border-radius: 13px;
    color: #9db0c4;
    border-color: rgba(148, 163, 184, 0.08);
    font-size: 0.89rem;
}

body.theme-legacy-nfe .sidebar-nav a:hover {
    color: #f4fbff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.14);
    transform: translateX(2px);
}

body.theme-legacy-nfe .sidebar-nav a.active {
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(45, 212, 191, 0.16), rgba(37, 99, 235, 0.18)),
        rgba(255, 255, 255, 0.05);
    border-color: rgba(96, 165, 250, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 26px rgba(37, 99, 235, 0.12);
}

body.theme-legacy-nfe .content {
    padding: 20px 24px 28px;
}

body.theme-legacy-nfe .topbar {
    padding: 0 0 18px;
    margin-bottom: 4px;
}

body.theme-legacy-nfe .search-shell,
body.theme-legacy-nfe .topbar-profile,
body.theme-legacy-nfe .topbar,
body.theme-legacy-nfe .active-loja-banner,
body.theme-legacy-nfe .legacy-board,
body.theme-legacy-nfe .legacy-summary-card,
body.theme-legacy-nfe .legacy-table-panel {
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.theme-legacy-nfe .topbar {
    border-radius: 26px;
    padding: 18px 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 120px),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.08), transparent 38%),
        linear-gradient(180deg, rgba(13, 26, 40, 0.92) 0%, rgba(9, 18, 30, 0.92) 100%);
}

body.theme-legacy-nfe .topbar-heading h2 {
    color: #f3f8ff;
    font-size: 2.1rem;
}

body.theme-legacy-nfe .topbar-heading p,
body.theme-legacy-nfe .search-text,
body.theme-legacy-nfe .topbar-profile span {
    color: #9cb0c3;
}

body.theme-legacy-nfe .search-shell,
body.theme-legacy-nfe .topbar-profile {
    min-height: 58px;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.14);
}

body.theme-legacy-nfe .search-kbd {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(148, 163, 184, 0.12);
    color: #d3ddeb;
}

body.theme-legacy-nfe .avatar {
    background: linear-gradient(135deg, #14b8a6, #2563eb);
}

body.theme-legacy-nfe .active-loja-banner {
    padding: 12px 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 110px),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 44%),
        linear-gradient(180deg, rgba(13, 25, 39, 0.92) 0%, rgba(8, 17, 28, 0.92) 100%);
}

body.theme-legacy-nfe .active-loja-banner-label,
body.theme-legacy-nfe .active-loja-banner-copy small,
body.theme-legacy-nfe .active-loja-banner-detail span {
    color: #97aabc;
}

body.theme-legacy-nfe .active-loja-banner-copy strong,
body.theme-legacy-nfe .active-loja-banner-detail strong {
    color: #f3f8ff;
}

body.theme-legacy-nfe .active-loja-banner-value-accent {
    color: #5b8df9;
}

body.theme-legacy-nfe .active-loja-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.14);
    color: #d7e5f4;
}

body.theme-legacy-nfe .active-loja-chip-primary {
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.2);
    color: #b7fff4;
}

body.theme-legacy-nfe .legacy-board,
body.theme-legacy-nfe .legacy-summary-card,
body.theme-legacy-nfe .legacy-table-panel {
    border-color: rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 120px),
        linear-gradient(180deg, rgba(13, 26, 40, 0.92) 0%, rgba(9, 18, 30, 0.92) 100%);
    box-shadow: 0 26px 56px rgba(0, 0, 0, 0.14);
}

body.theme-legacy-nfe .legacy-board {
    padding: 16px 18px 18px;
    margin-bottom: 14px;
}

body.theme-legacy-nfe .legacy-board-title,
body.theme-legacy-nfe .legacy-panel-title,
body.theme-legacy-nfe .legacy-summary-label {
    color: #93a9bd;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-panel-title {
    top: 0;
    background: transparent;
    padding: 0;
    margin-bottom: 14px;
}

body.theme-legacy-nfe .legacy-row span,
body.theme-legacy-nfe .legacy-summary-card small {
    color: #9db2c6;
    font-size: 0.78rem;
}

body.theme-legacy-nfe .legacy-row strong {
    color: #f4f8ff;
    font-size: 0.84rem;
    font-weight: 700;
}

body.theme-legacy-nfe .legacy-summary-grid {
    gap: 14px;
    margin-bottom: 14px;
}

body.theme-legacy-nfe .legacy-nfe-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

body.theme-legacy-nfe .legacy-summary-card {
    padding: 16px 18px 14px;
}

body.theme-legacy-nfe .legacy-summary-card strong {
    color: #ffffff;
    font-size: 1.28rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

body.theme-legacy-nfe .legacy-summary-card-action {
    margin: 8px 0 6px;
}

body.theme-legacy-nfe .legacy-summary-card-form {
    margin: 0;
}

body.theme-legacy-nfe .legacy-summary-card-button {
    min-width: 0;
    width: 100%;
    height: 42px;
    border-color: rgba(14, 165, 233, 0.28);
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.96));
    color: #f8fbff;
    box-shadow: 0 16px 28px rgba(14, 165, 233, 0.18);
}

body.theme-legacy-nfe .legacy-summary-card-button:hover {
    border-color: rgba(56, 189, 248, 0.42);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.98), rgba(59, 130, 246, 0.98));
}

body.theme-legacy-nfe .legacy-actions-row {
    gap: 8px;
    margin-bottom: 14px;
}

body.theme-legacy-nfe .legacy-button {
    min-width: 148px;
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: #e9f2ff;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

body.theme-legacy-nfe .legacy-button-primary {
    border-color: rgba(37, 99, 235, 0.24);
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

body.theme-legacy-nfe .legacy-button-clean {
    min-width: 84px;
}

body.theme-mode-light.theme-legacy-nfe .layout-shell {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0) 240px),
        radial-gradient(circle at 12% 0%, rgba(15, 118, 110, 0.12), transparent 28%),
        radial-gradient(circle at 88% 4%, rgba(37, 99, 235, 0.1), transparent 30%),
        linear-gradient(135deg, #edf4f8 0%, #f7fbfd 46%, #edf4f8 100%);
}

body.theme-mode-light.theme-legacy-nfe .sidebar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.42) 120px),
        radial-gradient(circle at 16% 0%, rgba(15, 118, 110, 0.1), transparent 30%),
        radial-gradient(circle at 100% 8%, rgba(37, 99, 235, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(244, 249, 255, 0.96) 0%, rgba(234, 242, 252, 0.96) 100%);
    border-right-color: rgba(19, 47, 91, 0.08);
    box-shadow: 18px 0 40px rgba(26, 54, 93, 0.06);
}

body.theme-mode-light.theme-legacy-nfe .brand-card h1 {
    color: #0f766e;
}

body.theme-mode-light.theme-legacy-nfe .brand-subtitle,
body.theme-mode-light.theme-legacy-nfe .nav-title,
body.theme-mode-light.theme-legacy-nfe .active-loja-banner-label,
body.theme-mode-light.theme-legacy-nfe .legacy-board-title,
body.theme-mode-light.theme-legacy-nfe .legacy-panel-title,
body.theme-mode-light.theme-legacy-nfe .legacy-summary-label {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .theme-toggle-button-brand,
body.theme-mode-light.theme-legacy-nfe .sidebar-client-logout {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(19, 47, 91, 0.12);
    color: #284b7d;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-card-premium,
body.theme-mode-light.theme-legacy-nfe .active-loja-banner,
body.theme-mode-light.theme-legacy-nfe .topbar,
body.theme-mode-light.theme-legacy-nfe .legacy-board,
body.theme-mode-light.theme-legacy-nfe .legacy-summary-card,
body.theme-mode-light.theme-legacy-nfe .legacy-table-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 255, 0.9) 100%);
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: 0 18px 44px rgba(26, 54, 93, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-label,
body.theme-mode-light.theme-legacy-nfe .sidebar-client-card small,
body.theme-mode-light.theme-legacy-nfe .legacy-row span,
body.theme-mode-light.theme-legacy-nfe .legacy-summary-card small,
body.theme-mode-light.theme-legacy-nfe .topbar-heading p,
body.theme-mode-light.theme-legacy-nfe .search-text,
body.theme-mode-light.theme-legacy-nfe .topbar-profile span {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-label [data-server-greeting],
body.theme-mode-light.theme-legacy-nfe .sidebar-client-card strong,
body.theme-mode-light.theme-legacy-nfe .sidebar-client-datetime,
body.theme-mode-light.theme-legacy-nfe .active-loja-banner-copy strong,
body.theme-mode-light.theme-legacy-nfe .topbar-heading h2,
body.theme-mode-light.theme-legacy-nfe .legacy-row strong,
body.theme-mode-light.theme-legacy-nfe .legacy-summary-card strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-loja-switch-select,
body.theme-mode-light.theme-legacy-nfe .search-shell,
body.theme-mode-light.theme-legacy-nfe .topbar-profile,
body.theme-mode-light.theme-legacy-nfe .active-loja-chip,
body.theme-mode-light.theme-legacy-nfe .legacy-button {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(19, 47, 91, 0.1);
    color: #172b4d;
}

body.theme-legacy-nfe .legacy-button.legacy-sincronia-force-button,
body.theme-legacy-nfe .legacy-button.legacy-sincronia-log-button {
    width: auto;
    min-width: 0;
    height: 20px;
    min-height: 20px;
    padding: 0 7px;
    border: 1px solid rgba(127, 164, 210, 0.24);
    border-radius: 6px;
    background: rgba(31, 52, 78, 0.46);
    color: #b9cbe3;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: none;
}

body.theme-legacy-nfe .legacy-button.legacy-sincronia-force-button:hover,
body.theme-legacy-nfe .legacy-button.legacy-sincronia-force-button:focus-visible,
body.theme-legacy-nfe .legacy-button.legacy-sincronia-log-button:hover,
body.theme-legacy-nfe .legacy-button.legacy-sincronia-log-button:focus-visible {
    border-color: rgba(92, 188, 244, 0.44);
    background: rgba(35, 76, 116, 0.62);
    color: #e3f5ff;
}

body.theme-legacy-nfe .legacy-button.legacy-sincronia-log-button:disabled {
    opacity: 0.42;
}

body.theme-mode-light.theme-legacy-nfe .legacy-summary-card-button {
    border-color: rgba(14, 165, 233, 0.24);
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #ffffff;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.16);
}

body.theme-mode-light.theme-legacy-nfe .sidebar-nav a {
    color: #5c7188;
    border-color: rgba(19, 47, 91, 0.04);
}

body.theme-mode-light.theme-legacy-nfe .sidebar-nav a:hover {
    color: #172b4d;
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .sidebar-nav a.active {
    color: #0f2e55;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(37, 99, 235, 0.1));
    border-color: rgba(37, 99, 235, 0.14);
}

body.theme-mode-light.theme-legacy-nfe .active-loja-chip-primary,
body.theme-mode-light.theme-legacy-nfe .sidebar-client-badge {
    background: rgba(15, 118, 110, 0.08);
    border-color: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

body.theme-mode-light.theme-legacy-nfe .legacy-button-primary {
    color: #ffffff;
    border-color: rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-panel {
    overflow: visible;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-grid {
    display: grid;
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-form-card,
body.theme-legacy-nfe.theme-contas-page .legacy-contas-table-shell {
    padding: 16px 18px 18px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-form-head {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-form-head strong {
    color: #f4f8ff;
    font-size: 0.96rem;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-import-box {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(18, 35, 55, 0.86) 0%, rgba(11, 21, 34, 0.92) 100%);
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-import-copy {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-import-copy strong {
    color: #f4f8ff;
    font-size: 0.9rem;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-import-copy small {
    color: #98aec5;
    font-size: 0.76rem;
    line-height: 1.45;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-import-form {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-import-form .legacy-button {
    min-width: 150px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-import-file input[type="file"] {
    padding: 10px 12px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-col-span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe.theme-contas-page #legacyContaBancoCustomWrap.is-hidden {
    display: none;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-form-actions {
    margin-top: 14px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-filters {
    margin-bottom: 14px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-field-busca {
    min-width: 0;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-actions .legacy-inline-form {
    margin: 0;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-actions .legacy-button {
    min-width: 110px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-table td strong {
    display: block;
    color: #f4f8ff;
    font-size: 0.84rem;
    font-weight: 700;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-table td span {
    display: block;
    margin-top: 4px;
    color: #96a9bc;
    font-size: 0.74rem;
}

body.theme-mode-light.theme-legacy-nfe.theme-contas-page .legacy-contas-form-head strong,
body.theme-mode-light.theme-legacy-nfe.theme-contas-page .legacy-contas-table td strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe.theme-contas-page .legacy-contas-import-box {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.92) 100%);
    border-color: rgba(37, 99, 235, 0.14);
}

body.theme-mode-light.theme-legacy-nfe.theme-contas-page .legacy-contas-import-copy strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe.theme-contas-page .legacy-contas-import-copy small {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe.theme-contas-page .legacy-contas-table td span {
    color: #566a82;
}

@media (max-width: 1380px) {
    body.theme-legacy-nfe.theme-contas-page .legacy-contas-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe.theme-contas-page .legacy-contas-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    body.theme-legacy-nfe.theme-contas-page .legacy-contas-import-form,
    body.theme-legacy-nfe.theme-contas-page .legacy-contas-form-grid,
    body.theme-legacy-nfe.theme-contas-page .legacy-contas-summary-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe.theme-contas-page .legacy-contas-col-span-2 {
        grid-column: auto;
    }
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-panel {
    overflow: visible;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-shell {
    margin-bottom: 14px;
    padding: 16px 18px 18px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-head .legacy-button {
    min-width: 132px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 12px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-modal {
    width: min(700px, calc(100vw - 24px));
    max-width: min(700px, calc(100vw - 24px));
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-modal .legacy-status-modal-head {
    justify-content: flex-start;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-modal-body {
    display: grid;
    gap: 14px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-modal-form {
    display: grid;
    gap: 14px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-modal-span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table td {
    vertical-align: middle;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table td strong,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table td span {
    margin-top: 0;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-filters {
    margin-bottom: 14px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-field-conta,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-field-busca {
    min-width: 0;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-grid {
    display: grid;
    grid-template-columns: minmax(340px, 500px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-card,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-table-shell {
    padding: 16px 18px 18px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-form-head {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-form-head strong {
    color: #f4f8ff;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.45;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-box,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-card {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(18, 35, 55, 0.86) 0%, rgba(11, 21, 34, 0.92) 100%);
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-card {
    margin-top: 0;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-modal {
    width: min(1320px, calc(100vw - 24px));
    max-width: min(1320px, calc(100vw - 24px));
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-modal .legacy-status-modal-head {
    justify-content: flex-start;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-modal .legacy-status-modal-body {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-modal-body {
    gap: 12px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-copy {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-copy strong {
    color: #f4f8ff;
    font-size: 0.9rem;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-copy small {
    color: #98aec5;
    font-size: 0.76rem;
    line-height: 1.45;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-form .legacy-button {
    min-width: 148px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-file input[type="file"] {
    padding: 10px 12px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-meta .legacy-summary-card {
    min-width: 0;
    min-height: 118px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-meta .legacy-summary-card strong {
    font-size: 1.32rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-meta .legacy-summary-card small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-warning-box {
    display: grid;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(120, 53, 15, 0.22);
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-warning-box p {
    margin: 0;
    color: #fde7bf;
    font-size: 0.75rem;
    line-height: 1.45;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(120, 53, 15, 0.22);
    color: #fde7bf;
    font-size: 0.73rem;
    font-weight: 700;
    line-height: 1.2;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-flow-status-muted {
    color: #cbd5e1;
    background: rgba(71, 85, 105, 0.32);
    border-color: rgba(148, 163, 184, 0.22);
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-select {
    width: 100%;
    min-width: 190px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-hint {
    display: block;
    margin-top: 6px;
    color: #7dd3fc;
    font-size: 0.72rem;
    line-height: 1.35;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-table-wrap {
    max-height: 460px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-actions {
    margin-top: 2px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-inline-action {
    margin: 0;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-empty-state {
    display: grid;
    gap: 10px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-empty-state strong {
    color: #f4f8ff;
    font-size: 0.96rem;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-empty-state p {
    margin: 0;
    color: #98aec5;
    font-size: 0.8rem;
    line-height: 1.5;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-table td strong {
    display: block;
    color: #f4f8ff;
    font-size: 0.84rem;
    font-weight: 700;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-table td span {
    display: block;
    margin-top: 4px;
    color: #96a9bc;
    font-size: 0.74rem;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-loading-modal {
    width: min(460px, calc(100vw - 24px));
    max-width: min(460px, calc(100vw - 24px));
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-loading-modal .legacy-status-modal-head {
    justify-content: flex-start;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-loading-body {
    gap: 12px;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-shell {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(18, 35, 55, 0.78) 0%, rgba(11, 21, 34, 0.86) 100%);
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-shell.is-complete {
    border-color: rgba(45, 212, 191, 0.24);
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-head span {
    color: #93a9bd;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-head strong {
    color: #f4f8ff;
    font-size: 0.88rem;
    font-weight: 800;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-track {
    position: relative;
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.92), rgba(37, 99, 235, 0.96));
    transition: width 0.24s ease;
}

body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-shell small {
    color: #bfd2ed;
    font-size: 0.76rem;
    line-height: 1.45;
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-form-head strong,
body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-table td strong,
body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-empty-state strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-box,
body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.92) 100%);
    border-color: rgba(37, 99, 235, 0.14);
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-copy strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-copy small,
body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-empty-state p,
body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-table td span {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-pill {
    background: rgba(255, 247, 237, 0.98);
    border-color: rgba(245, 158, 11, 0.2);
    color: #9a6700;
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-flow-status-muted {
    color: #475569;
    background: rgba(226, 232, 240, 0.96);
    border-color: rgba(148, 163, 184, 0.26);
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-hint {
    color: #1d4ed8;
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-warning-box {
    background: rgba(255, 247, 237, 0.95);
    border-color: rgba(245, 158, 11, 0.18);
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-warning-box p {
    color: #9a6700;
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.92) 100%);
    border-color: rgba(37, 99, 235, 0.14);
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-head strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-progress-shell small {
    color: #566a82;
}

@media (max-width: 1500px) {
    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-import-form,
    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-meta {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-head {
        flex-direction: column;
        align-items: stretch;
    }

    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-meta {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-modal-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-modal-span-2 {
        grid-column: auto;
    }

    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-preview-modal {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
    }
}

@media (max-width: 860px) {
    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-summary-grid {
        grid-template-columns: 1fr;
    }
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-header {
    align-items: center;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(230px, 1.5fr) repeat(3, minmax(140px, 0.8fr));
    margin-bottom: 14px;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-search {
    min-width: 230px;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-batch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
    padding: 11px 14px;
    border: 1px solid rgba(88, 125, 173, 0.22);
    border-radius: 16px;
    background: rgba(10, 23, 38, 0.78);
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-batch-bar > div:first-child {
    display: grid;
    gap: 3px;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-batch-bar strong {
    color: #f4f8ff;
    font-size: 0.86rem;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-batch-bar span {
    color: #93a9bd;
    font-size: 0.74rem;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table-shell {
    padding: 0;
    overflow: hidden;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table th,
body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table td {
    vertical-align: middle;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-check {
    width: 42px;
    min-width: 42px;
    text-align: center;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-check input {
    width: 17px;
    height: 17px;
    accent-color: #2dd4bf;
    cursor: pointer;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-row-action {
    min-width: 92px;
    min-height: 34px;
    padding: 7px 12px;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-modal {
    width: min(560px, calc(100vw - 24px));
    max-width: min(560px, calc(100vw - 24px));
    border-radius: 18px;
    overflow: hidden;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-modal textarea {
    width: 100%;
    min-height: 86px;
    padding: 11px 12px;
    resize: vertical;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #eef5ff;
}

body.theme-mode-light.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-batch-bar {
    background: rgba(241, 247, 255, 0.94);
    border-color: rgba(37, 99, 235, 0.14);
}

body.theme-mode-light.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-batch-bar strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-batch-bar span {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-modal textarea {
    background: #ffffff;
    color: #172b4d;
}

@media (max-width: 1500px) {
    body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-filters {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }
}

@media (max-width: 980px) {
    body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-batch-bar {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-filters {
        grid-template-columns: 1fr;
    }
}

/* Grade principal da NF-e: classificacao separada e uma unica linha por nota. */
body.theme-legacy-nfe .legacy-table.legacy-nfe-table {
    width: 100% !important;
    min-width: 1360px !important;
    table-layout: fixed !important;
}

body.theme-legacy-nfe .legacy-nfe-table thead th,
body.theme-legacy-nfe .legacy-nfe-table tbody td {
    box-sizing: border-box;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    vertical-align: middle;
    line-height: 1.2 !important;
}

body.theme-legacy-nfe .legacy-nfe-table tbody td {
    height: 38px;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-cnpj {
    width: calc(15ch + 10px) !important;
    min-width: calc(15ch + 10px) !important;
    max-width: calc(15ch + 10px) !important;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-numero {
    width: 10ch !important;
    min-width: 10ch !important;
    max-width: 10ch !important;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-fornecedor {
    width: calc(65ch + 10px) !important;
    min-width: calc(65ch + 10px) !important;
    max-width: calc(65ch + 10px) !important;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-setor {
    width: 16ch !important;
    min-width: 16ch !important;
    max-width: 16ch !important;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-nfe-col-sub-setor {
    width: 22ch !important;
    min-width: 22ch !important;
    max-width: 22ch !important;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-nfe-col-origem {
    width: 8ch !important;
    min-width: 8ch !important;
    max-width: 8ch !important;
    text-align: center;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-valor {
    width: 12ch !important;
    min-width: 12ch !important;
    max-width: 12ch !important;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-data {
    width: 16ch !important;
    min-width: 16ch !important;
    max-width: 16ch !important;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-status-fluxo {
    width: 14ch !important;
    min-width: 14ch !important;
    max-width: 14ch !important;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-boleto {
    width: 8ch !important;
    min-width: 8ch !important;
    max-width: 8ch !important;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-chave {
    width: 45ch !important;
    min-width: 45ch !important;
    max-width: 45ch !important;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px !important;
    letter-spacing: 0;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-chave.legacy-col-responsavel {
    width: 24ch !important;
    min-width: 24ch !important;
    max-width: 24ch !important;
    font-family: inherit;
}

body.theme-legacy-nfe .legacy-nfe-table .legacy-col-acoes {
    width: 6ch !important;
    min-width: 6ch !important;
    max-width: 6ch !important;
    overflow: visible !important;
}

body.theme-legacy-nfe .legacy-nfe-origin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5ch;
    min-height: 18px;
    padding: 0 5px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

body.theme-legacy-nfe .legacy-nfe-origin-automatico {
    border-color: rgba(63, 143, 255, 0.3);
    background: rgba(63, 143, 255, 0.14);
    color: #9ac4ff;
}

body.theme-legacy-nfe .legacy-nfe-origin-manual {
    border-color: rgba(56, 199, 121, 0.3);
    background: rgba(56, 199, 121, 0.14);
    color: #8ef0b3;
}

body.theme-legacy-nfe .legacy-nfe-origin-cancelada {
    border-color: rgba(248, 113, 113, 0.36);
    background: rgba(127, 29, 29, 0.28);
    color: #fca5a5;
}

body.theme-legacy-nfe .legacy-nfe-origin-migracao {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.14);
    color: #f8c968;
}

body.theme-legacy-nfe .legacy-nfe-origin-recuperacao {
    border-color: rgba(167, 139, 250, 0.3);
    background: rgba(167, 139, 250, 0.14);
    color: #c6b7ff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfe-origin-automatico {
    border-color: rgba(54, 102, 181, 0.18);
    background: #eaf2ff;
    color: #3666b5;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfe-origin-manual {
    border-color: rgba(29, 157, 87, 0.18);
    background: #e7faef;
    color: #1d9d57;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfe-origin-cancelada {
    border-color: rgba(185, 28, 28, 0.2);
    background: #fee2e2;
    color: #b91c1c;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfe-origin-migracao {
    border-color: rgba(180, 112, 0, 0.2);
    background: #fff6dc;
    color: #a56300;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfe-origin-recuperacao {
    border-color: rgba(103, 80, 164, 0.2);
    background: #f3efff;
    color: #6750a4;
}

/* Provisao de contas a pagar */
body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-page {
    display: grid;
    gap: 14px;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    overflow: hidden;
    background:
        radial-gradient(circle at 90% 15%, rgba(45, 212, 191, 0.12), transparent 32%),
        linear-gradient(135deg, rgba(16, 31, 48, 0.98), rgba(10, 23, 38, 0.98));
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-hero h2 {
    margin: 4px 0 5px;
    color: #f4f8ff;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-hero p {
    max-width: 720px;
    margin: 0;
    color: #9fb2c8;
    font-size: 0.78rem;
    line-height: 1.55;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-store-chip,
body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-store-note {
    display: grid;
    gap: 3px;
    min-width: min(300px, 100%);
    padding: 12px 14px;
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 14px;
    background: rgba(8, 28, 40, 0.72);
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-store-chip span,
body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-store-note span {
    color: #71dccc;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-store-chip strong,
body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-store-note strong {
    color: #f4f8ff;
    font-size: 0.86rem;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-store-chip small,
body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-store-note small {
    color: #8fa7c2;
    font-size: 0.67rem;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-panel {
    min-width: 0;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-panel .legacy-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-filters {
    grid-template-columns: repeat(6, minmax(150px, 1fr)) minmax(280px, auto);
    align-items: end;
    margin: 12px 0;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-filters.has-loja-filter {
    grid-template-columns: repeat(7, minmax(135px, 1fr)) minmax(280px, auto);
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-filters .legacy-filter-buttons {
    grid-column: auto;
    justify-self: end;
    align-self: end;
    flex-wrap: nowrap;
    width: max-content;
    margin-top: 0;
    padding-left: 0;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-table {
    min-width: 1120px;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-table td:first-child strong {
    display: block;
    color: #edf5ff;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-cell-note {
    display: block;
    max-width: 320px;
    margin-top: 3px;
    overflow: hidden;
    color: #8fa7c2;
    font-size: 0.64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-table td > small {
    color: #8fa7c2;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-table form {
    margin: 0;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-modal {
    width: min(760px, calc(100vw - 28px));
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-store-note {
    margin-bottom: 14px;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-grid .span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-grid [hidden] {
    display: none !important;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-checkline {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(45, 212, 191, 0.18);
    border-radius: 14px;
    background: rgba(20, 184, 166, 0.06);
    cursor: pointer;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-checkline input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2dd4bf;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-checkline span {
    display: grid;
    gap: 2px;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-checkline strong {
    color: #eaf4ff;
    font-size: 0.76rem;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-checkline small {
    color: #8fa7c2;
    font-size: 0.63rem;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-preview {
    margin-top: 14px;
    padding: 10px 12px;
    border-left: 3px solid #2dd4bf;
    border-radius: 0 10px 10px 0;
    background: rgba(45, 212, 191, 0.07);
    color: #a9bdd2;
    font-size: 0.69rem;
}

body.theme-legacy-nfe.theme-provisoes-page button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-row-menu-item.is-danger {
    color: #fda4af;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-row-menu-item.is-danger:hover {
    background: rgba(225, 29, 72, 0.14);
    color: #fecdd3;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-delete-modal {
    width: min(560px, calc(100vw - 28px));
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-delete-modal p {
    margin: 0;
    color: #dce8f6;
    line-height: 1.55;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-delete-modal small {
    display: block;
    margin-top: 12px;
    color: #8fa7c2;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-delete-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-button-danger {
    border-color: rgba(244, 63, 94, 0.35);
    background: rgba(190, 24, 93, 0.18);
    color: #fecdd3;
}

body.theme-legacy-nfe.theme-provisoes-page .legacy-button-danger:hover {
    background: rgba(225, 29, 72, 0.28);
}

body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-hero {
    background:
        radial-gradient(circle at 90% 15%, rgba(13, 148, 136, 0.12), transparent 32%),
        linear-gradient(135deg, #f8fbff, #edf5f7);
}

body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-hero h2,
body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-store-chip strong,
body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-store-note strong,
body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-table td:first-child strong,
body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-checkline strong {
    color: #172033;
}

body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-store-chip,
body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-store-note,
body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-checkline {
    background: rgba(255, 255, 255, 0.82);
}

body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-delete-modal p {
    color: #172033;
}

body.theme-mode-light.theme-legacy-nfe.theme-provisoes-page .legacy-row-menu-item.is-danger {
    color: #be123c;
}

@media (max-width: 1050px) {
    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1420px) {
    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-filters,
    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-filters.has-loja-filter {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-filters .legacy-filter-buttons {
        grid-column: 1 / -1;
        justify-self: end;
    }
}

@media (max-width: 720px) {
    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-hero,
    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-panel .legacy-panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-summary,
    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-filters,
    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-grid .span-2 {
        grid-column: span 1;
    }

    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-filters .legacy-filter-buttons {
        grid-column: 1;
        justify-self: stretch;
        flex-wrap: wrap;
        width: 100%;
    }

    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisoes-filters .legacy-filter-buttons .legacy-button {
        flex: 1 1 110px;
        justify-content: center;
    }

    body.theme-legacy-nfe.theme-provisoes-page .legacy-provisao-delete-options {
        grid-template-columns: 1fr;
    }
}

body.theme-legacy-nfe .legacy-actions-row {
    flex-wrap: wrap;
}

body.theme-legacy-nfe .legacy-filter-field {
    gap: 6px;
}

body.theme-legacy-nfe .legacy-filter-field span {
    min-height: auto;
    line-height: 1.2;
    color: #8fa5bc;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-filter-field input,
body.theme-legacy-nfe .legacy-filter-field select {
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #eef5ff;
    font-size: 0.82rem;
    line-height: 1;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.theme-legacy-nfe .legacy-filter-field select {
    background: rgba(255, 255, 255, 0.055);
}

body.theme-legacy-nfe .legacy-filter-field input:hover,
body.theme-legacy-nfe .legacy-filter-field select:hover {
    border-color: rgba(96, 165, 250, 0.22);
    background: rgba(255, 255, 255, 0.075);
}

body.theme-legacy-nfe .legacy-filter-field input:focus,
body.theme-legacy-nfe .legacy-filter-field select:focus {
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
    transform: translateY(-1px);
}

body.theme-legacy-nfe .legacy-filter-buttons {
    gap: 10px;
    min-height: 38px;
}

body.theme-legacy-nfe .legacy-status-modal {
    width: min(560px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 32px);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 120px),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.1), transparent 42%),
        linear-gradient(180deg, rgba(12, 24, 38, 0.98) 0%, rgba(8, 17, 28, 0.98) 100%);
    color: #ffffff;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.theme-legacy-nfe .legacy-status-modal-head,
body.theme-legacy-nfe .legacy-status-modal-actions {
    padding: 12px 14px;
    border-color: rgba(148, 163, 184, 0.14);
    flex: 0 0 auto;
}

body.theme-legacy-nfe .legacy-status-modal-head {
    background: rgba(255, 255, 255, 0.02);
}

body.theme-legacy-nfe .legacy-status-modal-head strong {
    color: #f3f8ff;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

body.theme-legacy-nfe .legacy-status-modal-body {
    gap: 12px;
    padding: 14px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

body.theme-legacy-nfe .legacy-status-modal-body p {
    color: #9db2c6;
    font-size: 0.82rem;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-choice-list {
    display: grid;
    gap: 8px;
}

body.theme-legacy-nfe .legacy-choice-item {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

body.theme-legacy-nfe .legacy-choice-item:hover {
    border-color: rgba(96, 149, 235, 0.32);
    background: rgba(31, 51, 80, 0.9);
}

body.theme-legacy-nfe .legacy-choice-item input[type="radio"] {
    margin: 2px 0 0;
    accent-color: #3b82f6;
}

body.theme-legacy-nfe .legacy-choice-copy {
    display: grid;
    gap: 2px;
}

body.theme-legacy-nfe .legacy-choice-copy strong {
    color: #eef5ff;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.35;
}

body.theme-legacy-nfe .legacy-choice-copy small {
    color: #9db2c6;
    font-size: 0.7rem;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-choice-item:has(input[type="radio"]:checked) {
    border-color: rgba(59, 130, 246, 0.44);
    background: linear-gradient(180deg, rgba(28, 49, 79, 0.96) 0%, rgba(20, 37, 61, 0.96) 100%);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1) inset;
}

body.theme-legacy-nfe .legacy-status-finance-summary {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    background: rgba(13, 27, 43, 0.72);
}

body.theme-legacy-nfe .legacy-status-finance-title {
    color: #8fa7c2;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-status-finance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
}

body.theme-legacy-nfe .legacy-status-finance-grid .span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe .legacy-status-finance-grid div {
    display: grid;
    gap: 3px;
}

body.theme-legacy-nfe .legacy-status-finance-grid span {
    color: #8fa7c2;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-status-finance-grid strong,
body.theme-legacy-nfe .legacy-status-finance-empty {
    color: #eef5ff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.4;
}

body.theme-legacy-nfe .legacy-status-lookup {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    background: rgba(13, 27, 43, 0.72);
}

body.theme-legacy-nfe .legacy-status-lookup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

body.theme-legacy-nfe .legacy-status-lookup-input {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #eef5ff;
    padding: 0 12px;
    font-size: 0.84rem;
    letter-spacing: 0.03em;
}

body.theme-legacy-nfe .legacy-status-lookup-hint {
    color: #9db2c6;
    font-size: 0.72rem;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-status-lookup-result {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-status-lookup-result.is-success {
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(20, 83, 45, 0.26);
    color: #bbf7d0;
}

body.theme-legacy-nfe .legacy-status-lookup-result.is-error {
    border: 1px solid rgba(248, 113, 113, 0.28);
    background: rgba(127, 29, 29, 0.24);
    color: #fecaca;
}

body.theme-legacy-nfe .legacy-recebimento-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    background: rgba(13, 27, 43, 0.72);
}

body.theme-legacy-nfe .legacy-recebimento-summary .span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe .legacy-recebimento-summary div,
body.theme-legacy-nfe .legacy-recebimento-section {
    display: grid;
    gap: 3px;
}

body.theme-legacy-nfe .legacy-recebimento-alert {
    padding: 10px 12px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 12px;
    background: rgba(120, 53, 15, 0.24);
    color: #fde68a;
    font-size: 0.8rem;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-recebimento-summary span,
body.theme-legacy-nfe .legacy-recebimento-section-title {
    color: #8fa7c2;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-recebimento-summary strong {
    color: #eef5ff;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
}

body.theme-legacy-nfe .legacy-status-modal.legacy-recebimento-modal {
    width: min(760px, calc(100vw - 24px));
    max-width: min(760px, calc(100vw - 24px));
}

body.theme-legacy-nfe .legacy-recebimento-grid,
body.theme-legacy-nfe .legacy-recebimento-dates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    align-items: start;
}

body.theme-legacy-nfe .legacy-recebimento-balance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(94, 234, 212, 0.16);
    border-radius: 14px;
    background: rgba(11, 24, 38, 0.74);
}

body.theme-legacy-nfe .legacy-recebimento-balance div {
    display: grid;
    gap: 4px;
}

body.theme-legacy-nfe .legacy-recebimento-balance strong {
    color: #eef5ff;
    font-size: 0.92rem;
    font-weight: 800;
}

body.theme-legacy-nfe .legacy-recebimento-balance strong.is-success {
    color: #7ee7c4;
}

body.theme-legacy-nfe .legacy-recebimento-balance strong.is-danger {
    color: #ffb4a8;
}

body.theme-legacy-nfe .legacy-recebimento-parcela-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(110, 140, 185, 0.2);
    border-radius: 14px;
    background: rgba(12, 23, 38, 0.74);
}

body.theme-legacy-nfe .legacy-recebimento-parcela-card > span {
    color: #d7e7ff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-recebimento-parcela-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.theme-legacy-nfe .legacy-recebimento-summary,
body.theme-legacy-nfe .legacy-recebimento-grid,
body.theme-legacy-nfe .legacy-recebimento-dates,
body.theme-legacy-nfe .legacy-recebimento-parcela-grid,
body.theme-legacy-nfe .legacy-editor-field {
    min-width: 0;
}

body.theme-legacy-nfe .legacy-recebimento-parcela-grid small {
    color: #8fa7c2;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-recebimento-grid .span-2 {
    grid-column: span 2;
}

body.theme-legacy-nfe .legacy-status-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(8, 17, 28, 0.94);
}

@media (max-width: 640px) {
    body.theme-legacy-nfe .legacy-status-lookup-row,
    body.theme-legacy-nfe .legacy-status-finance-grid,
    body.theme-legacy-nfe .legacy-recebimento-balance,
    body.theme-legacy-nfe .legacy-recebimento-summary,
    body.theme-legacy-nfe .legacy-recebimento-grid,
    body.theme-legacy-nfe .legacy-recebimento-dates,
    body.theme-legacy-nfe .legacy-recebimento-parcela-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-status-finance-grid .span-2,
    body.theme-legacy-nfe .legacy-recebimento-summary .span-2,
    body.theme-legacy-nfe .legacy-recebimento-grid .span-2 {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-status-modal {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 18px;
    }

    body.theme-legacy-nfe .legacy-status-modal-head,
    body.theme-legacy-nfe .legacy-status-modal-body,
    body.theme-legacy-nfe .legacy-status-modal-actions {
        padding-left: 12px;
        padding-right: 12px;
    }

    body.theme-legacy-nfe .legacy-status-modal-actions > .legacy-button {
        flex: 1 1 100%;
    }
}

body.theme-legacy-nfe .legacy-status-modal-body select {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #eef5ff;
    padding: 0 12px;
    font-size: 0.84rem;
}

body.theme-legacy-nfe .legacy-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #dce8fb;
    font-size: 1.1rem;
    transition: background 0.18s ease, color 0.18s ease;
}

body.theme-legacy-nfe .legacy-modal-close:hover {
    background: rgba(251, 113, 133, 0.14);
    color: #ffffff;
}

body.theme-legacy-nfe .legacy-editor-grid,
body.theme-legacy-nfe .legacy-loja-grid,
body.theme-legacy-nfe .legacy-lojas-grid-main,
body.theme-legacy-nfe .legacy-lojas-grid-cert,
body.theme-legacy-nfe .legacy-fornecedor-modal-grid,
body.theme-legacy-nfe .legacy-setor-modal-grid,
body.theme-legacy-nfe .legacy-usuario-modal-grid {
    gap: 14px 12px;
}

body.theme-legacy-nfe .legacy-editor-field,
body.theme-legacy-nfe .legacy-loja-modal-field {
    gap: 6px;
}

body.theme-legacy-nfe .legacy-editor-field span,
body.theme-legacy-nfe .legacy-loja-modal-field span,
body.theme-legacy-nfe .legacy-loja-grid span {
    color: #8fa5bc;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-editor-field input,
body.theme-legacy-nfe .legacy-editor-field select,
body.theme-legacy-nfe .legacy-editor-field textarea,
body.theme-legacy-nfe .legacy-loja-modal-field input,
body.theme-legacy-nfe .legacy-loja-modal-field select,
body.theme-legacy-nfe .legacy-loja-grid input,
body.theme-legacy-nfe .legacy-loja-grid select {
    width: 100%;
    min-height: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #eef5ff;
    font-size: 0.84rem;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.theme-legacy-nfe .legacy-editor-field textarea {
    min-height: 112px;
    height: auto;
    padding: 12px 14px;
    resize: vertical;
}

body.theme-legacy-nfe .legacy-editor-field input[type="file"],
body.theme-legacy-nfe .legacy-loja-modal-field input[type="file"],
body.theme-legacy-nfe .legacy-loja-grid input[type="file"] {
    height: auto;
    min-height: 44px;
    padding: 10px 12px;
}

body.theme-legacy-nfe .legacy-editor-field input:hover,
body.theme-legacy-nfe .legacy-editor-field select:hover,
body.theme-legacy-nfe .legacy-editor-field textarea:hover,
body.theme-legacy-nfe .legacy-loja-modal-field input:hover,
body.theme-legacy-nfe .legacy-loja-modal-field select:hover,
body.theme-legacy-nfe .legacy-loja-grid input:hover,
body.theme-legacy-nfe .legacy-loja-grid select:hover {
    border-color: rgba(96, 165, 250, 0.22);
    background: rgba(255, 255, 255, 0.075);
}

body.theme-legacy-nfe .legacy-editor-field input:focus,
body.theme-legacy-nfe .legacy-editor-field select:focus,
body.theme-legacy-nfe .legacy-editor-field textarea:focus,
body.theme-legacy-nfe .legacy-loja-modal-field input:focus,
body.theme-legacy-nfe .legacy-loja-modal-field select:focus,
body.theme-legacy-nfe .legacy-loja-grid input:focus,
body.theme-legacy-nfe .legacy-loja-grid select:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

body.theme-legacy-nfe .legacy-editor-field input:disabled,
body.theme-legacy-nfe .legacy-loja-modal-field input:disabled,
body.theme-legacy-nfe .legacy-loja-grid input:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #bfd0e4;
}

body.theme-legacy-nfe .legacy-usuario-lojas-grid,
body.theme-legacy-nfe .legacy-usuario-permissions-grid {
    gap: 12px;
}

body.theme-legacy-nfe .legacy-usuario-loja-item,
body.theme-legacy-nfe .legacy-usuario-permission-item {
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

body.theme-legacy-nfe .legacy-usuario-loja-item span,
body.theme-legacy-nfe .legacy-usuario-permission-item span {
    color: #f3f8ff;
    font-size: 0.84rem;
    font-weight: 700;
}

body.theme-legacy-nfe .legacy-usuario-loja-item small,
body.theme-legacy-nfe .legacy-usuario-loja-note,
body.theme-legacy-nfe .legacy-usuario-permission-item small,
body.theme-legacy-nfe .legacy-fornecedor-secondary {
    color: #9db2c6;
    font-size: 0.76rem;
    line-height: 1.5;
}

body.theme-legacy-nfe .legacy-inline-actions {
    gap: 8px;
}

body.theme-legacy-nfe .legacy-lojas-edit-button,
body.theme-legacy-nfe .legacy-fornecedores-edit-button,
body.theme-legacy-nfe .legacy-setores-edit-button,
body.theme-legacy-nfe .legacy-usuarios-edit-button {
    min-width: 86px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    box-shadow: none;
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field span,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field span,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field span,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-grid span {
    color: #7a8da3;
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field input,
body.theme-mode-light.theme-legacy-nfe .legacy-filter-field select,
body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-body select,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field input,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field select,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field textarea,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field input,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field select,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-grid input,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-grid select {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(19, 47, 91, 0.14);
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field input:hover,
body.theme-mode-light.theme-legacy-nfe .legacy-filter-field select:hover,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field input:hover,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field select:hover,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field textarea:hover,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field input:hover,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field select:hover,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-grid input:hover,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-grid select:hover {
    background: #f8fbff;
    border-color: rgba(47, 92, 179, 0.2);
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-modal {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 249, 255, 0.94)),
        #ffffff;
    border-color: rgba(19, 47, 91, 0.12);
    color: #172b4d;
    box-shadow: 0 30px 70px rgba(26, 54, 93, 0.16);
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-head {
    background: rgba(248, 251, 255, 0.88);
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-head strong,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-item span,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permission-item span,
body.theme-mode-light.theme-legacy-nfe .legacy-fornecedores-col-razao strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-body p,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-item small,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-note,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permission-item small,
body.theme-mode-light.theme-legacy-nfe .legacy-fornecedor-secondary {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-modal-close,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-item,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permission-item {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.12);
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-transfer {
    border-top-color: rgba(19, 47, 91, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-transfer span {
    color: #1d4ed8;
}

body.theme-legacy-nfe .legacy-filters,
body.theme-legacy-nfe .legacy-fornecedores-filter-bar,
body.theme-legacy-nfe .legacy-setores-filter-bar,
body.theme-legacy-nfe .legacy-usuarios-filter-bar,
body.theme-legacy-nfe .legacy-lojas-filter-bar,
body.theme-legacy-nfe .legacy-nfse-filters {
    gap: 10px 8px;
}

body.theme-legacy-nfe .legacy-filter-field {
    gap: 5px;
}

body.theme-legacy-nfe .legacy-filter-field span {
    min-height: auto;
    line-height: 1.1;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

body.theme-legacy-nfe .legacy-filter-field input,
body.theme-legacy-nfe .legacy-filter-field select {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    line-height: 1;
}

body.theme-legacy-nfe .legacy-filter-buttons {
    gap: 8px;
    min-height: 34px;
    margin-top: 14px;
}

body.theme-legacy-nfe .legacy-filter-buttons .legacy-button {
    min-width: 0;
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 0.76rem;
    line-height: 1;
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field span {
    color: #7a8da3;
}

body.theme-mode-light.theme-legacy-nfe {
    background:
        radial-gradient(circle at top center, rgba(114, 155, 239, 0.08), transparent 28%),
        linear-gradient(180deg, #f3f7fd 0%, #eef3fb 100%);
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .layout-shell {
    background:
        radial-gradient(circle at top center, rgba(114, 155, 239, 0.08), transparent 28%),
        linear-gradient(180deg, #f3f7fd 0%, #eef3fb 100%);
}

body.theme-mode-light.theme-legacy-nfe .content,
body.theme-mode-light.theme-legacy-nfe .legacy-nfe-page {
    background: transparent;
}

body.theme-mode-light.theme-legacy-nfe .sidebar {
    background:
        radial-gradient(circle at top left, rgba(31, 59, 105, 0.06), transparent 24%),
        linear-gradient(180deg, #eef4fc 0%, #e2ebf8 100%);
    border-right-color: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .brand-card h1,
body.theme-mode-light.theme-legacy-nfe .nav-title,
body.theme-mode-light.theme-legacy-nfe .sidebar-nav a,
body.theme-mode-light.theme-legacy-nfe .sidebar-client-card strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-nav a {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .sidebar-nav a.active,
body.theme-mode-light.theme-legacy-nfe .sidebar-nav a:hover {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(26, 54, 93, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: 0 10px 24px rgba(26, 54, 93, 0.06);
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-card small,
body.theme-mode-light.theme-legacy-nfe .topbar-heading p,
body.theme-mode-light.theme-legacy-nfe .search-text,
body.theme-mode-light.theme-legacy-nfe .topbar-profile span,
body.theme-mode-light.theme-legacy-nfe .legacy-summary-card small,
body.theme-mode-light.theme-legacy-nfe .legacy-row span,
body.theme-mode-light.theme-legacy-nfe .legacy-empty-cell {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-card-premium {
    background:
        radial-gradient(circle at top right, rgba(93, 147, 232, 0.14), transparent 46%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 247, 255, 0.92) 100%);
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: 0 10px 24px rgba(26, 54, 93, 0.06);
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-label [data-server-greeting],
body.theme-mode-light.theme-legacy-nfe .sidebar-client-datetime {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-loja-switch {
    margin-top: 2px;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-loja-switch-select {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.08);
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-loja-switch-select:hover {
    background: #f8fbff;
    border-color: rgba(47, 92, 179, 0.16);
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-badge {
    background: #edf4ff;
    border-color: rgba(38, 85, 175, 0.12);
    color: #2755a4;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-logout,
body.theme-mode-light.theme-legacy-nfe .theme-toggle-button {
    border-color: rgba(19, 47, 91, 0.12);
    background: #ffffff;
    color: #284b7d;
}

body.theme-mode-light.theme-legacy-nfe .sidebar-client-logout:hover,
body.theme-mode-light.theme-legacy-nfe .theme-toggle-button:hover {
    background: #f7faff;
}

body.theme-mode-light.theme-legacy-nfe .active-loja-banner {
    background:
        radial-gradient(circle at top right, rgba(93, 147, 232, 0.12), transparent 44%),
        linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: 0 10px 28px rgba(26, 54, 93, 0.06);
}

body.theme-mode-light.theme-legacy-nfe .active-loja-banner-label,
body.theme-mode-light.theme-legacy-nfe .active-loja-banner-copy small,
body.theme-mode-light.theme-legacy-nfe .active-loja-banner-detail span {
    color: #4a5c73;
}

body.theme-mode-light.theme-legacy-nfe .active-loja-banner-copy strong,
body.theme-mode-light.theme-legacy-nfe .active-loja-banner-detail strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .active-loja-banner-value-accent {
    color: #2f5cb3;
}

body.theme-mode-light.theme-legacy-nfe .active-loja-chip {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.12);
    color: #4b617f;
}

body.theme-mode-light.theme-legacy-nfe .active-loja-chip-primary {
    background: #edf4ff;
    border-color: rgba(38, 85, 175, 0.12);
    color: #2755a4;
}

body.theme-legacy-nfe .legacy-fornecedores-top-board,
body.theme-legacy-nfe .legacy-setores-top-board,
body.theme-legacy-nfe .legacy-lojas-top-board,
body.theme-legacy-nfe .legacy-sincronia-top-board,
body.theme-legacy-nfe .legacy-usuarios-top-board,
body.theme-legacy-nfe .legacy-permissoes-top-board {
    display: none;
}


body.theme-mode-light.theme-legacy-nfe .topbar,
body.theme-mode-light.theme-legacy-nfe .search-shell,
body.theme-mode-light.theme-legacy-nfe .topbar-profile,
body.theme-mode-light.theme-legacy-nfe .legacy-board,
body.theme-mode-light.theme-legacy-nfe .legacy-summary-card,
body.theme-mode-light.theme-legacy-nfe .legacy-table-panel,
body.theme-mode-light.theme-legacy-nfe .legacy-top-board,
body.theme-mode-light.theme-legacy-nfe .legacy-fornecedores-top-board,
body.theme-mode-light.theme-legacy-nfe .legacy-fornecedores-table-panel,
body.theme-mode-light.theme-legacy-nfe .legacy-nfse-top-board,
body.theme-mode-light.theme-legacy-nfe .legacy-nfse-table-panel,
body.theme-mode-light.theme-legacy-nfe .legacy-sincronia-top-board,
body.theme-mode-light.theme-legacy-nfe .legacy-sincronia-table-panel,
body.theme-mode-light.theme-legacy-nfe .legacy-sincronia-log-panel,
body.theme-mode-light.theme-legacy-nfe .legacy-setores-top-board,
body.theme-mode-light.theme-legacy-nfe .legacy-setores-table-panel {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.08);
    box-shadow: 0 10px 28px rgba(26, 54, 93, 0.06);
}

body.theme-mode-light.theme-legacy-nfe .topbar-heading h2,
body.theme-mode-light.theme-legacy-nfe .legacy-board-title,
body.theme-mode-light.theme-legacy-nfe .legacy-row strong,
body.theme-mode-light.theme-legacy-nfe .legacy-summary-card strong,
body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-head strong,
body.theme-mode-light.theme-legacy-nfe .legacy-filter-field span,
body.theme-mode-light.theme-legacy-nfe .legacy-table thead th,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody td,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permissions-head strong,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permission-item span {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .search-shell,
body.theme-mode-light.theme-legacy-nfe .topbar-profile {
    border-color: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .legacy-summary-label,
body.theme-mode-light.theme-legacy-nfe .legacy-board-title,
body.theme-mode-light.theme-legacy-nfe .legacy-section-title,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permissions-head span,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permission-item small,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-profile-summary span {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-profile-summary {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.1);
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-profile-summary strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-panel-title {
    background: #ffffff;
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field input,
body.theme-mode-light.theme-legacy-nfe .legacy-filter-field select,
body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-body select,
body.theme-mode-light.theme-legacy-nfe .legacy-sincronia-number {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.14);
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field select {
    background: #f8fbff;
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field input:hover,
body.theme-mode-light.theme-legacy-nfe .legacy-filter-field select:hover {
    border-color: rgba(47, 92, 179, 0.22);
    background: #f8fbff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field input:focus,
body.theme-mode-light.theme-legacy-nfe .legacy-filter-field select:focus {
    border-color: rgba(47, 92, 179, 0.45);
    box-shadow: 0 0 0 2px rgba(47, 92, 179, 0.12);
    outline: none;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table-wrap {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table thead th {
    background: #f3f7fd;
    border-bottom-color: rgba(19, 47, 91, 0.12);
    border-right-color: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr {
    background: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr:hover {
    background: #f7fbff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada:hover {
    background: linear-gradient(180deg, #fff0f1 0%, #ffe4e7 100%);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada.selected,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada.selected:hover {
    background: linear-gradient(180deg, #ffe7ea 0%, #ffdbe0 100%);
    box-shadow: inset 3px 0 0 #d94b60;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada td,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada .legacy-key {
    color: #8e1f2d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada:hover {
    background: linear-gradient(180deg, #fff7db 0%, #ffefc3 100%);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada.selected,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada.selected:hover {
    background: linear-gradient(180deg, #fff2c6 0%, #ffe6a5 100%);
    box-shadow: inset 3px 0 0 #c89a0d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada td,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada .legacy-key {
    color: #7b5b00;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente:hover {
    background: linear-gradient(180deg, #eef9ff 0%, #e1f3ff 100%);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente.selected,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente.selected:hover {
    background: linear-gradient(180deg, #dff2ff 0%, #cfe9fb 100%);
    box-shadow: inset 3px 0 0 #3aa7d8;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente td,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-pendente .legacy-key {
    color: #1b5874;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.selected,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.selected:hover {
    background: linear-gradient(180deg, #e6efff 0%, #d9e7ff 100%);
    box-shadow: inset 3px 0 0 #5f8fdf;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody td {
    border-top-color: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .legacy-key {
    color: #59718f;
}

body.theme-mode-light.theme-legacy-nfe .legacy-event {
    color: #4b617f;
}

body.theme-mode-light.theme-legacy-nfe .legacy-event-success {
    color: #1d6c47;
}

body.theme-mode-light.theme-legacy-nfe .legacy-event-info {
    color: #365f9f;
    font-weight: 600;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.selected .legacy-event,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.selected:hover .legacy-event {
    color: #284b7d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.selected td,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.selected .legacy-key {
    color: #173b75;
}

body.theme-mode-light.theme-legacy-nfe .legacy-row-menu {
    border-color: rgba(19, 47, 91, 0.12);
    box-shadow: 0 10px 22px rgba(26, 54, 93, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-row-menu-item {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-row-menu-item:hover {
    background: #eef4ff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-actions-trigger {
    border-color: rgba(19, 47, 91, 0.14);
    background: linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
    color: #28518f;
}

body.theme-mode-light.theme-legacy-nfe .legacy-actions-trigger:hover {
    border-color: rgba(47, 92, 179, 0.24);
    background: linear-gradient(180deg, #ffffff 0%, #e7f0ff 100%);
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field select,
body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-body select,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field select,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field select,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-grid select {
    color-scheme: light;
}

body.theme-mode-light.theme-legacy-nfe .legacy-filter-field select option,
body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-body select option,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field select option,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field select option,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-grid select option {
    background: #ffffff;
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-modal {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.12);
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-loading-title {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-loading-text,
body.theme-mode-light.theme-legacy-nfe .legacy-nfse-status-step {
    color: #4b617f;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-result-message {
    color: #4b617f;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-result-message.success {
    color: #147a40;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-result-message.error {
    color: #b22e2e;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-status-icon {
    border-color: rgba(19, 47, 91, 0.18);
    background: #f5f8fd;
    color: #4b617f;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-status-step.is-success .legacy-nfse-status-icon {
    background: rgba(20, 122, 64, 0.1);
    border-color: rgba(20, 122, 64, 0.28);
    color: #147a40;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-status-step.is-error .legacy-nfse-status-icon {
    background: rgba(178, 46, 46, 0.08);
    border-color: rgba(178, 46, 46, 0.22);
    color: #b22e2e;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-debug-meta {
    color: #4b617f;
}

body.theme-mode-light.theme-legacy-nfe .legacy-nfse-debug-pre {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.12);
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-editor-field span,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field span {
    color: #8aa2c7;
}

body.theme-mode-light.theme-legacy-nfe .legacy-editor-field input,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field select,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field input,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field select {
    background: #ffffff;
    border-color: rgba(19, 47, 91, 0.18);
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-editor-field select,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field select {
    background: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-editor-field input:focus,
body.theme-mode-light.theme-legacy-nfe .legacy-editor-field select:focus,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field input:focus,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field select:focus {
    border-color: rgba(47, 92, 179, 0.45);
    box-shadow: 0 0 0 2px rgba(47, 92, 179, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-editor-field input:disabled,
body.theme-mode-light.theme-legacy-nfe .legacy-loja-modal-field input:disabled {
    background: #f3f7fd;
    color: #4b617f;
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permission-item {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-item {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-item span {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-item small,
body.theme-mode-light.theme-legacy-nfe .legacy-usuario-loja-note {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permission-item span {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-usuario-permission-item small {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-head,
body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-actions,
body.theme-mode-light.theme-legacy-nfe .legacy-danfe-tabs {
    border-color: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-actions {
    background: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-modal-body p,
body.theme-mode-light.theme-legacy-nfe .legacy-modal-close {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-choice-item {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.12);
}

body.theme-legacy-nfe .legacy-status-modal.legacy-danfe-modal {
    width: min(940px, calc(100vw - 24px));
    max-width: min(940px, calc(100vw - 24px));
    height: calc(100vh - 32px);
}

body.theme-legacy-nfe .legacy-status-modal.legacy-danfe-modal .legacy-danfe-tab-panels {
    overflow: hidden;
}

body.theme-legacy-nfe .legacy-status-modal.legacy-danfe-modal .legacy-danfe-tab-panel {
    overflow: auto;
}

body.theme-legacy-nfe .legacy-status-modal.legacy-danfe-modal .legacy-danfe-frame {
    min-width: 0;
}

body.theme-legacy-nfe .legacy-view-notice {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.83rem;
    font-weight: 800;
    line-height: 1.4;
}

body.theme-legacy-nfe .legacy-view-notice-success {
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(20, 83, 45, 0.26);
    color: #bbf7d0;
}

body.theme-mode-light.theme-legacy-nfe .legacy-view-notice-success {
    border-color: rgba(34, 197, 94, 0.24);
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

body.theme-mode-light.theme-legacy-nfe .legacy-choice-item:hover {
    background: #eef4ff;
    border-color: rgba(47, 92, 179, 0.22);
}

body.theme-legacy-nfe #legacy-setor-modal {
    width: min(460px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
}

body.theme-legacy-nfe #legacy-setor-modal .legacy-status-modal-body {
    gap: 10px;
}

body.theme-legacy-nfe .legacy-setor-postpay-warning {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 12px;
    background: rgba(120, 72, 8, 0.22);
    color: #fde7b0;
    font-size: 11px;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-setor-postpay-warning strong {
    color: #fbbf24;
    font-size: 12px;
}

body.theme-mode-light.theme-legacy-nfe .legacy-setor-postpay-warning {
    border-color: rgba(180, 83, 9, 0.24);
    background: #fff7e8;
    color: #7c4a08;
}

body.theme-mode-light.theme-legacy-nfe .legacy-setor-postpay-warning strong {
    color: #9a5b07;
}

body.theme-legacy-nfe .legacy-classification-selects {
    display: grid;
    gap: 12px;
    margin-top: 2px;
}

body.theme-legacy-nfe .legacy-classification-auto-toggle {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid rgba(76, 119, 167, 0.4);
    border-radius: 13px;
    background: rgba(18, 31, 49, 0.62);
    color: #dce9f8;
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-classification-auto-toggle span {
    display: grid;
    gap: 3px;
    font-size: 12px;
    font-weight: 700;
}

body.theme-legacy-nfe .legacy-classification-auto-toggle small {
    color: #8da7ca;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
}

body.theme-mode-light.theme-legacy-nfe .legacy-classification-auto-toggle {
    border-color: rgba(35, 76, 135, 0.18);
    background: #f4f8ff;
    color: #17345d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-classification-auto-toggle small {
    color: #667892;
}

body.theme-legacy-nfe #legacy-setor-modal .legacy-editor-field select {
    height: 44px;
    border-radius: 13px;
}

body.theme-legacy-nfe #legacy-setor-modal .legacy-editor-field textarea {
    min-height: 84px;
    resize: vertical;
}

body.theme-legacy-nfe .legacy-choice-list-no-description .legacy-choice-copy small {
    display: none !important;
}

body.theme-legacy-nfe .legacy-romaneio-editor-modal {
    width: min(1080px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    max-height: calc(100dvh - 28px);
}

body.theme-legacy-nfe .legacy-romaneio-editor-modal .legacy-editor-modal-body {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    max-height: calc(100dvh - 160px);
    overflow-y: auto;
    padding-right: 14px;
}

body.theme-legacy-nfe .legacy-romaneio-editor-modal .legacy-editor-modal-body > *,
body.theme-legacy-nfe .legacy-romaneio-modal-grid > .legacy-editor-field,
body.theme-legacy-nfe .legacy-romaneio-classificacao > .legacy-editor-field {
    min-width: 0;
}

body.theme-legacy-nfe .legacy-romaneio-modal-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 12px;
    margin-bottom: 14px;
}

body.theme-legacy-nfe .legacy-romaneio-classificacao {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-bottom: 14px;
}

body.theme-legacy-nfe .legacy-romaneio-classificacao > small {
    grid-column: 1 / -1;
    color: #8fa5bc;
    font-size: 0.74rem;
}

body.theme-legacy-nfe .legacy-romaneio-observacoes-field {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

body.theme-legacy-nfe .legacy-romaneio-observacoes-field textarea {
    min-height: 104px;
}

body.theme-legacy-nfe .legacy-romaneio-items-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(9, 16, 28, 0.32);
}

body.theme-legacy-nfe .legacy-romaneio-items-card > *,
body.theme-legacy-nfe .legacy-romaneio-items-head > div {
    min-width: 0;
}

body.theme-legacy-nfe .legacy-romaneio-items-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.theme-legacy-nfe .legacy-romaneio-items-head strong {
    color: #f3f8ff;
    font-size: 0.9rem;
    font-weight: 800;
}

body.theme-legacy-nfe .legacy-romaneio-items-head small {
    display: block;
    margin-top: 4px;
    color: #8fa5bc;
    font-size: 0.74rem;
    line-height: 1.45;
}

body.theme-legacy-nfe .legacy-romaneio-items-list {
    display: grid;
    gap: 10px;
}

body.theme-legacy-nfe .legacy-romaneio-item-entry {
    display: grid;
    grid-template-columns: 64px minmax(200px, 1fr) 76px 62px 84px 112px;
    gap: 8px;
    align-items: end;
}

body.theme-legacy-nfe .legacy-romaneio-item-entry .legacy-editor-field {
    min-width: 0;
    width: auto;
    grid-column: auto !important;
}

body.theme-legacy-nfe .legacy-romaneio-item-entry .legacy-editor-field input {
    height: 34px;
    padding: 0 9px;
    border-radius: 12px;
    font-size: 0.78rem;
}

body.theme-legacy-nfe #romaneioFieldFornecedorId,
body.theme-legacy-nfe #romaneioFieldSetorId,
body.theme-legacy-nfe #romaneioFieldSubSetorId,
body.theme-legacy-nfe #romaneioDraftUnidade {
    background: rgba(25, 38, 58, 0.96);
    color: #eef5ff;
    border-color: rgba(119, 151, 201, 0.18);
}

body.theme-legacy-nfe #romaneioFieldFornecedorId option,
body.theme-legacy-nfe #romaneioFieldSetorId option,
body.theme-legacy-nfe #romaneioFieldSubSetorId option,
body.theme-legacy-nfe #romaneioDraftUnidade option {
    background: #162436;
    color: #eef5ff;
}

body.theme-legacy-nfe .legacy-romaneio-item-entry .legacy-editor-field span {
    font-size: 0.64rem;
    letter-spacing: 0.11em;
}

body.theme-legacy-nfe .legacy-romaneio-field-codigo,
body.theme-legacy-nfe #romaneioDraftCodigo {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
}

body.theme-legacy-nfe .legacy-romaneio-field-quantidade,
body.theme-legacy-nfe #romaneioDraftQuantidade {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
}

body.theme-legacy-nfe .legacy-romaneio-field-unidade,
body.theme-legacy-nfe #romaneioDraftUnidade {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
}

body.theme-legacy-nfe .legacy-romaneio-field-valor,
body.theme-legacy-nfe #romaneioDraftValor {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
}

body.theme-legacy-nfe .legacy-romaneio-add-button {
    min-width: 112px;
    max-width: 112px;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 0.74rem;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-romaneio-field-descricao,
body.theme-legacy-nfe #romaneioDraftDescricao {
    width: 100%;
    min-width: 0;
    max-width: none;
}

body.theme-legacy-nfe .legacy-romaneio-items-table-shell {
    overflow-x: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.theme-legacy-nfe .legacy-romaneio-items-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: rgba(10, 18, 32, 0.96);
}

body.theme-legacy-nfe .legacy-romaneio-items-table thead th {
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 0.68rem;
    color: #9fc1ef;
    background: rgba(37, 54, 78, 0.95);
    border: 1px solid rgba(124, 146, 176, 0.24);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.theme-legacy-nfe .legacy-romaneio-items-table tbody td {
    vertical-align: middle;
    padding: 8px 10px;
    font-size: 0.76rem;
    color: #e7eef9;
    background: rgba(17, 27, 44, 0.96);
    border: 1px solid rgba(124, 146, 176, 0.18);
}

body.theme-legacy-nfe .legacy-romaneio-items-table td strong,
body.theme-legacy-nfe .legacy-romaneio-items-table td span {
    display: block;
}

body.theme-legacy-nfe .legacy-romaneio-items-table th:nth-child(1),
body.theme-legacy-nfe .legacy-romaneio-items-table td:nth-child(1) {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
}

body.theme-legacy-nfe .legacy-romaneio-items-table th:nth-child(2),
body.theme-legacy-nfe .legacy-romaneio-items-table td:nth-child(2) {
    width: auto;
}

body.theme-legacy-nfe .legacy-romaneio-items-table th:nth-child(3),
body.theme-legacy-nfe .legacy-romaneio-items-table td:nth-child(3) {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
}

body.theme-legacy-nfe .legacy-romaneio-items-table th:nth-child(4),
body.theme-legacy-nfe .legacy-romaneio-items-table td:nth-child(4) {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
}

body.theme-legacy-nfe .legacy-romaneio-items-table th:nth-child(5),
body.theme-legacy-nfe .legacy-romaneio-items-table td:nth-child(5) {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
}

body.theme-legacy-nfe .legacy-romaneio-items-table .legacy-col-acoes {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
    text-align: center;
}

body.theme-legacy-nfe .legacy-romaneio-items-table .legacy-romaneio-item-codigo-cell strong,
body.theme-legacy-nfe .legacy-romaneio-items-table .legacy-romaneio-item-descricao-cell span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-romaneio-item-row {
    background: transparent;
}

body.theme-legacy-nfe .legacy-romaneio-item-codigo-cell strong,
body.theme-legacy-nfe .legacy-romaneio-item-valor-cell strong {
    font-weight: 800;
}

body.theme-legacy-nfe .legacy-romaneio-remove-button {
    min-width: 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 10px;
    background: rgba(127, 29, 29, 0.24);
    color: #fecaca;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

body.theme-legacy-nfe .legacy-romaneio-remove-button:hover {
    transform: translateY(-1px);
    background: rgba(153, 27, 27, 0.34);
    border-color: rgba(248, 113, 113, 0.34);
}

body.theme-legacy-nfe .legacy-romaneio-totalbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(10, 24, 43, 0.78) 0%, rgba(17, 52, 67, 0.72) 100%);
    border: 1px solid rgba(96, 165, 250, 0.12);
}

body.theme-legacy-nfe .legacy-romaneio-totalbar span {
    color: #8fa5bc;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

body.theme-legacy-nfe .legacy-romaneio-totalbar strong {
    color: #f8fbff;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

body.theme-legacy-nfe .legacy-romaneio-table-wrap {
    min-height: 320px;
}

body.theme-legacy-nfe .legacy-romaneio-table {
    width: 100%;
    table-layout: fixed;
}

body.theme-legacy-nfe .legacy-romaneio-table thead th,
body.theme-legacy-nfe .legacy-romaneio-table tbody td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-legacy-nfe .legacy-romaneio-col-numero {
    width: 6ch;
    min-width: 6ch;
    max-width: 6ch;
}

body.theme-legacy-nfe .legacy-romaneio-col-cnpj {
    width: 20ch;
    min-width: 20ch;
    max-width: 20ch;
}

body.theme-legacy-nfe .legacy-romaneio-col-fornecedor {
    width: 34ch;
    min-width: 34ch;
    max-width: 34ch;
}

body.theme-legacy-nfe .legacy-romaneio-col-loja {
    width: 16ch;
    min-width: 16ch;
    max-width: 16ch;
}

body.theme-legacy-nfe .legacy-romaneio-col-valor {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe .legacy-romaneio-col-setor {
    width: 14ch;
    min-width: 14ch;
    max-width: 14ch;
}

body.theme-legacy-nfe .legacy-romaneio-col-emissao {
    width: 12ch;
    min-width: 12ch;
    max-width: 12ch;
}

body.theme-legacy-nfe .legacy-romaneio-col-lancado {
    width: 15ch;
    min-width: 15ch;
    max-width: 15ch;
}

body.theme-legacy-nfe .legacy-romaneio-col-acoes {
    width: 6ch;
    min-width: 6ch;
    max-width: 6ch;
}

body.theme-legacy-nfe .legacy-romaneio-col-fornecedor strong,
body.theme-legacy-nfe .legacy-romaneio-col-fornecedor small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-romaneio-table td strong {
    display: block;
}

body.theme-legacy-nfe .legacy-romaneio-table td small {
    display: block;
    margin-top: 4px;
    color: #8fa5bc;
    font-size: 0.75rem;
}

body.theme-legacy-nfe .legacy-grid-edit-button {
    min-height: 34px;
    padding: 0 14px;
    font-size: 0.78rem;
}

body.theme-legacy-nfe .legacy-romaneio-filters {
    grid-template-columns:
        minmax(112px, 0.92fr)
        minmax(230px, 1.95fr)
        minmax(128px, 1fr)
        minmax(150px, 1.02fr)
        minmax(150px, 1.02fr)
        auto;
    column-gap: 10px;
    row-gap: 8px;
    align-items: end;
}

body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-cnpj input {
    max-width: 18ch;
}

body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-fornecedor input {
    max-width: none;
}

body.theme-legacy-nfe .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
    justify-self: end;
    align-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-romaneio-filters .legacy-romaneio-filter-buttons .legacy-button {
    white-space: nowrap;
}

@media (max-width: 1360px) {
    body.theme-legacy-nfe .legacy-romaneio-filters {
        grid-template-columns:
            minmax(100px, 0.9fr)
            minmax(200px, 1.75fr)
            minmax(120px, 0.95fr)
            minmax(140px, 1fr)
            minmax(140px, 1fr)
            auto;
    }
}

@media (max-width: 1180px) {
    body.theme-legacy-nfe .legacy-romaneio-filters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-cnpj,
    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-setor,
    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-data-de,
    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-data-ate {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-fornecedor {
        grid-column: span 2;
    }

    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
        grid-column: span 2;
        justify-self: start;
    }
}

@media (max-width: 860px) {
    body.theme-legacy-nfe .legacy-romaneio-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-romaneio-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-fornecedor,
    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
        grid-column: span 2;
    }
}

@media (max-width: 620px) {
    body.theme-legacy-nfe .legacy-romaneio-summary-grid,
    body.theme-legacy-nfe .legacy-romaneio-filters {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-cnpj,
    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-fornecedor,
    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-setor,
    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-data-de,
    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-field-data-ate,
    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
        justify-self: stretch;
        flex-wrap: wrap;
    }

    body.theme-legacy-nfe .legacy-romaneio-filters .legacy-romaneio-filter-buttons > * {
        flex: 1 1 100%;
    }
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-items-card {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light.theme-legacy-nfe #romaneioFieldFornecedorId,
body.theme-mode-light.theme-legacy-nfe #romaneioFieldSetorId,
body.theme-mode-light.theme-legacy-nfe #romaneioFieldSubSetorId,
body.theme-mode-light.theme-legacy-nfe #romaneioDraftUnidade {
    background: #ffffff;
    color: #172b4d;
    border-color: rgba(19, 47, 91, 0.1);
}

body.theme-mode-light.theme-legacy-nfe #romaneioFieldFornecedorId option,
body.theme-mode-light.theme-legacy-nfe #romaneioFieldSetorId option,
body.theme-mode-light.theme-legacy-nfe #romaneioFieldSubSetorId option,
body.theme-mode-light.theme-legacy-nfe #romaneioDraftUnidade option {
    background: #ffffff;
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-items-table-shell {
    background: transparent;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-items-table {
    background: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-items-table thead th {
    color: #274a7d;
    background: #edf2f8;
    border-color: #c7d3e2;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-items-table tbody td {
    color: #11233f;
    background: #ffffff;
    border-color: #d1dbe8;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-item-row {
    background: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-items-head strong,
body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-totalbar strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-items-head small,
body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-totalbar span,
body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-table td small {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-totalbar {
    background: linear-gradient(90deg, #edf4ff 0%, #e5f4f2 100%);
    border-color: rgba(47, 92, 179, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-remove-button {
    background: #fff1f2;
    color: #be123c;
    border-color: rgba(244, 63, 94, 0.18);
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-remove-button:hover {
    background: #ffe4e6;
    border-color: rgba(244, 63, 94, 0.26);
}

@media (max-width: 1180px) {
    body.theme-legacy-nfe .legacy-romaneio-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-romaneio-item-entry {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-romaneio-add-button {
        grid-column: span 3;
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 760px) {
    body.theme-legacy-nfe .legacy-romaneio-modal-grid,
    body.theme-legacy-nfe .legacy-romaneio-classificacao,
    body.theme-legacy-nfe .legacy-romaneio-item-entry {
        grid-template-columns: minmax(0, 1fr);
    }

    body.theme-legacy-nfe .legacy-romaneio-modal-grid > .legacy-editor-field.span-2 {
        grid-column: 1 / -1;
    }

    body.theme-legacy-nfe .legacy-romaneio-items-head,
    body.theme-legacy-nfe .legacy-romaneio-totalbar {
        align-items: flex-start;
        flex-direction: column;
    }

    body.theme-legacy-nfe .legacy-romaneio-add-button {
        grid-column: span 1;
    }
}

body.theme-mode-light.theme-legacy-nfe .legacy-setor-origin-automatico {
    background: #eaf2ff;
    border-color: rgba(54, 102, 181, 0.16);
    color: #3666b5;
}

body.theme-mode-light.theme-legacy-nfe .legacy-setor-origin-manual {
    background: #e7faef;
    border-color: rgba(29, 157, 87, 0.16);
    color: #1d9d57;
}

body.theme-mode-light.theme-legacy-nfe .legacy-choice-copy strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-choice-copy small {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-choice-item:has(input[type="radio"]:checked) {
    background: linear-gradient(180deg, #eef4ff 0%, #e3ecff 100%);
    border-color: rgba(47, 92, 179, 0.3);
    box-shadow: 0 0 0 1px rgba(47, 92, 179, 0.08) inset;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table thead th.legacy-col-acoes {
    background: #f3f7fd;
    box-shadow: -8px 0 14px rgba(19, 47, 91, 0.08);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody td.legacy-col-acoes {
    background: #ffffff;
    box-shadow: -8px 0 14px rgba(19, 47, 91, 0.06);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr:hover td.legacy-col-acoes {
    background: #eef4ff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.selected td.legacy-col-acoes,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.selected:hover td.legacy-col-acoes {
    background: linear-gradient(180deg, #4e80de 0%, #3468c6 100%);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada td.legacy-col-acoes,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada:hover td.legacy-col-acoes {
    background: linear-gradient(180deg, #fff0f1 0%, #ffe4e7 100%);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada.selected td.legacy-col-acoes,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada.selected:hover td.legacy-col-acoes {
    background: linear-gradient(180deg, #ffe7ea 0%, #ffdbe0 100%);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada td.legacy-col-acoes,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada:hover td.legacy-col-acoes {
    background: linear-gradient(180deg, #fff7db 0%, #ffefc3 100%);
}

body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada.selected td.legacy-col-acoes,
body.theme-mode-light.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada.selected:hover td.legacy-col-acoes {
    background: linear-gradient(180deg, #fff2c6 0%, #ffe6a5 100%);
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-finance-summary {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.1);
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-lookup {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.1);
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-lookup-input {
    border-color: rgba(19, 47, 91, 0.14);
    background: #ffffff;
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-lookup-hint {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-lookup-result.is-success {
    border-color: rgba(34, 197, 94, 0.22);
    background: #ecfdf3;
    color: #166534;
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-lookup-result.is-error {
    border-color: rgba(248, 113, 113, 0.22);
    background: #fff1f2;
    color: #b91c1c;
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-finance-title,
body.theme-mode-light.theme-legacy-nfe .legacy-status-finance-grid span {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-status-finance-grid strong,
body.theme-mode-light.theme-legacy-nfe .legacy-status-finance-empty {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-recebimento-summary {
    background: #f8fbff;
    border-color: rgba(19, 47, 91, 0.1);
}

body.theme-mode-light.theme-legacy-nfe .legacy-recebimento-alert {
    border-color: rgba(217, 119, 6, 0.24);
    background: #fff7ed;
    color: #9a3412;
}

body.theme-mode-light.theme-legacy-nfe .legacy-recebimento-summary span,
body.theme-mode-light.theme-legacy-nfe .legacy-recebimento-section-title {
    color: #566a82;
}

body.theme-mode-light.theme-legacy-nfe .legacy-recebimento-summary strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-danfe-tabs {
    background: #f5f8fd;
}

body.theme-mode-light.theme-legacy-nfe .legacy-danfe-tab {
    border-color: rgba(19, 47, 91, 0.12);
    background: #ffffff;
    color: #284b7d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-danfe-tab.is-active {
    background: #2f5cb3;
    border-color: #4f79cc;
    color: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-button,
body.theme-mode-light.theme-legacy-nfe .legacy-button-clean,
body.theme-mode-light.theme-legacy-nfe .legacy-actions-trigger {
    border-color: rgba(19, 47, 91, 0.12);
    background: #ffffff;
    color: #284b7d;
}

/* Acao primaria com o mesmo degrade do tema escuro (DESIGN.md, Buttons). */
body.theme-mode-light.theme-legacy-nfe .legacy-button-primary {
    border-color: rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #ffffff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-flow-status-warning {
    background: #fff4d9;
    color: #7a5200;
    border-color: rgba(154, 106, 0, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-flow-status-success {
    background: #e7faef;
    color: #1d9d57;
    border-color: rgba(29, 157, 87, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-flow-status-info {
    background: #eaf2ff;
    color: #3666b5;
    border-color: rgba(54, 102, 181, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-flow-status-neutral {
    background: #eef3f8;
    color: #61728a;
    border-color: rgba(97, 114, 138, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-flow-status-recusada {
    background: #fff4d6;
    color: #8a6700;
    border-color: rgba(138, 103, 0, 0.18);
}

body.theme-mode-light.theme-legacy-nfe .legacy-flow-status-bonificacao {
    background: #f1eaff;
    color: #6b46a8;
    border-color: rgba(107, 70, 168, 0.18);
}

body.theme-mode-light.theme-legacy-nfe .legacy-fornecedores-col-razao strong {
    color: #172b4d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-fornecedor-secondary {
    color: #566a82;
}

@media (max-width: 1280px) and (min-width: 981px) {
    body.theme-legacy-nfe .legacy-board-grid {
        gap: 12px;
    }

    body.theme-legacy-nfe .legacy-row {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 8px;
    }

    body.theme-legacy-nfe .legacy-summary-grid {
        gap: 8px;
    }

    body.theme-legacy-nfe .legacy-nfe-summary-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
    }

    body.theme-legacy-nfe .legacy-summary-card {
        padding: 14px 12px 12px;
    }

    body.theme-legacy-nfe .legacy-filters {
        grid-template-columns: 12ch 11ch minmax(22ch, 1.35fr) 10ch 10ch 15ch 15ch auto;
        gap: 8px 6px;
    }

    body.theme-legacy-nfe .legacy-field-fornecedor {
        width: 44ch;
        max-width: 44ch;
    }

    body.theme-legacy-nfe .legacy-loja-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-lojas-grid-main,
    body.theme-legacy-nfe .legacy-lojas-grid-cert {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-lojas-filter-bar {
        grid-template-columns: 10ch 30ch 18ch 16ch 1fr;
    }

    body.theme-legacy-nfe .legacy-nfse-filters {
        grid-template-columns: 22ch 12ch 16ch 28ch 14ch 16ch 16ch auto;
        gap: 6px;
    }

    body.theme-legacy-nfe .legacy-fornecedores-filter-bar {
        grid-template-columns: 28ch 22ch 8ch 12ch auto;
        gap: 6px;
    }

    body.theme-legacy-nfe .legacy-loja-editor-modal {
        width: calc(100vw - 28px);
    }

    body.theme-legacy-nfe .legacy-loja-modal-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px 8px;
    }

    body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-loja {
        width: 28ch;
        min-width: 28ch;
        max-width: 28ch;
    }

    body.theme-legacy-nfe .legacy-dashboard-list .legacy-dash-col-certificado {
        width: 28ch;
        min-width: 28ch;
        max-width: 28ch;
    }
}

@media (max-width: 980px) {
    body.theme-legacy-nfe .legacy-fornecedores-filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-fornecedores-filter-buttons {
        grid-column: span 2;
    }

    body.theme-legacy-nfe .legacy-fornecedor-modal-grid {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-fornecedor-modal-field.span-4 {
        grid-column: span 2;
    }

    body.theme-legacy-nfe .legacy-nfse-filters {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-nfse-filter-buttons {
        grid-column: span 2;
    }

    body.theme-legacy-nfe .legacy-nfse-modal-grid {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-nfse-modal-field.span-3 {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    body.theme-legacy-nfe .legacy-fornecedores-filter-bar {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-fornecedores-filter-buttons {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-fornecedor-modal-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-fornecedor-modal-field.span-2,
    body.theme-legacy-nfe .legacy-fornecedor-modal-field.span-4 {
        grid-column: span 1;
    }

    .active-loja-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .active-loja-banner-details {
        width: 100%;
        gap: 6px 10px;
    }

    .active-loja-banner-detail strong {
        max-width: none;
        white-space: normal;
    }

    .active-loja-banner-meta {
        justify-content: flex-start;
    }

    body.theme-legacy-nfe .legacy-nfse-filters {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-nfse-filter-buttons {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-nfse-modal-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-nfse-modal-field.span-2,
    body.theme-legacy-nfe .legacy-nfse-modal-field.span-3 {
        grid-column: span 1;
    }
}

body.theme-legacy-nfe .legacy-filters,
body.theme-legacy-nfe .legacy-fornecedores-filter-bar,
body.theme-legacy-nfe .legacy-setores-filter-bar,
body.theme-legacy-nfe .legacy-usuarios-filter-bar,
body.theme-legacy-nfe .legacy-lojas-filter-bar,
body.theme-legacy-nfe .legacy-nfse-filters {
    column-gap: clamp(10px, 1vw, 14px);
    row-gap: 10px;
}

body.theme-legacy-nfe .legacy-filter-field {
    min-width: 0;
}

body.theme-legacy-nfe .legacy-filter-buttons,
body.theme-legacy-nfe .legacy-fornecedores-filter-buttons,
body.theme-legacy-nfe .legacy-setores-filter-buttons,
body.theme-legacy-nfe .legacy-usuarios-filter-buttons,
body.theme-legacy-nfe .legacy-lojas-filter-buttons,
body.theme-legacy-nfe .legacy-nfse-filter-buttons {
    display: flex;
    align-items: end;
    justify-self: start;
    gap: 10px;
    margin-top: 0;
    padding-left: 2px;
}

@media (max-width: 980px) {
    body.theme-legacy-nfe .legacy-filters {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 10px;
        row-gap: 10px;
    }

    body.theme-legacy-nfe .legacy-filter-buttons {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    body.theme-legacy-nfe .legacy-filters {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-filter-buttons {
        grid-column: span 1;
    }
}

body.theme-legacy-nfe .legacy-filters {
    grid-template-columns:
        minmax(84px, 0.72fr)
        minmax(84px, 0.72fr)
        minmax(220px, 2.2fr)
        minmax(86px, 0.82fr)
        minmax(86px, 0.82fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        auto;
    align-items: end;
    width: 100%;
}

body.theme-legacy-nfe .legacy-filter-buttons {
    justify-self: end;
    padding-left: 0;
}

body.theme-legacy-nfe .legacy-filter-buttons .legacy-button {
    white-space: nowrap;
}

@media (max-width: 1460px) {
    body.theme-legacy-nfe .legacy-filters {
        grid-template-columns:
            minmax(84px, 0.9fr)
            minmax(84px, 0.9fr)
            minmax(200px, 2fr)
            minmax(84px, 0.9fr)
            minmax(84px, 0.9fr)
            minmax(140px, 1fr)
            minmax(140px, 1fr)
            auto;
    }
}

@media (max-width: 1320px) {
    body.theme-legacy-nfe .legacy-filters {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-field-cnpj {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-field-numero {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-field-fornecedor {
        grid-column: span 2;
    }

    body.theme-legacy-nfe .legacy-field-setor {
        grid-column: span 1;
    }

    body.theme-legacy-nfe .legacy-field-data-de {
        grid-column: span 2;
        min-width: 0;
    }

    body.theme-legacy-nfe .legacy-field-data-ate {
        grid-column: span 2;
        min-width: 0;
    }

    body.theme-legacy-nfe .legacy-filter-buttons {
        grid-column: span 2;
        justify-self: start;
    }
}

body.theme-legacy-nfe .legacy-usuario-editor-modal {
    width: min(900px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
}

body.theme-legacy-nfe .legacy-usuario-editor-modal .legacy-editor-modal-body {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 14px;
}

body.theme-legacy-nfe .legacy-usuario-modal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 12px;
}

body.theme-legacy-nfe .legacy-usuario-modal-field.span-2,
body.theme-legacy-nfe .legacy-usuario-modal-field.span-4 {
    grid-column: span 3;
}

body.theme-legacy-nfe .legacy-usuario-lojas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.theme-legacy-nfe .legacy-usuario-setores-grid {
    max-height: 250px;
    padding-right: 6px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

body.theme-legacy-nfe .legacy-usuario-permissions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.theme-legacy-nfe .legacy-usuario-loja-item,
body.theme-legacy-nfe .legacy-usuario-permission-item {
    padding: 10px 12px;
    border-radius: 14px;
}

body.theme-legacy-nfe .legacy-usuario-loja-item span,
body.theme-legacy-nfe .legacy-usuario-permission-item span {
    font-size: 0.78rem;
    line-height: 1.25;
}

body.theme-legacy-nfe .legacy-usuario-loja-item small,
body.theme-legacy-nfe .legacy-usuario-loja-note,
body.theme-legacy-nfe .legacy-usuario-permission-item small,
body.theme-legacy-nfe .legacy-usuario-profile-summary span {
    font-size: 0.7rem;
    line-height: 1.35;
}

body.theme-legacy-nfe .legacy-usuario-profile-summary {
    margin-top: 12px;
    padding: 10px 12px;
}

body.theme-legacy-nfe .legacy-usuario-profile-summary strong {
    font-size: 0.78rem;
}

body.theme-legacy-nfe .legacy-usuario-permissions-block {
    margin-top: 12px;
    padding-top: 12px;
}

body.theme-legacy-nfe .legacy-usuario-permissions-head {
    margin-bottom: 8px;
}

body.theme-legacy-nfe .legacy-usuario-permissions-head strong {
    font-size: 0.78rem;
}

body.theme-legacy-nfe .legacy-usuario-permissions-head span {
    font-size: 0.7rem;
    line-height: 1.35;
}

body.theme-legacy-nfe .legacy-filters {
    grid-template-columns:
        15ch
        10ch
        minmax(220px, 1.8fr)
        minmax(120px, 0.9fr)
        minmax(140px, 1fr)
        minmax(140px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        auto;
    align-items: end;
}

body.theme-legacy-nfe .legacy-field-cnpj { grid-column: 1; }
body.theme-legacy-nfe .legacy-field-numero { grid-column: 2; }
body.theme-legacy-nfe .legacy-field-fornecedor { grid-column: 3; }
body.theme-legacy-nfe .legacy-field-setor { grid-column: 4; }
body.theme-legacy-nfe .legacy-field-sub-setor { grid-column: 5; min-width: 0; }
body.theme-legacy-nfe .legacy-field-status-fluxo { grid-column: 6; min-width: 140px; }
body.theme-legacy-nfe .legacy-field-data-de { grid-column: 7; min-width: 150px; }
body.theme-legacy-nfe .legacy-field-data-ate { grid-column: 8; min-width: 150px; }
body.theme-legacy-nfe .legacy-field-fornecedor { width: auto; max-width: none; }
body.theme-legacy-nfe .legacy-filter-buttons {
    grid-column: 9;
    justify-self: end;
    margin-top: 0;
}

@media (max-width: 1520px) {
    body.theme-legacy-nfe .legacy-filters {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-field-cnpj { grid-column: span 1; }
    body.theme-legacy-nfe .legacy-field-numero { grid-column: span 1; }
    body.theme-legacy-nfe .legacy-field-fornecedor { grid-column: span 2; }
    body.theme-legacy-nfe .legacy-field-setor { grid-column: span 1; }
    body.theme-legacy-nfe .legacy-field-sub-setor { grid-column: span 1; }
    body.theme-legacy-nfe .legacy-field-status-fluxo { grid-column: span 2; min-width: 0; }
    body.theme-legacy-nfe .legacy-field-data-de { grid-column: span 2; min-width: 0; }
    body.theme-legacy-nfe .legacy-field-data-ate { grid-column: span 2; min-width: 0; }
    body.theme-legacy-nfe .legacy-filter-buttons {
        grid-column: span 2;
        justify-self: start;
    }
}

@media (max-width: 1080px) {
    body.theme-legacy-nfe .legacy-usuario-modal-grid,
    body.theme-legacy-nfe .legacy-usuario-lojas-grid,
    body.theme-legacy-nfe .legacy-usuario-permissions-grid,
    body.theme-legacy-nfe .legacy-filters {
        grid-template-columns: 1fr 1fr;
    }

    body.theme-legacy-nfe .legacy-usuario-modal-field.span-2,
    body.theme-legacy-nfe .legacy-usuario-modal-field.span-4 {
        grid-column: span 2;
    }

    body.theme-legacy-nfe .legacy-field-fornecedor,
    body.theme-legacy-nfe .legacy-filter-buttons {
        grid-column: span 2;
    }

    body.theme-legacy-nfe .legacy-field-cnpj,
    body.theme-legacy-nfe .legacy-field-numero,
    body.theme-legacy-nfe .legacy-field-setor,
    body.theme-legacy-nfe .legacy-field-sub-setor,
    body.theme-legacy-nfe .legacy-field-status-fluxo,
    body.theme-legacy-nfe .legacy-field-data-de,
    body.theme-legacy-nfe .legacy-field-data-ate {
        grid-column: span 1;
        min-width: 0;
    }
}

@media (max-width: 720px) {
    body.theme-legacy-nfe .legacy-usuario-editor-modal .legacy-editor-modal-body {
        max-height: calc(100vh - 150px);
        padding-right: 10px;
    }

    body.theme-legacy-nfe .legacy-usuario-modal-grid,
    body.theme-legacy-nfe .legacy-usuario-lojas-grid,
    body.theme-legacy-nfe .legacy-usuario-permissions-grid,
    body.theme-legacy-nfe .legacy-filters {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-nfe-summary-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-usuario-modal-field.span-2,
    body.theme-legacy-nfe .legacy-usuario-modal-field.span-4,
    body.theme-legacy-nfe .legacy-field-fornecedor,
    body.theme-legacy-nfe .legacy-field-cnpj,
    body.theme-legacy-nfe .legacy-field-numero,
    body.theme-legacy-nfe .legacy-field-setor,
    body.theme-legacy-nfe .legacy-field-sub-setor,
    body.theme-legacy-nfe .legacy-field-status-fluxo,
    body.theme-legacy-nfe .legacy-field-data-de,
    body.theme-legacy-nfe .legacy-field-data-ate,
    body.theme-legacy-nfe .legacy-filter-buttons {
        grid-column: span 1;
    }
}

@media (max-width: 1500px) and (min-width: 1101px) {
    body.theme-legacy-nfe .legacy-table-wrap {
        overflow-x: auto;
        overflow-y: auto;
    }

    body.theme-legacy-nfe .legacy-table {
        width: max-content;
        min-width: 100%;
        table-layout: auto;
    }

    body.theme-legacy-nfe .legacy-table thead th,
    body.theme-legacy-nfe .legacy-table tbody td {
        white-space: nowrap;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-fornecedor,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-fornecedor {
        min-width: 280px;
        max-width: 280px;
        width: 280px;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-chave,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-chave {
        min-width: 180px;
        max-width: 180px;
        width: 180px;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-cnpj,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-cnpj {
        min-width: 88px;
        max-width: 88px;
        width: 88px;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-numero,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-numero {
        min-width: 70px;
        max-width: 70px;
        width: 70px;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-setor,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-setor {
        min-width: 110px;
        max-width: 110px;
        width: 110px;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-valor,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-valor {
        min-width: 72px;
        max-width: 72px;
        width: 72px;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-data,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-data {
        min-width: 110px;
        max-width: 110px;
        width: 110px;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-status-fluxo,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-status-fluxo {
        min-width: 110px;
        max-width: 110px;
        width: 110px;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-boleto,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-boleto {
        min-width: 70px;
        max-width: 70px;
        width: 70px;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-acoes,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-acoes {
        position: sticky;
        right: 0;
        min-width: 52px;
        max-width: 52px;
        width: 52px;
        z-index: 3;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-acoes {
        background: #1d2b40;
        box-shadow: -10px 0 16px rgba(7, 14, 24, 0.22);
    }

    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-acoes {
        background: #162232;
        box-shadow: -10px 0 16px rgba(7, 14, 24, 0.18);
        overflow: visible;
    }

    body.theme-legacy-nfe .legacy-table tbody tr:hover td.legacy-col-acoes {
        background: #1e314c;
    }

    body.theme-legacy-nfe .legacy-table tbody tr.selected td.legacy-col-acoes,
    body.theme-legacy-nfe .legacy-table tbody tr.selected:hover td.legacy-col-acoes {
        background: linear-gradient(180deg, #2f67ca 0%, #2558b3 100%);
    }

    body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada td.legacy-col-acoes {
        background: linear-gradient(180deg, #3a1a20 0%, #2d1319 100%);
    }

    body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada:hover td.legacy-col-acoes {
        background: linear-gradient(180deg, #442028 0%, #35171f 100%);
    }

    body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada.selected td.legacy-col-acoes,
    body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-cancelada.selected:hover td.legacy-col-acoes {
        background: linear-gradient(180deg, #4d232b 0%, #3a1a22 100%);
    }

    body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada td.legacy-col-acoes {
        background: linear-gradient(180deg, #4b3b08 0%, #392c05 100%);
    }

    body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada:hover td.legacy-col-acoes {
        background: linear-gradient(180deg, #5a470a 0%, #433307 100%);
    }

    body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada.selected td.legacy-col-acoes,
    body.theme-legacy-nfe .legacy-table tbody tr.legacy-row-recusada.selected:hover td.legacy-col-acoes {
        background: linear-gradient(180deg, #6a530c 0%, #4f3d08 100%);
    }
}

body.theme-legacy-nfe .legacy-table thead th.legacy-col-acoes,
body.theme-legacy-nfe .legacy-table tbody td.legacy-col-acoes {
    position: sticky;
    right: 0;
}

body.theme-legacy-nfe .legacy-table thead th.legacy-col-acoes {
    z-index: 6;
    background: #1d2b40;
    box-shadow: -8px 0 14px rgba(7, 14, 24, 0.18);
}

body.theme-legacy-nfe .legacy-table tbody td.legacy-col-acoes {
    z-index: 3;
    background: #162232;
    box-shadow: -8px 0 14px rgba(7, 14, 24, 0.16);
}

body.theme-legacy-nfe .legacy-table tbody tr:hover td.legacy-col-acoes {
    background: #1e314c;
}

body.theme-legacy-nfe .legacy-table tbody tr.selected td.legacy-col-acoes,
body.theme-legacy-nfe .legacy-table tbody tr.selected:hover td.legacy-col-acoes {
    background: linear-gradient(180deg, #2f67ca 0%, #2558b3 100%);
}

body.theme-legacy-nfe .legacy-table tbody td.legacy-col-fornecedor,
body.theme-legacy-nfe .legacy-table tbody td.legacy-col-chave,
body.theme-legacy-nfe .legacy-table thead th.legacy-col-fornecedor,
body.theme-legacy-nfe .legacy-table thead th.legacy-col-chave {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
}

body.theme-legacy-nfe .legacy-table tbody td.legacy-col-chave {
    font-size: 10px;
}

@media (max-width: 1500px) and (min-width: 1101px) {
    body.theme-legacy-nfe .legacy-table {
        min-width: 0;
    }

    body.theme-legacy-nfe .legacy-col-cnpj {
        width: 13ch;
        min-width: 13ch;
        max-width: 13ch;
    }

    body.theme-legacy-nfe .legacy-col-numero {
        width: 8ch;
        min-width: 8ch;
        max-width: 8ch;
    }

    body.theme-legacy-nfe .legacy-col-fornecedor {
        width: 28ch;
        min-width: 28ch;
        max-width: 28ch;
    }

    body.theme-legacy-nfe .legacy-col-setor {
        width: 12ch;
        min-width: 12ch;
        max-width: 12ch;
    }

    body.theme-legacy-nfe .legacy-col-valor {
        width: 9ch;
        min-width: 9ch;
        max-width: 9ch;
    }

    body.theme-legacy-nfe .legacy-col-data {
        width: 13ch;
        min-width: 13ch;
        max-width: 13ch;
    }

    body.theme-legacy-nfe .legacy-col-status-fluxo {
        width: 11ch;
        min-width: 11ch;
        max-width: 11ch;
    }

    body.theme-legacy-nfe .legacy-col-boleto {
        width: 8ch;
        min-width: 8ch;
        max-width: 8ch;
    }

    body.theme-legacy-nfe .legacy-col-chave {
        width: 20ch;
        min-width: 20ch;
        max-width: 20ch;
    }

    body.theme-legacy-nfe .legacy-col-acoes {
        width: 4.5ch;
        min-width: 4.5ch;
        max-width: 4.5ch;
    }
}

@media (max-width: 1500px) and (min-width: 1101px) {
    .layout-shell {
        grid-template-columns: 224px minmax(0, 1fr);
    }

    .sidebar {
        padding: 18px 14px 16px;
    }

    .sidebar-top {
        gap: 18px;
    }

    .brand-card {
        padding: 4px 4px 0;
    }

    .brand-heading {
        gap: 10px;
    }

    .brand-card h1 {
        font-size: 1.62rem;
    }

    .brand-subtitle {
        font-size: 0.86rem;
    }

    .theme-toggle-button-brand {
        min-width: 44px;
        height: 32px;
        padding: 0 10px;
    }

    .sidebar-client-card {
        gap: 6px;
        padding: 10px 12px;
        border-radius: 14px;
    }

    .sidebar-client-card strong {
        font-size: 0.9rem;
    }

    .sidebar-client-card small {
        font-size: 0.78rem;
    }

    .sidebar-loja-switch-select {
        height: 34px;
        font-size: 0.72rem;
    }

    .sidebar-nav {
        gap: 12px;
    }

    .nav-group {
        gap: 5px;
    }

    .sidebar-nav a {
        padding: 9px 12px;
        border-radius: 13px;
        font-size: 0.9rem;
    }

    .content {
        padding: 12px 14px 18px;
    }

    body.theme-legacy-nfe .active-loja-banner {
        gap: 10px;
        padding: 10px 14px;
        border-radius: 16px;
    }

    body.theme-legacy-nfe .active-loja-banner-copy strong {
        font-size: 0.98rem;
    }

    body.theme-legacy-nfe .active-loja-banner-copy small {
        font-size: 0.8rem;
    }

    body.theme-legacy-nfe .active-loja-banner-details {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px 12px;
        align-items: start;
    }

    body.theme-legacy-nfe .active-loja-banner-detail {
        display: grid;
        gap: 2px;
        align-items: start;
    }

    body.theme-legacy-nfe .active-loja-banner-detail strong {
        max-width: none;
        font-size: 0.69rem;
    }

    body.theme-legacy-nfe .active-loja-banner-meta {
        align-self: flex-start;
        justify-content: flex-start;
    }

    body.theme-legacy-nfe .legacy-summary-grid,
    body.theme-legacy-nfe .legacy-nfe-summary-grid,
    body.theme-legacy-nfe .legacy-fornecedores-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        gap: 8px;
    }

    body.theme-legacy-nfe .legacy-summary-card {
        padding: 12px 12px 11px;
        min-height: 92px;
    }

    body.theme-legacy-nfe .legacy-summary-label {
        margin-bottom: 8px;
        font-size: 10px;
    }

    body.theme-legacy-nfe .legacy-summary-card strong {
        font-size: 1.85rem;
    }

    body.theme-legacy-nfe .legacy-summary-card small {
        font-size: 10px;
        line-height: 1.35;
    }

    body.theme-legacy-nfe .legacy-table-panel,
    body.theme-legacy-nfe .legacy-fornecedores-table-panel,
    body.theme-legacy-nfe .legacy-setores-table-panel,
    body.theme-legacy-nfe .legacy-sincronia-table-panel,
    body.theme-legacy-nfe .legacy-usuarios-table-panel,
    body.theme-legacy-nfe .legacy-lojas-table-panel,
    body.theme-legacy-nfe .legacy-nfse-table-panel {
        padding: 0 6px 6px;
    }

    body.theme-legacy-nfe .legacy-panel-title {
        margin-bottom: -1px;
    }

    body.theme-legacy-nfe .legacy-filters,
    body.theme-legacy-nfe .legacy-fornecedores-filter-bar,
    body.theme-legacy-nfe .legacy-setores-filter-bar,
    body.theme-legacy-nfe .legacy-usuarios-filter-bar,
    body.theme-legacy-nfe .legacy-lojas-filter-bar,
    body.theme-legacy-nfe .legacy-nfse-filters {
        gap: 8px 8px;
    }

    body.theme-legacy-nfe .legacy-filter-field span {
        font-size: 0.61rem;
    }

    body.theme-legacy-nfe .legacy-filter-field input,
    body.theme-legacy-nfe .legacy-filter-field select {
        height: 32px;
        min-height: 32px;
        padding: 0 9px;
        font-size: 0.79rem;
    }

    body.theme-legacy-nfe .legacy-filter-buttons,
    body.theme-legacy-nfe .legacy-fornecedores-filter-buttons,
    body.theme-legacy-nfe .legacy-setores-filter-buttons,
    body.theme-legacy-nfe .legacy-usuarios-filter-buttons,
    body.theme-legacy-nfe .legacy-lojas-filter-buttons,
    body.theme-legacy-nfe .legacy-nfse-filter-buttons {
        gap: 8px;
        flex-wrap: wrap;
    }

    body.theme-legacy-nfe .legacy-button,
    body.theme-legacy-nfe .legacy-button-clean,
    body.theme-legacy-nfe .legacy-actions-trigger {
        min-height: 32px;
        padding: 0 12px;
        font-size: 0.78rem;
    }

    body.theme-legacy-nfe .legacy-table-wrap {
        max-height: calc(100vh - 360px);
        min-height: 320px;
    }

    body.theme-legacy-nfe .legacy-table {
        min-width: 1000px;
    }

    body.theme-legacy-nfe .legacy-table thead th,
    body.theme-legacy-nfe .legacy-table tbody td {
        font-size: 10.5px;
        padding: 5px 5px;
    }

    body.theme-legacy-nfe .legacy-col-cnpj {
        width: 14ch;
        min-width: 14ch;
        max-width: 14ch;
    }

    body.theme-legacy-nfe .legacy-col-numero {
        width: 9ch;
        min-width: 9ch;
        max-width: 9ch;
    }

    body.theme-legacy-nfe .legacy-col-fornecedor {
        width: 42ch;
        min-width: 42ch;
        max-width: 42ch;
    }

    body.theme-legacy-nfe .legacy-col-setor {
        width: 14ch;
        min-width: 14ch;
        max-width: 14ch;
    }

    body.theme-legacy-nfe .legacy-col-valor {
        width: 11ch;
        min-width: 11ch;
        max-width: 11ch;
    }

    body.theme-legacy-nfe .legacy-col-data {
        width: 15ch;
        min-width: 15ch;
        max-width: 15ch;
    }

    body.theme-legacy-nfe .legacy-col-status-fluxo {
        width: 13ch;
        min-width: 13ch;
        max-width: 13ch;
    }

    body.theme-legacy-nfe .legacy-col-boleto {
        width: 8ch;
        min-width: 8ch;
        max-width: 8ch;
    }

    body.theme-legacy-nfe .legacy-col-chave {
        width: 31ch;
        min-width: 31ch;
        max-width: 31ch;
    }

    body.theme-legacy-nfe .legacy-col-acoes {
        width: 5ch;
        min-width: 5ch;
        max-width: 5ch;
    }

    body.theme-legacy-nfe .legacy-fornecedores-filter-bar {
        grid-template-columns: minmax(18ch, 1.3fr) minmax(14ch, 1fr) 7ch 10ch auto;
    }

    body.theme-legacy-nfe .legacy-fornecedores-table {
        min-width: 1040px;
    }

    body.theme-legacy-nfe .legacy-fornecedores-col-documento {
        width: 16ch;
        min-width: 16ch;
        max-width: 16ch;
    }

    body.theme-legacy-nfe .legacy-fornecedores-col-razao {
        width: 30ch;
        min-width: 30ch;
        max-width: 30ch;
    }

    body.theme-legacy-nfe .legacy-fornecedores-col-loja {
        width: 14ch;
        min-width: 14ch;
        max-width: 14ch;
    }

    body.theme-legacy-nfe .legacy-fornecedores-col-cidade {
        width: 15ch;
        min-width: 15ch;
        max-width: 15ch;
    }

    body.theme-legacy-nfe .legacy-fornecedores-col-contato {
        width: 14ch;
        min-width: 14ch;
        max-width: 14ch;
    }

    body.theme-legacy-nfe .legacy-fornecedores-col-setor {
        width: 13ch;
        min-width: 13ch;
        max-width: 13ch;
    }
}

@media (max-width: 1360px) and (min-width: 1101px) {
    body.theme-legacy-nfe .active-loja-banner-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-summary-grid,
    body.theme-legacy-nfe .legacy-nfe-summary-grid,
    body.theme-legacy-nfe .legacy-fornecedores-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 1500px) and (min-width: 1101px) {
    body.theme-legacy-nfe .legacy-table-panel {
        padding: 0 4px 4px !important;
    }

    body.theme-legacy-nfe .legacy-table-wrap {
        overflow-x: auto !important;
    }

    body.theme-legacy-nfe .legacy-table {
        min-width: 920px !important;
        width: 100% !important;
        table-layout: fixed !important;
    }

    body.theme-legacy-nfe .legacy-table thead th,
    body.theme-legacy-nfe .legacy-table tbody td {
        padding: 3px 4px !important;
        font-size: 10px !important;
    }

    body.theme-legacy-nfe .legacy-table thead th {
        letter-spacing: 0.04em !important;
    }

    body.theme-legacy-nfe .legacy-col-cnpj {
        width: 11ch !important;
        min-width: 11ch !important;
        max-width: 11ch !important;
    }

    body.theme-legacy-nfe .legacy-col-numero {
        width: 7ch !important;
        min-width: 7ch !important;
        max-width: 7ch !important;
    }

    body.theme-legacy-nfe .legacy-col-fornecedor {
        width: 31% !important;
        min-width: 31% !important;
        max-width: 31% !important;
    }

    body.theme-legacy-nfe .legacy-col-setor {
        width: 10ch !important;
        min-width: 10ch !important;
        max-width: 10ch !important;
    }

    body.theme-legacy-nfe .legacy-col-valor {
        width: 7ch !important;
        min-width: 7ch !important;
        max-width: 7ch !important;
    }

    body.theme-legacy-nfe .legacy-col-data {
        width: 12ch !important;
        min-width: 12ch !important;
        max-width: 12ch !important;
    }

    body.theme-legacy-nfe .legacy-col-status-fluxo {
        width: 10ch !important;
        min-width: 10ch !important;
        max-width: 10ch !important;
    }

    body.theme-legacy-nfe .legacy-col-boleto {
        width: 6ch !important;
        min-width: 6ch !important;
        max-width: 6ch !important;
    }

    body.theme-legacy-nfe .legacy-col-chave {
        width: 16ch !important;
        min-width: 16ch !important;
        max-width: 16ch !important;
    }

    body.theme-legacy-nfe .legacy-col-acoes {
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
    }

    body.theme-legacy-nfe .legacy-key,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-chave,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-fornecedor {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-acoes {
        overflow: visible !important;
        text-align: center !important;
    }

    body.theme-legacy-nfe .legacy-table thead th.legacy-col-acoes {
        white-space: normal !important;
        text-align: center !important;
        line-height: 1.05 !important;
        font-size: 9px !important;
        padding: 3px 2px !important;
    }

    body.theme-legacy-nfe .legacy-actions-trigger {
        width: 28px !important;
        min-width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
        padding: 0 !important;
        font-size: 0.78rem !important;
    }

    body.theme-legacy-nfe .legacy-flow-status {
        min-height: 18px !important;
        padding: 0 7px !important;
        font-size: 0.6rem !important;
        letter-spacing: 0.03em !important;
    }
}

body.theme-legacy-nfe .text-red {
    color: #ff8f9d;
}

body.theme-legacy-nfe .legacy-danfe-tab.is-disabled,
body.theme-mode-light.theme-legacy-nfe .legacy-danfe-tab.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-summary {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-summary .legacy-summary-card {
    min-height: 102px;
    padding: 12px 14px 11px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-summary .legacy-summary-label {
    margin-bottom: 7px;
    font-size: 0.6rem;
    line-height: 1.15;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-summary .legacy-summary-card strong {
    font-size: clamp(1.22rem, 1.9vw, 2rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-summary .legacy-summary-card small {
    margin-top: 3px;
    font-size: 0.69rem;
    line-height: 1.28;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-summary .legacy-summary-card:nth-child(4) strong,
body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-summary .legacy-summary-card:nth-child(5) strong {
    font-size: clamp(1.04rem, 1.45vw, 1.52rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-actions {
    margin-top: 14px;
    margin-bottom: 14px;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-inline-form {
    display: inline-flex;
    align-items: stretch;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-actions .legacy-button,
body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-actions .legacy-inline-form .legacy-button {
    min-width: 168px;
    min-height: 36px;
    height: 36px;
    line-height: 1;
    border-radius: 999px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-button-main {
    border-color: rgba(37, 99, 235, 0.24);
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #ffffff;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.14);
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-button-accent {
    border-color: rgba(14, 165, 233, 0.2);
    background: rgba(255, 255, 255, 0.045);
    color: #dff8ff;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-button-accent:hover {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(14, 165, 233, 0.12);
    color: #ffffff;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-button-neutral {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(148, 163, 184, 0.16);
    color: #dbe7f5;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-button-neutral:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(148, 163, 184, 0.26);
    color: #ffffff;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 14px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-panel {
    min-width: 0;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-table-scroll {
    max-height: 296px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 16px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-table-scroll .legacy-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-table-compact thead th,
body.theme-legacy-nfe.theme-manutencao-page .legacy-table-compact tbody td {
    padding: 8px 10px;
    font-size: 0.84rem;
    line-height: 1.35;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-table-compact th.legacy-col-acoes,
body.theme-legacy-nfe.theme-manutencao-page .legacy-table-compact td.legacy-col-acoes {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    overflow: visible !important;
    text-align: center;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.44);
    color: #d5e0ef;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-status-pill-success {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.28);
    color: #8cf4b0;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-status-pill-warning {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.28);
    color: #ffd47c;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-status-pill-neutral {
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.22);
    color: #d5e0ef;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-row-menu-item-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    min-width: 74px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #dbe7f5;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-row-menu-item-inline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-row-menu-item-inline.danger {
    border-color: rgba(248, 113, 113, 0.2);
    background: rgba(127, 29, 29, 0.2);
    color: #fecaca;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-row-menu-item-inline.danger:hover {
    background: rgba(127, 29, 29, 0.3);
    color: #fff1f2;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-muted-text {
    color: rgba(148, 163, 184, 0.72);
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-status-pill {
    background: rgba(226, 232, 240, 0.7);
    border-color: rgba(148, 163, 184, 0.3);
    color: #274060;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-status-pill-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.24);
    color: #18794e;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-status-pill-warning {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.26);
    color: #9a6700;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-row-menu-item-inline {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(148, 163, 184, 0.24);
    color: #274060;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-button-accent {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(56, 189, 248, 0.22);
    color: #17617b;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-button-accent:hover {
    background: rgba(224, 242, 254, 0.92);
    color: #0f4f66;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-button-neutral {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(148, 163, 184, 0.22);
    color: #274060;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-button-neutral:hover {
    background: rgba(239, 246, 255, 0.94);
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-row-menu-item-inline:hover {
    background: rgba(239, 246, 255, 0.92);
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-row-menu-item-inline.danger {
    background: rgba(254, 242, 242, 0.96);
    border-color: rgba(248, 113, 113, 0.24);
    color: #b42318;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 8, 18, 0.66);
    backdrop-filter: blur(4px);
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-modal {
    width: min(480px, 100%);
    padding: 22px 24px 20px;
    border-radius: 22px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background: linear-gradient(180deg, rgba(9, 20, 35, 0.98), rgba(11, 26, 45, 0.98));
    box-shadow: 0 24px 60px rgba(3, 8, 18, 0.42);
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-modal h3 {
    margin: 0 0 8px;
    color: #f8fbff;
    font-size: 1.22rem;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-modal p,
body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-modal small {
    margin: 0;
    color: rgba(214, 226, 243, 0.82);
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: #d7e6f9;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-meta strong {
    font-size: 1rem;
    color: #ffffff;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-meta span {
    font-size: 0.84rem;
    color: rgba(214, 226, 243, 0.8);
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-modal small {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-track {
    position: relative;
    overflow: hidden;
    margin-top: 16px;
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.9), rgba(37, 99, 235, 0.96));
    transition: width 0.18s ease;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-backdrop {
    background: rgba(148, 163, 184, 0.36);
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-modal {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.98));
    border-color: rgba(96, 165, 250, 0.22);
    box-shadow: 0 20px 50px rgba(148, 163, 184, 0.24);
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-modal h3 {
    color: #173054;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-modal p,
body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-modal small {
    color: rgba(39, 64, 96, 0.82);
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-meta {
    color: #274060;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-meta strong {
    color: #173054;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-progress-meta span {
    color: rgba(39, 64, 96, 0.74);
}

@media (max-width: 1180px) {
    body.theme-legacy-nfe.theme-manutencao-page .legacy-manutencao-layout {
        grid-template-columns: 1fr;
    }
}

body.theme-legacy-nfe .legacy-global-loading-backdrop,
body.premium-login-page .legacy-global-loading-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 8, 18, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.theme-legacy-nfe .legacy-global-loading-modal,
body.premium-login-page .legacy-global-loading-modal {
    width: min(240px, 100%);
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

body.theme-legacy-nfe .legacy-global-loading-ring,
body.premium-login-page .legacy-global-loading-ring {
    position: relative;
    width: 132px;
    height: 132px;
    margin: 0 auto 14px;
}

body.theme-legacy-nfe .legacy-global-loading-ring-track,
body.premium-login-page .legacy-global-loading-ring-track {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, transparent 0, transparent 58%, rgba(7, 18, 32, 0.98) 58.5%, rgba(7, 18, 32, 0.98) 100%),
        conic-gradient(from 0deg, rgba(45, 212, 191, 0.94), rgba(103, 232, 249, 0.84), rgba(226, 232, 240, 0.18), rgba(45, 212, 191, 0.94));
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18), 0 12px 28px rgba(15, 23, 42, 0.18);
    animation: legacyGlobalLoadingSpin 1.05s linear infinite;
}

body.theme-legacy-nfe .legacy-global-loading-ring::before,
body.premium-login-page .legacy-global-loading-ring::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(8, 20, 34, 0.98), rgba(10, 26, 43, 0.98));
    box-shadow: inset 0 0 0 2px rgba(64, 188, 218, 0.52);
}

body.theme-legacy-nfe .legacy-global-loading-ring-core,
body.premium-login-page .legacy-global-loading-ring-core {
    position: absolute;
    inset: 26px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 50%;
    background: rgba(8, 20, 34, 0.92);
    color: #cfeff9;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-global-loading-ring-core strong,
body.premium-login-page .legacy-global-loading-ring-core strong {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #51d7ea;
}

body.theme-legacy-nfe .legacy-global-loading-ring-dot,
body.premium-login-page .legacy-global-loading-ring-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(180deg, #51d7ea, #2563eb);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.12);
    animation: legacyGlobalLoadingPulse 1s ease-in-out infinite;
}

body.theme-legacy-nfe .legacy-global-loading-text,
body.premium-login-page .legacy-global-loading-text {
    margin: 0;
    color: #e3eefc;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.5;
}

body.theme-legacy-nfe .legacy-global-loading-hint,
body.premium-login-page .legacy-global-loading-hint {
    display: none;
}

body.theme-mode-light.theme-legacy-nfe .legacy-global-loading-backdrop,
body.theme-mode-light.premium-login-page .legacy-global-loading-backdrop {
    background: rgba(148, 163, 184, 0.34);
}

body.theme-mode-light.theme-legacy-nfe .legacy-global-loading-modal,
body.theme-mode-light.premium-login-page .legacy-global-loading-modal {
    background: transparent;
    box-shadow: none;
}

body.theme-mode-light.theme-legacy-nfe .legacy-global-loading-ring,
body.theme-mode-light.premium-login-page .legacy-global-loading-ring {
}

body.theme-mode-light.theme-legacy-nfe .legacy-global-loading-ring-track,
body.theme-mode-light.premium-login-page .legacy-global-loading-ring-track {
    background:
        radial-gradient(circle at center, transparent 0, transparent 58%, rgba(255, 255, 255, 0.98) 58.5%, rgba(255, 255, 255, 0.98) 100%),
        conic-gradient(from 0deg, rgba(6, 182, 212, 0.94), rgba(125, 211, 252, 0.9), rgba(203, 213, 225, 0.38), rgba(6, 182, 212, 0.94));
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.16), 0 18px 42px rgba(148, 163, 184, 0.2);
}

body.theme-mode-light.theme-legacy-nfe .legacy-global-loading-ring::before,
body.theme-mode-light.premium-login-page .legacy-global-loading-ring::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(241, 247, 255, 0.98));
    box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.34);
}

body.theme-mode-light.theme-legacy-nfe .legacy-global-loading-ring-core,
body.theme-mode-light.premium-login-page .legacy-global-loading-ring-core {
    background: rgba(255, 255, 255, 0.95);
}

body.theme-mode-light.theme-legacy-nfe .legacy-global-loading-ring-core strong,
body.theme-mode-light.premium-login-page .legacy-global-loading-ring-core strong {
    color: #0891b2;
}

body.theme-mode-light.theme-legacy-nfe .legacy-global-loading-text,
body.theme-mode-light.premium-login-page .legacy-global-loading-text {
    color: #24405f;
}

body.theme-mode-light.theme-legacy-nfe .legacy-global-loading-hint,
body.theme-mode-light.premium-login-page .legacy-global-loading-hint {
    color: rgba(39, 64, 96, 0.76);
}

@keyframes legacyGlobalLoadingSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes legacyGlobalLoadingPulse {
    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.82;
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
    }
}

body.theme-legacy-nfe #legacy-status-modal {
    width: min(520px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-head,
body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-actions {
    padding: 10px 12px;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-head strong {
    font-size: 0.88rem;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-body {
    gap: 9px;
    padding: 10px 12px;
    max-height: calc(100vh - 158px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-body p {
    font-size: 0.78rem;
    line-height: 1.38;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-choice-list {
    gap: 6px;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-choice-item {
    gap: 9px;
    padding: 8px 9px;
    border-radius: 11px;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-choice-copy strong {
    font-size: 0.77rem;
    line-height: 1.25;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-choice-copy small {
    font-size: 0.67rem;
    line-height: 1.35;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-lookup,
body.theme-legacy-nfe #legacy-status-modal .legacy-status-boleto-card,
body.theme-legacy-nfe #legacy-status-modal .legacy-status-finance-summary {
    gap: 7px;
    padding: 9px 10px;
    border-radius: 12px;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-finance-title,
body.theme-legacy-nfe #legacy-status-modal .legacy-status-finance-grid span {
    font-size: 0.65rem;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-finance-grid {
    gap: 7px 9px;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-finance-grid strong,
body.theme-legacy-nfe #legacy-status-modal .legacy-status-finance-empty {
    font-size: 0.76rem;
    line-height: 1.32;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-lookup-row {
    grid-template-columns: minmax(0, 1fr) 144px;
    gap: 8px;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-lookup-input,
body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-body select {
    height: 41px;
    border-radius: 12px;
    padding: 0 11px;
    font-size: 0.8rem;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-lookup-hint {
    font-size: 0.69rem;
    line-height: 1.35;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-status-lookup-result {
    padding: 9px 10px;
    border-radius: 11px;
    font-size: 0.76rem;
    line-height: 1.35;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-button {
    min-height: 41px;
    padding: 0 16px;
    border-radius: 999px;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-button-clean {
    min-width: 106px;
}

body.theme-legacy-nfe #legacy-status-modal .legacy-button-primary {
    min-width: 120px;
}

body.theme-mode-light.theme-legacy-nfe #legacy-status-modal {
    border-color: rgba(19, 47, 91, 0.12);
}

@media (max-width: 640px) {
    body.theme-legacy-nfe #legacy-status-modal {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        max-height: calc(100vh - 12px);
    }

    body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-head,
    body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-actions {
        padding: 9px 10px;
    }

    body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-body {
        gap: 8px;
        padding: 9px 10px;
        max-height: calc(100vh - 142px);
    }

    body.theme-legacy-nfe #legacy-status-modal .legacy-status-lookup-row {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe #legacy-status-modal .legacy-status-modal-actions {
        flex-wrap: wrap;
    }

    body.theme-legacy-nfe #legacy-status-modal .legacy-button-clean,
    body.theme-legacy-nfe #legacy-status-modal .legacy-button-primary,
    body.theme-legacy-nfe #legacy-status-modal #legacy-status-lookup-button {
        width: 100%;
        min-width: 0;
    }
}

body.theme-legacy-nfe .legacy-table thead th.legacy-col-setor,
body.theme-legacy-nfe .legacy-table tbody td.legacy-col-setor {
    width: 128px;
    min-width: 128px;
    max-width: 128px;
}

body.theme-legacy-nfe .legacy-setor-cell {
    min-width: 0;
}

body.theme-legacy-nfe .legacy-setor-cell strong {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-legacy-nfe .legacy-setor-origin {
    max-width: 100%;
    min-width: 0;
    padding: 0 6px;
    font-size: 0.61rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-legacy-nfe .legacy-summary-grid,
body.theme-legacy-nfe .legacy-nfe-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
}

body.theme-legacy-nfe .legacy-summary-card {
    min-width: 0;
}

body.theme-legacy-nfe .legacy-summary-label {
    margin-bottom: 9px;
    font-size: 0.64rem;
    line-height: 1.2;
}

body.theme-legacy-nfe .legacy-summary-card strong {
    font-size: clamp(1.55rem, 2.7vw, 2.2rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

body.theme-legacy-nfe .legacy-summary-card small {
    font-size: 0.68rem;
    line-height: 1.3;
}

body.theme-legacy-nfe .legacy-summary-card-value-total strong {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    flex-wrap: nowrap;
    font-size: inherit;
    line-height: 0.96;
    letter-spacing: normal;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    font-variant-numeric: tabular-nums;
}

body.theme-legacy-nfe .legacy-summary-card-value-total .legacy-summary-currency {
    display: inline-block;
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.02em;
}

body.theme-legacy-nfe .legacy-summary-card-value-total .legacy-summary-amount {
    display: inline-block;
    min-width: 0;
    font-size: clamp(0.96rem, 1.48vw, 1.58rem);
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: -0.055em;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-summary-card-action {
    min-width: 0;
}

body.theme-legacy-nfe .legacy-summary-card-button {
    width: 100%;
    min-width: 0;
}

@media (max-width: 1100px) {
    body.theme-legacy-nfe .legacy-table thead th.legacy-col-setor,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-setor {
        width: 118px;
        min-width: 118px;
        max-width: 118px;
    }

    body.theme-legacy-nfe .legacy-summary-grid,
    body.theme-legacy-nfe .legacy-nfe-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    }

    body.theme-legacy-nfe .legacy-summary-card {
        padding: 13px 13px 12px;
    }
}

@media (max-width: 820px) {
    body.theme-legacy-nfe .legacy-table thead th.legacy-col-setor,
    body.theme-legacy-nfe .legacy-table tbody td.legacy-col-setor {
        width: 110px;
        min-width: 110px;
        max-width: 110px;
    }

    body.theme-legacy-nfe .legacy-setor-origin {
        font-size: 0.57rem;
        min-height: 18px;
        padding: 0 5px;
    }

    body.theme-legacy-nfe .legacy-summary-grid,
    body.theme-legacy-nfe .legacy-nfe-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
        gap: 8px;
    }

    body.theme-legacy-nfe .legacy-summary-label {
        font-size: 0.59rem;
    }

    body.theme-legacy-nfe .legacy-summary-card strong {
        font-size: clamp(1.34rem, 3vw, 1.85rem);
    }

    body.theme-legacy-nfe .legacy-summary-card small {
        font-size: 0.63rem;
    }

    body.theme-legacy-nfe .legacy-summary-card-value-total strong {
        gap: 4px;
    }

    body.theme-legacy-nfe .legacy-summary-card-value-total .legacy-summary-currency {
        font-size: 0.74rem;
    }

    body.theme-legacy-nfe .legacy-summary-card-value-total .legacy-summary-amount {
        font-size: clamp(0.82rem, 1.22vw, 1.16rem);
    }
}

body.theme-legacy-nfe .portal-maintenance-admin-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 12px;
    padding: 12px 16px;
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 16px;
    background:
        linear-gradient(120deg, rgba(120, 53, 15, 0.3), rgba(15, 23, 42, 0.88) 62%),
        rgba(15, 23, 42, 0.92);
    box-shadow: 0 12px 30px rgba(2, 8, 23, 0.18);
}

body.theme-legacy-nfe .portal-maintenance-admin-banner div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.theme-legacy-nfe .portal-maintenance-admin-banner strong {
    color: #fde68a;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

body.theme-legacy-nfe .portal-maintenance-admin-banner span {
    color: #cbd5e1;
    font-size: 0.7rem;
    line-height: 1.4;
}

body.theme-legacy-nfe .portal-maintenance-admin-banner a {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.1);
    color: #fef3c7;
    font-size: 0.68rem;
    font-weight: 800;
    text-decoration: none;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
    align-items: center;
    gap: 16px;
    margin: 10px 0;
    padding: 13px 15px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background:
        radial-gradient(circle at 0 0, rgba(45, 212, 191, 0.08), transparent 34%),
        linear-gradient(145deg, rgba(17, 31, 48, 0.98), rgba(9, 20, 34, 0.98));
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-card.is-active {
    border-color: rgba(251, 191, 36, 0.34);
    background:
        radial-gradient(circle at 0 0, rgba(245, 158, 11, 0.13), transparent 38%),
        linear-gradient(145deg, rgba(31, 31, 38, 0.98), rgba(13, 21, 33, 0.98));
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-status {
    padding: 4px 8px;
    border: 1px solid rgba(45, 212, 191, 0.24);
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.1);
    color: #99f6e4;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-card.is-active .legacy-portal-maintenance-status {
    border-color: rgba(251, 191, 36, 0.28);
    background: rgba(245, 158, 11, 0.12);
    color: #fde68a;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-copy h3 {
    margin: 1px 0 0;
    color: #f8fafc;
    font-size: 0.86rem;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-copy p,
body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-copy > small {
    margin: 0;
    color: #9fb0c4;
    font-size: 0.64rem;
    line-height: 1.4;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-form {
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr) auto;
    align-items: end;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(7, 16, 28, 0.52);
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-form .legacy-button {
    min-height: 38px;
    height: 38px;
    padding: 0 13px;
    border-radius: 12px;
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    cursor: pointer;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-switch {
    position: relative;
    flex: 0 0 36px;
    width: 36px;
    height: 20px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    background: #1e293b;
    transition: background 160ms ease, border-color 160ms ease;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 3px 8px rgba(2, 6, 23, 0.36);
    transition: transform 160ms ease, background 160ms ease;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-toggle input:checked + .legacy-portal-maintenance-switch {
    border-color: rgba(245, 158, 11, 0.56);
    background: rgba(180, 83, 9, 0.7);
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-toggle input:checked + .legacy-portal-maintenance-switch::after {
    transform: translateX(16px);
    background: #fde68a;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-toggle input:focus-visible + .legacy-portal-maintenance-switch {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.24);
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-toggle > span:last-child {
    display: grid;
    gap: 2px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-toggle strong {
    color: #e5edf7;
    font-size: 0.68rem;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-toggle small {
    color: #8396ad;
    font-size: 0.58rem;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-message {
    display: grid;
    gap: 6px;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-message > span {
    color: #8fa5bc;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-message input {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: #111e2e;
    color: #eef5ff;
    font: inherit;
    font-size: 0.68rem;
    outline: none;
}

body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-message input:focus {
    border-color: rgba(59, 130, 246, 0.48);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.premium-maintenance-backdrop {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 8, 18, 0.82);
    backdrop-filter: blur(12px);
}

.premium-maintenance-backdrop[hidden] {
    display: none;
}

.premium-maintenance-modal {
    width: min(470px, calc(100vw - 32px));
    padding: 30px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 26px;
    background:
        radial-gradient(circle at 15% 0, rgba(245, 158, 11, 0.18), transparent 38%),
        linear-gradient(150deg, #142235 0%, #091321 78%);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
    text-align: center;
}

.premium-maintenance-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 17px;
    border: 1px solid rgba(251, 191, 36, 0.36);
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.12);
    transform: rotate(4deg);
}

.premium-maintenance-icon span::before {
    content: '!';
    color: #fde68a;
    font-size: 1.65rem;
    font-weight: 950;
}

.premium-maintenance-eyebrow {
    color: #fbbf24;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.premium-maintenance-modal h2 {
    margin: 9px 0 10px;
    color: #f8fafc;
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    letter-spacing: -0.035em;
}

.premium-maintenance-modal > p {
    margin: 0;
    color: #b7c5d8;
    font-size: 0.86rem;
    line-height: 1.65;
}

.premium-maintenance-ok-button {
    width: 100%;
    min-height: 44px;
    margin-top: 20px;
    border: 1px solid rgba(59, 130, 246, 0.36);
    border-radius: 14px;
    background: linear-gradient(110deg, #0f8fa1, #2563eb);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    cursor: pointer;
}

body.theme-mode-light.theme-legacy-nfe .portal-maintenance-admin-banner {
    border-color: rgba(180, 83, 9, 0.2);
    background: linear-gradient(120deg, #fff7ed, #ffffff 68%);
}

body.theme-mode-light.theme-legacy-nfe .portal-maintenance-admin-banner strong,
body.theme-mode-light.theme-legacy-nfe .portal-maintenance-admin-banner a {
    color: #92400e;
}

body.theme-mode-light.theme-legacy-nfe .portal-maintenance-admin-banner span {
    color: #64748b;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-card {
    border-color: rgba(15, 23, 42, 0.1);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-copy h3,
body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-toggle strong {
    color: #172033;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-form {
    border-color: rgba(15, 23, 42, 0.1);
    background: #f8fafc;
}

body.theme-mode-light.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-message input {
    border-color: rgba(15, 23, 42, 0.14);
    background: #ffffff;
    color: #172033;
}

html.theme-mode-light .premium-maintenance-backdrop {
    background: rgba(226, 232, 240, 0.78);
}

html.theme-mode-light .premium-maintenance-modal {
    border-color: rgba(180, 83, 9, 0.2);
    background: radial-gradient(circle at 15% 0, #ffedd5, transparent 40%), #ffffff;
    box-shadow: 0 28px 80px rgba(51, 65, 85, 0.24);
}

html.theme-mode-light .premium-maintenance-modal h2 {
    color: #172033;
}

html.theme-mode-light .premium-maintenance-modal > p {
    color: #52637a;
}

@media (max-width: 1100px) {
    body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-card {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-form {
        grid-template-columns: auto minmax(220px, 1fr) auto;
    }
}

@media (max-width: 620px) {
    body.theme-legacy-nfe .portal-maintenance-admin-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-card,
    .premium-maintenance-modal {
        padding: 14px;
    }

    body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    body.theme-legacy-nfe.theme-manutencao-page .legacy-portal-maintenance-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}
body.theme-legacy-nfe .legacy-status-modal.legacy-financial-group-modal {
    width: min(720px, calc(100vw - 32px));
}

body.theme-legacy-nfe .legacy-financial-group-modal .legacy-setor-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.theme-legacy-nfe .legacy-financial-group-modal .legacy-setor-modal-grid > .span-2 {
    grid-column: 1 / -1;
}

body.theme-legacy-nfe .legacy-financial-nf-picker {
    min-width: 0;
    border: 1px solid rgba(66, 211, 201, 0.28);
    border-radius: 12px;
    padding: 12px;
    background: rgba(3, 30, 42, 0.42);
}

body.theme-legacy-nfe .legacy-financial-nf-picker > small {
    display: block;
    margin: 3px 0 10px;
    color: #91a8bd;
    font-size: 0.72rem;
    line-height: 1.35;
}

body.theme-legacy-nfe .legacy-financial-nf-sector {
    max-width: 360px;
}

body.theme-legacy-nfe .legacy-financial-nf-options {
    display: flex;
    flex-direction: column;
    max-height: 220px;
    margin-top: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(143, 164, 185, 0.2);
    border-radius: 8px;
    background: rgba(4, 20, 32, 0.5);
    scrollbar-gutter: stable;
}

body.theme-legacy-nfe .legacy-financial-nf-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 31px;
    padding: 5px 9px;
    border-bottom: 1px solid rgba(143, 164, 185, 0.16);
    cursor: pointer;
}

body.theme-legacy-nfe .legacy-financial-nf-option:hover {
    background: rgba(34, 154, 184, 0.1);
}

body.theme-legacy-nfe .legacy-financial-nf-option:last-child {
    border-bottom: 0;
}

body.theme-legacy-nfe .legacy-financial-nf-picker .legacy-financial-nf-option input[type="checkbox"] {
    flex: 0 0 15px;
    width: 15px;
    min-width: 15px;
    max-width: 15px;
    height: 15px;
    min-height: 15px;
    margin: 0;
    padding: 0;
    border-radius: 3px;
    accent-color: #26c6c9;
}

body.theme-legacy-nfe .legacy-financial-nf-option-copy {
    display: flex;
    min-width: 0;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    color: #e8f2ff;
    font-size: 0.76rem;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: none;
}

body.theme-legacy-nfe .legacy-financial-nf-option-copy strong {
    overflow: hidden;
    color: inherit;
    font-size: inherit;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-financial-nf-option-copy small {
    flex: 0 0 auto;
    color: #8298ad;
    font-size: 0.65rem;
    text-align: right;
}

body.theme-legacy-nfe .legacy-financial-nf-option.is-blocked {
    opacity: 0.58;
    cursor: not-allowed;
}

body.theme-legacy-nfe .legacy-financial-nf-empty {
    padding: 10px;
}

@media (max-width: 700px) {
    body.theme-legacy-nfe .legacy-financial-group-modal .legacy-setor-modal-grid {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe .legacy-financial-nf-option-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    body.theme-legacy-nfe .legacy-financial-nf-option-copy small {
        text-align: left;
    }
}

/* Sidebar module navigation */
.sidebar-nav {
    gap: 9px;
}

.sidebar-nav .sidebar-dashboard-link,
.sidebar-module-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #b7c8dc;
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 760;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-nav .sidebar-dashboard-link {
    transform: none;
}

.sidebar-nav .sidebar-dashboard-link:hover,
.sidebar-module-toggle:hover {
    color: #ffffff;
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.sidebar-nav .sidebar-dashboard-link.active {
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.24);
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.16), rgba(37, 99, 235, 0.2));
    box-shadow: inset 3px 0 0 #22b8f2, 0 12px 26px rgba(37, 99, 235, 0.12);
}

.sidebar-module {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.018);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-module.is-active {
    border-color: rgba(96, 165, 250, 0.22);
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.06), rgba(37, 99, 235, 0.08));
    box-shadow: inset 3px 0 0 #22b8f2;
}

.sidebar-module-toggle {
    border: 0;
    border-radius: 0;
}

.sidebar-module-toggle:focus-visible,
.sidebar-nav .sidebar-dashboard-link:focus-visible,
.sidebar-module-items a:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: -2px;
}

.sidebar-nav-icon {
    display: inline-flex;
    flex: 0 0 21px;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    color: #8fb5dd;
}

.sidebar-nav-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-dashboard-link.active .sidebar-nav-icon,
.sidebar-module.is-active .sidebar-module-toggle .sidebar-nav-icon {
    color: #43c5ff;
}

.sidebar-module-label {
    flex: 1 1 auto;
    min-width: 0;
}

.sidebar-module-chevron {
    display: inline-flex;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    transition: transform 0.18s ease;
}

.sidebar-module-chevron svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-module-toggle[aria-expanded="true"] .sidebar-module-chevron {
    transform: rotate(180deg);
}

.sidebar-module-items {
    position: relative;
    display: grid;
    gap: 2px;
    margin: 0 7px 7px;
    padding: 2px 0 2px 35px;
    box-sizing: border-box;
    overflow: hidden;
    opacity: 1;
    transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
}

.sidebar-module-items[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-module-items {
        transition: none;
    }
}

.sidebar-module-items::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 17px;
    width: 1px;
    background: rgba(116, 151, 190, 0.3);
}

.sidebar-nav .sidebar-module-items a {
    position: relative;
    min-width: 0;
    padding: 7px 9px;
    border: 0;
    border-radius: 9px;
    color: #9db0c4;
    font-size: 0.82rem;
    line-height: 1.24;
    transform: none;
}

.sidebar-module-items a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -22px;
    width: 7px;
    height: 7px;
    border: 2px solid #0a1725;
    border-radius: 50%;
    background: #587593;
    transform: translateY(-50%);
}

.sidebar-nav .sidebar-module-items a:hover {
    color: #f4fbff;
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.sidebar-nav .sidebar-module-items a.active {
    color: #ffffff;
    border: 0;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.2), rgba(37, 99, 235, 0.12));
    box-shadow: none;
}

.sidebar-module-items a.active::before {
    background: #25b9ff;
    box-shadow: 0 0 0 3px rgba(37, 185, 255, 0.14);
}

@keyframes sidebarModuleReveal {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.theme-mode-light .sidebar-module {
    border-color: rgba(19, 47, 91, 0.08);
    background: rgba(255, 255, 255, 0.48);
}

body.theme-mode-light .sidebar-module.is-active {
    border-color: rgba(37, 99, 235, 0.15);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(37, 99, 235, 0.07));
}

body.theme-mode-light .sidebar-nav .sidebar-dashboard-link,
body.theme-mode-light .sidebar-module-toggle {
    color: #334e6d;
}

body.theme-mode-light .sidebar-nav .sidebar-dashboard-link:hover,
body.theme-mode-light .sidebar-module-toggle:hover {
    color: #112d50;
    border-color: rgba(19, 47, 91, 0.09);
    background: rgba(255, 255, 255, 0.7);
}

body.theme-mode-light .sidebar-nav .sidebar-dashboard-link.active {
    color: #0f2e55;
    border-color: rgba(37, 99, 235, 0.14);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(37, 99, 235, 0.1));
}

body.theme-mode-light .sidebar-nav-icon {
    color: #587695;
}

body.theme-mode-light .sidebar-module-items::before {
    background: rgba(72, 104, 139, 0.22);
}

body.theme-mode-light .sidebar-module-items a::before {
    border-color: #eef5fb;
    background: #a9b9ca;
}

body.theme-mode-light .sidebar-nav .sidebar-module-items a {
    color: #5c7188;
}

body.theme-mode-light .sidebar-nav .sidebar-module-items a:hover {
    color: #172b4d;
    background: rgba(255, 255, 255, 0.72);
}

body.theme-mode-light .sidebar-nav .sidebar-module-items a.active {
    color: #0a4fae;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.13), rgba(37, 99, 235, 0.08));
}

@media (max-width: 980px) {
    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .sidebar-dashboard-link {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .sidebar-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar-dashboard-link {
        grid-column: auto;
    }
}

/* Dashboard financeiro: primeira etapa com os quatro indicadores operacionais. */
.finance-dashboard {
    margin: 20px 0 24px;
    color: #f4f8ff;
}

.finance-dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 2px 14px;
}

.finance-dashboard-heading h1 {
    margin: 0;
    color: #f7fbff;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.finance-dashboard-heading p {
    margin: 6px 0 0;
    color: #9cb0c5;
    font-size: 0.9rem;
}

.finance-dashboard-updated {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8499ae;
    font-size: 0.76rem;
    white-space: nowrap;
}

.finance-dashboard-updated a {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(94, 143, 190, 0.2);
    border-radius: 50%;
    color: #9fc6e8;
    background: rgba(9, 30, 49, 0.7);
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.finance-dashboard-updated a:hover {
    border-color: rgba(55, 176, 246, 0.48);
    color: #e4f5ff;
    background: rgba(16, 52, 82, 0.9);
}

.finance-dashboard-updated svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.finance-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.finance-dashboard-card {
    --finance-card-accent: #2da8f2;
    --finance-card-accent-rgb: 45, 168, 242;
    position: relative;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    min-width: 0;
    min-height: 116px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(100, 145, 184, 0.2);
    border-radius: 15px;
    background:
        radial-gradient(circle at 10% 10%, rgba(var(--finance-card-accent-rgb), 0.09), transparent 36%),
        linear-gradient(145deg, rgba(14, 39, 61, 0.96), rgba(8, 27, 44, 0.96));
    box-shadow: 0 16px 34px rgba(1, 10, 20, 0.13);
}

.finance-dashboard-card::after {
    content: "";
    position: absolute;
    inset: auto 16px 0;
    height: 2px;
    opacity: 0.42;
    background: linear-gradient(90deg, transparent, var(--finance-card-accent), transparent);
}

.finance-dashboard-card.is-overdue {
    --finance-card-accent: #ff5364;
    --finance-card-accent-rgb: 255, 83, 100;
}

.finance-dashboard-card.is-today {
    --finance-card-accent: #ffad3b;
    --finance-card-accent-rgb: 255, 173, 59;
}

.finance-dashboard-card.is-upcoming {
    --finance-card-accent: #2fa9ff;
    --finance-card-accent-rgb: 47, 169, 255;
}

.finance-dashboard-card.is-paid-month {
    --finance-card-accent: #72db62;
    --finance-card-accent-rgb: 114, 219, 98;
}

.finance-dashboard-card-icon {
    grid-column: 1;
    grid-row: 1 / -1;
    display: grid;
    width: 52px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(var(--finance-card-accent-rgb), 0.28);
    border-radius: 12px;
    color: var(--finance-card-accent);
    background: linear-gradient(145deg, rgba(var(--finance-card-accent-rgb), 0.28), rgba(var(--finance-card-accent-rgb), 0.1));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.finance-dashboard-card-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* O conteudo participa da grade do card: titulo e valor usam a largura toda e
   nunca sao cortados; a etiqueta de periodo fica ao lado da quantidade. */
.finance-dashboard-card-content {
    display: contents;
}

.finance-dashboard-card-content span,
.finance-dashboard-card-content strong,
.finance-dashboard-card-content b {
    display: block;
    min-width: 0;
}

.finance-dashboard-card-content span {
    grid-column: 2 / -1;
    grid-row: 1;
    color: #c9d7e5;
    font-size: 0.84rem;
    line-height: 1.2;
}

.finance-dashboard-card-content strong {
    grid-column: 2;
    grid-row: 2;
    margin-top: 3px;
    color: #ffffff;
    font-size: 1.72rem;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.finance-dashboard-card-content b {
    grid-column: 2 / -1;
    grid-row: 3;
    margin-top: 6px;
    color: var(--finance-card-accent);
    font-size: 1.03rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    white-space: nowrap;
}

.finance-dashboard-card > small {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    justify-self: end;
    padding: 6px 8px;
    white-space: nowrap;
    border: 1px solid rgba(var(--finance-card-accent-rgb), 0.2);
    border-radius: 999px;
    color: var(--finance-card-accent);
    background: rgba(var(--finance-card-accent-rgb), 0.1);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.finance-dashboard-card.is-unavailable {
    opacity: 0.72;
}

.finance-dashboard-card.is-unavailable .finance-dashboard-card-content b {
    color: #9aabba;
    font-size: 0.72rem;
    white-space: normal;
}

body.theme-mode-light .finance-dashboard {
    color: #172b4d;
}

body.theme-mode-light .finance-dashboard-heading h1 {
    color: #172b4d;
}

body.theme-mode-light .finance-dashboard-heading p,
body.theme-mode-light .finance-dashboard-updated {
    color: #566a82;
}

body.theme-mode-light .finance-dashboard-updated a {
    border-color: rgba(19, 47, 91, 0.12);
    color: #315c86;
    background: rgba(255, 255, 255, 0.86);
}

body.theme-mode-light .finance-dashboard-updated a:hover {
    border-color: rgba(37, 99, 235, 0.28);
    color: #174b83;
    background: #ffffff;
}

body.theme-mode-light .finance-dashboard-card {
    border-color: rgba(19, 47, 91, 0.1);
    background:
        radial-gradient(circle at 10% 10%, rgba(var(--finance-card-accent-rgb), 0.11), transparent 38%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.98));
    box-shadow: 0 14px 28px rgba(28, 53, 92, 0.07);
}

body.theme-mode-light .finance-dashboard-card-icon {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.theme-mode-light .finance-dashboard-card-content span {
    color: #526981;
}

body.theme-mode-light .finance-dashboard-card-content strong {
    color: #172b4d;
}

/* Tons escuros dos acentos para texto sobre fundo claro (contraste >= 4.5:1);
   o acento vivo continua no icone e no fio inferior. */
body.theme-mode-light .finance-dashboard-card {
    --finance-card-ink: #0f63ad;
}

body.theme-mode-light .finance-dashboard-card.is-overdue {
    --finance-card-ink: #c22a3a;
}

body.theme-mode-light .finance-dashboard-card.is-today {
    --finance-card-ink: #9a5800;
}

body.theme-mode-light .finance-dashboard-card.is-paid-month {
    --finance-card-ink: #1d7a35;
}

body.theme-mode-light .finance-dashboard-card-content b,
body.theme-mode-light .finance-dashboard-card > small {
    color: var(--finance-card-ink);
}

body.theme-mode-light .finance-dashboard-card.is-unavailable .finance-dashboard-card-content b {
    color: #566a82;
}

@media (max-width: 1320px) {
    .finance-dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .finance-dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .finance-dashboard-updated {
        width: 100%;
        justify-content: space-between;
        white-space: normal;
    }

    .finance-dashboard-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 420px) {
    .finance-dashboard-card {
        grid-template-columns: 52px minmax(0, 1fr);
        padding: 14px;
    }

    .finance-dashboard-card-icon {
        width: 46px;
        height: 52px;
    }

    .finance-dashboard-card > small {
        grid-column: 2;
        grid-row: 4;
        justify-self: start;
        margin-top: 8px;
    }
}

.finance-dashboard-insights {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(340px, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.finance-insight-panel {
    min-width: 0;
    min-height: 324px;
    padding: 17px 18px 16px;
    border: 1px solid rgba(100, 145, 184, 0.2);
    border-radius: 15px;
    background:
        radial-gradient(circle at 100% 0, rgba(45, 169, 255, 0.055), transparent 38%),
        linear-gradient(145deg, rgba(14, 39, 61, 0.96), rgba(8, 27, 44, 0.96));
    box-shadow: 0 16px 34px rgba(1, 10, 20, 0.13);
}

.finance-insight-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    min-height: 44px;
}

.finance-insight-heading h2 {
    margin: 0;
    color: #f6faff;
    font-size: 1rem;
    line-height: 1.2;
}

.finance-insight-heading h2 span {
    color: #9fb2c4;
    font-size: 0.76rem;
    font-weight: 600;
}

.finance-insight-heading p {
    margin: 4px 0 0;
    color: #8fa4b8;
    font-size: 0.75rem;
}

.finance-evolution-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 13px;
    color: #b7c7d6;
    font-size: 0.69rem;
    white-space: nowrap;
}

.finance-evolution-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.finance-evolution-legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}

.finance-evolution-legend .is-overdue {
    color: #ff5364;
}

.finance-evolution-legend .is-upcoming {
    color: #ffad3b;
}

.finance-evolution-legend .is-paid {
    color: #19d49a;
}

.finance-evolution-chart {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    height: 240px;
    margin-top: 16px;
}

.finance-evolution-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 0 27px;
    color: #8298ad;
    font-size: 0.62rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.finance-evolution-plot {
    position: relative;
    min-width: 0;
}

.finance-evolution-grid {
    position: absolute;
    inset: 0 0 27px;
    border-bottom: 1px solid rgba(122, 158, 190, 0.2);
    background: repeating-linear-gradient(
        to bottom,
        rgba(122, 158, 190, 0.13) 0,
        rgba(122, 158, 190, 0.13) 1px,
        transparent 1px,
        transparent 50%
    );
}

.finance-evolution-groups {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(42px, 1fr));
    gap: 8px;
}

.finance-evolution-group {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 27px;
    min-width: 0;
}

.finance-evolution-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(3px, 0.55vw, 8px);
    min-height: 0;
    padding: 0 4px;
}

.finance-evolution-bar {
    width: clamp(8px, 1.22vw, 18px);
    height: var(--finance-bar-height);
    min-height: 0;
    border-radius: 5px 5px 2px 2px;
    opacity: 0.92;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.finance-evolution-bar.has-value {
    min-height: 4px;
}

.finance-evolution-bar.is-overdue {
    background: linear-gradient(180deg, #ff6574, #e6394e);
}

.finance-evolution-bar.is-upcoming {
    background: linear-gradient(180deg, #ffc05d, #f1921e);
}

.finance-evolution-bar.is-paid {
    background: linear-gradient(180deg, #25e0aa, #05a978);
}

.finance-evolution-month {
    align-self: end;
    overflow: hidden;
    color: #a8bacb;
    font-size: 0.69rem;
    font-weight: 700;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-insight-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid rgba(91, 153, 207, 0.28);
    border-radius: 9px;
    color: #dcecf9;
    background: rgba(15, 47, 73, 0.7);
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
}

.finance-insight-link:hover {
    border-color: rgba(53, 178, 245, 0.48);
    color: #ffffff;
    background: rgba(20, 65, 100, 0.86);
}

.finance-insight-link svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.finance-suppliers-list {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.finance-suppliers-list li {
    --finance-supplier-color: #35a9ff;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.finance-suppliers-list li:nth-child(2) {
    --finance-supplier-color: #19d49a;
}

.finance-suppliers-list li:nth-child(3) {
    --finance-supplier-color: #ffad3b;
}

.finance-suppliers-list li:nth-child(4) {
    --finance-supplier-color: #b777f4;
}

.finance-suppliers-list li:nth-child(5) {
    --finance-supplier-color: #43c7e9;
}

.finance-supplier-rank {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--finance-supplier-color) 38%, transparent);
    border-radius: 50%;
    color: #eaf6ff;
    background: color-mix(in srgb, var(--finance-supplier-color) 24%, transparent);
    font-size: 0.72rem;
    font-weight: 800;
}

.finance-supplier-main {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.finance-supplier-main strong {
    overflow: hidden;
    color: #d9e6f2;
    font-size: 0.76rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-supplier-track {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(88, 126, 160, 0.13);
}

.finance-supplier-track i {
    display: block;
    width: var(--finance-supplier-width);
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--finance-supplier-color), color-mix(in srgb, var(--finance-supplier-color) 68%, #ffffff));
    box-shadow: 0 0 16px color-mix(in srgb, var(--finance-supplier-color) 22%, transparent);
}

.finance-suppliers-list li > b {
    color: #e6f0f8;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.finance-insight-empty {
    display: grid;
    min-height: 240px;
    place-items: center;
    padding: 24px;
    color: #8fa4b8;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}

.finance-insight-empty.is-error {
    color: #d7a1a7;
}

body.theme-mode-light .finance-insight-panel {
    border-color: rgba(19, 47, 91, 0.1);
    background:
        radial-gradient(circle at 100% 0, rgba(47, 169, 255, 0.07), transparent 38%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.98));
    box-shadow: 0 14px 28px rgba(28, 53, 92, 0.07);
}

body.theme-mode-light .finance-insight-heading h2 {
    color: #172b4d;
}

body.theme-mode-light .finance-insight-heading h2 span,
body.theme-mode-light .finance-insight-heading p,
body.theme-mode-light .finance-evolution-axis,
body.theme-mode-light .finance-evolution-month,
body.theme-mode-light .finance-insight-empty {
    color: #566a82;
}

body.theme-mode-light .finance-evolution-grid {
    border-color: rgba(19, 47, 91, 0.12);
    background: repeating-linear-gradient(
        to bottom,
        rgba(19, 47, 91, 0.09) 0,
        rgba(19, 47, 91, 0.09) 1px,
        transparent 1px,
        transparent 50%
    );
}

body.theme-mode-light .finance-evolution-legend {
    color: #526981;
}

/* No tema claro o texto da legenda fica escuro; a cor do status fica so no marcador. */
body.theme-mode-light .finance-evolution-legend span {
    color: #405a74;
}

body.theme-mode-light .finance-evolution-legend .is-overdue i {
    background: #ff5364;
}

body.theme-mode-light .finance-evolution-legend .is-upcoming i {
    background: #ffad3b;
}

body.theme-mode-light .finance-evolution-legend .is-paid i {
    background: #19d49a;
}

body.theme-mode-light .finance-insight-link {
    border-color: rgba(19, 47, 91, 0.12);
    color: #315c86;
    background: rgba(255, 255, 255, 0.86);
}

body.theme-mode-light .finance-insight-link:hover {
    border-color: rgba(37, 99, 235, 0.28);
    color: #174b83;
    background: #ffffff;
}

body.theme-mode-light .finance-supplier-main strong,
body.theme-mode-light .finance-suppliers-list li > b {
    color: #29425f;
}

body.theme-mode-light .finance-supplier-rank {
    color: #24415f;
}

body.theme-mode-light .finance-supplier-track {
    background: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light .finance-insight-empty.is-error {
    color: #a44b56;
}

@media (max-width: 1120px) {
    .finance-dashboard-insights {
        grid-template-columns: minmax(0, 1fr);
    }

    .finance-insight-panel {
        min-height: 300px;
    }
}

@media (max-width: 680px) {
    .finance-insight-heading {
        flex-direction: column;
        gap: 11px;
    }

    .finance-evolution-legend {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }

    .finance-evolution-chart {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 6px;
        height: 220px;
    }

    .finance-evolution-groups {
        gap: 3px;
    }

    .finance-evolution-bars {
        gap: 2px;
        padding: 0 2px;
    }

    .finance-suppliers-list li {
        grid-template-columns: 27px minmax(0, 1fr);
    }

    .finance-suppliers-list li > b {
        grid-column: 2;
        justify-self: end;
        margin-top: -4px;
    }
}

.finance-dashboard-details {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(350px, 0.78fr);
    gap: 14px;
    margin-top: 14px;
}

.finance-dashboard-details .finance-insight-panel {
    min-height: 318px;
}

.finance-insight-title-with-icon {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.finance-insight-heading-icon {
    display: grid;
    flex: 0 0 auto;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid rgba(47, 169, 255, 0.3);
    border-radius: 8px;
    color: #4db7ff;
    background: rgba(47, 169, 255, 0.13);
}

.finance-insight-heading-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.finance-upcoming-table-wrap {
    margin-top: 15px;
    overflow-x: auto;
    border: 1px solid rgba(100, 145, 184, 0.17);
    border-radius: 10px;
}

.finance-upcoming-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    color: #cbd9e6;
    font-size: 0.7rem;
    table-layout: fixed;
}

.finance-upcoming-table th {
    padding: 8px 9px;
    border-bottom: 1px solid rgba(100, 145, 184, 0.22);
    color: #a9bccd;
    background: rgba(25, 55, 80, 0.66);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.finance-upcoming-table td {
    height: 38px;
    padding: 7px 9px;
    overflow: hidden;
    border-bottom: 1px solid rgba(100, 145, 184, 0.12);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-upcoming-table tbody tr:last-child td {
    border-bottom: 0;
}

.finance-upcoming-table tbody tr:hover {
    background: rgba(47, 169, 255, 0.04);
}

.finance-upcoming-table th:nth-child(1) {
    width: 94px;
}

.finance-upcoming-table th:nth-child(2) {
    width: 27%;
}

.finance-upcoming-table th:nth-child(3) {
    width: 112px;
}

.finance-upcoming-table th:nth-child(4) {
    width: 104px;
}

.finance-upcoming-table th:nth-child(5) {
    width: 58px;
}

.finance-upcoming-table th:nth-child(6) {
    width: 108px;
}

.finance-upcoming-table th:nth-child(7) {
    width: 57px;
}

.finance-upcoming-date {
    color: #40b9ff;
    font-weight: 700;
}

.finance-upcoming-date.is-today {
    color: #ff6574;
}

.finance-upcoming-value {
    color: #e2edf6;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.finance-days-badge {
    display: inline-grid;
    min-width: 27px;
    min-height: 22px;
    place-items: center;
    padding: 0 7px;
    border: 1px solid rgba(47, 169, 255, 0.2);
    border-radius: 6px;
    color: #54bcff;
    background: rgba(47, 169, 255, 0.11);
    font-size: 0.64rem;
    font-weight: 800;
}

.finance-days-badge.is-today {
    border-color: rgba(255, 173, 59, 0.25);
    color: #ffbd55;
    background: rgba(255, 173, 59, 0.12);
}

.finance-due-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #85cfff;
    font-size: 0.65rem;
    white-space: nowrap;
}

.finance-due-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2fa9ff;
    box-shadow: 0 0 0 3px rgba(47, 169, 255, 0.1);
}

.finance-due-status.is-today {
    color: #ffc160;
}

.finance-due-status.is-today i {
    background: #ffad3b;
    box-shadow: 0 0 0 3px rgba(255, 173, 59, 0.1);
}

.finance-table-link {
    display: inline-grid;
    min-width: 42px;
    min-height: 25px;
    place-items: center;
    border: 1px solid rgba(91, 153, 207, 0.26);
    border-radius: 7px;
    color: #dcecf9;
    background: rgba(15, 47, 73, 0.72);
    font-size: 0.65rem;
    font-weight: 700;
    text-decoration: none;
}

.finance-table-link:hover {
    border-color: rgba(53, 178, 245, 0.48);
    color: #ffffff;
    background: rgba(20, 65, 100, 0.88);
}

.finance-expenses-layout {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(145px, 1.1fr);
    align-items: center;
    gap: 18px;
    min-height: 230px;
    margin-top: 8px;
}

.finance-expenses-donut {
    position: relative;
    display: grid;
    container-type: inline-size;
    width: min(184px, 100%);
    aspect-ratio: 1;
    place-items: center;
    justify-self: center;
    border-radius: 50%;
    background: var(--finance-expense-gradient);
    box-shadow: 0 12px 28px rgba(0, 8, 17, 0.16);
}

.finance-expenses-donut::before {
    content: "";
    position: absolute;
    inset: 20%;
    border: 1px solid rgba(100, 145, 184, 0.16);
    border-radius: 50%;
    background: #0b2032;
    box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.12);
}

.finance-expenses-donut > div {
    position: relative;
    z-index: 1;
    max-width: 56%;
    text-align: center;
}

.finance-expenses-donut strong,
.finance-expenses-donut span {
    display: block;
}

.finance-expenses-donut strong {
    color: #f4f9fd;
    /* Proporcional ao proprio grafico para o total caber no furo da rosca. */
    font-size: clamp(0.66rem, 7cqi, 0.95rem);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.finance-expenses-donut span {
    margin-top: 4px;
    color: #8399ad;
    font-size: 0.65rem;
}

.finance-expenses-legend {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.finance-expenses-legend li {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.finance-expenses-legend i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--finance-expense-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--finance-expense-color) 10%, transparent);
}

.finance-expenses-legend span {
    overflow: hidden;
    color: #b8c8d6;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-expenses-legend b {
    color: #e3edf5;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
}

body.theme-mode-light .finance-insight-heading-icon {
    border-color: rgba(37, 99, 235, 0.15);
    color: #1876bb;
    background: rgba(47, 169, 255, 0.09);
}

body.theme-mode-light .finance-upcoming-table-wrap {
    border-color: rgba(19, 47, 91, 0.1);
}

body.theme-mode-light .finance-upcoming-table {
    color: #405a74;
}

body.theme-mode-light .finance-upcoming-table th {
    border-color: rgba(19, 47, 91, 0.1);
    color: #61778e;
    background: rgba(233, 240, 248, 0.88);
}

body.theme-mode-light .finance-upcoming-table td {
    border-color: rgba(19, 47, 91, 0.08);
}

body.theme-mode-light .finance-upcoming-table tbody tr:hover {
    background: rgba(47, 169, 255, 0.045);
}

body.theme-mode-light .finance-upcoming-value {
    color: #29425f;
}

body.theme-mode-light .finance-upcoming-date {
    color: #0f63ad;
}

body.theme-mode-light .finance-upcoming-date.is-today {
    color: #c22a3a;
}

body.theme-mode-light .finance-days-badge {
    color: #0f63ad;
}

body.theme-mode-light .finance-days-badge.is-today,
body.theme-mode-light .finance-due-status.is-today {
    color: #9a5800;
}

body.theme-mode-light .finance-due-status {
    color: #0f63ad;
}

body.theme-mode-light .finance-table-link {
    border-color: rgba(19, 47, 91, 0.12);
    color: #315c86;
    background: rgba(255, 255, 255, 0.9);
}

body.theme-mode-light .finance-table-link:hover {
    border-color: rgba(37, 99, 235, 0.28);
    color: #174b83;
    background: #ffffff;
}

body.theme-mode-light .finance-expenses-donut::before {
    border-color: rgba(19, 47, 91, 0.1);
    background: #f8fbff;
    box-shadow: inset 0 0 22px rgba(28, 53, 92, 0.04);
}

body.theme-mode-light .finance-expenses-donut strong {
    color: #172b4d;
}

body.theme-mode-light .finance-expenses-donut span {
    color: #566a82;
}

body.theme-mode-light .finance-expenses-legend span {
    color: #526981;
}

body.theme-mode-light .finance-expenses-legend b {
    color: #29425f;
}

@media (max-width: 1380px) {
    .finance-dashboard-details {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1220px) {

    .finance-expenses-layout {
        grid-template-columns: minmax(170px, 0.65fr) minmax(220px, 1.35fr);
    }
}

@media (max-width: 620px) {
    .finance-dashboard-details .finance-insight-panel {
        min-height: 0;
    }

    .finance-expenses-layout {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 14px;
    }

    .finance-expenses-donut {
        width: min(180px, 82vw);
    }

    .finance-expenses-legend {
        width: min(320px, 100%);
        justify-self: center;
    }
}

/* Portal contextual help */
body.theme-legacy-nfe .legacy-context-help-trigger {
    cursor: help;
    outline: none;
}

body.theme-legacy-nfe .legacy-context-help-trigger:focus-visible {
    box-shadow: 0 0 0 2px #081521, 0 0 0 4px rgba(42, 167, 255, 0.62);
}

body.theme-legacy-nfe .legacy-column-help-trigger {
    display: inline-flex;
    align-items: center;
    border-bottom: 0;
}

body.theme-legacy-nfe .legacy-context-missing {
    border-bottom: 0;
}

.legacy-context-help-tooltip {
    position: fixed;
    z-index: 1500;
    width: max-content;
    max-width: min(320px, calc(100vw - 16px));
    padding: 9px 11px;
    border: 1px solid rgba(104, 167, 219, 0.34);
    border-radius: 9px;
    background: #13283a;
    color: #e8f2ff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.legacy-context-help-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.legacy-context-help-tooltip.is-below {
    transform: translateY(-3px);
}

.legacy-context-help-tooltip.is-below.is-visible {
    transform: translateY(0);
}

body.theme-mode-light.theme-legacy-nfe .legacy-context-help-trigger:focus-visible {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(31, 111, 214, 0.52);
}

body.theme-mode-light .legacy-context-help-tooltip {
    border-color: rgba(43, 82, 126, 0.22);
    background: #ffffff;
    color: #243b55;
    box-shadow: 0 12px 28px rgba(34, 59, 89, 0.2);
}

@media (prefers-reduced-motion: reduce) {
    .legacy-context-help-tooltip {
        transition: none;
    }
}

.nfe-pending-alert-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(2, 10, 20, 0.72);
    backdrop-filter: blur(4px);
}

.nfe-pending-alert-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 1401;
    width: min(520px, calc(100vw - 28px));
    transform: translate(-50%, -50%);
    overflow: hidden;
    border: 1px solid rgba(51, 184, 226, 0.32);
    border-radius: 20px;
    background: linear-gradient(145deg, #102131 0%, #081522 100%);
    color: #f4f8fc;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.nfe-pending-alert-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px 17px;
    border-bottom: 1px solid rgba(148, 178, 207, 0.16);
}

.nfe-pending-alert-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: rgba(245, 174, 36, 0.18);
    color: #ffbf3f;
    font-size: 25px;
    font-weight: 900;
}

.nfe-pending-alert-head div {
    display: grid;
    gap: 3px;
}

.nfe-pending-alert-head small {
    color: #85a7c3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.nfe-pending-alert-head strong {
    font-size: 18px;
}

.nfe-pending-alert-body {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 26px 28px;
    text-align: center;
}

.nfe-pending-alert-body > strong {
    color: #ffbf3f;
    font-size: 54px;
    line-height: 1;
}

.nfe-pending-alert-body p {
    margin: 0;
    color: #d7e5f1;
    font-size: 15px;
}

.nfe-pending-alert-body small {
    color: #8ba8bf;
}

.nfe-pending-alert-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px 20px;
    border-top: 1px solid rgba(148, 178, 207, 0.14);
}

body.theme-mode-light .nfe-pending-alert-backdrop {
    background: rgba(29, 48, 70, 0.42);
}

body.theme-mode-light .nfe-pending-alert-modal {
    border-color: #c7d9ec;
    background: linear-gradient(145deg, #ffffff 0%, #edf5ff 100%);
    color: #132b49;
    box-shadow: 0 28px 70px rgba(38, 66, 98, 0.28);
}

body.theme-mode-light .nfe-pending-alert-body p {
    color: #334e6f;
}

body.theme-mode-light .nfe-pending-alert-body small,
body.theme-mode-light .nfe-pending-alert-head small {
    color: #607b99;
}

@media (max-width: 560px) {
    .nfe-pending-alert-actions {
        flex-direction: column-reverse;
    }

    .nfe-pending-alert-actions .legacy-button {
        width: 100%;
    }
}
/* Romaneio: exclusao logica com auditoria. */
body.theme-legacy-nfe .legacy-romaneio-excluded-filter {
    align-items: center;
    align-self: end;
    display: inline-flex;
    gap: 8px;
    min-height: 38px;
    padding: 0 4px;
    white-space: nowrap;
}

body.theme-legacy-nfe .legacy-romaneio-excluded-filter input {
    accent-color: #2c7be5;
    height: 16px;
    margin: 0;
    width: 16px;
}

body.theme-legacy-nfe .legacy-romaneio-excluded-filter span {
    color: #9eb1c8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-romaneio-table .legacy-row-item.is-excluded > td {
    background: rgba(105, 35, 42, .2);
    color: #a9b3c1;
}

body.theme-legacy-nfe .legacy-romaneio-excluded-badge {
    background: rgba(185, 48, 59, .18);
    border: 1px solid rgba(244, 93, 105, .55);
    border-radius: 999px;
    color: #ff9aa3;
    display: inline-flex;
    font-size: 9px;
    font-weight: 900;
    margin-top: 4px;
    padding: 2px 7px;
    width: fit-content;
}

body.theme-legacy-nfe .legacy-row-menu-item-danger {
    color: #ff8f99;
}

body.theme-legacy-nfe .legacy-row-menu-item-danger:hover {
    background: rgba(185, 48, 59, .2);
}

body.theme-legacy-nfe .legacy-romaneio-delete-modal {
    left: 50%;
    max-width: 560px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    z-index: 1003;
}

body.theme-legacy-nfe .legacy-romaneio-delete-modal textarea {
    min-height: 110px;
    resize: vertical;
}

body.theme-legacy-nfe .legacy-romaneio-delete-meta {
    background: rgba(34, 66, 96, .35);
    border: 1px solid rgba(103, 148, 190, .35);
    border-radius: 10px;
    color: #c9d7e7;
    font-size: 12px;
    margin: 12px 0;
    padding: 10px 12px;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-excluded-filter span {
    color: #52657d;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-table .legacy-row-item.is-excluded > td {
    background: #fff2f3;
    color: #667085;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-excluded-badge {
    background: #ffe4e6;
    border-color: #f5a2aa;
    color: #a92131;
}

body.theme-mode-light.theme-legacy-nfe .legacy-romaneio-delete-meta {
    background: #f3f7fb;
    border-color: #d6e0eb;
    color: #40536b;
}

@media (max-width: 760px) {
    body.theme-legacy-nfe .legacy-romaneio-excluded-filter {
        justify-content: flex-start;
        width: 100%;
    }
}

/* Tabelas compactas e uniformes dos novos modulos administrativos. */
body.theme-legacy-nfe.theme-rh-page .legacy-rh-table th,
body.theme-legacy-nfe.theme-rh-page .legacy-rh-table td,
body.theme-legacy-nfe.theme-contas-page .legacy-contas-table th,
body.theme-legacy-nfe.theme-contas-page .legacy-contas-table td,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table th,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table td,
body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table th,
body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table td {
    padding: 6px 8px;
    vertical-align: middle;
    line-height: 1.2;
}

body.theme-legacy-nfe.theme-rh-page .legacy-rh-table tbody td,
body.theme-legacy-nfe.theme-contas-page .legacy-contas-table tbody td,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table tbody td,
body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table tbody td {
    font-size: 0.7rem;
}

body.theme-legacy-nfe.theme-rh-page .legacy-rh-table td strong,
body.theme-legacy-nfe.theme-contas-page .legacy-contas-table td strong,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table td strong,
body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table td strong {
    font-size: 0.7rem;
    line-height: 1.15;
}

body.theme-legacy-nfe.theme-rh-page .legacy-rh-table td span,
body.theme-legacy-nfe.theme-contas-page .legacy-contas-table td span,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table td span,
body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table td span {
    margin-top: 2px;
    font-size: 0.64rem;
    line-height: 1.15;
}

body.theme-legacy-nfe.theme-rh-page .legacy-rh-table .legacy-actions-row,
body.theme-legacy-nfe.theme-contas-page .legacy-contas-table .legacy-actions-row,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table .legacy-actions-row,
body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table .legacy-actions-row {
    flex-wrap: nowrap;
    gap: 4px;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-table .legacy-contas-actions {
    flex-wrap: nowrap;
    gap: 4px;
}

body.theme-legacy-nfe.theme-rh-page .legacy-rh-table .legacy-button,
body.theme-legacy-nfe.theme-contas-page .legacy-contas-table .legacy-button,
body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table .legacy-button,
body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table .legacy-button {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.62rem;
}

body.theme-legacy-nfe.theme-contas-page .legacy-contas-table .legacy-contas-actions .legacy-button {
    min-width: 0;
}

body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-row-action {
    min-width: 0;
    min-height: 28px;
    padding: 5px 8px;
}

@media (max-width: 900px) {
    body.theme-legacy-nfe.theme-rh-page .legacy-rh-table .legacy-actions-row,
    body.theme-legacy-nfe.theme-contas-page .legacy-contas-table .legacy-actions-row,
    body.theme-legacy-nfe.theme-recebiveis-page .legacy-recebiveis-cadastro-table .legacy-actions-row,
    body.theme-legacy-nfe.theme-contas-receber-page .legacy-contas-receber-table .legacy-actions-row {
        flex-wrap: wrap;
    }

    body.theme-legacy-nfe.theme-contas-page .legacy-contas-table .legacy-contas-actions {
        flex-wrap: wrap;
    }
}

/* Romaneios: alinhamento isolado para nao herdar a grade generica da NF-e. */
body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-panel > header.legacy-panel-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-bottom: 14px;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-panel > header.legacy-panel-title h2 {
    margin: 4px 0 0;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-panel > header.legacy-panel-title .legacy-button {
    flex: 0 0 auto;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters {
    display: grid;
    grid-template-columns:
        minmax(116px, 0.82fr)
        minmax(260px, 1.8fr)
        minmax(145px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        max-content
        max-content;
    align-items: end;
    gap: 10px;
    width: 100%;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-cnpj,
body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-fornecedor,
body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-setor,
body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-data-de,
body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-data-ate,
body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-excluded-filter,
body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
    grid-column: auto;
    min-width: 0;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-filter-field input,
body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-filter-field select {
    width: 100%;
    max-width: none;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-excluded-filter {
    justify-self: start;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
    display: flex;
    align-items: end;
    justify-self: end;
    grid-column: 7;
    gap: 8px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table-wrap {
    overflow: auto;
    scrollbar-gutter: stable;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-table.legacy-romaneio-table {
    width: 100% !important;
    min-width: 1240px !important;
    table-layout: fixed !important;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table thead th,
body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table tbody td {
    box-sizing: border-box;
    height: 38px;
    padding: 6px 8px;
    vertical-align: middle;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table .legacy-romaneio-col-cnpj {
    width: 14% !important;
    min-width: 0 !important;
    max-width: none !important;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table .legacy-romaneio-col-numero {
    width: 5% !important;
    min-width: 0 !important;
    max-width: none !important;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table .legacy-romaneio-col-fornecedor {
    width: 25% !important;
    min-width: 0 !important;
    max-width: none !important;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table .legacy-romaneio-col-loja {
    width: 14% !important;
    min-width: 0 !important;
    max-width: none !important;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table .legacy-romaneio-col-valor {
    width: 10% !important;
    min-width: 0 !important;
    max-width: none !important;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table .legacy-romaneio-col-setor {
    width: 10% !important;
    min-width: 0 !important;
    max-width: none !important;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table .legacy-romaneio-col-emissao {
    width: 8% !important;
    min-width: 0 !important;
    max-width: none !important;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table .legacy-romaneio-col-lancado {
    width: 11% !important;
    min-width: 0 !important;
    max-width: none !important;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table .legacy-romaneio-col-acoes {
    width: 3% !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    text-align: center;
}

body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-table td small {
    margin-top: 2px;
    font-size: 0.68rem;
}

@media (max-width: 1500px) {
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-cnpj { grid-column: span 1; }
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-fornecedor { grid-column: span 2; }
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-setor { grid-column: span 1; }
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-data-de { grid-column: span 1; }
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-data-ate { grid-column: span 1; }
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-excluded-filter { grid-column: 1 / span 2; }
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
        grid-column: 3 / span 4;
        justify-self: end;
    }
}

@media (max-width: 1080px) {
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-cnpj,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-fornecedor,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-setor,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-data-de,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-data-ate,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-excluded-filter {
        grid-column: span 1;
    }

    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 720px) {
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-panel > header.legacy-panel-title {
        align-items: stretch;
        flex-direction: column;
    }

    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-panel > header.legacy-panel-title .legacy-button {
        width: 100%;
    }

    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-summary-grid,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters {
        grid-template-columns: 1fr;
    }

    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-cnpj,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-fornecedor,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-setor,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-data-de,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-field-data-ate,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-excluded-filter,
    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
        grid-column: span 1;
    }

    body.theme-legacy-nfe.theme-romaneio-page .legacy-romaneio-filters .legacy-romaneio-filter-buttons {
        display: grid;
        grid-template-columns: 1fr;
        justify-self: stretch;
        width: 100%;
    }
}

/* Protecao final do editor de lojas contra regras legadas posteriores. */
body.theme-legacy-nfe #lojaEditorModal {
    display: flex;
    flex-direction: column;
    width: min(1080px, calc(100vw - 28px));
    height: min(720px, calc(100dvh - 28px));
    max-width: calc(100vw - 28px);
    max-height: calc(100dvh - 28px);
    overflow: hidden;
}

body.theme-legacy-nfe #lojaEditorForm {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-body,
body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-shell,
body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-content {
    min-height: 0;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-body {
    padding: 0;
    overflow: hidden;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    height: 100%;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-content {
    overflow-x: hidden;
    overflow-y: auto;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
}

@media (max-width: 820px) {
    body.theme-legacy-nfe #lojaEditorModal {
        width: calc(100vw - 18px);
        height: calc(100dvh - 18px);
        max-width: calc(100vw - 18px);
        max-height: calc(100dvh - 18px);
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-loja-config-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    body.theme-legacy-nfe #lojaEditorModal {
        width: calc(100vw - 8px);
        height: calc(100dvh - 8px);
        max-width: calc(100vw - 8px);
        max-height: calc(100dvh - 8px);
    }

    body.theme-legacy-nfe #lojaEditorModal .legacy-editor-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* Sub-Setores NF: busca, loja, setor, status e acoes sem sobreposicao. */
body.theme-legacy-nfe .legacy-sub-setores-filter-bar {
    grid-template-columns: minmax(24ch, 1.5fr) minmax(20ch, 1fr) 16ch 14ch auto;
}

@media (max-width: 1080px) {
    body.theme-legacy-nfe .legacy-sub-setores-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-legacy-nfe .legacy-sub-setores-filter-bar .legacy-setores-filter-buttons {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    body.theme-legacy-nfe .legacy-sub-setores-filter-bar {
        grid-template-columns: minmax(0, 1fr);
    }

    body.theme-legacy-nfe .legacy-sub-setores-filter-bar .legacy-setores-filter-buttons {
        grid-column: span 1;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }
}
body.theme-legacy-nfe .legacy-transfer-caption {
    display: block;
    margin-top: 3px;
    color: #57d4c3;
    font-size: .64rem;
    font-weight: 800;
    line-height: 1.25;
}

body.theme-legacy-nfe .legacy-transfer-warning {
    display: grid;
    gap: 4px;
    padding: 11px 13px;
    border: 1px solid rgba(56, 189, 248, .24);
    border-radius: 12px;
    background: rgba(14, 116, 144, .12);
}

body.theme-legacy-nfe .legacy-transfer-warning strong {
    color: #7dd3fc;
    font-size: .75rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

body.theme-legacy-nfe .legacy-transfer-warning span {
    color: #a9bed1;
    font-size: .72rem;
    line-height: 1.45;
}

body.theme-mode-light.theme-legacy-nfe .legacy-transfer-caption {
    color: #087f73;
}

body.theme-mode-light.theme-legacy-nfe .legacy-transfer-warning {
    border-color: rgba(14, 116, 144, .2);
    background: #edfaff;
}

body.theme-mode-light.theme-legacy-nfe .legacy-transfer-warning strong {
    color: #0e7490;
}

body.theme-mode-light.theme-legacy-nfe .legacy-transfer-warning span {
    color: #51677f;
}

/* ==========================================================================
   Tela NF-e 1.36: fila de trabalho (layout, colunas, acessibilidade, tipografia)
   Escopo: body.theme-nfe-page. Valores seguem DESIGN.md.
   ========================================================================== */

/* Faixa da loja em uma linha (opt-in por $activeLojaBannerInline). */
body.theme-legacy-nfe .active-loja-banner.active-loja-banner-inline {
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 12px;
    padding: 8px 16px;
    border-radius: 16px;
}

body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 20px;
}

body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-copy {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-copy strong {
    font-size: 0.92rem;
    white-space: nowrap;
}

body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-copy small {
    font-size: 0.75rem;
    white-space: nowrap;
}

body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-details {
    flex-wrap: nowrap;
    gap: 4px 16px;
}

body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-meta,
body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-meta > div {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

body.theme-legacy-nfe .active-loja-banner-inline .active-loja-chip {
    min-height: 24px;
    padding: 0 10px;
    font-size: 0.72rem;
}

/* Cabecalho do painel. */
body.theme-nfe-page .legacy-nfe-panel-head,
body.theme-portal-list .portal-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

body.theme-nfe-page .legacy-nfe-panel-head .legacy-panel-title,
body.theme-portal-list .portal-panel-head .legacy-panel-title {
    margin: 0;
    color: #f6faff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}


/* Fila de trabalho: cards encorpados (padrao dos cards do Dashboard financeiro) que filtram por status. */
body.theme-nfe-page .legacy-nfe-summary-grid,
body.theme-portal-list .portal-summary-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

body.theme-nfe-page .legacy-nfe-queue,
body.theme-portal-list .portal-queue {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

body.theme-nfe-page .legacy-nfe-queue-card,
body.theme-portal-list .portal-queue-card {
    --queue-accent: #2fa9ff;
    --queue-accent-rgb: 47, 169, 255;
    --queue-ink: var(--queue-accent);
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    min-width: 0;
    min-height: 112px;
    padding: 14px 16px;
    overflow: hidden;
    border: 1px solid rgba(100, 145, 184, 0.2);
    border-radius: 15px;
    background:
        radial-gradient(circle at 10% 10%, rgba(var(--queue-accent-rgb), 0.14), transparent 40%),
        linear-gradient(145deg, rgba(14, 39, 61, 0.96), rgba(8, 27, 44, 0.96));
    box-shadow: 0 16px 34px rgba(1, 10, 20, 0.13);
    color: #dce8fb;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.theme-nfe-page .legacy-nfe-queue-card::after,
body.theme-portal-list .portal-queue-card::after {
    content: "";
    position: absolute;
    inset: auto 16px 0;
    height: 2px;
    opacity: 0.55;
    background: linear-gradient(90deg, transparent, var(--queue-accent), transparent);
}

body.theme-nfe-page .legacy-nfe-queue-card.is-warning,
body.theme-portal-list .portal-queue-card.is-warning { --queue-accent: #ffad3b; --queue-accent-rgb: 255, 173, 59; }
body.theme-nfe-page .legacy-nfe-queue-card.is-success,
body.theme-portal-list .portal-queue-card.is-success { --queue-accent: #72db62; --queue-accent-rgb: 114, 219, 98; }
body.theme-nfe-page .legacy-nfe-queue-card.is-info,
body.theme-portal-list .portal-queue-card.is-info { --queue-accent: #2fa9ff; --queue-accent-rgb: 47, 169, 255; }
body.theme-nfe-page .legacy-nfe-queue-card.is-danger,
body.theme-portal-list .portal-queue-card.is-danger { --queue-accent: #ff5364; --queue-accent-rgb: 255, 83, 100; }

body.theme-nfe-page .legacy-nfe-queue-card:hover,
body.theme-portal-list .portal-queue-card:hover {
    border-color: rgba(var(--queue-accent-rgb), 0.45);
    box-shadow: 0 18px 38px rgba(1, 10, 20, 0.2);
    transform: translateY(-2px);
}

body.theme-nfe-page .legacy-nfe-queue-card:focus-visible,
body.theme-portal-list .portal-queue-card:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 3px;
}

body.theme-nfe-page .legacy-nfe-queue-card.is-active,
body.theme-portal-list .portal-queue-card.is-active {
    border-color: var(--queue-accent);
    box-shadow: 0 0 0 1px var(--queue-accent), 0 18px 38px rgba(var(--queue-accent-rgb), 0.16);
    background:
        radial-gradient(circle at 10% 10%, rgba(var(--queue-accent-rgb), 0.24), transparent 55%),
        linear-gradient(145deg, rgba(14, 39, 61, 0.98), rgba(8, 27, 44, 0.98));
}

body.theme-nfe-page .legacy-nfe-queue-card.is-active::after,
body.theme-portal-list .portal-queue-card.is-active::after {
    opacity: 1;
}

body.theme-nfe-page .legacy-nfe-queue-icon,
body.theme-portal-list .portal-queue-icon {
    display: grid;
    width: 52px;
    height: 56px;
    place-items: center;
    border: 1px solid rgba(var(--queue-accent-rgb), 0.3);
    border-radius: 12px;
    color: var(--queue-accent);
    background: linear-gradient(145deg, rgba(var(--queue-accent-rgb), 0.3), rgba(var(--queue-accent-rgb), 0.1));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-nfe-page .legacy-nfe-queue-icon svg,
body.theme-portal-list .portal-queue-icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-nfe-page .legacy-nfe-queue-body,
body.theme-portal-list .portal-queue-body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

body.theme-nfe-page .legacy-nfe-queue-label,
body.theme-portal-list .portal-queue-label {
    padding-right: 66px;
    color: #c9d7e5;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
}

body.theme-nfe-page .legacy-nfe-queue-card strong,
body.theme-portal-list .portal-queue-card strong {
    color: #ffffff;
    font-size: 1.85rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

body.theme-nfe-page .legacy-nfe-queue-value,
body.theme-portal-list .portal-queue-value {
    color: var(--queue-ink);
    font-size: 0.95rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.theme-nfe-page .legacy-nfe-queue-body small,
body.theme-portal-list .portal-queue-body small {
    margin-top: 2px;
    color: #93a9bd;
    font-size: 0.7rem;
    line-height: 1.3;
}

body.theme-nfe-page .legacy-nfe-queue-tag,
body.theme-portal-list .portal-queue-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    border: 1px solid rgba(var(--queue-accent-rgb), 0.28);
    border-radius: 999px;
    background: rgba(var(--queue-accent-rgb), 0.12);
    color: var(--queue-ink);
    font-size: 0.65rem;
    font-weight: 800;
    white-space: nowrap;
}

body.theme-nfe-page .legacy-nfe-queue-card.is-active .legacy-nfe-queue-tag,
body.theme-portal-list .portal-queue-card.is-active .portal-queue-tag {
    border-color: transparent;
    background: var(--queue-accent);
    color: #08131f;
}

body.theme-nfe-page .legacy-nfe-queue-card.is-empty .legacy-nfe-queue-icon,
body.theme-portal-list .portal-queue-card.is-empty .portal-queue-icon {
    opacity: 0.6;
}

body.theme-nfe-page .legacy-nfe-queue-card.is-empty strong,
body.theme-portal-list .portal-queue-card.is-empty strong {
    color: #9db2c6;
}

/* Resumo em chips coloridos. */
body.theme-nfe-page .legacy-nfe-stats,
body.theme-portal-list .portal-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

body.theme-nfe-page .legacy-nfe-stats > div,
body.theme-portal-list .portal-stats > div {
    --stat-accent-rgb: 147, 169, 189;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(var(--stat-accent-rgb), 0.24);
    border-radius: 999px;
    background: rgba(var(--stat-accent-rgb), 0.08);
}

body.theme-nfe-page .legacy-nfe-stats > .is-total,
body.theme-portal-list .portal-stats > .is-total { --stat-accent-rgb: 45, 212, 191; }
body.theme-nfe-page .legacy-nfe-stats > .is-valor,
body.theme-portal-list .portal-stats > .is-valor { --stat-accent-rgb: 47, 169, 255; }
body.theme-nfe-page .legacy-nfe-stats > .is-hoje,
body.theme-portal-list .portal-stats > .is-hoje { --stat-accent-rgb: 255, 173, 59; }
body.theme-nfe-page .legacy-nfe-stats > .is-mes,
body.theme-portal-list .portal-stats > .is-mes { --stat-accent-rgb: 114, 219, 98; }
body.theme-nfe-page .legacy-nfe-stats > .is-xml,
body.theme-portal-list .portal-stats > .is-xml { --stat-accent-rgb: 183, 119, 244; }

body.theme-nfe-page .legacy-nfe-stats dt,
body.theme-portal-list .portal-stats dt {
    color: #a9bccd;
    font-size: 0.72rem;
    font-weight: 600;
}

body.theme-nfe-page .legacy-nfe-stats dd,
body.theme-portal-list .portal-stats dd {
    margin: 0;
    color: #f6faff;
    font-size: 0.86rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Filtros: uma linha com os mais usados; CNPJ e Setor ficam em "Mais filtros". */
body.theme-nfe-page .legacy-nfe-filters {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 10px;
    margin-bottom: 12px;
}

body.theme-nfe-page .legacy-nfe-filters .legacy-filter-field {
    grid-column: auto;
    flex: 0 0 auto;
    min-width: 0;
}

body.theme-nfe-page .legacy-nfe-filters .legacy-field-fornecedor { flex: 1 1 220px; max-width: 360px; }
body.theme-nfe-page .legacy-nfe-filters .legacy-field-numero { width: 12ch; }
body.theme-nfe-page .legacy-nfe-filters .legacy-field-cnpj { width: 17ch; }
body.theme-nfe-page .legacy-nfe-filters .legacy-field-setor,
body.theme-nfe-page .legacy-nfe-filters .legacy-field-sub-setor { width: 180px; }
body.theme-nfe-page .legacy-nfe-filters .legacy-field-status-fluxo { width: 170px; }
body.theme-nfe-page .legacy-nfe-filters .legacy-field-data-de,
body.theme-nfe-page .legacy-nfe-filters .legacy-field-data-ate { width: 150px; min-width: 150px; }


body.theme-nfe-page .legacy-nfe-filters .legacy-filter-field span {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.theme-nfe-page .legacy-nfe-filters .legacy-filter-buttons {
    grid-column: auto;
    flex-wrap: wrap;
    margin: 0 0 0 auto;
}

body.theme-nfe-page .legacy-nfe-filters .legacy-filter-buttons .legacy-button {
    height: 32px;
    min-height: 32px;
    line-height: 30px;
}





/* Grade: Status logo apos Fornecedor, Setor e Sub-Setor juntos, chave curta.
   Sem rolagem lateral a partir de ~1280px; a lista ocupa a altura livre da tela. */
body.theme-nfe-page .legacy-table-wrap,
body.theme-portal-list .portal-table-wrap {
    max-height: max(380px, calc(100vh - 120px));
}

body.theme-nfe-page .legacy-table-wrap:focus-visible,
body.theme-portal-list .portal-table-wrap:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

body.theme-nfe-page .legacy-table.legacy-nfe-table,
body.theme-portal-list .legacy-table.portal-table {
    min-width: 900px !important;
    font-size: 11px;
}

body.theme-nfe-page .legacy-nfe-table thead th,
body.theme-nfe-page .legacy-nfe-table tbody td,
body.theme-portal-list .portal-table thead th,
body.theme-portal-list .portal-table tbody td {
    font-size: 11px !important;
    padding: 4px 6px !important;
}

body.theme-nfe-page .legacy-nfe-table .legacy-col-numero { width: 11ch !important; min-width: 11ch !important; max-width: 11ch !important; font-variant-numeric: tabular-nums; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-fornecedor { width: auto !important; min-width: 0 !important; max-width: none !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-status-fluxo { width: 13ch !important; min-width: 13ch !important; max-width: 13ch !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-valor { width: 13ch !important; min-width: 13ch !important; max-width: 13ch !important; text-align: right; font-variant-numeric: tabular-nums; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-data { width: 18ch !important; min-width: 18ch !important; max-width: 18ch !important; font-variant-numeric: tabular-nums; }
body.theme-nfe-page .legacy-nfe-table .legacy-nfe-col-classificacao { width: 26ch !important; min-width: 26ch !important; max-width: 26ch !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-nfe-col-origem { width: 10ch !important; min-width: 10ch !important; max-width: 10ch !important; text-align: center; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-boleto { width: 7ch !important; min-width: 7ch !important; max-width: 7ch !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-cnpj { width: 16ch !important; min-width: 16ch !important; max-width: 16ch !important; font-variant-numeric: tabular-nums; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-chave { width: 15ch !important; min-width: 15ch !important; max-width: 15ch !important; font-size: 11px !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-chave.legacy-col-responsavel { width: 22ch !important; min-width: 22ch !important; max-width: 22ch !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-acoes { width: 7ch !important; min-width: 7ch !important; max-width: 7ch !important; }

body.theme-nfe-page .legacy-nfe-table th.legacy-col-valor {
    text-align: right;
}

body.theme-nfe-page .legacy-nfe-sub-setor,
body.theme-portal-list .portal-sub {
    color: #93a9bd;
}

body.theme-nfe-page .legacy-nfe-sub-setor::before,
body.theme-portal-list .portal-sub::before {
    content: " / ";
}

/* Tipografia minima das etiquetas (DESIGN.md: badge 9.6px; grade NF-e em 11px). */
body.theme-nfe-page .legacy-nfe-table .legacy-flow-status {
    font-size: 0.65rem !important;
}

body.theme-nfe-page .legacy-nfe-table .legacy-nfe-origin-badge {
    font-size: 0.625rem !important;
}

/* Estado vazio com caminho de saida. */
body.theme-nfe-page .legacy-empty-row td.legacy-empty-cell,
body.theme-portal-list .legacy-empty-row td.legacy-empty-cell {
    height: auto !important;
    padding: 0 !important;
    white-space: normal !important;
}

body.theme-nfe-page .legacy-empty-state,
body.theme-portal-list .legacy-empty-state {
    position: sticky;
    left: 0;
    display: grid;
    justify-items: center;
    gap: 6px;
    max-width: min(100%, 860px);
    margin: 0 auto;
    padding: 40px 16px;
    text-align: center;
}

body.theme-nfe-page .legacy-empty-state strong,
body.theme-portal-list .legacy-empty-state strong {
    color: #f6faff;
    font-size: 0.95rem;
}

body.theme-nfe-page .legacy-empty-state span,
body.theme-portal-list .legacy-empty-state span {
    color: #93a9bd;
    font-size: 0.8rem;
}

body.theme-nfe-page .legacy-empty-state .legacy-button,
body.theme-portal-list .legacy-empty-state .legacy-button {
    margin-top: 6px;
    height: 32px;
}

/* Menu de acoes da linha no tema do portal, com grupos separados e foco visivel. */
body.theme-nfe-page .legacy-row-menu {
    min-width: 200px;
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: #0f1c2c;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

body.theme-nfe-page .legacy-row-menu-item {
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    color: #dce8fb;
    font-size: 12px;
}

body.theme-nfe-page .legacy-row-menu-item:hover,
body.theme-nfe-page .legacy-row-menu-item:focus-visible {
    outline: none;
    background: rgba(45, 212, 191, 0.12);
    color: #ffffff;
}

body.theme-nfe-page .legacy-row-menu-item.starts-group {
    position: relative;
    margin-top: 9px;
}

body.theme-nfe-page .legacy-row-menu-item.starts-group::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 6px;
    right: 6px;
    height: 1px;
    background: rgba(148, 163, 184, 0.2);
}

body.theme-nfe-page .legacy-actions-trigger:focus-visible,
body.theme-nfe-page .legacy-modal-close:focus-visible,
body.theme-nfe-page .legacy-danfe-tab:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

/* Avisos (substituem o alert nativo). */
body.theme-legacy-nfe .legacy-inline-toast.is-error {
    max-width: min(440px, calc(100vw - 48px));
    border-color: rgba(255, 183, 183, 0.4);
    background: linear-gradient(180deg, rgba(76, 23, 23, 0.97) 0%, rgba(52, 16, 16, 0.97) 100%);
    color: #ffe3e3;
    line-height: 1.4;
}

/* Atalho de teclado para a lista. */
body.theme-nfe-page .legacy-skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 100;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

body.theme-nfe-page .legacy-skip-link:focus {
    left: 16px;
}

/* Tema claro. */
body.theme-mode-light.theme-nfe-page .legacy-nfe-panel-head .legacy-panel-title,
body.theme-mode-light.theme-nfe-page .legacy-nfe-stats dd,
body.theme-mode-light.theme-nfe-page .legacy-empty-state strong,
body.theme-mode-light.theme-portal-list .portal-panel-head .legacy-panel-title,
body.theme-mode-light.theme-portal-list .portal-stats dd,
body.theme-mode-light.theme-portal-list .legacy-empty-state strong {
    color: #172b4d;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-card,
body.theme-mode-light.theme-portal-list .portal-queue-card {
    border-color: rgba(19, 47, 91, 0.1);
    background:
        radial-gradient(circle at 10% 10%, rgba(var(--queue-accent-rgb), 0.12), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.98));
    box-shadow: 0 14px 28px rgba(28, 53, 92, 0.07);
    color: #172b4d;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-card.is-warning,
body.theme-mode-light.theme-portal-list .portal-queue-card.is-warning { --queue-ink: #9a5800; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-card.is-success,
body.theme-mode-light.theme-portal-list .portal-queue-card.is-success { --queue-ink: #1d7a35; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-card.is-info,
body.theme-mode-light.theme-portal-list .portal-queue-card.is-info { --queue-ink: #0f63ad; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-card.is-danger,
body.theme-mode-light.theme-portal-list .portal-queue-card.is-danger { --queue-ink: #c22a3a; }

body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-card.is-active,
body.theme-mode-light.theme-portal-list .portal-queue-card.is-active {
    background:
        radial-gradient(circle at 10% 10%, rgba(var(--queue-accent-rgb), 0.2), transparent 58%),
        linear-gradient(145deg, #ffffff, #f6f9fd);
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-card.is-active .legacy-nfe-queue-tag,
body.theme-mode-light.theme-portal-list .portal-queue-card.is-active .portal-queue-tag {
    background: var(--queue-ink);
    color: #ffffff;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-icon,
body.theme-mode-light.theme-portal-list .portal-queue-icon {
    color: var(--queue-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-label,
body.theme-mode-light.theme-portal-list .portal-queue-label {
    color: #405a74;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-card strong,
body.theme-mode-light.theme-portal-list .portal-queue-card strong {
    color: #172b4d;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-card.is-empty strong,
body.theme-mode-light.theme-nfe-page .legacy-nfe-queue-body small,
body.theme-mode-light.theme-portal-list .portal-queue-card.is-empty strong,
body.theme-mode-light.theme-portal-list .portal-queue-body small {
    color: #566a82;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-stats > div,
body.theme-mode-light.theme-portal-list .portal-stats > div {
    background: rgba(var(--stat-accent-rgb), 0.1);
    border-color: rgba(var(--stat-accent-rgb), 0.3);
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-stats dt,
body.theme-mode-light.theme-nfe-page .legacy-nfe-sub-setor,
body.theme-mode-light.theme-nfe-page .legacy-empty-state span,
body.theme-mode-light.theme-portal-list .portal-stats dt,
body.theme-mode-light.theme-portal-list .portal-sub,
body.theme-mode-light.theme-portal-list .legacy-empty-state span {
    color: #566a82;
}


body.theme-mode-light.theme-nfe-page .legacy-row-menu {
    border-color: rgba(19, 47, 91, 0.14);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(26, 54, 93, 0.16);
}

body.theme-mode-light.theme-nfe-page .legacy-row-menu-item {
    background: transparent;
    color: #172b4d;
}

body.theme-mode-light.theme-nfe-page .legacy-row-menu-item:hover,
body.theme-mode-light.theme-nfe-page .legacy-row-menu-item:focus-visible {
    background: rgba(15, 118, 110, 0.1);
    color: #0b2a4a;
}

body.theme-mode-light.theme-nfe-page .legacy-row-menu-item.starts-group::before {
    background: rgba(19, 47, 91, 0.12);
}

body.theme-mode-light.theme-legacy-nfe .legacy-inline-toast.is-error {
    border-color: rgba(194, 42, 58, 0.3);
    background: #fff1f1;
    color: #8f1f2b;
}

/* Telas menores. */
@media (max-width: 1100px) {
    body.theme-nfe-page .legacy-nfe-queue,
body.theme-portal-list .portal-queue {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body.theme-nfe-page .legacy-nfe-queue,
body.theme-portal-list .portal-queue {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    body.theme-nfe-page .legacy-nfe-queue-card,
body.theme-portal-list .portal-queue-card {
        min-height: 96px;
    }

    body.theme-nfe-page .legacy-nfe-filters .legacy-filter-field,
    body.theme-nfe-page .legacy-nfe-filters .legacy-field-fornecedor {
        flex: 1 1 100%;
        width: auto;
        max-width: none;
    }

    body.theme-nfe-page .legacy-nfe-filters .legacy-field-data-de,
    body.theme-nfe-page .legacy-nfe-filters .legacy-field-data-ate {
        flex: 1 1 140px;
        min-width: 0;
    }

    body.theme-nfe-page .legacy-nfe-filters .legacy-filter-buttons {
        margin-left: 0;
    }

    body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-details {
        flex-wrap: wrap;
    }

    body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-copy {
        flex-wrap: wrap;
    }

    body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-copy strong,
    body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-copy small,
    body.theme-legacy-nfe .active-loja-banner-inline .active-loja-banner-detail strong {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.theme-nfe-page .legacy-nfe-queue-card,
body.theme-portal-list .portal-queue-card {
        transition: none;
    }

    body.theme-nfe-page .legacy-nfe-queue-card:hover,
body.theme-portal-list .portal-queue-card:hover {
        transform: none;
    }
}

/* ==========================================================================
   Tela NF-e 1.37: barra de busca com painel de filtros e lista limpa com acoes em icones
   ========================================================================== */

.legacy-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Barra: busca | Filtros ............ atualizar | exportar | baixa */
body.theme-nfe-page .legacy-nfe-toolbar,
body.theme-portal-list .portal-toolbar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 4px 0 14px;
}

body.theme-nfe-page .legacy-nfe-search,
body.theme-portal-list .portal-search {
    display: flex;
    flex: 0 1 380px;
    min-width: 220px;
    height: 38px;
}

body.theme-nfe-page .legacy-nfe-search input,
body.theme-portal-list .portal-search input {
    flex: 1 1 0;
    width: auto !important;
    min-width: 0;
    height: 38px !important;
    min-height: 0 !important;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #eef5ff;
    font: 500 0.84rem "Segoe UI", Tahoma, sans-serif;
    text-transform: none;
}

body.theme-nfe-page .legacy-nfe-search input::placeholder,
body.theme-portal-list .portal-search input::placeholder {
    color: #8ea3b8;
    text-transform: none;
}

body.theme-nfe-page .legacy-nfe-search input:focus-visible,
body.theme-portal-list .portal-search input:focus-visible {
    outline: none;
    border-color: rgba(47, 169, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(47, 169, 255, 0.16);
}

body.theme-nfe-page .legacy-nfe-search-button,
body.theme-portal-list .portal-search-button {
    display: grid;
    width: 40px;
    place-items: center;
    border: 1px solid rgba(47, 169, 255, 0.5);
    border-radius: 0 10px 10px 0;
    background: rgba(47, 169, 255, 0.1);
    color: #7cc6ff;
    cursor: pointer;
}

body.theme-nfe-page .legacy-nfe-search-button:hover,
body.theme-portal-list .portal-search-button:hover {
    background: rgba(47, 169, 255, 0.2);
}

body.theme-nfe-page .legacy-nfe-toolbar svg,
body.theme-portal-list .portal-toolbar svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-nfe-page .legacy-nfe-filter-anchor,
body.theme-portal-list .portal-filter-anchor {
    position: relative;
}

body.theme-nfe-page .legacy-nfe-filter-toggle,
body.theme-nfe-page .legacy-nfe-outline-button,
body.theme-nfe-page .legacy-nfe-solid-button,
body.theme-portal-list .portal-filter-toggle,
body.theme-portal-list .portal-outline-button,
body.theme-portal-list .portal-solid-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    font: 700 0.84rem "Segoe UI", Tahoma, sans-serif;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body.theme-nfe-page .legacy-nfe-filter-toggle,
body.theme-nfe-page .legacy-nfe-outline-button,
body.theme-portal-list .portal-filter-toggle,
body.theme-portal-list .portal-outline-button {
    border: 1px solid rgba(47, 169, 255, 0.55);
    background: transparent;
    color: #8ccfff;
}

body.theme-nfe-page .legacy-nfe-filter-toggle:hover,
body.theme-nfe-page .legacy-nfe-outline-button:hover,
body.theme-portal-list .portal-filter-toggle:hover,
body.theme-portal-list .portal-outline-button:hover {
    background: rgba(47, 169, 255, 0.1);
    color: #cfeaff;
}

body.theme-nfe-page .legacy-nfe-filter-toggle[aria-expanded="true"],
body.theme-nfe-page .legacy-nfe-filter-toggle.has-filters,
body.theme-portal-list .portal-filter-toggle[aria-expanded="true"],
body.theme-portal-list .portal-filter-toggle.has-filters {
    background: rgba(47, 169, 255, 0.16);
    color: #e3f3ff;
}

body.theme-nfe-page .legacy-nfe-filter-chevron,
body.theme-portal-list .portal-filter-chevron {
    width: 14px !important;
    height: 14px !important;
    transition: transform 0.18s ease;
}

body.theme-nfe-page .legacy-nfe-filter-toggle[aria-expanded="true"] .legacy-nfe-filter-chevron,
body.theme-portal-list .portal-filter-toggle[aria-expanded="true"] .portal-filter-chevron {
    transform: rotate(180deg);
}

body.theme-nfe-page .legacy-nfe-filter-count,
body.theme-portal-list .portal-filter-count {
    display: inline-grid;
    min-width: 19px;
    height: 19px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #2fa9ff;
    color: #04121f;
    font-size: 0.68rem;
    font-weight: 800;
}

body.theme-nfe-page .legacy-nfe-filter-count[hidden],
body.theme-portal-list .portal-filter-count[hidden] {
    display: none;
}

body.theme-nfe-page .legacy-nfe-solid-button,
body.theme-portal-list .portal-solid-button {
    border: 1px solid transparent;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

body.theme-nfe-page .legacy-nfe-solid-button:hover,
body.theme-portal-list .portal-solid-button:hover {
    filter: brightness(1.08);
}

body.theme-nfe-page .legacy-nfe-filter-toggle:focus-visible,
body.theme-nfe-page .legacy-nfe-outline-button:focus-visible,
body.theme-nfe-page .legacy-nfe-solid-button:focus-visible,
body.theme-nfe-page .legacy-nfe-search-button:focus-visible,
body.theme-nfe-page .legacy-nfe-icon-button:focus-visible,
body.theme-portal-list .portal-filter-toggle:focus-visible,
body.theme-portal-list .portal-outline-button:focus-visible,
body.theme-portal-list .portal-solid-button:focus-visible,
body.theme-portal-list .portal-search-button:focus-visible,
body.theme-portal-list .portal-icon-button:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

body.theme-nfe-page .legacy-nfe-outline-button.legacy-button-disabled,
body.theme-portal-list .portal-outline-button.legacy-button-disabled {
    opacity: 0.45;
    pointer-events: none;
}

body.theme-nfe-page .legacy-nfe-toolbar-actions,
body.theme-portal-list .portal-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

body.theme-nfe-page .legacy-nfe-icon-button,
body.theme-portal-list .portal-icon-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: transparent;
    color: #a9c3dc;
    cursor: pointer;
}

body.theme-nfe-page .legacy-nfe-icon-button:hover,
body.theme-portal-list .portal-icon-button:hover {
    border-color: rgba(47, 169, 255, 0.5);
    color: #e3f3ff;
}

/* Painel de filtros (abre abaixo do botao Filtros). */
body.theme-nfe-page .legacy-nfe-filter-popover,
body.theme-portal-list .portal-filter-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 40;
    width: min(720px, calc(100vw - 48px));
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: #0f1c2c;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

body.theme-nfe-page .legacy-nfe-filter-popover[hidden],
body.theme-portal-list .portal-filter-popover[hidden] {
    display: none;
}

body.theme-nfe-page .legacy-nfe-filter-groups,
body.theme-portal-list .portal-filter-groups {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 18px 32px;
    padding: 20px 22px 18px;
}

body.theme-nfe-page .legacy-nfe-filter-group,
body.theme-portal-list .portal-filter-group {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

body.theme-nfe-page .legacy-nfe-filter-group legend,
body.theme-nfe-page .legacy-nfe-filter-subtitle,
body.theme-portal-list .portal-filter-group legend,
body.theme-portal-list .portal-filter-subtitle {
    margin: 0 0 4px;
    padding: 0;
    color: #f1f7ff;
    font-size: 0.86rem;
    font-weight: 700;
}

body.theme-nfe-page .legacy-nfe-filter-subtitle,
body.theme-portal-list .portal-filter-subtitle {
    margin-top: 10px;
}

body.theme-nfe-page .legacy-nfe-filter-range,
body.theme-portal-list .portal-filter-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: #a9bccd;
    font-size: 0.82rem;
}

body.theme-nfe-page .legacy-nfe-filter-popover .legacy-filter-field,
body.theme-portal-list .portal-filter-popover .legacy-filter-field {
    width: auto !important;
    min-width: 0 !important;
}

body.theme-nfe-page .legacy-nfe-filter-popover .legacy-filter-field > span:not(.legacy-visually-hidden),
body.theme-portal-list .portal-filter-popover .legacy-filter-field > span:not(.legacy-visually-hidden) {
    color: #a9bccd;
    font-size: 0.74rem;
    letter-spacing: 0;
    text-transform: none;
}

body.theme-nfe-page .legacy-nfe-filter-popover input[type="date"],
body.theme-portal-list .portal-filter-popover input[type="date"] {
    width: 100% !important;
    min-width: 0 !important;
}

body.theme-nfe-page .legacy-nfe-filter-popover input[type="date"],
body.theme-nfe-page .legacy-nfe-filter-popover select,
body.theme-portal-list .portal-filter-popover input[type="date"],
body.theme-portal-list .portal-filter-popover select {
    height: 38px !important;
    border-radius: 10px !important;
    font-size: 0.82rem !important;
}

body.theme-nfe-page .legacy-nfe-filter-options,
body.theme-portal-list .portal-filter-options {
    display: grid;
    align-content: start;
    gap: 2px;
}

body.theme-nfe-page .legacy-nfe-filter-option,
body.theme-portal-list .portal-filter-option {
    min-height: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    border-radius: 8px;
    color: #dce8fb;
    font-size: 0.86rem;
    cursor: pointer;
}

body.theme-nfe-page .legacy-nfe-filter-option:hover,
body.theme-portal-list .portal-filter-option:hover {
    background: rgba(47, 169, 255, 0.08);
}

body.theme-nfe-page .legacy-nfe-filter-option input,
body.theme-portal-list .portal-filter-option input {
    flex: 0 0 auto;
    width: 18px !important;
    height: 18px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0 !important;
    accent-color: #2fa9ff;
}

body.theme-nfe-page .legacy-nfe-filter-footer,
body.theme-portal-list .portal-filter-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

/* Lista limpa: cada NF-e numa linha arredondada, com respiro entre as linhas. */
body.theme-nfe-page .legacy-table-wrap,
body.theme-portal-list .portal-table-wrap {
    border: 0 !important;
    background: transparent;
}

body.theme-nfe-page .legacy-table.legacy-nfe-table,
body.theme-portal-list .legacy-table.portal-table {
    min-width: 900px !important;
    border-collapse: separate !important;
    border-spacing: 0 6px;
    font-size: 12.5px;
}

body.theme-nfe-page .legacy-nfe-table thead th,
body.theme-portal-list .portal-table thead th {
    padding: 4px 10px !important;
    border: 0 !important;
    background: #0d1a28 !important;
    color: #93a9bd !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    box-shadow: none !important;
}

body.theme-nfe-page .legacy-nfe-table tbody tr,
body.theme-nfe-page .legacy-nfe-table tbody tr:hover,
body.theme-nfe-page .legacy-nfe-table tbody tr.selected,
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-cancelada,
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-recusada,
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-pendente,
body.theme-portal-list .portal-table tbody tr,
body.theme-portal-list .portal-table tbody tr:hover,
body.theme-portal-list .portal-table tbody tr.selected,
body.theme-portal-list .portal-table tbody tr.legacy-row-cancelada,
body.theme-portal-list .portal-table tbody tr.legacy-row-recusada,
body.theme-portal-list .portal-table tbody tr.legacy-row-pendente {
    background: transparent !important;
    box-shadow: none !important;
}

body.theme-nfe-page .legacy-nfe-table tbody td,
body.theme-portal-list .portal-table tbody td {
    height: 50px !important;
    padding: 6px 10px !important;
    border-top: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    background: rgba(255, 255, 255, 0.025);
    color: #dce8fb !important;
    font-size: 12.5px !important;
    transition: background 0.16s ease, border-color 0.16s ease;
}

body.theme-nfe-page .legacy-nfe-table tbody td:first-child,
body.theme-portal-list .portal-table tbody td:first-child {
    border-left: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 12px 0 0 12px;
}

body.theme-nfe-page .legacy-nfe-table tbody td:last-child,
body.theme-portal-list .portal-table tbody td:last-child {
    border-right: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 0 12px 12px 0;
}

body.theme-nfe-page .legacy-nfe-table tbody tr:hover td,
body.theme-portal-list .portal-table tbody tr:hover td {
    background: rgba(47, 169, 255, 0.07);
    border-color: rgba(47, 169, 255, 0.3) !important;
}

body.theme-nfe-page .legacy-nfe-table tbody tr.selected td,
body.theme-portal-list .portal-table tbody tr.selected td {
    background: rgba(45, 212, 191, 0.08);
    border-color: rgba(45, 212, 191, 0.45) !important;
}

body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-cancelada td,
body.theme-portal-list .portal-table tbody tr.legacy-row-cancelada td {
    background: rgba(255, 83, 100, 0.06);
    color: #f3c9ce !important;
}

body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-recusada td,
body.theme-portal-list .portal-table tbody tr.legacy-row-recusada td {
    background: rgba(255, 173, 59, 0.06);
}

body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-empty-row td,
body.theme-portal-list .portal-table tbody tr.legacy-empty-row td {
    height: auto !important;
    border: 1px dashed rgba(148, 163, 184, 0.24) !important;
    border-radius: 12px;
    background: transparent;
}

/* Larguras das colunas (em px: a unidade ch do cabecalho e menor que a das linhas).
   Fornecedor vai no maximo ate o limite de 60 caracteres do nome do emitente na NF-e (xNome);
   o Setor / Sub-Setor NF fica com o espaco restante. */
body.theme-nfe-page .legacy-nfe-table .legacy-col-fornecedor { width: 170px !important; min-width: 170px !important; max-width: 170px !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-cnpj { width: 118px !important; min-width: 118px !important; max-width: 118px !important; font-variant-numeric: tabular-nums; color: #b7c8da !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-numero { width: 86px !important; min-width: 86px !important; max-width: 86px !important; font-variant-numeric: tabular-nums; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-valor { width: 104px !important; min-width: 104px !important; max-width: 104px !important; text-align: right; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-data { width: 126px !important; min-width: 126px !important; max-width: 126px !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-status-fluxo { width: 56px !important; min-width: 56px !important; max-width: 56px !important; text-align: center; }
body.theme-nfe-page .legacy-nfe-table .legacy-nfe-col-classificacao { width: auto !important; min-width: 0 !important; max-width: none !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-boleto { width: 60px !important; min-width: 60px !important; max-width: 60px !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-chave.legacy-col-responsavel { width: 160px !important; min-width: 160px !important; max-width: 160px !important; }
body.theme-nfe-page .legacy-nfe-table .legacy-col-acoes { width: 126px !important; min-width: 126px !important; max-width: 126px !important; text-align: right; }
body.theme-nfe-page.nfe-can-transfer .legacy-nfe-table .legacy-col-acoes { width: 214px !important; min-width: 214px !important; max-width: 214px !important; }

/* Com a coluna Responsavel, Fornecedor e Responsavel cedem espaco ate 1600px para o Setor nao sumir. */
body.theme-nfe-page.nfe-show-responsavel .legacy-nfe-table .legacy-col-chave.legacy-col-responsavel { width: 136px !important; min-width: 136px !important; max-width: 136px !important; }
body.theme-nfe-page.nfe-show-responsavel .legacy-table.legacy-nfe-table { min-width: 1020px !important; }

@media (max-width: 1599px) {
    body.theme-nfe-page.nfe-show-responsavel .legacy-nfe-table .legacy-col-fornecedor { width: 180px !important; min-width: 180px !important; max-width: 180px !important; }
}

@media (min-width: 1440px) {
    body.theme-nfe-page .legacy-nfe-table .legacy-col-fornecedor { width: 250px !important; min-width: 250px !important; max-width: 250px !important; }
}

@media (min-width: 1600px) {
    body.theme-nfe-page .legacy-nfe-table .legacy-col-fornecedor { width: 340px !important; min-width: 340px !important; max-width: 340px !important; }
}

@media (min-width: 1800px) {
    body.theme-nfe-page .legacy-nfe-table .legacy-col-fornecedor { width: 430px !important; min-width: 430px !important; max-width: 430px !important; }
}

body.theme-nfe-page .legacy-nfe-col-classificacao .legacy-nfe-origin-badge {
    margin-right: 6px;
    vertical-align: middle;
}

/* Status em icone: circulo na cor do status, nome no tooltip e no leitor de tela. */
body.theme-nfe-page .legacy-nfe-table .legacy-flow-status.legacy-flow-status-icon,
body.theme-portal-list .portal-table .portal-status-icon {
    display: inline-grid;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    place-items: center;
    padding: 0 !important;
    border-radius: 50%;
    font-size: 0 !important;
    line-height: 0;
    vertical-align: middle;
    cursor: help;
}

body.theme-nfe-page .legacy-flow-status-icon svg,
body.theme-portal-list .portal-status-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-nfe-page .legacy-flow-status-icon:hover,
body.theme-portal-list .portal-status-icon:hover {
    filter: brightness(1.15);
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table .legacy-col-cnpj {
    color: #405a74 !important;
}

/* Celula do fornecedor: icone, nome e CNPJ embaixo. */
body.theme-nfe-page .legacy-nfe-supplier,
body.theme-portal-list .portal-entity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.theme-nfe-page .legacy-nfe-supplier-icon,
body.theme-portal-list .portal-entity-icon {
    display: grid;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: rgba(45, 212, 191, 0.12);
    color: #4fe0c9;
}

body.theme-nfe-page .legacy-nfe-supplier-icon svg,
body.theme-portal-list .portal-entity-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-nfe-page .legacy-nfe-supplier-text,
body.theme-portal-list .portal-entity-text {
    display: grid;
    min-width: 0;
    line-height: 1.25;
}

body.theme-nfe-page .legacy-nfe-supplier-name,
body.theme-portal-list .portal-entity-name {
    overflow: hidden;
    color: #f1f7ff;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-nfe-page .legacy-nfe-supplier-text small,
body.theme-nfe-page .legacy-nfe-table .legacy-col-data small,
body.theme-portal-list .portal-entity-text small {
    overflow: hidden;
    color: #8ea3b8;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-nfe-page .legacy-nfe-supplier-text small .legacy-transfer-caption {
    margin-left: 6px;
    color: #ffc160;
}

body.theme-nfe-page .legacy-nfe-table .legacy-col-valor {
    color: #f6faff !important;
    font-weight: 700;
}

/* Acoes em icones no fim da linha. */
body.theme-nfe-page .legacy-nfe-row-actions,
body.theme-portal-list .portal-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
}

body.theme-nfe-page .legacy-nfe-row-action,
body.theme-portal-list .portal-row-action {
    display: grid;
    width: 24px;
    height: 26px;
    place-items: center;
    padding: 0;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    box-shadow: none !important;
    color: #5fb8ff;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

body.theme-nfe-page .legacy-nfe-row-action svg,
body.theme-portal-list .portal-row-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-nfe-page .legacy-nfe-row-action[data-row-action="status"] { color: #4fe0c9; }
body.theme-nfe-page .legacy-nfe-row-action[data-row-action="setor"] { color: #ffc160; }
body.theme-nfe-page .legacy-nfe-row-action[data-row-action="copy"] { color: #b9a6ff; }
body.theme-nfe-page .legacy-nfe-row-action[data-row-action="transferir"],
body.theme-nfe-page .legacy-nfe-row-action[data-row-action="aceitar_transferencia"] { color: #72db62; }
body.theme-nfe-page .legacy-nfe-row-action[data-row-action="recusar_transferencia"],
body.theme-nfe-page .legacy-nfe-row-action[data-row-action="cancelar_transferencia"] { color: #ff8a96; }

body.theme-nfe-page .legacy-nfe-row-action:hover,
body.theme-portal-list .portal-row-action:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

body.theme-nfe-page .legacy-nfe-row-action:focus-visible,
body.theme-portal-list .portal-row-action:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 1px;
}

body.theme-nfe-page .legacy-nfe-row-action.is-disabled,
body.theme-portal-list .portal-row-action.is-disabled {
    color: #4d6075 !important;
    cursor: not-allowed;
}

body.theme-nfe-page .legacy-nfe-row-action.is-disabled:hover,
body.theme-portal-list .portal-row-action.is-disabled:hover {
    background: transparent !important;
}

/* Resumo no rodape da lista. */
body.theme-nfe-page .legacy-nfe-list-summary,
body.theme-portal-list .portal-list-summary {
    margin: 10px 4px 0;
    color: #93a9bd;
    font-size: 0.8rem;
}

body.theme-nfe-page .legacy-nfe-list-summary:empty,
body.theme-portal-list .portal-list-summary:empty {
    display: none;
}

/* Tema claro. */
body.theme-mode-light.theme-nfe-page .legacy-nfe-search input,
body.theme-mode-light.theme-portal-list .portal-search input {
    border-color: #cfdcec;
    background: #ffffff;
    color: #172b4d;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-search input::placeholder,
body.theme-mode-light.theme-portal-list .portal-search input::placeholder {
    color: #566a82;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-search-button,
body.theme-mode-light.theme-portal-list .portal-search-button {
    border-color: #1f5fd6;
    background: #ffffff;
    color: #1f5fd6;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-toggle,
body.theme-mode-light.theme-nfe-page .legacy-nfe-outline-button,
body.theme-mode-light.theme-portal-list .portal-filter-toggle,
body.theme-mode-light.theme-portal-list .portal-outline-button {
    border-color: #1f5fd6;
    color: #1f5fd6;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-toggle:hover,
body.theme-mode-light.theme-nfe-page .legacy-nfe-outline-button:hover,
body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-toggle[aria-expanded="true"],
body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-toggle.has-filters,
body.theme-mode-light.theme-portal-list .portal-filter-toggle:hover,
body.theme-mode-light.theme-portal-list .portal-outline-button:hover,
body.theme-mode-light.theme-portal-list .portal-filter-toggle[aria-expanded="true"],
body.theme-mode-light.theme-portal-list .portal-filter-toggle.has-filters {
    background: #e8f0fe;
    color: #173f9c;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-count,
body.theme-mode-light.theme-portal-list .portal-filter-count {
    background: #1f5fd6;
    color: #ffffff;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-icon-button,
body.theme-mode-light.theme-portal-list .portal-icon-button {
    border-color: #cfdcec;
    color: #405a74;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-popover,
body.theme-mode-light.theme-portal-list .portal-filter-popover {
    border-color: #dbe5f1;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(26, 54, 93, 0.18);
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-group legend,
body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-subtitle,
body.theme-mode-light.theme-portal-list .portal-filter-group legend,
body.theme-mode-light.theme-portal-list .portal-filter-subtitle {
    color: #172b4d;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-range,
body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-popover .legacy-filter-field > span:not(.legacy-visually-hidden),
body.theme-mode-light.theme-portal-list .portal-filter-range,
body.theme-mode-light.theme-portal-list .portal-filter-popover .legacy-filter-field > span:not(.legacy-visually-hidden) {
    color: #405a74;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-option,
body.theme-mode-light.theme-portal-list .portal-filter-option {
    color: #172b4d;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-option:hover,
body.theme-mode-light.theme-portal-list .portal-filter-option:hover {
    background: #f1f6fd;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-option input,
body.theme-mode-light.theme-portal-list .portal-filter-option input {
    accent-color: #1f5fd6;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-filter-footer,
body.theme-mode-light.theme-portal-list .portal-filter-footer {
    border-top-color: #e3eaf3;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table thead th,
body.theme-mode-light.theme-portal-list .portal-table thead th {
    background: #ffffff !important;
    color: #566a82 !important;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody td,
body.theme-mode-light.theme-portal-list .portal-table tbody td {
    border-top-color: #dbe5f1 !important;
    border-bottom-color: #dbe5f1 !important;
    background: #f9fbfe;
    color: #172b4d !important;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody td:first-child,
body.theme-mode-light.theme-portal-list .portal-table tbody td:first-child {
    border-left-color: #dbe5f1 !important;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody td:last-child,
body.theme-mode-light.theme-portal-list .portal-table tbody td:last-child {
    border-right-color: #dbe5f1 !important;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr:hover td,
body.theme-mode-light.theme-portal-list .portal-table tbody tr:hover td {
    background: #f1f6fd;
    border-color: #b7cdf0 !important;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.selected td,
body.theme-mode-light.theme-portal-list .portal-table tbody tr.selected td {
    background: #eefaf8;
    border-color: #7fd3c6 !important;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-cancelada td,
body.theme-mode-light.theme-portal-list .portal-table tbody tr.legacy-row-cancelada td {
    background: #fff6f7;
    color: #7d2630 !important;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-recusada td,
body.theme-mode-light.theme-portal-list .portal-table tbody tr.legacy-row-recusada td {
    background: #fffaf0;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-supplier-icon,
body.theme-mode-light.theme-portal-list .portal-entity-icon {
    background: #e3f6f3;
    color: #0f766e;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-supplier-name,
body.theme-mode-light.theme-nfe-page .legacy-nfe-table .legacy-col-valor,
body.theme-mode-light.theme-portal-list .portal-entity-name {
    color: #172b4d !important;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-supplier-text small,
body.theme-mode-light.theme-nfe-page .legacy-nfe-table .legacy-col-data small,
body.theme-mode-light.theme-nfe-page .legacy-nfe-list-summary,
body.theme-mode-light.theme-portal-list .portal-entity-text small,
body.theme-mode-light.theme-portal-list .portal-list-summary {
    color: #566a82;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-supplier-text small .legacy-transfer-caption {
    color: #9a5800;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action,
body.theme-mode-light.theme-portal-list .portal-row-action { color: #1f5fd6; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action[data-row-action="status"] { color: #0f766e; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action[data-row-action="setor"] { color: #9a5800; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action[data-row-action="copy"] { color: #6b4fd8; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action[data-row-action="transferir"],
body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action[data-row-action="aceitar_transferencia"] { color: #1d7a35; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action[data-row-action="recusar_transferencia"],
body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action[data-row-action="cancelar_transferencia"] { color: #c22a3a; }

body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action:hover,
body.theme-mode-light.theme-portal-list .portal-row-action:hover {
    background: #e8f0fe !important;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-row-action.is-disabled,
body.theme-mode-light.theme-portal-list .portal-row-action.is-disabled {
    color: #b8c4d3 !important;
}

/* Telas menores. */
@media (max-width: 860px) {
    body.theme-nfe-page .legacy-nfe-search,
body.theme-portal-list .portal-search {
        flex: 1 1 100%;
    }

    body.theme-nfe-page .legacy-nfe-toolbar-actions,
body.theme-portal-list .portal-toolbar-actions {
        margin-left: 0;
    }

    body.theme-nfe-page .legacy-nfe-filter-groups,
body.theme-portal-list .portal-filter-groups {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    body.theme-nfe-page .legacy-nfe-filter-anchor,
body.theme-portal-list .portal-filter-anchor {
        flex: 1 1 100%;
    }

    body.theme-nfe-page .legacy-nfe-filter-popover,
body.theme-portal-list .portal-filter-popover {
        position: static;
        width: auto;
        margin-top: 10px;
    }

    body.theme-nfe-page .legacy-nfe-filter-range,
body.theme-portal-list .portal-filter-range {
        grid-template-columns: minmax(0, 1fr);
    }

    body.theme-nfe-page .legacy-nfe-filter-range > span,
body.theme-portal-list .portal-filter-range > span {
        display: none;
    }
}

/* NF-e (lista limpa): a celula de Acoes segue a cor da linha em todos os estados.
   Anula o estilo antigo da grade (coluna fixa a direita com fundo proprio, sombra e azul ao selecionar). */
body.theme-nfe-page .legacy-nfe-table thead th.legacy-col-acoes,
body.theme-nfe-page .legacy-nfe-table tbody td.legacy-col-acoes {
    position: static !important;
    box-shadow: none !important;
}

body.theme-nfe-page .legacy-nfe-table thead th.legacy-col-acoes { background: #0d1a28 !important; }
body.theme-nfe-page .legacy-nfe-table tbody td.legacy-col-acoes { background: rgba(255, 255, 255, 0.025) !important; }
body.theme-nfe-page .legacy-nfe-table tbody tr:hover td.legacy-col-acoes { background: rgba(47, 169, 255, 0.07) !important; }
body.theme-nfe-page .legacy-nfe-table tbody tr.selected td.legacy-col-acoes { background: rgba(45, 212, 191, 0.08) !important; }
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-cancelada td.legacy-col-acoes { background: rgba(255, 83, 100, 0.06) !important; }
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-recusada td.legacy-col-acoes { background: rgba(255, 173, 59, 0.06) !important; }

body.theme-mode-light.theme-nfe-page .legacy-nfe-table thead th.legacy-col-acoes { background: #ffffff !important; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody td.legacy-col-acoes { background: #f9fbfe !important; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr:hover td.legacy-col-acoes { background: #f1f6fd !important; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.selected td.legacy-col-acoes { background: #eefaf8 !important; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-cancelada td.legacy-col-acoes { background: #fff6f7 !important; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-recusada td.legacy-col-acoes { background: #fffaf0 !important; }

/* ==========================================================================
   Padrao de lista do portal (21/10/2026)
   Pecas da tela NF-e reutilizadas nas demais telas via body.theme-portal-list
   e classes portal-* (as regras acima valem para as duas). Aqui ficam so os
   complementos genericos: cores de acoes, colunas utilitarias e avisos.
   ========================================================================== */

/* Cores das acoes em icone (a cor diz o tipo da acao). */
body.theme-portal-list .portal-row-action { color: #5fb8ff; }
body.theme-portal-list .portal-row-action.is-status { color: #4fe0c9; }
body.theme-portal-list .portal-row-action.is-edit { color: #ffc160; }
body.theme-portal-list .portal-row-action.is-copy { color: #b9a6ff; }
body.theme-portal-list .portal-row-action.is-ok { color: #72db62; }
body.theme-portal-list .portal-row-action.is-danger { color: #ff8a96; }
body.theme-portal-list .portal-row-action.is-neutral { color: #a9c3dc; }

body.theme-mode-light.theme-portal-list .portal-row-action { color: #1f5fd6; }
body.theme-mode-light.theme-portal-list .portal-row-action.is-status { color: #0f766e; }
body.theme-mode-light.theme-portal-list .portal-row-action.is-edit { color: #9a5800; }
body.theme-mode-light.theme-portal-list .portal-row-action.is-copy { color: #6b4fd8; }
body.theme-mode-light.theme-portal-list .portal-row-action.is-ok { color: #1d7a35; }
body.theme-mode-light.theme-portal-list .portal-row-action.is-danger { color: #c22a3a; }
body.theme-mode-light.theme-portal-list .portal-row-action.is-neutral { color: #405a74; }

body.theme-portal-list a.portal-row-action {
    text-decoration: none;
}

body.theme-portal-list .portal-row-actions form {
    display: contents;
    margin: 0;
}

/* Colunas utilitarias da lista. */
/* Largura da coluna de acoes pelo numero de icones (--row-actions, padrao 3). */
body.theme-portal-list .portal-table .portal-col-actions {
    width: calc(var(--row-actions, 3) * 25px + 26px) !important;
    min-width: calc(var(--row-actions, 3) * 25px + 26px) !important;
    max-width: none !important;
    text-align: right;
    white-space: nowrap;
}

body.theme-portal-list .portal-table .portal-col-money {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.theme-portal-list .portal-table td.portal-col-money {
    color: #f6faff !important;
    font-weight: 700;
}

body.theme-portal-list .portal-table .portal-col-num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.theme-portal-list .portal-table .portal-col-center {
    text-align: center;
}

body.theme-portal-list .portal-table .portal-col-muted {
    color: #b7c8da !important;
}

body.theme-portal-list .portal-table .portal-col-ellipsis {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-portal-list .portal-cell-sub {
    display: block;
    overflow: hidden;
    color: #8ea3b8;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-portal-list .portal-table td .portal-cell-sub-inline {
    color: #8ea3b8;
    font-size: 0.72rem;
}

body.theme-mode-light.theme-portal-list .portal-table td.portal-col-money {
    color: #172b4d !important;
}

body.theme-mode-light.theme-portal-list .portal-table .portal-col-muted {
    color: #405a74 !important;
}

body.theme-mode-light.theme-portal-list .portal-cell-sub,
body.theme-mode-light.theme-portal-list .portal-table td .portal-cell-sub-inline {
    color: #566a82;
}

/* Etiqueta pequena dentro da lista (ex.: Ativo/Inativo, origem). */
body.theme-portal-list .portal-pill {
    --pill-rgb: 147, 169, 189;
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border: 1px solid rgba(var(--pill-rgb), 0.32);
    border-radius: 999px;
    background: rgba(var(--pill-rgb), 0.12);
    color: rgb(var(--pill-rgb));
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

body.theme-portal-list .portal-pill.is-success { --pill-rgb: 114, 219, 98; }
body.theme-portal-list .portal-pill.is-info { --pill-rgb: 95, 184, 255; }
body.theme-portal-list .portal-pill.is-warning { --pill-rgb: 255, 173, 59; }
body.theme-portal-list .portal-pill.is-danger { --pill-rgb: 255, 120, 134; }
body.theme-portal-list .portal-pill.is-teal { --pill-rgb: 79, 224, 201; }

body.theme-mode-light.theme-portal-list .portal-pill { --pill-rgb: 64, 90, 116; }
body.theme-mode-light.theme-portal-list .portal-pill.is-success { --pill-rgb: 29, 122, 53; }
body.theme-mode-light.theme-portal-list .portal-pill.is-info { --pill-rgb: 15, 99, 173; }
body.theme-mode-light.theme-portal-list .portal-pill.is-warning { --pill-rgb: 154, 88, 0; }
body.theme-mode-light.theme-portal-list .portal-pill.is-danger { --pill-rgb: 194, 42, 58; }
body.theme-mode-light.theme-portal-list .portal-pill.is-teal { --pill-rgb: 15, 118, 110; }

/* Tons extras dos cards da fila. */
body.theme-portal-list .portal-queue-card.is-purple { --queue-accent: #b777f4; --queue-accent-rgb: 183, 119, 244; }
body.theme-portal-list .portal-queue-card.is-teal { --queue-accent: #2dd4bf; --queue-accent-rgb: 45, 212, 191; }
body.theme-mode-light.theme-portal-list .portal-queue-card.is-purple { --queue-ink: #7b3fc4; }
body.theme-mode-light.theme-portal-list .portal-queue-card.is-teal { --queue-ink: #0f766e; }

/* NFS-e: larguras das colunas (Prestador ate o limite de 60 caracteres do nome, como na NF-e). */
body.theme-nfse-page .portal-table .nfse-col-prestador { width: 230px; min-width: 230px; max-width: 230px; }
body.theme-nfse-page .portal-table .nfse-col-cnpj { width: 130px; }
body.theme-nfse-page .portal-table .nfse-col-numero { width: 90px; }
body.theme-nfse-page .portal-table .nfse-col-valor { width: 116px; }
body.theme-nfse-page .portal-table .nfse-col-data { width: 130px; }
body.theme-nfse-page .portal-table .nfse-col-status { width: 60px; }

@media (min-width: 1600px) {
    body.theme-nfse-page .portal-table .nfse-col-prestador { width: 340px; min-width: 340px; max-width: 340px; }
}

/* Subtitulo discreto ao lado do titulo do painel. */
body.theme-portal-list .portal-panel-subtitle {
    margin-left: 8px;
    color: #93a9bd;
    font-size: 0.82rem;
    font-weight: 500;
}

body.theme-mode-light.theme-portal-list .portal-panel-subtitle {
    color: #566a82;
}

/* Linha de registro excluido (mantido para auditoria). */
body.theme-portal-list .portal-table tbody tr.is-excluded td {
    background: rgba(255, 83, 100, 0.06);
    color: #a9b3c1 !important;
}

body.theme-mode-light.theme-portal-list .portal-table tbody tr.is-excluded td {
    background: #fff6f7;
    color: #6b7686 !important;
}

/* Romaneios: larguras das colunas. */
body.theme-romaneio-page .portal-table .romaneio-col-fornecedor { width: 230px; min-width: 230px; max-width: 230px; }
body.theme-romaneio-page .portal-table .romaneio-col-cnpj { width: 130px; }
body.theme-romaneio-page .portal-table .romaneio-col-numero { width: 80px; }
body.theme-romaneio-page .portal-table .romaneio-col-valor { width: 116px; }
body.theme-romaneio-page .portal-table .romaneio-col-emissao { width: 96px; }
body.theme-romaneio-page .portal-table .romaneio-col-loja { width: 150px; }
body.theme-romaneio-page .portal-table .romaneio-col-lancado { width: 130px; }

@media (min-width: 1600px) {
    body.theme-romaneio-page .portal-table .romaneio-col-fornecedor { width: 340px; min-width: 340px; max-width: 340px; }
}

/* Registro inativo: texto apagado, sem cor de alerta. */
body.theme-portal-list .portal-table tbody tr.is-inactive td {
    color: #8ea3b8 !important;
}

body.theme-portal-list .portal-table tbody tr.is-inactive .portal-entity-name {
    color: #a9bccd;
}

body.theme-mode-light.theme-portal-list .portal-table tbody tr.is-inactive td,
body.theme-mode-light.theme-portal-list .portal-table tbody tr.is-inactive .portal-entity-name {
    color: #6b7686 !important;
}

/* Fornecedores: larguras das colunas. */
body.theme-fornecedores-page .portal-table .fornecedor-col-nome { width: 250px; min-width: 250px; max-width: 250px; }
body.theme-fornecedores-page .portal-table .fornecedor-col-documento { width: 130px; }
body.theme-fornecedores-page .portal-table .fornecedor-col-loja { width: 140px; }
body.theme-fornecedores-page .portal-table .fornecedor-col-cidade { width: 150px; }
body.theme-fornecedores-page .portal-table .fornecedor-col-origem { width: 76px; }
body.theme-fornecedores-page .portal-table .fornecedor-col-status { width: 60px; }

@media (min-width: 1600px) {
    body.theme-fornecedores-page .portal-table .fornecedor-col-nome { width: 340px; min-width: 340px; max-width: 340px; }
}

/* Setor NF e Sub-Setor NF: larguras das colunas. */
body.theme-setores-page .portal-table .setor-col-nome { width: 300px; min-width: 300px; max-width: 300px; }
body.theme-setores-page .portal-table .setor-col-codigo { width: 90px; }
body.theme-setores-page .portal-table .setor-col-status { width: 70px; }
body.theme-sub-setores-page .portal-table .sub-setor-col-nome { width: 280px; min-width: 280px; max-width: 280px; }
body.theme-sub-setores-page .portal-table .sub-setor-col-setor { width: 200px; }
body.theme-sub-setores-page .portal-table .sub-setor-col-codigo { width: 90px; }
body.theme-sub-setores-page .portal-table .sub-setor-col-status { width: 70px; }

/* Contas a Pagar: larguras das colunas e caixa de selecao. */
body.theme-contas-pagar-page .portal-table .fin-col-select { width: 36px; min-width: 36px; max-width: 36px; text-align: center; }
body.theme-contas-pagar-page .portal-table .fin-col-select input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0 !important;
    accent-color: #2fa9ff;
}
body.theme-mode-light.theme-contas-pagar-page .portal-table .fin-col-select input[type="checkbox"] { accent-color: #1f5fd6; }
body.theme-contas-pagar-page .portal-table .fin-col-fornecedor { width: 220px; min-width: 220px; max-width: 220px; }
body.theme-contas-pagar-page .portal-table .fin-col-cnpj { width: 116px; }
body.theme-contas-pagar-page .portal-table .fin-col-numero { width: 80px; }
body.theme-contas-pagar-page .portal-table .fin-col-vencimento { width: 98px; }
body.theme-contas-pagar-page .portal-table .fin-col-valor { width: 124px; }
body.theme-contas-pagar-page .portal-table .fin-col-status { width: 56px; }
body.theme-contas-pagar-page .portal-table .fin-col-banco { width: 120px; }
body.theme-contas-pagar-page .portal-table .fin-col-loja { width: 120px; }
body.theme-contas-pagar-page .portal-table td.fin-col-valor .portal-cell-sub { font-weight: 500; text-align: right; }

@media (min-width: 1600px) {
    body.theme-contas-pagar-page .portal-table .fin-col-fornecedor { width: 300px; min-width: 300px; max-width: 300px; }
}

/* Barra da baixa em lote no padrao do portal. */
body.theme-portal-list .legacy-financeiro-batch-bar:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    padding: 10px 14px;
    border: 1px solid rgba(47, 169, 255, 0.35);
    border-radius: 12px;
    background: rgba(47, 169, 255, 0.08);
}

body.theme-mode-light.theme-portal-list .legacy-financeiro-batch-bar:not([hidden]) {
    border-color: #b7cdf0;
    background: #eef4ff;
}

/* Caixas de selecao nas listas do portal (selecao para acoes em lote). */
body.theme-portal-list .portal-table th input[type="checkbox"],
body.theme-portal-list .portal-table td input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0 !important;
    accent-color: #2fa9ff;
}

body.theme-mode-light.theme-portal-list .portal-table th input[type="checkbox"],
body.theme-mode-light.theme-portal-list .portal-table td input[type="checkbox"] {
    accent-color: #1f5fd6;
}

/* Barra de acoes em lote (Contas a Receber). */
body.theme-portal-list .portal-batch-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    margin: 0 0 10px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

body.theme-portal-list .portal-batch-bar > div:first-child {
    display: grid;
    gap: 2px;
    color: #dce8fb;
    font-size: 0.82rem;
}

body.theme-portal-list .portal-batch-bar > div:first-child span {
    color: #93a9bd;
    font-size: 0.74rem;
}

body.theme-portal-list .portal-batch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.theme-portal-list .portal-batch-actions svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-mode-light.theme-portal-list .portal-batch-bar {
    border-color: #dbe5f1;
    background: #f9fbfe;
}

body.theme-mode-light.theme-portal-list .portal-batch-bar > div:first-child { color: #172b4d; }
body.theme-mode-light.theme-portal-list .portal-batch-bar > div:first-child span { color: #566a82; }

/* Contas a Receber, Recebiveis e Contas Bancarias: larguras das colunas. */
body.theme-contas-receber-page .portal-table .cr-col-check { width: 36px; text-align: center; }
body.theme-contas-receber-page .portal-table .cr-col-documento { width: 230px; min-width: 230px; max-width: 230px; }
body.theme-contas-receber-page .portal-table .cr-col-conta { width: 160px; }
body.theme-contas-receber-page .portal-table .cr-col-recebivel { width: 130px; }
body.theme-contas-receber-page .portal-table .cr-col-data { width: 130px; }
body.theme-contas-receber-page .portal-table .cr-col-valor { width: 116px; }
body.theme-contas-receber-page .portal-table .cr-col-status { width: 56px; }
body.theme-contas-receber-page .portal-table .cr-col-loja { width: 130px; }
body.theme-recebiveis-cadastro-page .portal-table .rec-col-nome { width: 300px; min-width: 300px; max-width: 300px; }
body.theme-recebiveis-cadastro-page .portal-table .rec-col-status { width: 70px; }
body.theme-contas-page .portal-table .cb-col-conta { width: 240px; min-width: 240px; max-width: 240px; }
body.theme-contas-page .portal-table .cb-col-agencia { width: 80px; }
body.theme-contas-page .portal-table .cb-col-numero { width: 110px; }
body.theme-contas-page .portal-table .cb-col-tipo { width: 100px; }
body.theme-contas-page .portal-table .cb-col-pix { width: 170px; }
body.theme-contas-page .portal-table .cb-col-status { width: 60px; }
body.theme-contas-page .portal-table .cb-col-loja { width: 140px; }

/* Provisoes, relatorios e cadastros financeiros: larguras das colunas. */
body.theme-provisoes-page .portal-table .prov-col-nome { width: 250px; min-width: 250px; max-width: 250px; }
body.theme-provisoes-page .portal-table .prov-col-tipo { width: 130px; }
body.theme-provisoes-page .portal-table .prov-col-vencimento { width: 100px; }
body.theme-provisoes-page .portal-table .prov-col-previsto,
body.theme-provisoes-page .portal-table .prov-col-real { width: 120px; }
body.theme-provisoes-page .portal-table .prov-col-status { width: 60px; }
body.theme-setores-fin-page .portal-table .sf-col-nome { width: 300px; min-width: 300px; max-width: 300px; }
body.theme-setores-fin-page .portal-table .sf-col-codigo { width: 90px; }
body.theme-setores-fin-page .portal-table .sf-col-status { width: 70px; }
body.theme-sub-setores-fin-page .portal-table .ssf-col-nome { width: 300px; min-width: 300px; max-width: 300px; }
body.theme-sub-setores-fin-page .portal-table .ssf-col-codigo { width: 90px; }
body.theme-sub-setores-fin-page .portal-table .ssf-col-vinculos { width: 120px; }
body.theme-sub-setores-fin-page .portal-table .ssf-col-status { width: 70px; }

/* Relatorios: barra de filtros com a nota explicativa ao lado. */
body.theme-portal-report .portal-toolbar .report-note {
    flex: 1 1 260px;
    margin: 0;
    color: #93a9bd;
    font-size: 0.74rem;
    line-height: 1.35;
}

body.theme-mode-light.theme-portal-report .portal-toolbar .report-note { color: #566a82; }

body.theme-portal-report .portal-queue-card .report-card-amount {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

body.theme-portal-report .portal-queue-card button.report-value {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--queue-ink);
    text-align: left;
    text-decoration: underline dotted;
    text-underline-offset: 4px;
    cursor: pointer;
}

body.theme-portal-report .portal-queue-card button.report-value:disabled {
    text-decoration: none;
    cursor: default;
}

/* Status em icone fora das listas do portal (ex.: Dashboard). */
body.theme-portal-list .portal-status-icon {
    display: inline-grid;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    place-items: center;
    padding: 0 !important;
    border-radius: 50%;
    font-size: 0 !important;
    line-height: 0;
    vertical-align: middle;
    cursor: help;
}

body.theme-portal-list .portal-status-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Titulo de secao dentro de telas com mais de uma lista (Manutencao, Sincronia). */
body.theme-portal-list .portal-section-title {
    margin: 0 0 10px !important;
    font-size: 1.02rem !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

/* Configuracoes e Acessos: larguras das colunas. */
body.theme-lojas-page .portal-table .lj-col-loja { width: 280px; min-width: 280px; max-width: 280px; }
body.theme-lojas-page .portal-table .lj-col-cnpj { width: 130px; }
body.theme-lojas-page .portal-table .lj-col-cidade { width: 160px; }
body.theme-lojas-page .portal-table .lj-col-id { width: 50px; }
body.theme-lojas-page .portal-table .lj-col-ambiente { width: 110px; }
body.theme-lojas-page .portal-table .lj-col-sync { width: 80px; }
body.theme-usuarios-page .portal-table .us-col-nome { width: 240px; min-width: 240px; max-width: 240px; }
body.theme-usuarios-page .portal-table .us-col-email { width: 220px; }
body.theme-usuarios-page .portal-table .us-col-perfil { width: 150px; }
body.theme-usuarios-page .portal-table .us-col-privilegios { width: 90px; }
body.theme-usuarios-page .portal-table .us-col-status { width: 60px; }
body.theme-permissoes-page .portal-table .pm-col-nome { width: 320px; min-width: 320px; max-width: 320px; }
body.theme-permissoes-page .portal-table .pm-col-uso { width: 90px; }
body.theme-manutencao-page .portal-table .mt-col-data { width: 130px; }
body.theme-manutencao-page .portal-table .mt-col-tamanho { width: 90px; }
body.theme-manutencao-page .portal-table .mt-col-por { width: 130px; }
body.theme-manutencao-page .portal-table .mt-col-tipo { width: 110px; }
body.theme-manutencao-page .portal-table .mt-col-status { width: 60px; }

/* Manutencao: os dois historicos ficam lado a lado; a lista nao precisa da largura minima padrao. */
body.theme-manutencao-page .legacy-table.portal-table {
    min-width: 0 !important;
}

/* Sincronia: a tabela de controle tem campos editaveis; mantem a rolagem lateral propria. */
body.theme-sincronia-page .sincronia-control-table tbody td {
    height: auto !important;
}

body.theme-sincronia-page .legacy-sincronia-loja-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.theme-sincronia-page .legacy-sincronia-raw-log-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* RH: larguras das colunas. */
body.theme-rh-page .portal-table .rh-col-nome { width: 240px; min-width: 240px; max-width: 240px; }
body.theme-rh-page .portal-table .rh-col-documento { width: 130px; }
body.theme-rh-page .portal-table .rh-col-telefone { width: 120px; }
body.theme-rh-page .portal-table .rh-col-setor { width: 220px; }
body.theme-rh-page .portal-table .rh-col-status { width: 60px; }

/* A coluna principal pode encolher: tabelas largas rolam dentro do proprio quadro. */
body.theme-portal-list .layout-shell > .content {
    min-width: 0;
}

/* DRE: a planilha rola dentro do proprio quadro no celular, sem alargar a pagina. */
body.theme-financeiro-dre-page .financeiro-dre-page > *,
body.theme-financeiro-dre-page .financeiro-dre-sheet,
body.theme-financeiro-dre-page .financeiro-dre-table-wrap {
    min-width: 0;
    max-width: 100%;
}

/* Cards da fila que sao links (telas que filtram recarregando a pagina). */
body.theme-portal-list a.portal-queue-card {
    text-decoration: none;
}

/* Grade de cards com quantidade variavel. */
body.theme-portal-list .portal-queue.is-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.theme-portal-list .portal-queue.is-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

@media (max-width: 1280px) {
    body.theme-portal-list .portal-queue.is-cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    body.theme-portal-list .portal-queue.is-cols-3,
    body.theme-portal-list .portal-queue.is-cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    body.theme-portal-list .portal-queue.is-cols-3,
    body.theme-portal-list .portal-queue.is-cols-5 { grid-template-columns: minmax(0, 1fr); }
}

/* Painel de filtros com uma coluna so (telas com poucos filtros). */
body.theme-portal-list .portal-filter-popover.is-compact {
    width: min(420px, calc(100vw - 48px));
}

body.theme-portal-list .portal-filter-popover.is-compact .portal-filter-groups {
    grid-template-columns: minmax(0, 1fr);
}

body.theme-portal-list .portal-filter-popover input[type="text"],
body.theme-portal-list .portal-filter-popover input[type="search"] {
    width: 100% !important;
    height: 38px !important;
    border-radius: 10px !important;
    font-size: 0.82rem !important;
}

/* Barra de ferramentas fora de <form> (a busca fica num form proprio). */
body.theme-portal-list .portal-toolbar > form {
    display: contents;
}

/* Aviso de sucesso (o de erro usa .is-error). */
body.theme-legacy-nfe .legacy-inline-toast.is-success {
    border-color: rgba(114, 219, 98, 0.4);
    background: linear-gradient(180deg, rgba(18, 52, 32, 0.97) 0%, rgba(12, 38, 24, 0.97) 100%);
    color: #e4ffe0;
}

body.theme-mode-light.theme-legacy-nfe .legacy-inline-toast.is-success {
    border-color: rgba(29, 122, 53, 0.3);
    background: #effaf1;
    color: #1d5a2c;
}

/* ===== Menu lateral: bloco de conta (21/10/2026) ===== */
.sidebar-client-card.sidebar-account,
body.theme-legacy-nfe .sidebar-client-card.sidebar-account {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 10px 10px 12px;
    border-radius: 16px;
}

.sidebar-account-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-account-avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08), 0 6px 14px rgba(15, 118, 110, 0.28);
}

.sidebar-account-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-client-card .sidebar-account-name,
body.theme-legacy-nfe .sidebar-client-card .sidebar-account-name {
    overflow: hidden;
    color: #eef5ff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account-role {
    overflow: hidden;
    color: #9fb1c6;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account-logout-form {
    flex: 0 0 auto;
    margin: 0;
}

.sidebar-account-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #b6c4d6;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.sidebar-account-logout svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-account-logout:hover {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.sidebar-account-logout:focus-visible {
    outline: 2px solid #2aa7ff;
    outline-offset: 2px;
}

.sidebar-account .sidebar-loja-switch {
    margin: 0;
}

body.theme-mode-light .sidebar-account-avatar {
    box-shadow: 0 0 0 2px #ffffff, 0 6px 14px rgba(37, 99, 235, 0.2);
}

body.theme-mode-light .sidebar-client-card .sidebar-account-name,
body.theme-mode-light.theme-legacy-nfe .sidebar-client-card .sidebar-account-name {
    color: #15263b;
}

body.theme-mode-light .sidebar-account-role {
    color: #566a82;
}

body.theme-mode-light .sidebar-account-logout {
    border-color: rgba(43, 82, 126, 0.18);
    background: #ffffff;
    color: #4a5c73;
}

body.theme-mode-light .sidebar-account-logout:hover {
    border-color: rgba(194, 42, 58, 0.32);
    background: #fdecee;
    color: #c22a3a;
}

body.theme-mode-light .sidebar-account-logout:focus-visible {
    outline-color: #1f6fd6;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-account-logout {
        transition: none;
    }
}


/* ==========================================================================
   Fiscal > Produtos (22/10/2026)
   Lista no padrao do portal + janela de historico de compras e precos.
   ========================================================================== */

body.theme-produtos-page .portal-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

body.theme-produtos-page .produtos-head-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Produto ocupa o espaco que sobra; as demais colunas tem largura fixa. */
body.theme-produtos-page .portal-table .produto-col-nome { min-width: 220px; max-width: 0; }
body.theme-produtos-page .portal-table .produto-col-fornecedor { width: 170px; }
body.theme-produtos-page .portal-table .produto-col-setor { width: 150px; }
body.theme-produtos-page .portal-table .produto-col-ultima { width: 92px; }
body.theme-produtos-page .portal-table .produto-col-preco { width: 118px; }
body.theme-produtos-page .portal-table .produto-col-variacao { width: 78px; }
body.theme-produtos-page .portal-table .produto-col-compras { width: 70px; }
body.theme-produtos-page .portal-table .produto-col-total { width: 116px; }

body.theme-produtos-page .portal-table .produto-col-nome .portal-entity,
body.theme-produtos-page .portal-table .produto-col-nome .portal-entity-text,
body.theme-produtos-page .portal-table .produto-col-nome .portal-entity-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-produtos-page .portal-table .produto-col-nome .portal-entity-text small {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

body.theme-produtos-page .portal-table .produto-col-nome .portal-pill {
    min-height: 16px;
    padding: 0 6px;
    font-size: 0.6rem;
    flex: 0 0 auto;
}

body.theme-produtos-page .produto-unidade {
    margin-left: 2px;
    color: #8ea3b8;
    font-size: 0.7rem;
    font-weight: 600;
}

body.theme-produtos-page .produto-variacao {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

body.theme-produtos-page .produto-variacao.is-up { color: #ff8a96; }
body.theme-produtos-page .produto-variacao.is-down { color: #72db62; }
body.theme-produtos-page .produto-variacao.is-flat { color: #a9c3dc; }

body.theme-produtos-page .produtos-aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(95, 184, 255, 0.32);
    border-radius: 14px;
    background: rgba(95, 184, 255, 0.08);
    color: #dce9f8;
    font-size: 0.82rem;
    line-height: 1.45;
}

body.theme-produtos-page .produtos-aviso.is-warning {
    border-color: rgba(255, 173, 59, 0.36);
    background: rgba(255, 173, 59, 0.08);
}

body.theme-produtos-page .produtos-aviso svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-produtos-page .produtos-aviso strong {
    display: block;
}

body.theme-produtos-page .produtos-paginacao {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 4px 2px;
    color: #a9bccd;
    font-size: 0.8rem;
}

body.theme-produtos-page .produtos-paginacao-botoes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

body.theme-produtos-page .produtos-paginacao .portal-outline-button.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

body.theme-produtos-page .produtos-paginacao-atual {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* Janela de historico */
body.theme-produtos-page .legacy-status-modal.produto-historico-modal {
    width: min(960px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 32px);
}

body.theme-produtos-page .produto-modal-body {
    display: grid;
    gap: 14px;
    padding: 16px 18px 18px;
    overflow: auto;
}

body.theme-produtos-page .produto-historico-carregando {
    margin: 12px 0;
    color: #a9bccd;
}

body.theme-produtos-page .produto-historico-info {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.theme-produtos-page .produto-historico-info span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #f4f8ff;
    font-size: 0.84rem;
    font-weight: 600;
}

body.theme-produtos-page .produto-historico-info b {
    display: block;
    margin-bottom: 2px;
    color: #8ea3b8;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.theme-produtos-page .produto-historico-info small {
    display: block;
    color: #8ea3b8;
    font-weight: 500;
}

body.theme-produtos-page .produto-historico-unidades {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

body.theme-produtos-page .produto-historico-unidade {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: #b7c8da;
    font-size: 0.78rem;
}

body.theme-produtos-page .produto-historico-unidade b {
    color: #4fe0c9;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.theme-produtos-page .produto-historico-unidade strong {
    color: #f6faff;
    font-size: 0.95rem;
}

body.theme-produtos-page .produto-historico-grafico {
    margin: 0;
    padding: 12px 14px 8px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

body.theme-produtos-page .produto-historico-grafico figcaption {
    margin-bottom: 6px;
    color: #8ea3b8;
    font-size: 0.72rem;
    font-weight: 700;
}

body.theme-produtos-page .produto-historico-grafico svg {
    display: block;
    width: 100%;
    height: auto;
}

body.theme-produtos-page .produto-historico-grafico .eixo { stroke: rgba(148, 163, 184, 0.22); stroke-dasharray: 4 4; }
body.theme-produtos-page .produto-historico-grafico .linha { fill: none; stroke: #4fe0c9; stroke-width: 2.2; stroke-linejoin: round; }
body.theme-produtos-page .produto-historico-grafico .area { fill: rgba(79, 224, 201, 0.12); stroke: none; }
body.theme-produtos-page .produto-historico-grafico circle { fill: #0c1826; stroke: #4fe0c9; stroke-width: 2; }
body.theme-produtos-page .produto-historico-grafico text { fill: #8ea3b8; font-size: 11px; font-family: "Segoe UI", Tahoma, sans-serif; }

body.theme-produtos-page .produto-historico-grafico-vazio,
body.theme-produtos-page .produto-historico-nomes {
    margin: 0;
    color: #a9bccd;
    font-size: 0.78rem;
    line-height: 1.5;
}

body.theme-produtos-page .produto-historico-tabela {
    max-height: 340px;
    overflow: auto;
}

body.theme-produtos-page .produto-historico-tabela table {
    min-width: 640px;
}

@media (max-width: 720px) {
    body.theme-produtos-page .produto-historico-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-produtos-page .produto-historico-info span:first-child {
        grid-column: 1 / -1;
    }
}

/* Tema claro */
body.theme-mode-light.theme-produtos-page .produto-unidade { color: #566a82; }
body.theme-mode-light.theme-produtos-page .produto-variacao.is-up { color: #c22a3a; }
body.theme-mode-light.theme-produtos-page .produto-variacao.is-down { color: #1d7a35; }
body.theme-mode-light.theme-produtos-page .produto-variacao.is-flat { color: #405a74; }

body.theme-mode-light.theme-produtos-page .produtos-aviso {
    border-color: rgba(31, 95, 214, 0.24);
    background: #eef5ff;
    color: #172b4d;
}

body.theme-mode-light.theme-produtos-page .produtos-aviso.is-warning {
    border-color: rgba(180, 83, 9, 0.28);
    background: #fff7e8;
}

body.theme-mode-light.theme-produtos-page .produtos-paginacao,
body.theme-mode-light.theme-produtos-page .produto-historico-carregando,
body.theme-mode-light.theme-produtos-page .produto-historico-grafico-vazio,
body.theme-mode-light.theme-produtos-page .produto-historico-nomes {
    color: #405a74;
}

body.theme-mode-light.theme-produtos-page .produto-historico-info span { color: #172b4d; }
body.theme-mode-light.theme-produtos-page .produto-historico-info b,
body.theme-mode-light.theme-produtos-page .produto-historico-info small,
body.theme-mode-light.theme-produtos-page .produto-historico-grafico figcaption { color: #566a82; }

body.theme-mode-light.theme-produtos-page .produto-historico-unidade {
    border-color: rgba(41, 71, 115, 0.14);
    background: #f6f9fd;
    color: #405a74;
}

body.theme-mode-light.theme-produtos-page .produto-historico-unidade b { color: #0f766e; }
body.theme-mode-light.theme-produtos-page .produto-historico-unidade strong { color: #172b4d; }

body.theme-mode-light.theme-produtos-page .produto-historico-grafico {
    border-color: rgba(41, 71, 115, 0.14);
    background: #fbfdff;
}

body.theme-mode-light.theme-produtos-page .produto-historico-grafico .eixo { stroke: rgba(41, 71, 115, 0.18); }
body.theme-mode-light.theme-produtos-page .produto-historico-grafico .linha { stroke: #0f766e; }
body.theme-mode-light.theme-produtos-page .produto-historico-grafico .area { fill: rgba(15, 118, 110, 0.1); }
body.theme-mode-light.theme-produtos-page .produto-historico-grafico circle { fill: #ffffff; stroke: #0f766e; }
body.theme-mode-light.theme-produtos-page .produto-historico-grafico text { fill: #566a82; }

/* Lojas > Regras da NF-e: Setorizar por */
body.theme-legacy-nfe #lojaEditorModal .legacy-loja-setorizacao-options {
    grid-template-columns: minmax(0, 1fr);
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-setorizacao-field .legacy-loja-consolidacao-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-setorizacao-field .legacy-loja-consolidacao-option b {
    font-weight: 800;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-setorizacao-field .legacy-loja-consolidacao-option.is-locked {
    opacity: 0.6;
    cursor: help;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-setorizacao-field em {
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 173, 59, 0.16);
    color: #ffc160;
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 800;
}

body.theme-mode-light.theme-legacy-nfe #lojaEditorModal .legacy-loja-setorizacao-field em {
    background: #fff1d6;
    color: #9a5800;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-setorizacao-desde {
    color: #8096b2;
    font-size: 11px;
}

body.theme-legacy-nfe #lojaEditorModal .legacy-loja-setorizacao-field input[type="radio"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 2px 0 0;
    padding: 0;
}

/* Fiscal > Produtos: classificacao, unidades e revisao (fase 3) */
body.theme-produtos-page .portal-table .produto-col-check { width: 36px; text-align: center; }

body.theme-produtos-page .produto-sem-classificacao {
    color: #ffc160;
    font-weight: 700;
}

body.theme-produtos-page .legacy-status-modal.produto-classificar-modal { width: min(560px, calc(100vw - 28px)); }
body.theme-produtos-page .legacy-status-modal.produto-unidades-modal { width: min(820px, calc(100vw - 28px)); }
body.theme-produtos-page .legacy-status-modal.produto-revisar-modal { width: min(760px, calc(100vw - 28px)); }

body.theme-produtos-page .produto-modal .legacy-status-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

body.theme-produtos-page .produto-modal-alvo {
    display: grid;
    gap: 2px;
    margin: 0;
    color: #f4f8ff;
}

body.theme-produtos-page .produto-modal-alvo small,
body.theme-produtos-page .produto-modal-texto {
    margin: 0;
    color: #a9bccd;
    font-size: 0.8rem;
    line-height: 1.5;
}

body.theme-produtos-page .produto-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.theme-produtos-page .produto-modal .legacy-editor-field {
    display: grid;
    gap: 6px;
    margin: 0;
}

body.theme-produtos-page .produto-sugestao {
    justify-self: start;
    max-width: 100%;
    white-space: normal;
    text-align: left;
}

body.theme-produtos-page .produtos-aviso.is-info-small {
    margin: 0;
    padding: 10px 12px;
    font-size: 0.76rem;
}

body.theme-produtos-page .produto-unidades-tabela td {
    vertical-align: middle;
}

body.theme-produtos-page .produto-unidades-tabela input[type="radio"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
}

body.theme-produtos-page .produto-unidade-conversao {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 700;
}

body.theme-produtos-page .produto-unidade-conversao input {
    width: 76px;
    min-height: 32px;
    height: 32px;
    padding: 0 8px;
    text-align: right;
}

body.theme-produtos-page .produto-unidade-base {
    color: #4fe0c9;
    font-weight: 800;
}

body.theme-produtos-page .produto-sugestao-fator {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.72rem;
}

body.theme-produtos-page .produto-revisar-opcao {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

body.theme-produtos-page .produto-revisar-opcao h4 {
    margin: 0;
    color: #f4f8ff;
    font-size: 0.9rem;
}

body.theme-produtos-page .produto-revisar-opcao p {
    margin: 0;
    color: #a9bccd;
    font-size: 0.78rem;
    line-height: 1.5;
}

body.theme-produtos-page .produto-revisar-opcao > .portal-solid-button,
body.theme-produtos-page .produto-revisar-opcao > .portal-outline-button {
    justify-self: start;
}

body.theme-produtos-page .produto-revisar-linha {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

body.theme-produtos-page .produto-revisar-busca {
    flex: 1 1 280px;
}

body.theme-produtos-page .produto-revisar-resultados {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow: auto;
}

body.theme-produtos-page .produto-revisar-resultado {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    cursor: pointer;
}

body.theme-produtos-page .produto-revisar-resultado:has(input:checked) {
    border-color: rgba(79, 224, 201, 0.6);
    background: rgba(79, 224, 201, 0.08);
}

body.theme-produtos-page .produto-revisar-resultado input {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

body.theme-produtos-page .produto-revisar-resultado strong {
    display: block;
    color: #f4f8ff;
    font-size: 0.82rem;
}

body.theme-produtos-page .produto-revisar-resultado small {
    color: #a9bccd;
    font-size: 0.72rem;
}

body.theme-produtos-page .produto-historico-unidade.is-base {
    border-color: rgba(79, 224, 201, 0.4);
}

body.theme-produtos-page .produto-historico-acoes {
    color: #b7c8da;
    font-size: 0.78rem;
}

body.theme-produtos-page .produto-historico-acoes ul {
    display: grid;
    gap: 4px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

body.theme-produtos-page .produto-historico-acoes li span {
    color: #8ea3b8;
    font-variant-numeric: tabular-nums;
}

body.theme-produtos-page .produto-historico-tabela td small {
    color: #8ea3b8;
}

@media (max-width: 720px) {
    body.theme-produtos-page .produto-modal-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

body.theme-mode-light.theme-produtos-page .produto-sem-classificacao { color: #9a5800; }
body.theme-mode-light.theme-produtos-page .produto-modal-alvo,
body.theme-mode-light.theme-produtos-page .produto-revisar-opcao h4,
body.theme-mode-light.theme-produtos-page .produto-revisar-resultado strong { color: #172b4d; }
body.theme-mode-light.theme-produtos-page .produto-modal-alvo small,
body.theme-mode-light.theme-produtos-page .produto-modal-texto,
body.theme-mode-light.theme-produtos-page .produto-revisar-opcao p,
body.theme-mode-light.theme-produtos-page .produto-revisar-resultado small,
body.theme-mode-light.theme-produtos-page .produto-historico-acoes,
body.theme-mode-light.theme-produtos-page .produto-historico-acoes li span,
body.theme-mode-light.theme-produtos-page .produto-historico-tabela td small { color: #566a82; }
body.theme-mode-light.theme-produtos-page .produto-unidade-base { color: #0f766e; }
body.theme-mode-light.theme-produtos-page .produto-revisar-opcao,
body.theme-mode-light.theme-produtos-page .produto-revisar-resultado {
    border-color: rgba(41, 71, 115, 0.14);
    background: #f9fbfe;
}
body.theme-mode-light.theme-produtos-page .produto-revisar-resultado:has(input:checked) {
    border-color: #0f766e;
    background: #effaf7;
}
body.theme-mode-light.theme-produtos-page .produto-historico-unidade.is-base { border-color: rgba(15, 118, 110, 0.4); }


body.theme-produtos-page .portal-table td.produto-col-check,
body.theme-produtos-page .portal-table th.produto-col-check {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding-left: 10px !important;
    padding-right: 6px !important;
    overflow: visible;
    text-overflow: clip;
}

body.theme-produtos-page .portal-table .produto-col-fornecedor { width: 150px; }
body.theme-produtos-page .portal-table .produto-col-setor { width: 140px; }

/* Janela de unidades: tabela em largura livre para a coluna de conversao aparecer inteira. */
body.theme-produtos-page .produto-unidades-modal .portal-table-wrap {
    overflow-x: auto;
}

body.theme-produtos-page .portal-table.produto-unidades-tabela {
    table-layout: auto;
    width: 100%;
    min-width: 0;
}

body.theme-produtos-page .portal-table.produto-unidades-tabela th,
body.theme-produtos-page .portal-table.produto-unidades-tabela td {
    width: auto;
    max-width: none;
    white-space: normal;
}

body.theme-produtos-page .portal-table.produto-unidades-tabela th:nth-child(2),
body.theme-produtos-page .portal-table.produto-unidades-tabela td:nth-child(2) { width: 52px; }

body.theme-produtos-page .portal-table.produto-unidades-tabela td:last-child {
    min-width: 280px;
}

body.theme-produtos-page .portal-table.produto-unidades-tabela td:last-child > * {
    margin: 2px 4px 2px 0;
}

body.theme-produtos-page .legacy-table.portal-table.produto-unidades-tabela {
    min-width: 0 !important;
}

@media (max-width: 720px) {
    body.theme-produtos-page .portal-table.produto-unidades-tabela thead {
        display: none;
    }

    body.theme-produtos-page .portal-table.produto-unidades-tabela,
    body.theme-produtos-page .portal-table.produto-unidades-tabela tbody {
        display: block;
    }

    body.theme-produtos-page .portal-table.produto-unidades-tabela tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 10px;
        margin-bottom: 8px;
        padding: 8px 4px;
    }

    body.theme-produtos-page .portal-table.produto-unidades-tabela td {
        display: block;
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        padding: 2px 8px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        text-align: left;
    }

    body.theme-produtos-page .portal-table.produto-unidades-tabela tr {
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.025);
    }

    body.theme-mode-light.theme-produtos-page .portal-table.produto-unidades-tabela tr {
        border-color: #dbe5f1;
        background: #f9fbfe;
    }

    body.theme-produtos-page .portal-table.produto-unidades-tabela td:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    body.theme-produtos-page .portal-table.produto-unidades-tabela td:nth-child(2)::before {
        content: "Base ";
        font-size: 0.7rem;
        font-weight: 700;
    }

    body.theme-produtos-page .portal-table.produto-unidades-tabela td:last-child {
        grid-column: 1 / -1;
        white-space: normal;
    }
}

/* Fiscal > Produtos: classificacao automatica pelas notas */
body.theme-produtos-page .produto-auto-linha {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: visible;
}

body.theme-produtos-page .produto-auto-selo {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 7px;
    border: 1px solid rgba(47, 169, 255, 0.45);
    border-radius: 999px;
    background: rgba(47, 169, 255, 0.14);
    color: #7cc8ff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

body.theme-produtos-page .produto-confirmar-link {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(79, 224, 192, 0.5);
    border-radius: 6px;
    background: rgba(79, 224, 192, 0.12);
    color: #4fe0c0;
    cursor: pointer;
}

body.theme-produtos-page .produto-confirmar-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

body.theme-produtos-page .produto-confirmar-link:hover { color: #8af1da; background: rgba(79, 224, 192, 0.24); }
body.theme-produtos-page .produto-confirmar-link:disabled { opacity: 0.5; cursor: wait; }
body.theme-produtos-page .produto-confirmar-link:focus-visible { outline: 2px solid #4fe0c0; outline-offset: 2px; border-radius: 3px; }

body.theme-produtos-page .produto-lote-confirmar svg { width: 16px; height: 16px; }

body.theme-mode-light.theme-produtos-page .produto-auto-selo {
    border-color: rgba(23, 110, 196, 0.35);
    background: rgba(23, 110, 196, 0.1);
    color: #145ea8;
}

body.theme-mode-light.theme-produtos-page .produto-confirmar-link { color: #0b7a66; border-color: rgba(11, 122, 102, 0.4); background: rgba(11, 122, 102, 0.08); }
body.theme-mode-light.theme-produtos-page .produto-confirmar-link:hover { color: #075c4d; }

/* Fiscal > Produtos: tipo do item (devolucao descontada do total) */
body.theme-produtos-page .produto-devolvido { color: #ff8a96; font-weight: 700; }
body.theme-mode-light.theme-produtos-page .produto-devolvido { color: #c22a3a; }

/* Administracao > Auditoria: Trilha de usuarios */
body.theme-auditoria-page .portal-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

body.theme-auditoria-page .auditoria-head-meta { display: flex; flex-wrap: wrap; gap: 8px; }

body.theme-auditoria-page .auditoria-aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 173, 59, 0.4);
    border-radius: 14px;
    background: rgba(255, 173, 59, 0.1);
    color: #ffe2b8;
    font-size: 0.82rem;
    line-height: 1.45;
}

body.theme-auditoria-page .auditoria-aviso svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
body.theme-auditoria-page .auditoria-aviso div { display: grid; gap: 2px; }

body.theme-auditoria-page .portal-table .trilha-col-data { width: 150px; white-space: nowrap; font-variant-numeric: tabular-nums; }
body.theme-auditoria-page .portal-table .trilha-col-usuario { width: 170px; max-width: 170px; }
body.theme-auditoria-page .portal-table .trilha-col-loja { width: 160px; max-width: 160px; }
body.theme-auditoria-page .portal-table .trilha-col-modulo { width: 190px; }
body.theme-auditoria-page .portal-table .trilha-col-descricao { min-width: 280px; }
body.theme-auditoria-page .portal-table .trilha-col-ip { width: 120px; max-width: 120px; font-variant-numeric: tabular-nums; }

body.theme-auditoria-page .trilha-descricao {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
    white-space: normal;
}

body.theme-auditoria-page .portal-table td.trilha-col-descricao { height: auto !important; padding-top: 8px; padding-bottom: 8px; }
body.theme-auditoria-page .trilha-mudanca { color: #7cc8ff; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.theme-auditoria-page .trilha-sistema { display: inline-flex; align-items: center; gap: 6px; color: #4fe0c0; font-weight: 800; }
body.theme-auditoria-page .trilha-sistema svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
body.theme-auditoria-page .trilha-texto-falha { color: #ff8a96; font-weight: 700; }
body.theme-auditoria-page .trilha-linha-falha td:first-child { box-shadow: inset 3px 0 0 #ff5364; }

body.theme-auditoria-page .auditoria-paginacao {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 4px 2px;
    color: #a9bccd;
    font-size: 0.8rem;
}

body.theme-auditoria-page .auditoria-paginacao-botoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.theme-auditoria-page .auditoria-paginacao .portal-outline-button.is-disabled { opacity: 0.45; pointer-events: none; }
body.theme-auditoria-page .auditoria-paginacao-atual { font-variant-numeric: tabular-nums; font-weight: 700; }

body.theme-mode-light.theme-auditoria-page .auditoria-aviso { border-color: rgba(176, 106, 0, 0.35); background: #fff6e6; color: #6b4300; }
body.theme-mode-light.theme-auditoria-page .trilha-mudanca { color: #145ea8; }
body.theme-mode-light.theme-auditoria-page .trilha-sistema { color: #0b7a66; }
body.theme-mode-light.theme-auditoria-page .trilha-texto-falha { color: #c22a3a; }
body.theme-mode-light.theme-auditoria-page .auditoria-paginacao { color: #4a5d70; }

/* Administracao > Alertas (tela, contador do topo e do menu) */
.alerta-topo-chip { gap: 6px; text-decoration: none; }
.alerta-topo-chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alerta-topo-chip.is-novo { border-color: rgba(255, 173, 59, 0.55) !important; background: rgba(255, 173, 59, 0.16) !important; color: #ffc160 !important; }
.alerta-topo-chip.is-critico { border-color: rgba(255, 83, 100, 0.6) !important; background: rgba(255, 83, 100, 0.18) !important; color: #ff8a96 !important; }
body.theme-mode-light .alerta-topo-chip.is-novo { color: #9a5800 !important; background: #fff4e0 !important; }
body.theme-mode-light .alerta-topo-chip.is-critico { color: #b0202f !important; background: #ffe9ec !important; }

.sidebar-alerta-contador {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 18px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ffad3b;
    color: #1d1300;
    font-size: 0.68rem;
    font-weight: 800;
}
.sidebar-alerta-contador.is-critico { background: #ff5364; color: #fff; }

body.theme-alertas-page .portal-table .alerta-col-check { width: 40px; text-align: center; }
body.theme-alertas-page .portal-table .alerta-col-gravidade { width: 96px; }
body.theme-alertas-page .portal-table .alerta-col-data { width: 150px; max-width: 150px; }
body.theme-alertas-page .alerta-data { font-variant-numeric: tabular-nums; white-space: nowrap; }
body.theme-alertas-page .portal-table .alerta-col-loja { width: 130px; max-width: 130px; }
body.theme-alertas-page .portal-table .alerta-col-tipo { width: 170px; max-width: 170px; }
body.theme-alertas-page .alerta-col-tipo .alerta-tipo { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* O que aconteceu ocupa o espaco que sobra. */
body.theme-alertas-page .portal-table .alerta-col-titulo { min-width: 260px; max-width: 0; }
body.theme-alertas-page .portal-table .alerta-col-valor { width: 120px; }
body.theme-alertas-page .portal-table .alerta-col-situacao { width: 150px; max-width: 150px; }
body.theme-alertas-page .portal-table td.alerta-col-titulo { height: auto !important; padding-top: 8px; padding-bottom: 8px; }
body.theme-alertas-page .alerta-titulo { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; white-space: normal; }
body.theme-alertas-page .alerta-tipo { font-weight: 700; }
body.theme-alertas-page .alerta-valor { font-weight: 800; font-variant-numeric: tabular-nums; }
body.theme-alertas-page .alerta-valor-preco_alta { color: #ff8a96; }
body.theme-alertas-page .alerta-valor-preco_queda { color: #72db62; }
body.theme-alertas-page .alerta-linha-novo td:first-child { box-shadow: inset 3px 0 0 #ffad3b; }
body.theme-alertas-page .alerta-linha-novo.alerta-linha-critico td:first-child { box-shadow: inset 3px 0 0 #ff5364; }
body.theme-alertas-page .alerta-linha-novo .alerta-titulo { font-weight: 700; }

body.theme-alertas-page .legacy-status-modal.alertas-regras-modal { width: min(820px, calc(100vw - 28px)); }
body.theme-alertas-page .alertas-regras-tabela.portal-table { min-width: 0 !important; }
body.theme-alertas-page .alertas-regras-tabela td { height: auto !important; padding-top: 8px; padding-bottom: 8px; white-space: normal; }
body.theme-alertas-page .alertas-regras-tabela td:first-child, body.theme-alertas-page .alertas-regras-tabela th:first-child { width: 70px; text-align: center; }
body.theme-alertas-page .alertas-regras-tabela td:last-child { width: 150px; }
body.theme-alertas-page .alertas-regras-limite { display: inline-flex; align-items: center; gap: 6px; }
body.theme-alertas-page .alertas-regras-limite input { width: 86px; min-height: 34px; }
body.theme-alertas-page .alertas-regras-loja { display: grid; gap: 4px; margin-bottom: 12px; max-width: 360px; }
body.theme-alertas-page .alertas-regras-texto { margin: 0 0 10px; }

body.theme-mode-light.theme-alertas-page .alerta-valor-preco_alta { color: #c22a3a; }
body.theme-mode-light.theme-alertas-page .alerta-valor-preco_queda { color: #1d7a35; }

@media (max-width: 720px) {
    body.theme-alertas-page .alertas-regras-tabela td:last-child { width: auto; }
}

/* Aviso de alertas de preco ao entrar no portal (canto inferior direito) */
.alerta-entrada {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    display: grid;
    gap: 10px;
    width: min(390px, calc(100vw - 32px));
    padding: 14px 16px 16px;
    border: 1px solid rgba(255, 173, 59, 0.45);
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(20, 34, 52, 0.98), rgba(12, 22, 36, 0.98));
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    color: #dce8fb;
    font-size: 0.82rem;
    animation: alertaEntradaSobe 0.32s ease-out;
}
.alerta-entrada.is-saindo { opacity: 0; transform: translateY(12px); transition: opacity 0.2s ease, transform 0.2s ease; }
@keyframes alertaEntradaSobe { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .alerta-entrada { animation: none; } .alerta-entrada.is-saindo { transition: none; } }
.alerta-entrada-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.alerta-entrada-head strong { display: block; font-size: 0.95rem; }
.alerta-entrada-head span { display: block; color: #9fb4ca; font-size: 0.74rem; }
.alerta-entrada-icone { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 173, 59, 0.16); color: #ffc160; }
.alerta-entrada-icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alerta-entrada-fechar { width: 30px; height: 30px; min-height: 0; padding: 0; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.alerta-entrada-fechar:hover { background: rgba(255, 255, 255, 0.08); }
.alerta-entrada-linha { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; padding: 9px 11px; border-radius: 12px; }
.alerta-entrada-linha.is-alta { background: rgba(255, 83, 100, 0.12); }
.alerta-entrada-linha.is-alta b, .alerta-entrada-linha.is-alta span { color: #ff8a96; }
.alerta-entrada-linha.is-queda { background: rgba(114, 219, 98, 0.12); }
.alerta-entrada-linha.is-queda b, .alerta-entrada-linha.is-queda span { color: #8fe580; }
.alerta-entrada-linha span { font-weight: 800; font-variant-numeric: tabular-nums; }
.alerta-entrada-lista { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; color: #b8c9dc; font-size: 0.76rem; }
.alerta-entrada-lista li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.alerta-entrada-lista li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alerta-entrada-lista li b { flex: 0 0 auto; color: #ff8a96; font-variant-numeric: tabular-nums; }
body.theme-mode-light .alerta-entrada-lista li b { color: #b0202f; }
.alerta-entrada-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.alerta-entrada-botao { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; color: inherit; font-weight: 800; text-decoration: none; }
.alerta-entrada-botao.is-principal { border-color: transparent; background: linear-gradient(135deg, #1aa38a, #2f6fd6); color: #fff; }
.alerta-entrada-botao:hover { filter: brightness(1.08); }

body.theme-mode-light .alerta-entrada { border-color: rgba(176, 106, 0, 0.35); background: #ffffff; color: #172b4d; box-shadow: 0 18px 40px rgba(23, 43, 77, 0.18); }
body.theme-mode-light .alerta-entrada-head span { color: #4a5d70; }
body.theme-mode-light .alerta-entrada-icone { background: #fff4e0; color: #9a5800; }
body.theme-mode-light .alerta-entrada-fechar { border-color: #d6e0ec; }
body.theme-mode-light .alerta-entrada-linha.is-alta { background: #ffeef0; }
body.theme-mode-light .alerta-entrada-linha.is-alta b, body.theme-mode-light .alerta-entrada-linha.is-alta span { color: #b0202f; }
body.theme-mode-light .alerta-entrada-linha.is-queda { background: #ebf8e8; }
body.theme-mode-light .alerta-entrada-linha.is-queda b, body.theme-mode-light .alerta-entrada-linha.is-queda span { color: #1d7a35; }
body.theme-mode-light .alerta-entrada-lista { color: #4a5d70; }
body.theme-mode-light .alerta-entrada-botao { border-color: #c7d3e1; }

/* Compras > Monitoramento de precos (grupos) e selo/lote em Compras > Produtos */
body.theme-monitoramento-page .portal-table .monitor-col-nome { min-width: 220px; max-width: 0; }
body.theme-monitoramento-page .portal-table .monitor-col-status { width: 100px; }
body.theme-monitoramento-page .portal-table .monitor-col-produtos { width: 90px; }
body.theme-monitoramento-page .portal-table .monitor-col-limites { width: 290px; }
body.theme-monitoramento-page .portal-table .monitor-col-alertas { width: 96px; }
body.theme-monitoramento-page .portal-table .monitor-col-valor { width: 130px; }
body.theme-monitoramento-page .monitor-link-numero { display: inline-grid; place-items: center; min-width: 38px; height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(47, 169, 255, 0.14); color: #7cc8ff; font-weight: 800; text-decoration: none; }
body.theme-monitoramento-page .monitor-link-numero:hover { background: rgba(47, 169, 255, 0.26); }
body.theme-monitoramento-page .monitor-limite { display: inline-flex; align-items: center; min-height: 22px; margin: 2px 4px 2px 0; padding: 0 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; white-space: nowrap; }
body.theme-monitoramento-page .monitor-limite.is-alta { background: rgba(255, 83, 100, 0.14); color: #ff8a96; }
body.theme-monitoramento-page .monitor-limite.is-queda { background: rgba(114, 219, 98, 0.14); color: #8fe580; }
body.theme-monitoramento-page .monitor-limite.is-critico { background: rgba(255, 173, 59, 0.14); color: #ffc160; }
body.theme-monitoramento-page .legacy-status-modal.monitor-grupo-modal { width: min(640px, calc(100vw - 28px)); }
body.theme-monitoramento-page .monitor-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-bottom: 12px; }
body.theme-monitoramento-page .monitor-form-grid .legacy-editor-field { display: grid; gap: 4px; }
body.theme-monitoramento-page .monitor-campo-largo { grid-column: 1 / -1; }
@media (max-width: 720px) {
    body.theme-monitoramento-page .monitor-form-grid { grid-template-columns: minmax(0, 1fr); }
}

body.theme-mode-light.theme-monitoramento-page .monitor-link-numero { background: #e8f2ff; color: #145ea8; }
body.theme-mode-light.theme-monitoramento-page .monitor-limite.is-alta { background: #ffeef0; color: #b0202f; }
body.theme-mode-light.theme-monitoramento-page .monitor-limite.is-queda { background: #ebf8e8; color: #1d7a35; }
body.theme-mode-light.theme-monitoramento-page .monitor-limite.is-critico { background: #fff4e0; color: #9a5800; }

body.theme-produtos-page .produto-monitor-selo { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
body.theme-produtos-page .legacy-status-modal.produto-monitorar-modal { width: min(560px, calc(100vw - 28px)); }
body.theme-produtos-page .produto-monitorar-mover { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 0.82rem; }
body.theme-produtos-page .produto-monitorar-mover input { width: 16px; height: 16px; min-height: 0; margin: 0; }

/* Compras > Monitoramento de precos > grupo: palavras e sugestoes (fase B1) */
body.theme-monitoramento-page .portal-table .monitor-col-sugestoes { width: 100px; }
body.theme-monitoramento-page .monitor-link-numero.is-sugestao { background: rgba(79, 224, 192, 0.18); color: #4fe0c0; }
body.theme-monitoramento-page .monitor-grupo-link { color: inherit; text-decoration: none; }
body.theme-monitoramento-page .monitor-grupo-link:hover { text-decoration: underline; }
body.theme-monitor-grupo-page .monitor-voltar { margin-right: 10px; font-size: 0.82rem; font-weight: 700; text-decoration: none; color: #7cc8ff; }
body.theme-monitor-grupo-page .monitor-palavras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
body.theme-monitor-grupo-page .monitor-palavras-bloco { display: grid; align-content: start; gap: 10px; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; background: rgba(255, 255, 255, 0.03); }
body.theme-monitor-grupo-page .monitor-palavras-bloco.is-incluir { border-color: rgba(79, 224, 192, 0.32); }
body.theme-monitor-grupo-page .monitor-palavras-bloco.is-excluir { border-color: rgba(255, 83, 100, 0.3); }
body.theme-monitor-grupo-page .monitor-palavras-titulo { display: grid; gap: 3px; }
body.theme-monitor-grupo-page .monitor-palavras-titulo span { color: #9fb4ca; font-size: 0.76rem; line-height: 1.4; }
body.theme-monitor-grupo-page .monitor-chips { display: flex; flex-wrap: wrap; gap: 6px; }
body.theme-monitor-grupo-page .monitor-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 6px 0 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; }
body.theme-monitor-grupo-page .is-incluir .monitor-chip { background: rgba(79, 224, 192, 0.16); color: #4fe0c0; }
body.theme-monitor-grupo-page .is-excluir .monitor-chip { background: rgba(255, 83, 100, 0.16); color: #ff8a96; }
body.theme-monitor-grupo-page .monitor-chip button { width: 20px; height: 20px; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: inherit; font-size: 0.9rem; line-height: 1; cursor: pointer; }
body.theme-monitor-grupo-page .monitor-chip-vazio { color: #9fb4ca; font-size: 0.78rem; font-style: italic; }
body.theme-monitor-grupo-page .monitor-palavra-nova { display: flex; gap: 8px; }
body.theme-monitor-grupo-page .monitor-palavra-nova input { flex: 1 1 auto; min-width: 0; min-height: 36px; }
body.theme-monitor-grupo-page .monitor-teste-resultado { margin: 0; min-height: 18px; color: #4fe0c0; font-weight: 800; font-size: 0.8rem; word-break: break-word; }
body.theme-monitor-grupo-page .portal-table .sugestao-col-produto { min-width: 280px; max-width: 0; }
body.theme-monitor-grupo-page .portal-table .sugestao-col-produto .portal-entity-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
body.theme-monitor-grupo-page .portal-table .sugestao-col-fornecedor { width: 220px; max-width: 220px; }
body.theme-monitor-grupo-page .portal-table .sugestao-col-motivo { width: 200px; }
body.theme-monitor-grupo-page .portal-table .sugestao-col-ultima { width: 110px; }
body.theme-monitor-grupo-page .portal-table .sugestao-col-compras { width: 90px; }
@media (max-width: 1100px) { body.theme-monitor-grupo-page .monitor-palavras { grid-template-columns: minmax(0, 1fr); } }

body.theme-mode-light.theme-monitoramento-page .monitor-link-numero.is-sugestao { background: #e3f7f1; color: #0b7a66; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-voltar { color: #145ea8; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-palavras-bloco { border-color: #dbe5f1; background: #ffffff; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-palavras-bloco.is-incluir { border-color: rgba(11, 122, 102, 0.35); }
body.theme-mode-light.theme-monitor-grupo-page .monitor-palavras-bloco.is-excluir { border-color: rgba(194, 42, 58, 0.3); }
body.theme-mode-light.theme-monitor-grupo-page .monitor-palavras-titulo span, body.theme-mode-light.theme-monitor-grupo-page .monitor-chip-vazio { color: #4a5d70; }
body.theme-mode-light.theme-monitor-grupo-page .is-incluir .monitor-chip { background: #e3f7f1; color: #0b7a66; }
body.theme-mode-light.theme-monitor-grupo-page .is-excluir .monitor-chip { background: #ffeef0; color: #b0202f; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-chip button { background: rgba(0, 0, 0, 0.08); }
body.theme-mode-light.theme-monitor-grupo-page .monitor-teste-resultado { color: #0b7a66; }

/* Monitoramento de precos - fase B2: comparar fornecedores */
body.theme-monitor-comparar-page .monitor-voltar { margin-right: 10px; font-size: 0.82rem; font-weight: 700; text-decoration: none; color: #7cc8ff; }
body.theme-monitor-comparar-page .produtos-head-meta { flex-wrap: wrap; }
body.theme-monitor-comparar-page .monitor-comparavel { margin-top: 16px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; background: rgba(255, 255, 255, 0.02); overflow: hidden; }
body.theme-monitor-comparar-page .monitor-comparavel.is-adicionar { border-color: rgba(79, 224, 192, 0.4); box-shadow: 0 0 0 1px rgba(79, 224, 192, 0.12) inset; }
body.theme-monitor-comparar-page .monitor-comparavel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
body.theme-monitor-comparar-page .monitor-comparavel-head > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
body.theme-monitor-comparar-page .monitor-comparavel-head strong { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; }
body.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparavel-head > div:first-child { display: grid; gap: 4px; flex: 1 1 380px; }
body.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparavel-head span { font-size: 0.8rem; opacity: 0.8; }
body.theme-monitor-comparar-page .monitor-comparavel-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.theme-monitor-comparar-page .monitor-filtro { min-height: 36px; min-width: 220px; }
body.theme-monitor-comparar-page .monitor-melhor { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(114, 219, 98, 0.14); color: #8fe580; font-size: 0.8rem; font-weight: 700; }
body.theme-monitor-comparar-page .monitor-melhor svg { width: 14px; height: 14px; }
body.theme-monitor-comparar-page .monitor-melhor.is-vazio { background: rgba(255, 255, 255, 0.06); color: #a9b6c6; }
body.theme-monitor-comparar-page .monitor-acima { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(255, 83, 100, 0.14); color: #ff8a96; font-size: 0.8rem; font-weight: 700; text-decoration: none; }
body.theme-monitor-comparar-page .monitor-acima svg { width: 14px; height: 14px; fill: none; stroke: currentColor; }
body.theme-monitor-comparar-page .monitor-fator { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 0.82rem; }
body.theme-monitor-comparar-page .monitor-fator input { width: 78px; min-height: 32px; text-align: right; }
body.theme-monitor-comparar-page .portal-cell-sub.is-pendente { color: #ffc861; font-weight: 700; }
body.theme-monitor-comparar-page .monitor-comparar-tabela { margin: 0; }
body.theme-monitor-comparar-page .monitor-comparavel .legacy-table-wrap { border: 0; border-radius: 0; }
body.theme-monitor-comparar-page .monitor-comparar-vazio { display: grid; justify-items: center; gap: 8px; margin-top: 16px; padding: 34px 20px; border: 1px dashed rgba(255, 255, 255, 0.16); border-radius: 16px; text-align: center; }
body.theme-monitor-comparar-page .monitor-comparar-vazio svg { width: 34px; height: 34px; opacity: 0.7; }
body.theme-monitor-comparar-page .monitor-comparar-vazio span { max-width: 640px; font-size: 0.86rem; opacity: 0.85; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-voltar { color: #145ea8; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-comparavel { border-color: #dbe5f1; background: #ffffff; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-comparavel.is-adicionar { border-color: #7fd8c3; background: #f6fdfb; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-comparavel-head { border-bottom-color: #e6edf5; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-melhor { background: #ebf8e8; color: #1d7a35; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-melhor.is-vazio { background: #f0f3f7; color: #4a5d70; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-acima { background: #ffeef0; color: #b0202f; }
body.theme-mode-light.theme-monitor-comparar-page .portal-cell-sub.is-pendente { color: #a05a00; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-comparar-vazio { border-color: #c9d6e5; }
@media (max-width: 720px) {
    body.theme-monitor-comparar-page .monitor-comparavel-head { padding: 12px; }
    body.theme-monitor-comparar-page .monitor-filtro { min-width: 0; flex: 1 1 100%; }
}
/* Aviso de entrada: linha "acima do melhor fornecedor" */
.alerta-entrada-linha.is-fornecedor { background: rgba(255, 200, 97, 0.13); }
.alerta-entrada-linha.is-fornecedor b, .alerta-entrada-linha.is-fornecedor span { color: #ffc861; }
body.theme-mode-light .alerta-entrada-linha.is-fornecedor { background: #fff6e3; }
body.theme-mode-light .alerta-entrada-linha.is-fornecedor b, body.theme-mode-light .alerta-entrada-linha.is-fornecedor span { color: #8a5200; }
body.theme-monitor-comparar-page .monitor-melhor svg { fill: none; stroke: currentColor; stroke-width: 2.4; }
body.theme-monitor-comparar-page .monitor-fator input { padding: 0 9px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 9px; background: rgba(255, 255, 255, 0.06); color: inherit; font-weight: 700; }
body.theme-monitor-comparar-page .monitor-fator input:focus { outline: none; border-color: #4fe0c0; box-shadow: 0 0 0 3px rgba(79, 224, 192, 0.18); }
body.theme-mode-light.theme-monitor-comparar-page .monitor-fator input { border-color: #c9d6e5; background: #ffffff; color: #13283d; }
body.theme-monitor-comparar-page .monitor-comparavel:not(.is-adicionar) .monitor-comparar-tabela th:nth-child(2) { width: 19%; }
body.theme-monitor-comparar-page .monitor-comparavel:not(.is-adicionar) .monitor-comparar-tabela th:nth-child(3) { width: 175px; }
body.theme-monitor-comparar-page .monitor-comparavel:not(.is-adicionar) .monitor-comparar-tabela th:nth-child(4) { width: 135px; }
body.theme-monitor-comparar-page .monitor-comparavel:not(.is-adicionar) .monitor-comparar-tabela th:nth-child(5) { width: 115px; }
body.theme-monitor-comparar-page .monitor-comparavel:not(.is-adicionar) .monitor-comparar-tabela th:nth-child(6) { width: 125px; }
body.theme-monitor-comparar-page .monitor-comparavel:not(.is-adicionar) .monitor-comparar-tabela th:nth-child(7) { width: 70px; }
body.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparar-tabela th:nth-child(1) { width: 46px; }
body.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparar-tabela th:nth-child(3) { width: 22%; }
body.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparar-tabela th:nth-child(4) { width: 90px; }
body.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparar-tabela th:nth-child(5) { width: 250px; }
body.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparar-tabela th:nth-child(6) { width: 125px; }
@media (max-width: 900px) {
    body.theme-monitor-comparar-page .monitor-comparar-tabela { min-width: 860px; }
}
body.theme-monitor-comparar-page .monitor-comparavel .legacy-table-wrap.portal-table-wrap { min-height: 0; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-comparavel-head strong { color: #13283d; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparavel-head span { color: #4a5d70; opacity: 1; }
body.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparavel-head strong { color: #4fe0c0; }
body.theme-mode-light.theme-monitor-comparar-page .monitor-comparavel.is-adicionar .monitor-comparavel-head strong { color: #0b7a66; }

/* Fase C: base do preco no grupo, historico e tratamento dos alertas */
body.theme-monitoramento-page .monitor-limite.is-base { background: rgba(124, 200, 255, 0.12); color: #9fd4ff; }
body.theme-mode-light.theme-monitoramento-page .monitor-limite.is-base { background: #e8f3ff; color: #145ea8; }
.alerta-hist-modal { width: min(760px, calc(100vw - 32px)); }
.alerta-hist-modal .legacy-status-modal-body { max-height: min(70vh, 640px); overflow-y: auto; }
.alerta-hist-resumo { margin: 0 0 10px; font-weight: 700; line-height: 1.45; }
.alerta-hist-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.alerta-hist-sub { margin: 14px 0 8px; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.alerta-hist-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.alerta-hist-campo { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.alerta-hist-campo dt { font-size: 0.72rem; opacity: 0.7; }
.alerta-hist-campo dd { margin: 0; font-weight: 700; font-size: 0.86rem; }
.alerta-hist-tempo { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid rgba(124, 200, 255, 0.3); display: grid; gap: 10px; }
.alerta-hist-evento { position: relative; padding: 2px 0 2px 6px; }
.alerta-hist-evento::before { content: ''; position: absolute; left: -23px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #7cc8ff; box-shadow: 0 0 0 3px rgba(124, 200, 255, 0.2); }
.alerta-hist-evento.is-ciente::before, .alerta-hist-evento.is-resolvido::before { background: #72db62; }
.alerta-hist-evento.is-descartado::before { background: #a9b6c6; }
.alerta-hist-evento.is-analisar::before { background: #ffc861; }
.alerta-hist-evento.is-reabrir::before { background: #ff8a96; }
.alerta-hist-evento.is-observacao::before { background: #b99cff; }
.alerta-hist-evento-topo { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.alerta-hist-evento-topo span { font-size: 0.78rem; opacity: 0.75; }
.alerta-hist-evento p { margin: 3px 0 0; font-size: 0.84rem; line-height: 1.4; }
.alerta-hist-obs { display: grid; gap: 4px; margin-top: 16px; }
.alerta-hist-obs textarea, .alerta-tratar-modal textarea { width: 100%; resize: vertical; }
.alerta-tratar-modal { width: min(520px, calc(100vw - 32px)); }
.alerta-tratar-modal .legacy-editor-field { display: grid; gap: 4px; margin-bottom: 12px; }
.alerta-tratar-texto { margin: 0 0 14px; font-size: 0.86rem; line-height: 1.45; opacity: 0.85; }
body.theme-mode-light .alerta-hist-campo { background: #f3f7fb; }
body.theme-mode-light .alerta-hist-tempo { border-left-color: #c9dcef; }
@media (max-width: 600px) {
    .alerta-hist-campos { grid-template-columns: minmax(0, 1fr); }
}

/* Fase D: catalogo central (tela do administrador e uso pelas lojas) */
body.theme-monitoramento-page .monitor-catalogo-selo { display: inline-flex; align-self: flex-start; margin: 2px 0; padding: 1px 8px; border-radius: 999px; background: rgba(124, 200, 255, 0.14); color: #9fd4ff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em; }
body.theme-mode-light.theme-monitoramento-page .monitor-catalogo-selo { background: #e8f3ff; color: #145ea8; }
body.theme-monitor-grupo-page .monitor-catalogo-box { display: grid; gap: 10px; margin: 14px 0 0; padding: 14px; border: 1px solid rgba(124, 200, 255, 0.28); border-radius: 16px; background: rgba(124, 200, 255, 0.05); }
body.theme-monitor-grupo-page .monitor-catalogo-box.is-propostas { border-color: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.02); }
body.theme-monitor-grupo-page .monitor-catalogo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
body.theme-monitor-grupo-page .monitor-catalogo-head > div { display: grid; gap: 3px; }
body.theme-monitor-grupo-page .monitor-catalogo-head strong { display: inline-flex; align-items: center; gap: 8px; }
body.theme-monitor-grupo-page .monitor-catalogo-head strong svg { width: 16px; height: 16px; fill: none; stroke: currentColor; }
body.theme-monitor-grupo-page .monitor-catalogo-head span { font-size: 0.8rem; opacity: 0.8; }
body.theme-monitor-grupo-page .monitor-chip.is-novidade { border: 1px dashed currentColor; }
body.theme-monitor-grupo-page .monitor-chip.is-novidade.is-incluir { background: rgba(79, 224, 192, 0.1); color: #4fe0c0; }
body.theme-monitor-grupo-page .monitor-chip.is-novidade.is-excluir { background: rgba(255, 83, 100, 0.1); color: #ff8a96; }
body.theme-monitor-grupo-page .monitor-chip.is-catalogo { box-shadow: inset 0 0 0 1px rgba(124, 200, 255, 0.45); }
body.theme-monitor-grupo-page .monitor-chip .monitor-chip-sugerir { background: rgba(124, 200, 255, 0.2); color: #9fd4ff; font-weight: 900; }
body.theme-monitor-grupo-page .monitor-link-sugerir { justify-self: start; margin-top: 4px; padding: 0; border: 0; background: none; color: #7cc8ff; font-size: 0.8rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
body.theme-monitor-grupo-page .monitor-propostas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
body.theme-monitor-grupo-page .monitor-propostas li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.84rem; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-catalogo-box { border-color: #b9d8f5; background: #f4f9ff; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-catalogo-box.is-propostas { border-color: #dbe5f1; background: #ffffff; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-chip.is-novidade.is-incluir { background: #eefaf6; color: #0b7a66; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-chip.is-novidade.is-excluir { background: #fff3f4; color: #b0202f; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-chip .monitor-chip-sugerir { background: #dcecfd; color: #145ea8; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-link-sugerir { color: #145ea8; }
body.theme-catalogo-page .catalogo-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 14px; }
body.theme-catalogo-page .catalogo-toolbar-texto { font-size: 0.84rem; opacity: 0.8; }
body.theme-catalogo-page .catalogo-filtro { display: grid; gap: 4px; min-width: 180px; }
body.theme-catalogo-page .catalogo-wrap { margin-top: 12px; }
body.theme-catalogo-page .catalogo-wrap.legacy-table-wrap.portal-table-wrap { min-height: 0; }
body.theme-catalogo-page .catalogo-sugestao { display: block; margin-top: 4px; }
body.theme-catalogo-page .catalogo-justificativa { font-style: italic; }
body.theme-catalogo-page .catalogo-amostras { margin: 0; padding-left: 16px; font-size: 0.76rem; line-height: 1.35; }
body.theme-catalogo-page .catalogo-conflito { display: block; margin-bottom: 3px; padding: 2px 8px; border-radius: 8px; background: rgba(255, 200, 97, 0.12); color: #ffc861; font-size: 0.74rem; line-height: 1.3; }
body.theme-catalogo-page .catalogo-abrev { display: inline-block; padding: 2px 10px; border-radius: 8px; background: rgba(124, 200, 255, 0.14); color: #9fd4ff; font-family: ui-monospace, Consolas, monospace; font-weight: 800; }
body.theme-catalogo-page .catalogo-abrev-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: end; gap: 12px; margin-top: 16px; padding: 14px; border: 1px solid rgba(79, 224, 192, 0.3); border-radius: 16px; background: rgba(79, 224, 192, 0.04); }
body.theme-catalogo-page .catalogo-abrev-form .legacy-editor-field { display: grid; gap: 4px; }
body.theme-catalogo-page .catalogo-abrev-botoes { display: flex; flex-wrap: wrap; gap: 8px; }
body.theme-catalogo-page .catalogo-impacto { grid-column: 1 / -1; margin: 0; font-size: 0.82rem; line-height: 1.45; }
body.theme-catalogo-page .catalogo-palavras { margin-top: 16px; }
body.theme-catalogo-page tr.is-selecionado td { background: rgba(124, 200, 255, 0.08); }
body.theme-mode-light.theme-catalogo-page .catalogo-conflito { background: #fff6e3; color: #8a5200; }
body.theme-mode-light.theme-catalogo-page .catalogo-abrev { background: #e8f3ff; color: #145ea8; }
body.theme-mode-light.theme-catalogo-page .catalogo-abrev-form { border-color: #a9e3d4; background: #f6fdfb; }
body.theme-mode-light.theme-catalogo-page tr.is-selecionado td { background: #eef6ff; }
@media (max-width: 900px) {
    body.theme-catalogo-page .catalogo-abrev-form { grid-template-columns: minmax(0, 1fr); }
    body.theme-catalogo-page .catalogo-tabela { min-width: 880px; }
}
/* Fase D: aviso do catalogo com o mesmo visual das telas de produtos */
body.theme-catalogo-page .produtos-aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(95, 184, 255, 0.32);
    border-radius: 14px;
    background: rgba(95, 184, 255, 0.08);
    color: #dce9f8;
    font-size: 0.82rem;
    line-height: 1.45;
}
body.theme-catalogo-page .produtos-aviso.is-warning {
    border-color: rgba(255, 173, 59, 0.36);
    background: rgba(255, 173, 59, 0.08);
}
body.theme-catalogo-page .produtos-aviso svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body.theme-catalogo-page .produtos-aviso strong {
    display: block;
}
body.theme-mode-light.theme-catalogo-page .produtos-aviso {
    border-color: rgba(31, 95, 214, 0.24);
    background: #eef5ff;
    color: #172b4d;
}
body.theme-mode-light.theme-catalogo-page .produtos-aviso.is-warning {
    border-color: rgba(180, 83, 9, 0.28);
    background: #fff7e8;
}
body.theme-catalogo-page .produtos-aviso.is-info-small {
    margin: 0;
    padding: 10px 12px;
    font-size: 0.76rem;
}
/* Tema claro: titulos dos blocos de palavras, do catalogo e das sugestoes */
body.theme-mode-light.theme-monitor-grupo-page .monitor-palavras-titulo strong,
body.theme-mode-light.theme-monitor-grupo-page .monitor-catalogo-head strong,
body.theme-mode-light.theme-monitor-grupo-page .monitor-propostas b { color: #13283d; }
body.theme-mode-light.theme-monitor-grupo-page .monitor-catalogo-head span { color: #4a5d70; opacity: 1; }
body.theme-mode-light.theme-catalogo-page .catalogo-toolbar-texto { color: #4a5d70; opacity: 1; }
body.theme-catalogo-page .catalogo-propostas td { white-space: normal; vertical-align: top; }
body.theme-catalogo-page .catalogo-propostas td .portal-cell-sub { white-space: normal; }
body.theme-catalogo-page .catalogo-propostas .portal-entity-name, body.theme-catalogo-page .catalogo-propostas .catalogo-conflito { white-space: normal; overflow: visible; text-overflow: clip; max-width: none; }

/* Fase 1B-2: conferencias DDA gravadas */
body.theme-dda-page .dda-wrap { margin-top: 14px; }
body.theme-dda-page .dda-wrap.legacy-table-wrap.portal-table-wrap { min-height: 0; }
body.theme-dda-page tr.is-selecionado td { background: rgba(124, 200, 255, 0.08); }
body.theme-dda-page .dda-detalhe { margin-top: 18px; padding: 14px; border: 1px solid rgba(124, 200, 255, 0.28); border-radius: 16px; background: rgba(124, 200, 255, 0.04); }
body.theme-dda-page .dda-detalhe-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
body.theme-dda-page .dda-detalhe-head > div:first-child { display: grid; gap: 3px; }
body.theme-dda-page .dda-detalhe-head span { font-size: 0.82rem; opacity: 0.8; }
body.theme-dda-page .dda-filtros { display: flex; flex-wrap: wrap; gap: 6px; }
body.theme-dda-page .dda-filtros a { text-decoration: none; }
body.theme-mode-light.theme-dda-page .dda-detalhe { border-color: #b9d8f5; background: #f7fbff; }
body.theme-mode-light.theme-dda-page .dda-detalhe-head strong { color: #13283d; }
body.theme-mode-light.theme-dda-page .dda-detalhe-head span { color: #4a5d70; opacity: 1; }
body.theme-mode-light.theme-dda-page tr.is-selecionado td { background: #eef6ff; }
.legacy-financeiro-dda-saved { display: inline-flex; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(114, 219, 98, 0.16); color: #8fe580; font-size: 0.8rem; font-weight: 800; text-decoration: none; }
body.theme-mode-light .legacy-financeiro-dda-saved { background: #ebf8e8; color: #1d7a35; }

/* Historico de compras do produto aberto pela tela de Alertas (mesmo visual de Compras > Produtos) */
/* Janela de historico */
body.theme-alertas-page .legacy-status-modal.produto-historico-modal {
    width: min(960px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 32px);
}
body.theme-alertas-page .produto-modal-body {
    display: grid;
    gap: 14px;
    padding: 16px 18px 18px;
    overflow: auto;
}
body.theme-alertas-page .produto-historico-carregando {
    margin: 12px 0;
    color: #a9bccd;
}
body.theme-alertas-page .produto-historico-info {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: 10px;
}
body.theme-alertas-page .produto-historico-info span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #f4f8ff;
    font-size: 0.84rem;
    font-weight: 600;
}
body.theme-alertas-page .produto-historico-info b {
    display: block;
    margin-bottom: 2px;
    color: #8ea3b8;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
body.theme-alertas-page .produto-historico-info small {
    display: block;
    color: #8ea3b8;
    font-weight: 500;
}
body.theme-alertas-page .produto-historico-unidades {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}
body.theme-alertas-page .produto-historico-unidade {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: #b7c8da;
    font-size: 0.78rem;
}
body.theme-alertas-page .produto-historico-unidade b {
    color: #4fe0c9;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
body.theme-alertas-page .produto-historico-unidade strong {
    color: #f6faff;
    font-size: 0.95rem;
}
body.theme-alertas-page .produto-historico-grafico {
    margin: 0;
    padding: 12px 14px 8px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}
body.theme-alertas-page .produto-historico-grafico figcaption {
    margin-bottom: 6px;
    color: #8ea3b8;
    font-size: 0.72rem;
    font-weight: 700;
}
body.theme-alertas-page .produto-historico-grafico svg {
    display: block;
    width: 100%;
    height: auto;
}
body.theme-alertas-page .produto-historico-grafico .eixo { stroke: rgba(148, 163, 184, 0.22); stroke-dasharray: 4 4; }
body.theme-alertas-page .produto-historico-grafico .linha { fill: none; stroke: #4fe0c9; stroke-width: 2.2; stroke-linejoin: round; }
body.theme-alertas-page .produto-historico-grafico .area { fill: rgba(79, 224, 201, 0.12); stroke: none; }
body.theme-alertas-page .produto-historico-grafico circle { fill: #0c1826; stroke: #4fe0c9; stroke-width: 2; }
body.theme-alertas-page .produto-historico-grafico text { fill: #8ea3b8; font-size: 11px; font-family: "Segoe UI", Tahoma, sans-serif; }
body.theme-alertas-page .produto-historico-grafico-vazio,
body.theme-alertas-page .produto-historico-nomes {
    margin: 0;
    color: #a9bccd;
    font-size: 0.78rem;
    line-height: 1.5;
}
body.theme-alertas-page .produto-historico-tabela {
    max-height: 340px;
    overflow: auto;
}
body.theme-alertas-page .produto-historico-tabela table {
    min-width: 640px;
}
@media (max-width: 720px) {
    body.theme-alertas-page .produto-historico-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.theme-alertas-page .produto-historico-info span:first-child {
        grid-column: 1 / -1;
    }
}
body.theme-mode-light.theme-alertas-page .produto-historico-carregando,
body.theme-mode-light.theme-alertas-page .produto-historico-grafico-vazio,
body.theme-mode-light.theme-alertas-page .produto-historico-nomes {
    color: #405a74;
}
body.theme-mode-light.theme-alertas-page .produto-historico-info span { color: #172b4d; }
body.theme-mode-light.theme-alertas-page .produto-historico-info b,
body.theme-mode-light.theme-alertas-page .produto-historico-info small,
body.theme-mode-light.theme-alertas-page .produto-historico-grafico figcaption { color: #566a82; }
body.theme-mode-light.theme-alertas-page .produto-historico-unidade {
    border-color: rgba(41, 71, 115, 0.14);
    background: #f6f9fd;
    color: #405a74;
}
body.theme-mode-light.theme-alertas-page .produto-historico-unidade b { color: #0f766e; }
body.theme-mode-light.theme-alertas-page .produto-historico-unidade strong { color: #172b4d; }
body.theme-mode-light.theme-alertas-page .produto-historico-grafico {
    border-color: rgba(41, 71, 115, 0.14);
    background: #fbfdff;
}
body.theme-mode-light.theme-alertas-page .produto-historico-grafico .eixo { stroke: rgba(41, 71, 115, 0.18); }
body.theme-mode-light.theme-alertas-page .produto-historico-grafico .linha { stroke: #0f766e; }
body.theme-mode-light.theme-alertas-page .produto-historico-grafico .area { fill: rgba(15, 118, 110, 0.1); }
body.theme-mode-light.theme-alertas-page .produto-historico-grafico circle { fill: #ffffff; stroke: #0f766e; }
body.theme-mode-light.theme-alertas-page .produto-historico-grafico text { fill: #566a82; }
body.theme-alertas-page .produto-modal .legacy-status-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
body.theme-alertas-page .produto-modal-alvo {
    display: grid;
    gap: 2px;
    margin: 0;
    color: #f4f8ff;
}
body.theme-alertas-page .produto-modal-alvo small,
body.theme-alertas-page .produto-modal-texto {
    margin: 0;
    color: #a9bccd;
    font-size: 0.8rem;
    line-height: 1.5;
}
body.theme-alertas-page .produto-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
body.theme-alertas-page .produto-modal .legacy-editor-field {
    display: grid;
    gap: 6px;
    margin: 0;
}
body.theme-alertas-page .produto-historico-unidade.is-base {
    border-color: rgba(79, 224, 201, 0.4);
}
body.theme-alertas-page .produto-historico-acoes {
    color: #b7c8da;
    font-size: 0.78rem;
}
body.theme-alertas-page .produto-historico-acoes ul {
    display: grid;
    gap: 4px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}
body.theme-alertas-page .produto-historico-acoes li span {
    color: #8ea3b8;
    font-variant-numeric: tabular-nums;
}
body.theme-alertas-page .produto-historico-tabela td small {
    color: #8ea3b8;
}
@media (max-width: 720px) {
    body.theme-alertas-page .produto-modal-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
body.theme-mode-light.theme-alertas-page .produto-modal-alvo { color: #172b4d; }
body.theme-mode-light.theme-alertas-page .produto-modal-alvo small,
body.theme-mode-light.theme-alertas-page .produto-modal-texto,
body.theme-mode-light.theme-alertas-page .produto-historico-acoes,
body.theme-mode-light.theme-alertas-page .produto-historico-acoes li span,
body.theme-mode-light.theme-alertas-page .produto-historico-tabela td small { color: #566a82; }
body.theme-mode-light.theme-alertas-page .produto-historico-unidade.is-base { border-color: rgba(15, 118, 110, 0.4); }
body.theme-alertas-page .alerta-produto-loja { margin: 0; padding: 0 20px 6px; font-size: 0.8rem; opacity: 0.8; }

/* Popup de avisos por usuario (Compras, Fiscal, Financeiro) - canto inferior direito */
.aviso-popup {
    position: fixed; right: 20px; bottom: 20px; z-index: 1200;
    display: grid; grid-template-rows: auto minmax(0, 1fr);
    width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 110px);
    border: 1px solid rgba(255, 173, 59, 0.45); border-radius: 18px;
    background: linear-gradient(160deg, rgba(20, 34, 52, 0.98), rgba(12, 22, 36, 0.98));
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    color: #dce8fb; font-size: 0.82rem; animation: alertaEntradaSobe 0.32s ease-out; overflow: hidden;
}
.aviso-popup.is-saindo { opacity: 0; transform: translateY(12px); transition: opacity 0.2s ease, transform 0.2s ease; }
.aviso-popup.is-novo { animation: avisoPisca 0.9s ease-out; }
@keyframes avisoPisca { 0% { box-shadow: 0 0 0 0 rgba(255, 173, 59, 0.7); } 100% { box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45), 0 0 0 14px rgba(255, 173, 59, 0); } }
@media (prefers-reduced-motion: reduce) { .aviso-popup, .aviso-popup.is-novo { animation: none; } .aviso-popup.is-saindo { transition: none; } }
.aviso-popup-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.aviso-popup-head strong { display: block; font-size: 0.95rem; }
.aviso-popup-head span { display: block; color: #9fb4ca; font-size: 0.74rem; }
.aviso-popup-icone { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 173, 59, 0.16); color: #ffc160; }
.aviso-popup-icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aviso-popup-fechar { width: 30px; height: 30px; min-height: 0; padding: 0; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.aviso-popup-fechar:hover { background: rgba(255, 255, 255, 0.08); }
.aviso-popup-corpo { display: grid; gap: 10px; padding: 0 16px 16px; overflow-y: auto; }
.aviso-area { display: grid; gap: 7px; padding: 10px 11px 11px; border: 1px solid rgba(255, 255, 255, 0.07); border-left-width: 3px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.aviso-area.is-compras { border-left-color: #ff8a96; }
.aviso-area.is-fiscal { border-left-color: #7cc8ff; }
.aviso-area.is-financeiro { border-left-color: #ffc160; }
.aviso-area h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: #c6d6ea; }
.aviso-area h4 span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 0.7rem; letter-spacing: 0; }
.aviso-linha { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; padding: 8px 10px; border-radius: 11px; }
.aviso-linha span { font-weight: 800; font-variant-numeric: tabular-nums; }
.aviso-linha.is-alta { background: rgba(255, 83, 100, 0.12); }
.aviso-linha.is-alta b, .aviso-linha.is-alta span { color: #ff8a96; }
.aviso-linha.is-fornecedor { background: rgba(255, 200, 97, 0.13); }
.aviso-linha.is-fornecedor b, .aviso-linha.is-fornecedor span { color: #ffc861; }
.aviso-linha.is-queda { background: rgba(114, 219, 98, 0.12); }
.aviso-linha.is-queda b, .aviso-linha.is-queda span { color: #8fe580; }
.aviso-lista { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: #b8c9dc; font-size: 0.75rem; }
.aviso-lista li { display: flex; justify-content: space-between; gap: 10px; }
.aviso-lista li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aviso-lista li b { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.aviso-loja { display: grid; gap: 6px; padding-top: 6px; border-top: 1px dashed rgba(255, 255, 255, 0.08); }
.aviso-area h4 + .aviso-loja { border-top: 0; padding-top: 0; }
.aviso-loja-topo { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.aviso-loja-topo b { grid-column: 1 / -1; font-size: 0.8rem; }
.aviso-loja-topo span { color: #b8c9dc; font-size: 0.76rem; }
.aviso-loja-topo strong { font-variant-numeric: tabular-nums; }
.aviso-botao { justify-self: start; display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid rgba(124, 200, 255, 0.4); border-radius: 999px; color: #9fd4ff; font-size: 0.76rem; font-weight: 800; text-decoration: none; }
.aviso-botao:hover { background: rgba(124, 200, 255, 0.1); }
body.theme-mode-light .aviso-popup { border-color: #f1c27a; background: #ffffff; color: #13283d; box-shadow: 0 22px 48px rgba(20, 40, 70, 0.22); }
body.theme-mode-light .aviso-popup-head span, body.theme-mode-light .aviso-lista, body.theme-mode-light .aviso-loja-topo span { color: #4a5d70; }
body.theme-mode-light .aviso-popup-fechar { border-color: #c9d6e5; }
body.theme-mode-light .aviso-area { border-color: #e1e9f2; background: #f8fbff; }
body.theme-mode-light .aviso-area.is-compras { border-left-color: #d64553; }
body.theme-mode-light .aviso-area.is-fiscal { border-left-color: #2f80c9; }
body.theme-mode-light .aviso-area.is-financeiro { border-left-color: #c98a12; }
body.theme-mode-light .aviso-area h4 { color: #2a3f55; }
body.theme-mode-light .aviso-area h4 span { background: #e6eef7; }
body.theme-mode-light .aviso-linha.is-alta { background: #ffeef0; }
body.theme-mode-light .aviso-linha.is-alta b, body.theme-mode-light .aviso-linha.is-alta span { color: #b0202f; }
body.theme-mode-light .aviso-linha.is-fornecedor { background: #fff6e3; }
body.theme-mode-light .aviso-linha.is-fornecedor b, body.theme-mode-light .aviso-linha.is-fornecedor span { color: #8a5200; }
body.theme-mode-light .aviso-linha.is-queda { background: #ebf8e8; }
body.theme-mode-light .aviso-linha.is-queda b, body.theme-mode-light .aviso-linha.is-queda span { color: #1d7a35; }
body.theme-mode-light .aviso-botao { border-color: #9cc3e8; color: #145ea8; }
@media (max-width: 600px) { .aviso-popup { right: 12px; left: 12px; bottom: 12px; width: auto; } }
.aviso-popup-corpo { grid-template-columns: minmax(0, 1fr); }
.aviso-popup-corpo > *, .aviso-area > *, .aviso-loja > *, .aviso-lista li { min-width: 0; }
.aviso-loja-topo span { overflow-wrap: anywhere; }
/* Avisos: preco fora do padrao online (etapa 2) */
.aviso-online { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 10px; border-radius: 10px; background: rgba(255, 83, 100, 0.16); color: #ffb0b8; font-size: 0.78rem; font-weight: 800; }
.aviso-online i { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: #ff5364; box-shadow: 0 0 0 0 rgba(255, 83, 100, 0.6); animation: avisoOnline 1.6s ease-out infinite; }
@keyframes avisoOnline { 0% { box-shadow: 0 0 0 0 rgba(255, 83, 100, 0.6); } 100% { box-shadow: 0 0 0 8px rgba(255, 83, 100, 0); } }
.aviso-lista.is-precos { gap: 6px; }
.aviso-lista.is-precos li { align-items: flex-start; padding-left: 8px; border-left: 2px solid #ff8a96; }
.aviso-lista.is-precos li.is-preco_fornecedor { border-left-color: #ffc861; }
.aviso-lista.is-precos li.is-preco_queda { border-left-color: #8fe580; }
.aviso-lista.is-precos li span small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8ea3ba; font-size: 0.68rem; }
.aviso-lista.is-precos li.is-preco_alta b { color: #ff8a96; }
.aviso-lista.is-precos li.is-preco_fornecedor b { color: #ffc861; }
.aviso-lista.is-precos li.is-preco_queda b { color: #8fe580; }
body.theme-mode-light .aviso-online { background: #ffeef0; color: #b0202f; }
body.theme-mode-light .aviso-lista.is-precos li span small { color: #6a7d90; }
body.theme-mode-light .aviso-lista.is-precos li.is-preco_alta b { color: #b0202f; }
body.theme-mode-light .aviso-lista.is-precos li.is-preco_fornecedor b { color: #8a5200; }
body.theme-mode-light .aviso-lista.is-precos li.is-preco_queda b { color: #1d7a35; }
@media (prefers-reduced-motion: reduce) { .aviso-online i { animation: none; } }
/* Classificacao financeira (de-para) no Contas a Pagar */
.fin-class-missing { display: inline-flex; align-items: center; gap: 5px; min-height: 0; padding: 3px 9px 3px 7px; border: 1px solid rgba(255, 83, 100, 0.5); border-radius: 999px; background: rgba(255, 83, 100, 0.12); color: #ff9aa5; font-size: 0.74rem; font-weight: 800; line-height: 1.3; cursor: pointer; white-space: nowrap; }
.fin-class-missing svg { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fin-class-missing:hover, .fin-class-missing:focus-visible { background: rgba(255, 83, 100, 0.22); border-color: #ff8a96; }
.fin-class-fiscal { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8ea3ba; font-size: 0.72rem; }
body.theme-mode-light .fin-class-fiscal { color: #6a7d90; }
.fin-class-modal:focus { outline: none; }
.fin-class-flash { animation: finClassFlash 1.6s ease-out; }
@keyframes finClassFlash { 0% { background: rgba(114, 219, 98, 0.32); } 100% { background: transparent; } }
.fin-class-batch-hint { display: inline-flex; align-items: center; gap: 8px; padding: 3px 4px 3px 10px; border-radius: 999px; background: rgba(255, 83, 100, 0.14); color: #ffb0b8; }
.fin-class-batch-hint[hidden] { display: none; }
.fin-class-batch-hint button { min-height: 0; padding: 3px 10px; border: 0; border-radius: 999px; background: #ff5364; color: #fff; font-size: 0.72rem; font-weight: 800; cursor: pointer; }
.fin-class-backdrop { position: fixed; inset: 0; z-index: 1300; background: rgba(4, 10, 20, 0.62); backdrop-filter: blur(3px); animation: finClassFade 0.18s ease-out; }
.fin-class-backdrop[hidden], .fin-class-modal[hidden] { display: none; }
.fin-class-modal {
    position: fixed; left: 50%; top: 50%; z-index: 1301; transform: translate(-50%, -50%);
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
    border: 1px solid rgba(124, 200, 255, 0.28); border-radius: 20px;
    background: linear-gradient(165deg, rgba(20, 34, 52, 0.99), rgba(11, 20, 33, 0.99));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    color: #dce8fb; font-size: 0.84rem; overflow: hidden; animation: finClassSobe 0.22s ease-out;
}
@keyframes finClassFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes finClassSobe { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
.fin-class-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.fin-class-head h3 { margin: 0; font-size: 1.02rem; letter-spacing: 0.01em; }
.fin-class-head p { margin: 2px 0 0; color: #9fb4ca; font-size: 0.78rem; }
.fin-class-head-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(140deg, rgba(124, 200, 255, 0.24), rgba(255, 193, 96, 0.18)); color: #9fd4ff; }
.fin-class-head-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fin-class-close { width: 32px; height: 32px; min-height: 0; padding: 0; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; background: transparent; color: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer; }
.fin-class-close:hover { background: rgba(255, 255, 255, 0.08); }
.fin-class-body { display: grid; gap: 14px; padding: 16px 20px; overflow-y: auto; grid-template-columns: minmax(0, 1fr); }
.fin-class-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 34px 0; color: #9fb4ca; }
.fin-class-loading i { width: 18px; height: 18px; border: 2px solid rgba(124, 200, 255, 0.25); border-top-color: #7cc8ff; border-radius: 50%; animation: finClassGira 0.8s linear infinite; }
@keyframes finClassGira { to { transform: rotate(360deg); } }
.fin-class-grupo { display: grid; gap: 0; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 16px; background: rgba(255, 255, 255, 0.025); min-width: 0; }
.fin-class-grupo.is-pendente { border-color: rgba(255, 83, 100, 0.28); }
.fin-class-grupo.is-erro { border-color: #ff5364; box-shadow: 0 0 0 3px rgba(255, 83, 100, 0.18); }
.fin-class-grupo-topo { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin-bottom: 10px; font-size: 0.76rem; color: #9fb4ca; }
.fin-class-grupo-topo b { color: #dce8fb; }
.fin-class-etapa { display: grid; gap: 8px; padding: 12px 14px; border-radius: 13px; min-width: 0; }
.fin-class-etapa.is-fiscal { background: rgba(124, 200, 255, 0.08); border: 1px solid rgba(124, 200, 255, 0.18); }
.fin-class-etapa.is-financeiro { background: rgba(255, 193, 96, 0.07); border: 1px solid rgba(255, 193, 96, 0.2); }
.fin-class-etapa-rotulo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #9fd4ff; }
.fin-class-etapa.is-financeiro .fin-class-etapa-rotulo { color: #ffc160; }
.fin-class-etapa-rotulo small { font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: #8ea3ba; }
.fin-class-caminho { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; min-width: 0; font-size: 0.95rem; }
.fin-class-caminho span { color: #b8c9dc; }
.fin-class-caminho i { color: #6f86a0; font-style: normal; }
.fin-class-caminho strong { color: #f1f6ff; overflow-wrap: anywhere; }
.fin-class-origem { color: #8ea3ba; font-size: 0.72rem; }
.fin-class-seta { display: grid; place-items: center; height: 22px; }
.fin-class-seta span { position: relative; width: 2px; height: 100%; background: linear-gradient(#7cc8ff, #ffc160); }
.fin-class-seta span::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 8px; height: 8px; border-right: 2px solid #ffc160; border-bottom: 2px solid #ffc160; transform: translateX(-50%) rotate(45deg); }
.fin-class-pill { padding: 2px 9px; border-radius: 999px; font-size: 0.68rem; font-style: normal; font-weight: 800; letter-spacing: 0.01em; text-transform: none; }
.fin-class-pill.is-ok { background: rgba(114, 219, 98, 0.14); color: #8fe580; }
.fin-class-pill.is-falta { background: rgba(255, 83, 100, 0.16); color: #ff9aa5; }
.fin-class-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fin-class-campos label { display: grid; gap: 4px; min-width: 0; }
.fin-class-campos label span { color: #9fb4ca; font-size: 0.72rem; font-weight: 700; }
.fin-class-campos select { width: 100%; min-width: 0; min-height: 38px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; background: rgba(5, 12, 22, 0.6); color: #f1f6ff; font-size: 0.82rem; }
.fin-class-campos select:focus { outline: none; border-color: #ffc160; box-shadow: 0 0 0 3px rgba(255, 193, 96, 0.2); }
.fin-class-campos select:disabled { opacity: 0.6; cursor: not-allowed; }
.fin-class-impacto { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(124, 200, 255, 0.07); color: #b8c9dc; font-size: 0.76rem; line-height: 1.45; }
.fin-class-impacto i { flex-shrink: 0; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(124, 200, 255, 0.22); color: #9fd4ff; font-size: 0.7rem; font-style: normal; font-weight: 800; }
.fin-class-impacto b { color: #e8f1ff; }
.fin-class-conta { margin: 8px 0 0; color: #8ea3ba; font-size: 0.74rem; overflow-wrap: anywhere; }
.fin-class-conta b { color: #dce8fb; }
.fin-class-alerta, .fin-class-obrigatorio { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 0.78rem; line-height: 1.45; }
.fin-class-alerta { background: rgba(255, 83, 100, 0.12); color: #ffb0b8; }
.fin-class-grupo .fin-class-alerta { margin-top: 10px; }
.fin-class-obrigatorio { background: rgba(255, 193, 96, 0.12); color: #ffd28a; }
.fin-class-nota { margin: 0; color: #8ea3ba; font-size: 0.74rem; }
.fin-class-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.fin-class-foot-info { margin-right: auto; color: #6f86a0; font-size: 0.72rem; }
.fin-class-btn { min-height: 38px; padding: 0 18px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; background: transparent; color: #dce8fb; font-size: 0.82rem; font-weight: 800; cursor: pointer; }
.fin-class-btn:hover { background: rgba(255, 255, 255, 0.07); }
.fin-class-btn.is-primary { border-color: transparent; background: linear-gradient(135deg, #2fa9ff, #1677d6); color: #fff; box-shadow: 0 8px 20px rgba(47, 169, 255, 0.28); }
.fin-class-btn.is-primary:hover { filter: brightness(1.08); }
.fin-class-btn.is-salvando { opacity: 0.7; cursor: progress; }
body.theme-mode-light .fin-class-missing { background: #ffeef0; border-color: #f1a3ad; color: #b0202f; }
body.theme-mode-light .fin-class-batch-hint { background: #ffeef0; color: #b0202f; }
body.theme-mode-light .fin-class-backdrop { background: rgba(20, 40, 70, 0.35); }
body.theme-mode-light .fin-class-modal { border-color: #c9dcef; background: #ffffff; color: #13283d; box-shadow: 0 30px 70px rgba(20, 40, 70, 0.28); }
body.theme-mode-light .fin-class-head, body.theme-mode-light .fin-class-foot { border-color: #e6eef7; }
body.theme-mode-light .fin-class-head p, body.theme-mode-light .fin-class-grupo-topo, body.theme-mode-light .fin-class-campos label span { color: #4a5d70; }
body.theme-mode-light .fin-class-head-icon { background: linear-gradient(140deg, #e3f1ff, #fff1d9); color: #145ea8; }
body.theme-mode-light .fin-class-close { border-color: #c9d6e5; }
body.theme-mode-light .fin-class-grupo { border-color: #e1e9f2; background: #fbfdff; }
body.theme-mode-light .fin-class-grupo.is-pendente { border-color: #f1a3ad; }
body.theme-mode-light .fin-class-grupo-topo b, body.theme-mode-light .fin-class-caminho strong, body.theme-mode-light .fin-class-impacto b, body.theme-mode-light .fin-class-conta b { color: #13283d; }
body.theme-mode-light .fin-class-etapa.is-fiscal { background: #eef6ff; border-color: #cfe3f7; }
body.theme-mode-light .fin-class-etapa.is-financeiro { background: #fff8ec; border-color: #f3dcb1; }
body.theme-mode-light .fin-class-etapa-rotulo { color: #145ea8; }
body.theme-mode-light .fin-class-etapa.is-financeiro .fin-class-etapa-rotulo { color: #9a5800; }
body.theme-mode-light .fin-class-caminho span, body.theme-mode-light .fin-class-impacto { color: #3d5266; }
body.theme-mode-light .fin-class-origem, body.theme-mode-light .fin-class-conta, body.theme-mode-light .fin-class-nota, body.theme-mode-light .fin-class-etapa-rotulo small, body.theme-mode-light .fin-class-foot-info { color: #6a7d90; }
body.theme-mode-light .fin-class-impacto { background: #f1f7fe; }
body.theme-mode-light .fin-class-campos select { border-color: #c9d6e5; background: #ffffff; color: #13283d; }
body.theme-mode-light .fin-class-pill.is-ok { background: #ebf8e8; color: #1d7a35; }
body.theme-mode-light .fin-class-pill.is-falta { background: #ffeef0; color: #b0202f; }
body.theme-mode-light .fin-class-alerta { background: #ffeef0; color: #9c1c2a; }
body.theme-mode-light .fin-class-obrigatorio { background: #fff6e3; color: #7a4a00; }
body.theme-mode-light .fin-class-btn { border-color: #c9d6e5; color: #13283d; }
@media (max-width: 600px) { .fin-class-campos { grid-template-columns: minmax(0, 1fr); } .fin-class-foot-info { display: none; } }
@media (prefers-reduced-motion: reduce) { .fin-class-modal, .fin-class-backdrop, .fin-class-flash { animation: none; } }
/* Classificacao: correcao do Setor NF inativo/nao definido */
.fin-class-missing.is-fiscal { border-color: rgba(255, 193, 96, 0.55); background: rgba(255, 193, 96, 0.13); color: #ffcf7f; }
.fin-class-missing.is-fiscal:hover, .fin-class-missing.is-fiscal:focus-visible { background: rgba(255, 193, 96, 0.24); border-color: #ffc160; }
.fin-class-fiscal.is-problema { color: #ffb36b; }
.fin-class-etapa.is-fiscal.is-problema { background: rgba(255, 193, 96, 0.07); border-color: rgba(255, 193, 96, 0.32); }
.fin-class-etapa.is-fiscal.is-problema .fin-class-etapa-rotulo { color: #ffc160; }
.fin-class-caminho s { color: #8ea3ba; text-decoration-color: rgba(255, 138, 150, 0.8); }
.fin-class-campo-fiscal { display: grid; gap: 4px; min-width: 0; }
.fin-class-campo-fiscal span { color: #9fb4ca; font-size: 0.72rem; font-weight: 700; }
.fin-class-campo-fiscal select { width: 100%; min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid rgba(255, 193, 96, 0.45); border-radius: 10px; font-size: 0.82rem; }
.fin-class-campo-fiscal select:focus { outline: none; box-shadow: 0 0 0 3px rgba(255, 193, 96, 0.22); }
.fin-class-irmaos { display: grid; gap: 6px; padding: 10px; border: 1px dashed rgba(255, 255, 255, 0.12); border-radius: 12px; }
.fin-class-irmaos-titulo { color: #9fb4ca; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.fin-class-irmao { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; font-size: 0.76rem; color: #b8c9dc; cursor: pointer; }
.fin-class-irmao.is-marcado { background: rgba(124, 200, 255, 0.08); color: #e8f1ff; }
.fin-class-irmao input { margin: 0; }
.fin-class-irmao em { color: #ff9aa5; font-style: normal; }
.fin-class-irmao small { color: #8ea3ba; }
.fin-class-irmao strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-class-padrao { display: flex; align-items: flex-start; gap: 8px; font-size: 0.76rem; color: #dce8fb; cursor: pointer; }
.fin-class-padrao input { margin: 2px 0 0; }
.fin-class-padrao small { color: #8ea3ba; }
.fin-class-etapa.is-travado { opacity: 0.55; }
.fin-class-pill.is-espera { background: rgba(255, 255, 255, 0.08); color: #9fb4ca; }
body.theme-mode-light .fin-class-missing.is-fiscal { background: #fff4e0; border-color: #f0c77e; color: #8a5200; }
body.theme-mode-light .fin-class-fiscal.is-problema { color: #9a5800; }
body.theme-mode-light .fin-class-etapa.is-fiscal.is-problema { background: #fff8ec; border-color: #f3dcb1; }
body.theme-mode-light .fin-class-etapa.is-fiscal.is-problema .fin-class-etapa-rotulo { color: #9a5800; }
body.theme-mode-light .fin-class-caminho s { color: #6a7d90; }
body.theme-mode-light .fin-class-campo-fiscal span, body.theme-mode-light .fin-class-irmaos-titulo { color: #4a5d70; }
body.theme-mode-light .fin-class-irmaos { border-color: #d6e2ee; }
body.theme-mode-light .fin-class-irmao { color: #3d5266; }
body.theme-mode-light .fin-class-irmao.is-marcado { background: #eef6ff; color: #13283d; }
body.theme-mode-light .fin-class-irmao em { color: #b0202f; }
body.theme-mode-light .fin-class-irmao small, body.theme-mode-light .fin-class-padrao small { color: #6a7d90; }
body.theme-mode-light .fin-class-padrao { color: #13283d; }
body.theme-mode-light .fin-class-pill.is-espera { background: #eef2f6; color: #4a5d70; }
.fin-class-modal input[type="checkbox"] { flex: none; width: 16px; height: 16px; min-width: 16px; min-height: 0; margin: 0; padding: 0; accent-color: #2fa9ff; box-shadow: none; -webkit-appearance: auto; appearance: auto; }
.fin-class-modal .fin-class-irmao, .fin-class-modal .fin-class-padrao { min-height: 0; margin: 0; line-height: 1.35; }
.fin-class-irmao { padding: 5px 8px; }
.fin-class-padrao { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }

/* Classificacao por titulo: alcance (so este titulo / todos do fornecedor) */
.fin-class-escopo { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 0; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; background: rgba(255, 255, 255, 0.03); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.fin-class-escopo:hover { border-color: rgba(124, 200, 255, 0.35); }
.fin-class-escopo input { appearance: auto; width: 16px; height: 16px; min-height: 0; margin: 2px 0 0; flex-shrink: 0; }
.fin-class-escopo span { display: grid; gap: 2px; font-size: 0.8rem; color: #e8f1ff; }
.fin-class-escopo small { color: #8ea3ba; font-size: 0.72rem; }
.fin-class-escopo.is-todos { border-color: rgba(255, 193, 96, 0.6); background: rgba(255, 193, 96, 0.1); }
.fin-class-impacto.is-todos { background: rgba(255, 193, 96, 0.12); color: #ffd28a; }
.fin-class-impacto.is-todos i { background: rgba(255, 193, 96, 0.3); color: #ffc160; }
.fin-class-impacto small { color: #8ea3ba; }
.fin-class-pill small { font-weight: 600; opacity: 0.8; }
.fin-class-btn.is-primary.is-perigo { background: linear-gradient(135deg, #ff9a3c, #e0592a); box-shadow: 0 8px 20px rgba(224, 89, 42, 0.3); }
.fin-class-foot-info.is-perigo { color: #ffc160; font-weight: 700; }
body.theme-mode-light .fin-class-escopo { border-color: #d6e2ee; background: #f7fafd; }
body.theme-mode-light .fin-class-escopo span { color: #13283d; }
body.theme-mode-light .fin-class-escopo small, body.theme-mode-light .fin-class-impacto small { color: #6a7d90; }
body.theme-mode-light .fin-class-escopo.is-todos { border-color: #f0c77e; background: #fff6e6; }
body.theme-mode-light .fin-class-impacto.is-todos { background: #fff4e0; color: #8a5200; }
body.theme-mode-light .fin-class-impacto.is-todos i { background: #ffe2ad; color: #9a5800; }
body.theme-mode-light .fin-class-foot-info.is-perigo { color: #b45a00; }

/* NF-e: destaque das transferencias entre lojas e prazo para recusar depois do aceite (28/10/2026). */
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer td {
    background: rgba(167, 139, 250, 0.08);
    border-color: rgba(167, 139, 250, 0.42) !important;
}
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer td:first-child {
    box-shadow: inset 4px 0 0 #a78bfa;
}
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer.is-transfer-pendente td {
    background: rgba(251, 191, 36, 0.07);
    border-color: rgba(251, 191, 36, 0.5) !important;
    border-top-style: dashed !important;
    border-bottom-style: dashed !important;
}
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer.is-transfer-pendente td:first-child {
    box-shadow: inset 4px 0 0 #fbbf24;
}
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer:hover td {
    background: rgba(167, 139, 250, 0.14);
}
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer.selected td {
    background: rgba(167, 139, 250, 0.18);
    border-color: rgba(45, 212, 191, 0.55) !important;
}
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer td.legacy-col-acoes { background: rgba(167, 139, 250, 0.08) !important; }
body.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer.is-transfer-pendente td.legacy-col-acoes { background: rgba(251, 191, 36, 0.07) !important; }

body.theme-nfe-page .legacy-nfe-supplier-icon.legacy-nfe-transfer-icon {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.32), rgba(96, 165, 250, 0.22));
    color: #ddd3ff;
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.45);
}
body.theme-nfe-page .legacy-row-transfer.is-transfer-pendente .legacy-nfe-supplier-icon.legacy-nfe-transfer-icon {
    background: rgba(251, 191, 36, 0.2);
    color: #fde68a;
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.5);
}

body.theme-nfe-page .legacy-nfe-supplier-text small.legacy-transfer-line {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
    overflow: visible;
    white-space: normal;
}
body.theme-nfe-page .legacy-nfe-supplier-text small .legacy-transfer-caption,
body.theme-nfe-page .legacy-transfer-regret {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 0;
    padding: 1px 8px 1px 6px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: normal;
    max-width: 100%;
    line-height: 1.35;
    cursor: help;
}
body.theme-nfe-page .legacy-nfe-supplier-text small .legacy-transfer-caption {
    background: rgba(167, 139, 250, 0.2);
    color: #d9ceff;
    border: 1px solid rgba(167, 139, 250, 0.5);
}
body.theme-nfe-page .is-transfer-pendente .legacy-nfe-supplier-text small .legacy-transfer-caption {
    background: rgba(251, 191, 36, 0.16);
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.55);
}
body.theme-nfe-page .legacy-transfer-regret {
    background: rgba(244, 114, 182, 0.16);
    color: #fbcfe8;
    border: 1px solid rgba(244, 114, 182, 0.5);
}
body.theme-nfe-page .legacy-transfer-caption svg,
body.theme-nfe-page .legacy-transfer-regret svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer td { background: #f6f2ff; border-color: #c9b8fb !important; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer td:first-child { box-shadow: inset 4px 0 0 #7c3aed; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer.is-transfer-pendente td { background: #fffbeb; border-color: #f5c451 !important; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer.is-transfer-pendente td:first-child { box-shadow: inset 4px 0 0 #d97706; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer:hover td { background: #efe8ff; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer td.legacy-col-acoes { background: #f6f2ff !important; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-table tbody tr.legacy-row-transfer.is-transfer-pendente td.legacy-col-acoes { background: #fffbeb !important; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-supplier-icon.legacy-nfe-transfer-icon { background: #ede5ff; color: #6d28d9; box-shadow: 0 0 0 1px #c9b8fb; }
body.theme-mode-light.theme-nfe-page .legacy-row-transfer.is-transfer-pendente .legacy-nfe-supplier-icon.legacy-nfe-transfer-icon { background: #fef3c7; color: #b45309; box-shadow: 0 0 0 1px #f5c451; }
body.theme-mode-light.theme-nfe-page .legacy-nfe-supplier-text small .legacy-transfer-caption { background: #ede5ff; color: #5b21b6; border-color: #c9b8fb; }
body.theme-mode-light.theme-nfe-page .is-transfer-pendente .legacy-nfe-supplier-text small .legacy-transfer-caption { background: #fef3c7; color: #92400e; border-color: #f5c451; }
body.theme-mode-light.theme-nfe-page .legacy-transfer-regret { background: #fce7f3; color: #9d174d; border-color: #f9a8d4; }
