﻿:root {
    --bg: #eef2f7;
    --card: #ffffff;
    --text: #152033;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --border: #dbe3ef;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    --modal-max: 640px;
    --modal-max-wide: 1100px;
    --modal-gap: 12px;
    --modal-pad: 20px;
    --modal-radius: 14px;
    --modal-backdrop: rgba(15, 23, 42, 0.45);
    /*
     * Breakpoints canÃ´nicos (usar estes valores em @media):
     * - mobile:  max-width: 767px
     * - tablet:  768px atÃ© 1023px
     * - desktop: min-width: 1024px
     * - menu hambÃºrguer: max-width: 1023px (mobile + tablet)
     */
}

/* Modais â€” regra global: centralizado, sem scroll horizontal, formulÃ¡rio compacto */
dialog,
.app-modal {
    background: var(--card);
    border: 0;
    border-radius: var(--modal-radius);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    margin: auto;
    max-height: min(90vh, calc(100vh - 32px));
    max-width: min(var(--modal-max), calc(100vw - 32px));
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    width: calc(100% - 32px);
}

dialog::backdrop {
    background: var(--modal-backdrop);
}

.app-modal--wide {
    max-width: min(var(--modal-max-wide), calc(100vw - 32px));
}

.app-modal-page {
    display: grid;
    gap: 20px;
    justify-items: center;
    padding: 20px 16px 32px;
}

.app-modal-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--modal-radius);
    box-shadow: var(--shadow);
    max-width: min(var(--modal-max), 100%);
    overflow-x: hidden;
    padding: var(--modal-pad);
    width: 100%;
}

.app-modal-card--wide {
    max-width: min(960px, 100%);
}

.app-modal-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.app-modal-header h2,
.app-modal-header h3 {
    margin: 4px 0 0;
}

.app-modal-header p {
    color: var(--muted);
    margin: 6px 0 0;
}

.app-modal-form {
    display: grid;
    gap: var(--modal-gap) 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
}

.app-modal-form > label,
.app-modal-form > fieldset,
.app-modal-form > .full-width,
.app-modal-form > .form-actions,
.app-modal-form > [data-financeiro-campos-parcial],
.app-modal-form > [data-financeiro-campos-recorrente] {
    min-width: 0;
}

.app-modal-form .full-width,
.app-modal-form fieldset,
.app-modal-form .form-actions {
    grid-column: 1 / -1;
}

.app-modal-form label {
    display: grid;
    gap: 6px;
}

.app-modal-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 4px;
}

@media (max-width: 767px) {
    .app-modal-form {
        grid-template-columns: 1fr;
    }
}

.table-thumb {
    border: 1px solid var(--border);
    border-radius: 10px;
    height: 44px;
    object-fit: cover;
    width: 44px;
}

.form-image-preview {
    border: 1px solid var(--border);
    border-radius: 14px;
    display: block;
    height: 110px;
    margin-top: 10px;
    object-fit: cover;
    width: 160px;
}

* {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    max-width: 100%;
    overflow-x: hidden;
}

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

.app-shell {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-header {
    align-items: center;
    background: #0f172a;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    color: #e5e7eb;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 18px 32px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 0 0 auto;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #22c55e);
    color: #fff;
    font-weight: 700;
}

.brand-avatar {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    height: 46px;
    object-fit: cover;
    width: 46px;
}

.brand-user-info {
    display: grid;
    gap: 3px;
    min-width: 0;
}

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

.brand strong {
    color: #fff;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand small,
.eyebrow,
.metric-card span {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.mobile-menu-toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    gap: 5px;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 48px;
}

.mobile-menu-toggle span {
    background: #fff;
    border-radius: 999px;
    display: block;
    height: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    width: 22px;
}

.app-header.is-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.app-header.is-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}

.app-header.is-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.header-nav-link,
.header-dropdown summary {
    border-radius: 14px;
    color: #cbd5e1;
    cursor: pointer;
    display: block;
    font-weight: 700;
    padding: 11px 14px;
}

.header-nav-link:hover,
.header-dropdown summary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.header-dropdown {
    position: relative;
}

.header-dropdown summary {
    list-style: none;
}

.header-dropdown summary::-webkit-details-marker {
    display: none;
}

.header-dropdown summary::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    content: "";
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.header-dropdown-menu {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 4px;
    min-width: 230px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 30;
}

.header-dropdown-menu a {
    border-radius: 12px;
    color: var(--text);
    font-weight: 700;
    padding: 11px 12px;
}

.header-dropdown-menu a:hover {
    background: #eef2ff;
    color: var(--primary-dark);
}

.header-user {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fff;
    display: grid;
    gap: 2px;
    padding: 8px 12px;
}

.header-user span,
.header-user small {
    display: block;
    line-height: 1.1;
}

.header-user span {
    font-size: 13px;
    font-weight: 800;
}

.header-user small {
    color: #cbd5e1;
    font-size: 11px;
}

.header-logout {
    margin: 0;
}

.main {
    flex: 1;
    max-width: 100%;
    overflow-x: hidden;
    padding: 24px 32px 32px;
}

.hero-card,
.panel,
.metric-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: 28px;
    margin-bottom: 0;
}

.hero-card,
.panel {
    margin-bottom: 22px;
    padding: 28px;
}

.hero-card {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.grid {
    display: grid;
    gap: 18px;
}

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

.metric-card {
    padding: 22px;
}

.metric-card strong {
    display: block;
    font-size: 22px;
    margin: 10px 0;
}

.dashboard-card {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 48%);
    border: 1px solid #bfdbfe;
    border-left: 6px solid var(--primary);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding: 22px;
}

.dashboard-refresh-info {
    color: var(--muted);
    display: block;
    font-weight: 700;
    margin-top: 8px;
}

.dashboard-card:first-of-type {
    margin-top: 0;
}

.dashboard-distributors-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 48%);
    border-color: #bbf7d0;
    border-left-color: #16a34a;
}

.dashboard-distributors-card .dashboard-card-header > strong {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.dashboard-users-card {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 48%);
    border-color: #ddd6fe;
    border-left-color: #7c3aed;
}

.dashboard-stock-card {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 48%);
    border-color: #fed7aa;
    border-left-color: #f97316;
}

.dashboard-stock-card .dashboard-card-header > strong {
    background: #ffedd5;
    border-color: #fdba74;
    color: #9a3412;
}

.dashboard-table-wrap {
    border: 1px solid #dbeafe;
    border-radius: 16px;
}

.dashboard-card-header {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.dashboard-card-header h3 {
    margin: 4px 0;
}

.dashboard-card-header p {
    color: var(--muted);
    margin-bottom: 0;
}

.dashboard-card-header > strong {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 18px;
    color: #1e40af;
    font-size: 34px;
    min-width: 92px;
    padding: 12px 16px;
    text-align: center;
}

.dashboard-total-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.dashboard-total-group strong {
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    border-radius: 18px;
    color: #5b21b6;
    display: grid;
    font-size: 30px;
    min-width: 92px;
    padding: 10px 14px;
    place-items: center;
    text-align: center;
}

.dashboard-total-group span {
    color: #6d28d9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-top: 2px;
    text-transform: uppercase;
}

.dashboard-mini-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-mini-card {
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
    padding: 16px;
}

.dashboard-mini-card span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-mini-card strong {
    color: #0f172a;
    display: block;
    font-size: 18px;
    margin: 8px 0;
}

.dashboard-mini-card p {
    color: #2563eb;
    font-weight: 800;
    margin-bottom: 0;
}

.dashboard-user-mini-card {
    align-items: center;
    border-color: #ddd6fe;
    display: grid;
    justify-items: center;
    text-align: center;
}

.dashboard-user-card-header {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.dashboard-user-avatar {
    background: #eef2ff;
    border: 2px solid #c4b5fd;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.16);
    color: #5b21b6;
    display: grid;
    font-weight: 900;
    height: 78px;
    object-fit: cover;
    place-items: center;
    width: 78px;
}

.dashboard-user-avatar-empty {
    font-size: 20px;
}

.dashboard-user-mini-card p {
    color: #7c3aed;
    font-size: 17px;
    margin-top: 10px;
}

.dashboard-user-mini-card .badge {
    margin-top: 8px;
}

.dashboard-user-mini-card .table-subtitle {
    font-size: 13px;
    margin-top: 2px;
}

.project-module-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 320px));
}

.project-module-card {
    border-radius: 22px;
    color: #fff;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.project-module-card[data-color="0"] {
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 52%, #0f172a 100%);
    border: 1px solid #93c5fd;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.2);
}

.project-module-card[data-color="1"] {
    background: linear-gradient(135deg, #047857 0%, #059669 52%, #064e3b 100%);
    border: 1px solid #6ee7b7;
    box-shadow: 0 16px 34px rgba(5, 150, 105, 0.2);
}

.project-module-card[data-color="2"] {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 52%, #312e81 100%);
    border: 1px solid #c4b5fd;
    box-shadow: 0 16px 34px rgba(124, 58, 237, 0.2);
}

.project-module-card[data-color="3"] {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 52%, #431407 100%);
    border: 1px solid #fdba74;
    box-shadow: 0 16px 34px rgba(234, 88, 12, 0.2);
}

.project-module-card[data-color="4"] {
    background: linear-gradient(135deg, #be123c 0%, #e11d48 52%, #4c0519 100%);
    border: 1px solid #fda4af;
    box-shadow: 0 16px 34px rgba(225, 29, 72, 0.2);
}

.project-module-card[data-color="5"] {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 52%, #134e4a 100%);
    border: 1px solid #5eead4;
    box-shadow: 0 16px 34px rgba(20, 184, 166, 0.2);
}

.project-module-card[data-color="6"] {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 52%, #1e1b4b 100%);
    border: 1px solid #a5b4fc;
    box-shadow: 0 16px 34px rgba(99, 102, 241, 0.2);
}

.project-module-card[data-color="7"] {
    background: linear-gradient(135deg, #b45309 0%, #d97706 52%, #451a03 100%);
    border: 1px solid #fcd34d;
    box-shadow: 0 16px 34px rgba(217, 119, 6, 0.2);
}

.project-module-open {
    display: grid;
    gap: 8px;
    min-height: 94px;
}

.project-module-open strong {
    font-size: 18px;
    line-height: 1.2;
    text-transform: uppercase;
}

.project-module-open small {
    color: #dbeafe;
    font-weight: 700;
    line-height: 1.45;
}

.project-module-id {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 14px;
    color: #eff6ff;
    font-size: 11px;
    font-weight: 800;
    justify-self: start;
    letter-spacing: 0.02em;
    padding: 6px 9px;
    text-transform: uppercase;
}

.project-module-footer {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.project-module-summary {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-module-summary article {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
}

.project-module-summary strong {
    display: block;
    font-size: 20px;
    margin-top: 8px;
}

.project-models-header {
    margin-bottom: 18px;
}

.project-model-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
}

.orcamento-modelo-card {
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.orcamento-modelo-card:hover {
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.orcamento-modelos-filters {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.orcamento-modelos-filters .product-filters-header {
    margin: 0;
}

.orcamento-modelos-filters .form-row {
    margin: 0;
}

.orcamento-filtro-resumo {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-top: 0;
}

.orcamento-filtro-resumo span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.orcamento-context-card {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 14px 16px;
}

.orcamento-context-card span {
    color: #1d4ed8;
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.orcamento-context-card strong {
    color: #0f172a;
    display: block;
    margin-top: 3px;
}

.orcamento-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 10px;
    position: fixed;
    z-index: 1200;
}

.orcamento-modal[hidden] {
    display: none !important;
}

.orcamento-modal-backdrop {
    background: rgba(15, 23, 42, 0.55);
    inset: 0;
    position: absolute;
}

.orcamento-modal-shell {
    background: #f8fafc;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: min(92dvh, 780px);
    max-width: 1180px;
    overflow: hidden;
    position: relative;
    width: min(1180px, 100%);
    z-index: 1;
}

.orcamento-modal-header {
    align-items: flex-start;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #fff;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 12px 14px;
}

.orcamento-modal-header-text {
    min-width: 0;
}

.orcamento-modal-header .eyebrow {
    color: #dbeafe;
    font-size: 11px;
}

.orcamento-modal-header h2 {
    font-size: 15px;
    line-height: 1.3;
    margin: 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orcamento-modal-header p {
    color: #dbeafe;
    font-size: 11px;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orcamento-modal-close {
    flex-shrink: 0;
    min-height: 34px;
    min-width: 34px;
    padding: 0;
}

.orcamento-modal-body {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
}

.orcamento-modal-aside {
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.orcamento-modal-form-wrap {
    display: grid;
    gap: 10px;
    min-height: 0;
    min-width: 0;
}

.orcamento-resumo-card,
.orcamento-preview-card {
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.orcamento-resumo-card-header {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    border-bottom: 2px solid #1d4ed8;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 8px 12px;
    text-align: center;
}

.orcamento-resumo-list {
    display: grid;
    gap: 0;
    max-height: none;
    overflow: visible;
    padding: 4px 12px 0;
}

.orcamento-resumo-row {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    font-size: 12px;
    gap: 12px;
    justify-content: space-between;
    padding: 8px 0;
}

.orcamento-resumo-row strong {
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.orcamento-resumo-divider {
    border-top: 1px solid #cbd5e1;
    margin: 2px 0;
}

.orcamento-resumo-group-title {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 6px 0 2px;
    text-transform: uppercase;
}

.orcamento-resumo-desconto span,
.orcamento-resumo-desconto strong {
    color: #dc2626;
    font-weight: 800;
    text-transform: uppercase;
}

.orcamento-resumo-total {
    align-items: center;
    background: #fff;
    border-top: 2px solid #1d4ed8;
    color: #0f172a;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    justify-content: space-between;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    text-transform: uppercase;
}

.orcamento-resumo-total strong {
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
}

.orcamento-preview-card {
    padding: 8px;
}

.orcamento-preview-card h3 {
    display: block;
    font-size: 11px;
    line-height: 1.35;
    margin: 0 0 6px;
}

.orcamento-preview-stage {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.orcamento-preview-image-wrap {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    min-height: 100px;
    overflow: hidden;
    padding: 8px;
}

.orcamento-preview-image-wrap img {
    display: block;
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
}

.orcamento-preview-placeholder {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.orcamento-preview-nav {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #1d4ed8;
    cursor: pointer;
    display: inline-flex;
    font-size: 18px;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.orcamento-preview-anexo-info {
    color: var(--muted);
    display: block;
    font-size: 10px;
    margin-top: 6px;
    text-align: center;
}

.orcamento-modal-form {
    display: grid;
    gap: 10px;
}

.orcamento-form-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    padding: 14px 16px;
}

.orcamento-form-section-header {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.orcamento-form-section-header h3 {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin: 0;
    text-transform: uppercase;
}

.orcamento-section-icon-svg {
    align-items: center;
    color: #2563eb;
    display: inline-flex;
    flex-shrink: 0;
    height: 18px;
    justify-content: center;
    width: 18px;
}

.orcamento-section-icon-svg svg {
    display: block;
    height: 18px;
    width: 18px;
}

.orcamento-section-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.orcamento-section-icon-basic {
    background: #dbeafe;
    color: #1d4ed8;
}

.orcamento-section-icon-vidro {
    background: #fef3c7;
}

.orcamento-section-icon-alu {
    background: #e2e8f0;
}

.orcamento-section-icon-fer {
    background: #f1f5f9;
}

.orcamento-section-icon-kit {
    background: #dcfce7;
}

.orcamento-section-icon-extra {
    background: #dbeafe;
    color: #1d4ed8;
}

.orcamento-form-section-fields {
    display: grid;
    gap: 10px;
}

.orcamento-form-field-full {
    display: block;
}

.orcamento-form-section label span {
    color: #334155;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.orcamento-form-section select:disabled {
    appearance: none;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #334155;
    cursor: not-allowed;
    font-size: 14px;
    min-height: 40px;
    padding: 8px 12px;
    width: 100%;
}

.orcamento-form-section input,
.orcamento-form-section select:not(:disabled) {
    appearance: none;
    background: #fffbeb;
    border: 1px solid #e5d9bc;
    border-radius: 6px;
    font-size: 14px;
    min-height: 40px;
    padding: 8px 12px;
    width: 100%;
}

.orcamento-form-section select:not(:disabled) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 12px;
    padding-right: 32px;
}

.orcamento-form-section input:focus,
.orcamento-form-section select:not(:disabled):focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: 0;
}

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

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

.orcamento-form-grid-kit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.orcamento-modal-actions {
    background: #f8fafc;
    border-top: 1px solid var(--border);
    bottom: 0;
    display: grid;
    gap: 8px;
    margin: 0 -10px -10px;
    padding: 10px;
    position: sticky;
    z-index: 2;
}

.orcamento-modal-actions-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
}

.btn-block-mobile {
    justify-content: center;
    width: 100%;
}

.input-with-unit {
    align-items: stretch;
    display: flex;
}

.input-with-unit input {
    border-radius: 6px 0 0 6px;
    border-right: 0;
    flex: 1;
    min-width: 0;
}

.input-unit-suffix {
    align-items: center;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-left: 0;
    border-radius: 0 6px 6px 0;
    color: #64748b;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    min-width: 44px;
    padding: 0 10px;
}

.input-with-unit small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.orcamento-flow-modal {
    align-items: flex-start;
    display: flex;
    inset: 0;
    justify-content: center;
    overflow-y: auto;
    padding: 24px 16px;
    position: fixed;
    z-index: 1300;
}

.orcamento-flow-modal[hidden] {
    display: none !important;
}

.orcamento-flow-backdrop {
    background: rgba(15, 23, 42, 0.42);
    inset: 0;
    position: absolute;
}

.orcamento-flow-shell {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
    display: flex;
    flex-direction: column;
    margin: auto 0;
    max-height: none;
    overflow: hidden;
    position: relative;
    width: min(500px, 100%);
    z-index: 1;
}

.orcamento-flow-shell-wide {
    max-height: min(92dvh, 920px);
    width: min(800px, 100%);
}

.orcamento-flow-shell > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.orcamento-flow-header {
    align-items: center;
    background: #2563eb;
    color: #0f172a;
    display: flex;
    flex-shrink: 0;
    justify-content: space-between;
    padding: 12px 24px;
}

.orcamento-flow-header-light {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.orcamento-flow-header h2 {
    font-size: 20px;
    margin: 0;
}

.orcamento-flow-close {
    align-items: center;
    background: transparent;
    border: 0;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    font-size: 30px;
    height: 32px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.orcamento-flow-body {
    display: grid;
    flex: 1 1 auto;
    gap: 14px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px;
}

.orcamento-flow-help {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.orcamento-flow-label {
    display: grid;
    gap: 8px;
}

.orcamento-flow-label span {
    font-size: 14px;
    font-weight: 700;
}

.orcamento-flow-label strong {
    color: #dc2626;
}

.orcamento-flow-label input,
.orcamento-flow-label select {
    background: #fff;
    font-size: 18px;
    min-height: 48px;
}

.orcamento-flow-label select[size] {
    min-height: 168px;
}

.orcamento-flow-footer {
    align-items: center;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    flex-shrink: 0;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 28px;
}

.orcamento-flow-section-title {
    color: #1e3a8a;
    font-size: 0.95rem;
    margin: 18px 0 10px;
}

.orcamento-cliente-detalhes-grid {
    display: grid;
    gap: 10px 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.orcamento-flow-meta-label {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    margin-bottom: 2px;
}

.orcamento-local-obra-secao {
    border-top: 1px dashed #cbd5e1;
    margin-top: 8px;
    padding-top: 4px;
}

.orcamento-local-obra-form[hidden] {
    display: none;
}

@media (max-width: 767px) {
    .orcamento-cliente-detalhes-grid {
        grid-template-columns: 1fr;
    }
}

.proposta-document {
    background: #fff;
    border: 1px solid #111827;
    color: #111827;
    font-size: 12px;
    line-height: 1.35;
    margin: 0 auto;
    max-width: 980px;
    padding: 18px 22px;
}

.proposta-doc-header {
    align-items: center;
    border-bottom: 1px solid #111827;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding-bottom: 10px;
}

.proposta-brand {
    display: grid;
    gap: 4px;
}

.proposta-brand img,
.proposta-brand span {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex-shrink: 0;
    height: 64px;
    justify-content: center;
    width: 64px;
}

.proposta-brand img {
    object-fit: cover;
}

.proposta-brand span {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 18px;
    font-weight: 900;
}

.proposta-brand strong {
    font-size: 14px;
    letter-spacing: 0.02em;
    line-height: 1.25;
    max-width: 280px;
}

.proposta-vendedor {
    display: grid;
    font-size: 12px;
    gap: 2px;
    line-height: 1.3;
    text-align: right;
}

.proposta-meta-row,
.proposta-cliente-grid {
    border: 1px solid #cbd5e1;
    display: grid;
    margin-top: 8px;
}

.proposta-meta-row {
    background: #f1f5f9;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 0;
}

.proposta-meta-row + .proposta-cliente-grid {
    border-top: 0;
    margin-top: 0;
}

.proposta-cliente-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proposta-meta-row div,
.proposta-cliente-grid div {
    border-bottom: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    font-size: 12px;
    line-height: 1.35;
    padding: 4px 8px;
}

.proposta-meta-row div:nth-child(2n) {
    border-right: 0;
}

.proposta-meta-data {
    text-align: right;
}

.proposta-cliente-grid div:nth-child(3n) {
    border-right: 0;
}

.proposta-cliente-grid div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

@media (max-width: 767px) {
    .proposta-cliente-grid:not(.proposta-cliente-linha) {
        grid-template-columns: 1fr 1fr;
    }

    .proposta-cliente-grid:not(.proposta-cliente-linha) div:nth-child(3n) {
        border-right: 1px solid #cbd5e1;
    }

    .proposta-cliente-grid:not(.proposta-cliente-linha) div:nth-child(2n) {
        border-right: 0;
    }

    .proposta-cliente-grid:not(.proposta-cliente-linha) div:last-child {
        border-right: 0;
        grid-column: 1 / -1;
    }
}

.proposta-local-obra-grid {
    border: 1px solid #cbd5e1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 8px;
}

.proposta-cliente-grid + .proposta-local-obra-grid {
    border-top: 0;
    margin-top: 0;
}

.proposta-local-obra-grid h3 {
    background: #eff6ff;
    border-bottom: 1px solid #cbd5e1;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 700;
    grid-column: 1 / -1;
    line-height: 1.3;
    margin: 0;
    padding: 4px 8px;
}

.proposta-local-obra-grid div {
    border-bottom: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    font-size: 12px;
    line-height: 1.35;
    padding: 4px 8px;
}

.proposta-local-obra-grid div:nth-child(2n) {
    border-right: 0;
}

.proposta-local-obra-grid .proposta-local-obra-obs {
    border-bottom: 0;
    border-right: 0;
    grid-column: 1 / -1;
}

.proposta-summary-bar {
    background: #f8fafc;
    border: 1px solid #111827;
    display: grid;
    font-size: 12px;
    gap: 4px;
    margin: 8px 0 8px;
    padding: 6px 10px;
}

.proposta-summary-alert {
    color: #dc2626;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-align: center;
}

.proposta-summary-totals {
    align-items: center;
    display: grid;
    font-size: 12px;
    gap: 4px 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    line-height: 1.3;
}

.proposta-summary-totals strong {
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .proposta-summary-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.proposta-items-wrap {
    max-width: 100%;
    overflow-x: hidden;
}

.proposta-items-table {
    border: 1px solid #cbd5e1;
    font-size: 11px;
    line-height: 1.3;
    width: 100%;
}

.proposta-col-m2 {
    width: 4%;
}

.proposta-col-ambiente {
    width: 5%;
}

.proposta-col-croqui {
    width: 13%;
}

.proposta-col-descricao {
    width: 36%;
}

.proposta-col-larg,
.proposta-col-alt {
    width: 6%;
}

.proposta-col-medida-x {
    width: 2%;
}

.proposta-col-quant {
    width: 7%;
}

.proposta-col-unit {
    width: 10%;
}

.proposta-col-total {
    width: 11%;
}

.proposta-items-table th {
    background: #e5e7eb;
    border: 1px solid #374151;
    color: #111827;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    padding: 5px 6px;
    text-align: center;
    text-transform: uppercase;
}

.proposta-items-table td {
    border: 1px solid #cbd5e1;
    padding: 4px 6px;
    vertical-align: middle;
}

.proposta-items-table .table-line + .table-line {
    margin-top: 2px;
}

.proposta-items-table tbody tr:hover {
    background: #f8fafc;
    box-shadow: none;
}

.proposta-items-table .proposta-vertical-cell {
    color: #dc2626;
    font-weight: 400;
    min-width: 24px;
    padding: 3px 2px;
    text-align: center;
    vertical-align: middle;
    width: 24px;
}

.proposta-vertical-cell span,
.proposta-vertical-cell strong {
    align-items: center;
    display: inline-flex;
    font-weight: 400;
    justify-content: center;
    line-height: 1.1;
    min-height: 36px;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    writing-mode: vertical-rl;
}

.proposta-m2-cell span,
.proposta-ambiente-cell span {
    font-size: 11px;
    max-height: 120px;
    transform: rotate(180deg);
}

.proposta-ambiente-cell {
    color: #dc2626;
    font-weight: 700;
    max-width: 36px;
    min-width: 28px;
    width: 32px;
}

.proposta-ambiente-cell span {
    font-weight: 700;
}

.proposta-m2-cell {
    max-width: 32px;
    min-width: 24px;
    width: 28px;
}

.proposta-croqui {
    border: 1px solid #cbd5e1;
    display: block;
    height: 58px;
    object-fit: contain;
    width: 88px;
}

.proposta-croqui-empty {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: var(--muted);
    display: inline-flex;
    font-size: 10px;
    height: 58px;
    justify-content: center;
    width: 88px;
}

.proposta-total-row {
    border: 1px solid #111827;
    border-top: 0;
    font-size: 16px;
    line-height: 1.3;
    padding: 8px 10px;
    text-align: right;
}

.proposta-payment-footer,
.proposta-commercial-footer {
    border: 1px solid #111827;
    border-top: 0;
    font-size: 12px;
    line-height: 1.35;
    padding: 10px 12px;
}

.proposta-payment-footer h3 {
    font-size: 13px;
    margin: 0 0 6px;
}

.proposta-payment-footer ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
}

.proposta-commercial-footer p {
    margin: 0 0 4px;
}

.proposta-show-page {
    padding-bottom: 84px;
}

.proposta-action-bar {
    align-items: center;
    background: #fff;
    border-top: 1px solid #cbd5e1;
    bottom: 0;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    left: 0;
    padding: 10px 16px;
    position: fixed;
    right: 0;
    z-index: 1250;
}

.proposta-action-bar-group {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.proposta-action-bar .btn-small {
    font-size: 13px;
    min-height: 38px;
    padding: 0 12px;
    white-space: nowrap;
}

.proposta-action-btn-back {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.btn-add {
    background: #16a34a;
    border: 1px solid #16a34a;
    color: #fff;
}

.btn-add:hover,
.btn-add:focus-visible {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

.proposta-print-menu {
    flex-shrink: 0;
    position: relative;
}

.proposta-print-toggle {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.proposta-print-icon {
    flex-shrink: 0;
}

.proposta-print-caret {
    font-size: 11px;
    line-height: 1;
    opacity: 0.85;
}

.proposta-print-dropdown {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    bottom: calc(100% + 8px);
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.14);
    display: none;
    min-width: 280px;
    opacity: 0;
    padding: 10px 0 6px;
    pointer-events: none;
    position: absolute;
    right: 0;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    visibility: hidden;
    z-index: 20;
}

.proposta-print-dropdown.is-open {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.proposta-print-dropdown-title {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    padding: 0 14px 8px;
}

.proposta-print-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.proposta-print-dropdown-list button {
    background: transparent;
    border: 0;
    color: #0f172a;
    cursor: pointer;
    display: block;
    font: inherit;
    font-size: 13px;
    padding: 9px 14px;
    text-align: left;
    width: 100%;
}

.proposta-print-dropdown-list button:hover,
.proposta-print-dropdown-list button:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
    outline: none;
}

@media (max-width: 1023px) {
    .proposta-show-page {
        padding-bottom: 120px;
    }

    .proposta-action-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .proposta-action-bar-group {
        justify-content: flex-start;
    }

    .proposta-print-menu {
        align-self: flex-end;
    }
}

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

.checkbox-line {
    align-items: center;
    display: flex;
    gap: 8px;
}

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

.proposta-edit-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.proposta-edit-card form {
    padding: 16px 18px 20px;
}

.proposta-edit-card .form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
}

.proposta-edit-card .form-grid-span-2 {
    grid-column: 1 / -1;
}

.proposta-edit-card .form-actions {
    margin-top: 18px;
}

@media (max-width: 767px) {
    .proposta-edit-card .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.proposta-edit-card-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
}

.proposta-edit-card-header h3 {
    font-size: 17px;
    margin: 0;
}

.proposta-edit-card-header h3::before {
    content: "â˜· ";
}

.proposta-edit-table th {
    background: #fff;
    color: #111827;
    font-size: 12px;
    text-transform: none;
}

.proposta-edit-table td,
.proposta-edit-table th {
    padding: 14px 16px;
}

.proposta-item-actions {
    align-items: center;
    display: flex;
    gap: 6px;
}

.proposta-item-actions form {
    display: inline-flex;
}

.proposta-list-table-wrap {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.proposta-list-table-wrap table {
    max-width: 100%;
    width: 100%;
}

.proposta-list-table th,
.proposta-list-table td {
    vertical-align: middle;
}

.proposta-list-table .col-num,
.proposta-list-table th.col-num {
    text-align: center;
    white-space: nowrap;
}

.proposta-list-table .col-money,
.proposta-list-table th.col-money {
    text-align: right;
    white-space: nowrap;
}

.proposta-list-table .col-datetime {
    white-space: nowrap;
}

.proposta-list-table .col-desconto {
    color: #dc2626;
}

.proposta-action-icon-sprite {
    height: 0;
    overflow: hidden;
    position: absolute;
    width: 0;
}

.proposta-list-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    white-space: nowrap;
}

.proposta-list-actions .proposta-action-btn {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.proposta-action-btn-view {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.proposta-action-btn-view:hover,
.proposta-action-btn-view:focus-visible {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.proposta-action-btn-status {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.proposta-action-btn-status:hover,
.proposta-action-btn-status:focus-visible {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.proposta-delete-form {
    display: inline-flex;
    margin: 0;
}

.proposta-action-btn-delete {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.proposta-action-btn-delete:hover,
.proposta-action-btn-delete:focus-visible {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.proposta-archive-form {
    display: inline-flex;
    margin: 0;
}

.proposta-action-btn-arquivar {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

.proposta-action-btn-arquivar:hover,
.proposta-action-btn-arquivar:focus-visible {
    background: #ffedd5;
    border-color: #fdba74;
    color: #9a3412;
}

.proposta-action-btn-desarquivar {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
}

.proposta-action-btn-desarquivar:hover,
.proposta-action-btn-desarquivar:focus-visible {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #5b21b6;
}

.propostas-list-filters {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.propostas-list-filters .product-filters-header {
    margin: 0;
}

.propostas-list-filters .form-row {
    margin: 0;
}

.propostas-list-results {
    display: grid;
    gap: 0;
}

.propostas-list-toolbar {
    margin-bottom: 16px;
}

.propostas-list-total {
    align-items: baseline;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
}

.propostas-list-total.is-filtered {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.propostas-list-total-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.propostas-list-total-value {
    color: #0f172a;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.propostas-list-total-suffix {
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}

.compras-action-bom {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0e7490;
}

.compras-action-bom:hover,
.compras-action-bom:focus-visible {
    background: #cffafe;
    border-color: #67e8f9;
    color: #155e75;
}

.compras-action-projeto {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.compras-action-projeto:hover,
.compras-action-projeto:focus-visible {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.compras-action-conferencia {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
    position: relative;
}

.compras-action-conferencia:hover,
.compras-action-conferencia:focus-visible {
    background: #dcfce7;
    border-color: #4ade80;
    color: #166534;
}

.compras-conferencia-badge {
    background: #15803d;
    border-radius: 999px;
    bottom: -6px;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    min-width: 28px;
    padding: 3px 4px;
    position: absolute;
    right: -6px;
    text-align: center;
}

.compras-conferencia {
    display: grid;
    gap: 14px;
}

.compras-dialog--conferencia {
    max-width: min(760px, calc(100vw - 32px));
    overflow: hidden;
}

.compras-dialog--conferencia .compras-dialog-shell {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: min(88vh, 860px);
    overflow: hidden;
    padding: 0;
}

.compras-dialog--conferencia .compras-dialog-header {
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    padding: 18px 20px 14px;
}

.compras-dialog--conferencia .compras-dialog-body {
    display: block;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px 20px;
}

.compras-dialog--conferencia .compras-dialog-meta {
    gap: 8px;
    margin-bottom: 0;
}

.compras-dialog--conferencia .compras-dialog-meta > div {
    background: #f8fafc;
    border-color: #e2e8f0;
    padding: 8px 10px;
}

.compras-conferencia-progresso {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    padding: 12px 14px;
}

.compras-conferencia-progresso-topo {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.compras-conferencia-progresso-topo span {
    color: #166534;
    font-size: 0.88rem;
    font-weight: 700;
}

.compras-conferencia-barra {
    background: #e2e8f0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.compras-conferencia-barra > span {
    background: linear-gradient(90deg, #22c55e, #15803d);
    display: block;
    height: 100%;
    transition: width 0.25s ease;
}

.compras-conferencia-hint {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0;
}

.compras-conferencia-lista {
    display: grid;
    gap: 10px;
}

.compras-conferencia-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
}

.compras-conferencia-item.is-done {
    background: #f8fffb;
    border-color: #bbf7d0;
}

.compras-conferencia-topo {
    align-items: flex-start;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
}

.compras-conferencia-check {
    margin: 0;
    padding-top: 2px;
}

.compras-conferencia-check input {
    cursor: pointer;
    height: 18px;
    margin: 0;
    width: 18px;
}

.compras-conferencia-corpo {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.compras-conferencia-titulo {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.compras-conferencia-titulo strong {
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.3;
}

.compras-conferencia-chip {
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    padding: 4px 8px;
    text-transform: uppercase;
    white-space: nowrap;
    width: auto;
}

.compras-conferencia-chip.is-required {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
}

.compras-conferencia-chip.is-optional {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.compras-conferencia-meta {
    color: #64748b;
    font-size: 0.8rem;
}

.compras-conferencia-obs {
    display: grid;
    gap: 4px;
    margin: 0;
}

.compras-conferencia-obs > span {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.compras-conferencia-obs textarea {
    min-height: 52px;
    resize: vertical;
    width: 100%;
}

.compras-conferencia-footer {
    align-items: center;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-shrink: 0;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 20px 16px;
}

.compras-conferencia-footer[hidden] {
    display: none;
}

.compras-conferencia-feedback {
    color: #166534;
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0;
}

.compras-conferencia-feedback.is-error {
    color: #b91c1c;
}

.compras-conferencia-footer-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

@media (max-width: 767px) {
    .compras-dialog--conferencia .compras-dialog-meta {
        grid-template-columns: 1fr 1fr;
    }

    .compras-conferencia-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .compras-conferencia-footer-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin-left: 0;
    }
}

.servicos-action-checklist {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    position: relative;
}

.servicos-action-checklist:hover,
.servicos-action-checklist:focus-visible {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1e40af;
}

.servicos-action-observacao {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    opacity: 0.65;
}

.proposta-action-btn-historico-pedido,
.servicos-action-historico {
    background: #f5f3ff;
    border-color: #c4b5fd;
    color: #6d28d9;
    cursor: pointer;
    opacity: 1;
}

.proposta-action-btn-historico-pedido:hover,
.proposta-action-btn-historico-pedido:focus-visible,
.servicos-action-historico:hover,
.servicos-action-historico:focus-visible {
    background: #ede9fe;
    border-color: #a78bfa;
    color: #5b21b6;
}

.proposta-historico {
    display: grid;
    gap: 16px;
}

.proposta-historico-lista {
    display: grid;
    gap: 12px;
    max-height: min(48vh, 420px);
    overflow: auto;
    padding-right: 4px;
}

.proposta-historico-evento {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 12px 14px;
    display: grid;
    gap: 8px;
}

.proposta-historico-evento-cabecalho {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: baseline;
    color: #64748b;
    font-size: 0.88rem;
}

.proposta-historico-evento-cabecalho strong {
    color: #0f172a;
}

.proposta-historico-origem {
    margin-left: auto;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.78rem;
    color: #475569;
}

.proposta-historico-titulo {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
}

.proposta-historico-texto {
    margin: 0;
    color: #334155;
    white-space: normal;
    line-height: 1.45;
}

.proposta-historico-anexos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proposta-historico-anexo {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.proposta-historico-anexo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.proposta-historico-form {
    display: grid;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
    padding-top: 14px;
}

.proposta-historico-data-readonly {
    background: #f8fafc !important;
    color: #475569 !important;
    cursor: not-allowed;
}

.proposta-historico-data-hint {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.82rem;
}

.proposta-historico-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.proposta-historico-vazio {
    padding: 18px 8px;
}

.servicos-checklist-badge {
    background: #1d4ed8;
    border-radius: 999px;
    bottom: -6px;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    min-width: 28px;
    padding: 3px 4px;
    position: absolute;
    right: -6px;
    text-align: center;
}

.servicos-checklist {
    display: grid;
    gap: 16px;
}

.servicos-checklist-progresso {
    display: grid;
    gap: 8px;
}

.servicos-checklist-progresso-topo {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.servicos-checklist-barra {
    background: #e2e8f0;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.servicos-checklist-barra > span {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    display: block;
    height: 100%;
    transition: width 0.25s ease;
}

.servicos-checklist-hint {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
}

.servicos-checklist-lista {
    display: grid;
    gap: 8px;
}

.servicos-checklist-item {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr;
    margin: 0;
    padding: 12px 14px;
}

.servicos-checklist-item.is-done {
    background: #eff6ff;
    border-color: #93c5fd;
}

.servicos-checklist-check input {
    height: 18px;
    margin-top: 2px;
    width: 18px;
}

.servicos-checklist-corpo {
    display: grid;
    gap: 6px;
}

.servicos-checklist-corpo strong {
    color: #0f172a;
}

.servicos-checklist-meta {
    color: #64748b;
    font-size: 0.85rem;
}

.proposta-list-table .col-status-servicos,
.proposta-list-table th.col-status-servicos {
    min-width: 120px;
    width: 140px;
}

.servicos-list-table .servicos-col-programacao {
    min-width: 150px;
    white-space: nowrap;
}

.servicos-list-table .servicos-col-programacao strong {
    display: block;
    color: #0f172a;
    font-size: 0.92rem;
}

.servicos-list-table .servicos-col-programacao .table-subtitle {
    display: block;
    margin-top: 2px;
}

.servicos-status-cell {
    display: grid;
    gap: 4px;
}

.servicos-status-cell strong {
    color: #0f172a;
    font-size: 13px;
}

.servicos-status-mini-barra {
    background: #e2e8f0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.servicos-status-mini-barra > span {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    display: block;
    height: 100%;
}

.servicos-status-cell small {
    color: #64748b;
    font-size: 11px;
}

.proposta-list-table .col-status-compras,
.proposta-list-table th.col-status-compras {
    min-width: 120px;
    width: 140px;
}

.compras-status-cell {
    display: grid;
    gap: 4px;
}

.compras-status-cell strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
}

.compras-status-mini-barra {
    background: #e2e8f0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.compras-status-mini-barra > span {
    background: linear-gradient(90deg, #22c55e, #15803d);
    display: block;
    height: 100%;
    transition: width 0.25s ease;
}

.compras-status-cell small {
    color: #64748b;
    font-size: 11px;
}

.proposta-action-icon {
    display: block;
    height: 24px;
    width: 24px;
}

.proposta-status-menu {
    display: inline-flex;
    position: relative;
}

.proposta-status-form {
    display: none;
}

.proposta-status-dropdown {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    min-width: 196px;
    opacity: 0;
    padding: 12px 0 8px;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    visibility: hidden;
    z-index: 40;
}

.proposta-status-dropdown.is-open {
    opacity: 1;
    pointer-events: auto;
    position: fixed;
    right: auto;
    top: auto;
    transform: translateY(0);
    visibility: visible;
    z-index: 2000;
}

.proposta-status-dropdown[hidden] {
    display: none !important;
}

.proposta-status-dropdown-title {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    padding: 0 16px 10px;
    text-transform: uppercase;
}

.proposta-status-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.proposta-status-dropdown-separator {
    border-top: 1px solid #eceff3;
    margin: 6px 0;
}

.proposta-status-option {
    align-items: center;
    background: transparent;
    border: 0;
    color: #334155;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 13px;
    gap: 10px;
    line-height: 1.2;
    padding: 10px 16px;
    text-align: left;
    transition: background-color 0.12s ease;
    width: 100%;
}

.proposta-status-option:hover,
.proposta-status-option:focus-visible {
    background: #f1f5f9;
    outline: none;
}

.proposta-status-option.is-active {
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}

.proposta-status-dot {
    border-radius: 50%;
    flex: 0 0 10px;
    height: 10px;
    width: 10px;
}

.proposta-status-dot-rascunho {
    background: #9ca3af;
}

.proposta-status-dot-enviado {
    background: #00bcd4;
}

.proposta-status-dot-aprovado {
    background: #2e7d32;
}

.proposta-status-dot-rejeitado {
    background: #e53935;
}

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

.proposta-status-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 6px 12px;
    white-space: nowrap;
}

.proposta-status-rascunho {
    background: #6b7280;
    color: #fff;
}

.proposta-status-enviado {
    background: #2563eb;
    color: #fff;
}

.proposta-status-aprovado {
    background: #16a34a;
    color: #fff;
}

.proposta-status-rejeitado {
    background: #dc2626;
    color: #fff;
}

.financeiro-status-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 6px 12px;
    white-space: nowrap;
}

.financeiro-status-aguardando {
    background: #d97706;
    color: #fff;
}

.financeiro-status-recebido {
    background: #dcfce7;
    color: #166534;
}

.financeiro-status-parcial {
    background: #ffedd5;
    color: #c2410c;
}

.financeiro-status-recorrente {
    background: #7c3aed;
    color: #fff;
}

.financeiro-status-atrasado {
    background: #dc2626;
    color: #fff;
}

.financeiro-dashboard-cards {
    background: #1e3a5f;
    border-radius: 14px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
    padding: 16px;
}

.financeiro-dashboard-cards-single {
    grid-template-columns: minmax(0, 320px);
}

.financeiro-dashboard-card {
    background: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 88px;
    padding: 16px 18px;
}

.financeiro-dashboard-card span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.financeiro-dashboard-card strong {
    color: #111827;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.financeiro-dashboard-card small {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}

.financeiro-dashboard-card.is-positive strong {
    color: #047857;
}

.financeiro-dashboard-card.is-negative strong {
    color: #b91c1c;
}

.financeiro-dashboard-card.financeiro-pendencia strong {
    color: #b91c1c;
}

.financeiro-pendencia-valor,
td.col-pendencia,
td.col-pendencia strong,
input.financeiro-pendencia-valor {
    color: #b91c1c;
}

.financeiro-periodo-bar {
    align-items: center;
    border: 1px solid #93c5fd;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 12px 14px;
}

.financeiro-ano-nav {
    align-items: center;
    display: inline-flex;
    gap: 10px;
}

.financeiro-ano-btn {
    align-items: center;
    background: #fff;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    display: inline-flex;
    font-size: 18px;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    line-height: 1;
    width: 34px;
}

.financeiro-ano-btn:hover {
    background: #eff6ff;
}

.financeiro-ano-btn.is-disabled {
    border-color: #bfdbfe;
    color: #93c5fd;
    cursor: default;
    opacity: 0.7;
}

.financeiro-ano-label {
    color: var(--primary);
    font-size: 18px;
    min-width: 52px;
    text-align: center;
}

.financeiro-meses-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.financeiro-mes-btn {
    background: #fff;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    min-width: 44px;
    padding: 7px 10px;
    text-align: center;
}

.financeiro-mes-btn:hover {
    background: #eff6ff;
}

.financeiro-mes-btn.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.financeiro-resumo-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 20px;
}

.financeiro-resumo-card {
    background: var(--surface-muted, #f8fafc);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
}

.financeiro-resumo-card strong {
    font-size: 18px;
}

@media (max-width: 1023px) {
    .financeiro-dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .financeiro-dashboard-cards {
        grid-template-columns: 1fr;
    }

    .financeiro-periodo-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .financeiro-ano-nav {
        justify-content: center;
    }

    .financeiro-meses-nav {
        justify-content: center;
    }
}

.financeiro-tipo-fieldset {
    border: 1px solid var(--border);
    border-radius: 12px;
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px 16px;
}

.financeiro-tipo-fieldset legend {
    font-size: 13px;
    font-weight: 700;
    padding: 0 4px;
}

.financeiro-tipo-options {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 10px;
}

.financeiro-tipo-option {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.financeiro-tipo-option:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.financeiro-tipo-option:has(input:checked) {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: inset 0 0 0 1px #2563eb;
}

.financeiro-tipo-option input {
    flex: 0 0 16px;
    height: 16px;
    margin: 2px 0 0;
    width: 16px;
}

.financeiro-tipo-option span {
    color: var(--text);
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    white-space: normal;
}

.financeiro-modo-parcela-fieldset {
    border: 0;
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
}

.financeiro-modo-parcela-options {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
}

@media (max-width: 767px) {
    .financeiro-tipo-options,
    .financeiro-modo-parcela-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1023px) {
    .financeiro-historico.app-modal-card--wide,
    .financeiro-receber-card.app-modal-card--wide {
        max-width: min(100%, calc(100vw - 24px));
    }
}

.app-modal-form label.financeiro-check-option,
.financeiro-check-option {
    align-items: flex-start;
    background: var(--surface-muted, #f8fafc);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
}

.app-modal-form label.financeiro-check-option:has(input:checked),
.financeiro-check-option:has(input:checked) {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: inset 0 0 0 1px #2563eb;
}

.app-modal-form label.financeiro-check-option input,
.financeiro-check-option input {
    flex: 0 0 16px;
    height: 16px;
    margin: 3px 0 0;
    width: 16px;
}

.app-modal-form label.financeiro-check-option span,
.financeiro-check-option span {
    display: block;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
}

.app-modal-form label.financeiro-check-option span strong,
.financeiro-check-option span strong {
    display: inline;
    font-weight: 700;
    margin-right: 6px;
}

.financeiro-escopo-dialog form {
    display: grid;
    gap: 16px;
    padding: var(--modal-pad);
}

.financeiro-escopo-dialog-header h3 {
    margin: 0 0 4px;
}

.financeiro-escopo-dialog-header p {
    color: var(--text-muted, #64748b);
    margin: 0;
}

.financeiro-escopo-options,
.financeiro-escopo-options-inline {
    display: grid;
    gap: 10px;
}

.financeiro-escopo-options label,
.financeiro-escopo-options-inline label {
    align-items: flex-start;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 12px;
}

.financeiro-escopo-options label span,
.financeiro-escopo-options-inline label span {
    display: grid;
    gap: 2px;
}

.financeiro-escopo-options small,
.financeiro-escopo-options-inline small {
    color: var(--text-muted, #64748b);
}

.financeiro-escopo-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.financeiro-badge-count {
    background: #1d4ed8;
    border-radius: 999px;
    color: #fff;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin-left: 6px;
    min-width: 18px;
    padding: 3px 6px;
    text-align: center;
}

.financeiro-tipo-badge {
    display: inline-block;
    font-weight: 600;
}

.financeiro-pedidos-dialog-shell {
    display: grid;
    gap: 16px;
    overflow-x: hidden;
    padding: var(--modal-pad);
}

.financeiro-pedidos-dialog-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.financeiro-pedidos-dialog-header h3 {
    margin: 4px 0;
}

.financeiro-pedidos-dialog-header p {
    color: var(--text-muted, #64748b);
    margin: 0;
}

.financeiro-pedidos-table-wrap {
    -webkit-overflow-scrolling: touch;
    max-height: 56vh;
    overflow-x: auto;
    overflow-y: auto;
}

.financeiro-pedidos-table-wrap.proposta-list-table-wrap {
    overflow-x: auto;
}

.financeiro-pedidos-table-wrap table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.financeiro-pedidos-table-wrap th:nth-child(1),
.financeiro-pedidos-table-wrap td:nth-child(1) {
    width: 72px;
}

.financeiro-pedidos-table-wrap th:nth-child(2),
.financeiro-pedidos-table-wrap td:nth-child(2) {
    width: 150px;
}

.financeiro-pedidos-table-wrap th:nth-child(3),
.financeiro-pedidos-table-wrap td:nth-child(3) {
    width: 22%;
}

.financeiro-pedidos-table-wrap th:nth-child(4),
.financeiro-pedidos-table-wrap td:nth-child(4) {
    width: 18%;
}

.financeiro-pedidos-table-wrap th:nth-child(5),
.financeiro-pedidos-table-wrap td:nth-child(5) {
    width: 120px;
}

.financeiro-pedidos-table-wrap th:nth-child(6),
.financeiro-pedidos-table-wrap td:nth-child(6) {
    width: 220px;
}

.financeiro-pedidos-table-wrap td:nth-child(3),
.financeiro-pedidos-table-wrap td:nth-child(4) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.financeiro-pedidos-table-wrap .proposta-list-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
}

.financeiro-pedidos-empty {
    margin: 0;
    padding: 24px 8px 8px;
}

.financeiro-pedido-link {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.financeiro-pedido-link:hover {
    text-decoration: underline;
}

.financeiro-action-btn-receber {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.financeiro-action-btn-receber:hover,
.financeiro-action-btn-receber:focus-visible {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.financeiro-action-btn-editar {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.financeiro-action-btn-historico {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.financeiro-action-btn-historico:hover,
.financeiro-action-btn-historico:focus-visible {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1e40af;
}

.financeiro-action-btn-liberar {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.financeiro-action-btn-liberar:hover,
.financeiro-action-btn-liberar:focus-visible {
    background: #0d9488;
    border-color: #0d9488;
    color: #fff;
}

.financeiro-action-btn-revogar {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}

.financeiro-action-btn-revogar:hover,
.financeiro-action-btn-revogar:focus-visible {
    background: #ffedd5;
    border-color: #fb923c;
    color: #9a3412;
}

.financeiro-action-btn-liberado.is-disabled {
    cursor: default;
    opacity: 0.55;
    pointer-events: none;
}

.proposta-action-form {
    display: inline-flex;
    margin: 0;
}

.compras-dialog-shell {
    display: grid;
    gap: 16px;
    max-height: min(86vh, 920px);
    overflow: auto;
    padding: 18px 20px 20px;
}

.compras-dialog-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.compras-dialog-header h3 {
    margin: 4px 0;
}

.compras-dialog-header p {
    color: #64748b;
    margin: 0;
}

.compras-dialog-meta {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 12px;
}

.compras-dialog-meta > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
}

.compras-dialog-meta span {
    color: #64748b;
    font-size: 0.78rem;
}

.compras-dialog-aviso {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 8px;
    color: #9a3412;
    font-size: 0.9rem;
    margin: 0 0 12px;
    padding: 10px 12px;
}

.compras-desenho-grid {
    display: grid;
    gap: 14px;
}

.compras-desenho-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    overflow: hidden;
    padding: 12px;
}

.compras-desenho-card-info h4 {
    margin: 0 0 6px;
}

.compras-desenho-card-info p {
    color: #475569;
    margin: 0 0 4px;
}

.compras-desenho-card-media {
    align-items: center;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 160px;
    overflow: hidden;
}

.compras-desenho-card-media img {
    display: block;
    max-height: 220px;
    max-width: 100%;
    object-fit: contain;
}

.compras-desenho-bloco {
    margin-bottom: 24px;
}

.compras-desenho-bloco .recipe-section-header {
    margin-bottom: 12px;
}

.compras-desenhos-doc .technical-drawing-card {
    margin-bottom: 0;
}

.compras-desenhos-doc .projeto-container-area-desenho,
.compras-desenhos-doc .desenho-tecnico-svg-stage {
    min-height: 420px;
}

@media (max-width: 767px) {
    .compras-dialog-meta,
    .compras-desenho-card {
        grid-template-columns: 1fr;
    }
}

.financeiro-receber-dialog-form {
    display: grid;
}

.financeiro-receber-dialog-header {
    align-items: flex-start;
    background: #1d4ed8;
    color: #fff;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 18px 20px;
}

.financeiro-receber-dialog-header .eyebrow,
.financeiro-receber-dialog-header h3,
.financeiro-receber-dialog-header p {
    color: #fff;
    margin: 0;
}

.financeiro-receber-dialog-header h3 {
    margin-top: 4px;
}

.financeiro-receber-dialog-header p {
    margin-top: 6px;
    opacity: 0.9;
}

.financeiro-receber-dialog-header .btn {
    background: rgba(255, 255, 255, 0.14);
    border-color: transparent;
    color: #fff;
}

.financeiro-receber-dialog-body {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr;
    padding: 18px 20px;
}

.financeiro-receber-dialog-body .full-width {
    grid-column: 1 / -1;
}

.financeiro-receber-dialog-body .financeiro-avulsa-bloco:not([hidden]) {
    display: grid;
}

.financeiro-receber-dialog-body label {
    display: grid;
    gap: 6px;
}

.financeiro-receber-dialog-body label[hidden],
.financeiro-receber-dialog-body [hidden],
.financeiro-receber-dialog-body .financeiro-avulsa-bloco[hidden] {
    display: none !important;
}

.financeiro-avulsa-bloco {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr;
}

.financeiro-avulsa-modo-fieldset {
    border: 0;
    grid-column: 1 / -1;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.financeiro-avulsa-modo-fieldset legend {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0;
}

.financeiro-avulsa-recorrente-grid {
    display: grid;
    gap: 14px;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
}

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

@media (max-width: 767px) {
    .financeiro-avulsa-bloco,
    .financeiro-avulsa-recorrente-grid {
        grid-template-columns: 1fr;
    }
}

.financeiro-money-input {
    align-items: stretch;
    display: flex;
}

.financeiro-money-prefix {
    align-items: center;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    border-right: 0;
    color: #64748b;
    display: inline-flex;
    font-weight: 600;
    padding: 0 12px;
}

.financeiro-money-input input {
    border-radius: 0 8px 8px 0;
    flex: 1;
    min-width: 0;
}

.financeiro-receber-dialog-actions {
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 20px 18px;
}

@media (max-width: 767px) {
    .financeiro-receber-dialog-body {
        grid-template-columns: 1fr;
    }
}

.financeiro-avulsa-tipo-fieldset {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.financeiro-avulsa-tipo-fieldset legend {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0;
}

.financeiro-avulsa-tipo-options {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.financeiro-avulsa-tipo-options .financeiro-tipo-option {
    justify-content: center;
    min-height: 42px;
    padding: 8px 10px;
}

@media (max-width: 767px) {
    .financeiro-avulsa-tipo-options {
        grid-template-columns: 1fr;
    }
}

.financeiro-historico {
    margin-top: 0;
    width: 100%;
}

.financeiro-historico.app-modal-card--wide,
.financeiro-receber-card.app-modal-card--wide {
    max-width: min(1340px, calc(100vw - 64px));
    overflow-x: visible;
}

.financeiro-historico-page,
.financeiro-receber-page {
    padding-left: 24px;
    padding-right: 24px;
}

.financeiro-historico h3,
.financeiro-historico-titulo {
    margin: 0 0 12px;
}

.financeiro-historico-serie {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 16px;
}

.financeiro-historico-serie-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

.financeiro-historico-serie-item span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.financeiro-historico-serie-item strong {
    font-size: 14px;
    font-weight: 700;
}

.financeiro-historico-lista {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 100%;
    overflow: visible;
    width: 100%;
}

.financeiro-historico-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.financeiro-historico-table thead th {
    background: #1d4ed8;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
    padding: 10px 8px;
    text-align: left;
    text-transform: uppercase;
    white-space: normal;
    word-break: break-word;
}

.financeiro-historico-table tbody td {
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    padding: 10px 8px;
    vertical-align: middle;
    word-break: break-word;
}

.financeiro-historico-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.financeiro-historico-table .col-money,
.financeiro-historico-table th.col-money {
    text-align: right;
    white-space: nowrap;
}

.financeiro-historico-table .col-parcela,
.financeiro-historico-table th.col-parcela {
    text-align: center;
    width: 6%;
}

.financeiro-historico-table .col-date,
.financeiro-historico-table th.col-date {
    width: 11%;
}

.financeiro-historico-table .col-status,
.financeiro-historico-table th.col-status {
    width: 16%;
}

.financeiro-historico-table .col-status .financeiro-status-badge {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
}

.financeiro-historico-table .actions-col {
    text-align: right;
    width: 12%;
    white-space: nowrap;
}

.financeiro-historico-table .actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.financeiro-historico-table .actions form {
    margin: 0;
}

@media (max-width: 1023px) {
    .financeiro-historico-serie {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .financeiro-historico-serie {
        grid-template-columns: 1fr;
    }

    .financeiro-historico-lista {
        background: transparent;
        border: 0;
        border-radius: 0;
        overflow: visible;
    }

    .financeiro-historico-table,
    .financeiro-historico-table tbody,
    .financeiro-historico-table tr,
    .financeiro-historico-table td {
        display: block;
        width: 100%;
    }

    .financeiro-historico-table thead {
        display: none;
    }

    .financeiro-historico-table tbody tr {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        display: grid;
        gap: 8px;
        margin-bottom: 12px;
        padding: 14px;
    }

    .financeiro-historico-table tbody tr:nth-child(even) {
        background: #fff;
    }

    .financeiro-historico-table tbody td {
        align-items: flex-start;
        border: 0;
        display: flex;
        gap: 12px;
        justify-content: space-between;
        padding: 0;
    }

    .financeiro-historico-table tbody td::before {
        color: var(--muted);
        content: attr(data-label);
        flex: 0 0 42%;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

    .financeiro-historico-table .col-money,
    .financeiro-historico-table .actions-col,
    .financeiro-historico-table .actions {
        text-align: right;
    }

    .financeiro-historico-table .actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

.financeiro-resumo-inline {
    align-items: center;
    background: var(--surface-muted, #f8fafc);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 10px 14px;
}

.financeiro-resumo-inline span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.financeiro-progresso-card {
    background: linear-gradient(135deg, #0f2744 0%, #163a63 100%);
    border-radius: 12px;
    color: #e2e8f0;
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px 18px;
}

.financeiro-progresso-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.financeiro-progresso-meta > div {
    display: grid;
    gap: 4px;
}

.financeiro-progresso-label {
    color: rgba(226, 232, 240, 0.72);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.financeiro-progresso-meta strong {
    color: #fff;
    font-size: 16px;
}

.financeiro-progresso-linha {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.financeiro-progresso-linha strong {
    color: #fff;
}

.financeiro-progresso-barra {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    width: 100%;
}

.financeiro-progresso-barra span {
    background: #4ade80;
    border-radius: 999px;
    display: block;
    height: 100%;
    min-width: 0;
}

.financeiro-progresso-saldo {
    color: rgba(226, 232, 240, 0.9);
    margin: 0;
}

.financeiro-progresso-saldo strong {
    color: #fff;
}

@media (max-width: 767px) {
    .financeiro-progresso-meta {
        grid-template-columns: 1fr;
    }
}

.financeiro-receber-card .panel-actions {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

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

.financeiro-parcela-pendente {
    background: #d97706;
    color: #fff;
}

.financeiro-parcela-atrasada {
    background: #dc2626;
    color: #fff;
}

.financeiro-parcela-recebida {
    background: #16a34a;
    color: #fff;
}

.financeiro-parcela-cancelada {
    background: #78716c;
    color: #fff;
}

.btn-icon {
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    min-height: 30px;
    min-width: 30px;
    padding: 4px;
}

@media (min-width: 768px) {
    .orcamento-modal {
        padding: 16px;
    }

    .orcamento-modal-shell {
        max-height: min(88dvh, 820px);
        max-width: 1180px;
        width: min(1180px, 100%);
    }

    .orcamento-modal-header {
        padding: 14px 16px;
    }

    .orcamento-modal-header h2 {
        font-size: 17px;
        white-space: normal;
    }

    .orcamento-modal-body {
        gap: 12px;
        grid-template-columns: minmax(0, 1fr) 448px;
        overflow: hidden;
        padding: 12px;
    }

    .orcamento-modal-aside {
        align-self: stretch;
        display: flex;
        flex-direction: column;
        gap: 12px;
        min-height: 0;
        min-width: 0;
        overflow: hidden;
    }

    .orcamento-resumo-card {
        flex: 0 0 auto;
    }

    .orcamento-modal-form-wrap {
        flex-shrink: 0;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-right: 2px;
        width: 448px;
        -webkit-overflow-scrolling: touch;
    }

    .orcamento-preview-card {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }

    .orcamento-preview-card h3 {
        display: block;
        font-size: 12px;
        line-height: 1.35;
        margin: 0 0 8px;
    }

    .orcamento-preview-image-wrap {
        flex: 1 1 auto;
        min-height: 120px;
    }

    .orcamento-preview-image-wrap img {
        max-height: 180px;
    }

    .orcamento-resumo-list {
        max-height: none;
        overflow: visible;
    }

    .orcamento-form-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .orcamento-form-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orcamento-form-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orcamento-modal-actions {
        justify-items: stretch;
        margin: 0;
        padding: 0;
        position: static;
        background: transparent;
        border-top: 0;
    }

    .btn-block-mobile {
        width: auto;
    }

    .orcamento-modal-actions-note {
        text-align: right;
    }
}

@media (min-width: 1024px) {
    .orcamento-form-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .orcamento-form-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.project-model-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.project-model-cover {
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-model-main-stage {
    align-items: center;
    background: linear-gradient(135deg, #14532d 0%, #166534 100%);
    display: flex;
    height: 168px;
    justify-content: center;
    padding: 12px;
}

.project-model-id {
    background: rgba(15, 23, 42, 0.45);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    left: 12px;
    padding: 6px 8px;
    position: absolute;
    top: 12px;
}

.project-model-preview {
    align-items: center;
    background: linear-gradient(180deg, #dff5ff 0%, #7cc5d8 58%, #3d8076 100%);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    color: #0f172a;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    height: 100%;
    justify-content: center;
    max-height: 144px;
    max-width: 100%;
    padding: 12px;
    text-align: center;
    width: 120px;
}

.project-model-main-image {
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    display: block;
    height: 100%;
    max-height: 144px;
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.project-model-thumbs-strip {
    background: linear-gradient(135deg, #14532d 0%, #166534 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 12px 10px;
}

.project-model-thumbs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 0;
    width: 100%;
}

.project-model-thumbs img {
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    flex: 0 0 44px;
    height: 44px;
    object-fit: contain;
    padding: 2px;
    width: 44px;
}


.project-model-body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.project-model-body h3 {
    font-size: 18px;
    margin-bottom: 0;
}

.project-model-info-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-model-info-line strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.project-model-date-line {
    color: var(--muted);
    font-size: 13px;
}

.project-model-categories {
    display: grid;
    gap: 8px;
}

.project-model-categories small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-model-categories > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-category-badge {
    background: #e0f2fe;
    border-radius: 999px;
    color: #0369a1;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
}

.project-category-badge:nth-child(2) {
    background: #fef3c7;
    color: #92400e;
}

.project-category-badge:nth-child(3) {
    background: #e2e8f0;
    color: #1e293b;
}

.project-category-badge:nth-child(4) {
    background: #dcfce7;
    color: #166534;
}

.project-model-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-model-meta .badge {
    margin-left: 0;
}

.project-model-actions {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.project-model-actions form {
    margin: 0;
}

.recipe-form {
    display: grid;
    gap: 18px;
}

.recipe-section {
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.06);
    display: grid;
    gap: 16px;
    max-width: 100%;
    min-width: 0;
    padding: 18px;
}

.recipe-section-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding-bottom: 12px;
}

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

.technical-drawing-meta {
    background: #1d4ed8;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    padding: 8px 14px;
    text-align: right;
    white-space: nowrap;
}

.recipe-id-field {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto 100px;
}

.recipe-id-field span {
    margin-bottom: 0;
}

.recipe-basic-grid {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: 260px minmax(0, 1fr);
}

.recipe-image-field {
    grid-row: span 2;
}

.recipe-attachment-card {
    grid-row: span 2;
}

.recipe-fields-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.recipe-component-group {
    display: grid;
    gap: 12px;
}

.recipe-component-group h4 {
    margin-bottom: 0;
}

.fixed-products-list {
    display: grid;
    gap: 10px;
}

.fixed-product-add-row {
    display: flex;
    justify-content: flex-end;
}

.fixed-product-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
}

.fixed-product-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.btn-warning {
    background: #facc15;
    color: #713f12;
}

.btn-warning:hover {
    background: #eab308;
}

.fixed-product-row strong,
.fixed-product-row small {
    display: block;
}

.fixed-product-row small {
    color: var(--muted);
    margin-top: 4px;
}

.fixed-products-empty {
    padding: 14px;
}

.fixed-product-modal {
    inset: 0;
    position: fixed;
    z-index: 60;
}

.fixed-product-modal[hidden] {
    display: none;
}

.fixed-product-modal-backdrop {
    background: rgba(15, 23, 42, 0.55);
    inset: 0;
    position: absolute;
}

.fixed-product-modal-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    display: grid;
    gap: 18px;
    left: 50%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 24px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(450px, calc(100vw - 32px));
}

.fixed-product-modal-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    margin: -24px -24px 8px;
    padding: 18px 20px;
}

.fixed-product-modal-header h3 {
    margin-bottom: 0;
}

.fixed-product-modal select[data-fixed-product-select] {
    min-height: 180px;
}

.fixed-product-modal label small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 6px;
}

.fixed-product-modal-actions {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin: 8px -24px -24px;
    padding: 18px 24px;
}

.technical-placeholder {
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 16px;
    color: var(--muted);
    padding: 22px;
    text-align: center;
}

.technical-update-alert {
    background: #ecfdf5;
    border: 1px solid #86efac;
    border-radius: 999px;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 12px;
}

.technical-measures-warning {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    text-align: center;
}

.technical-drawing-card {
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    display: grid;
    gap: 14px;
    max-width: 100%;
    min-width: 0;
    padding: 14px;
}

.technical-drawing-summary {
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.technical-drawing-summary > div {
    display: grid;
    gap: 6px;
    padding: 10px;
    text-align: center;
}

.technical-drawing-summary > div + div {
    border-left: 1px solid var(--border);
}

.technical-drawing-summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.technical-drawing-summary strong {
    font-size: 14px;
}

.technical-drawing-table-wrap {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px;
}

.technical-drawing-table {
    background: transparent;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    max-width: 100%;
    text-align: center;
    width: 100%;
}

.technical-drawing-table th,
.technical-drawing-table td {
    border-bottom: 1px solid #dbeafe;
    border-right: 1px solid #dbeafe;
    padding: 11px 12px;
    text-align: center;
    vertical-align: middle;
}

.technical-drawing-table th:first-child,
.technical-drawing-table td:first-child {
    border-left: 1px solid #dbeafe;
}

.technical-drawing-table tr:first-child th {
    border-top: 1px solid #dbeafe;
}

.technical-drawing-table thead th:first-child {
    border-top-left-radius: 10px;
}

.technical-drawing-table thead th:last-child {
    border-top-right-radius: 10px;
}

.technical-drawing-table th {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.technical-drawing-main-values td {
    background: #f8fbff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.technical-drawing-table tbody tr:not(.technical-drawing-main-values) th {
    background: var(--primary);
    color: #fff;
}

.technical-drawing-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.technical-drawing-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

.technical-parts-table-wrap {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.technical-parts-grid {
    align-items: start;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    min-width: 0;
}

.technical-parts-grid .technical-parts-table {
    table-layout: fixed;
}

.technical-parts-title {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 8px;
    text-transform: uppercase;
}

.technical-parts-table {
    background: #fff;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 0;
    text-align: center;
    width: 100%;
}

.technical-parts-table th,
.technical-parts-table td {
    border: 1px solid #111827;
    padding: 8px 10px;
}

.technical-parts-table th {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.technical-parts-table td {
    font-weight: 700;
}

.technical-parts-table td:nth-child(2),
.technical-parts-table td:nth-child(4) {
    color: #ef0000;
}

.technical-config-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 260px minmax(380px, 1.25fr) 300px 360px;
}

.glass-weight-table-wrap,
.technical-config-calc {
    min-height: 100%;
}

.glass-weight-table,
.rounding-table {
    background: #fff;
    border-collapse: collapse;
    height: 100%;
    table-layout: fixed;
    text-align: center;
    width: 100%;
}

.glass-weight-table th,
.glass-weight-table td,
.rounding-table th,
.rounding-table td {
    border: 1px solid #d1d5db;
}

.glass-weight-table th,
.glass-weight-table td {
    padding: 10px 12px;
}

.glass-weight-table th,
.rounding-table-banner {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    text-align: center;
    text-transform: uppercase;
}

.rounding-table-columns th {
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 8px 10px;
    text-align: center;
    text-transform: uppercase;
}

.rounding-table-columns th:nth-child(1) {
    width: 16%;
}

.rounding-table-columns th:nth-child(2) {
    width: 38%;
}

.rounding-table-columns th:nth-child(3) {
    width: 20%;
}

.rounding-table-columns th:nth-child(4) {
    width: 26%;
}

.rounding-table td {
    font-weight: 800;
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

.rounding-pc {
    font-size: 13px;
    padding: 10px 12px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.rounding-measures {
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

.rounding-measures-inner {
    display: inline-block;
    min-width: 148px;
    text-align: left;
}

.rounding-measure-row {
    align-items: baseline;
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    line-height: 1.4;
    min-height: 26px;
    padding: 6px 10px;
}

.rounding-measure-row-divider {
    border-top: 1px solid #d1d5db;
}

.rounding-measure-label {
    color: #6b7280;
    flex: 0 0 58px;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
}

.rounding-measure-value {
    color: #111827;
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.rounding-m2pc {
    font-size: 18px;
    padding: 10px 12px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.rounding-total-m2 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    padding: 10px 12px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.glass-weight-col-thickness {
    width: 34%;
}

.glass-weight-col-value {
    width: 33%;
}

.glass-weight-col-unit {
    width: 33%;
}

.glass-weight-table tbody td {
    font-size: 12px;
    padding: 8px 10px;
    text-align: center;
    vertical-align: middle;
}

.glass-weight-applied td {
    background: #f8fafc;
    font-weight: 800;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
}

.glass-weight-applied-title {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
}

.glass-weight-applied-thickness {
    color: #374151;
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 3px;
    text-transform: uppercase;
}

.glass-weight-applied-value {
    font-size: 18px;
    line-height: 1.2;
    white-space: nowrap;
}

.glass-weight-applied-unit {
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.technical-config-panel {
    border: 1px solid #d1d5db;
    display: grid;
    gap: 0;
}

.technical-config-panel-title {
    background: #f8fafc;
    border-bottom: 1px solid #d1d5db;
    display: grid;
    gap: 4px;
    padding: 14px;
    text-align: center;
}

.technical-config-panel-title strong {
    text-transform: uppercase;
}

.technical-config-panel-title span {
    color: var(--muted);
    font-size: 12px;
}

.technical-config-field {
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    gap: 10px;
    grid-template-columns: 80px minmax(0, 1fr);
    padding: 6px 10px;
}

.technical-config-field-trilho {
    grid-template-columns: minmax(160px, 1.35fr) minmax(0, 1fr);
}

.technical-config-field-trilho input {
    font-size: 12px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.technical-config-field input,
.technical-config-field select,
.technical-config-codes-table input[type="text"] {
    background: #fff200;
    border: 1px solid #facc15;
    border-radius: 4px;
    color: #111827;
    font-weight: 800;
    min-height: 32px;
    padding: 6px 8px;
    text-align: center;
}

.technical-config-field span {
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
}

.technical-config-field small {
    color: var(--muted);
    font-size: 11px;
    text-transform: none;
}

.technical-config-codes-panel {
    border: 1px solid #d1d5db;
    display: grid;
    grid-template-rows: auto 1fr;
}

.technical-config-codes-table {
    border-collapse: collapse;
    width: 100%;
}

.technical-config-codes-table th,
.technical-config-codes-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px;
}

.technical-config-codes-table th {
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.technical-config-codes-table td {
    color: #111827;
    font-size: 12px;
    font-weight: 700;
}

.technical-config-codes-table td:nth-child(3),
.technical-config-codes-table th:nth-child(3) {
    text-align: center;
}

.technical-config-codes-table input[type="checkbox"] {
    height: 18px;
    width: 18px;
}

.labor-rule-table-wrap {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.labor-rule-table {
    border-collapse: collapse;
    min-width: 0;
    width: 100%;
}

.labor-rule-table th,
.labor-rule-table td {
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    vertical-align: middle;
}

.labor-rule-table th {
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.labor-rule-table td:first-child {
    color: #111827;
    font-weight: 800;
    white-space: nowrap;
}

.labor-rule-table input {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-sizing: border-box;
    color: var(--text);
    font: inherit;
    max-width: 100%;
    min-height: 36px;
    min-width: 0;
    padding: 8px 10px;
    width: 100%;
}

.labor-rule-table input[readonly] {
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
}

.labor-rule-total-row td {
    background: #eff6ff;
    border-top: 2px solid #2563eb;
    font-weight: 900;
}

.labor-rule-total-row input[readonly] {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.labor-rule-split-row td {
    background: #fef9c3;
    font-weight: 800;
}

.labor-rule-split-row span {
    color: #475569;
    display: block;
    font-size: 11px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.material-list-card {
    border: 1px solid #cbd5e1;
    display: grid;
    gap: 12px;
    padding: 12px;
}

/* CabeÃ§alho documento Lista de Material (include partials/_cabecalho-lista-material.php) */
.lm-doc-cabecalho {
    border: 1px solid #111827;
    display: grid;
    gap: 0;
    margin-bottom: 12px;
    overflow: hidden;
}

.lm-doc-usuario {
    align-items: center;
    border-bottom: 1px solid #111827;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 12px 14px;
}

.lm-doc-brand {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lm-doc-brand img,
.lm-doc-brand-fallback {
    border-radius: 999px;
    display: block;
    height: 64px;
    object-fit: cover;
    width: 64px;
}

.lm-doc-brand-fallback {
    align-items: center;
    background: #dbeafe;
    color: #1d4ed8;
    display: inline-flex;
    font-size: 18px;
    font-weight: 900;
    justify-content: center;
}

.lm-doc-brand strong {
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    max-width: 220px;
    text-align: center;
    text-transform: uppercase;
}

.lm-doc-vendedor {
    color: #111827;
    display: grid;
    gap: 4px;
    font-size: 13px;
    line-height: 1.35;
    text-align: right;
}

.lm-doc-vendedor strong {
    font-weight: 800;
}

.lm-doc-cliente {
    display: grid;
}

.lm-doc-cliente-topo {
    align-items: center;
    background: #e8eef5;
    border-bottom: 1px solid #94a3b8;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
    padding: 8px 12px;
}

.lm-doc-cliente-principal {
    align-items: center;
    color: #0f172a;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 6px 8px;
}

.lm-doc-cliente-principal strong,
.lm-doc-cliente-data strong,
.lm-doc-cliente-linha strong {
    font-weight: 800;
}

.lm-doc-sep {
    color: #64748b;
}

.lm-doc-cliente-data {
    color: #0f172a;
    font-size: 13px;
    white-space: nowrap;
}

.lm-doc-cliente-linha {
    border-bottom: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 13px;
    padding: 7px 12px;
}

.lm-doc-cliente-linha:last-child {
    border-bottom: 0;
}

.lm-doc-body {
    display: grid;
    gap: 16px;
}

.lm-doc-card {
    background: #fff;
}

.lm-doc-faixa-secao td {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    text-align: left;
    text-transform: uppercase;
}

.lm-doc-total-geral {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding: 14px 18px;
}

.lm-doc-total-geral span {
    color: #334155;
    font-size: 0.95rem;
}

.lm-doc-total-geral strong {
    color: #0f172a;
    font-size: 1.1rem;
}

.compras-bom-footer {
    align-items: center;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
}

.compras-dialog--bom-print {
    max-width: 560px;
}

.compras-bom-print-options {
    display: grid;
    gap: 16px;
}

.compras-bom-print-fieldset {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px 14px 14px;
}

.compras-bom-print-fieldset legend {
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0 4px;
}

.compras-bom-print-option {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
}

.compras-bom-print-option:has(input:checked) {
    background: #eff6ff;
    border-color: #93c5fd;
}

.compras-bom-print-option input {
    margin-top: 3px;
}

.compras-bom-print-option strong {
    display: block;
    font-size: 0.95rem;
}

.compras-bom-print-option small {
    color: #64748b;
}

.compras-bom-print-unitario {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.compras-bom-print-unitario-titulo {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.compras-bom-print-unitario-list {
    display: grid;
    gap: 6px;
}

.compras-bom-print-check {
    align-items: center;
    display: flex;
    gap: 8px;
    padding: 4px 2px;
}

.compras-bom-print-empty {
    color: #64748b;
    margin: 0;
}

.compras-bom-print-feedback {
    color: #b91c1c;
    font-size: 0.9rem;
    margin: 0;
}

.compras-bom-print-frame {
    border: 0;
    height: 297mm;
    left: -100vw;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    /* Largura real A4: iframe 1px fazia tabelas saírem “cortadas/menores” */
    width: 210mm;
    z-index: -1;
}

@media (max-width: 767px) {
    .lm-doc-usuario {
        align-items: flex-start;
        flex-direction: column;
    }

    .lm-doc-vendedor {
        text-align: left;
    }

    .lm-doc-cliente-topo {
        align-items: flex-start;
        flex-direction: column;
    }
}

.material-list-summary-text {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.material-list-project-heading {
    border-bottom: 1px solid #e2e8f0;
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
}

.material-list-project-heading span,
.material-list-info-item small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.material-list-project-heading strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
}

.material-list-info-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
}

.material-list-info-item strong {
    color: #1e293b;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.material-list-visual-row {
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    min-height: 150px;
}

.material-list-model-image {
    align-items: center;
    border-right: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    min-height: 150px;
    overflow: hidden;
    padding: 8px;
}

.material-list-model-image img {
    display: block;
    height: 130px;
    max-width: 100%;
    object-fit: contain;
}

.material-list-model-image span {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
}

.material-list-info {
    align-content: center;
    display: grid;
    gap: 12px;
    padding: 16px 20px;
    text-align: left;
}

.material-list-warnings {
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    color: #92400e;
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    padding: 10px 12px;
}

.material-list-warnings[hidden] {
    display: none;
}

.material-list-warnings p {
    margin: 0;
}

.material-list-table-wrap {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
}

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

.material-list-table th,
.material-list-table td {
    border: 1px solid #d1d5db;
    font-size: 12px;
    padding: 9px 10px;
    text-align: left;
    vertical-align: middle;
}

.material-list-table th {
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.material-list-table tfoot td {
    background: #f8fafc;
    font-weight: 900;
    text-align: right;
}

.material-list-thumb {
    align-items: center;
    background: #e0f2fe;
    border-radius: 8px;
    color: #075985;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 42px;
}

.material-list-image {
    border-radius: 8px;
    display: block;
    height: 42px;
    object-fit: cover;
    width: 42px;
}

@media (max-width: 1023px) {
    .technical-config-grid {
        grid-template-columns: 1fr;
    }

    .material-list-visual-row {
        grid-template-columns: 1fr;
    }

    .material-list-model-image {
        border-bottom: 1px solid #e2e8f0;
        border-right: 0;
    }

    .material-list-summary-text {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .recipe-section {
        padding: 14px;
    }

    .recipe-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .recipe-id-field {
        grid-template-columns: auto minmax(0, 1fr);
        justify-content: start;
        max-width: 180px;
    }

    .technical-drawing-meta {
        text-align: left;
        white-space: normal;
    }

    .technical-drawing-summary {
        grid-template-columns: 1fr;
    }

    .technical-drawing-summary > div + div {
        border-left: 0;
        border-top: 1px solid var(--border);
    }

    .technical-parts-grid {
        gap: 12px;
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .technical-parts-grid > * {
        max-width: 100%;
        min-width: 0;
    }

    .technical-parts-grid .technical-parts-table {
        table-layout: auto;
        width: max-content;
        min-width: 100%;
    }

    .technical-parts-table th,
    .technical-parts-table td {
        font-size: 11px;
        padding: 6px 4px;
        white-space: normal;
    }

    .glass-weight-table-wrap,
    .technical-config-calc {
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        overflow-x: auto;
    }

    .rounding-table {
        min-width: 420px;
    }

    .rounding-measures-inner {
        min-width: 0;
        width: 100%;
    }

    .rounding-pc {
        white-space: normal;
    }

    .technical-config-codes-panel {
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        overflow-x: auto;
    }

    .recipe-form .form-actions {
        flex-direction: column;
    }

    .recipe-form .form-actions .btn {
        width: 100%;
    }

    .labor-rule-table-wrap {
        overflow-x: visible;
    }

    .labor-rule-table,
    .labor-rule-table thead,
    .labor-rule-table tbody,
    .labor-rule-table tr,
    .labor-rule-table th,
    .labor-rule-table td {
        display: block;
        width: 100%;
    }

    .labor-rule-table thead {
        display: none;
    }

    .labor-rule-table tbody {
        display: grid;
        gap: 10px;
    }

    .labor-rule-table tr {
        background: #fff;
        border: 1px solid #d1d5db;
        border-radius: 12px;
        overflow: hidden;
    }

    .labor-rule-table td {
        border: 0;
        border-bottom: 1px solid #e5e7eb;
        padding: 10px 12px;
    }

    .labor-rule-table td:last-child {
        border-bottom: 0;
    }

    .labor-rule-table td:first-child {
        background: #f8fafc;
        white-space: normal;
    }

    .labor-rule-total-row td:first-child,
    .labor-rule-split-row td:first-child {
        background: inherit;
    }

    .labor-rule-split-row td {
        border-bottom: 1px solid #fde68a;
    }

    .labor-rule-split-row td:last-child {
        border-bottom: 0;
    }

    .material-list-table {
        font-size: 12px;
    }

    .material-list-table th,
    .material-list-table td {
        padding: 8px 6px;
    }
}

textarea {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
    resize: vertical;
    width: 100%;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: 0;
}

.panel-header {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.product-total-count {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 6px 0 0;
}

.product-total-count strong {
    color: var(--primary);
    font-size: 1.05rem;
}

.product-total-count span {
    display: inline-block;
    margin-left: 10px;
}

.product-list-page {
    display: grid;
    gap: 18px;
}

.product-list-results,
.list-results {
    display: grid;
    gap: 16px;
    position: relative;
    transition: opacity 0.15s ease;
}

.product-list-results.is-loading,
.list-results.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.product-list-results.is-loading::after,
.list-results.is-loading::after {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    bottom: 0;
    content: '';
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.product-list-header {
    margin-bottom: 0;
}

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

.product-stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    display: grid;
    gap: 4px;
    padding: 14px 16px;
}

.product-stat-card.is-filtered {
    border-color: #93c5fd;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.product-stat-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-stat-value {
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
}

.product-stat-suffix {
    color: #64748b;
    font-size: 1rem;
    font-weight: 700;
}

.product-stat-card small {
    color: #64748b;
    font-size: 0.82rem;
}

.product-list-filters {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    display: grid;
    gap: 16px;
    padding: 16px 18px;
}

.product-filters-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.product-filters-header strong {
    color: #0f172a;
    display: block;
    font-size: 0.98rem;
}

.product-filters-header span {
    color: #64748b;
    font-size: 0.86rem;
}

.product-filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-filters-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
}

.product-filter-field {
    display: grid;
    gap: 6px;
}

.product-filter-field > span {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
}

.product-list-toolbar {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
}

.product-list-toolbar-footer {
    margin-top: 4px;
}

.product-list-toolbar-info {
    color: #475569;
    font-size: 0.9rem;
}

.product-list-toolbar-info strong {
    color: #0f172a;
}

.product-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.product-pagination-inline {
    margin-top: 0;
}

.product-pagination .btn[aria-disabled="true"] {
    cursor: default;
    opacity: 0.55;
    pointer-events: none;
}

.product-pagination-status {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .product-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 720px) {
    .product-stats-grid,
    .product-filters-grid {
        grid-template-columns: 1fr;
    }

    .product-filters-header {
        align-items: stretch;
        flex-direction: column;
    }

    .product-filters-actions .btn {
        flex: 1;
    }
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.print-price-control {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.print-price-control span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.print-price-control select {
    min-height: 40px;
    min-width: 160px;
}

.print-report-meta {
    display: none;
}

.print-report-meta.is-visible {
    display: block;
    margin-bottom: 16px;
}

.print-report-meta.is-visible .print-report-title {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.print-report-meta.is-visible .print-report-title strong {
    color: #111827;
    font-size: 22px;
    font-weight: 800;
}

.print-report-meta.is-visible .print-report-title span {
    background: #111827;
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 5px 10px;
    text-transform: uppercase;
}

.print-report-meta.is-visible .print-report-details {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(120px, auto));
}

.print-report-meta.is-visible .print-meta-item {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
}

.print-report-meta.is-visible .print-meta-item em {
    color: #4b5563;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.print-report-meta.is-visible .print-meta-item strong {
    color: #111827;
    font-size: 13px;
}

.print-report-meta.is-visible .print-meta-total strong {
    font-size: 18px;
}

.print-report-total-line {
    color: #374151;
    font-size: 12px;
    margin: 10px 0 0;
}

.product-print-sheet {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px;
}

.product-print-sheet .product-price-percent {
    display: block;
    color: #374151;
    font-size: 11px;
    font-weight: 700;
}

.product-print-sheet .product-print-list thead th {
    background: #111827;
    color: #fff;
}

.product-print-sheet .product-print-list tbody tr:nth-child(even) {
    background: #f8fafc;
}

.product-print-sheet .product-col-price {
    text-align: right;
}

.product-print-sheet .product-price-stack {
    align-items: flex-end;
    display: inline-flex;
    flex-direction: column;
}

.product-print-sheet .product-main-attachment {
    border: 1px solid #9ca3af;
    border-radius: 4px;
    display: inline-flex;
    height: 36px;
    width: 36px;
}

.product-print-sheet .product-main-attachment img {
    object-fit: contain;
    max-height: 100%;
    max-width: 100%;
}

.product-no-media-print {
    color: #9ca3af;
    font-weight: 700;
}

.btn {
    align-items: center;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-light {
    background: #f1f5f9;
    color: #334155;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.alert {
    border-radius: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    padding: 14px 16px;
    transition: opacity 0.25s ease, transform 0.25s ease, margin 0.25s ease, padding 0.25s ease;
}

.alert.is-hiding {
    margin-bottom: 0;
    opacity: 0;
    padding-bottom: 0;
    padding-top: 0;
    transform: translateY(-8px);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.table-wrap {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-color: #94a3b8 #e2e8f0;
    scrollbar-width: thin;
}

.table-wrap::-webkit-scrollbar {
    height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 999px;
}

.table-scroll-hint {
    color: var(--muted);
    display: none;
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 10px;
}

.product-list-table-wrap {
    border: 1px solid var(--border);
    border-radius: 16px;
}

.product-list-table {
    min-width: 0;
}

.product-list-table .actions {
    flex-wrap: wrap;
}

.product-price-stack {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.product-price-percent {
    display: none;
}

.product-price-value {
    color: #0f172a;
    font-weight: 700;
    white-space: nowrap;
}

.product-name {
    color: #1e3a5f;
    display: block;
    font-size: 14px;
    line-height: 1.35;
}

.product-col-attrs .table-line {
    color: #64748b;
    display: block;
    font-size: 12px;
    line-height: 1.35;
}

.product-category-parent {
    color: #1e3a5f;
    font-weight: 700;
}

.product-distributor-name {
    color: #1e3a5f;
}

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

th,
td {
    border-bottom: 1px solid var(--border);
    padding: 14px 12px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

tbody tr {
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

tbody tr:hover {
    background: #e0ecff;
    box-shadow: inset 4px 0 0 var(--primary);
}

.categoria-pai-row {
    background: #eaf3ff;
    box-shadow: inset 5px 0 0 var(--primary);
}

.categoria-pai-row td {
    border-bottom-color: #bfdbfe;
}

.categoria-pai-row strong {
    color: #1a365d;
}

.categoria-filha-row {
    background: #fff;
}

.categoria-raiz-label {
    color: #0f766e;
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.categoria-raiz-label::before {
    content: "â˜… ";
}

.badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    padding: 4px 10px;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-child {
    align-items: center;
    background: #fff7ed;
    color: #9a3412;
    display: inline-flex;
    gap: 6px;
}

.badge-child::before {
    border-bottom: 5px solid transparent;
    border-left: 7px solid currentColor;
    border-top: 5px solid transparent;
    content: "";
    display: inline-block;
    height: 0;
    width: 0;
}

.table-subtitle {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.table-line {
    display: block;
}

.table-line + .table-line {
    margin-top: 4px;
}

.table-avatar {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 16px;
    color: #0369a1;
    display: inline-grid;
    font-size: 12px;
    font-weight: 800;
    height: 54px;
    object-fit: cover;
    place-items: center;
    width: 54px;
}

.table-avatar-empty {
    text-transform: uppercase;
}

.color-chip {
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-block;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    width: 18px;
}

.thickness-chip {
    background: #1d4ed8;
    border-radius: 999px;
    display: inline-block;
    height: 6px;
    margin-right: 8px;
    vertical-align: middle;
    width: 28px;
}

.unit-chip {
    background: #ecfdf5;
    border: 1px solid #86efac;
    border-radius: 999px;
    color: #166534;
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    min-width: 42px;
    padding: 5px 10px;
    text-align: center;
    text-transform: uppercase;
}

.kit-size-chip {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 999px;
    color: #9a3412;
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 12px;
}

.product-attachments-cell {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 88px;
}

.product-main-attachment {
    align-items: center;
    background: #f8fafc;
    border: 2px solid #93c5fd;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    height: 72px;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
    width: 72px;
}

.product-main-attachment img {
    display: block;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    width: 100%;
}

.btn-small {
    font-size: 12px;
    min-height: 34px;
    padding: 7px 10px;
}

body.modal-open {
    overflow: hidden;
}

.attachment-modal {
    inset: 0;
    position: fixed;
    z-index: 50;
}

.attachment-modal[hidden] {
    display: none;
}

.attachment-modal-backdrop {
    background: rgba(15, 23, 42, 0.55);
    inset: 0;
    position: absolute;
}

.attachment-modal-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    left: 50%;
    max-height: 86vh;
    max-width: 920px;
    overflow-y: auto;
    padding: 24px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(920px, calc(100vw - 32px));
}

.attachment-modal-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.attachment-modal-header h3 {
    margin: 4px 0 0;
}

.attachment-modal-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.attachment-modal-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.attachment-modal-thumb {
    align-items: center;
    background: #f8fafc;
    border-radius: 14px;
    display: flex;
    height: 130px;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.attachment-modal-thumb img {
    display: block;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    width: 100%;
}

.print-options-card {
    max-width: 620px;
}

.print-options-list {
    display: grid;
    gap: 12px;
}

.print-option-card {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    padding: 14px;
}

.print-option-card:has(input:checked) {
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.print-option-card input {
    margin-top: 4px;
}

.print-option-card strong,
.print-option-card small {
    display: block;
}

.print-option-card small {
    color: var(--muted);
    margin-top: 4px;
}

.actions-col {
    width: 210px;
}

.actions {
    display: flex;
    gap: 8px;
}

.actions form {
    margin: 0;
}

.cliente-action-obra {
    align-items: center;
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
    display: inline-flex;
    justify-content: center;
    min-height: 36px;
    min-width: 36px;
    padding: 4px;
}

.cliente-action-obra:hover,
.cliente-action-obra:focus-visible {
    background: #ffedd5;
    border-color: #fdba74;
    color: #9a3412;
}

.cliente-action-obra svg {
    display: block;
    height: 18px;
    width: 18px;
}

.actions-col-clientes {
    width: 280px;
}

.professional-form .full-width,
.local-obra-observacao {
    grid-column: 2 / -1;
}

.form-grid {
    display: grid;
    gap: 18px;
    max-width: 720px;
}

.professional-form {
    align-items: start;
    grid-template-columns: 260px repeat(2, minmax(0, 1fr));
    max-width: 1120px;
}

.professional-form .form-check {
    align-items: center;
    display: flex;
    gap: 10px;
    grid-column: 2 / -1;
}

.professional-form .form-check input[type="checkbox"] {
    height: 18px;
    margin: 0;
    width: 18px;
}

.professional-form .form-actions {
    grid-column: 2 / -1;
}

.usuario-preco-field {
    display: grid;
    gap: 8px;
}

.usuario-preco-field > span {
    font-weight: 600;
}

.usuario-preco-multi {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
}

.usuario-preco-check {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin: 0;
}

.usuario-preco-check input {
    height: 16px;
    margin: 0;
    width: 16px;
}

.no-attachment-form {
    grid-template-columns: 280px repeat(2, minmax(0, 1fr));
}

.auth-body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #eff6ff 48%, #eef2f7 100%);
    min-height: 100vh;
}

.auth-page {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
    display: grid;
    gap: 24px;
    max-width: 460px;
    padding: 34px;
    width: 100%;
}

.auth-brand {
    align-items: center;
    display: flex;
    gap: 12px;
}

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

.auth-brand small {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-heading {
    display: grid;
    gap: 8px;
}

.auth-heading h1 {
    font-size: 30px;
}

.auth-heading p {
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 0;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form label {
    display: grid;
    gap: 8px;
}

.auth-form label span {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.auth-form input {
    border: 1px solid var(--border);
    border-radius: 14px;
    font: inherit;
    padding: 13px 14px;
}

.auth-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.auth-submit {
    justify-content: center;
    margin-top: 4px;
    min-height: 46px;
}

.form-side-card {
    background: linear-gradient(180deg, #f8fafc, #eef2ff);
    border: 1px solid var(--border);
    border-radius: 18px;
    display: grid;
    gap: 12px;
    grid-row: span 5;
    padding: 18px;
}

.form-side-card h3 {
    margin-bottom: 0;
}

.form-side-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.form-side-card .checkbox-field {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
}

.attachment-field {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    display: grid;
    gap: 12px;
    grid-row: span 4;
    padding: 16px;
}

.attachment-field > span {
    font-weight: 800;
}

.attachment-placeholder {
    align-items: center;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: var(--muted);
    display: flex;
    min-height: 180px;
    padding: 18px;
    text-align: center;
}

.attachment-preview-image {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.attachment-file-info {
    display: grid;
    gap: 4px;
    line-height: 1.4;
    text-align: center;
    word-break: break-word;
}

.attachment-file-info strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.attachment-file-info small {
    color: var(--muted);
    font-size: 13px;
}

.product-registration-form {
    max-width: 1120px;
}

.product-registration-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: 260px minmax(0, 1fr);
}

.product-attachment-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.attachment-list {
    display: grid;
    gap: 12px;
    max-height: 460px;
    overflow-y: auto;
    padding-right: 2px;
}

.attachment-empty,
.attachment-item {
    align-items: center;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    text-align: center;
    word-break: break-word;
}

.attachment-empty {
    justify-content: center;
    min-height: 170px;
}

.attachment-item {
    border-style: solid;
    gap: 8px;
}

.attachment-empty strong,
.attachment-item strong {
    color: var(--text);
    font-size: 13px;
}

.attachment-thumb {
    align-items: center;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    height: 92px;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
    width: 100%;
}

.attachment-thumb img {
    display: block;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    width: 100%;
}

.attachment-main-check {
    justify-content: center;
}

.attachment-remove {
    min-height: 36px;
    padding: 8px 12px;
    width: 100%;
}

.attachment-button {
    background: #facc15;
    border-color: #eab308;
    color: #713f12;
    cursor: pointer;
    font-weight: 800;
    justify-content: center;
    overflow: hidden;
    position: relative;
    text-align: center;
}

.attachment-button:hover {
    background: #eab308;
    color: #422006;
}

.attachment-button input {
    cursor: pointer;
    height: 100%;
    inset: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
}

.product-fields-panel {
    display: grid;
    gap: 14px;
}

.form-row {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

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

.form-row.four-columns {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-row.five-columns {
    align-items: end;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.filter-inline-action {
    display: flex;
    gap: 8px;
    min-height: 46px;
}

.filter-inline-action .btn {
    flex: 1;
    width: 100%;
}

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

.price-adjust-form {
    display: grid;
    gap: 18px;
    max-width: 980px;
}

.bulk-price-form {
    display: grid;
    gap: 18px;
}

.price-adjust-dashboard {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.price-section {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.price-section h3 {
    margin: 4px 0 0;
}

.price-config-card {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 6px solid #3b82f6;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 16px;
    padding: 18px;
}

.price-adjust-dashboard .price-config-card:first-child {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 46%);
    border-color: #bfdbfe;
    border-left-color: #2563eb;
}

.price-adjust-dashboard .sale-adjust-card {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 46%);
    border-color: #ddd6fe;
    border-left-color: #7c3aed;
}

.card-help {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0;
}

.report-sections {
    display: grid;
    gap: 22px;
    margin-top: 22px;
}

.report-sections.list-results {
    gap: 22px;
}

.report-section {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 6px solid #3b82f6;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    display: grid;
    gap: 16px;
    padding: 18px;
}

.report-section:nth-child(1) {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 42%);
    border-color: #bfdbfe;
    border-left-color: #2563eb;
}

.report-section:nth-child(2) {
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 42%);
    border-color: #bbf7d0;
    border-left-color: #16a34a;
}

.report-section:nth-child(3) {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 42%);
    border-color: #fed7aa;
    border-left-color: #f97316;
}

.report-section:nth-child(4) {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 42%);
    border-color: #fecaca;
    border-left-color: #dc2626;
}

.report-section:nth-child(5) {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 42%);
    border-color: #ddd6fe;
    border-left-color: #7c3aed;
}

.report-section:nth-child(6) {
    background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 42%);
    border-color: #99f6e4;
    border-left-color: #0f766e;
}

.report-section-header {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.report-section-header h3 {
    margin-bottom: 4px;
}

.report-section-header p {
    color: var(--muted);
    margin-bottom: 0;
}

.price-config-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.price-config-header h3 {
    margin: 4px 0 0;
}

.factory-selector {
    display: grid;
    gap: 10px;
}

.factory-selector > span {
    font-weight: 800;
}

.factory-options {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
}

.price-matrix-wrap {
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 32%);
    border: 1px solid #bbf7d0;
    border-left: 6px solid #16a34a;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
}

.price-matrix-table {
    max-width: 100%;
    width: 100%;
}

.matrix-checkbox {
    height: 18px;
    min-height: 18px;
    width: 18px;
}

.price-matrix-table thead th {
    white-space: nowrap;
}

.price-matrix-table thead th.price-highlight-column {
    background: #1e40af;
    color: #eff6ff;
}

.price-matrix-table tbody td {
    vertical-align: top;
}

.price-matrix-table tbody td.price-highlight-column {
    background: #eff6ff;
    border-left: 1px solid #bfdbfe;
    border-right: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.price-matrix-table tbody td.price-highlight-column strong {
    color: #1d4ed8;
}

.price-matrix-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.price-matrix-table tbody tr:nth-child(even) td.price-highlight-column {
    background: #dbeafe;
}

.price-matrix-table [data-distributor-cell],
.price-matrix-table [data-lowest-price],
.price-matrix-table [data-lowest-distributor] {
    min-width: 150px;
}

.text-success {
    color: #047857;
    font-weight: 800;
}

.text-danger {
    color: var(--danger);
    font-weight: 800;
}

.form-footer-row {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.product-prices-section {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.product-prices-section h3 {
    margin: 4px 0 6px;
}

.product-prices-section p {
    color: var(--muted);
    margin-bottom: 0;
}

.distributor-price-list {
    display: grid;
    gap: 10px;
}

.distributor-price-row {
    align-items: end;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(180px, 1fr) 180px 150px;
    padding: 14px;
}

label span {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="reset"]),
select {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font: inherit;
    min-height: 46px;
    padding: 10px 12px;
    width: 100%;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="reset"]):focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: 0;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--primary);
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    flex: 0 0 auto;
    height: 16px;
    margin: 0;
    min-height: 0;
    padding: 0;
    vertical-align: middle;
    width: 16px;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    outline: 0;
}

.field-error {
    color: var(--danger);
    display: block;
    margin-top: 6px;
}

.checkbox-field {
    align-items: center;
    display: flex;
    gap: 10px;
}

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

.checkbox-field span {
    margin-bottom: 0;
}

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

.empty-state {
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 28px;
    text-align: center;
}

.status-code {
    color: var(--danger);
    display: block;
    font-size: 52px;
    font-weight: 800;
}

.debug-box {
    background: #0f172a;
    border-radius: 14px;
    color: #e5e7eb;
    max-width: 100%;
    overflow-x: hidden;
    padding: 16px;
    text-align: left;
    word-break: break-word;
}

@media (max-width: 1023px) {
    .app-header {
        align-items: center;
        display: grid;
        gap: 12px;
        grid-template-columns: 1fr auto;
        padding: 18px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        display: none;
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: 100%;
    }

    .app-header.is-menu-open .header-nav {
        display: flex;
    }

    .header-nav-link,
    .header-dropdown,
    .header-user,
    .header-logout {
        width: 100%;
    }

    .header-nav-link,
    .header-dropdown summary,
    .header-logout .btn {
        background: rgba(255, 255, 255, 0.06);
        width: 100%;
    }

    .header-dropdown {
        position: static;
    }

    .header-dropdown-menu {
        margin-top: 8px;
        min-width: 100%;
        position: static;
    }

    .main {
        padding: 20px;
    }

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

    .col-hide-md {
        display: none !important;
    }

    .table-scroll-hint {
        display: block;
    }

    .product-list-table .product-attachments-cell .btn {
        display: none;
    }

    .product-list-table .product-main-attachment {
        height: 56px;
        width: 56px;
    }

    .product-list-table .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .product-list-table .actions .btn {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .main {
        padding: 16px;
    }

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

    .hero-card,
    .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .panel-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .panel-actions .btn {
        flex: 1 1 auto;
        min-width: min(100%, 140px);
    }

    .product-registration-layout,
    .price-adjust-dashboard,
    .professional-form,
    .recipe-basic-grid,
    .recipe-fields-grid,
    .fixed-product-row,
    .form-row.five-columns,
    .form-row.four-columns,
    .form-row.two-columns,
    .form-row.three-columns {
        grid-template-columns: 1fr;
    }

    .price-config-header {
        align-items: stretch;
        flex-direction: column;
    }

    .report-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .form-footer-row {
        align-items: stretch;
        flex-direction: column;
    }

    .distributor-price-row {
        grid-template-columns: 1fr;
    }

    .professional-form .form-actions,
    .professional-form .full-width,
    .local-obra-observacao {
        grid-column: auto;
    }

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

    .form-side-card {
        grid-row: auto;
    }

    .attachment-field {
        grid-row: auto;
    }

    th,
    td {
        padding: 10px 8px;
    }

    .app-modal-form .form-actions {
        flex-direction: column;
    }

    .app-modal-form .form-actions .btn {
        width: 100%;
    }

    .btn-block-mobile {
        width: 100%;
    }

    .col-hide-sm {
        display: none !important;
    }

    .product-list-filters .filter-inline-action .btn {
        width: 100%;
    }

    .table-scroll-hint {
        display: none;
    }

    .product-list-table-wrap {
        border: 0;
        overflow: visible;
    }

    .product-list-table,
    .product-list-table thead,
    .product-list-table tbody,
    .product-list-table tr,
    .product-list-table th,
    .product-list-table td {
        display: block;
        width: 100%;
    }

    .product-list-table thead {
        display: none;
    }

    .product-list-table tbody {
        display: grid;
        gap: 12px;
    }

    .product-list-table tr[data-product-row] {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 16px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
        padding: 12px;
    }

    .product-list-table tr[data-product-row]:hover {
        background: #fff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    }

    .product-list-table td {
        align-items: flex-start;
        border-bottom: 1px solid #eef2f7;
        display: grid;
        gap: 6px;
        grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
        padding: 10px 4px;
    }

    .product-list-table td:last-child {
        border-bottom: 0;
        padding-bottom: 2px;
    }

    .product-list-table td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .product-list-table td[data-label="Anexos"] {
        align-items: center;
        grid-template-columns: auto 1fr;
    }

    .product-list-table td[data-label="Acoes"] {
        display: grid;
        gap: 8px;
        grid-template-columns: 1fr;
    }

    .product-list-table td[data-label="Anexos"] .product-attachments-cell {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
    }

    .product-list-table .product-attachments-cell .btn {
        display: inline-flex;
    }

    .product-list-table .product-main-attachment {
        height: 56px;
        width: 56px;
    }

    .product-list-table .actions {
        display: grid;
        gap: 8px;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .product-list-table .actions .btn,
    .product-list-table .actions form {
        margin: 0;
        width: 100%;
    }

    .product-list-table .actions form .btn {
        width: 100%;
    }
}

@media print {
    @page proposta-a4 {
        margin: 12mm 10mm 14mm 10mm;
        size: A4 portrait;
    }

    @page product-list-print {
        margin: 8mm 8mm 10mm 8mm;
        size: A4 landscape;
    }

    body {
        background: #fff;
    }

    .app-header,
    .product-list-filters,
    .cadastro-list-filters,
    .product-stats-grid,
    .product-list-toolbar,
    .product-pagination,
    .panel-actions,
    .proposta-action-bar,
    .alert,
    .print-hide,
    .attachment-modal,
    .table-scroll-hint {
        display: none !important;
    }

    body.print-proposta--sem-medidas .proposta-col-medida {
        display: none !important;
    }

    body.print-proposta--sem-valores .proposta-col-valor,
    body.print-proposta--sem-valores .proposta-print-valores {
        display: none !important;
    }

    .proposta-show-page .panel-header {
        display: none !important;
    }

    .proposta-show-page {
        padding-bottom: 0;
    }

    .proposta-show-page .proposta-document {
        border: 0;
        margin: 0;
        max-width: none;
        padding: 0;
    }

    .proposta-summary-bar {
        break-inside: avoid;
        gap: 3px;
        margin: 6px 0;
        padding: 5px 8px;
    }

    .proposta-summary-alert {
        font-size: 11px;
    }

    .proposta-summary-totals {
        display: grid !important;
        gap: 2px 6px !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .proposta-summary-totals strong {
        font-size: 9px;
        font-weight: 700;
        text-align: center;
        white-space: nowrap;
    }

    .proposta-meta-data {
        text-align: right !important;
    }

    .proposta-cliente-linha {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .proposta-cliente-linha div {
        border-right: 1px solid #cbd5e1 !important;
    }

    .proposta-cliente-linha div:nth-child(3n) {
        border-right: 0 !important;
    }

    .proposta-vertical-cell span {
        max-height: 100px;
        writing-mode: vertical-rl !important;
    }

    .proposta-ambiente-cell span,
    .proposta-m2-cell span {
        transform: rotate(180deg) !important;
    }

    .proposta-items-table th {
        -webkit-print-color-adjust: exact;
        background: #e5e7eb !important;
        border: 1px solid #374151 !important;
        color: #111827 !important;
        font-size: 9px;
        font-weight: 700;
        line-height: 1.2;
        padding: 4px 3px;
        print-color-adjust: exact;
        text-transform: uppercase;
    }

    .proposta-items-table td {
        border: 1px solid #94a3b8 !important;
        color: #111827 !important;
        font-size: 10px;
        padding: 4px 3px;
    }

    .proposta-items-table tbody tr:hover {
        background: #fff !important;
    }

    .proposta-items-wrap {
        overflow: visible;
    }

    .app-shell,
    .main,
    .panel {
        box-shadow: none;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .panel {
        border: 0;
    }

    .panel-header {
        align-items: flex-start;
        display: flex;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .panel-header .eyebrow,
    .panel-header p {
        display: none !important;
    }

    .panel-header h2 {
        display: none !important;
    }

    .panel-header > div:first-child {
        width: 100%;
    }

    .print-report-meta {
        -webkit-print-color-adjust: exact;
        background: #fff;
        border: 0;
        border-bottom: 2px solid #111827;
        border-radius: 0;
        color: #111827;
        display: block;
        margin-bottom: 10px;
        padding: 0 0 10px;
        print-color-adjust: exact;
        width: 100%;
    }

    .print-report-title {
        align-items: center;
        border-bottom: 0;
        display: flex;
        gap: 12px;
        justify-content: space-between;
        margin-bottom: 8px;
        padding-bottom: 0;
        text-align: left;
    }

    .print-report-title strong {
        color: #111827;
        font-size: 20px;
        font-weight: 800;
        letter-spacing: -0.02em;
        line-height: 1.1;
    }

    .print-report-title span {
        -webkit-print-color-adjust: exact;
        background: #111827 !important;
        border: 0;
        border-radius: 6px;
        color: #fff !important;
        flex-shrink: 0;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.04em;
        padding: 5px 10px;
        print-color-adjust: exact;
        text-transform: uppercase;
    }

    .print-report-details {
        color: #111827;
        display: grid;
        font-size: 10px;
        gap: 8px;
        grid-template-columns: minmax(0, 1.4fr) auto auto auto;
        line-height: 1.35;
        margin-bottom: 0;
    }

    .print-report-details .print-meta-item,
    .print-report-details span {
        background: #f3f4f6;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 6px 8px;
    }

    .print-report-details .print-meta-item em,
    .print-report-details span em {
        color: #4b5563;
        font-size: 8px;
        font-style: normal;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .print-report-details .print-meta-item strong,
    .print-report-details span strong {
        color: #111827;
        font-size: 10px;
        font-weight: 700;
    }

    .print-report-details .print-meta-total strong {
        font-size: 14px;
        font-weight: 800;
    }

    .print-report-details span:nth-child(n+2) {
        white-space: nowrap;
    }

    .print-report-total-line {
        color: #111827;
        font-size: 11px;
        margin: 8px 0 0;
    }

    .print-report-meta.is-visible {
        display: block;
    }

    body.product-print-job .product-print-sheet {
        margin: 0;
        max-width: none;
        padding: 0;
    }

    body.product-print-job .product-print-sheet .product-price-percent {
        display: block;
    }

    body.product-print-job .product-print-list .product-col-price,
    body.product-print-job .product-print-list .product-col-distributor {
        display: table-cell !important;
    }

    .table-wrap {
        border: 0;
        overflow: visible;
    }

    table {
        font-size: 11px;
    }

    thead th {
        background: #fff !important;
        border-bottom: 1px solid #cbd5e1;
        color: #0f172a;
    }

    tbody tr,
    tbody tr:hover,
    tbody tr:nth-child(even) {
        background: #fff !important;
        box-shadow: none !important;
        transition: none !important;
    }

    tbody td {
        border-bottom: 1px solid #dbe3ef;
    }

    th,
    td {
        padding: 8px;
    }

    /* Lista profissional de produtos (folha de impressao) */
    .product-list-page {
        page: product-list-print;
    }

    .product-list-page .product-list-results {
        opacity: 1 !important;
    }

    .product-list-page .product-list-table-wrap {
        border: 0;
        border-radius: 0;
        overflow: visible;
    }

    .product-list-page .product-print-list,
    .product-list-page .product-print-list thead,
    .product-list-page .product-print-list tbody,
    .product-list-page .product-print-list tr,
    .product-list-page .product-print-list th,
    .product-list-page .product-print-list td {
        display: revert;
        width: auto;
    }

    .product-list-page .product-print-list {
        border-collapse: collapse;
        table-layout: fixed;
        width: 100%;
    }

    .product-list-page .product-print-list thead {
        display: table-header-group;
    }

    .product-list-page .product-print-list thead th {
        -webkit-print-color-adjust: exact;
        background: #111827 !important;
        border-bottom: 0;
        color: #fff !important;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.05em;
        padding: 7px 6px;
        print-color-adjust: exact;
        text-transform: uppercase;
        vertical-align: middle;
        white-space: nowrap;
    }

    .product-list-page .product-print-list thead th.product-col-price {
        text-align: right;
    }

    .product-list-page .product-print-list tbody tr[data-product-row] {
        background: #fff !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        break-inside: avoid;
        padding: 0;
    }

    .product-list-page .product-print-list tbody tr[data-product-row]:nth-child(even) {
        -webkit-print-color-adjust: exact;
        background: #f8fafc !important;
        print-color-adjust: exact;
    }

    .product-list-page .product-print-list tbody td {
        border-bottom: 1px solid #d1d5db;
        color: #111827;
        font-size: 10.5px;
        padding: 6px;
        vertical-align: middle;
    }

    .product-list-page .product-print-list tbody td::before {
        content: none !important;
        display: none !important;
    }

    .product-list-page .product-col-media {
        width: 44px;
    }

    .product-list-page .product-col-code {
        width: 78px;
    }

    .product-list-page .product-col-name {
        width: 30%;
    }

    .product-list-page .product-col-category {
        width: 13%;
    }

    .product-list-page .product-col-attrs {
        width: 14%;
    }

    .product-list-page .product-col-price {
        text-align: right;
        white-space: nowrap;
        width: 96px;
    }

    .product-list-page .product-col-distributor {
        width: 108px;
    }

    .product-list-page .product-name {
        color: #111827;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.25;
    }

    .product-list-page .product-category-parent {
        color: #111827;
        display: block;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.25;
    }

    .product-list-page .product-category-child {
        color: #374151;
        display: block;
        font-size: 9.5px;
        line-height: 1.25;
    }

    .product-list-page .product-col-attrs .table-line {
        color: #1f2937;
        display: inline;
        font-size: 9.5px;
        line-height: 1.35;
    }

    .product-list-page .product-col-attrs .table-line + .table-line::before {
        color: #9ca3af;
        content: ' · ';
    }

    .product-list-page .unit-chip {
        -webkit-print-color-adjust: exact;
        background: #fff !important;
        border: 1px solid #111827;
        border-radius: 4px;
        color: #111827 !important;
        display: inline-block;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.02em;
        padding: 2px 6px;
        print-color-adjust: exact;
    }

    .product-list-page .product-price-stack {
        align-items: flex-end;
        display: inline-flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .product-list-page .product-price-percent {
        color: #374151;
        display: block;
        font-size: 9px;
        font-weight: 700;
        line-height: 1.2;
    }

    .product-list-page .product-price-value {
        color: #111827;
        font-size: 12px;
        font-weight: 800;
    }

    .product-list-page .product-distributor-name {
        color: #111827;
        display: block;
        font-size: 10px;
        font-weight: 700;
    }

    .product-list-page .product-col-distributor .table-subtitle {
        color: #4b5563;
        font-size: 9px;
    }

    .product-list-page .product-print-list .col-hide-sm:not(.print-hide):not(.print-price-column):not(.print-cost-only),
    .product-list-page .product-print-list .col-hide-md:not(.print-hide):not(.print-price-column):not(.print-cost-only) {
        display: table-cell !important;
    }

    .product-list-page .product-print-list .print-hide {
        display: none !important;
    }

    .print-price-column,
    .print-cost-only {
        display: none !important;
    }

    body.print-price-complete-selected .product-list-page .print-price-column,
    body.print-price-complete-selected .product-list-page .print-cost-only,
    body.print-price-cost-selected .product-list-page .print-price-cost,
    body.print-price-cost-selected .product-list-page .print-cost-only,
    body.print-price-supplier-selected .product-list-page .print-price-supplier,
    body.print-price-store-selected .product-list-page .print-price-store {
        display: table-cell !important;
    }

    body.print-price-supplier-selected .product-list-page .product-col-name,
    body.print-price-store-selected .product-list-page .product-col-name,
    body.print-price-cost-selected .product-list-page .product-col-name {
        width: 36%;
    }

    body.print-price-supplier-selected .product-list-page .product-col-price,
    body.print-price-store-selected .product-list-page .product-col-price,
    body.print-price-cost-selected .product-list-page .product-col-price {
        width: 110px;
    }

    .product-attachments-cell {
        min-width: 40px;
    }

    .product-attachments-cell .btn,
    .product-attachments-cell .table-subtitle,
    .product-no-media {
        display: none !important;
    }

    .product-main-attachment {
        align-items: center;
        background: #fff;
        border: 1px solid #9ca3af;
        border-radius: 4px;
        box-shadow: none;
        cursor: default;
        display: inline-flex;
        height: 36px;
        justify-content: center;
        padding: 1px;
        width: 36px;
    }

    .product-main-attachment img {
        object-fit: contain;
    }

    /* Proposta comercial — folha A4 (Chrome / Edge) */
    .proposta-show-page .proposta-document {
        page: proposta-a4;
    }

    body.print-proposta-job {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.print-proposta-job .app-shell,
    body.print-proposta-job .main {
        margin: 0;
        max-width: none;
        padding: 0;
        width: 100%;
    }

    body.print-proposta-job .proposta-show-page.panel {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        max-width: none;
        padding: 0;
    }

    body.print-proposta-job .proposta-document {
        border: 0;
        color: #111827;
        font-size: 10pt;
        line-height: 1.35;
        margin: 0;
        max-width: none;
        padding: 0;
    }

    body.print-proposta-job .proposta-doc-header {
        align-items: center;
        break-inside: avoid;
        gap: 12px;
        margin-bottom: 6px;
        page-break-inside: avoid;
        padding-bottom: 8px;
    }

    body.print-proposta-job .proposta-brand img,
    body.print-proposta-job .proposta-brand span {
        height: 46px;
        width: 46px;
    }

    body.print-proposta-job .proposta-brand strong {
        font-size: 11pt;
        max-width: none;
    }

    body.print-proposta-job .proposta-vendedor {
        font-size: 9pt;
    }

    body.print-proposta-job .proposta-meta-row,
    body.print-proposta-job .proposta-cliente-grid,
    body.print-proposta-job .proposta-local-obra-grid {
        -webkit-print-color-adjust: exact;
        break-inside: avoid;
        margin-top: 4px;
        page-break-inside: avoid;
        print-color-adjust: exact;
    }

    body.print-proposta-job .proposta-meta-row {
        background: #f1f5f9 !important;
    }

    body.print-proposta-job .proposta-meta-row div,
    body.print-proposta-job .proposta-cliente-grid div,
    body.print-proposta-job .proposta-local-obra-grid div {
        font-size: 9pt;
        line-height: 1.3;
        padding: 3px 6px;
    }

    body.print-proposta-job .proposta-local-obra-grid h3 {
        -webkit-print-color-adjust: exact;
        background: #eff6ff !important;
        font-size: 9pt;
        print-color-adjust: exact;
    }

    body.print-proposta-job .proposta-summary-bar {
        -webkit-print-color-adjust: exact;
        background: #f8fafc !important;
        break-inside: avoid;
        gap: 2px;
        margin: 6px 0;
        page-break-inside: avoid;
        padding: 4px 8px;
        print-color-adjust: exact;
    }

    body.print-proposta-job .proposta-summary-alert {
        font-size: 9pt;
    }

    body.print-proposta-job .proposta-summary-totals {
        display: grid !important;
        gap: 2px 4px !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body.print-proposta-job .proposta-summary-totals strong {
        font-size: 8pt;
        font-weight: 700;
        text-align: center;
        white-space: nowrap;
    }

    body.print-proposta-job .proposta-items-wrap {
        margin-top: 4px;
        overflow: visible;
    }

    body.print-proposta-job .proposta-items-table {
        border-collapse: collapse;
        table-layout: fixed;
        width: 100%;
    }

    body.print-proposta-job .proposta-items-table thead {
        display: table-header-group;
    }

    body.print-proposta-job .proposta-items-table thead th {
        -webkit-print-color-adjust: exact;
        background: #e5e7eb !important;
        border: 1px solid #374151 !important;
        color: #111827 !important;
        font-size: 7pt;
        font-weight: 700;
        line-height: 1.15;
        padding: 3px 2px !important;
        print-color-adjust: exact;
        text-transform: uppercase;
        vertical-align: middle;
    }

    body.print-proposta-job .proposta-items-table tbody td {
        border: 1px solid #94a3b8 !important;
        color: #111827 !important;
        font-size: 8pt;
        line-height: 1.25;
        padding: 3px 2px !important;
        vertical-align: middle;
    }

    body.print-proposta-job .proposta-items-table tbody tr {
        background: #fff !important;
        box-shadow: none !important;
    }

    body.print-proposta-job .proposta-item-row {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.print-proposta-job .proposta-items-table .proposta-col-descricao,
    body.print-proposta-job .proposta-items-table td:nth-child(4) {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    body.print-proposta-job .proposta-vertical-cell span {
        max-height: 88px;
        writing-mode: vertical-rl !important;
    }

    body.print-proposta-job .proposta-ambiente-cell span,
    body.print-proposta-job .proposta-m2-cell span {
        font-size: 8pt;
        transform: rotate(180deg) !important;
    }

    body.print-proposta-job .proposta-croqui {
        height: 48px;
        max-width: 100%;
        object-fit: contain;
        width: auto;
    }

    body.print-proposta-job .proposta-croqui-empty {
        font-size: 7pt;
        height: 48px;
        width: 100%;
    }

    body.print-proposta-job .proposta-total-row,
    body.print-proposta-job .proposta-payment-footer,
    body.print-proposta-job .proposta-commercial-footer {
        break-inside: avoid;
        font-size: 10pt;
        page-break-inside: avoid;
    }

    body.print-proposta-job .proposta-total-row {
        font-size: 11pt;
        font-weight: 700;
        padding: 6px 8px;
    }

    body.print-proposta-job .proposta-payment-footer,
    body.print-proposta-job .proposta-commercial-footer {
        font-size: 9pt;
        padding: 6px 8px;
    }

    body.print-proposta--sem-medidas col.proposta-col-medida,
    body.print-proposta--sem-medidas .proposta-col-medida {
        display: none !important;
    }

    body.print-proposta--sem-medidas .proposta-col-descricao {
        width: 48%;
    }

    body.print-proposta--sem-valores col.proposta-col-valor,
    body.print-proposta--sem-valores .proposta-col-valor,
    body.print-proposta--sem-valores .proposta-print-valores {
        display: none !important;
    }

    body.print-proposta--sem-valores .proposta-col-descricao {
        width: 42%;
    }
}

.proposta-produto-panel .proposta-produto-search-label input {
    width: 100%;
}

.proposta-avulso-adicionais {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.proposta-avulso-adicionais .orcamento-form-section-header {
    margin-bottom: 0.75rem;
}

.proposta-avulso-adicionais .orcamento-form-section-header h3 {
    margin: 0;
    font-size: 1rem;
}

.proposta-produto-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.orcamento-mao-obra-filters {
    margin-bottom: 1rem;
}

.orcamento-mao-obra-filters label {
    display: block;
    max-width: 420px;
}

.orcamento-mao-obra-filters input {
    width: 100%;
}

.orcamento-mao-obra-table {
    width: 100%;
}

.orcamento-mao-obra-table th,
.orcamento-mao-obra-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.orcamento-mao-obra-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.orcamento-mao-obra-row:hover,
.orcamento-mao-obra-row:focus-visible,
.orcamento-mao-obra-row.is-selected {
    background: #eff6ff;
    outline: none;
}

.orcamento-mao-obra-thumb {
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    display: block;
    height: 56px;
    object-fit: cover;
    width: 56px;
}

.orcamento-mao-obra-badge {
    align-items: center;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: #0369a1;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 56px;
    justify-content: center;
    width: 56px;
}

.orcamento-mao-obra-empty td {
    color: #64748b;
    padding: 1rem;
    text-align: center;
}

.proposta-produto-table-wrap {
    max-height: 260px;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid var(--border-soft, #dbe3ef);
    border-radius: 10px;
    margin-top: 0.5rem;
}

.proposta-produto-table {
    font-size: 12px;
    line-height: 1.25;
    margin: 0;
    table-layout: fixed;
    width: 100%;
}

.proposta-produto-table col.col-anexo { width: 48px; }
.proposta-produto-table col.col-codigo { width: 88px; }
.proposta-produto-table col.col-produto { width: 28%; }
.proposta-produto-table col.col-atributos { width: auto; }
.proposta-produto-table col.col-preco { width: 96px; }

.proposta-produto-table th,
.proposta-produto-table td {
    padding: 5px 8px;
    vertical-align: middle;
}

.proposta-produto-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 6px 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.proposta-produto-table .product-attachments-cell.proposta-produto-anexo {
    align-items: center;
    flex-direction: row;
    gap: 0;
    justify-content: center;
    min-width: 44px;
    width: 44px;
}

.proposta-produto-thumb {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 6px;
    display: inline-flex;
    flex-shrink: 0;
    height: 36px;
    justify-content: center;
    overflow: hidden;
    width: 36px;
}

.proposta-produto-thumb img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.proposta-produto-no-thumb {
    color: #94a3b8;
    font-size: 11px;
    white-space: nowrap;
}

.proposta-produto-codigo {
    font-size: 11px;
    padding: 2px 7px;
}

.proposta-produto-nome {
    display: block;
    font-size: 12px;
    font-weight: 600;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proposta-produto-atributos {
    color: #64748b;
    display: block;
    font-size: 11px;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proposta-produto-preco {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.proposta-produto-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.proposta-produto-row td {
    height: 44px;
}

.proposta-produto-row:hover,
.proposta-produto-row:focus-visible {
    background: #f1f5f9;
    outline: none;
}

.proposta-produto-row.is-selected {
    background: #eff6ff;
}

.proposta-produto-empty td {
    color: #64748b;
    font-size: 12px;
    height: auto;
    padding: 0.85rem;
    text-align: center;
}

.proposta-produto-selected-card {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    display: grid;
    gap: 1rem;
    grid-template-columns: 72px 1fr auto;
    padding: 1rem;
}

.proposta-produto-selected-media img {
    border-radius: 8px;
    height: 72px;
    object-fit: cover;
    width: 72px;
}

.proposta-produto-selected-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.proposta-produto-unit-hint {
    color: #2563eb;
    font-size: 0.875rem;
}

.proposta-produto-selected-price {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
}

.proposta-produto-resumo-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    display: flex;
    gap: 2rem;
    padding: 1rem 1.25rem;
}

.proposta-produto-resumo-card small {
    color: #64748b;
    display: block;
    margin-bottom: 0.25rem;
}

.field-help {
    color: #64748b;
    display: block;
    font-size: 0.8125rem;
    margin-top: 0.35rem;
}

@media (max-width: 767px) {
    .proposta-produto-selected-card {
        grid-template-columns: 1fr;
    }

    .proposta-produto-selected-price {
        text-align: left;
    }

    .proposta-produto-resumo-card {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ---- Programacao ---- */
.programacao-calendario {
    width: 100%;
}

.programacao-fila-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    font: inherit;
}

.programacao-fila-btn:hover,
.programacao-fila-btn:focus-visible {
    border-color: #94a3b8;
    outline: none;
}

.programacao-fila-dialog {
    max-width: 420px;
    width: calc(100% - 2rem);
}

.programacao-fila-lista {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0.25rem 0.75rem;
    display: grid;
    gap: 0.55rem;
    max-height: min(55vh, 480px);
    overflow: auto;
}

.programacao-dia-lista {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0 0.75rem;
    display: grid;
    gap: 0.5rem;
    max-height: min(60vh, 28rem);
    overflow: auto;
}

.programacao-dia-item {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #fff;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
}

.programacao-dia-item:hover,
.programacao-dia-item:focus-visible {
    border-color: #94a3b8;
    background: #f8fafc;
    outline: none;
}

.programacao-dia-item-cor {
    width: 0.65rem;
    min-height: 2.2rem;
    border-radius: 999px;
    background: var(--prog-dia-cor, #cccccc);
    flex-shrink: 0;
}

.programacao-dia-item-corpo {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.programacao-dia-item-corpo strong {
    font-size: 0.9rem;
    color: #0f172a;
    word-break: break-word;
}

.programacao-dia-item-meta {
    font-size: 0.78rem;
    color: #64748b;
}

.programacao-dia-empty {
    padding: 1rem 0 1.25rem;
}

.programacao-pedido-card {
    width: 100%;
    text-align: left;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    padding: 0.7rem 0.75rem;
    display: grid;
    gap: 0.2rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.programacao-pedido-card:hover,
.programacao-pedido-card:focus-visible {
    border-color: #94a3b8;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
    outline: none;
}

.programacao-pedido-meta {
    color: #64748b;
    font-size: 0.75rem;
}

.programacao-fila-empty {
    padding: 1rem 0.75rem 1.25rem;
}

.programacao-cal-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.programacao-vista-toggle {
    display: inline-flex;
    align-self: flex-start;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.programacao-vista-btn {
    padding: 0.4rem 0.95rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
}

.programacao-vista-btn.is-active {
    background: #0f172a;
    color: #fff;
}

.programacao-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.programacao-cal-titulo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.prog-cal {
    --prog-grid-line: #2e2e2e;
    --prog-bar-track: 1.45rem;
    --prog-mais-track: 1.25rem;
    --prog-day-head: 1.85rem;
    border: 1px solid var(--prog-grid-line);
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    color: #fff;
    width: 100%;
    min-width: 0;
}

.prog-cal-head {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #000;
    border-bottom: 1px solid var(--prog-grid-line);
}

.prog-cal-head > div {
    padding: 0.55rem 0.25rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #e5e5e5;
    text-transform: uppercase;
    border-right: 1px solid var(--prog-grid-line);
    box-sizing: border-box;
}

.prog-cal-head > div:last-child {
    border-right: 0;
}

.prog-cal-body {
    display: flex;
    flex-direction: column;
    background: var(--prog-grid-line);
    gap: 1px;
}

.prog-cal-week {
    position: relative;
    background: #000;
    min-height: calc(var(--prog-day-head) + (var(--prog-lanes, 3) * var(--prog-bar-track)) + 0.35rem);
}

.prog-cal--mes .prog-cal-week {
    --prog-lanes: 3;
    min-height: calc(var(--prog-day-head) + (3 * var(--prog-bar-track)) + var(--prog-mais-track) + 0.45rem);
    height: calc(var(--prog-day-head) + (3 * var(--prog-bar-track)) + var(--prog-mais-track) + 0.45rem);
}

.prog-cal--semana .prog-cal-week {
    min-height: max(280px, calc(var(--prog-day-head) + (var(--prog-lanes, 1) * var(--prog-bar-track)) + 1rem));
    height: auto;
}

.prog-cal-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    height: 100%;
    gap: 1px;
    background: var(--prog-grid-line);
}

.prog-cal-day {
    position: relative;
    padding: 0.35rem 0.3rem 0.25rem;
    min-height: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #000;
    border: 0;
    box-sizing: border-box;
}

.prog-cal-day.is-fora {
    background: #0a0a0a;
}

.prog-cal-day.is-fora .prog-cal-daynum {
    color: #737373;
}

.prog-cal-daynum {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #f5f5f5;
    z-index: 2;
}

.prog-cal-daynum-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    color: inherit;
}

.prog-cal-daynum-btn:hover,
.prog-cal-daynum-btn:focus-visible {
    background: #262626;
    outline: none;
}

.prog-cal-day.is-hoje .prog-cal-daynum {
    background: #2563eb;
    color: #fff;
}

.prog-cal-day.is-hoje .prog-cal-daynum-btn:hover,
.prog-cal-day.is-hoje .prog-cal-daynum-btn:focus-visible {
    background: #1d4ed8;
    color: #fff;
}

.prog-cal-bars {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--prog-day-head);
    bottom: 0.2rem;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    column-gap: 1px;
    row-gap: 0.18rem;
    padding: 0;
    pointer-events: none;
    align-content: start;
    box-sizing: border-box;
}

.prog-cal-mais {
    pointer-events: auto;
    justify-self: start;
    align-self: start;
    margin: 0 0.2rem;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.1rem 0.15rem;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    z-index: 3;
}

.prog-cal-mais:hover,
.prog-cal-mais:focus-visible {
    color: #d4d4d4;
    text-decoration: underline;
    outline: none;
    background: transparent;
}

.prog-cal-bar {
    pointer-events: auto;
    margin: 0 0.2rem;
    border: 0;
    border-radius: 999px;
    height: 1.3rem;
    max-width: calc(100% - 0.4rem);
    padding: 0 0.45rem;
    font-size: clamp(0.62rem, 1.1vw, 0.72rem);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: grab;
    box-shadow: none;
    background-color: var(--prog-bar-cor, #c5d4a0);
    color: #1e293b;
    min-width: 0;
}

.prog-cal-bar:active {
    cursor: grabbing;
}

.prog-cal-bar.is-dragging {
    opacity: 0.45;
}

.prog-cal-day.is-drop-target {
    background: #111827;
}

@media (max-width: 900px) {
    .prog-cal {
        --prog-bar-track: 1.25rem;
        --prog-mais-track: 1.15rem;
        --prog-day-head: 1.7rem;
        border-radius: 8px;
    }

    .prog-cal-head > div {
        font-size: 0.62rem;
        padding: 0.4rem 0.1rem;
    }

    .prog-cal-bar {
        height: 1.15rem;
        padding: 0 0.35rem;
        margin: 0 0.12rem;
    }

    .prog-cal-mais {
        font-size: 0.65rem;
    }
}

@media (max-width: 640px) {
    .programacao-calendario {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .prog-cal {
        min-width: 640px;
    }
}

[data-programacao-page].is-dragging-event .prog-cal-bars {
    pointer-events: none;
}

.prog-cal-bar:hover,
.prog-cal-bar:focus-visible {
    filter: brightness(0.96);
    outline: 2px solid #64748b;
    outline-offset: 1px;
}

.programacao-prioridade-swatch,
.prioridade-cor-swatch {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    vertical-align: middle;
    flex-shrink: 0;
}

.prioridade-cor-fields {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prioridade-cor-fields input[type="color"] {
    width: 2.5rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    background: #fff;
}

.programacao-prioridade,
.programacao-print-filtros {
    display: grid;
    gap: 0.45rem;
}

.programacao-prioridade-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.programacao-prioridade-opcoes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.85rem;
}

.programacao-prioridade-item {
    margin: 0;
    min-width: 0;
    padding: 0.45rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.programacao-prioridade-item:has(input:checked) {
    border-color: #94a3b8;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.programacao-prioridade-texto {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.25;
    word-break: break-word;
}

.programacao-prioridade-resp {
    font-weight: 700;
}

@media (max-width: 640px) {
    .programacao-prioridade-opcoes {
        grid-template-columns: 1fr;
    }
}

.prog-print-legenda {
    align-items: center;
    border-top: 1px solid #e2e8f0;
    color: #334155;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 0.55rem 0.9rem;
    margin-top: 0;
    padding: 0.7rem 0.9rem 0.85rem;
}

.prog-print-legenda > em {
    color: #64748b;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.prog-print-legenda-item {
    align-items: center;
    display: inline-flex;
    gap: 0.3rem;
    white-space: nowrap;
}

.prog-print-dot {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    margin-right: 0;
    vertical-align: middle;
}

.prog-print-dot.is-evento { background: #c5d4a0; }
.prog-print-dot.is-tarefa-cliente { background: #f5d76e; }
.prog-print-dot.is-tarefa-empresa { background: #7db3e8; }

.prog-print-table tr.is-tarefa-cliente td:first-child {
    box-shadow: inset 3px 0 0 #eab308;
}

.prog-print-table tr.is-tarefa-empresa td:first-child {
    box-shadow: inset 3px 0 0 #3b82f6;
}

.prog-print-table tr.is-evento td:first-child {
    box-shadow: inset 3px 0 0 #84cc16;
}

.prog-cal-bar.is-continua-antes {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 0;
}

.prog-cal-bar.is-continua-depois {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: 0;
}

.prog-cal-bar span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.programacao-form-grid {
    padding: 0 0.25rem 0.5rem;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.programacao-check {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
}

.programacao-check input {
    width: auto;
}

.programacao-recorrencia {
    display: grid;
    gap: 0.75rem;
}

.programacao-recorrencia[hidden] {
    display: none !important;
}

.programacao-dias-semana {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.programacao-dia-chip {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

.programacao-dia-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.programacao-dia-chip span {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
}

.programacao-dia-chip input:checked + span {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.programacao-recorrencia-mensal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.programacao-escopo-dialog .programacao-escopo-opcoes {
    display: grid;
    gap: 0.5rem;
    padding: 0.25rem 0 0.5rem;
}

.programacao-escopo-btn {
    width: 100%;
    justify-content: center;
}

.programacao-dup-panel {
    margin: 0.5rem 0.25rem 0;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    display: grid;
    gap: 0.65rem;
}

.programacao-dup-panel[hidden] {
    display: none !important;
}

.programacao-dup-panel p {
    margin: 0;
    color: #475569;
    font-size: 0.875rem;
}

.programacao-dup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.programacao-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0.25rem 0.25rem;
    border-top: 1px solid #e2e8f0;
}

.programacao-form-actions[hidden] {
    display: none !important;
}

.programacao-dialog {
    max-width: 560px;
    width: calc(100% - 2rem);
    border: 0;
    border-radius: 14px;
    padding: 0;
}

.programacao-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.programacao-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

/* Impressao programacao */
.print-body {
    background: #fff;
    margin: 0;
    padding: 1.25rem;
}

.prog-print {
    margin: 0 auto;
    max-width: 1100px;
}

.prog-print-toolbar {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.prog-print-header {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    margin-bottom: 1.1rem;
    overflow: hidden;
}

.prog-print-brand {
    align-items: center;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-bottom: 1px solid #cbd5e1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.1rem;
    padding: 0.95rem 1rem;
}

.prog-print-brand-mark {
    align-items: center;
    background: #1d4ed8;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 900;
    height: 2.75rem;
    justify-content: center;
    letter-spacing: 0.04em;
    width: 2.75rem;
}

.prog-print-brand-text {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.prog-print-brand-text strong {
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.prog-print-brand-text span {
    color: #64748b;
    font-size: 0.78rem;
}

.prog-print-doc-title {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 0.65rem;
    justify-content: flex-end;
    margin-left: auto;
}

.prog-print-doc-title h1 {
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
}

.prog-print-badge {
    background: #0f172a;
    border-radius: 6px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.55rem;
    text-transform: uppercase;
}

.prog-print-details {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0.85rem 0.9rem 0.75rem;
}

.prog-print-meta-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.55rem 0.65rem;
}

.prog-print-meta-item em {
    color: #64748b;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.prog-print-meta-item strong {
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.prog-print-meta-wide strong {
    font-size: 0.78rem;
}

.prog-print-meta-total strong {
    font-size: 1.15rem;
}

.prog-print-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

.prog-print-table th,
.prog-print-table td {
    border: 1px solid #cbd5e1;
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: top;
}

.prog-print-table th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.prog-print-table tbody tr:hover {
    background: transparent;
    box-shadow: none;
}

@media (max-width: 980px) {
    .prog-print-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prog-print-doc-title {
        justify-content: flex-start;
        margin-left: 0;
        width: 100%;
    }
}

@media print {
    .no-print,
    .prog-print-toolbar {
        display: none !important;
    }

    .print-body {
        padding: 0;
    }

    .prog-print-header {
        border-radius: 0;
        break-inside: avoid;
    }

    .prog-print-table th {
        background: #eee !important;
        color: #0f172a !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .prog-print-brand-mark,
    .prog-print-badge,
    .prog-print-dot {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

@media (max-width: 767px) {
    .prog-cal-head > div {
        font-size: 0.62rem;
        padding: 0.4rem 0.1rem;
    }

    .prog-cal-bar {
        font-size: 0.65rem;
        padding: 0 0.35rem;
    }

    .prog-cal--semana .prog-cal-week {
        min-height: 180px;
    }
}


/* Fluxo de Caixa â€” extrato principal */
.fluxo-caixa-resumo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.25rem;
    padding: 1.1rem 1.25rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f3d73 0%, #1a5b9c 100%);
    color: #fff;
}

.fluxo-caixa-resumo-item span {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.fluxo-caixa-resumo-item strong {
    font-size: 1.35rem;
    font-weight: 700;
}

.fluxo-caixa-resumo-item.is-negative strong {
    color: #fecaca;
}

.fluxo-tipo-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.fluxo-tipo-entrada {
    background: #dcfce7;
    color: #166534;
}

.fluxo-tipo-saida {
    background: #fee2e2;
    color: #b91c1c;
}

.fluxo-parcela-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
}

.fluxo-descricao-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.fluxo-descricao-link:hover {
    text-decoration: underline;
}

.fluxo-valor-saida {
    color: #b91c1c;
}

@media (max-width: 767px) {
    .fluxo-caixa-resumo {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Permissoes — cards profissionais e responsivos
   ========================================================= */
.permissoes-page {
    max-width: 1400px;
}

.permissoes-page-header {
    margin-bottom: 1rem;
}

.permissoes-page-header p {
    max-width: 40rem;
    color: #64748b;
}

.permissoes-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1.25rem;
    padding: .85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(248, 250, 252, .96);
    backdrop-filter: blur(6px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.permissoes-select-all {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.permissoes-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.permissoes-toolbar-actions .btn {
    white-space: nowrap;
}

.permissoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 1.1rem;
    align-items: start;
}

.perm-card {
    display: flex;
    flex-direction: column;
    gap: .95rem;
    min-width: 0;
    padding: 1.1rem 1.15rem 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.perm-card.is-protected {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 38%);
}

.perm-card.is-full-access {
    border-color: #86efac;
}

.perm-card-head {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: .7rem;
    align-items: center;
}

.perm-card-select {
    display: grid;
    place-items: center;
}

.perm-card-avatar {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #1e3a5f;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.perm-card-identity {
    min-width: 0;
}

.perm-card-identity strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.perm-card-identity small {
    display: block;
    margin-top: .15rem;
    color: #64748b;
    font-size: .78rem;
    overflow-wrap: anywhere;
}

.perm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .4rem;
}

.perm-chip {
    display: inline-flex;
    align-items: center;
    padding: .18rem .55rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.perm-card-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
    padding: .75rem;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    background: #f8fafc;
}

.perm-switch,
.perm-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.perm-switch {
    flex-direction: row;
    align-items: center;
    gap: .55rem;
    text-transform: none;
    letter-spacing: 0;
    font-size: .88rem;
    font-weight: 600;
    color: #334155;
    min-height: 2.35rem;
}

.perm-field select {
    width: 100%;
    min-height: 2.35rem;
    border-radius: 10px;
}

.perm-section-title {
    margin: 0 0 .65rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
}

.perm-modules-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.perm-modules-head-row,
.perm-module-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(4, 2.35rem);
    gap: .35rem;
    align-items: center;
    padding: .45rem .6rem;
}

.perm-modules-head-row {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.perm-modules-head-row span {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #64748b;
    text-align: center;
}

.perm-modules-head-row span:first-child {
    text-align: left;
}

.perm-module-row {
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.perm-module-row:last-child {
    border-bottom: 0;
}

.perm-module-row:nth-child(even) {
    background: #fafbfc;
}

.perm-module-row.is-locked {
    background: #f0fdf4;
}

.perm-module-name {
    min-width: 0;
    font-size: .84rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.perm-act {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.1rem;
    margin: 0 auto;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.perm-act:hover {
    background: #f1f5f9;
}

.perm-act:has(input:checked) {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.perm-module-row.is-locked .perm-act:has(input:checked) {
    border-color: #bbf7d0;
    background: #ecfdf5;
}

.perm-act input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.perm-act-empty {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.1rem;
    margin: 0 auto;
    color: #cbd5e1;
    font-size: .85rem;
}

.permissoes-footer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@media (max-width: 900px) {
    .permissoes-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    }
}

@media (max-width: 720px) {
    .permissoes-toolbar {
        position: static;
    }

    .permissoes-toolbar-actions {
        width: 100%;
    }

    .permissoes-toolbar-actions .btn {
        flex: 1 1 calc(50% - .25rem);
    }

    .permissoes-toolbar-actions .btn-primary {
        flex: 1 1 100%;
    }
}

@media (max-width: 560px) {
    .permissoes-grid {
        grid-template-columns: 1fr;
    }

    .perm-card {
        padding: 1rem;
        border-radius: 14px;
    }

    .perm-card-controls {
        grid-template-columns: 1fr;
    }

    .perm-modules-head-row,
    .perm-module-row {
        grid-template-columns: minmax(0, 1fr) repeat(4, 2.1rem);
        gap: .25rem;
        padding: .4rem .5rem;
    }

    .perm-act,
    .perm-act-empty {
        width: 2.1rem;
    }

    .perm-module-name {
        font-size: .8rem;
    }
}
