html,
body {
    background: #f4f6f8;
    color: #18202b;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
}

* {
    box-sizing: border-box;
}

button,
input {
    font: inherit;
}

select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.workspace {
    margin: 0 auto;
    max-width: 1440px;
}

.workspace-header {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.workspace-header-side {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.workspace-header h1 {
    font-size: 1.45rem;
    line-height: 1.2;
    margin: 0;
}

.workspace-header p {
    color: #667085;
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.status-strip {
    align-items: center;
    color: #475467;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.82rem;
    gap: 0.6rem;
    justify-content: flex-end;
}

.status-strip span {
    background: #eef4ff;
    border: 1px solid #c7d7fe;
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
}

.nfe-environment-badge {
    align-items: flex-end;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 12.5rem;
    padding: 0.55rem 0.7rem;
    text-align: right;
}

.nfe-environment-badge-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nfe-environment-badge strong {
    font-size: 0.96rem;
    line-height: 1.2;
}

.nfe-environment-badge-production {
    background: #eef6ff;
    border-color: #bfd3f6;
    color: #15406b;
}

.nfe-environment-badge-homologation {
    background: #fff7e6;
    border-color: #f3d19c;
    color: #8f4a08;
}

.toolbar {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.65rem;
}

.tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tabs button {
    background: #ffffff;
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    color: #344054;
    font-weight: 700;
    min-height: 2.25rem;
    padding: 0.4rem 0.75rem;
}

.tabs button.active {
    background: #165a96;
    border-color: #165a96;
    color: #ffffff;
}

.section-header-actions {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #edf0f4;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0 0 0.65rem;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 2;
}

.section-header-actions h3 {
    margin: 0;
}

.section-header-button {
    margin-left: auto;
}

.search-input {
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    flex: 1;
    min-width: 12rem;
    padding: 0.55rem 0.65rem;
}

.search-input:focus {
    border-color: #2774b8;
    outline: 2px solid #d4e9fb;
}

.filter-panel {
    align-items: end;
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    margin: -0.35rem 0 1rem;
    padding: 0.65rem;
}

.filter-panel label {
    color: #475467;
    display: grid;
    font-size: 0.76rem;
    font-weight: 700;
    gap: 0.25rem;
}

.filter-panel select {
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    color: #18202b;
    min-height: 2.35rem;
    min-width: 0;
    padding: 0.45rem 0.55rem;
}

.filter-panel select:focus {
    border-color: #2774b8;
    outline: 2px solid #d4e9fb;
}

.primary-action,
.secondary-action {
    border-radius: 4px;
    font-weight: 700;
    min-height: 2.35rem;
    padding: 0.4rem 0.8rem;
}

.primary-action {
    background: #165a96;
    border: 1px solid #165a96;
    color: #ffffff;
}

.secondary-action {
    background: #ffffff;
    border: 1px solid #c6ccd5;
    color: #344054;
}

.sales-order-print-host {
    left: -9999px;
    position: fixed;
    top: 0;
    width: 0;
}

.sales-order-print-sheet {
    background: #ffffff;
    color: #18202b;
    padding: 1rem;
    width: 210mm;
}

.sales-order-print-header {
    align-items: end;
    border-bottom: 1px solid #d7dde5;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
}

.sales-order-print-kicker {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sales-order-print-header h2,
.sales-order-print-meta strong,
.sales-order-print-meta span {
    margin: 0;
}

.sales-order-print-meta {
    display: grid;
    gap: 0.2rem;
    justify-items: end;
    text-align: right;
}

.sales-order-print-details {
    margin-bottom: 1rem;
}

.sales-order-print-note {
    border: 1px solid #d92d20;
    color: #d92d20;
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0 0 0.85rem;
    padding: 0.35rem 0.55rem;
    text-transform: uppercase;
}

.sales-order-print-items {
    border-collapse: collapse;
    width: 100%;
}

.sales-order-print-items th,
.sales-order-print-items td {
    border: 1px solid #d7dde5;
    font-size: 0.82rem;
    padding: 0.45rem 0.5rem;
    text-align: left;
}

.sales-order-print-items th:nth-child(4),
.sales-order-print-items th:nth-child(5),
.sales-order-print-items th:nth-child(6),
.sales-order-print-items td:nth-child(4),
.sales-order-print-items td:nth-child(5),
.sales-order-print-items td:nth-child(6) {
    text-align: right;
}

.danger-action {
    border-color: #fecdca;
    color: #b42318;
}

.secondary-link {
    align-items: center;
    background: #ffffff;
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    color: #344054;
    display: inline-flex;
    font-weight: 700;
    min-height: 2.35rem;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
}

.dashboard-workspace {
    --dashboard-font: "Segoe UI Variable", "Segoe UI", "IBM Plex Sans", Arial, Helvetica, sans-serif;
    --dashboard-bg: linear-gradient(135deg, #0b2748 0%, #124a70 56%, #147d8f 100%);
    --dashboard-surface: rgba(255, 255, 255, 0.9);
    --dashboard-surface-strong: #ffffff;
    --dashboard-border: rgba(15, 35, 58, 0.09);
    --dashboard-border-strong: rgba(255, 255, 255, 0.14);
    --dashboard-text: #10233b;
    --dashboard-muted: #607089;
    --dashboard-soft: #8492a7;
    --dashboard-accent: #176b87;
    --dashboard-accent-soft: #e8f4f7;
    --dashboard-success-soft: #edf7f1;
    --dashboard-success-text: #1f6b4f;
    --dashboard-attention-soft: #fff3e8;
    --dashboard-attention-text: #b45a15;
    --dashboard-shadow: 0 18px 50px rgba(13, 39, 68, 0.12);
    display: grid;
    font-family: var(--dashboard-font);
    gap: 1.1rem;
}

.dashboard-hero {
    align-items: stretch;
    background: var(--dashboard-bg);
    border: 1px solid var(--dashboard-border-strong);
    border-radius: 26px;
    box-shadow: var(--dashboard-shadow);
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    min-height: 10rem;
    padding: 1.75rem 1.85rem;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::after {
    background:
        radial-gradient(circle at 78% 15%, rgba(111, 226, 219, 0.24), transparent 30%),
        radial-gradient(circle at 100% 100%, rgba(77, 160, 208, 0.28), transparent 38%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.dashboard-hero-copy,
.dashboard-date-card {
    position: relative;
    z-index: 1;
}

.dashboard-hero-status {
    align-items: center;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #dff9fb;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    gap: 0.5rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.7rem;
    padding: 0.4rem 0.65rem;
    text-transform: uppercase;
}

.dashboard-status-dot {
    background: #66e3c4;
    border: 3px solid rgba(102, 227, 196, 0.18);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(102, 227, 196, 0.08);
    height: 0.48rem;
    width: 0.48rem;
}

.dashboard-hero h1 {
    color: #ffffff;
    font-size: clamp(2.15rem, 3vw, 3rem);
    font-weight: 760;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 0;
}

.dashboard-hero p {
    color: rgba(233, 246, 255, 0.78);
    font-size: 1rem;
    margin: 0.5rem 0 0;
    max-width: 40rem;
}

.dashboard-date-card {
    align-self: flex-start;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: grid;
    gap: 0.2rem;
    min-width: 13.5rem;
    padding: 0.95rem 1rem;
    text-align: right;
}

.dashboard-date-label {
    color: rgba(225, 242, 252, 0.66);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-date-card strong {
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.2;
}

.dashboard-date-card small {
    color: rgba(233, 246, 255, 0.72);
    font-size: 0.8rem;
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
    background: var(--dashboard-surface);
    border: 1px solid var(--dashboard-border);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(18, 42, 66, 0.055);
    display: grid;
    gap: 0.45rem;
    min-height: 12rem;
    overflow: hidden;
    padding: 1.2rem 1.25rem;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.metric-card::before {
    background: linear-gradient(90deg, #2d8cba, #63c4d1);
    content: "";
    height: 3px;
    inset: 0 0 auto;
    position: absolute;
}

.metric-card:hover {
    border-color: rgba(23, 107, 135, 0.18);
    box-shadow: 0 18px 38px rgba(18, 42, 66, 0.09);
    transform: translateY(-2px);
}

.metric-card-topline {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.metric-card-label {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    min-width: 0;
}

.metric-card-icon {
    align-items: center;
    background: #e8f4f7;
    border-radius: 11px;
    color: #176b87 !important;
    display: inline-flex !important;
    flex: 0 0 auto;
    height: 2.2rem;
    justify-content: center;
    width: 2.2rem;
}

.metric-card-icon svg {
    height: 1.05rem;
    width: 1.05rem;
}

.metric-card span,
.dashboard-panel header span {
    color: var(--dashboard-soft);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-card-topline small {
    color: var(--dashboard-muted);
    font-size: 0.78rem;
}

.metric-card strong {
    color: var(--dashboard-text);
    font-size: clamp(1.7rem, 2vw, 2.05rem);
    font-weight: 760;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.metric-card p {
    color: var(--dashboard-muted);
    font-size: 0.86rem;
    margin: 0;
}

.metric-card-featured {
    background: linear-gradient(155deg, #ffffff 0%, #eef8fb 100%);
    border-color: rgba(31, 95, 149, 0.14);
}

.metric-card-attention {
    background: linear-gradient(180deg, #fffdf9 0%, #fff7ef 100%);
    border-color: rgba(180, 90, 21, 0.14);
}

.metric-card-attention::before {
    background: linear-gradient(90deg, #dc7b28, #f0b45e);
}

.metric-card-attention .metric-card-icon {
    background: #fff0df;
    color: #b45a15 !important;
}

.metric-card-sales::before {
    background: linear-gradient(90deg, #5869d8, #8d9bea);
}

.metric-card-sales .metric-card-icon {
    background: #eef0ff;
    color: #5366cd !important;
}

.metric-card-purchases::before {
    background: linear-gradient(90deg, #278660, #62ba91);
}

.metric-card-purchases .metric-card-icon {
    background: #e8f7ef;
    color: #257c59 !important;
}

.metric-inline-value {
    align-self: flex-start;
    background: var(--dashboard-accent-soft);
    border-radius: 999px;
    color: var(--dashboard-accent);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
}

.metric-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.metric-detail-chips span {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(180, 90, 21, 0.14);
    border-radius: 999px;
    color: var(--dashboard-attention-text);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0.38rem 0.65rem;
    text-transform: none;
}

.metric-footnote {
    color: var(--dashboard-muted);
    font-size: 0.8rem;
}

.metric-progress {
    background: rgba(31, 95, 149, 0.08);
    border-radius: 999px;
    height: 0.45rem;
    margin-top: 0.2rem;
    overflow: hidden;
}

.metric-progress-attention {
    background: rgba(180, 90, 21, 0.1);
}

.metric-progress-bar {
    background: linear-gradient(90deg, #2f7ab7 0%, #68b3e3 100%);
    border-radius: inherit;
    height: 100%;
}

.metric-progress-attention .metric-progress-bar {
    background: linear-gradient(90deg, #d9822b 0%, #f2b66f 100%);
}

.metric-progress-label {
    color: var(--dashboard-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.metric-sparkline {
    align-items: end;
    display: flex;
    gap: 0.28rem;
    height: 2.35rem;
    margin-top: auto;
    padding-top: 0.35rem;
}

.spark {
    background: linear-gradient(180deg, rgba(47, 122, 183, 0.38) 0%, rgba(47, 122, 183, 0.92) 100%);
    border-radius: 999px;
    display: block;
    flex: 1;
    min-width: 0.28rem;
}

.spark-low {
    height: 32%;
}

.spark-mid {
    height: 52%;
}

.spark-high {
    height: 68%;
}

.spark-tall {
    height: 78%;
}

.spark-peak {
    height: 92%;
}

.dashboard-story-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 249, 252, 0.98) 100%);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    display: grid;
    gap: 0.4rem;
    overflow: hidden;
    padding: 1.1rem 1.2rem 1.1rem 1.35rem;
    position: relative;
}

.story-card::before {
    background: #8da3ba;
    border-radius: 99px;
    content: "";
    inset: 1.2rem auto 1.2rem 0;
    position: absolute;
    width: 4px;
}

.story-card span {
    color: var(--dashboard-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.story-card strong {
    color: var(--dashboard-text);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.story-card p {
    color: var(--dashboard-muted);
    font-size: 0.86rem;
    margin: 0;
}

.story-card-positive {
    background: linear-gradient(180deg, #f5fbf7 0%, #edf8f1 100%);
    border-color: rgba(31, 107, 79, 0.1);
}

.story-card-positive strong {
    color: var(--dashboard-success-text);
}

.story-card-positive::before {
    background: #38a778;
}

.dashboard-main {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.dashboard-panel {
    background: var(--dashboard-surface-strong);
    border: 1px solid var(--dashboard-border);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(18, 42, 66, 0.055);
    min-width: 0;
    padding: 1.15rem;
}

.dashboard-panel header {
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.95rem;
}

.dashboard-panel h2 {
    color: var(--dashboard-text);
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 0.2rem 0 0;
}

.finance-balance {
    background: linear-gradient(145deg, #ffffff 0%, #f6fafc 100%);
    grid-column: 1 / -1;
}

.finance-balance-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-stat-card,
.base-grid a {
    background: #f8fbfe;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    display: grid;
    gap: 0.3rem;
    padding: 0.95rem;
}

.finance-stat-highlight {
    background: linear-gradient(180deg, #f1fbf5 0%, #ecf8f1 100%);
    border-color: rgba(31, 107, 79, 0.14);
}

.finance-balance-grid span,
.base-grid span {
    color: var(--dashboard-soft);
    font-size: 0.76rem;
    font-weight: 700;
}

.finance-balance-grid strong,
.base-grid strong {
    color: var(--dashboard-text);
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.finance-balance-grid small {
    color: var(--dashboard-muted);
}

.finance-stat-highlight strong,
.finance-stat-highlight small {
    color: var(--dashboard-success-text);
}

.dashboard-list {
    display: grid;
    gap: 0.55rem;
}

.dashboard-list-row {
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 16px;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.85rem 0.9rem;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dashboard-list-row:hover {
    background: #f7fbfd;
    border-color: rgba(23, 107, 135, 0.14);
    transform: translateX(2px);
}

.dashboard-list-row-attention {
    background: linear-gradient(180deg, #fffdf9 0%, #fff7ef 100%);
    border-color: rgba(180, 90, 21, 0.12);
}

.dashboard-list-row strong,
.dashboard-list-row span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-list-row span {
    color: var(--dashboard-muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

.list-row-copy strong {
    color: var(--dashboard-text);
    font-size: 1rem;
    font-weight: 700;
}

.list-row-number {
    text-align: right;
}

.list-row-number strong {
    color: var(--dashboard-text);
    font-size: 1.05rem;
}

.compact-empty {
    border: 0;
    min-height: 4rem;
}

.base-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.base-grid a {
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    color: inherit;
    min-height: 7.5rem;
    place-content: space-between;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.base-grid a:hover,
.dashboard-actions a:hover,
.dashboard-workspace .secondary-link:hover {
    border-color: rgba(31, 95, 149, 0.18);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.base-grid a strong {
    font-size: 1.7rem;
}

.dashboard-workspace .secondary-link {
    background: #f8fbfe;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    color: var(--dashboard-accent);
    font-weight: 700;
    padding: 0.7rem 1rem;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-actions-panel {
    background: var(--dashboard-surface-strong);
    border: 1px solid var(--dashboard-border);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    padding: 1.15rem;
}

.dashboard-actions-panel-standalone {
    min-height: 26rem;
}

.dashboard-actions-header {
    align-items: start;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.95rem;
}

.dashboard-actions-headline {
    display: grid;
    gap: 0.25rem;
}

.dashboard-actions-header h2 {
    color: var(--dashboard-text);
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    margin: 0.2rem 0 0;
}

.dashboard-actions-headline p {
    color: var(--dashboard-muted);
    font-size: 0.92rem;
    margin: 0.35rem 0 0;
    max-width: 38rem;
}

.dashboard-actions {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-actions-expanded {
    align-content: center;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 20rem;
}

.dashboard-action-card {
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 22px;
    color: inherit;
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 7.5rem;
    padding: 1.15rem 1.2rem;
    position: relative;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    overflow: hidden;
}

.dashboard-action-card::after {
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.75), transparent 46%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.dashboard-action-card:hover {
    border-color: rgba(31, 95, 149, 0.16);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.09);
    transform: translateY(-2px);
}

.dashboard-action-icon,
.dashboard-action-copy,
.dashboard-action-arrow {
    position: relative;
    z-index: 1;
}

.dashboard-action-icon {
    align-items: center;
    border-radius: 18px;
    color: #1f5f95;
    display: inline-flex;
    height: 3.3rem;
    justify-content: center;
    width: 3.3rem;
}

.dashboard-action-icon svg {
    height: 1.45rem;
    width: 1.45rem;
}

.dashboard-action-copy {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.dashboard-action-copy strong {
    color: var(--dashboard-text);
    font-size: 1.08rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.dashboard-action-copy small {
    color: var(--dashboard-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.dashboard-action-arrow {
    color: var(--dashboard-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.dashboard-action-arrow::after {
    content: " ->";
}

.action-products {
    background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
}

.action-products .dashboard-action-icon {
    background: linear-gradient(180deg, #e8f2ff 0%, #dcebff 100%);
    color: #2a69b2;
}

.action-factories {
    background: linear-gradient(180deg, #ffffff 0%, #f6f7fe 100%);
}

.action-factories .dashboard-action-icon {
    background: linear-gradient(180deg, #ecefff 0%, #e2e6ff 100%);
    color: #5468d4;
}

.action-customers {
    background: linear-gradient(180deg, #ffffff 0%, #f4faf8 100%);
}

.action-customers .dashboard-action-icon {
    background: linear-gradient(180deg, #e4f5ef 0%, #d6eee6 100%);
    color: #2f7f6a;
}

.action-budgets {
    background: linear-gradient(180deg, #ffffff 0%, #f6fbf4 100%);
}

.action-budgets .dashboard-action-icon {
    background: linear-gradient(180deg, #eaf8e5 0%, #def3d6 100%);
    color: #3a8a4d;
}

.action-orders {
    background: linear-gradient(180deg, #ffffff 0%, #fff8f0 100%);
}

.action-orders .dashboard-action-icon {
    background: linear-gradient(180deg, #fff0dc 0%, #ffe5c5 100%);
    color: #c06a1c;
}

.action-purchases {
    background: linear-gradient(180deg, #ffffff 0%, #fff7fa 100%);
}

.action-purchases .dashboard-action-icon {
    background: linear-gradient(180deg, #ffe9f0 0%, #ffdce7 100%);
    color: #c44f78;
}

.action-finance {
    background: linear-gradient(180deg, #ffffff 0%, #f3fbf7 100%);
}

.action-finance .dashboard-action-icon {
    background: linear-gradient(180deg, #e3f6eb 0%, #d6f0e0 100%);
    color: #2f8a60;
}

.action-admin {
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
}

.action-admin .dashboard-action-icon {
    background: linear-gradient(180deg, #eceff4 0%, #dfe6ef 100%);
    color: #506176;
}

.catalog-shell {
    display: block;
}

.table-region,
.detail-panel {
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    min-width: 0;
}

.table-region {
    overflow: auto;
}

.compact-table-region {
    margin-top: 0.35rem;
}

.data-grid {
    border-collapse: collapse;
    font-size: 0.86rem;
    min-width: 68rem;
    width: 100%;
}

.data-grid th {
    background: #f8fafc;
    border-bottom: 1px solid #d7dde5;
    color: #475467;
    font-size: 0.76rem;
    letter-spacing: 0;
    padding: 0.42rem 0.65rem;
    text-align: left;
    text-transform: uppercase;
}

.data-grid td {
    border-bottom: 1px solid #edf0f4;
    padding: 0.38rem 0.65rem;
    white-space: nowrap;
}

.data-grid td:nth-child(3),
.data-grid td:nth-child(8) {
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-grid {
    min-width: 72rem;
}

.supplier-picker-grid {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.supplier-picker-grid th:nth-child(1),
.supplier-picker-grid td:nth-child(1) {
    width: 8rem;
}

.supplier-picker-grid th:nth-child(2),
.supplier-picker-grid td:nth-child(2) {
    max-width: 20rem;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 20rem;
}

.supplier-picker-grid th:nth-child(3),
.supplier-picker-grid td:nth-child(3) {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.supplier-picker-grid th:nth-child(4),
.supplier-picker-grid td:nth-child(4) {
    text-align: center;
    white-space: nowrap;
    width: 11rem;
}

.supplier-picker-grid .row-actions {
    justify-content: center;
}

.supplier-picker-grid .row-actions .secondary-action {
    min-width: 8.5rem;
}

.kit-grid {
    min-width: 42rem;
}

.kit-grid th {
    padding: 0.3rem 0.55rem;
}

.kit-grid td {
    padding: 0.24rem 0.55rem;
}

.kit-grid .row-actions {
    gap: 0.25rem;
}

.kit-grid .row-actions .secondary-action {
    font-size: 0.72rem;
    min-height: 1.65rem;
    padding: 0.18rem 0.4rem;
}

.product-grid td:nth-child(2),
.product-grid td:nth-child(6) {
    max-width: 24rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-description-cell {
    display: grid;
    gap: 0.12rem;
}

.product-description-cell strong {
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-description-cell small {
    color: #667085;
    font-size: 0.74rem;
}

.commercial-grid {
    min-width: 78rem;
}

.commercial-grid td:nth-child(2),
.commercial-grid td:nth-child(9) {
    max-width: 24rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.branches-grid td:nth-child(1),
.branches-grid th:nth-child(1) {
    max-width: 4.8rem;
    width: 4.8rem;
}

.branches-grid {
    min-width: 0;
    table-layout: fixed;
}

.branches-grid td:nth-child(2),
.branches-grid th:nth-child(2) {
    max-width: 16.8rem;
    width: 16.8rem;
}

.branches-grid td:nth-child(4),
.branches-grid th:nth-child(4) {
    max-width: 7.2rem;
    width: 7.2rem;
}

.seller-region {
    max-width: 42rem;
}

.seller-grid {
    min-width: 36rem;
}

.sales-grid {
    min-width: 72rem;
}

.sales-grid th:nth-child(3),
.sales-grid td:nth-child(3) {
    width: 8rem;
}

.sales-grid td:nth-child(4) {
    max-width: 24rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sales-grid th:nth-child(9),
.sales-grid td:nth-child(9) {
    width: 10rem;
}

.sales-grid th:last-child,
.sales-grid td:last-child {
    width: 10rem;
}

.sales-grid .row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.purchase-row-canceled {
    background: #fff4f4;
}

.purchase-row-canceled td {
    color: #7a271a;
}

.purchase-status-badge {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 999px;
    color: #067647;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    justify-content: center;
    min-width: 5.8rem;
    padding: 0.18rem 0.55rem;
}

.purchase-status-badge.active {
    background: #eff8ff;
    border-color: #b2ddff;
    color: #175cd3;
}

.purchase-status-badge.canceled {
    background: #fff1f3;
    border-color: #fecdd3;
    color: #b42318;
}

.orders-grid th:nth-child(1),
.orders-grid td:nth-child(1) {
    width: 6.4rem;
}

.orders-grid th:nth-child(2),
.orders-grid td:nth-child(2) {
    width: 6.4rem;
}

.orders-grid th:nth-child(3),
.orders-grid td:nth-child(3) {
    width: 16rem;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orders-grid th:nth-child(4),
.orders-grid td:nth-child(4) {
    width: 5.6rem;
}

.orders-grid th:nth-child(5),
.orders-grid td:nth-child(5) {
    width: 6.4rem;
}

.orders-grid th:nth-child(6),
.orders-grid td:nth-child(6) {
    width: 3.2rem;
}

.orders-grid th:nth-child(7),
.orders-grid td:nth-child(7) {
    text-align: right;
    width: 5.6rem;
}

.orders-grid th:last-child,
.orders-grid td:last-child {
    width: 25rem;
}

.orders-grid .row-actions {
    flex-wrap: nowrap;
}

.sales-orders-grid th:nth-child(1),
.sales-orders-grid td:nth-child(1) {
    width: 4.8rem;
}

.sales-orders-grid th:nth-child(2),
.sales-orders-grid td:nth-child(2) {
    width: 6rem;
}

.sales-orders-grid th:nth-child(4),
.sales-orders-grid td:nth-child(4) {
    width: 4.8rem;
}

.sales-orders-grid th:nth-child(5),
.sales-orders-grid td:nth-child(5) {
    width: 2.4rem;
}

.sales-orders-grid th:nth-child(6),
.sales-orders-grid td:nth-child(6) {
    width: 4.2rem;
}

.sales-orders-grid th:last-child,
.sales-orders-grid td:last-child {
    width: 25rem;
}

.sales-orders-grid .row-actions {
    flex-wrap: nowrap;
}

.orders-compact-grid {
    align-items: end;
}

.orders-picker-grid {
    align-items: end;
    grid-template-columns: minmax(0, 1fr) auto;
}

.orders-select-customer-button {
    min-width: 10.5rem;
}

.orders-field-sm {
    max-width: 8.5rem;
}

.orders-field-md {
    max-width: 14rem;
}

.orders-field-three {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 8.5rem));
}

.sales-order-modal {
    max-width: 44rem;
    width: min(44rem, 100%);
}

.sales-audit-list {
    margin-top: 0.25rem;
}

.sales-audit-entry {
    gap: 0.45rem;
}

.audit-items {
    margin-top: 0.35rem;
}

.sales-approval-box {
    max-width: 44rem;
    width: min(44rem, 100%);
}

.whatsapp-order-modal {
    max-width: 40rem;
    width: min(40rem, 100%);
}

.order-items {
    display: grid;
    gap: 0.45rem;
}

.order-item-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #edf0f4;
    border-radius: 4px;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.5rem 0.55rem;
}

.order-item-row strong,
.order-item-row span {
    display: block;
}

.order-item-row strong {
    font-size: 0.8rem;
}

.order-item-row span {
    color: #667085;
    font-size: 0.78rem;
}

.purchase-item-list {
    border: 1px solid #edf0f4;
    border-radius: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.purchase-item-list li {
    align-items: center;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.55rem 0.65rem;
}

.purchase-item-list li + li {
    border-top: 1px solid #edf0f4;
}

.purchase-item-main {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.purchase-item-main strong {
    font-size: 0.82rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
}

.purchase-item-main span,
.purchase-item-values span {
    color: #667085;
    font-size: 0.76rem;
}

.purchase-item-values {
    align-items: end;
    display: grid;
    gap: 0.1rem;
    justify-items: end;
    min-width: 8.5rem;
}

.purchase-item-values b {
    color: #101828;
    font-size: 0.82rem;
}

.purchase-editor-modal {
    max-width: 76rem;
    width: min(76rem, 100%);
}

.purchase-editor-form {
    display: grid;
    gap: 0.85rem;
}

.purchase-editor-form label {
    color: #475467;
    display: grid;
    font-size: 0.78rem;
    gap: 0.25rem;
}

.purchase-supplier-field {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.purchase-supplier-meta {
    display: grid;
    gap: 0.45rem;
    justify-items: start;
}

.purchase-field-document {
    width: 47.6%;
}

.purchase-field-fantasy {
    width: 57.4%;
}

.purchase-field-number {
    width: 42%;
}

.purchase-field-series {
    width: 30%;
}

.purchase-field-pair-start {
    justify-self: start;
    margin-right: -3.5rem;
}

.purchase-field-pair-end {
    justify-self: start;
}

.purchase-field-issue-date {
    width: 40%;
}

.purchase-field-entry-date {
    width: 40%;
}

.purchase-field-operation {
    grid-column: 1 / -1;
    width: 100%;
}

.purchase-field-condition {
    width: 82.5%;
}

.purchase-field-condition-row {
    grid-column: 1;
    justify-self: start;
}

.purchase-editor-form input,
.purchase-editor-form select {
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    color: #18202b;
    min-height: 2.2rem;
    min-width: 0;
    padding: 0.38rem 0.48rem;
    width: 100%;
}

.xml-import-box {
    background: #f8fafc;
    border: 1px solid #d7dde5;
    border-radius: 4px;
    display: grid;
    gap: 0.25rem;
    padding: 0.65rem;
}

.xml-import-box small {
    color: #667085;
    font-size: 0.76rem;
}

.purchase-editor-summary {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    padding: 0.55rem 0.7rem;
}

.purchase-editor-summary span {
    color: #667085;
    font-size: 0.8rem;
}

.purchase-editor-summary strong {
    color: #101828;
}

.purchase-editor-summary-cards {
    align-items: stretch;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.purchase-summary-card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 0.6rem;
    display: grid;
    gap: 0.18rem;
    padding: 0.75rem 0.85rem;
}

.purchase-summary-card span {
    color: #667085;
    font-size: 0.74rem;
    text-transform: uppercase;
}

.purchase-summary-card strong {
    color: #101828;
    font-size: 0.95rem;
}

.purchase-summary-card.emphasis-card {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-color: #bfd4ff;
}

.purchase-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.purchase-tab {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    color: #344054;
    font-weight: 700;
    min-height: 2.35rem;
    padding: 0.45rem 0.95rem;
}

.purchase-tab.active {
    background: #123f73;
    border-color: #123f73;
    color: #fff;
}

.purchase-tab-panel {
    display: grid;
    gap: 0.9rem;
}

.purchase-tab-panel h3 {
    margin: 0;
}

.purchase-tab-copy {
    color: #667085;
    margin: -0.45rem 0 0;
}

.purchase-tab-head {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.purchase-tab-head p {
    color: #667085;
    margin: 0.2rem 0 0;
}

.purchase-fiscal-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.purchase-xml-file {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 0.55rem;
    display: grid;
    gap: 0.15rem;
    padding: 0.7rem 0.8rem;
}

.purchase-xml-file span {
    color: #667085;
    font-size: 0.74rem;
    text-transform: uppercase;
}

.purchase-edit-items {
    display: grid;
    gap: 0.6rem;
}

.purchase-edit-item {
    border: 1px solid #edf0f4;
    border-radius: 4px;
    display: grid;
    gap: 0.55rem;
    padding: 0.65rem;
}

.purchase-edit-item-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.purchase-edit-item-head strong {
    font-size: 0.86rem;
}

.purchase-item-edit-grid {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.purchase-item-edit-grid .wide-field {
    grid-column: span 2;
}

.purchase-item-edit-grid .linked-code-field {
    background: #fff8eb;
    border: 1px solid #fedf89;
    border-radius: 4px;
    padding: 0.45rem;
}

.purchase-item-edit-grid .linked-code-field small {
    color: #93370d;
    font-size: 0.72rem;
}

.purchase-product-link-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.purchase-product-link-actions small {
    color: #667085;
    font-size: 0.74rem;
}

.purchase-product-create-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchase-product-create-grid .wide-field {
    grid-column: span 2;
}

.orders-new-items-region {
    margin-top: 0.35rem;
}

.orders-new-items-grid {
    min-width: 62rem;
    table-layout: fixed;
}

.orders-new-items-grid .orders-col-item {
    width: 2.66rem;
}

.orders-new-items-grid .orders-col-manufacturer {
    width: 9.35rem;
}

.orders-new-items-grid .orders-col-description {
    width: 35rem;
    max-width: 35rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orders-new-items-grid .orders-col-quantity {
    width: 6.4rem;
}

.orders-new-items-grid .orders-col-price {
    width: 8.5rem;
}

.orders-new-items-grid input {
    min-width: 0;
    width: 100%;
}

.orders-item-price-cell {
    display: grid;
    gap: 0.2rem;
}

.orders-item-price-cell small {
    color: #667085;
    font-size: 0.72rem;
    line-height: 1.2;
}

.orders-product-picker-modal {
    max-width: 68rem;
    width: min(68rem, 100%);
}

.orders-product-picker-grid {
    min-width: 58rem;
}

.orders-product-picker-grid td:nth-child(2),
.orders-product-picker-grid td:nth-child(3) {
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-print-sheet {
    display: none;
}

.order-print-page {
    break-after: page;
    page-break-after: always;
}

.order-print-page:last-child {
    break-after: auto;
    page-break-after: auto;
}

.order-print-host {
    display: none;
}

.order-print-header {
    align-items: stretch;
    border: 1px solid #d0d5dd;
    display: grid;
    gap: 0;
    grid-template-columns: 1.45fr 1.15fr 0.95fr;
}

.order-print-brand {
    align-items: center;
    display: flex;
    justify-content: center;
}

.order-print-logo {
    max-height: 3.25rem;
    max-width: 5.8rem;
    object-fit: contain;
}

.order-print-company-box {
    align-items: center;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: 6.4rem minmax(0, 1fr);
    padding: 0.3rem 0.4rem;
}

.order-print-heading {
    align-items: center;
    border-left: 1px solid #d0d5dd;
    display: grid;
    justify-items: center;
    padding: 0.2rem 0.4rem;
}

.order-print-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
}

.order-print-number {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 0;
    text-align: center;
}

.order-print-page-number {
    font-size: 0.72rem;
    margin-top: 0.25rem;
    text-align: center;
}

.order-print-company,
.order-print-company-meta,
.order-print-grid,
.order-print-inline {
    display: grid;
    gap: 0.2rem 0.55rem;
}

.order-print-company {
    line-height: 1.15;
}

.order-print-company strong {
    font-size: 0.88rem;
}

.order-print-company span,
.order-print-company-meta strong,
.order-print-grid strong,
.order-print-inline strong,
.order-print-footer {
    font-size: 0.72rem;
}

.order-print-company-meta {
    border-left: 1px solid #d0d5dd;
    grid-template-columns: 1fr;
    margin-top: 0;
    padding: 0;
}

.order-print-company-meta > div {
    padding: 0.24rem 0.42rem;
}

.order-print-company-meta > div + div {
    border-top: 1px solid #d0d5dd;
}

.order-print-block {
    border: 1px solid #d0d5dd;
    margin-top: 0.38rem;
}

.order-print-block-title {
    border-bottom: 1px solid #d0d5dd;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.1;
    padding: 0.22rem 0.32rem;
}

.order-print-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.28rem 0.32rem;
}

.order-print-grid .wide {
    grid-column: span 2;
}

.order-print-inline {
    border: 1px solid #d0d5dd;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    margin-top: 0.38rem;
    padding: 0.28rem 0.32rem;
}

.order-print-logistics {
    grid-template-columns: 1.2fr 1.25fr 0.55fr 0.75fr;
}

.order-print-sheet .label {
    color: #475467;
    display: block;
    font-size: 0.6rem;
    line-height: 1.05;
    margin-bottom: 0.04rem;
}

.order-print-items {
    border-collapse: collapse;
    margin-top: 0.38rem;
    width: 100%;
}

.order-print-items th,
.order-print-items td {
    border: 1px solid #d0d5dd;
    font-size: 0.7rem;
    line-height: 1.1;
    padding: 0.18rem 0.24rem;
    text-align: left;
    vertical-align: top;
}

.order-print-items th {
    font-weight: 700;
}

.order-print-items th:nth-child(1),
.order-print-items td:nth-child(1) {
    width: 5%;
}

.order-print-items th:nth-child(2),
.order-print-items td:nth-child(2) {
    width: 12%;
}

.order-print-items th:nth-child(3),
.order-print-items td:nth-child(3) {
    width: 7%;
}

.order-print-items th:nth-child(4),
.order-print-items td:nth-child(4) {
    width: 5%;
}

.order-print-items th:nth-child(5),
.order-print-items td:nth-child(5) {
    width: 44%;
}

.order-print-items th:nth-child(6),
.order-print-items td:nth-child(6) {
    width: 10%;
}

.order-print-items th:nth-child(7),
.order-print-items td:nth-child(7),
.order-print-items th:nth-child(8),
.order-print-items td:nth-child(8) {
    width: 8.5%;
}

.order-print-items th:nth-child(1),
.order-print-items td:nth-child(1),
.order-print-items th:nth-child(2),
.order-print-items td:nth-child(2),
.order-print-items th:nth-child(3),
.order-print-items td:nth-child(3),
.order-print-items th:nth-child(4),
.order-print-items td:nth-child(4),
.order-print-items th:nth-child(6),
.order-print-items td:nth-child(6),
.order-print-items th:nth-child(7),
.order-print-items td:nth-child(7),
.order-print-items th:nth-child(8),
.order-print-items td:nth-child(8) {
    white-space: nowrap;
}

.order-print-items th:nth-child(5),
.order-print-items td:nth-child(5) {
    white-space: normal;
}

.order-print-application-row td {
    overflow-wrap: anywhere;
    white-space: normal !important;
}

.order-print-footer {
    border-top: 1px solid #d0d5dd;
    display: flex;
    justify-content: space-between;
    margin-top: 0.34rem;
    padding-top: 0.18rem;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 5mm;
    }

    html,
    body {
        background: #ffffff;
        height: auto !important;
        margin: 0;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 0;
    }

    * {
        box-shadow: none !important;
    }

    body * {
        visibility: hidden !important;
    }

    .modal-backdrop,
    .message-box-backdrop {
        display: none !important;
    }

    .order-print-host.printing,
    .order-print-host.printing *,
    .sales-order-print-host.printing,
    .sales-order-print-host.printing * {
        visibility: visible !important;
    }

    .order-print-host.printing,
    .sales-order-print-host.printing {
        display: block !important;
        height: auto !important;
        margin: 0;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        position: absolute;
        left: 0;
        top: 0;
        transform: none !important;
        width: 100%;
        z-index: 9999;
    }

    .order-print-sheet,
    .order-print-sheet *,
    .sales-order-print-sheet,
    .sales-order-print-sheet * {
        color: #000000 !important;
    }

    .order-print-header {
        gap: 0;
        grid-template-columns: 1.45fr 1.15fr 0.95fr;
        margin-top: 0;
    }

    .order-print-heading {
        justify-content: normal;
    }

    .order-print-sheet,
    .sales-order-print-sheet {
        break-inside: auto;
        display: block !important;
        margin: 0 !important;
        max-width: 200mm;
        min-height: 0 !important;
        overflow: visible !important;
        page-break-inside: auto;
        padding: 0 !important;
        width: 200mm;
    }

    .order-print-logo {
        max-height: 15mm;
        max-width: 24mm;
    }

    .order-print-title,
    .order-print-number,
    .order-print-company strong,
    .order-print-company span,
    .order-print-company-meta strong,
    .order-print-grid strong,
    .order-print-inline strong,
    .order-print-items th,
    .order-print-items td,
    .order-print-footer {
        font-family: Arial, Helvetica, sans-serif;
    }

    .order-print-title {
        font-size: 13pt;
    }

    .order-print-number {
        font-size: 13pt;
    }

    .order-print-page-number {
        font-size: 9pt;
    }

    .order-print-company strong {
        font-size: 9pt;
    }

    .order-print-company span,
    .order-print-company-meta strong,
    .order-print-grid strong,
    .order-print-inline strong,
    .order-print-footer {
        font-size: 7.6pt;
    }

    .order-print-sheet .label {
        font-size: 6.4pt;
    }

    .order-print-company-meta,
    .order-print-block,
    .order-print-inline,
    .order-print-items th,
    .order-print-items td {
        border-color: #000000;
    }

    .order-print-company-meta,
    .order-print-block,
    .order-print-inline {
        margin-top: 0.18rem;
    }

    .order-print-block-title,
    .order-print-grid,
    .order-print-inline,
    .order-print-company-meta,
    .order-print-items th,
    .order-print-items td {
        padding: 0.12rem 0.18rem;
    }

    .order-print-items {
        break-inside: auto;
        margin-top: 0.18rem;
        page-break-inside: auto;
    }

    .order-print-items thead {
        display: table-header-group;
    }

    .order-print-items tbody {
        break-inside: auto;
        page-break-inside: auto;
    }

    .order-print-items th,
    .order-print-items td {
        font-size: 7.4pt;
    }

    .order-print-items tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .order-print-footer {
        margin-top: 0.18rem;
        padding-top: 0.12rem;
    }
}

.finance-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.finance-grid {
    min-width: 76rem;
}

.finance-grid td:nth-child(3),
.finance-grid td:nth-child(10) {
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.treasury-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.treasury-grid {
    min-width: 66rem;
}

.cash-movement-details-row > td {
    background: #f7f9fc;
    padding: 0.75rem;
}

.cash-movement-grid {
    min-width: 72rem;
    font-size: 0.88rem;
}

.cash-movement-grid th,
.cash-movement-grid td {
    white-space: nowrap;
}

.cash-movement-grid td:nth-child(5) {
    max-width: 28rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.checks-grid {
    min-width: 78rem;
}

.checks-grid td:nth-child(3),
.checks-grid td:nth-child(10),
.bank-grid td:nth-child(2),
.bank-grid td:nth-child(4) {
    max-width: 20rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bank-region {
    max-width: 62rem;
}

.bank-grid {
    min-width: 58rem;
}

.admin-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.admin-grid,
.company-grid,
.parameters-grid {
    min-width: 72rem;
}

.admin-grid {
    min-width: 92rem;
}

.admin-ncm-panel {
    background: linear-gradient(135deg, #f8fafc, #eef6ff);
    border: 1px solid #d7e3f4;
    border-radius: 10px;
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.admin-ncm-panel h2 {
    margin: 0;
}

.admin-ncm-panel p {
    color: #526071;
    margin: 0.2rem 0 0;
}

.company-logo-cell {
    height: 2.75rem;
    max-width: 4rem;
    width: 4rem;
}

.data-grid .company-logo-thumb {
    border: 1px solid #d7dde5;
    border-radius: 4px;
    display: block;
    height: 2rem;
    max-height: 2rem;
    max-width: 3rem;
    object-fit: contain;
    padding: 0.15rem;
    width: 3rem;
}

.admin-grid td:nth-child(2),
.admin-grid td:nth-child(5),
.company-grid td:nth-child(2),
.company-grid td:nth-child(3),
.parameters-grid td:nth-child(2) {
    max-width: 24rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.master-shell {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 28rem);
}

.master-grid {
    min-width: 64rem;
}

.master-grid td:nth-child(2),
.master-grid td:nth-child(3),
.master-grid td:nth-child(4) {
    max-width: 24rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.master-editor {
    position: sticky;
    top: 1rem;
}

.master-modal {
    max-width: 48rem;
    width: min(48rem, 100%);
}

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

.delete-confirmation {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
}

.delete-confirmation strong {
    color: #9a3412;
}

.delete-confirmation p {
    color: #475467;
    margin: 0;
}

.editor-header {
    align-items: start;
    border-bottom: 1px solid #edf0f4;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
}

.editor-header h2 {
    font-size: 1rem;
    line-height: 1.2;
    margin: 0;
}

.editor-header p {
    color: #667085;
    font-size: 0.78rem;
    margin: 0.2rem 0 0;
}

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

.form-grid-type {
    grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr);
}

.supplier-type-field {
    width: 56%;
}

.supplier-cep-grid {
    column-gap: 1rem;
}

.form-button-slot {
    align-items: end;
    display: flex;
}

.form-actions {
    border-top: 1px solid #edf0f4;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 0.85rem;
}

.checkbox-field {
    align-items: center;
    display: flex !important;
    flex-direction: row;
    gap: 0.45rem !important;
}

.checkbox-field input {
    min-height: auto;
    width: auto;
}

.row-actions {
    display: flex;
    gap: 0.35rem;
}

.row-actions .secondary-action {
    font-size: 0.76rem;
    min-height: 1.9rem;
    padding: 0.25rem 0.45rem;
    white-space: nowrap;
}

.nfe-number-cell {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.nfe-number-detail {
    display: grid;
    gap: 0.4rem;
    justify-items: start;
}

.nfe-status {
    font-weight: 800;
}

.nfe-status-cancelled {
    color: #b42318;
}

.nfe-status-billed {
    color: #027a48;
}

.danger-primary-action {
    background: #b42318;
    border-color: #b42318;
}

.field-label {
    color: #475467;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.35rem;
}

.cancel-reason-input {
    border: 1px solid #c6ccd5;
    border-radius: 6px;
    font: inherit;
    min-height: 6.5rem;
    padding: 0.75rem 0.85rem;
    resize: vertical;
    width: 100%;
}

.fiscal-grid {
    min-width: 76rem;
}

.fiscal-grid td:nth-child(2),
.fiscal-grid td:nth-child(5) {
    max-width: 24rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fiscal-modal {
    max-width: 58rem;
    width: min(58rem, 100%);
}

.fiscal-check-grid {
    display: grid;
    gap: 0.45rem 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fiscal-detail-list {
    grid-template-columns: 9rem minmax(0, 1fr);
}

.narrow-workspace {
    max-width: 42rem;
}

.settings-panel {
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    padding: 1rem;
}

.settings-form {
    display: grid;
    gap: 0.8rem;
}

.settings-form label {
    color: #475467;
    display: grid;
    font-size: 0.82rem;
    gap: 0.3rem;
}

.settings-form label.compact-field {
    max-width: 12rem;
}

.settings-form input {
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    min-height: 2.35rem;
    padding: 0.5rem 0.6rem;
}

.settings-form select,
.settings-form textarea {
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    min-height: 2.35rem;
    padding: 0.5rem 0.6rem;
}

.settings-form textarea {
    min-height: 5rem;
    resize: vertical;
}

.login-shell {
    align-items: center;
    background: linear-gradient(135deg, #c2e5ef 0%, #eef8fb 48%, #b9dbe7 100%);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(1rem, 5vw, 2.5rem);
}

.login-layout {
    min-height: 100vh;
}

.login-panel {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 12px;
    box-shadow: 0 22px 55px rgba(31, 93, 116, 0.22);
    display: grid;
    min-height: min(92vh, 46.8rem);
    max-width: 41.8rem;
    padding: clamp(3rem, 9vh, 8.9rem) clamp(1.4rem, 5vw, 3.75rem) clamp(2rem, 6vh, 4rem);
    position: relative;
    width: 100%;
}

.login-brand {
    align-self: center;
    color: #0b63bf;
    display: grid;
    justify-items: center;
    margin-bottom: clamp(3rem, 8vh, 5.5rem);
    text-align: center;
}

.brand-mark {
    height: 8.75rem;
    position: relative;
    width: 11.5rem;
}

.brand-globe {
    background:
        linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.52) 48% 52%, transparent 53%),
        linear-gradient(0deg, transparent 47%, rgba(255, 255, 255, 0.46) 48% 52%, transparent 53%),
        radial-gradient(circle at 65% 28%, #8ce9ff 0 8%, transparent 9%),
        radial-gradient(circle at 57% 37%, #48c0ed 0 8%, transparent 9%),
        radial-gradient(circle at 34% 61%, #0f8fe5 0 9%, transparent 10%),
        radial-gradient(circle at 50% 50%, #5edcff 0, #1589d7 55%, #075ec1 100%);
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.44), 0 10px 18px rgba(10, 97, 186, 0.22);
    display: block;
    height: 6.8rem;
    left: 2.35rem;
    position: absolute;
    top: 1rem;
    width: 6.8rem;
}

.brand-globe::before,
.brand-globe::after {
    border: 0.55rem solid #0784db;
    border-left-color: transparent;
    border-radius: 50%;
    content: "";
    height: 8rem;
    left: -1.45rem;
    position: absolute;
    top: -0.95rem;
    transform: rotate(-22deg);
    width: 10.4rem;
}

.brand-globe::after {
    border-color: transparent #10c7da #0a67c8 transparent;
    left: -1.7rem;
    top: -0.2rem;
    transform: rotate(18deg);
}

.brand-cart,
.brand-doc {
    background: #0a66c8;
    border-radius: 5px;
    box-shadow: 0 3px 0 rgba(5, 78, 168, 0.22);
    color: #ffffff;
    display: block;
    height: 2.8rem;
    position: absolute;
    width: 2.6rem;
}

.brand-cart {
    left: 1rem;
    top: 4.65rem;
    transform: rotate(-7deg);
}

.brand-cart::before {
    content: "++";
    font-size: 1.35rem;
    font-weight: 800;
    left: 0.45rem;
    letter-spacing: 0;
    position: absolute;
    top: 0.42rem;
}

.brand-doc {
    right: 1rem;
    top: 2.4rem;
    transform: rotate(-6deg);
}

.brand-doc::before {
    content: "+";
    font-size: 2rem;
    font-weight: 800;
    left: 0.82rem;
    position: absolute;
    top: 0.36rem;
}

.login-brand strong {
    font-size: clamp(2.35rem, 7vw, 3.25rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 0.9;
}

.login-brand > span {
    color: #0c8d86;
    font-size: clamp(1rem, 2.7vw, 1.22rem);
    font-weight: 800;
    letter-spacing: 0.02rem;
    margin-top: 0.25rem;
}

.login-form {
    display: grid;
    gap: 1.25rem;
}

.login-form label {
    display: block;
}

.login-form input {
    background: #e8f0fd;
    border: 1px solid #c7d2e5;
    border-radius: 999px;
    color: #111827;
    min-height: 2.95rem;
    padding: 0.7rem 1rem;
    width: 100%;
}

.login-form input::placeholder {
    color: #111827;
    opacity: 1;
}

.login-form input:focus {
    border-color: #2b8ce3;
    outline: 3px solid rgba(53, 150, 225, 0.2);
}

.login-form .primary-action {
    align-items: center;
    background: linear-gradient(90deg, #3d86df 0%, #09c6d9 100%);
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    font-size: 1rem;
    gap: 0.65rem;
    justify-content: center;
    min-height: 2.85rem;
    width: 100%;
}

.login-icon {
    border: 3px solid #ffffff;
    border-left: 0;
    display: inline-block;
    height: 1.1rem;
    position: relative;
    width: 0.85rem;
}

.login-icon::before {
    background: #ffffff;
    content: "";
    height: 0.25rem;
    left: -0.75rem;
    position: absolute;
    top: 0.33rem;
    width: 0.95rem;
}

.login-icon::after {
    border-left: 0.3rem solid #ffffff;
    border-top: 0.3rem solid transparent;
    border-bottom: 0.3rem solid transparent;
    content: "";
    left: 0.05rem;
    position: absolute;
    top: 0.15rem;
}

.login-links {
    border-top: 1px solid #dce3ed;
    display: flex;
    gap: 0.45rem;
    justify-content: center;
    margin-top: 1.25rem;
    padding-top: 1.6rem;
}

.login-links a {
    color: #2878ff;
    font-size: 0.95rem;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    border: 0;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.alert-message {
    background: #fff1f3;
    border: 1px solid #ffccd5;
    border-radius: 4px;
    color: #b42318;
    font-size: 0.86rem;
    margin-top: 0.8rem;
    padding: 0.6rem;
}

.nfe-issue-box {
    background: #fff1f3;
    border: 1px solid #ffccd5;
    border-radius: 8px;
    color: #b42318;
    display: grid;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
    padding: 0.75rem 0.85rem;
}

.nfe-issue-box strong {
    font-size: 0.9rem;
}

.nfe-issue-box ul {
    margin: 0;
    padding-left: 1.1rem;
}

.nfe-issue-box li {
    line-height: 1.45;
    margin: 0.1rem 0;
}

.success-message {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 4px;
    color: #067647;
    font-size: 0.86rem;
    margin-bottom: 0.8rem;
    padding: 0.6rem;
}

.data-grid tbody tr {
    cursor: pointer;
}

.data-grid tbody tr:hover {
    background: #f6fbff;
}

.data-grid tbody tr.selected {
    background: #eaf4ff;
}

.detail-panel {
    padding: 1rem;
}

.detail-panel h2 {
    font-size: 1.16rem;
    line-height: 1.3;
    margin: 0.15rem 0 0;
}

.detail-panel h3 {
    border-top: 1px solid #edf0f4;
    font-size: 0.82rem;
    font-weight: 800;
    margin: 1.1rem 0 0.55rem;
    min-height: 1.2rem;
    padding-top: 0.85rem;
    text-transform: uppercase;
}

.section-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.section-header h3 {
    margin-bottom: 0;
}

.detail-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 0.7rem;
}

.modal-backdrop {
    align-items: center;
    background: rgba(16, 24, 40, 0.46);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1.25rem;
    position: fixed;
    z-index: 20;
}

.message-box-backdrop {
    align-items: center;
    background: rgba(16, 24, 40, 0.5);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 40;
}

.purchase-overlay-top {
    z-index: 30;
}

.message-box {
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.28);
    display: grid;
    gap: 0.8rem;
    max-width: 26rem;
    padding: 1rem;
    width: min(26rem, 100%);
}

.message-box h2 {
    font-size: 1rem;
    margin: 0;
}

.message-box p {
    color: #344054;
    line-height: 1.45;
    margin: 0;
}

.message-box button {
    justify-self: end;
}

.secondary-link-button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.report-actions-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.report-card {
    align-items: center;
    background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
    border: 1px solid #d8e4f2;
    border-radius: 10px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.report-card-copy {
    display: grid;
    gap: 0.25rem;
}

.report-card-copy span {
    color: #165a96;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.report-card-copy h2 {
    margin: 0;
}

.report-card-copy p,
.report-summary {
    color: #475467;
}

.report-picker-modal {
    max-width: 34rem;
    width: min(34rem, 100%);
}

.report-factory-results {
    display: grid;
    gap: 0.5rem;
    max-height: 20rem;
    overflow: auto;
}

.report-factory-option {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    color: #18202b;
    display: grid;
    gap: 0.12rem;
    padding: 0.7rem 0.8rem;
    text-align: left;
}

.report-factory-option strong {
    font-size: 0.9rem;
}

.report-factory-option span {
    color: #667085;
    font-size: 0.84rem;
}

.report-factory-option:hover {
    background: #f8fbff;
    border-color: #bfd5ee;
}

.report-factory-option.active {
    background: #eaf3fe;
    border-color: #7fb0de;
}

.price-list-print-host {
    left: -99999px;
    position: absolute;
    top: 0;
    width: 200mm;
}

.price-list-sheet {
    background: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 auto;
    min-height: 292mm;
    padding: 2.5mm 4mm 0.2mm;
    width: 201mm;
}

.price-list-page {
    break-after: page;
    page-break-after: always;
}

.price-list-page:last-child {
    break-after: auto;
    page-break-after: auto;
}

.price-list-header {
    border: 1px solid #4a4a4a;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54mm;
    min-height: 22mm;
}

.price-list-company {
    display: grid;
    gap: 1.4mm;
    grid-template-columns: 19mm minmax(0, 1fr);
    padding: 1.8mm 2.6mm;
}

.price-list-company-logo {
    align-items: center;
    display: flex;
    justify-content: center;
}

.price-list-company-logo img {
    max-height: 11.5mm;
    max-width: 16mm;
    object-fit: contain;
}

.price-list-company-logo span {
    color: #165a96;
    font-size: 9pt;
    font-weight: 800;
}

.price-list-company-copy {
    align-items: center;
    display: grid;
    gap: 0.15mm;
    justify-items: center;
    text-align: center;
}

.price-list-company-copy strong {
    font-size: 8pt;
}

.price-list-company-copy span {
    font-size: 6.15pt;
}

.price-list-title-box {
    border-left: 1px solid #4a4a4a;
    display: grid;
    justify-items: center;
    padding: 1.8mm 2.4mm 1.4mm;
    text-align: center;
}

.price-list-title-box h2 {
    font-size: 8.5pt;
    font-weight: 800;
    margin: 0 0 1.8mm;
}

.price-list-title-box span {
    font-size: 6.1pt;
    line-height: 1.05;
}

.price-list-meta {
    font-size: 6.4pt;
    margin: 0.45mm 0 0.15mm;
}

.price-list-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.price-list-table thead th {
    border-bottom: 1px solid #808080;
    font-size: 7pt;
    font-weight: 800;
    padding: 0 0.25mm 0.35mm;
    text-align: left;
}

.price-list-table th:nth-child(1),
.price-list-table td:nth-child(1) {
    width: 28mm;
}

.price-list-table th:nth-child(2),
.price-list-table td:nth-child(2) {
    width: auto;
}

.price-list-table th:nth-child(3),
.price-list-table td:nth-child(3) {
    text-align: center;
    width: 18mm;
}

.price-list-table th:nth-child(4),
.price-list-table td:nth-child(4) {
    text-align: right;
    width: 19mm;
}

.price-list-table tbody td {
    font-size: 6.55pt;
    line-height: 1;
    padding: 0.04mm 0.22mm;
    vertical-align: top;
}

.price-list-table tbody tr {
    height: 3.28mm;
}

.price-list-table tbody td:nth-child(2) {
    padding-right: 0.8mm;
}

.price-list-money {
    white-space: nowrap;
}

.product-modal {
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.26);
    max-height: calc(100vh - 2.5rem);
    max-width: 65.824rem;
    overflow: auto;
    width: min(65.824rem, 100%);
}

.product-modal.admin-user-modal {
    max-width: 46rem;
    width: min(46rem, 100%);
}

.admin-user-form {
    gap: 0.75rem;
}

.admin-user-notice {
    background: #eff8ff;
    border: 1px solid #b2ddff;
    border-radius: 8px;
    color: #175cd3;
    display: grid;
    font-size: 0.8rem;
    gap: 0.2rem;
    padding: 0.75rem 0.85rem;
}

.admin-user-notice strong {
    color: #1849a9;
    font-size: 0.84rem;
}

.admin-user-section {
    background: #fbfcfe;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
}

.admin-user-section-heading {
    display: grid;
    gap: 0.15rem;
}

.admin-user-section-heading strong {
    color: #344054;
    font-size: 0.86rem;
}

.admin-user-section-heading span {
    color: #667085;
    font-size: 0.75rem;
}

.admin-user-form label small {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 400;
}

.admin-user-source-field {
    max-width: 100%;
}

.admin-user-readonly-value {
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    display: grid;
    gap: 0.1rem;
    min-height: 2.35rem;
    padding: 0.45rem 0.6rem;
}

.admin-user-readonly-value strong {
    color: #344054;
    font-size: 0.84rem;
}

.admin-user-readonly-value small {
    color: #667085;
    font-size: 0.7rem;
}

.admin-user-toggle-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-form label.admin-user-toggle {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    gap: 0.65rem;
    min-height: 4.25rem;
    padding: 0.75rem;
}

.settings-form label.admin-user-toggle:has(input:checked) {
    background: #f0f7ff;
    border-color: #84adf0;
}

.settings-form label.admin-user-toggle input {
    accent-color: #1964a3;
    flex: 0 0 auto;
    height: 1rem;
    margin: 0.15rem 0 0;
    min-height: auto;
    padding: 0;
    width: 1rem;
}

.admin-user-toggle-copy {
    display: grid;
    gap: 0.2rem;
}

.admin-user-toggle-copy strong {
    color: #344054;
    font-size: 0.82rem;
}

.admin-user-toggle-copy small {
    color: #667085;
    font-size: 0.74rem;
    line-height: 1.35;
}

.product-modal.sales-order-editor-modal {
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
}

.sales-order-editor-modal .orders-new-items-region {
    min-height: 12rem;
    overflow: auto;
}

.sales-order-editor-modal .form-actions {
    background: #fff;
    bottom: 0;
    margin-top: 0.85rem;
    position: sticky;
    z-index: 1;
}

.product-modal-tabs {
    margin-top: -0.2rem;
}

.kit-modal {
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.26);
    max-width: 42rem;
    width: min(42rem, 100%);
}

.commercial-location-modal {
    max-width: 65.52rem;
    width: min(65.52rem, 100%);
}

.modal-header {
    align-items: flex-start;
    border-bottom: 1px solid #edf0f4;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: -0.2rem 0 0.85rem;
    padding-bottom: 0.75rem;
}

.modal-header span {
    color: #667085;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.nfe-modal-banner {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.85rem;
}

.nfe-modal-banner p {
    color: #475467;
    flex: 1;
    font-size: 0.84rem;
    line-height: 1.45;
    margin: 0;
}

.icon-action {
    align-items: center;
    background: #ffffff;
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    color: #344054;
    display: inline-flex;
    font-weight: 800;
    height: 2rem;
    justify-content: center;
    line-height: 1;
    width: 2rem;
}

.product-edit-form {
    border: 1px solid #edf0f4;
    border-radius: 6px;
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
}

.edit-grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-three {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-cep {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: minmax(0, 5.8rem) auto;
}

.form-grid-address {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 5.5rem);
}

.form-grid-geo {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: minmax(0, 4rem) minmax(0, 6rem);
}

.product-edit-form label {
    color: #475467;
    display: grid;
    font-size: 0.76rem;
    gap: 0.25rem;
}

.product-edit-form input,
.product-edit-form textarea {
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    color: #18202b;
    min-width: 0;
    padding: 0.42rem 0.48rem;
}

.product-edit-form textarea {
    min-height: 4.8rem;
    resize: vertical;
}

.inline-edit-form {
    display: grid;
    gap: 0.75rem;
}

.kit-modal label {
    color: #475467;
    display: grid;
    font-size: 0.78rem;
    gap: 0.25rem;
}

.kit-modal input,
.kit-modal select,
.kit-modal textarea {
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    color: #18202b;
    min-height: 2.2rem;
    min-width: 0;
    padding: 0.38rem 0.48rem;
    width: 100%;
}

.edit-detail-list input,
.edit-detail-list select,
.edit-detail-list textarea {
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    color: #18202b;
    min-height: 2.2rem;
    min-width: 0;
    padding: 0.38rem 0.48rem;
    width: 100%;
}

.edit-detail-list textarea {
    min-height: 4.4rem;
    resize: vertical;
}

.field-hint {
    color: #667085;
    display: block;
    font-size: 0.74rem;
    margin-top: 0.2rem;
}

.supplier-field {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
}

.readonly-code-field {
    align-items: center;
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    color: #18202b;
    display: flex;
    min-height: 2.2rem;
    padding: 0.38rem 0.48rem;
}

.manufacturer-code-input {
    max-width: 11rem;
}

.supplier-code-input {
    max-width: 8rem;
}

.subgroup-code-input {
    max-width: 6rem;
}

.unit-code-input {
    max-width: 4rem;
}

.barcode-code-input {
    max-width: 11rem;
}

.cest-code-input {
    max-width: 6rem;
}

.model-code-input {
    max-width: 8rem;
}

.auxiliary-code-input {
    max-width: 10rem;
}

.product-image-rail {
    display: flex;
    justify-content: flex-end;
    margin: -0.15rem 0 0.85rem;
}

.product-image-card {
    align-items: center;
    background: #fcfcfd;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    color: #475467;
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    max-width: 12rem;
    padding: 0.6rem;
    text-align: center;
}

.product-image-card span {
    font-size: 0.72rem;
    font-weight: 700;
}

.product-image-preview {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    display: block;
    height: 8.75rem;
    object-fit: contain;
    width: 10.5rem;
}

.inline-image-card {
    justify-items: start;
    max-width: 100%;
    text-align: left;
}

.inline-image-preview {
    height: 7rem;
    width: 9rem;
}

.image-editor {
    display: grid;
    gap: 0.6rem;
}

.image-editor-shell {
    display: flex;
    justify-content: flex-start;
}

.image-empty-card {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #cfd8e3;
    border-radius: 8px;
    color: #667085;
    display: flex;
    font-size: 0.82rem;
    height: 7rem;
    justify-content: center;
    width: 9rem;
}

.image-editor-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.image-zoom-backdrop {
    align-items: center;
    background: rgba(16, 24, 40, 0.82);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 45;
}

.image-zoom-frame {
    max-height: calc(100vh - 2rem);
    max-width: min(72rem, 100%);
    position: relative;
}

.image-zoom-close {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
}

.image-zoom-preview {
    background: #ffffff;
    border-radius: 10px;
    display: block;
    max-height: calc(100vh - 2rem);
    max-width: 100%;
    object-fit: contain;
    padding: 0.75rem;
}

.split-fields,
.fiscal-fields {
    display: grid;
    gap: 0.45rem;
}

.split-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
}

.subgroup-type-fields {
    gap: 0.3rem;
    grid-template-columns: minmax(7rem, 7.5rem) minmax(0, 1fr);
}

.fiscal-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fiscal-fields label {
    color: #667085;
    display: grid;
    font-size: 0.74rem;
    gap: 0.2rem;
}

.fiscal-flags {
    display: grid;
    gap: 0.6rem;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0.15rem;
}

.fiscal-flags-edit {
    border-top: 1px solid #e4e7ec;
    justify-self: start;
    margin-top: 0.45rem;
    padding-top: 0.8rem;
    width: fit-content;
}

.fiscal-flag-inline {
    align-items: center;
    color: #475467;
    display: flex !important;
    flex-direction: row;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 0.5rem !important;
    min-height: 2rem;
    white-space: nowrap;
}

.fiscal-flag-inline input[type="checkbox"] {
    accent-color: #175ea8;
    flex: 0 0 auto;
    height: 1.1rem;
    margin: 0;
    width: 1.1rem;
}

.fiscal-flags-readonly {
    border-top: 1px solid #e4e7ec;
    justify-self: start;
    margin-top: 0.45rem;
    padding-top: 0.8rem;
    width: fit-content;
}

.fiscal-flag-status {
    color: #667085;
    display: grid !important;
    font-size: 0.74rem;
    gap: 0.2rem;
}

.model-picker {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.selected-models {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.selected-models span {
    align-items: center;
    background: #eef4ff;
    border: 1px solid #c7d7fe;
    border-radius: 4px;
    color: #344054;
    display: inline-flex;
    font-size: 0.78rem;
    gap: 0.35rem;
    padding: 0.25rem 0.35rem;
}

.selected-models button {
    background: transparent;
    border: 0;
    color: #667085;
    font-weight: 800;
    min-height: 1rem;
    padding: 0;
}

.inline-alert {
    background: #fff1f3;
    border: 1px solid #ffccd5;
    border-radius: 4px;
    color: #b42318;
    font-size: 0.8rem;
    margin-top: 0.45rem;
    padding: 0.45rem 0.55rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.detail-list {
    display: grid;
    gap: 0.4rem 0.8rem;
    grid-template-columns: 8rem minmax(0, 1fr);
    margin: 0;
}

.detail-list dt {
    color: #667085;
    font-size: 0.8rem;
    font-weight: 700;
}

.detail-list dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.price-with-discount,
.margin-with-real,
.stock-fields,
.financial-fields {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.price-with-discount input,
.margin-with-real input {
    max-width: 10rem;
}

.stock-fields,
.financial-fields {
    align-items: end;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stock-fields label,
.financial-fields label {
    color: #667085;
    display: grid;
    font-size: 0.74rem;
    gap: 0.2rem;
}

.date-fields {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.date-field-card {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border: 1px solid #d8e1ec;
    border-radius: 0.85rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    color: #667085;
    display: grid;
    gap: 0.35rem;
    padding: 0.7rem 0.8rem;
}

.date-field-card span {
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.date-field-card input[disabled] {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #101828;
    cursor: default;
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 1;
    padding: 0;
}

.date-field-card input[disabled]:focus {
    outline: none;
}

.stock-number-input,
.stock-value-field,
.financial-number-input {
    width: 100%;
}

.financial-margin-real {
    grid-column: 1 / -1;
}

.discount-pill {
    background: #fff1f3;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    color: #be123c;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 0.22rem 0.55rem;
    white-space: nowrap;
}

.discount-result,
.margin-real {
    color: #475467;
    font-size: 0.84rem;
    font-weight: 600;
}

.detail-list.edit-detail-list,
.detail-list:not(.edit-detail-list) {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    padding: 0.85rem 0.9rem;
}

.application {
    color: #344054;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-line;
}

.application,
.detail-panel > p.application {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    margin: 0;
    padding: 0.75rem 0.9rem;
}

.code-list {
    display: grid;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.code-list li {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    min-height: 3rem;
    padding: 0.55rem 0.75rem;
}

.code-list li span,
.code-list li small {
    display: block;
    min-width: 0;
}

.code-list li span {
    color: #18202b;
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-list li small {
    color: #667085;
    font-size: 0.8rem;
    margin-left: 1rem;
    text-align: right;
}

.code-list small,
.muted {
    color: #667085;
}

.model-code-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.auxiliary-code-list {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.auxiliary-code-list li {
    min-height: 0;
}

.model-code-list li {
    align-items: center;
    justify-content: flex-start;
    min-height: 5.2rem;
}

.model-code-list li span {
    font-size: 0.95rem;
    line-height: 1.35;
    white-space: normal;
}

.movement-list {
    display: grid;
    gap: 0.35rem;
}

.movement-card {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.65rem 0.75rem;
}

.movement-card:hover {
    background: #fdfefe;
    border-color: #d0d5dd;
}

.movement-card-main {
    min-width: 0;
}

.movement-card-main strong,
.movement-card-main span {
    display: block;
}

.movement-card-main strong {
    color: #18202b;
    font-size: 0.82rem;
}

.movement-card-main span {
    color: #667085;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.movement-card-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.movement-card-meta span {
    margin-top: 0;
}

.movement-card-info {
    color: #667085;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.28rem;
}

.movement-card-info small {
    font-size: 0.74rem;
}

.movement-routine-positive {
    color: #067647 !important;
    font-weight: 700;
}

.movement-routine-negative {
    color: #b42318 !important;
    font-weight: 700;
}

.movement-routine-neutral {
    color: #667085 !important;
    font-weight: 700;
}

.movement-badge {
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    padding: 0.12rem 0.42rem;
    text-transform: uppercase;
}

.movement-badge-positive {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.movement-badge-negative {
    background: #fef3f2;
    border: 1px solid #fecdca;
    color: #b42318;
}

.movement-badge-neutral {
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    color: #475467;
}

.movement-card-values {
    min-width: 7.5rem;
    text-align: right;
}

.movement-card-values span,
.movement-card-values b {
    display: block;
}

.movement-card-values span {
    color: #667085;
    font-size: 0.8rem;
}

.movement-card-values b {
    font-size: 1.05rem;
    margin-top: 0.15rem;
}

.movement-delta-positive {
    color: #067647;
}

.movement-delta-negative {
    color: #b42318;
}

.movement-delta-neutral {
    color: #165a96;
}

.change-list {
    display: grid;
    gap: 0.35rem;
}

.change-row {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    display: grid;
    gap: 0.25rem;
    min-height: 4rem;
    padding: 0.6rem 0.75rem;
}

.change-row strong {
    color: #18202b;
    font-size: 0.82rem;
}

.change-row span {
    color: #344054;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.change-row small {
    color: #667085;
    font-size: 0.74rem;
}

.stock-summary {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.75rem;
}

.stock-summary div {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    min-height: 4rem;
    padding: 0.65rem 0.75rem;
}

.stock-summary span {
    color: #667085;
    display: block;
    font-size: 0.74rem;
    text-transform: uppercase;
}

.stock-summary strong {
    display: block;
    font-size: 1rem;
    margin-top: 0.2rem;
}

.audit-filters {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.75rem;
    padding: 0.75rem;
}

.audit-filters label {
    color: #667085;
    display: grid;
    font-size: 0.76rem;
    gap: 0.25rem;
}

.audit-filters input,
.audit-filters select {
    border: 1px solid #c6ccd5;
    border-radius: 4px;
    color: #18202b;
    min-width: 0;
    padding: 0.4rem 0.45rem;
}

.audit-filters .check-filter {
    align-items: center;
    display: flex;
    gap: 0.4rem;
}

.audit-filters .check-filter input {
    height: 1rem;
    width: 1rem;
}

.audit-filters button {
    align-self: end;
}

.movement-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #edf0f4;
    border-radius: 4px;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.5rem 0.55rem;
}

.movement-row strong,
.movement-row span {
    display: block;
}

.movement-row strong {
    font-size: 0.78rem;
}

.movement-row span {
    color: #667085;
    font-size: 0.78rem;
}

.movement-numbers {
    text-align: right;
}

.movement-numbers b {
    color: #165a96;
    display: block;
    font-size: 0.88rem;
}

.empty-state {
    color: #667085;
    padding: 1rem;
}

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

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

@media (max-width: 980px) {
    .workspace-header,
    .toolbar,
    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-grid,
    .dashboard-story-grid,
    .dashboard-main,
    .finance-balance-grid,
    .base-grid,
    .dashboard-actions,
    .dashboard-actions-expanded,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .dashboard-actions-header {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-action-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dashboard-action-arrow {
        display: none;
    }

    .dashboard-date-card {
        min-width: 0;
        text-align: left;
    }

    .workspace-header-side,
    .nfe-environment-badge {
        align-items: stretch;
        text-align: left;
    }

    .nfe-modal-banner {
        flex-direction: column;
    }

    .catalog-shell {
        grid-template-columns: 1fr;
    }

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

    .model-code-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .split-fields,
    .fiscal-fields,
    .date-fields {
        grid-template-columns: 1fr;
    }

    .fiscal-flags {
        grid-template-columns: 1fr;
    }

    .login-shell {
        align-items: stretch;
    }

    .login-panel {
        min-height: calc(100vh - 2rem);
        padding-top: 3.5rem;
    }
}

@media (max-width: 640px) {
    .admin-user-modal .form-grid-two,
    .admin-user-toggle-grid {
        grid-template-columns: 1fr;
    }

    .admin-user-section {
        padding: 0.7rem;
    }

    .model-code-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
