*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Fase 2 — prévia isolada do módulo unificado de Vendas. */
.unified-sales-lead { color: #60656c; margin: 6px 0 0; }
.unified-preview-warning { background: #fff7d6; border: 1px solid #e1bd25; border-left: 4px solid #d2a800; border-radius: 5px; color: #544400; margin: 0 0 16px; padding: 11px 14px; }
.unified-sales-period-form { align-items: end; display: flex; gap: 8px; }
.unified-sales-period-form label { font-size: 12px; font-weight: 700; }
.unified-sales-period-form input { margin-top: 5px; }
.unified-sales-filters { align-items: end; background: #fff; border: 1px solid #ddd; border-top: 3px solid #e1b800; border-radius: 6px; display: grid; gap: 12px; grid-template-columns: repeat(5,minmax(150px,1fr)); margin-bottom: 16px; padding: 16px; }
.unified-sales-filters label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.unified-filter-actions { display: flex; gap: 8px; }
.unified-sales-cards { display: grid; gap: 10px; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 16px; }
.unified-sales-cards > div,.unified-totals > div { background: #fff; border: 1px solid #ddd; border-left: 4px solid #e0b500; border-radius: 6px; padding: 13px 14px; }
.unified-sales-cards small,.unified-totals small { color: #666; display: block; font-size: 12px; margin-bottom: 6px; }
.unified-sales-cards strong,.unified-totals strong { font-size: 20px; }
.unified-sale-form { display: grid; gap: 14px; }
.unified-form-section { background: #fff; border: 1px solid #dfe2e5; border-radius: 8px; padding: 18px; }
.unified-form-section > header { align-items: center; border-bottom: 1px solid #eee; display: flex; gap: 10px; margin: -3px 0 16px; padding-bottom: 12px; }
.unified-form-section > header > span { align-items: center; background: #171717; border: 2px solid #dbb300; border-radius: 50%; color: #f3c817; display: flex; flex: 0 0 32px; font-weight: 800; height: 32px; justify-content: center; }
.unified-form-section h2 { font-size: 16px; margin: 0; }.unified-form-section header p { color: #777; font-size: 12px; margin: 3px 0 0; }
.unified-form-grid { display: grid; gap: 14px; }.unified-form-grid.cols-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }.unified-form-grid.cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }.unified-form-grid .span-2 { grid-column: span 2; }.unified-form-grid .span-full { grid-column: 1/-1; }
.unified-form-section .form-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; }.unified-check { align-items: center; display: flex !important; gap: 7px; font-weight: 500 !important; min-height: 34px; }
.unified-items-table-wrap { overflow-x: auto; overflow-y: visible; }.unified-items-table { min-width: 1100px; table-layout: fixed; }.unified-items-table th:nth-child(1){width:29%}.unified-items-table th:nth-child(2){width:18%}.unified-items-table th:nth-child(3){width:10%}.unified-items-table th:nth-child(4){width:14%}.unified-items-table th:nth-child(5){width:14%}.unified-items-table th:nth-child(6){width:11%}.unified-items-table th:nth-child(7){width:56px}.unified-items-table input,.unified-items-table select,.unified-items-table textarea { min-width: 0; width:100%; }
.unified-autocomplete { position:relative; }.unified-autocomplete-control { display:flex;min-width:0 }.unified-autocomplete-control input { border-radius:4px 0 0 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }.unified-autocomplete-control button { background:#f3f3f3;border:1px solid #bbb;border-left:0;border-radius:0 4px 4px 0;cursor:pointer;flex:0 0 30px;font-size:18px }.unified-autocomplete-results { background:#fff;border:1px solid #bbb;box-shadow:0 8px 22px rgba(0,0,0,.16);left:0;max-height:260px;min-width:360px;overflow:auto;position:absolute;right:0;top:100%;z-index:30 }.unified-autocomplete-results section>strong { background:#f3f3f3;color:#555;display:block;font-size:11px;padding:6px 9px;text-transform:uppercase }.unified-autocomplete-results button { background:#fff;border:0;border-bottom:1px solid #eee;cursor:pointer;display:block;overflow:hidden;padding:8px 10px;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100% }.unified-autocomplete-results button:hover { background:#fff6cb }.unified-item-type { background:#eef0f2;border-radius:12px;display:inline-block;font-size:11px;font-weight:700;padding:5px 8px }.unified-discount-control { display:grid;grid-template-columns:minmax(0,1fr) 54px }.unified-discount-control input { border-radius:4px 0 0 4px }.unified-discount-control select { border-radius:0 4px 4px 0 }.field-help { color:#777;display:block;font-size:11px;margin-top:4px }
.money-input-group,.percent-input-group,.money-static { align-items:stretch;display:flex;min-width:0 }.money-input-group>span,.percent-input-group>span,.money-static>span { align-items:center;background:#f0f1f2;border:1px solid #c8ccd0;color:#333;display:flex;flex:0 0 auto;font-size:12px;font-weight:700;padding:0 9px }.money-input-group>span { border-radius:4px 0 0 4px;border-right:0 }.money-input-group input { border-radius:0 4px 4px 0!important;min-width:0;text-align:right }.percent-input-group input { border-radius:4px 0 0 4px!important;text-align:right }.percent-input-group>span { border-left:0;border-radius:0 4px 4px 0 }.money-static>span { border-radius:4px 0 0 4px }.money-static>strong { align-items:center;background:#fff;border:1px solid #c8ccd0;border-radius:0 4px 4px 0;display:flex;justify-content:flex-end;min-height:32px;padding:5px 9px;width:100% }
.unified-status { border-radius:12px;display:inline-block;font-size:11px;font-weight:800;padding:5px 9px }.unified-status-open{background:#e5e7eb;color:#374151}.unified-status-progress{background:#fff0b8;color:#765600}.unified-status-done{background:#d8f3df;color:#176b2c}.unified-status-cancelled{background:#fde0e0;color:#a51d1d}
.unified-items-table-wrap { margin-bottom:14px; overflow-x:auto; overflow-y:hidden; padding:0; }
.unified-items-table { min-width:1120px; }
.unified-items-table th,.unified-items-table td { padding:10px 11px; vertical-align:middle; }
.unified-items-table td .form-control,.unified-items-table td .money-input-group,.unified-items-table td .money-static { height:36px; }
.unified-items-table td .form-control { min-height:36px; }
.unified-item-type-field { background:#eceff1!important; color:#30343a; cursor:default; }
.unified-add-item { margin:0; }
.unified-autocomplete-results { left:auto; max-height:250px; min-width:360px; overflow-y:auto; position:fixed; right:auto; top:auto; z-index:1000; }
.unified-autocomplete-empty { color:#777; padding:12px; text-align:center; }
.unified-catalog-cell { overflow:visible; }
@media (min-width:1300px){.unified-items-table{min-width:100%;}.unified-items-table-wrap{overflow-x:visible;}}
.unified-totals { display: grid; gap: 10px; grid-template-columns: repeat(6,minmax(0,1fr)); }.unified-totals .grand { background: #171717; color: #fff; }.unified-totals .grand small { color: #eee; }.unified-totals .grand .money-static>span { background:#f0f1f2;border-color:#c8ccd0;color:#111; }.unified-totals .grand .money-static>strong { background:#fff!important;border-color:#c8ccd0;color:#111!important;font-weight:800;-webkit-text-fill-color:#111; }
.unified-payment-options { display: flex; gap: 28px; margin-bottom: 15px; }.unified-payment-options label { font-weight: 700; }.unified-payment-sum { font-weight: 700; margin: 12px 0 0; }.unified-payment-sum.is-invalid { color: #b42318; }.unified-installment-alert { background: #fff1cc; border: 1px solid #e4bc4b; margin-bottom: 10px; padding: 9px; }
.unified-file-picker { background: #111c25; border-radius: 4px; color: white; cursor: pointer; display: inline-block; font-weight: 700; padding: 10px 14px; }.unified-file-picker input { display:none; }.unified-file-list { list-style:none; margin:12px 0 0; padding:0; }.unified-file-list li,.unified-existing-files > div { align-items:center; border-bottom:1px solid #eee; display:flex; gap:8px; justify-content:space-between; padding:8px; }.unified-file-list button { background:none;border:0;color:#b42318;cursor:pointer; }
.unified-notes-grid { display:grid;gap:14px;grid-template-columns:1fr 1fr; }.unified-detail-grid { display:grid;gap:14px;grid-template-columns:repeat(4,1fr);margin:0; }.unified-detail-grid div { border-bottom:1px solid #eee;padding:8px; }.unified-detail-grid dt { color:#666;font-size:12px; }.unified-detail-grid dd { font-weight:700;margin:4px 0 0; }.unified-detail-grid .span-full { grid-column:1/-1; }
@media(max-width:1200px){.unified-sales-filters{grid-template-columns:repeat(3,1fr)}.unified-form-grid.cols-4{grid-template-columns:repeat(2,1fr)}.unified-totals{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.unified-sales-filters,.unified-sales-cards,.unified-form-grid.cols-4,.unified-form-grid.cols-3,.unified-totals,.unified-notes-grid,.unified-detail-grid{grid-template-columns:1fr}.unified-form-grid .span-2{grid-column:span 1}.unified-sales-period-form{align-items:stretch;flex-direction:column}.unified-filter-actions{flex-wrap:wrap}}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    background: #ececec;
}

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

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: #fafafa;
    color: #3f3f3f;
    border-right: 1px solid #e0e0e0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cfcfcf #fafafa;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #fafafa;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cfcfcf;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #b5b5b5;
}

/* Fundo branco reservado para a identidade visual da EDK. */
.sidebar-brand {
    background: #fff;
    border-bottom: 2px solid #f5c400;
    padding: 16px 18px 20px;
}

.sidebar-brand-link {
    display: block;
    line-height: 0;
}

.sidebar-brand-logo {
    display: block;
    width: 100%;
    max-width: 210px;
    height: auto;
    margin: 0 auto;
}

/* Autenticação */
.auth-page {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(145deg, #f5f5f5 0%, #ffffff 48%, #fff8dd 100%);
    color: #252525;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
}

.auth-card {
    width: min(100%, 430px);
    background: #fff;
    border: 1px solid #e4e4e4;
    border-top: 4px solid #f5c400;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(31, 31, 31, 0.12);
    padding: 32px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
}

.auth-heading {
    text-align: center;
    margin-bottom: 24px;
}

.auth-heading h1 {
    margin: 0 0 8px;
    font-size: 1.55rem;
    color: #1f1f1f;
}

.auth-heading p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.auth-form,
.auth-field {
    display: grid;
    gap: 8px;
}

.auth-form {
    gap: 18px;
}

.auth-field label {
    font-weight: 700;
    color: #333;
}

.auth-field input {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
    font: inherit;
    color: #222;
    transition: border-color .2s, box-shadow .2s;
}

.auth-field input:focus {
    outline: none;
    border-color: #c79f00;
    box-shadow: 0 0 0 3px rgba(245, 196, 0, 0.2);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: .94rem;
}

.auth-options a,
.auth-back-link {
    color: #6f5900;
    font-weight: 700;
    text-decoration: none;
}

.auth-options a:hover,
.auth-back-link:hover {
    text-decoration: underline;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.auth-remember input {
    width: 17px;
    height: 17px;
    accent-color: #d1a700;
}

.auth-submit {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    background: #1f1f1f;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.auth-submit:hover {
    background: #343434;
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-back-link {
    text-align: center;
    font-size: .94rem;
}

.auth-alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    line-height: 1.45;
}

.auth-alert-error {
    background: #fff1f1;
    border: 1px solid #e8b4b4;
    color: #8b2020;
}

.auth-alert-success {
    background: #eef9f0;
    border: 1px solid #b8dcbc;
    color: #25622d;
}

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

.topbar-actions form {
    margin: 0;
}

.topbar-logout {
    border: 1px solid #d2d2d2;
    border-radius: 7px;
    background: #fff;
    color: #333;
    padding: 8px 13px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.topbar-logout:hover {
    border-color: #b28f00;
    background: #fff8dd;
}

@media (max-width: 520px) {
    .auth-shell {
        padding: 18px 12px;
    }

    .auth-card {
        padding: 24px 20px;
        border-radius: 10px;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}

.user-permissions-card {
    margin-top: 20px;
}

.user-permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.user-permission-module {
    min-width: 0;
    margin: 0;
    border: 1px solid #dedede;
    border-radius: 9px;
    padding: 14px;
    background: #fff;
}

.user-permission-module legend {
    padding: 0 6px;
    font-weight: 800;
    color: #292929;
}

.user-permission-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.user-permission-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .92rem;
    cursor: pointer;
}

.user-permission-check input {
    width: 17px;
    height: 17px;
    accent-color: #c79f00;
}

.user-permissions-admin-note {
    margin-top: 16px;
    border: 1px solid #e5c75a;
    border-radius: 8px;
    background: #fff8dd;
    color: #5f4d00;
    padding: 13px 15px;
    font-weight: 700;
}

.access-denied-page {
    min-height: calc(100vh - 150px);
    display: grid;
    place-items: center;
    padding: 24px;
}

.access-denied-card {
    width: min(100%, 560px);
    text-align: center;
    border: 1px solid #e2e2e2;
    border-top: 4px solid #f5c400;
    border-radius: 12px;
    background: #fff;
    padding: 36px 28px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
}

.access-denied-code {
    font-size: 3rem;
    line-height: 1;
    font-weight: 900;
    color: #c49d00;
}

.access-denied-card h1 {
    margin: 12px 0 8px;
}

.access-denied-card p {
    margin: 0 0 24px;
    color: #666;
}

@media (max-width: 560px) {
    .user-permissions-grid,
    .user-permission-actions {
        grid-template-columns: 1fr;
    }
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0 0 24px;
}

/* Separadores amarelos apenas no primeiro nível. */
.sidebar-nav > li + li {
    border-top: 1px solid #f5c400;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    color: #4a4a4a;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
}

.sidebar-link .icon {
    width: 20px;
    text-align: center;
    opacity: 0.75;
}

.sidebar-link.active {
    background: #fff8dd;
    box-shadow: inset 3px 0 0 #f5c400;
    color: #1f1f1f;
    font-weight: 700;
}

.sidebar-link.disabled {
    color: #a6a6a6;
    cursor: default;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: #1f1f1f;
    color: #fff;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    gap: 20px;
}

.topbar-bell {
    position: relative;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    font-size: 27px;
    line-height: 1;
    border-radius: 50%;
    user-select: none;
}

.topbar-ai-button { align-items: center; background: #f0c329; border: 1px solid #f0c329; border-radius: 9px; color: #171717; cursor: pointer; display: inline-flex; gap: 7px; height: 38px; padding: 0 11px; }
.topbar-ai-button > span { align-items: center; background: #171717; border-radius: 50%; color: #f0c329; display: flex; font-size: .65rem; font-weight: 900; height: 25px; justify-content: center; width: 25px; }
.topbar-ai-button > strong { font-size: .75rem; letter-spacing: .04em; white-space: nowrap; }
.topbar-ai-button:hover, .topbar-ai-button[aria-expanded="true"] { background: #fff; border-color: #fff; }

.topbar-bell-icon {
    display: inline-block;
    transform-origin: 50% 15%;
}

.topbar-bell.has-unread .topbar-bell-icon {
    animation: edkMailBellAlert 1.5s ease-in-out infinite;
}

.topbar-mail-alert {
    position: absolute;
    right: 48px;
    top: 50%;
    width: max-content;
    transform: translateY(-50%);
    padding: 7px 10px;
    border: 1px solid #e1b900;
    border-radius: 7px;
    background: #fff8d7;
    color: #191919;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .2);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .3px;
    pointer-events: none;
}

@keyframes edkMailBellAlert {
    0%, 100% {
        filter: hue-rotate(0deg) saturate(1.15) drop-shadow(0 0 2px rgba(245, 196, 0, .65));
        transform: rotate(0deg) scale(1);
    }
    25% {
        filter: hue-rotate(0deg) saturate(1.35) drop-shadow(0 0 7px rgba(245, 196, 0, .9));
        transform: rotate(-8deg) scale(1.08);
    }
    50% {
        filter: hue-rotate(72deg) saturate(1.45) drop-shadow(0 0 7px rgba(54, 179, 73, .9));
        transform: rotate(0deg) scale(1.1);
    }
    75% {
        filter: hue-rotate(72deg) saturate(1.35) drop-shadow(0 0 5px rgba(54, 179, 73, .8));
        transform: rotate(8deg) scale(1.05);
    }
}

.topbar-bell .badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #f5c400;
    color: #1a1a1a;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
    .topbar-bell.has-unread .topbar-bell-icon {
        animation: none;
        filter: drop-shadow(0 0 5px rgba(245, 196, 0, .8));
    }
}

@media (max-width: 760px) {
    .topbar-mail-alert {
        display: none;
    }
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.content {
    flex: 1;
    padding: 28px 32px 40px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #1a1a1a;
}

.steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 28px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.step.active .step-circle {
    background: #f5c400;
    color: #1a1a1a;
}

.step.inactive .step-circle {
    background: #d8d8d8;
    color: #888;
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.step.inactive .step-label {
    color: #888;
    font-weight: 500;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #ccc;
    margin: 0 8px;
    margin-bottom: 28px;
    max-width: 120px;
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 28px 32px 32px;
    max-width: 900px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0 0 24px;
    color: #1a1a1a;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.form-control {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #f5c400;
    box-shadow: 0 0 0 2px rgba(245, 196, 0, 0.25);
}

.form-control.is-invalid {
    border-color: #c0392b;
}

.form-help {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.form-error {
    margin-top: 6px;
    font-size: 12px;
    color: #c0392b;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
}

.btn-secondary {
    background: #fff;
    border-color: #bbb;
    color: #333;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.btn-primary {
    background: #f5c400;
    border-color: #f5c400;
    color: #1a1a1a;
}

.btn-primary:hover {
    background: #e0b200;
    border-color: #e0b200;
}

.btn-outline-dark {
    background: #fff;
    border-color: #333;
    color: #1a1a1a;
}

.btn-outline-dark:hover {
    background: #f5f5f5;
}

.btn-danger {
    background: #fff;
    border-color: #c0392b;
    color: #c0392b;
}

.btn-danger:hover {
    background: #c0392b;
    color: #fff;
}

.delete-form {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.alert {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    max-width: 900px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #b7dfc3;
    color: #155724;
}

.alert-info {
    background: #e8f4fd;
    border: 1px solid #b8daf5;
    color: #0c5460;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header-row .page-title {
    margin-bottom: 0;
}

.table-wrap {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    max-width: 1000px;
}

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

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f7f7f7;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #555;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.empty-state {
    padding: 40px 18px;
    text-align: center;
    color: #666;
}

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

.machines-page-subtitle {
    margin: 6px 0 0;
}

.machines-table-wrap {
    border-color: #d7d7d7;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 1280px;
}

.machines-table th,
.machines-table td {
    padding: 18px;
    vertical-align: middle;
}

.machines-table th {
    border-bottom: 2px solid #f5c400;
    color: #333;
}

.machines-code {
    background: #f5c400;
    border-radius: 4px;
    color: #1a1a1a;
    display: inline-block;
    font-weight: 700;
    padding: 6px 9px;
}

.machines-name {
    font-weight: 700;
    line-height: 1.4;
}

.machines-date {
    color: #555;
    white-space: nowrap;
}

.machines-actions-heading {
    min-width: 410px;
}

.machines-actions {
    align-items: center;
    gap: 8px;
}

.machines-actions .btn {
    min-height: 40px;
    padding: 9px 16px;
}

.machines-open-btn {
    background: #1f1f1f;
    border-color: #1f1f1f;
    color: #fff;
}

.machines-open-btn:hover {
    background: #353535;
    border-color: #353535;
}

.machines-technical-btn {
    background: #f5c400;
    border-color: #f5c400;
    color: #1a1a1a;
}

.machines-technical-btn:hover {
    background: #e0b200;
    border-color: #e0b200;
}

.production-orders-subtitle {
    margin: 6px 0 0 34px;
}

.production-orders-toolbar {
    align-items: stretch;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 14px;
}

.production-orders-toolbar .product-list-toolbar-right {
    flex: 1 1 760px;
}

.production-orders-toolbar .product-advanced-search-form-inline {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    width: 100%;
}

.production-orders-toolbar .form-control,
.production-orders-toolbar .btn {
    min-height: 42px;
}

.production-order-new-btn,
.production-order-open-btn {
    background: #1f1f1f;
    border-color: #1f1f1f;
    color: #fff;
}

.production-order-new-btn:hover,
.production-order-open-btn:hover {
    background: #353535;
    border-color: #353535;
}

.production-orders-card {
    border-color: #d7d7d7;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.production-orders-card .product-list-table-wrap {
    overflow-x: hidden;
}

.production-orders-card .product-list-table {
    min-width: 0;
    table-layout: auto;
    width: 100%;
}

.production-orders-card .data-table th {
    border-bottom: 2px solid #f5c400;
    color: #333;
}

.production-orders-card .data-table th,
.production-orders-card .data-table td {
    padding-left: 11px;
    padding-right: 11px;
}

.production-orders-card .data-table td {
    padding-bottom: 17px;
    padding-top: 17px;
}

.production-order-code {
    background: #f5c400;
    border-radius: 4px;
    color: #1a1a1a;
    display: inline-block;
    font-weight: 800;
    padding: 6px 9px;
}

.production-order-machine {
    font-weight: 700;
    line-height: 1.4;
}

.production-order-status {
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 9px;
    white-space: nowrap;
}

.production-order-actions {
    align-items: center;
    min-width: 185px;
    white-space: normal;
}

.production-order-actions .btn {
    min-height: 34px;
}

.op-tab-nav {
    align-items: flex-end;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-top: 8px;
}

.op-tab-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.op-tab-group-label {
    color: #8a8a8a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.op-tab-group.is-current .op-tab-group-label {
    color: #1a1a1a;
}

.op-tab-nav .product-tabs {
    border-bottom: none;
    margin: 0;
}

.op-tab-nav .product-tab {
    font-size: 12.5px;
    letter-spacing: 0.01em;
    margin-right: 2px;
    padding: 9px 13px;
}

.op-tab-nav .product-tab.active {
    background: #fff;
    border-bottom-color: #fff;
    box-shadow: inset 0 -2px 0 #f5c400;
    color: #1a1a1a;
}

.op-admin-next {
    background: #fffdf4;
    border: 1px solid #ead889;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 16px 18px;
}

.op-admin-next .panel-title {
    margin-top: 0;
}

.op-admin-next-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.op-admin-status {
    border-top: 1px solid #ead889;
    margin-top: 16px;
    padding-top: 14px;
}

.op-material-extra {
    margin-top: 1.5rem;
}

.op-material-extra > summary {
    cursor: pointer;
    display: inline-flex;
    list-style: none;
    width: fit-content;
}

.op-material-extra > summary::-webkit-details-marker {
    display: none;
}

@media (max-width: 1250px) {
    .production-orders-toolbar .product-advanced-search-form-inline {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }
}

@media (max-width: 760px) {
    .production-orders-subtitle {
        margin-left: 0;
    }

    .production-orders-toolbar .product-advanced-search-form-inline {
        grid-template-columns: 1fr;
    }

    .production-orders-toolbar .product-list-toolbar-left,
    .production-order-new-btn {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .machines-table-wrap {
        overflow-x: auto;
    }

    .machines-table {
        min-width: 900px;
    }

    .machines-actions-heading {
        min-width: 380px;
    }
}

.structure-info {
    display: grid;
    gap: 16px;
    max-width: 520px;
}

.structure-info dt {
    font-weight: 700;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.structure-info dd {
    margin: 4px 0 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.structure-placeholder {
    margin-top: 28px;
    padding: 20px;
    background: #f7f7f7;
    border: 1px dashed #ccc;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
}

.card-wide {
    max-width: 100%;
}

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

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 28px 0 16px;
}

.subsection-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.breadcrumb-text {
    margin: 0 0 20px;
    color: #555;
    line-height: 1.6;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f1aeb5;
    color: #842029;
}

.custeio-error-list {
    margin: 8px 0 0;
    padding-left: 1.25rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    max-width: 100%;
}

.toolbar-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.toolbar-search {
    min-width: 260px;
    max-width: 320px;
}

.toolbar-select {
    max-width: 180px;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.status-liberado {
    background: #d4edda;
    color: #155724;
}

.status-rascunho {
    background: #fff3cd;
    color: #856404;
}

.status-obsoleto {
    background: #e2e3e5;
    color: #41464b;
}

.data-table-compact th,
.data-table-compact td {
    padding: 10px 12px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .product-list-page .table-wrap-full {
        overflow-x: auto;
    }

    .product-list-page .data-table-compact {
        min-width: 720px;
    }
}

.table-actions-col {
    min-width: 180px;
}

.action-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-link {
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
}

.action-link:hover {
    color: #b38f00;
}

.inline-form {
    display: inline;
    margin: 0;
}

.action-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.viewer-body {
    margin: 0;
    background: #1f1f1f;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    background: #1f1f1f;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.viewer-actions {
    display: flex;
    gap: 8px;
}

.pdf-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #525659;
}

.panel-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 24px 28px 28px;
    margin-bottom: 24px;
    max-width: 100%;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.panel-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.panel-summary,
.panel-help {
    margin: 0 0 16px;
    color: #555;
    font-size: 14px;
}

.panel-help {
    font-size: 13px;
    color: #666;
}

.empty-state-inline {
    padding: 20px;
    background: #f7f7f7;
    border-radius: 4px;
    color: #666;
    text-align: center;
}

.production-form {
    max-width: 720px;
}

.progress-bar-wrap {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin: 8px 0 20px;
    max-width: 720px;
}

.progress-bar-fill {
    height: 100%;
    background: #f5c400;
    transition: width 0.2s ease;
}

.form-textarea {
    max-width: 100%;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.form-actions-left {
    justify-content: flex-start;
}

.breadcrumb-text a {
    color: #1a1a1a;
    text-decoration: underline;
}

.production-summary {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 18px 24px;
    margin-bottom: 24px;
    max-width: 100%;
}

.production-summary-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.production-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.production-nao-iniciado {
    background: #e2e3e5;
    color: #41464b;
}

.production-em-andamento {
    background: #fff3cd;
    color: #856404;
}

.production-pausado {
    background: #f8d7da;
    color: #842029;
}

.production-concluido {
    background: #d4edda;
    color: #155724;
}

.production-percent-label {
    font-size: 15px;
    color: #333;
}

.progress-bar-summary {
    margin: 0;
    max-width: 100%;
}

.progress-bar-compact {
    height: 8px;
    margin: 0;
    min-width: 80px;
    flex: 1;
}

.progress-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 120px;
}

.progress-cell-label {
    font-weight: 700;
    font-size: 13px;
    min-width: 36px;
}

body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}

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

.modal-dialog {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 480px;
    padding: 28px 32px 24px;
}

.modal-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.modal-message {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.5;
    color: #444;
}

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

.modal-dialog-alert {
    border-top: 4px solid #f5c400;
}

.modal-dialog-alert.is-error {
    border-top: none;
    max-width: 420px;
    padding-top: 28px;
    text-align: center;
}

.modal-dialog-alert.is-error .modal-title {
    display: none;
}

.modal-dialog-alert.is-error .modal-message {
    font-size: 16px;
    margin-bottom: 28px;
}

.modal-dialog-alert.is-error .modal-actions {
    justify-content: flex-end;
}

.modal-dialog-alert.is-success {
    border-top: none;
    max-width: 420px;
    padding-top: 28px;
    text-align: center;
}

.modal-dialog-alert.is-success .modal-title {
    display: none;
}

.modal-dialog-alert.is-success .modal-message {
    font-size: 16px;
    margin-bottom: 28px;
}

.modal-dialog-alert.is-success .modal-actions {
    justify-content: flex-end;
}

.modal-alert-icon.is-success {
    align-items: center;
    border: 4px solid #27ae60;
    border-radius: 50%;
    color: #27ae60;
    display: flex;
    font-size: 38px;
    font-weight: 700;
    height: 72px;
    justify-content: center;
    line-height: 1;
    margin: 0 auto 20px;
    width: 72px;
}

.modal-dialog-confirm {
    border-top: none;
    max-width: 460px;
    padding-top: 28px;
    text-align: center;
}

.modal-dialog-confirm .modal-title {
    display: none;
}

.modal-dialog-confirm .modal-message {
    font-size: 16px;
    margin-bottom: 28px;
}

.modal-dialog-confirm .modal-actions {
    justify-content: flex-end;
}

.modal-alert-icon.is-confirm {
    align-items: center;
    border: 4px solid #e74c3c;
    border-radius: 50%;
    color: #e74c3c;
    display: flex;
    font-size: 38px;
    font-weight: 700;
    height: 72px;
    justify-content: center;
    line-height: 1;
    margin: 0 auto 20px;
    width: 72px;
}

.modal-alert-icon.is-error {
    align-items: center;
    border: 4px solid #e74c3c;
    border-radius: 50%;
    color: #e74c3c;
    display: flex;
    font-size: 38px;
    font-weight: 700;
    height: 72px;
    justify-content: center;
    line-height: 1;
    margin: 0 auto 20px;
    width: 72px;
}

.modal-dialog-alert .modal-title::before {
    content: '⚠ ';
}

.stock-item-preview {
    background: #f7f7f7;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.stock-item-preview p {
    margin: 0 0 6px;
    color: #444;
}

.stock-item-preview p:last-child {
    margin-bottom: 0;
}

.product-form-page {
    max-width: 100%;
}

.product-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.product-form-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
    padding-top: 8px;
}

.product-breadcrumb a {
    color: #1a1a1a;
    text-decoration: underline;
}

.product-breadcrumb a:hover {
    color: #b38f00;
}

.product-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 0;
}

.product-tab {
    appearance: none;
    background: #f3f3f3;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: #555;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    margin-right: 4px;
    padding: 10px 18px;
    text-decoration: none;
}

.product-tab:hover:not(.disabled) {
    background: #ececec;
}

.product-tab.active {
    background: #fff;
    border-color: #ddd;
    color: #1a1a1a;
    font-weight: 700;
    margin-bottom: -1px;
    padding-bottom: 11px;
    position: relative;
    z-index: 1;
}

.product-tab.disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.product-form-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 4px 4px 4px;
    padding: 24px 28px 20px;
}

.product-form-card + .product-form-card {
    margin-top: 16px;
}

.product-form-grid {
    display: grid;
    gap: 18px 20px;
    margin-bottom: 18px;
}

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

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

.employee-areas-grid {
    display: grid;
    gap: 4px 18px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.employee-areas-grid .unified-check {
    min-height: 28px;
}

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

.product-form-card .form-control,
.product-form-card .edk-search-select-trigger {
    padding: 5px 8px;
    font-size: 13px;
    min-height: 30px;
    max-width: 100%;
}

.product-identification-row {
    display: grid;
    grid-template-columns: calc(5ch + 1.15rem) minmax(0, 1fr);
    align-items: start;
}

.product-code-field {
    width: calc(5ch + 1.15rem);
    max-width: calc(5ch + 1.15rem);
}

.product-form-card .form-control-code {
    width: calc(5ch + 1.15rem);
    max-width: calc(5ch + 1.15rem);
    min-width: calc(5ch + 1.15rem);
    box-sizing: border-box;
}

.product-description-field {
    max-width: 560px;
}

.product-identification-media {
    display: grid;
    grid-template-columns: minmax(0, 560px) 200px;
    gap: 1.25rem 1.5rem;
    align-items: start;
    margin-bottom: 18px;
}

.product-image-field {
    width: 200px;
}

.product-image-preview {
    align-items: center;
    background: #f7f7f7;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    display: flex;
    height: 200px;
    justify-content: center;
    overflow: hidden;
    width: 200px;
}

.product-image-preview img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-image-placeholder {
    color: #999;
    font-size: 13px;
    padding: 12px;
    text-align: center;
}

.product-image-input {
    margin-top: 8px;
}

.product-image-remove {
    align-items: center;
    color: #555;
    cursor: pointer;
    display: flex;
    font-size: 13px;
    font-weight: 400;
    gap: 6px;
    margin-top: 8px;
}

.product-show-identification {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) 220px;
}

.product-show-image img {
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    max-height: 220px;
    object-fit: contain;
    width: 220px;
}

.product-list-thumb {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    height: 32px;
    margin-right: 8px;
    object-fit: cover;
    vertical-align: middle;
    width: 32px;
}

.product-form-card .edk-rich-description-editor {
    min-height: 280px;
    max-height: 480px;
    height: auto;
    overflow: auto;
    line-height: 1.45;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.edk-rich-description {
    max-width: 560px;
}

.edk-rich-input {
    display: none !important;
}

.edk-rich-description-toolbar {
    display: flex;
    gap: 4px;
    align-items: center;
    background: #f4f4f4;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 4px 6px;
}

.edk-rich-description-toolbar button {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    color: #222;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    height: 26px;
    line-height: 1;
    min-width: 26px;
    padding: 0 6px;
}

.edk-rich-description-toolbar button:hover {
    background: #f5c400;
    border-color: #e0b400;
}

.edk-rich-description-editor p,
.rich-description-view p {
    margin: 0 0 8px;
}

.edk-rich-description-editor ul,
.edk-rich-description-editor ol,
.rich-description-view ul,
.rich-description-view ol {
    margin: 0 0 8px;
    padding-left: 1.4em;
}

.edk-rich-description-editor li,
.rich-description-view li {
    margin: 0 0 2px;
}

.edk-rich-description-editor h1,
.edk-rich-description-editor h2,
.edk-rich-description-editor h3,
.edk-rich-description-editor h4,
.rich-description-view h1,
.rich-description-view h2,
.rich-description-view h3,
.rich-description-view h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
}

.edk-rich-description-editor h1,
.rich-description-view h1 {
    font-size: 16px;
}

.edk-rich-description-editor b,
.edk-rich-description-editor strong,
.rich-description-view b,
.rich-description-view strong {
    font-weight: 700;
}

.edk-rich-description-editor:empty:before,
.edk-rich-description-editor[data-placeholder]:empty:before {
    color: #999;
    content: attr(data-placeholder);
    pointer-events: none;
}

.edk-rich-description-editor table {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
}

.edk-rich-description-editor td,
.edk-rich-description-editor th,
.rich-description-view td,
.rich-description-view th {
    border: 1px solid #ccc;
    padding: 2px 6px;
}

.edk-rich-description.is-invalid .edk-rich-description-editor {
    border-color: #c0392b;
}

.rich-description-view {
    line-height: 1.4;
}

.rich-description-view table {
    border-collapse: collapse;
    margin: 6px 0;
    max-width: 100%;
}

.product-form-card .form-group {
    margin-bottom: 0;
}

.product-form-card .form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 6px;
}

.field-info {
    align-items: center;
    background: #e8e8e8;
    border-radius: 50%;
    color: #666;
    cursor: help;
    display: inline-flex;
    font-size: 10px;
    font-style: italic;
    font-weight: 700;
    height: 16px;
    justify-content: center;
    width: 16px;
}

.import-errors {
    margin: 0;
    padding-left: 20px;
    color: #842029;
}

.import-errors li + li {
    margin-top: 6px;
}

.import-form {
    max-width: 720px;
}

.form-control-full {
    max-width: 100%;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group .form-control {
    flex: 1;
    min-width: 0;
}

.btn-input-addon {
    flex-shrink: 0;
    padding-left: 14px;
    padding-right: 14px;
    text-transform: none;
}

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

.product-group-select.is-invalid + .form-error,
.form-group:has(.product-group-select.is-invalid) #group-search {
    border-color: #c0392b;
}

.product-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 8px;
    padding: 18px 20px 20px;
}

.product-section-header {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.product-section-icon {
    color: #666;
    font-size: 18px;
    line-height: 1;
}

.product-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.product-section-alert {
    background: #eef6fb;
    border: 1px solid #cfe8f5;
    border-radius: 4px;
    color: #35586a;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.product-section-alert-muted {
    background: #f7f7f7;
    border-color: #e3e3e3;
    color: #555;
}

.unit-conversion-row {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(220px, 320px);
}

.unit-conversion-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-tab-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.product-tab-nav .btn {
    text-transform: none;
}

.product-form-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-success {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
    border-color: #218838;
}

.btn-cancel {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-cancel:hover {
    background: #c82333;
    border-color: #c82333;
}

.btn-icon {
    font-size: 14px;
    margin-right: 6px;
}

.product-form-alert {
    max-width: 100%;
}

@media (max-width: 1100px) {
    .product-form-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 700px) {
    .product-form-grid-4,
    .product-form-grid-2 {
        grid-template-columns: 1fr;
    }

    .product-identification-media,
    .product-show-identification {
        grid-template-columns: 1fr;
    }

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

    .product-form-footer {
        flex-direction: column;
        align-items: stretch;
    }
}

.product-list-page {
    max-width: 100%;
}

.product-list-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.product-list-title {
    align-items: center;
    display: flex;
    gap: 10px;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.product-list-icon {
    font-size: 24px;
}

.product-list-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.product-list-toolbar-left,
.product-list-toolbar-right {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.payable-summary-cards {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 16px;
    width: 100%;
}

.payable-summary-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: inherit;
    display: block;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.payable-summary-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.payable-summary-card.is-active {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
}

.payable-summary-card-head {
    align-items: center;
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: space-between;
    padding: 8px 10px;
}

.payable-summary-card-link {
    font-size: 12px;
    line-height: 1;
    opacity: 0.9;
}

.payable-summary-card-body {
    background: #fff;
    padding: 14px 12px 16px;
}

.payable-summary-card-body strong {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}

.payable-summary-overdue .payable-summary-card-head {
    background: #e74c3c;
}

.payable-summary-overdue .payable-summary-card-body strong {
    color: #e74c3c;
}

.payable-summary-today .payable-summary-card-head {
    background: #f0ad4e;
}

.payable-summary-today .payable-summary-card-body strong {
    color: #c47d00;
}

.payable-summary-upcoming .payable-summary-card-head {
    background: #777;
}

.payable-summary-upcoming .payable-summary-card-body strong {
    color: #666;
}

.payable-summary-paid .payable-summary-card-head {
    background: #5cb85c;
}

.payable-summary-paid .payable-summary-card-body strong {
    color: #3d8b3d;
}

.payable-summary-total .payable-summary-card-head {
    background: #2c3e50;
}

.payable-summary-total .payable-summary-card-body strong {
    color: #111;
}

.payable-summary-projected {
    background: #f8f4ff;
    border-color: #d8c9f5;
}

.payable-summary-projected .payable-summary-card-head {
    background: #ede4fb;
    color: #5b3f91;
}

.payable-summary-projected .payable-summary-card-body strong {
    color: #5b3f91;
}

.fixed-account-summary-cards {
    margin-bottom: 16px;
}

.fixed-account-section-card {
    margin-bottom: 16px;
}

.fixed-account-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px;
    padding: 16px 16px 0;
}

.fixed-account-total-row td {
    background: #f7f7f7;
    border-top: 2px solid #ddd;
    font-weight: 700;
}

.product-search-form {
    align-items: stretch;
    display: flex;
}

.product-search-input {
    border-radius: 4px 0 0 4px;
    max-width: 260px;
    min-width: 220px;
}

.btn-search {
    border-radius: 0 4px 4px 0;
    min-width: 44px;
    padding-left: 12px;
    padding-right: 12px;
}

.btn-add {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
    text-transform: none;
}

.btn-add:hover {
    background: #218838;
    border-color: #218838;
}

.btn-fixed,
a.btn.btn-fixed {
    background: #f5c400;
    border-color: #f5c400;
    color: #1a1a1a;
    font-weight: 700;
    text-transform: none;
}

.btn-fixed:hover,
a.btn.btn-fixed:hover {
    background: #e0b200;
    border-color: #e0b200;
    color: #1a1a1a;
}

.btn-dark {
    background: #1f1f1f;
    border-color: #1f1f1f;
    color: #fff;
    text-transform: none;
}

.btn-dark:hover {
    background: #333;
    border-color: #333;
}

.btn-icon-toggle {
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
    min-width: 42px;
    padding: 10px 12px;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    min-width: 190px;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 120;
}

.dropdown-menu.dropup {
    bottom: calc(100% + 4px);
    top: auto;
}

.dropdown-menu[hidden] {
    display: none;
}

.dropdown-menu a,
.dropdown-action,
.dropdown-caption {
    background: none;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    display: block;
    font-family: inherit;
    font-size: 13px;
    padding: 10px 14px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.dropdown-menu a:hover,
.dropdown-action:hover {
    background: #f5f5f5;
}

.dropdown-action-danger {
    color: #842029;
}

.dropdown-caption {
    color: #666;
    font-size: 12px;
}

.dropdown-menu-right {
    left: auto;
    right: 0;
}

.product-advanced-search {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 14px;
    padding: 16px 18px;
}

.product-advanced-search-form {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.product-advanced-search-form .form-group {
    margin-bottom: 0;
}

.product-list-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: visible;
}

.product-list-table-wrap {
    border: none;
    border-radius: 0;
    overflow: visible;
}

.product-list-table-wrap.table-wrap {
    overflow: visible;
}

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

.product-list-table .col-check {
    width: 42px;
}

.product-list-table .col-actions {
    width: 170px;
}

.product-name-cell {
    font-weight: 600;
}

.product-name-cell .product-list-thumb {
    flex-shrink: 0;
}

.row-action-buttons {
    display: flex;
    gap: 4px;
}

.row-action-btn {
    align-items: center;
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    height: 30px;
    justify-content: center;
    text-decoration: none;
    width: 30px;
}

.row-action-view {
    background: #17a2b8;
}

.row-action-edit {
    background: #f5c400;
    color: #1a1a1a;
}

.row-action-delete {
    background: #dc3545;
}

.row-action-undo {
    background: #6c757d;
}

.row-action-more {
    background: #28a745;
}

.row-action-menu {
    display: inline-flex;
    position: relative;
}

.row-action-menu.is-open {
    z-index: 110;
}

.product-list-pagination {
    border-top: 1px solid #e8e8e8;
    padding: 14px 18px;
    position: relative;
    z-index: 1;
}

.edk-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: space-between;
}

.edk-pagination-summary {
    color: #666;
    font-size: 13px;
    margin: 0;
}

.edk-pagination-summary strong {
    color: #1a1a1a;
    font-weight: 700;
}

.edk-pagination-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.edk-page-btn,
.edk-page-number,
.edk-page-ellipsis {
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #1a1a1a;
    display: inline-flex;
    font-size: 13px;
    justify-content: center;
    line-height: 1;
    min-height: 34px;
    min-width: 34px;
    padding: 6px 12px;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.edk-page-btn-nav:hover,
.edk-page-number:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.edk-page-btn-disabled,
.edk-page-ellipsis {
    background: #fafafa;
    color: #999;
    cursor: default;
}

.edk-page-numbers {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.edk-page-number-active {
    background: #f5c400;
    border-color: #e0b000;
    color: #1a1a1a;
    font-weight: 700;
}

@media (max-width: 640px) {
    .edk-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .edk-pagination-nav {
        justify-content: center;
    }

    .edk-page-btn-nav {
        flex: 1;
    }
}

@media (max-width: 900px) {
    .product-list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .product-list-toolbar-left,
    .product-list-toolbar-right,
    .product-search-form {
        width: 100%;
    }

    .product-search-input {
        flex: 1;
        max-width: none;
    }
}

.sidebar-group {
    position: relative;
}

.sidebar-toggle {
    appearance: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
}

.sidebar-caret {
    margin-left: auto;
    font-size: 10px;
    line-height: 1;
    color: #a8a8a8;
    transition: transform 0.15s ease;
}

[aria-expanded="true"] > .sidebar-caret {
    transform: rotate(180deg);
}

.sidebar-group.is-open > .sidebar-toggle:not(.active),
.sidebar-group > .sidebar-toggle:hover:not(.active) {
    background: #f1f1f1;
    color: #1f1f1f;
}

.sidebar-link:hover:not(.active):not(.disabled) {
    background: #f1f1f1;
    color: #1f1f1f;
}

/* 2º nível: fundo levemente mais escuro e recuo, sem separador amarelo. */
.sidebar-submenu {
    background: #f1f1f1;
    box-shadow: inset 0 1px 0 #e2e2e2;
    list-style: none;
    margin: 0;
    padding: 4px 0 6px;
}

.sidebar-submenu > li + li {
    border-top: 1px solid #e7e7e7;
}

.sidebar-submenu[hidden] {
    display: none;
}

.sidebar-sublink {
    align-items: center;
    color: #555;
    display: flex;
    font-size: 13px;
    gap: 8px;
    line-height: 1.3;
    padding: 10px 14px 10px 38px;
    text-decoration: none;
}

.sidebar-sublink-icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
    width: 16px;
}

.sidebar-sublink:hover {
    background: #e6e6e6;
    color: #1f1f1f;
}

.sidebar-sublink.active {
    background: #fdf3cd;
    box-shadow: inset 3px 0 0 #f5c400;
    color: #1f1f1f;
    font-weight: 700;
}

.sidebar-subgroup {
    position: relative;
}

.sidebar-subgroup.is-open > .sidebar-subtoggle:not(.active) {
    background: #e9e9e9;
    color: #1f1f1f;
    font-weight: 600;
}

.sidebar-subtoggle {
    appearance: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
}

.sidebar-subcaret {
    margin-left: auto;
    font-size: 10px;
    color: #a8a8a8;
}

/* 3º nível: mais recuado, com um traço amarelo discreto em vez de separadores. */
.sidebar-subsubmenu {
    background: #e9e9e9;
    border-left: 2px solid #f5c400;
    list-style: none;
    margin: 2px 0 6px 38px;
    padding: 2px 0;
}

/* Cadastros usa .sidebar-sublink no 3º nível; sem isto a indentação soma duas vezes. */
.sidebar-subsubmenu .sidebar-sublink {
    font-size: 12px;
    padding-left: 12px;
}

.sidebar-subsubmenu[hidden] {
    display: none;
}

.sidebar-subsublink {
    color: #5f5f5f;
    display: block;
    font-size: 12px;
    line-height: 1.35;
    padding: 8px 12px 8px 12px;
    text-decoration: none;
}

.sidebar-subsublink:hover {
    background: #dedede;
    color: #1f1f1f;
}

.sidebar-subsublink.active {
    background: #fdf3cd;
    box-shadow: inset 3px 0 0 #f5c400;
    color: #1f1f1f;
    font-weight: 700;
}

.sidebar-sublink.disabled,
.sidebar-subsublink.disabled {
    color: #a6a6a6;
    cursor: default;
}

.sidebar-sublink.disabled:hover,
.sidebar-subsublink.disabled:hover {
    background: none;
    color: #a6a6a6;
}

.chart-tree-card {
    padding: 16px;
}

.chart-tree-node {
    margin-bottom: 6px;
}

.chart-tree-row {
    align-items: center;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
}

.chart-tree-row-synthetic {
    background: #f3f3f3;
}

.chart-tree-row-analytic {
    background: #fff;
}

.chart-tree-toggle,
.chart-tree-toggle-spacer,
.chart-tree-leaf-marker {
    align-items: center;
    display: inline-flex;
    flex: 0 0 24px;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.chart-tree-toggle {
    background: #1a1a1a;
    border: 0;
    border-radius: 4px;
    color: #f5c400;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    padding: 0;
}

.chart-tree-toggle:hover {
    background: #333;
}

.chart-tree-toggle:focus-visible {
    outline: 2px solid #f5c400;
    outline-offset: 2px;
}

.chart-tree-leaf-marker {
    color: #888;
    font-size: 18px;
    line-height: 1;
}

.chart-tree-children {
    border-left: 2px solid #e5e5e5;
    margin-left: 11px;
    margin-top: 4px;
    padding-left: 14px;
}

.chart-tree-name {
    text-transform: uppercase;
}

.chart-tree-code {
    background: #1a1a1a;
    border-radius: 4px;
    color: #f5c400;
    font-weight: 700;
    padding: 2px 8px;
}

.chart-tree-meta {
    color: #666;
    font-size: 13px;
}

.chart-tree-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
}

.chart-tree-table {
    margin: 0;
}

.chart-tree-empty {
    color: #666;
    margin: 0;
    padding: 12px 16px 16px;
}

.btn-sm {
    font-size: 12px;
    padding: 4px 10px;
}

.chart-account-search-form {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 260px;
}

.payable-chart-select-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
    .payable-chart-select-grid {
        grid-template-columns: 1fr;
    }
}

.form-help {
    color: #666;
    font-size: 13px;
    margin: 8px 0 0;
}

.chart-account-table .chart-account-parent-row td:nth-child(2) {
    font-weight: 700;
    text-transform: uppercase;
}

.adjustment-list-page,
.adjustment-form-page,
.adjustment-show-page {
    max-width: 100%;
}

.adjustment-list-header,
.adjustment-form-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.adjustment-list-title,
.adjustment-form-title {
    align-items: center;
    display: flex;
    gap: 10px;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
}

.adjustment-list-icon {
    font-size: 24px;
}

.adjustment-list-toolbar {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.adjustment-month-select {
    max-width: 220px;
    min-width: 200px;
}

.adjustment-code-link {
    color: #0d6efd;
    font-weight: 700;
    text-decoration: underline;
}

.row-action-copy {
    background: #28a745;
}

.row-action-print {
    background: #fd7e14;
}

.pagination-summary {
    color: #666;
    font-size: 13px;
    margin: 0 0 10px;
}

.adjustment-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 18px;
    padding: 18px 20px 20px;
}

.adjustment-section-title {
    align-items: center;
    background: #f7f7f7;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    font-weight: 700;
    gap: 8px;
    margin: -18px -20px 18px;
    padding: 12px 20px;
}

.adjustment-general-grid,
.adjustment-item-grid,
.adjustment-items-columns {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(280px, 3.2fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) auto;
}

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

.adjustment-items-header {
    margin-bottom: 12px;
}

.adjustment-items-columns {
    color: #555;
    font-size: 12px;
    font-weight: 700;
    grid-template-columns: minmax(280px, 3.2fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) 40px;
    text-transform: uppercase;
}

.adjustment-item-row + .adjustment-item-row {
    margin-top: 10px;
}

.adjustment-add-item-btn {
    margin-top: 14px;
}

.adjustment-item-actions {
    align-items: flex-start;
    display: flex;
}

.product-suppliers-toolbar {
    margin-bottom: 16px;
}

.product-supplier-columns,
.product-supplier-grid {
    grid-template-columns: 1.5fr 0.9fr 1.4fr 0.8fr 0.65fr 0.7fr 0.7fr 40px;
}

.product-supplier-preferred {
    align-items: center;
    display: flex;
    padding-top: 28px;
}

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

.supplier-trade-name {
    color: #777;
    display: block;
    font-size: 12px;
    font-style: italic;
    margin-top: 4px;
}

.supplier-status-cell {
    text-align: center;
}

.status-badge {
    align-items: center;
    border-radius: 4px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.status-badge-active {
    background: #e8f7ea;
    color: #1f8a33;
}

.status-badge-inactive {
    background: #fdecec;
    color: #b42318;
}

.supplier-address-grid,
.supplier-contact-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supplier-address-grid-second {
    grid-template-columns: 1.2fr 1fr 1fr 0.5fr 40px;
    margin-top: 12px;
}

.supplier-contact-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr 40px;
}

.supplier-address-row + .supplier-address-row,
.supplier-contact-row + .supplier-contact-row {
    border-top: 1px solid #ececec;
    margin-top: 16px;
    padding-top: 16px;
}

.supplier-add-row-btn {
    margin-top: 14px;
}

.supplier-row-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
}

.required-mark {
    color: #c0392b;
}

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

.supplier-detail-block + .supplier-detail-block {
    border-top: 1px solid #ececec;
    margin-top: 12px;
    padding-top: 12px;
}

@media (max-width: 960px) {
    .product-form-grid-3,
    .supplier-address-grid,
    .supplier-address-grid-second,
    .supplier-contact-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.purchase-supplier-link {
    color: #1a6fb0;
    text-decoration: none;
}

.purchase-supplier-link:hover {
    text-decoration: underline;
}

.purchase-supplier-missing {
    color: #888;
    font-style: italic;
}

.purchase-status-badge {
    border-radius: 4px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
}

.purchase-status-confirmada {
    background: #e8f7ea;
    color: #1f8a33;
}

.purchase-status-rascunho {
    background: #fff4e5;
    color: #b26a00;
}

.purchase-status-cancelada {
    background: #fdecec;
    color: #b42318;
}

.purchase-status-em_aberto {
    background: #eef2ff;
    color: #3b5bdb;
}

.purchase-status-em_andamento {
    background: #fff4e5;
    color: #b26a00;
}

.purchase-status-renegociando {
    background: #f3e8ff;
    color: #7c3aed;
}

.purchase-status-parcialmente_recebido {
    background: #fff7ed;
    color: #c2410c;
}

.purchase-status-recebido {
    background: #ecfdf5;
    color: #047857;
}

.recebimento-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.recebimento-status-em_conferencia {
    background: #fff4e5;
    color: #b26a00;
}

.recebimento-status-confirmado {
    background: #ecfdf5;
    color: #047857;
}

.recebimento-status-cancelado {
    background: #fee2e2;
    color: #b91c1c;
}

.recebimento-items-header,
.recebimento-item-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 2fr repeat(4, minmax(90px, 1fr)) 80px;
    align-items: center;
    margin-bottom: 10px;
}

.recebimento-items-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.recebimento-document-type-row,
.recebimento-conference-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.recebimento-nfe-fields {
    margin-top: 12px;
}

.form-help-warning {
    color: #b45309;
}

.purchase-legacy-label {
    color: #b45309;
    font-size: 11px;
    margin-top: 4px;
}

.purchase-legacy-banner {
    margin-bottom: 16px;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
}

.purchase-general-grid-wide {
    grid-template-columns: 120px 2fr 180px 180px 160px;
}

.purchase-totals-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.purchase-payment-type-row {
    display: flex;
    gap: 18px;
    margin-bottom: 16px;
}

.radio-inline {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    font-size: 14px;
}

.purchase-installment-generator {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 16px;
    padding: 14px;
}

.purchase-installment-generator-grid {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: 1.2fr 0.8fr 0.7fr 0.9fr auto;
}

.purchase-payment-columns,
.purchase-payment-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 0.85fr 0.75fr 1fr 0.85fr 0.85fr 1fr 1fr 40px;
}

.purchase-chart-select-row {
    display: contents;
}

.purchase-tax-checkbox {
    margin-top: 8px;
}

.payable-status-badge {
    border-radius: 4px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
}

.payable-status-pendente {
    background: #fff4e5;
    color: #b26a00;
}

.payable-status-pago {
    background: #e8f7ea;
    color: #1f8a33;
}

.payable-status-cancelado {
    background: #fdecec;
    color: #b42318;
}

.payable-status-aberto{background:#fff3cd;color:#6d5200;font-weight:800}.payable-status-atrasada,.payable-status-parcial-atrasada{background:#fde0e0;color:#a01818;font-weight:900}.payable-status-parcial{background:#fff0bf;color:#805d00;font-weight:800}

.payable-overdue-row td {
    background: #fff8f8;
}

.payable-advanced-search-form {
    display: grid;
    gap: 12px 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payable-advanced-search-actions {
    grid-column: 1 / -1;
}

.payable-advanced-search-form .payable-chart-filter-group {
    grid-column: 1 / -1;
}

.payable-advanced-search-form .payable-chart-select-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payable-advanced-search-form .payable-date-range-group {
    grid-column: span 2;
}

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

.payable-date-range-grid .form-group {
    margin: 0;
}

.form-control-date {
    min-width: 0;
}

.fixed-account-general-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fixed-account-generate-now {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 12px 0 0;
}

.fixed-account-status-play {
    color: #1f8a33;
    font-size: 14px;
    font-weight: 700;
}

.fixed-account-status-paused {
    color: #888;
    font-size: 12px;
    font-weight: 700;
}

.payable-module-tabs {
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 16px;
}

.payable-module-tab {
    appearance: none;
    background: #f3f3f3;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    margin-right: 4px;
    padding: 10px 18px;
    text-decoration: none;
}

.payable-module-tab:hover {
    background: #ececec;
    color: #1a1a1a;
}

.payable-module-tab.active {
    background: #fff;
    border-color: #ddd;
    color: #1a1a1a;
    font-weight: 700;
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
}

@media (max-width: 1200px) {
    .payable-advanced-search-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .payable-advanced-search-form {
        grid-template-columns: 1fr;
    }
}

.payable-origin-icon {
    margin-right: 4px;
}

.payable-purchase-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.payable-purchase-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.alert-info a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: underline;
}

.payable-nfe-link {
    color: #2563eb;
    font-weight: 600;
}

.dropdown-inline-form {
    display: block;
    margin: 0;
}

.dropdown-inline-form .dropdown-action {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    display: block;
    font: inherit;
    padding: 8px 14px;
    text-align: left;
    width: 100%;
}

.dropdown-inline-form .dropdown-action:hover {
    background: #f3f4f6;
}

.payable-selection-counter {
    color: #555;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.payable-more-actions-menu {
    min-width: 240px;
}

.payable-more-actions-menu .dropdown-action {
    align-items: center;
    display: flex;
    gap: 8px;
}

.payable-more-actions-menu .dropdown-action.is-disabled,
.payable-more-actions-menu .dropdown-action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.payable-form-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1.2fr 0.8fr;
}

.payable-general-grid,
.payable-values-grid,
.payable-other-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payable-field-span-2 {
    grid-column: span 2;
}

.payable-beneficiary-heading {
    color: #374151;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.payable-total-bar {
    align-items: center;
    background: #f3f4f6;
    border-radius: 4px;
    display: flex;
    font-size: 16px;
    grid-column: 1 / -1;
    justify-content: space-between;
    padding: 12px 14px;
}

.payable-receipt-page {
    margin: 0 auto;
    max-width: 760px;
}

.payable-receipt-header {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.payable-receipt-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 28px;
}

.payable-receipt-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 18px;
}

.payable-receipt-title {
    font-size: 24px;
    margin: 0 0 20px;
}

.payable-receipt-grid {
    display: grid;
    gap: 12px 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 20px;
}

.payable-receipt-grid dt {
    color: #666;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.payable-receipt-grid dd {
    margin: 0;
}

.payable-receipt-total {
    align-items: center;
    background: #f3f4f6;
    border-radius: 6px;
    display: flex;
    font-size: 18px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.payable-receipt-notes,
.payable-receipt-footer {
    color: #666;
    font-size: 13px;
}

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

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

@media (max-width: 768px) {
    .payable-summary-cards {
        grid-template-columns: 1fr;
    }
}

@media print {
    .no-print {
        display: none !important;
    }

    .payable-receipt-card {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}

@media (max-width: 1200px) {
    .purchase-general-grid-wide,
    .purchase-totals-grid,
    .purchase-installment-generator-grid,
    .purchase-payment-columns,
    .purchase-payment-grid {
        grid-template-columns: 1fr;
    }
}

.purchase-general-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 120px 2fr 180px 180px 160px 160px;
}

.purchase-supplier-field {
    grid-column: span 1;
}

.orcamento-general-grid {
    display: grid;
    gap: 18px 16px;
    grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 1fr) minmax(220px, 2fr) minmax(180px, 1fr) minmax(140px, 0.8fr);
}

.orcamento-general-grid > .form-group {
    min-width: 0;
    margin-bottom: 0;
}

.orcamento-general-grid .form-control {
    box-sizing: border-box;
    max-width: none;
    min-width: 0;
    min-height: 42px;
}

.orcamento-general-notes {
    grid-column: 1 / -1;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.orcamento-general-notes textarea {
    display: block;
    min-height: 88px;
    resize: vertical;
}

@media (max-width: 1200px) {
    .orcamento-general-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .orcamento-general-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.purchase-items-columns,
.purchase-item-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 2fr 1fr 0.8fr 0.7fr 0.9fr 0.8fr 0.9fr 40px;
}

@media (max-width: 1200px) {
    .purchase-general-grid,
    .purchase-items-columns,
    .purchase-item-grid {
        grid-template-columns: 1fr;
    }
}

.checkbox-inline {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    font-size: 14px;
}

.btn-remove-item {
    min-width: 40px;
    padding-left: 10px;
    padding-right: 10px;
}

.form-control-readonly {
    background: #f3f3f3;
}

.required-mark {
    color: #c0392b;
}

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

.adjustment-summary dt {
    color: #666;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.adjustment-summary dd {
    font-size: 18px;
    font-weight: 700;
    margin: 4px 0 0;
}

.stock-movement-filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.stock-movement-filter-bar label { margin: 0 2px 0 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.stock-movement-filter-bar label:first-child { margin-left: 0; }
.stock-movement-filter-bar .form-control { width: auto; min-width: 140px; }
.stock-movement-filter-bar input[type="date"] { min-width: 145px; }
.stock-movement-filter-bar .stock-movement-per-page { min-width: 75px; }
.stock-movement-product-picker { min-width: min(360px, 100%); width: min(420px, 100%); }
.stock-movement-product-picker .edk-search-select-trigger { min-width: 0; width: 100%; }
.stock-movement-totals { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.stock-movement-totals article { background: #fff; border: 1px solid #dedede; border-top: 4px solid #f5c400; border-radius: 8px; padding: 16px; }
.stock-movement-totals span { display: block; color: #666; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.stock-movement-totals strong { display: block; color: #111; font-size: 24px; margin-top: 6px; }
.stock-movement-panel { overflow: hidden; }
.stock-movement-table { min-width: 1500px; }
.stock-movement-table .numeric { text-align: right; }
.stock-movement-table .nowrap { white-space: nowrap; }
.movement-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.movement-badge-entrada { background: #dcf5e4; color: #146c31; }
.movement-badge-saida { background: #fde1e1; color: #a51d1d; }
.movement-badge-ajuste { background: #fff1b8; color: #765900; }
.movement-badge-estorno { background: #e8e8e8; color: #555; }
.movement-badge-link { text-decoration: none; transition: filter .15s ease, transform .15s ease; }
.movement-badge-link:hover { filter: brightness(.94); transform: translateY(-1px); }
.stock-movement-audit-note { margin-top: 12px; }
.stock-movement-details { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 18px; margin: 0; }
.stock-movement-details div { border-bottom: 1px solid #e4e4e4; padding-bottom: 12px; }
.stock-movement-details .wide { grid-column: 1 / -1; }
.stock-movement-details dt { color: #777; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.stock-movement-details dd { color: #111; font-weight: 600; margin: 5px 0 0; }
@media (max-width: 950px) { .stock-movement-totals, .stock-movement-details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .stock-movement-filter-bar { align-items: stretch; flex-direction: column; } .stock-movement-filter-bar label { margin: 6px 0 0; } .stock-movement-filter-bar .form-control { width: 100%; } .stock-movement-totals, .stock-movement-details { grid-template-columns: 1fr; } .stock-movement-details .wide { grid-column: auto; } }

.no-print {
    margin-top: 18px;
}

.separation-title {
    border-top: 1px solid #ddd;
    margin-top: 28px;
    padding-top: 24px;
}

.separation-group-title {
    border-left: 5px solid #222;
    font-size: 14px;
    letter-spacing: 0.04em;
    margin: 22px 0 10px;
    padding: 7px 10px;
}

.separation-group-stock { background: #e8f4ff; border-color: #2185d0; }
.separation-group-fabrication { background: #fff5cc; border-color: #e0a800; }
.separation-group-pending { background: #ffe2e2; border-color: #c0392b; }

.separation-type-label {
    color: #1769aa;
    font-size: 11px;
    font-weight: 800;
    margin-top: 4px;
}

.separation-type-fabrication { color: #8a5b00; }
.separation-type-pending { color: #a52020; }
.separation-location { font-weight: 600; }
.separation-check { height: 20px; width: 20px; }

.production-order-print-page {
    background: #fff;
    color: #111;
    font: 12px Arial, sans-serif;
    margin: 0 auto;
    max-width: 1200px;
    padding: 24px;
}

.production-order-print-actions { display: flex; gap: 8px; margin: 0 0 20px; }
.production-order-print-header { border-bottom: 3px solid #111; display: flex; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; }
.production-order-print-header h1 { font-size: 25px; margin: 2px 0; }
.production-order-print-header p { margin: 3px 0; }
.production-order-print-kicker { color: #9a7200; font-weight: 800; }
.production-order-print-header dl { display: grid; gap: 5px; margin: 0; min-width: 320px; }
.production-order-print-header dl div { display: grid; grid-template-columns: 120px 1fr; }
.production-order-print-header dt { font-weight: 700; }
.production-order-print-header dd { margin: 0; }
.production-order-print-section { break-inside: avoid; margin-bottom: 24px; }
.production-order-print-section h2 { background: #eee; border-left: 5px solid #111; font-size: 14px; margin: 0 0 8px; padding: 8px; }
.production-order-print-section table { border-collapse: collapse; table-layout: auto; width: 100%; }
.production-order-print-section th,
.production-order-print-section td { border: 1px solid #aaa; padding: 6px; text-align: left; vertical-align: top; }
.production-order-print-section th { background: #f4f4f4; font-size: 10px; text-transform: uppercase; }
.production-order-print-section small { color: #a52020; font-weight: 700; }
.print-check-box { font-size: 22px; text-align: center !important; }

@media print {
    .sidebar,
    .topbar,
    .no-print,
    .product-breadcrumb {
        display: none !important;
    }

    .content {
        padding: 0;
    }

    .main-area {
        width: 100%;
    }

    .production-order-print-page {
        max-width: none;
        padding: 0;
    }
}

@media (max-width: 1100px) {
    .adjustment-item-grid,
    .adjustment-items-columns {
        grid-template-columns: 1fr;
    }

    .adjustment-general-grid {
        grid-template-columns: 1fr;
    }
}

.fiscal-status-badge {
    border-radius: 4px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
}

.fiscal-status-aprovada {
    background: #e8f7ea;
    color: #1f8a33;
}

.fiscal-status-rascunho {
    background: #fff4e5;
    color: #b26a00;
}

.fiscal-status-cancelada {
    background: #fdecec;
    color: #b42318;
}

.fiscal-status-rejeitada {
    background: #fdecec;
    color: #b42318;
}

.fiscal-nfe-items-columns,
.fiscal-nfe-item-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 2fr 0.8fr 0.7fr 0.9fr 0.9fr 40px;
}

.finance-placeholder-card {
    margin-top: 0;
}

.fiscal-placeholder-card {
    padding: 24px;
}

.product-inline-search {
    align-items: center;
    display: flex;
    gap: 8px;
}

.payable-confirm-payment-modal {
    max-width: 960px;
    padding: 0;
    overflow: hidden;
}

.payable-confirm-payment-header {
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    padding: 18px 24px 14px;
}

.payable-confirm-payment-title {
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.payable-confirm-payment-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 0 4px;
}

.payable-confirm-payment-summary {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    color: #444;
    font-size: 14px;
    margin: 0;
    padding: 10px 24px;
}

#payable-confirm-form {
    padding: 20px 24px 24px;
}

.payable-confirm-payment-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.payable-select-clear-wrap {
    align-items: stretch;
    display: flex;
    gap: 4px;
}

.payable-select-clear-wrap .form-control {
    flex: 1;
}

.payable-field-clear {
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 14px;
    padding: 0 10px;
}

.payable-confirm-notes {
    min-height: 72px;
    resize: vertical;
}

.payable-attachments-section {
    margin-top: 8px;
}

.payable-attachments-title {
    align-items: center;
    display: flex;
    font-size: 15px;
    font-weight: 600;
    gap: 6px;
    margin: 0 0 8px;
}

.payable-attachments-help {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    color: #6d5a00;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 10px 12px;
}

.payable-upload-dropzone {
    align-items: center;
    background: #fafafa;
    border: 2px dashed #ccc;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 16px;
    text-align: center;
}

.payable-upload-dropzone.is-dragover {
    background: #eef6ff;
    border-color: #4a90d9;
}

.payable-upload-dropzone p {
    color: #666;
    margin: 0;
}

.payable-upload-or {
    font-size: 13px;
}

.payable-upload-button {
    cursor: pointer;
    margin: 0;
}

.payable-upload-input {
    display: none;
}

.payable-upload-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.payable-upload-list li {
    align-items: center;
    display: flex;
    font-size: 13px;
    gap: 12px;
    justify-content: space-between;
    padding: 6px 0;
}

.payable-upload-remove {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
}

.payable-confirm-payment-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .payable-confirm-payment-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .payable-confirm-payment-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .fiscal-nfe-items-columns,
    .fiscal-nfe-item-grid {
        grid-template-columns: 1fr;
    }
}

.edk-money-input {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.product-valores-layout {
    display: grid;
    gap: 24px 32px;
    grid-template-columns: minmax(260px, 32%) 1fr;
}

.product-valores-cost,
.product-valores-sale {
    min-width: 0;
}

.product-readonly-field {
    background: #f3f3f3;
    color: #555;
    cursor: not-allowed;
}

.product-valores-actions {
    margin-bottom: 16px;
}

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

.sale-prices-table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

.sale-prices-table th,
.sale-prices-table td {
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 8px;
    vertical-align: middle;
}

.sale-prices-table th {
    color: #666;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
}

.sale-prices-table .form-control {
    min-width: 90px;
}

.sale-price-suggested-display {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    min-width: 70px;
}

.sale-price-status-cell {
    text-align: center;
    white-space: nowrap;
}

.sale-price-status-toggle {
    cursor: pointer;
    display: inline-block;
    position: relative;
}

.sale-price-status-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sale-price-badge {
    border-radius: 4px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
}

.sale-price-badge-active {
    background: #d4edda;
    color: #155724;
}

.sale-price-badge-inactive {
    background: #f8d7da;
    color: #721c24;
}

.sale-price-actions-cell {
    text-align: center;
    width: 48px;
}

.btn-icon-only {
    min-width: 36px;
    padding-left: 8px;
    padding-right: 8px;
}

.product-add-link-wrap {
    margin-top: 12px;
}

.product-add-link {
    appearance: none;
    background: none;
    border: none;
    color: #198754;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    text-decoration: none;
}

.product-add-link:hover {
    text-decoration: underline;
}

.product-empty-state {
    color: #777;
    padding: 24px 0;
    text-align: center;
}

.product-fiscal-rules {
    margin-top: 24px;
}

.product-fiscal-rules-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-top: 16px;
}

.product-fiscal-rules-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.edk-percent-input {
    text-align: right;
}

@media (max-width: 960px) {
    .product-valores-layout {
        grid-template-columns: 1fr;
    }
}

.form-control-readonly.edk-money-display,
.edk-money-display {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.purchase-product-search-field {
    position: relative;
}

.purchase-product-search-results {
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    left: 0;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 20;
}

.purchase-product-search-option {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: block;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.purchase-product-search-option:hover,
.purchase-product-search-option.is-active {
    background: #f3f6fb;
}

.purchase-product-search-option-title {
    color: #1f2937;
    font-weight: 600;
}

.purchase-product-search-option-meta {
    color: #6b7280;
    font-size: 12px;
    margin-top: 2px;
}

.purchase-product-search-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 12px;
}

.table-subtext {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

.orcamento-status-badge,
.orcamento-response-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.orcamento-status-rascunho { background: #f3f4f6; color: #374151; }
.orcamento-status-enviado { background: #eef2ff; color: #4338ca; }
.orcamento-status-aguardando_resposta { background: #fff4e5; color: #b26a00; }
.orcamento-status-respondido { background: #ecfdf5; color: #047857; }
.orcamento-status-em_analise { background: #f3e8ff; color: #7c3aed; }
.orcamento-status-aprovado { background: #dbeafe; color: #1d4ed8; }
.orcamento-status-convertido_em_compra { background: #dcfce7; color: #15803d; }
.orcamento-status-cancelado { background: #fdecec; color: #b42318; }
.orcamento-status-em_negociacao { background: #fef3c7; color: #b45309; }
.orcamento-status-recusado { background: #fee2e2; color: #991b1b; }
.orcamento-status-expirado { background: #f5f5f4; color: #57534e; }
.orcamento-status-em_aberto { background: #fff4e5; color: #b26a00; }
.orcamento-status-confirmada { background: #dbeafe; color: #1d4ed8; }
.orcamento-status-cancelada { background: #fdecec; color: #b42318; }

.orcamento-venda-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 1.5fr auto;
    gap: 10px;
    align-items: start;
}

.cadastro-picker-field {
    display: flex;
    gap: 8px;
    position: relative;
}

.cadastro-picker-input {
    flex: 1;
    cursor: pointer;
    background: #fff;
}

.cadastro-picker-btn {
    flex-shrink: 0;
    min-width: 42px;
    padding-left: 10px;
    padding-right: 10px;
}

.cadastro-picker-summary {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.92rem;
    color: #334155;
}

.cadastro-picker-query {
    margin: 8px;
    width: calc(100% - 16px);
}

.cadastro-picker-options {
    max-height: 200px;
    overflow-y: auto;
}

/* Searchable select (Gestão Click style) */
.edk-search-select {
    position: relative;
}

.edk-search-select-trigger {
    cursor: pointer;
    background: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edk-search-select-trigger:not(.has-value)::placeholder {
    color: #9ca3af;
}

.edk-search-select-panel {
    background: #fff;
    border: 1px solid #cfd4dc;
    border-radius: 4px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    box-sizing: border-box;
    left: 0;
    margin-top: 2px;
    max-width: 100%;
    min-width: 0;
    position: absolute;
    right: 0;
    top: 100%;
    width: 100%;
    z-index: 40;
}

.edk-search-select--wide .edk-search-select-panel {
    min-width: min(520px, calc(100vw - 48px));
    max-width: min(720px, calc(100vw - 32px));
    width: auto;
}

.edk-search-select-panel-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px;
}

.edk-search-select-query {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    padding: 8px 10px;
    width: 100%;
}

.edk-search-select-options {
    max-height: 280px;
    overflow-y: auto;
}

.edk-search-select-option {
    background: #fff;
    border: 0;
    border-bottom: 1px solid #eef1f5;
    cursor: pointer;
    display: block;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.edk-search-select-option:last-child {
    border-bottom: 0;
}

.edk-search-select-option-title {
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-transform: uppercase;
    white-space: normal;
}

.edk-search-select-option-meta {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 3px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.edk-search-select-option-hint {
    color: #9ca3af;
    font-size: 11px;
    line-height: 1.3;
    margin-top: 2px;
}

.edk-search-select-option:hover,
.edk-search-select-option.is-active {
    background: #1f2937;
}

.edk-search-select-option:hover .edk-search-select-option-title,
.edk-search-select-option.is-active .edk-search-select-option-title,
.edk-search-select-option:hover .edk-search-select-option-meta,
.edk-search-select-option.is-active .edk-search-select-option-meta,
.edk-search-select-option:hover .edk-search-select-option-hint,
.edk-search-select-option.is-active .edk-search-select-option-hint {
    color: #fff;
}

.edk-search-select-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 14px 12px;
}

.edk-search-select-add {
    background: #16a34a;
    border-top: 1px solid #15803d;
    color: #fff;
    display: block;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    text-align: center;
    text-decoration: none;
}

.edk-search-select-add:hover {
    background: #15803d;
    color: #fff;
    text-decoration: none;
}

.edk-search-select.is-open .edk-search-select-trigger {
    border-color: #94a3b8;
}

.edk-search-select--inline .edk-search-select-trigger {
    cursor: text;
    padding-right: 36px;
    white-space: nowrap;
}

.edk-search-select-clear {
    background: transparent;
    border: 0;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    height: 28px;
    line-height: 1;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    z-index: 2;
}

.edk-search-select-clear:hover {
    color: #111827;
}

.edk-search-select--inline .edk-search-select-panel {
    min-width: 100%;
}

.adjustment-product-field .edk-search-select {
    width: 100%;
}

.orcamento-response-aguardando_resposta { background: #fff4e5; color: #b26a00; }
.orcamento-response-respondido { background: #ecfdf5; color: #047857; }

.orcamento-supplier-picker {
    max-width: 720px;
}

.orcamento-supplier-search-wrap {
    position: relative;
    margin-bottom: 14px;
}

.orcamento-supplier-suggestions {
    position: absolute;
    z-index: 120;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    max-height: 240px;
    overflow: auto;
}

.orcamento-supplier-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
}

.orcamento-supplier-option:hover {
    background: #f3f4f6;
}

.orcamento-selected-suppliers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.orcamento-selected-supplier {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    max-width: 100%;
}

.orcamento-selected-supplier-name {
    font-size: 13px;
    color: #1e3a8a;
    word-break: break-word;
}

.orcamento-remove-supplier {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.orcamento-selected-suppliers-empty.hidden {
    display: none;
}

.orcamento-product-suggestions {
    position: absolute;
    z-index: 120;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    max-height: 220px;
    overflow: auto;
    min-width: 280px;
}

.orcamento-product-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.orcamento-product-option:hover {
    background: #f3f4f6;
}

.orcamento-item-row td {
    position: relative;
    vertical-align: middle;
}

.orcamento-price-lowest {
    background: #ecfdf5;
    color: #047857;
    font-weight: 700;
}

.orcamento-comparison-note {
    margin-top: 12px;
}

.orcamento-send-actions {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.orcamento-btn-whatsapp:not(:disabled) {
    color: #15803d;
}

.orcamento-last-send {
    margin-top: 8px;
}

.orcamento-message-card {
    margin-bottom: 16px;
}

.orcamento-message-preview {
    white-space: pre-wrap;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    font-family: inherit;
}

.orcamento-fornecedor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-badge-muted {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.panel-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.detail-grid-span-2 {
    grid-column: span 2;
}

.product-advanced-search-form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.orcamento-public-link {
    margin-top: 12px;
    max-width: 900px;
}

.public-response-body {
    background: #eef2f7;
    margin: 0;
}

.public-response-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-response-header,
.public-response-footer {
    text-align: center;
    padding: 20px;
}

.public-response-logo {
    max-width: 220px;
    height: auto;
}

.public-response-main {
    flex: 1;
    width: min(960px, calc(100% - 32px));
    margin: 0 auto 32px;
}

.public-response-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.public-response-title {
    margin: 0 0 8px;
    font-size: 28px;
}

.public-response-subtitle {
    margin: 0 0 20px;
    color: #6b7280;
}

.public-response-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.public-response-notes {
    margin-bottom: 20px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.public-response-section-title {
    margin: 24px 0 8px;
    font-size: 18px;
}

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

.public-response-fields .form-group-span-2 {
    grid-column: span 2;
}

.public-response-submit {
    margin-top: 24px;
    width: 100%;
}

.public-response-items-table .form-control {
    min-width: 120px;
}

@media (max-width: 768px) {
    .public-response-fields {
        grid-template-columns: 1fr;
    }

    .public-response-fields .form-group-span-2 {
        grid-column: span 1;
    }
}

.custeio-form .table-wrap {
    overflow: visible;
}

.custeio-section {
    margin-bottom: 28px;
}

.custeio-section:last-child {
    margin-bottom: 8px;
}

.custeio-section > .panel-title,
.custeio-section > .panel-header-row {
    margin-bottom: 8px;
}

.custeio-header-grid {
    display: grid;
    gap: 14px 16px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
}

.custeio-field-machine { grid-column: span 4; }
.custeio-field-client { grid-column: span 4; }
.custeio-field-project { grid-column: span 4; }
.custeio-field-code { grid-column: span 2; }
.custeio-field-status { grid-column: span 2; }
.custeio-field-date { grid-column: span 2; }
.custeio-field-op { grid-column: span 3; }
.custeio-field-responsible { grid-column: span 3; }
.custeio-field-description { grid-column: span 6; }
.custeio-field-notes { grid-column: span 6; }

.custeio-header-grid textarea.form-control {
    min-height: 72px;
    resize: vertical;
}

.custeio-category-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 4px 0 18px;
}

.custeio-category-summary-item {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 6px;
    padding: 10px 12px;
}

.custeio-category-summary-item strong {
    display: block;
    color: #555;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.custeio-category-summary-item span {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
}

.custeio-totals-grid {
    display: grid;
    gap: 14px 20px;
    align-items: stretch;
    grid-template-columns: minmax(150px, 1.1fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) minmax(250px, 1.7fr);
    max-width: 840px;
}

.custeio-totals-grid > .form-group:not(.custeio-field-suggested) {
    margin-bottom: 0;
}

.custeio-totals-grid > .form-group:not(.custeio-field-suggested) > label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
}

.custeio-totals-grid .custeio-field-money:not(.custeio-field-suggested) .form-control {
    background: #f7f7f7;
    border-color: #ddd;
    color: #4b5563;
}

.custeio-field-percent .custeio-percent-input-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 120px;
}

.custeio-totals-grid .custeio-field-percent .custeio-percent-input {
    background: #fff;
    border-color: #ccc;
    color: #1a1a1a;
}

.custeio-totals-grid .custeio-field-percent .custeio-percent-suffix {
    background: #efefef;
    border-color: #ddd;
    color: #6b7280;
}

.custeio-field-suggested {
    margin-bottom: 0;
}

.custeio-suggested-card {
    background: #edf8f0;
    border: 1.5px solid #2f7a4a;
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(47, 122, 74, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 78px;
    padding: 14px 18px 12px;
}

.custeio-suggested-label {
    color: #1e5c35;
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.3;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.custeio-suggested-value {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #14532d;
    font-family: inherit;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
    max-width: none;
    padding: 0;
    width: 100%;
}

input.custeio-suggested-value {
    cursor: default;
    outline: none;
}

input.custeio-suggested-value:focus {
    border: 0;
    box-shadow: none;
    outline: none;
}

.custeio-percent-input-wrap .custeio-percent-input {
    text-align: right;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    min-width: 0;
}

.custeio-percent-suffix {
    display: flex;
    align-items: center;
    background: #f4f4f4;
    border: 1px solid #d0d0d0;
    border-left: 0;
    border-radius: 0 6px 6px 0;
    color: #555;
    font-size: 13px;
    font-weight: 700;
    padding: 0 10px;
}

.custeio-items-table {
    table-layout: fixed;
    width: 100%;
}

.custeio-items-table th,
.custeio-items-table td {
    vertical-align: middle;
}

.custeio-items-table .form-control,
.custeio-items-table .edk-search-select-trigger,
.custeio-items-table select.form-control {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.custeio-col-code { width: 9%; }
.custeio-col-desc { width: auto; }
.custeio-col-origin { width: 10%; }
.custeio-col-qty { width: 6.5%; }
.custeio-col-unit { width: 5%; }
.custeio-col-money { width: 10%; }
.custeio-col-material { width: 11%; }
.custeio-col-dimension { width: 8%; }
.custeio-col-operation { width: 11%; }
.custeio-col-employee { width: 16%; }
.custeio-col-actions {
    width: 44px;
    text-align: center;
}

.custeio-items-table-product .custeio-col-desc,
.custeio-items-table-other .custeio-col-desc,
.custeio-items-table-finishing .custeio-col-desc,
.custeio-items-table-labor .custeio-col-desc,
.custeio-items-table-structure .custeio-col-desc {
    width: 28%;
}

.custeio-items-table-machining .custeio-col-desc {
    width: 18%;
}

.custeio-origin {
    min-width: 0;
}

.custeio-description-cell {
    min-width: 0;
    position: relative;
}

.custeio-piece-col,
.custeio-form [data-kind="machining"] .custeio-description-cell {
    min-width: 0;
    width: 22%;
}

.custeio-product-picker .edk-search-select-panel {
    min-width: 320px;
    z-index: 80;
}

.custeio-item-row.is-product-origin .custeio-product-code {
    background: #f7f7f7;
}

.custeio-product-suggestions {
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    left: 0;
    margin-top: 4px;
    max-height: 240px;
    min-width: 280px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 30;
}

.custeio-product-suggestion {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: block;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.custeio-product-suggestion:hover {
    background: #f3f6fb;
}

.custeio-product-suggestion-title {
    color: #1f2937;
    font-weight: 600;
}

.custeio-product-suggestion-meta {
    color: #6b7280;
    font-size: 12px;
    margin-top: 2px;
}

.custeio-product-suggestion-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 12px;
}

.product-tab-panel {
    overflow-anchor: none;
}

.product-tab-panel[hidden] {
    display: none !important;
}

.custeio-tabs.product-tabs {
    gap: 0 4px;
    margin-top: 8px;
}

.custeio-tabs .product-tab {
    font-size: 12.5px;
    letter-spacing: 0.01em;
    margin-right: 2px;
    padding: 9px 13px;
}

.custeio-tabs .product-tab.active {
    background: #fff;
    border-bottom-color: #fff;
    box-shadow: inset 0 -2px 0 #f5c400;
    color: #1a1a1a;
}

.custeio-form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: space-between;
    margin-top: 20px;
}

.custeio-form-actions-secondary,
.custeio-form-actions-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.custeio-form-actions-primary {
    margin-left: auto;
}

.custeio-form .product-form-card {
    margin-bottom: 0;
}

.custeio-form .panel-header-row {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    margin: 12px 0 0;
}

.custeio-form .panel-header-row .panel-title {
    margin: 0 0 12px;
}

.custeio-form .panel-header-row .panel-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    margin: 0;
}

.custeio-form .product-tab-panel > .panel-help,
.custeio-form .custeio-section > .panel-help {
    margin: 10px 0 16px;
}

.custeio-form .product-tab-panel > .table-wrap,
.custeio-form .custeio-section > .table-wrap {
    margin-top: 0;
}

.custeio-category-add-btn,
.custeio-category-import-btn {
    min-height: 42px;
    padding: 10px 20px;
    white-space: normal;
}

.custeio-category-add-btn {
    background: #1f1f1f;
    border-color: #1f1f1f;
    color: #fff;
}

.custeio-category-add-btn:hover {
    background: #353535;
    border-color: #353535;
}

.custeio-category-import-btn {
    background: #f5c400;
    border-color: #f5c400;
    color: #1a1a1a;
}

.custeio-category-import-btn:hover {
    background: #e0b200;
    border-color: #e0b200;
}

.custeio-manage-categories-btn {
    margin-top: 8px;
}

.custeio-form-actions-primary {
    gap: 12px;
}

.custeio-cancel-btn,
.custeio-save-btn {
    min-height: 42px;
}

.custeio-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.custeio-doc-slot {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
}

.custeio-doc-slot-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.custeio-doc-slot-help,
.custeio-doc-empty,
.custeio-doc-size,
.custeio-doc-chosen {
    color: #6b7280;
    font-size: 12px;
    margin: 0 0 10px;
}

.custeio-doc-current {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 10px;
}

.custeio-doc-link {
    font-weight: 600;
    word-break: break-all;
}

.custeio-doc-file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.custeio-doc-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.custeio-doc-chosen {
    margin: 0;
}

.custeio-doc-remove {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    cursor: pointer;
}

.custeio-show .custeio-header-facts,
.custeio-show .custeio-category-summary {
    margin-bottom: 20px;
}

.custeio-header-facts {
    display: grid;
    gap: 12px 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.custeio-header-facts .custeio-fact-wide,
.custeio-header-facts .custeio-fact-suggested {
    grid-column: span 2;
}

.custeio-header-facts .custeio-suggested-value {
    display: block;
}

.custeio-fact-label {
    color: #555;
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.custeio-related-link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.custeio-related-link:hover {
    color: #111;
}

@media (max-width: 1100px) {
    .custeio-header-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .custeio-field-machine,
    .custeio-field-client,
    .custeio-field-project,
    .custeio-field-description,
    .custeio-field-notes,
    .custeio-field-op,
    .custeio-field-responsible {
        grid-column: span 3;
    }

    .custeio-field-code,
    .custeio-field-status,
    .custeio-field-date {
        grid-column: span 2;
    }

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

    .custeio-totals-grid {
        grid-template-columns: minmax(160px, 1fr) minmax(110px, 0.7fr);
        max-width: none;
    }

    .custeio-field-suggested {
        grid-column: 1 / -1;
    }

    .custeio-header-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .custeio-header-grid,
    .custeio-category-summary,
    .custeio-totals-grid,
    .custeio-header-facts {
        grid-template-columns: 1fr;
    }

    .custeio-field-machine,
    .custeio-field-client,
    .custeio-field-project,
    .custeio-field-code,
    .custeio-field-status,
    .custeio-field-date,
    .custeio-field-op,
    .custeio-field-responsible,
    .custeio-field-description,
    .custeio-field-notes,
    .custeio-header-facts .custeio-fact-wide,
    .custeio-header-facts .custeio-fact-suggested {
        grid-column: span 1;
    }

    .custeio-field-suggested {
        grid-column: span 1;
    }

    .custeio-suggested-value {
        font-size: 22px;
    }

    .custeio-field-percent .custeio-percent-input-wrap {
        max-width: 140px;
    }

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

    .custeio-items-table {
        min-width: 720px;
        table-layout: auto;
    }

    .custeio-form-actions-primary {
        margin-left: 0;
        width: 100%;
    }

    .custeio-form .panel-header-row .panel-header-actions {
        width: 100%;
    }

    .custeio-category-add-btn,
    .custeio-category-import-btn {
        flex: 1 1 210px;
    }
}

.material-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
    margin: 1rem 0 1.25rem;
}

.material-summary-grid-wide {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.material-consume-card {
    margin: 0 0 1.25rem;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

.material-consume-card-active {
    border-color: #e0b400;
    box-shadow: 0 0 0 3px rgba(224, 180, 0, 0.16);
    scroll-margin-top: 18px;
}

/* Formulário de materiais da OP: três faixas responsivas, sem tabela de layout. */
.op-material-form {
    min-width: 0;
}

.op-material-grid {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.op-material-grid + .op-material-grid {
    margin-top: 14px;
}

.op-material-grid .form-group {
    margin: 0;
    min-width: 0;
}

.op-material-grid label:not(.op-material-check) {
    display: block;
    margin-bottom: 6px;
}

.op-material-grid-primary {
    grid-template-columns: minmax(220px, 250px) minmax(250px, 300px) minmax(360px, 1fr);
}

.op-material-origin,
.op-material-step,
.op-material-product {
    min-width: 0;
}

.op-material-grid-values {
    align-items: end;
    grid-template-columns: minmax(110px, 130px) minmax(145px, 165px) minmax(155px, 180px) minmax(155px, 180px) max-content;
}

.op-material-grid-footer {
    align-items: end;
    grid-template-columns: minmax(320px, 1fr) max-content;
}

.op-material-form .form-control {
    box-sizing: border-box;
    height: 42px;
    min-width: 0;
    width: 100%;
}

.op-material-form .op-number-input,
.op-material-form .op-money-control input {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.op-money-control {
    display: flex;
    min-width: 0;
}

.op-money-control > span {
    align-items: center;
    background: #f3f4f6;
    border: 1px solid #cfd4dc;
    border-right: 0;
    border-radius: 4px 0 0 4px;
    color: #222;
    display: flex;
    flex: 0 0 auto;
    font-weight: 700;
    height: 42px;
    padding: 0 10px;
}

.op-material-form .op-money-control .form-control {
    border-radius: 0 4px 4px 0;
    color: #111;
    font-weight: 700;
}

.op-material-check {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 9px;
    margin: 0 0 7px;
    min-width: max-content;
    white-space: nowrap;
}

.op-material-check input {
    flex: 0 0 18px;
    height: 18px;
    margin: 0;
    width: 18px;
}

.op-material-check span,
.op-material-check small {
    display: block;
}

.op-material-check small {
    color: #6b7280;
    font-size: 11px;
    margin-top: 2px;
}

.op-material-submit {
    align-items: flex-end;
    display: flex;
    min-height: 42px;
}

.op-material-submit .btn {
    min-height: 42px;
    white-space: nowrap;
}

.op-material-product .edk-search-select,
.op-material-product .edk-search-select-panel {
    width: 100%;
}

.op-material-product .edk-search-select-panel {
    max-width: none;
    min-width: 100%;
    z-index: 120;
}

.op-material-product .edk-search-select-options {
    max-height: 320px;
    overflow-x: hidden;
    overflow-y: auto;
}

.op-material-product .edk-search-select-option-title {
    overflow-wrap: break-word;
    word-break: normal;
}

.op-material-grid [hidden] {
    display: none !important;
}

.field-error {
    color: #b42318;
    display: block;
    font-size: 12px;
    margin-top: 5px;
}

.form-control.is-invalid {
    border-color: #b42318;
    box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.08);
}

.material-summary-card {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fafafa;
}

.material-summary-card strong {
    display: block;
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
}

.material-summary-card span {
    font-size: 22px;
    font-weight: 700;
}

.real-cost-diff-up {
    color: #b42318;
}

.real-cost-diff-down {
    color: #067647;
}

.real-cost-diff-eq {
    color: #444;
}

.material-status-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.material-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1rem;
}

.material-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    min-width: 180px;
}

.material-requirement-row {
    cursor: pointer;
}

.material-requirement-row.is-selected {
    background: #eef6ff;
}

.material-action-disabled {
    cursor: not-allowed;
    opacity: 0.72;
    pointer-events: none;
}

.material-detail-card {
    margin-top: 1.25rem;
    border-top: 1px solid #e5e5e5;
    padding-top: 1rem;
}

.material-situation-badge,
.material-status-badge {
    display: inline-block;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 4px 10px;
    text-transform: uppercase;
}

.material-situation-ok,
.material-status-disponivel {
    background: #d1e7dd;
    color: #0f5132;
}

.material-situation-falta,
.material-status-insuficiente {
    background: #f8d7da;
    color: #842029;
}

.material-status-parcial {
    background: #fff3cd;
    color: #856404;
}

.material-situation-sem-produto,
.material-status-cadastro,
.material-status-vazio {
    background: #e2e3e5;
    color: #41464b;
}

.material-situation-nao-controlado {
    background: #cff4fc;
    color: #055160;
}

.material-situation-unidade {
    background: #fff3cd;
    color: #856404;
}

.material-internal-badge {
    display: inline-block;
    border-radius: 4px;
    background: #e7f1ff;
    color: #084298;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 2px 8px;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .material-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1180px) {
    .op-material-grid-primary {
        grid-template-columns: minmax(220px, 1fr) minmax(250px, 1fr);
    }

    .op-material-product {
        grid-column: 1 / -1;
    }

    .op-material-grid-values {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .op-material-check {
        min-width: 0;
        white-space: normal;
    }
}

@media (max-width: 640px) {
    .material-consume-card {
        padding: 14px;
    }

    .op-material-grid-primary,
    .op-material-grid-values,
    .op-material-grid-footer {
        grid-template-columns: minmax(0, 1fr);
    }

    .op-material-product {
        grid-column: auto;
    }

    .op-material-origin,
    .op-material-step,
    .op-material-product,
    .op-material-quantity,
    .op-material-unit,
    .op-material-money,
    .op-material-notes,
    .op-material-submit {
        width: 100%;
    }

    .op-material-check {
        align-items: flex-start;
        margin: 2px 0;
        white-space: normal;
    }

    .op-material-submit .btn {
        width: 100%;
    }

    .op-material-product .edk-search-select-panel {
        left: 0;
        max-width: calc(100vw - 56px);
        right: auto;
        width: 100%;
    }
}

.fabrication-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 1rem;
}

.fabrication-steps-table td {
    vertical-align: top;
}

.fabrication-steps-table tr.is-current-step {
    background: #fffbeb;
}

.fabrication-steps-table tr.is-blocked-step {
    background: #fdecec;
}

.step-order {
    font-weight: 700;
}

.step-order-actions {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
}

.step-optional {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.step-status-badge {
    display: inline-block;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 4px 10px;
    text-transform: uppercase;
    white-space: nowrap;
}

.step-status-concluida {
    background: #d1e7dd;
    color: #0f5132;
}

.step-status-andamento {
    background: #d1e7dd;
    color: #0f5132;
}

.step-status-bloqueada {
    background: #f8d7da;
    color: #842029;
}

.step-status-pendente {
    background: #e2e3e5;
    color: #41464b;
}

.step-block-reason {
    margin-top: 6px;
    font-size: 13px;
    color: #842029;
}

.fabrication-table-wrap {
    overflow: visible;
}

.fabrication-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    overflow: visible;
}

.step-action-panel {
    position: relative;
}

.step-action-panel summary {
    list-style: none;
    cursor: pointer;
}

.step-action-panel summary::-webkit-details-marker {
    display: none;
}

.step-action-panel form {
    position: absolute;
    z-index: 20;
    right: 0;
    margin-top: 6px;
    min-width: 260px;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.step-action-panel label {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
}

.step-materials-preview {
    margin-top: 8px;
    font-size: 13px;
}

.step-materials-preview ul {
    margin: 6px 0;
    padding-left: 18px;
}

.step-required-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
}

.fabrication-step-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(280px, 2fr) 100px minmax(180px, 1fr) minmax(220px, 1fr);
}

@media (max-width: 1200px) {
    .fabrication-step-grid {
        grid-template-columns: 1fr;
    }
}

.production-progress-block {
    margin: 0 0 1rem;
    max-width: 520px;
}

.fabrication-summary-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 6px 16px;
}

.fabrication-summary-list li {
    font-size: 14px;
}

.time-entry-summaries {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1rem 0 1.5rem;
}

.time-entry-form {
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .time-entry-summaries {
        grid-template-columns: 1fr;
    }
}

.technical-origin-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 16px;
}

.technical-category-title {
    margin: 12px 0 8px;
}

.technical-category-help {
    margin: 0 0 16px;
}

.technical-category-table {
    margin-bottom: 24px;
}

.technical-item-form-title {
    margin: 0 0 14px;
}

.technical-origin-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.technical-item-form,
.technical-catalog-form,
.technical-document-form {
    margin-top: 0;
}

.technical-item-submit-btn {
    background: #1f1f1f;
    border-color: #1f1f1f;
    color: #fff;
    min-height: 42px;
    padding: 10px 20px;
}

.technical-item-submit-btn:hover {
    background: #353535;
    border-color: #353535;
}

.technical-item-form .form-actions,
.technical-catalog-form .form-actions,
.technical-document-form .form-actions {
    margin-top: 18px;
}

.technical-product-picker {
    margin-bottom: 14px;
    max-width: none;
    width: 100%;
}

.engineering-catalog .panel-title {
    margin: 4px 0 6px;
}

.engineering-catalog .panel-help {
    margin: 0 0 16px;
}

.eng-form-row {
    align-items: start;
    display: grid;
    gap: 12px 16px;
    margin-bottom: 14px;
}

.eng-form-row .form-group,
.eng-short-fields .form-group {
    margin-bottom: 0;
    min-width: 0;
}

.eng-form-row-identity {
    grid-template-columns: minmax(0, 1.4fr) minmax(6.75rem, 9.75rem) minmax(0, 1fr) minmax(11rem, 0.95fr);
}

.eng-form-row-version {
    grid-template-columns: 5.75rem 11.25rem minmax(0, 1fr);
}

.eng-form-row-notes {
    grid-template-columns: 1fr 1fr;
}

.eng-form-row-item {
    grid-template-columns: minmax(0, 1fr) auto;
}

.eng-form-row-2 {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.eng-form-row-document {
    grid-template-columns: minmax(10rem, 13rem) minmax(0, 1.45fr) minmax(0, 1.25fr);
}

.eng-short-fields {
    display: grid;
    gap: 12px 16px;
    grid-template-columns: 7.5rem 6.25rem;
    align-items: start;
}

.eng-short-fields-3 {
    grid-template-columns: repeat(3, minmax(6.5rem, 10rem));
    margin-bottom: 14px;
}

.technical-catalog-form .form-group label,
.technical-item-form .form-group label,
.technical-document-form .form-group label {
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 5px;
}

.technical-catalog-form .form-control,
.technical-item-form .form-control,
.technical-document-form .form-control,
.technical-item-form .edk-search-select-trigger,
.technical-document-form .edk-search-select-trigger {
    box-sizing: border-box;
    font-size: 13px;
    max-width: 100%;
    min-height: 34px;
    padding: 6px 10px;
}

.technical-document-form input[type="file"].form-control {
    height: auto;
    min-height: 34px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.technical-catalog-form textarea.form-control {
    height: auto;
    min-height: 84px;
    padding-top: 8px;
}

.technical-item-form .form-actions,
.technical-catalog-form .form-actions,
.technical-document-form .form-actions {
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 4px;
}

.technical-category-table .data-table th:nth-child(1),
.technical-category-table .data-table td:nth-child(1) {
    white-space: nowrap;
    width: 4.5rem;
}

@media (max-width: 960px) {
    .eng-form-row-identity {
        grid-template-columns: minmax(0, 1fr) 9.75rem;
    }

    .eng-form-row-version {
        grid-template-columns: 5.75rem 11.25rem minmax(0, 1fr);
    }

    .eng-form-row-version .eng-field-lg {
        grid-column: 1 / -1;
    }

    .eng-form-row-document {
        grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
    }

    .eng-form-row-document .eng-field-lg:last-child {
        grid-column: 1 / -1;
    }

    .eng-form-row-item {
        grid-template-columns: 1fr;
    }

    .eng-short-fields {
        grid-template-columns: 7.5rem 6.25rem;
    }
}

@media (max-width: 700px) {
    .eng-form-row-identity,
    .eng-form-row-version,
    .eng-form-row-notes,
    .eng-form-row-item,
    .eng-form-row-2,
    .eng-form-row-document,
    .eng-short-fields-3 {
        grid-template-columns: 1fr;
    }

    .eng-short-fields {
        grid-template-columns: 1fr 1fr;
    }
}

.product-production {
    display: grid;
    gap: 22px;
}

.product-production-block + .product-production-block {
    border-top: 1px solid #eee;
    padding-top: 18px;
}

.product-production-facts {
    display: grid;
    gap: 12px 16px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 10px 0 4px;
}

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

.product-production-facts > div {
    min-width: 0;
}

.product-production-facts span {
    color: #666;
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.product-production-facts strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.product-production-secondary {
    font-weight: 600;
}

.product-production-facts small {
    color: #777;
    display: block;
    font-size: 11px;
    margin-top: 4px;
}

.product-production-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.product-production-select-row {
    align-items: end;
    display: grid;
    gap: 12px 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 12px;
}

.product-production-select-row .form-group {
    margin-bottom: 0;
}

.product-production-custeio-list {
    margin: 0;
    padding-left: 18px;
}

.product-production-custeio-list li {
    margin: 4px 0;
}

.product-production-custeio-list a {
    margin-left: 8px;
    text-decoration: underline;
}

@media (max-width: 960px) {
    .product-production-facts,
    .product-production-pricing,
    .product-production-select-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .product-production-facts,
    .product-production-pricing,
    .product-production-select-row {
        grid-template-columns: 1fr;
    }
}

.payment-method-bank {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.payment-method-bank-icon {
    color: #5a6a7a;
}

.payment-method-availability {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.payment-avail-badge {
    border-radius: 3px;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 4px 8px;
    text-transform: none;
}

.payment-avail-badge-pay {
    background: #f8d7da;
    color: #842029;
}

.payment-avail-badge-receive {
    background: #d1e7dd;
    color: #0f5132;
}

.payment-method-section-header {
    justify-content: space-between;
    margin-bottom: 0;
}

.payment-method-section-heading {
    align-items: center;
    display: flex;
    gap: 10px;
}

.switch {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    height: 24px;
    position: relative;
    width: 46px;
}

.switch input {
    height: 0;
    opacity: 0;
    position: absolute;
    width: 0;
}

.switch-slider {
    background: #cfd4da;
    border-radius: 24px;
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: background 0.15s ease;
}

.switch-slider::before {
    background: #fff;
    border-radius: 50%;
    bottom: 3px;
    content: "";
    height: 18px;
    left: 3px;
    position: absolute;
    transition: transform 0.15s ease;
    width: 18px;
}

.switch input:checked + .switch-slider {
    background: #28a745;
}

.switch input:checked + .switch-slider::before {
    transform: translateX(22px);
}

.switch input:focus-visible + .switch-slider {
    outline: 2px solid #86b7fe;
    outline-offset: 2px;
}

.dre-filter-card,
.dre-report-card {
    padding: 18px 20px;
    margin-bottom: 16px;
}

.dre-filter-form {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.dre-filter-form .form-group {
    margin-bottom: 0;
}

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

.dre-criterion,
.dre-empty,
.dre-notes {
    color: #555;
    font-size: 13px;
}

.dre-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dre-table th,
.dre-table td {
    border-bottom: 1px solid #e5e5e5;
    padding: 8px 10px;
}

.dre-table thead th {
    background: #f7f7f7;
    font-weight: 700;
}

.dre-col-amount {
    text-align: right;
    white-space: nowrap;
    width: 180px;
}

.dre-row-section td {
    background: #1f1f1f;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding-top: 12px;
    padding-bottom: 12px;
}

.dre-row-group td {
    background: #f4f4f4;
    font-weight: 700;
}

.dre-row-total td {
    background: #ececec;
    font-weight: 700;
}

.dre-row-result td {
    background: #d9edf7;
    font-weight: 700;
}

.dre-row-final td {
    background: #1f1f1f;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.dre-row-detail td:first-child {
    padding-left: 28px;
}

.dre-row-subgroup td {
    background: #fafafa;
    font-weight: 600;
}

.dre-row-subgroup td:first-child {
    padding-left: 28px;
}

.dre-row-account td:first-child {
    padding-left: 52px;
}

.dre-row-note td,
.dre-row-empty td {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.dre-kpis {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 18px 0;
}

.dre-kpi {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 14px;
}

.dre-kpi-label {
    color: #666;
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.dre-subtitle {
    font-size: 16px;
    margin: 24px 0 10px;
}

.dre-hint {
    color: #888;
    display: block;
    font-size: 12px;
}

.dre-notes {
    margin-top: 20px;
    padding-left: 18px;
}

/* ==========================================================================
   Fluxo de caixa
   ========================================================================== */

.cash-flow-page .is-positive {
    color: #1f8a33;
}

.cash-flow-page .is-negative {
    color: #b42318;
}

.cash-flow-toolbar {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cash-flow-tabs {
    align-items: flex-end;
    border-bottom: none;
    flex: 1 1 420px;
}

.cash-flow-export {
    margin-left: 8px;
    position: relative;
}

.cash-flow-export .product-tab {
    background: #1a1a1a;
    border-color: #1a1a1a;
    border-radius: 4px;
    color: #fff;
}

.cash-flow-toolbar-right {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cash-flow-period-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cash-flow-period-select {
    min-width: 180px;
}

.cash-flow-period-range {
    align-items: center;
    display: flex;
    gap: 6px;
}

.cash-flow-period-sep {
    color: #666;
    font-size: 12px;
}

.cash-flow-period-label {
    color: #555;
    font-size: 13px;
    margin: 0 0 14px;
}

.cash-flow-filter-notice {
    margin-bottom: 14px;
}

/* Cards de saldo -------------------------------------------------------- */

.cash-flow-balance-cards {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 18px;
}

.cash-flow-balance-card {
    background: #fff;
    border: 1px solid #ddd;
    border-left-width: 4px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
}

.cash-flow-balance-current {
    border-left-color: #1f6feb;
}

.cash-flow-balance-projected {
    border-left-color: #6f42c1;
}

.cash-flow-balance-inflow {
    border-left-color: #1f8a33;
}

.cash-flow-balance-outflow {
    border-left-color: #b42318;
}

.cash-flow-balance-label {
    color: #666;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cash-flow-balance-value {
    font-size: 22px;
    font-weight: 700;
}

.cash-flow-balance-hint {
    color: #888;
    font-size: 11px;
}

/* Recebimentos x pagamentos --------------------------------------------- */

.cash-flow-versus {
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin-bottom: 16px;
    padding: 16px 20px;
}

.cash-flow-versus-side,
.cash-flow-versus-result {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.cash-flow-versus-side strong,
.cash-flow-versus-result strong {
    font-size: 20px;
}

.cash-flow-versus-in strong {
    color: #1f8a33;
}

.cash-flow-versus-out strong {
    color: #b42318;
}

.cash-flow-versus-label {
    color: #666;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cash-flow-versus-x {
    color: #aaa;
    font-size: 18px;
    font-weight: 700;
}

.cash-flow-versus-result {
    border-left: 1px solid #eee;
    padding-left: 24px;
}

/* Seções ---------------------------------------------------------------- */

.cash-flow-section {
    margin-bottom: 18px;
}

.cash-flow-section-head {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.cash-flow-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 10px;
}

.cash-flow-section-in .cash-flow-section-title {
    color: #1f8a33;
}

.cash-flow-section-out .cash-flow-section-title {
    color: #b42318;
}

.cash-flow-section-alert {
    color: #b42318;
    font-size: 12px;
    font-weight: 600;
}

.cash-flow-section-hint {
    color: #777;
    font-size: 12px;
}

/* Tabela de lançamentos -------------------------------------------------- */

.cash-flow-col-date {
    width: 90px;
}

.cash-flow-col-description {
    width: auto;
}

.cash-flow-col-entity {
    width: 16%;
}

.cash-flow-col-document {
    width: 110px;
}

.cash-flow-col-chart {
    width: 20%;
}

.cash-flow-col-cost-center {
    width: 13%;
}

.cash-flow-col-situation {
    width: 100px;
}

.cash-flow-col-amount {
    width: 120px;
}

.cash-flow-table .cash-flow-date {
    white-space: nowrap;
}

.cash-flow-amount {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.cash-flow-entry-link {
    color: #1a1a1a;
    text-decoration: none;
}

.cash-flow-entry-link:hover {
    text-decoration: underline;
}

.cash-flow-entry-origin {
    color: #999;
    display: block;
    font-size: 11px;
}

.cash-flow-table-total td {
    background: #f6f6f6;
    font-weight: 700;
}

.cash-flow-overdue-row td {
    background: #fff8f8;
}

/* Badges de situação ----------------------------------------------------- */

.cash-flow-status-badge {
    border-radius: 10px;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    white-space: nowrap;
}

.cash-flow-status-confirmado {
    background: #e8f7ea;
    color: #1f8a33;
}

.cash-flow-status-pendente {
    background: #fff4e5;
    color: #b26a00;
}

.cash-flow-status-atrasado {
    background: #fdecec;
    color: #b42318;
}

/* Resumo: extrato do período ---------------------------------------------- */

.cash-flow-block-title {
    font-size: 16px;
    margin: 18px 0 8px;
}

.cash-flow-block {
    padding: 0;
}

.cash-flow-kv-table {
    margin: 0;
    width: 100%;
}

.cash-flow-kv-table td {
    padding: 10px 16px;
}

.cash-flow-kv-table td:first-child {
    color: #444;
    width: 50%;
}

.cash-flow-kv-total td {
    background: #f6f6f6;
    font-weight: 700;
}

.cash-flow-extract-table {
    margin: 0;
}

.cash-flow-extract-table td {
    font-size: 13px;
}

.cash-flow-extract-opening td {
    background: #eef8f0;
    font-weight: 600;
}

.cash-flow-extract-in td {
    background: #eaf7ec;
}

.cash-flow-extract-out td {
    background: #fdeeee;
}

.cash-flow-extract-in:hover td {
    background: #dff2e3;
}

.cash-flow-extract-out:hover td {
    background: #fbe2e2;
}

.cash-flow-extract-empty {
    color: #777;
    padding: 24px 16px;
    text-align: center;
}

.cash-flow-block .cash-flow-notes {
    padding: 0 18px 16px 34px;
}

.cash-flow-notes {
    color: #666;
    font-size: 12px;
    margin: 18px 0 0;
    padding-left: 18px;
}

/* Diário ----------------------------------------------------------------- */

.cash-flow-day {
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

.cash-flow-day-head {
    align-items: center;
    background: #f6f6f6;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    padding: 8px 14px;
}

.cash-flow-day-date {
    font-size: 14px;
}

.cash-flow-day-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cash-flow-day-total {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.cash-flow-day-net,
.cash-flow-day-balance {
    color: #555;
}

.cash-flow-day-table td {
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
}

.cash-flow-day-type {
    white-space: nowrap;
    width: 140px;
}

.cash-flow-type-dot {
    border-radius: 50%;
    display: inline-block;
    height: 8px;
    margin-right: 6px;
    width: 8px;
}

.cash-flow-type-dot.is-in {
    background: #1f8a33;
}

.cash-flow-type-dot.is-out {
    background: #b42318;
}

/* Estatísticas ------------------------------------------------------------ */

.cash-flow-stats-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.cash-flow-chart-bars {
    align-items: flex-end;
    display: flex;
    gap: 6px;
    height: 180px;
    overflow-x: auto;
    padding-top: 8px;
}

.cash-flow-chart-column {
    display: flex;
    flex: 1 0 34px;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
    min-width: 34px;
}

.cash-flow-chart-stack {
    align-items: flex-end;
    display: flex;
    flex: 1;
    gap: 2px;
    justify-content: center;
}

.cash-flow-chart-bar {
    border-radius: 2px 2px 0 0;
    display: block;
    min-height: 1px;
    width: 12px;
}

.cash-flow-chart-bar.is-in {
    background: #2ea043;
}

.cash-flow-chart-bar.is-out {
    background: #d1493f;
}

.cash-flow-chart-label {
    color: #888;
    font-size: 10px;
    text-align: center;
}

.cash-flow-chart-legend {
    color: #666;
    display: flex;
    font-size: 12px;
    gap: 18px;
    margin-top: 10px;
}

.cash-flow-legend-swatch {
    border-radius: 2px;
    display: inline-block;
    height: 10px;
    margin-right: 5px;
    width: 10px;
}

.cash-flow-legend-swatch.is-in {
    background: #2ea043;
}

.cash-flow-legend-swatch.is-out {
    background: #d1493f;
}

.cash-flow-sparkline {
    display: block;
    height: 140px;
    width: 100%;
}

.cash-flow-sparkline-axis {
    color: #777;
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    margin-top: 6px;
}

.cash-flow-rank {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cash-flow-rank li {
    margin-bottom: 12px;
}

.cash-flow-rank-head {
    display: flex;
    font-size: 13px;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cash-flow-rank-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cash-flow-rank-value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

.cash-flow-rank-value span + span {
    margin-left: 8px;
}

.cash-flow-rank-bar {
    border-radius: 3px;
    display: block;
    height: 8px;
    min-width: 2px;
}

.cash-flow-rank-bar.is-in {
    background: #2ea043;
}

.cash-flow-rank-bar.is-out {
    background: #d1493f;
}

.cash-flow-rank-bar-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Demonstrativo ----------------------------------------------------------- */

.cash-flow-statement-table {
    width: 100%;
}

.cash-flow-statement-section td {
    background: #1f1f1f;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.cash-flow-statement-group td {
    background: #f4f4f4;
    font-weight: 700;
}

.cash-flow-statement-account td:first-child {
    padding-left: 32px;
}

.cash-flow-statement-total td {
    background: #eee;
    font-weight: 700;
}

.cash-flow-statement-result td {
    background: #1f1f1f;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.cash-flow-statement-result .is-positive {
    color: #7ee2a8;
}

.cash-flow-statement-result .is-negative {
    color: #ff9d95;
}

@media (max-width: 900px) {
    .cash-flow-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .cash-flow-versus-result {
        border-left: none;
        padding-left: 0;
    }

    .cash-flow-day-totals {
        gap: 10px;
    }
}

.report-result-summary {
    color: #666;
    font-size: 12px;
    padding: 12px 16px 0;
}

.report-table th.report-col-right,
.report-table td.report-col-right {
    text-align: right;
}

.report-table th.report-col-center,
.report-table td.report-col-center {
    text-align: center;
}

.report-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.report-columns-menu {
    max-height: 340px;
    min-width: 240px;
    overflow-y: auto;
    padding: 10px 12px;
}

.report-column-option {
    align-items: center;
    color: #333;
    cursor: pointer;
    display: flex;
    font-size: 13px;
    gap: 8px;
    padding: 5px 0;
}

.report-column-option input {
    margin: 0;
}

.report-columns-actions {
    border-top: 1px solid #e3e3e3;
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 10px;
}

.report-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 18px;
    max-width: 1180px;
}

.report-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-top: 3px solid #f5c400;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 148px;
    padding: 16px 18px 14px;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

a.report-card:hover {
    border-color: #f5c400;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.report-card-title {
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.report-card-description {
    color: #666;
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
}

.report-card-action {
    align-self: flex-start;
    background: #f5c400;
    border-radius: 3px;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    text-transform: uppercase;
}

.report-card.is-unavailable {
    background: #fafafa;
    border-top-color: #cfcfcf;
}

.report-card.is-unavailable .report-card-title {
    color: #8a8a8a;
}

.report-card.is-unavailable .report-card-description {
    color: #9a9a9a;
}

.report-card.is-unavailable .report-card-action {
    background: #e6e6e6;
    color: #8a8a8a;
}

@media (max-width: 700px) {
    .report-catalog-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Configurações — Usuários, Perfis e Permissões
   ========================================================================== */

.access-status-badge {
    border-radius: 3px;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    text-transform: uppercase;
}

.access-status-badge.is-active {
    background: #f5c400;
    color: #1f1f1f;
}

.access-status-badge.is-inactive {
    background: #e6e6e6;
    color: #6b6b6b;
}

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

.form-hint {
    color: #8a8a8a;
    font-size: 12px;
    margin: 4px 0 0;
}

.permission-matrix-label {
    color: #1f1f1f;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
}

.permission-matrix-table th.permission-matrix-action,
.permission-matrix-table td.permission-matrix-action {
    text-align: center;
    white-space: nowrap;
    width: 110px;
}

.permission-matrix-checkbox {
    cursor: pointer;
    display: inline-flex;
    margin: 0;
}

.permission-matrix-checkbox input[type="checkbox"] {
    accent-color: #f5c400;
    height: 16px;
    width: 16px;
}

.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;
}

/* Foto do usuário — avatar e fallback de iniciais */

.user-name-cell {
    align-items: center;
    display: inline-flex;
    gap: 10px;
}

.user-avatar {
    align-items: center;
    background: #1f1f1f;
    border-radius: 50%;
    color: #f5c400;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-transform: uppercase;
    width: 34px;
}

.user-avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.user-avatar-sm {
    font-size: 12px;
    height: 30px;
    width: 30px;
}

.user-avatar-lg {
    border: 2px solid #f5c400;
    font-size: 24px;
    height: 84px;
    width: 84px;
}

.user-photo-field-row {
    align-items: flex-start;
    display: flex;
    gap: 16px;
}

.user-photo-field-input {
    flex: 1;
    min-width: 0;
}

.user-photo-remove {
    align-items: center;
    color: #1f1f1f;
    display: inline-flex;
    font-size: 13px;
    gap: 6px;
    margin-top: 8px;
}

.user-photo-remove input[type="checkbox"] {
    accent-color: #f5c400;
    height: 15px;
    width: 15px;
}

/* Topbar — identidade do usuário e frase motivacional */

.topbar {
    justify-content: space-between;
    height: 72px;
}

.topbar-identity {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.topbar-identity .user-avatar {
    background: #2e2e2e;
    border: 2px solid #f5c400;
    height: 54px;
    width: 54px;
}

.topbar-identity-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.topbar-user-name {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.topbar-greeting {
    color: #d8d8d8;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.topbar-user-role {
    color: #f5c400;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.topbar-divider {
    background: #3d3d3d;
    display: inline-block;
    flex: 0 0 auto;
    height: 26px;
    width: 1px;
}

.topbar-quote {
    color: #cfcfcf;
    font-size: 13px;
    font-style: italic;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .topbar-divider,
    .topbar-quote {
        display: none;
    }
}
/* Dashboard */
.edk-dashboard { margin: 0 auto; max-width: 1680px; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; }
.dashboard-heading p { margin: 6px 0 0; color: #6b7280; text-transform: capitalize; }
.dashboard-eyebrow, .dashboard-panel-kicker { color: #b88a00; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dashboard-workspace { align-items: stretch; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(310px, 360px); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dashboard-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 8px 24px rgba(17, 24, 39, .05); padding: 16px 18px; min-width: 0; }
.dashboard-panel-wide { grid-column: 1 / -1; }
.dashboard-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.dashboard-panel-head h2 { margin: 4px 0 0; color: #202124; font-size: 1.15rem; }
.dashboard-panel-head a { color: #8d6900; font-size: .86rem; font-weight: 700; }
.dashboard-summary-row { display: grid; gap: 12px; grid-template-columns: minmax(170px, .7fr) minmax(170px, .7fr) minmax(390px, 2fr); }
.dashboard-daily-card, .dashboard-monthly-card { border-radius: 5px; box-shadow: 0 6px 17px rgba(17, 17, 17, .09); min-width: 0; overflow: hidden; }
.dashboard-daily-card { display: flex; flex-direction: column; justify-content: space-between; padding: 12px 14px 0; }
.dashboard-daily-card > span { font-size: .72rem; font-weight: 800; }
.dashboard-daily-card > strong { display: block; font-size: 1.55rem; margin: 5px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-daily-card > small { margin: 0 -14px; padding: 5px 12px; text-align: center; }
.dashboard-daily-receivable { background: #171717; color: #fff; }
.dashboard-daily-receivable > strong { color: #f0c52f; }
.dashboard-daily-receivable > small { background: #070707; color: #e7c34a; }
.dashboard-daily-payable { background: #efc329; color: #171717; }
.dashboard-daily-payable > small { background: #d6a900; color: #171717; }
.dashboard-monthly-card { background: #171717; color: #fff; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px 14px; }
.dashboard-monthly-item { display: grid; gap: 9px; grid-template-columns: minmax(105px, .8fr) minmax(125px, 1.2fr); min-width: 0; padding: 0 13px; }
.dashboard-monthly-item + .dashboard-monthly-item { border-left: 1px solid #4a4a4a; }
.dashboard-monthly-heading > span { color: #f1f1f1; display: block; font-size: .7rem; font-weight: 800; margin-bottom: 8px; }
.dashboard-donut { align-items: center; background: conic-gradient(#efc329 var(--progress), #4a4a4a 0); border-radius: 50%; display: flex; height: 55px; justify-content: center; position: relative; width: 55px; }
.dashboard-donut::before { background: #171717; border-radius: inherit; content: ''; inset: 6px; position: absolute; }
.dashboard-donut strong { color: #fff; font-size: .72rem; position: relative; z-index: 1; }
.dashboard-monthly-item dl { align-self: center; margin: 14px 0 0; min-width: 0; }
.dashboard-monthly-item dl div { display: flex; font-size: .65rem; gap: 4px; justify-content: space-between; margin: 3px 0; }
.dashboard-monthly-item dt { color: #b9b9b9; }
.dashboard-monthly-item dd { color: #f0c52f; font-weight: 800; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-monthly-item > small { align-self: center; color: #b9b9b9; font-size: .68rem; }
.dashboard-sales-panel { border-radius: 4px; padding-bottom: 10px; }
.dashboard-sales-chart { align-items: end; border-bottom: 1px solid #d9d9d9; display: grid; gap: 12px; grid-template-columns: repeat(6, minmax(0, 1fr)); height: 122px; padding: 15px 8px 0; }
.dashboard-sales-column { align-items: center; align-self: stretch; display: grid; grid-template-rows: 18px minmax(45px, 1fr) 20px; min-width: 0; text-align: center; }
.dashboard-sales-value { color: #555; font-size: .62rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-sales-track { align-items: end; display: flex; height: 100%; justify-content: center; }
.dashboard-sales-track i { background: linear-gradient(180deg, #efc535 0%, #a87d00 100%); border-radius: 2px 2px 0 0; box-shadow: 0 3px 8px rgba(123, 91, 0, .18); display: block; min-height: 0; width: min(52px, 68%); }
.dashboard-sales-column strong { color: #555; font-size: .68rem; text-transform: capitalize; }
.dashboard-annual-panel { align-self: stretch; border-radius: 4px; overflow: hidden; padding: 0; }
.dashboard-annual-tabs { background: #ededed; display: grid; grid-template-columns: repeat(3, 1fr); }
.dashboard-annual-tabs span, .dashboard-annual-tabs strong { color: #404040; font-size: .65rem; padding: 8px 5px; text-align: center; text-transform: uppercase; }
.dashboard-annual-tabs strong { background: #fff; border-top: 3px solid #d6a900; color: #171717; padding-top: 5px; }
.dashboard-year-filter { align-items: center; display: grid; gap: 10px; grid-template-columns: 1fr 125px; padding: 10px 12px; }
.dashboard-year-filter label { color: #555; font-size: .68rem; }
.dashboard-year-filter select { background: #fff; border: 1px solid #b99a31; color: #171717; font: inherit; padding: 6px 8px; }
.dashboard-annual-table { border-collapse: collapse; font-size: .65rem; table-layout: fixed; width: 100%; }
.dashboard-annual-table caption { color: #202020; font-size: .8rem; font-weight: 800; padding: 6px 10px; text-align: left; }
.dashboard-annual-table th, .dashboard-annual-table td { border: 1px solid #dedede; overflow: hidden; padding: 5px 6px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-annual-table thead th { background: #171717; color: #fff; font-size: .62rem; text-transform: uppercase; }
.dashboard-annual-table thead th:nth-child(2), .dashboard-annual-table thead th:nth-child(4) { background: #d6a900; color: #171717; }
.dashboard-annual-table tbody th { background: #f2f2f2; color: #333; font-weight: 700; text-align: center; text-transform: uppercase; }
.dashboard-annual-table tbody td:nth-child(2) { background: #fff8dc; }
.dashboard-annual-table tbody td:nth-child(3) { color: #806000; font-weight: 900; text-align: center; }
.dashboard-annual-table tbody td:nth-child(4) { background: #f3f3f3; }
.dashboard-table-wrap { max-height: 158px; overflow: auto; }
.dashboard-table { width: 100%; border-collapse: collapse; }
.dashboard-table th { color: #6b7280; font-size: .72rem; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.dashboard-table th, .dashboard-table td { border-bottom: 1px solid #edf0f2; padding: 8px 9px; vertical-align: middle; }
.dashboard-table td a { color: #8d6900; font-weight: 800; }
.dashboard-table td small { color: #6b7280; display: block; margin-top: 3px; }
.dashboard-progress { background: #eceff1; border-radius: 999px; height: 7px; min-width: 100px; overflow: hidden; }
.dashboard-progress span { background: linear-gradient(90deg, #c99700, #f0bf22); border-radius: inherit; display: block; height: 100%; }
.dashboard-total { font-size: 1.2rem; white-space: nowrap; }
.dashboard-total-payable { color: #a33a2b; }
.dashboard-total-receivable { color: #23784a; }
.dashboard-finance-list { list-style: none; margin: 0; max-height: 112px; overflow: auto; padding: 0; }
.dashboard-finance-list li { display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid #edf0f2; padding: 8px 0; }
.dashboard-finance-list li:first-child { border-top: 0; }
.dashboard-empty { color: #7a8088; font-style: normal; margin: 12px 0; text-align: center; }
.dashboard-notice { background: #fff8dc; border: 1px solid #ead38a; border-radius: 10px; color: #6f5708; padding: 14px 16px; }
.dashboard-agenda-form { display: grid; grid-template-columns: 135px 105px minmax(190px, 1fr) 145px; gap: 8px 10px; margin-bottom: 12px; }
.dashboard-agenda-form label { color: #4b5563; font-size: .78rem; font-weight: 700; }
.dashboard-agenda-form input, .dashboard-agenda-form select, .dashboard-agenda-form textarea, .dashboard-appointment select { background: #fff; border: 1px solid #cfd4da; border-radius: 7px; color: #202124; display: block; font: inherit; margin-top: 4px; padding: 7px 9px; width: 100%; }
.agenda-description-field { grid-column: 1 / -2; }
.dashboard-agenda-form .btn { align-self: end; min-height: 35px; }
.dashboard-agenda-list { display: grid; gap: 7px; max-height: 155px; overflow: auto; }
.dashboard-appointment { align-items: center; background: #f8f9fa; border-left: 4px solid #d6a900; border-radius: 8px; display: grid; grid-template-columns: 64px minmax(0, 1fr) 135px; gap: 12px; padding: 8px 11px; }
.dashboard-appointment time { text-align: center; }
.dashboard-appointment time strong, .dashboard-appointment time span { display: block; }
.dashboard-appointment time strong { color: #8d6900; font-size: 1.05rem; }
.dashboard-appointment h3 { font-size: .98rem; margin: 0; }
.dashboard-appointment p { color: #6b7280; margin: 4px 0 0; }
.dashboard-appointment-meta { color: #8d6900; display: block; font-size: .72rem; margin-top: 3px; }
.dashboard-status { border-radius: 999px; background: #e9ecef; font-size: .75rem; font-weight: 700; padding: 6px 10px; text-align: center; }
.dashboard-ai-panel { align-self: start; display: flex; flex-direction: column; max-height: 365px; min-height: 0; overflow: hidden; padding: 0; }
.dashboard-ai-head { align-items: center; background: #171717; border-bottom: 3px solid #d6a900; color: #fff; display: flex; justify-content: space-between; padding: 12px 14px; }
.dashboard-ai-identity { align-items: center; display: flex; gap: 13px; }
.dashboard-ai-identity h2 { color: #fff; font-size: 1.15rem; margin: 3px 0 0; }
.dashboard-ai-mark { align-items: center; background: linear-gradient(145deg, #f2c12d, #a87800); border: 1px solid #f4cf55; border-radius: 10px; display: flex; gap: 3px; height: 34px; justify-content: center; width: 34px; }
.dashboard-ai-mark span { animation: dashboard-ai-pulse 1.5s ease-in-out infinite; background: #171717; border-radius: 50%; height: 5px; width: 5px; }
.dashboard-ai-mark span:nth-child(2) { animation-delay: .15s; }
.dashboard-ai-mark span:nth-child(3) { animation-delay: .3s; }
.dashboard-ai-status { border: 1px solid #806a20; border-radius: 999px; color: #e8c95f; font-size: .7rem; font-weight: 800; letter-spacing: .08em; padding: 6px 10px; text-transform: uppercase; }
.dashboard-ai-conversation { background: linear-gradient(180deg, #fafafa 0%, #fff 100%); flex: 1; min-height: 125px; overflow-y: auto; padding: 14px 12px; }
.dashboard-ai-message { align-items: flex-start; display: flex; gap: 11px; max-width: 520px; }
.dashboard-ai-message > div { background: #f3f4f6; border: 1px solid #e1e3e6; border-radius: 4px 14px 14px 14px; padding: 11px 14px; }
.dashboard-ai-message strong { color: #8d6900; display: block; font-size: .73rem; letter-spacing: .05em; margin-bottom: 4px; text-transform: uppercase; }
.dashboard-ai-message p { color: #2d3035; line-height: 1.5; margin: 0; }
.dashboard-ai-message + .dashboard-ai-message { margin-top: 14px; }
.dashboard-ai-message p { white-space: pre-line; }
.dashboard-ai-message-user { flex-direction: row-reverse; margin-left: auto; }
.dashboard-ai-message-user > div { background: #fff8dc; border-color: #e4c65f; border-radius: 14px 4px 14px 14px; }
.dashboard-ai-message-user .dashboard-ai-avatar { background: #d6a900; color: #171717; }
.dashboard-ai-table-wrap { margin-top: 10px; max-width: 100%; overflow-x: auto; }
.dashboard-ai-table { border-collapse: collapse; font-size: .75rem; min-width: 690px; width: 100%; }
.dashboard-ai-table th { background: #e7e9ec; color: #30343a; font-weight: 800; text-align: left; }
.dashboard-ai-table th, .dashboard-ai-table td { border: 1px solid #cdd1d6; padding: 7px 8px; white-space: nowrap; }
.dashboard-ai-table tbody tr:nth-child(even) { background: #faf8ef; }
.dashboard-ai-avatar { align-items: center; background: #171717; border: 2px solid #d6a900; border-radius: 50%; color: #f0c43a; display: flex; flex: 0 0 36px; font-size: .68rem; font-weight: 900; height: 36px; justify-content: center; width: 36px; }
.dashboard-ai-composer { align-items: center; border-top: 1px solid #e4e6e8; display: flex; gap: 7px; padding: 10px 12px 6px; }
.dashboard-ai-composer input { background: #f7f7f7; border: 1px solid #d5d8dc; border-radius: 9px; color: #6b7280; flex: 1; font: inherit; min-width: 0; padding: 9px 10px; }
.dashboard-ai-composer input:disabled { cursor: not-allowed; opacity: 1; }
.dashboard-ai-composer input:focus { border-color: #d6a900; box-shadow: 0 0 0 3px rgba(214,169,0,.14); outline: 0; }
.dashboard-ai-composer button { align-items: center; background: #171717; border: 1px solid #171717; border-radius: 9px; color: #dcb222; display: flex; font: inherit; font-weight: 800; gap: 6px; justify-content: center; padding: 9px 11px; }
.dashboard-ai-composer button:disabled { cursor: not-allowed; opacity: .58; }
.dashboard-ai-composer button:not(:disabled) { cursor: pointer; }
.dashboard-ai-note { color: #858b93; font-size: .66rem; margin: 0; padding: 0 12px 9px; text-align: right; }
.dashboard-ai-overlay[hidden] { display: none; }
.dashboard-ai-overlay { align-items: flex-start; background: rgba(0, 0, 0, .52); display: flex; inset: 0; justify-content: flex-end; padding: 70px 22px 22px; position: fixed; z-index: 1200; }
.dashboard-ai-overlay .dashboard-ai-panel { max-height: min(520px, calc(100vh - 92px)); min-height: 360px; width: min(520px, 100%); }
.dashboard-ai-overlay .dashboard-ai-conversation { min-height: 190px; }
.dashboard-ai-head-actions { align-items: center; display: flex; gap: 8px; }
.dashboard-ai-close { align-items: center; background: transparent; border: 1px solid #6d5c1c; border-radius: 50%; color: #f0c329; cursor: pointer; display: flex; font-size: 1.2rem; height: 28px; justify-content: center; line-height: 1; width: 28px; }
.dashboard-ai-open { overflow: hidden; }
@keyframes dashboard-ai-pulse {
    0%, 100% { opacity: .45; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}

/* Agenda de compromissos */
.agenda-page, .agenda-form-page { margin: 0 auto; max-width: 1560px; }
.agenda-page-head { align-items: center; display: flex; gap: 24px; justify-content: space-between; margin-bottom: 20px; }
.agenda-page-head .page-title { margin: 3px 0 0; }
.agenda-page-head p { color: #6b7280; margin: 5px 0 0; }
.agenda-reminders { align-items: flex-start; background: #fff7d6; border: 1px solid #e4c75b; border-left: 4px solid #c79600; border-radius: 10px; color: #604c0a; display: flex; gap: 18px; margin-bottom: 14px; padding: 11px 14px; }
.agenda-reminders > div { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.agenda-reminders a { color: #6f5708; font-weight: 700; }
.agenda-toolbar { align-items: center; background: #171717; border-bottom: 3px solid #d6a900; border-radius: 13px 13px 0 0; color: #fff; display: flex; gap: 20px; justify-content: space-between; padding: 13px 16px; }
.agenda-navigation, .agenda-view-switch { align-items: center; display: flex; gap: 7px; }
.agenda-navigation a, .agenda-view-switch a { align-items: center; border: 1px solid #4b4b4b; border-radius: 7px; color: #fff; display: flex; font-weight: 700; height: 34px; justify-content: center; min-width: 34px; padding: 0 9px; text-decoration: none; }
.agenda-navigation a:hover, .agenda-view-switch a:hover, .agenda-view-switch a.active { background: #d6a900; border-color: #d6a900; color: #171717; }
.agenda-navigation h2 { font-size: 1.08rem; margin: 0 0 0 9px; text-transform: capitalize; }
.agenda-navigation .agenda-today { font-size: .78rem; }
.agenda-view-switch a { font-size: .78rem; min-width: auto; }
.agenda-filters { align-items: end; background: #fff; border: 1px solid #e1e3e6; border-top: 0; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(150px, 220px)) auto auto 1fr; padding: 11px 15px; }
.agenda-filters label, .agenda-form-grid label { color: #4b5563; font-size: .76rem; font-weight: 800; }
.agenda-filters select, .agenda-form-grid input, .agenda-form-grid select, .agenda-form-grid textarea { background: #fff; border: 1px solid #cfd4da; border-radius: 7px; color: #202124; display: block; font: inherit; margin-top: 4px; padding: 9px 10px; width: 100%; }
.agenda-filters > a { align-self: center; color: #806000; font-size: .82rem; font-weight: 700; }
.agenda-calendar { background: #dfe2e5; border: 1px solid #dfe2e5; border-radius: 0 0 13px 13px; display: grid; gap: 1px; grid-template-columns: repeat(7, minmax(110px, 1fr)); overflow: hidden; }
.agenda-weekday { background: #f0f1f2; color: #656b73; font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 7px 10px; text-align: center; text-transform: uppercase; }
.agenda-day { background: #fff; min-height: 126px; padding: 7px; position: relative; }
.agenda-day.is-outside { background: #f7f7f7; color: #a0a4aa; }
.agenda-day.is-today { box-shadow: inset 0 0 0 2px #d6a900; }
.agenda-day > header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 5px; }
.agenda-day > header span { color: #6b7280; font-size: .78rem; font-weight: 700; }
.agenda-day > header a { align-items: center; border-radius: 50%; color: #30343a; display: flex; font-size: .79rem; font-weight: 800; height: 25px; justify-content: center; width: 25px; }
.agenda-day.is-today > header a { background: #d6a900; color: #171717; }
.agenda-day-events { display: grid; gap: 4px; max-height: 93px; overflow-y: auto; }
.agenda-event { background: #f5e8b4; border-left: 3px solid #b78900; border-radius: 5px; color: #342b0f; display: grid; font-size: .7rem; gap: 1px 5px; grid-template-columns: auto minmax(0, 1fr); line-height: 1.25; overflow: hidden; padding: 5px 6px; text-decoration: none; }
.agenda-event time { font-weight: 900; }
.agenda-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-event small { color: #6b6250; grid-column: 1 / -1; }
.agenda-event.status-concluido { background: #ddf2e7; border-left-color: #2f8a5b; color: #205d3e; }
.agenda-event.status-cancelado { background: #f0f0f0; border-left-color: #8c9299; color: #737880; text-decoration: line-through; }
.agenda-event-producao, .agenda-event-engenharia { background: #e4ebf6; border-left-color: #436a9d; color: #294666; }
.agenda-event-financeiro, .agenda-event-venda, .agenda-event-orcamento { background: #f5e8b4; border-left-color: #b78900; }
.agenda-day-add { align-items: center; background: #171717; border-radius: 50%; bottom: 6px; color: #e6bd30; display: flex; font-size: 1rem; height: 22px; justify-content: center; opacity: 0; position: absolute; right: 6px; transition: opacity .15s ease; width: 22px; }
.agenda-day:hover .agenda-day-add, .agenda-day-add:focus { opacity: 1; }
.agenda-calendar-week .agenda-day { min-height: 480px; }
.agenda-calendar-week .agenda-day-events { max-height: 430px; }
.agenda-calendar-day { grid-template-columns: 1fr; }
.agenda-calendar-day .agenda-day { min-height: 520px; padding: 18px; }
.agenda-calendar-day .agenda-day-events { gap: 8px; max-height: 450px; }
.agenda-calendar-day .agenda-event { font-size: .86rem; padding: 10px; }
.agenda-day-empty { color: #858b93; padding: 30px 10px; text-align: center; }
.agenda-form-card { display: grid; gap: 16px; }
.agenda-form-section { background: #fff; border: 1px solid #e0e3e6; border-radius: 13px; box-shadow: 0 7px 22px rgba(17, 24, 39, .04); padding: 20px; }
.agenda-form-section-title { align-items: center; border-bottom: 1px solid #eceef0; display: flex; gap: 12px; margin-bottom: 16px; padding-bottom: 13px; }
.agenda-form-section-title > span { align-items: center; background: #171717; border: 2px solid #d6a900; border-radius: 50%; color: #e3ba2b; display: flex; flex: 0 0 34px; font-weight: 900; height: 34px; justify-content: center; width: 34px; }
.agenda-form-section-title h2 { font-size: 1rem; margin: 0; }
.agenda-form-section-title p { color: #7a8088; font-size: .78rem; margin: 3px 0 0; }
.agenda-form-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.agenda-field-wide { grid-column: span 2; }
.agenda-field-full { grid-column: 1 / -1; }
.agenda-form-grid textarea { resize: vertical; }
.agenda-form-actions { align-items: center; display: grid; gap: 10px; grid-template-columns: auto 1fr auto auto; }

@media (max-width: 1100px) {
    .agenda-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; }
    .agenda-calendar { overflow-x: auto; }
    .agenda-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .agenda-page-head, .agenda-toolbar { align-items: stretch; flex-direction: column; }
    .agenda-navigation { flex-wrap: wrap; }
    .agenda-navigation h2 { flex: 1 0 100%; margin: 5px 0 0; }
    .agenda-view-switch a { flex: 1; }
    .agenda-filters { grid-template-columns: 1fr 1fr; }
    .agenda-calendar { grid-template-columns: repeat(7, minmax(92px, 1fr)); }
    .agenda-form-grid { grid-template-columns: 1fr; }
    .agenda-field-wide, .agenda-field-full { grid-column: auto; }
    .agenda-form-actions { grid-template-columns: 1fr 1fr; }
    .agenda-form-actions > span { display: none; }
}
@media (min-width: 1201px) and (min-height: 700px) {
    .page-dashboard .main-area { height: 100vh; overflow: hidden; }
    .page-dashboard .content { min-height: 0; overflow: hidden; padding: 14px 20px 16px; }
    .page-dashboard .edk-dashboard { display: flex; flex-direction: column; height: 100%; }
    .page-dashboard .dashboard-heading { flex: 0 0 auto; }
    .page-dashboard .dashboard-heading .page-title { font-size: 24px; margin-bottom: 0; }
    .page-dashboard .dashboard-heading p { margin-top: 2px; }
    .page-dashboard .dashboard-workspace { flex: 1; min-height: 0; }
    .page-dashboard .dashboard-main-grid { grid-template-rows: 126px 174px minmax(125px, 1fr); min-height: 0; }
    .page-dashboard .dashboard-panel { overflow: hidden; }
}
@media (max-width: 900px) {
    .dashboard-workspace { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-panel-wide { grid-column: auto; }
    .dashboard-agenda-form { grid-template-columns: 1fr 1fr; }
    .agenda-title-field, .agenda-description-field { grid-column: 1 / -1; }
    .dashboard-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-monthly-card { grid-column: 1 / -1; }
    .dashboard-ai-panel { max-height: 365px; min-height: 300px; }
    .dashboard-annual-panel { min-height: 460px; }
}
@media (max-width: 620px) {
    .dashboard-panel { padding: 16px; }
    .dashboard-panel-head { align-items: flex-start; flex-direction: column; gap: 8px; }
    .dashboard-summary-row { grid-template-columns: 1fr; }
    .dashboard-monthly-card { grid-column: auto; grid-template-columns: 1fr; }
    .dashboard-monthly-item + .dashboard-monthly-item { border-left: 0; border-top: 1px solid #4a4a4a; margin-top: 10px; padding-top: 10px; }
    .dashboard-sales-chart { gap: 5px; padding-inline: 0; }
    .dashboard-sales-value { font-size: .54rem; }
    .dashboard-agenda-form { grid-template-columns: 1fr; }
    .agenda-title-field, .agenda-description-field { grid-column: auto; }
    .dashboard-appointment { grid-template-columns: 60px minmax(0, 1fr); }
    .dashboard-appointment form, .dashboard-appointment > .dashboard-status { grid-column: 1 / -1; }
    .dashboard-ai-head { padding: 15px 16px; }
    .dashboard-ai-conversation { min-height: 150px; padding: 20px 16px; }
    .dashboard-ai-composer { padding: 13px 16px 8px; }
    .dashboard-ai-composer button { padding-inline: 13px; }
    .dashboard-ai-composer button span:first-child { display: none; }
    .topbar-ai-button > strong { display: none; }
    .topbar-ai-button { border-radius: 50%; padding: 0 6px; }
    .dashboard-ai-overlay { padding: 64px 8px 8px; }
    .dashboard-ai-note { padding: 0 16px 14px; text-align: left; }
}

/* Configurações das duas empresas */
.companies-page, .company-form-page { margin: 0 auto; max-width: 1500px; }
.companies-page-head { align-items: center; display: flex; gap: 24px; justify-content: space-between; margin-bottom: 20px; }
.companies-page-head .page-title { margin: 4px 0 0; }
.companies-page-head p { color: #6b7280; margin: 5px 0 0; }
.companies-scope-notice { align-items: center; background: #171717; border-left: 5px solid #d6a900; border-radius: 10px; color: #fff; display: flex; gap: 18px; margin-bottom: 18px; padding: 14px 17px; }
.companies-scope-notice strong { color: #e6bd30; white-space: nowrap; }
.companies-scope-notice span { color: #d4d4d4; }
.companies-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.company-card { background: #fff; border: 1px solid #e0e3e6; border-radius: 14px; box-shadow: 0 8px 24px rgba(17, 24, 39, .05); padding: 20px; }
.company-card > header { align-items: flex-start; border-bottom: 1px solid #eceef0; display: grid; gap: 13px; grid-template-columns: 46px minmax(0, 1fr) auto; padding-bottom: 15px; }
.company-card-mark { align-items: center; background: #171717; border: 3px solid #d6a900; border-radius: 12px; color: #e9c035; display: flex; font-size: 1.2rem; font-weight: 900; height: 46px; justify-content: center; width: 46px; }
.company-card header > div > span { color: #9b7500; font-size: .7rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.company-card h2 { font-size: 1.08rem; margin: 2px 0; }
.company-card p { color: #737981; margin: 0; }
.company-active-badge, .certificate-status { border-radius: 999px; display: inline-block; font-size: .7rem; font-weight: 900; padding: 5px 9px; }
.company-active-badge.active, .certificate-status-valid { background: #dcf3e7; color: #236b45; }
.company-active-badge.inactive, .certificate-status-danger { background: #f8dfdc; color: #943d32; }
.certificate-status-warning { background: #fff0c2; color: #805f00; }
.certificate-status-empty { background: #eceef0; color: #6e747b; }
.company-card dl { display: grid; gap: 0 20px; grid-template-columns: 1fr 1fr; margin: 13px 0 17px; }
.company-card dl > div { border-bottom: 1px solid #eff1f2; padding: 10px 0; }
.company-card dt { color: #747a82; font-size: .69rem; font-weight: 800; text-transform: uppercase; }
.company-card dd { color: #25282c; font-weight: 700; margin: 4px 0 0; }
.company-card-empty { align-items: center; border: 2px dashed #d5d8dc; box-shadow: none; display: flex; flex-direction: column; justify-content: center; min-height: 310px; text-align: center; }
.company-card-empty-icon { align-items: center; background: #f6edcb; border-radius: 50%; color: #947000; display: flex; font-size: 2rem; height: 62px; justify-content: center; margin-bottom: 10px; width: 62px; }
.company-card-empty p { max-width: 430px; }
.company-form { display: grid; gap: 16px; }
.company-form-section { background: #fff; border: 1px solid #e0e3e6; border-radius: 14px; box-shadow: 0 7px 22px rgba(17, 24, 39, .04); padding: 20px; }
.company-section-head { align-items: center; border-bottom: 1px solid #eceef0; display: flex; gap: 12px; margin-bottom: 17px; padding-bottom: 13px; }
.company-section-head > span { align-items: center; background: #171717; border: 2px solid #d6a900; border-radius: 50%; color: #e7bd2f; display: flex; flex: 0 0 36px; font-weight: 900; height: 36px; justify-content: center; width: 36px; }
.company-section-head h2 { font-size: 1.03rem; margin: 0; }
.company-section-head p { color: #777d85; font-size: .78rem; margin: 3px 0 0; }
.company-form-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.company-form-grid label, .company-certificate-form label { color: #4b5563; font-size: .76rem; font-weight: 800; }
.company-form-grid input, .company-form-grid select, .company-form-grid textarea, .company-certificate-form input { background: #fff; border: 1px solid #cfd4da; border-radius: 7px; color: #202124; display: block; font: inherit; margin-top: 5px; padding: 9px 10px; width: 100%; }
.company-field-wide { grid-column: span 2; }
.company-field-full { grid-column: 1 / -1; }
.company-check { align-items: center; align-self: end; display: flex; gap: 8px; min-height: 40px; }
.company-check input { margin: 0; width: auto; }
.company-fiscal-warning { background: #fff8dc; border: 1px solid #ead38a; border-radius: 8px; color: #70580b; margin-top: 15px; padding: 11px 13px; }
.company-form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.company-certificate-section { margin-top: 16px; }
.company-certificate-current { background: #f7f8f9; border: 1px solid #e0e3e6; border-radius: 10px; display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; padding: 14px; }
.company-certificate-current small, .company-certificate-current strong { display: block; }
.company-certificate-current small { color: #777d85; font-size: .69rem; font-weight: 800; margin-bottom: 5px; text-transform: uppercase; }
.company-certificate-current strong { overflow-wrap: anywhere; }
.company-certificate-empty { background: #f6f7f8; border: 1px dashed #cdd1d5; border-radius: 9px; color: #70767e; margin-bottom: 16px; padding: 18px; text-align: center; }
.company-certificate-form { align-items: end; display: grid; gap: 12px; grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) auto; }
.company-security-note { color: #737981; font-size: .72rem; margin: 10px 0 0; }
@media (max-width: 980px) {
    .companies-grid { grid-template-columns: 1fr; }
    .company-form-grid, .company-certificate-current { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .company-certificate-form { grid-template-columns: 1fr 1fr; }
    .company-certificate-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
    .companies-page-head, .companies-scope-notice { align-items: stretch; flex-direction: column; }
    .companies-scope-notice strong { white-space: normal; }
    .company-card > header { grid-template-columns: 46px minmax(0, 1fr); }
    .company-active-badge { grid-column: 1 / -1; justify-self: start; }
    .company-card dl, .company-form-grid, .company-certificate-current, .company-certificate-form { grid-template-columns: 1fr; }
    .company-field-wide, .company-field-full { grid-column: auto; }
    .company-form-actions { flex-direction: column-reverse; }
}

/* Header ampliado exclusivamente no Dashboard */
.page-dashboard .topbar {
    gap: 34px;
    height: 128px;
    padding: 0 38px;
}

.page-dashboard .topbar-identity {
    gap: 20px;
}

.page-dashboard .topbar-identity .user-avatar {
    border-width: 4px;
    flex: 0 0 96px;
    height: 96px;
    width: 96px;
}

.page-dashboard .topbar-identity .user-avatar img {
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.page-dashboard .topbar-greeting {
    font-size: 16px;
}

.page-dashboard .topbar-user-name {
    font-size: 22px;
    letter-spacing: .7px;
}

.page-dashboard .topbar-user-role {
    font-size: 15px;
    letter-spacing: .9px;
    margin-top: 2px;
}

.page-dashboard .topbar-divider {
    background: #665711;
    height: 58px;
}

.page-dashboard .topbar-quote {
    color: #e3e3e3;
    font-size: 19px;
    line-height: 1.45;
    max-width: min(48vw, 760px);
}

.page-dashboard .topbar-bell {
    font-size: 29px;
}

.page-dashboard .topbar-logout {
    padding: 12px 19px;
}

@media (max-width: 1200px) {
    .page-dashboard .topbar {
        height: 112px;
        padding: 0 26px;
    }

    .page-dashboard .topbar-identity .user-avatar {
        flex-basis: 82px;
        height: 82px;
        width: 82px;
    }

    .page-dashboard .topbar-quote {
        font-size: 16px;
        max-width: 38vw;
    }
}

@media (max-width: 900px) {
    .page-dashboard .topbar {
        gap: 16px;
        height: 98px;
        padding: 0 18px;
    }

    .page-dashboard .topbar-identity .user-avatar {
        flex-basis: 70px;
        height: 70px;
        width: 70px;
    }

    .page-dashboard .topbar-user-name {
        font-size: 18px;
    }

    .page-dashboard .topbar-user-role {
        font-size: 13px;
    }
}

@media (max-width: 620px) {
    .page-dashboard .topbar {
        gap: 10px;
        height: 90px;
        padding: 0 12px;
    }

    .page-dashboard .topbar-identity {
        gap: 9px;
    }

    .page-dashboard .topbar-identity .user-avatar {
        flex-basis: 62px;
        height: 62px;
        width: 62px;
    }

    .page-dashboard .topbar-greeting {
        font-size: 12px;
    }

    .page-dashboard .topbar-user-name {
        font-size: 16px;
    }

    .page-dashboard .topbar-user-role {
        font-size: 11px;
        letter-spacing: .5px;
    }

    .page-dashboard .topbar-actions {
        gap: 8px;
    }

    .page-dashboard .topbar-logout {
        padding: 8px 10px;
    }
}

/* Central de e-mail corporativo */
.mail-page{display:grid;grid-template-columns:250px minmax(0,1fr);gap:18px;min-height:calc(100vh - 112px)}
.mail-sidebar,.mail-main,.mail-compose-form,.mail-message,.mail-account-grid article{background:#fff;border:1px solid #dedede;border-radius:14px}
.mail-sidebar{padding:16px;overflow:auto}.mail-compose-btn{display:block;background:#151515;color:#fff;border:2px solid #d8ad00;border-radius:10px;padding:12px;text-align:center;font-weight:800;text-decoration:none}
.mail-folders,.mail-accounts{display:grid;gap:4px;margin-top:14px}.mail-folders a,.mail-accounts a{padding:9px 10px;border-radius:8px;color:#343434;text-decoration:none}.mail-folders a.active,.mail-accounts a.active{background:#fff5cc;color:#6f5600;font-weight:800}.mail-accounts small{display:block;color:#777;overflow:hidden;text-overflow:ellipsis}.mail-sidebar h3{font-size:12px;text-transform:uppercase;color:#8b6b00;margin:20px 10px 4px}
.mail-main{padding:18px;min-width:0}.mail-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}.mail-head h1{margin:3px 0;font-size:28px}.mail-head p{margin:0;color:#666}.mail-offline-badge{background:#eee;color:#555;border-radius:20px;padding:7px 11px;font-size:11px;font-weight:800;text-transform:uppercase}
.mail-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mail-head-actions form{margin:0}
.mail-receive-button{min-width:190px}.mail-receive-button:disabled{cursor:wait;opacity:.88}.mail-receive-loading{align-items:center;justify-content:center;gap:4px}.mail-receive-loading:not([hidden]){display:inline-flex}.mail-receive-loading i{display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.2;animation:mailReceivingDot 1.2s infinite ease-in-out}.mail-receive-loading i:nth-child(2){animation-delay:.2s}.mail-receive-loading i:nth-child(3){animation-delay:.4s}@keyframes mailReceivingDot{0%,60%,100%{opacity:.2;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)}}
.mail-success-toast{position:fixed;top:50%;left:50%;z-index:1200;display:flex;align-items:center;gap:18px;width:min(560px,calc(100vw - 30px));min-height:130px;padding:30px;background:#fff;border:1px solid #d6aa00;border-top:6px solid #d6aa00;border-radius:16px;box-shadow:0 18px 55px rgba(0,0,0,.32);color:#151515;transform:translate(-50%,-50%);animation:mailToastIn .25s ease-out}.mail-success-toast-icon{display:grid;place-items:center;width:52px;height:52px;flex:0 0 52px;border-radius:50%;background:#d6aa00;color:#111;font-size:30px;font-weight:900}.mail-success-toast div{display:grid;gap:4px}.mail-success-toast strong{font-size:22px}.mail-success-toast button{margin-left:auto;border:0;background:transparent;color:#555;font-size:30px;line-height:1;cursor:pointer}.mail-success-toast button:hover{color:#000}@keyframes mailToastIn{from{opacity:0;transform:translate(-50%,-44%)}to{opacity:1;transform:translate(-50%,-50%)}}
.mail-error-toast{position:fixed;top:84px;right:24px;z-index:1200;display:flex;align-items:center;gap:12px;max-width:480px;padding:15px 16px;background:#fff;border:1px solid #b42318;border-left:5px solid #b42318;border-radius:12px;box-shadow:0 12px 35px rgba(0,0,0,.2);color:#151515}.mail-error-toast>span{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:#b42318;color:#fff;font-size:20px;font-weight:900}.mail-error-toast div{display:grid;gap:3px}.mail-error-toast small{color:#666}.mail-error-toast button{margin-left:auto;border:0;background:transparent;color:#555;font-size:24px;line-height:1;cursor:pointer}@media(max-width:700px){.mail-error-toast{top:76px;right:12px;left:12px;max-width:none}}
.mail-current-accounts{margin-top:9px;display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:14px}.mail-current-accounts a,.mail-current-accounts span{color:#7b5f00;font-weight:800}
.topbar-mail-notifications{position:relative}.topbar-mail-notifications summary{list-style:none;cursor:pointer}.topbar-mail-notifications summary::-webkit-details-marker{display:none}.topbar-mail-dropdown{position:absolute;z-index:1200;right:0;top:calc(100% + 12px);width:min(420px,88vw);background:#fff;color:#242424;border:1px solid #d7d7d7;border-top:3px solid #d8ad00;border-radius:10px;box-shadow:0 14px 35px rgba(0,0,0,.24);overflow:hidden}.topbar-mail-dropdown header{display:flex;justify-content:space-between;gap:12px;padding:13px 15px;background:#181818;color:#fff}.topbar-mail-dropdown header a{color:#ffd83d}.topbar-mail-scroll{max-height:min(68vh,620px);overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#d8ad00 #eee;scrollbar-width:thin}.topbar-mail-scroll::-webkit-scrollbar{width:9px}.topbar-mail-scroll::-webkit-scrollbar-track{background:#eee}.topbar-mail-scroll::-webkit-scrollbar-thumb{background:#d8ad00;border-radius:8px;border:2px solid #eee}.topbar-mail-item{display:grid;gap:3px;padding:11px 15px;border-bottom:1px solid #e6e6e6;color:#303030;text-decoration:none}.topbar-mail-item.unread{background:#fff5cc}.topbar-mail-item span,.topbar-mail-item strong,.topbar-mail-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar-mail-item span{font-size:13px}.topbar-mail-item small{color:#737373}.topbar-mail-empty{padding:22px 15px;text-align:center;color:#777}
.mail-search{display:grid;grid-template-columns:minmax(220px,1fr) 140px auto;gap:8px;margin-bottom:12px}.mail-search input,.mail-search select,.mail-bulk select,.mail-compose-form input,.mail-compose-form select,.mail-compose-form textarea{width:100%;border:1px solid #cfd2d6;border-radius:8px;padding:10px;font:inherit}.mail-bulk{display:flex;gap:8px;margin-bottom:8px}.mail-bulk select{max-width:220px}
.mail-list{border-top:1px solid #ddd}.mail-row{display:grid;grid-template-columns:28px 28px minmax(0,1fr);align-items:center;border-bottom:1px solid #e4e4e4;padding:8px}.mail-row.unread{background:#fff9df}.mail-row-content{display:grid;grid-template-columns:180px minmax(160px,1fr) minmax(180px,1.4fr) auto;gap:10px;align-items:center;color:#333;text-decoration:none;min-width:0}.mail-row-content>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-row-content small{color:#777}.mail-preview{color:#777}.mail-star{color:#d8ad00;font-size:18px}.mail-empty{text-align:center;padding:70px 20px;color:#777}
.mail-compose-page,.mail-reader{max-width:1100px;margin:0 auto}.mail-compose-form{padding:20px;display:grid;gap:14px}.mail-compose-form label{display:grid;gap:5px;font-weight:700}.mail-compose-form small{font-weight:400;color:#777}.mail-compose-two,.mail-config-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.mail-compose-actions,.mail-reader-actions{display:flex;gap:8px;flex-wrap:wrap}.mail-reader-actions form{display:inline}.mail-message{padding:22px}.mail-message-meta{border-bottom:1px solid #ddd;padding-bottom:14px}.mail-message-meta time{float:right}.mail-message-body{padding:25px 0;line-height:1.65;min-height:160px}.mail-attachments{display:flex;gap:8px;flex-wrap:wrap}.mail-attachments a,.mail-attachments span{background:#f2f2f2;border-radius:8px;padding:9px;color:#333;text-decoration:none}.mail-thread{margin-top:18px;background:#fff;border-radius:12px;padding:18px}
.mail-account-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.mail-account-grid article{padding:18px}.mail-user-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}
@media(max-width:900px){.mail-page{grid-template-columns:1fr}.mail-sidebar{max-height:none}.mail-row-content{grid-template-columns:1fr}.mail-search,.mail-compose-two,.mail-config-grid{grid-template-columns:1fr}.mail-preview{display:none}}

.payable-filter-bar{display:grid;grid-template-columns:minmax(155px,1fr) 145px 145px minmax(165px,1fr) minmax(280px,2fr) 90px auto auto auto;gap:10px;align-items:end;margin:16px 0;padding:16px;background:#fff;border:1px solid #d8d8d8;border-top:3px solid #f5c400;border-radius:8px}.payable-filter-bar label{display:grid;gap:5px;font-size:12px;font-weight:800;color:#333}.payable-filter-bar .btn{min-height:42px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}.payable-filter-totals{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin:0 0 16px}.payable-filter-totals span{display:grid;gap:4px;padding:12px 14px;background:#fff;border:1px solid #ddd;border-left:4px solid #f5c400;border-radius:7px}.payable-filter-totals small{color:#666;font-weight:700}.payable-filter-totals strong{font-size:18px}.product-list-table{min-width:1450px}.product-list-table th{white-space:nowrap}@media(max-width:1200px){.payable-filter-bar{grid-template-columns:repeat(3,minmax(150px,1fr))}.payable-filter-search{grid-column:span 2}}@media(max-width:700px){.payable-filter-bar,.payable-filter-totals{grid-template-columns:1fr}.payable-filter-search{grid-column:auto}.payable-filter-bar .btn{width:100%}}

.receivable-filter-bar{grid-template-columns:repeat(12,minmax(0,1fr))}.receivable-filter-bar label{min-width:0}.receivable-filter-bar .payable-filter-period,.receivable-filter-bar .payable-filter-situation,.receivable-filter-bar .payable-filter-sort,.receivable-filter-bar .payable-filter-direction,.receivable-filter-bar .payable-filter-date{grid-column:span 2}.receivable-filter-bar .payable-filter-search{grid-column:span 3}.receivable-filter-bar .payable-filter-page-size{grid-column:span 1}.receivable-filter-bar .payable-filter-actions{grid-column:span 8;display:flex;justify-content:flex-end;gap:10px;min-width:0}.receivable-filter-bar .btn{min-width:120px;padding-inline:16px}.receivable-filter-bar .payable-filter-actions .btn-secondary{min-width:180px}@media(max-width:1200px){.receivable-filter-bar{grid-template-columns:repeat(6,minmax(0,1fr))}.receivable-filter-bar .payable-filter-period,.receivable-filter-bar .payable-filter-situation,.receivable-filter-bar .payable-filter-sort,.receivable-filter-bar .payable-filter-direction,.receivable-filter-bar .payable-filter-date{grid-column:span 2}.receivable-filter-bar .payable-filter-search{grid-column:span 4}.receivable-filter-bar .payable-filter-page-size{grid-column:span 2}.receivable-filter-bar .payable-filter-actions{grid-column:1/-1;justify-content:stretch}.receivable-filter-bar .payable-filter-actions .btn{flex:1 1 0}}@media(max-width:700px){.receivable-filter-bar{grid-template-columns:1fr}.receivable-filter-bar label,.receivable-filter-bar .payable-filter-search,.receivable-filter-bar .payable-filter-actions{grid-column:1}.receivable-filter-bar .payable-filter-actions{display:grid;grid-template-columns:1fr}.receivable-filter-bar .btn,.receivable-filter-bar .payable-filter-actions .btn-secondary{width:100%;min-width:0}}

/* Barras financeiras compactas e responsivas */
.payable-filter-bar{grid-template-columns:180px 145px 145px 155px minmax(260px,320px) auto auto auto;align-items:end;min-height:0;padding:12px 16px;overflow:visible}
.payable-filter-bar .payable-filter-search{min-width:260px}
.payable-filter-bar > .btn{min-width:120px}
.receivable-filter-bar{grid-template-columns:145px 145px 145px 155px minmax(260px,320px) auto;}
.receivable-filter-bar .payable-filter-actions{grid-column:auto;align-self:end;justify-content:flex-start;white-space:nowrap}
@media(max-width:1200px){.payable-filter-bar,.receivable-filter-bar{grid-template-columns:repeat(4,minmax(140px,1fr))}.payable-filter-bar .payable-filter-search,.receivable-filter-bar .payable-filter-search{grid-column:span 2}.receivable-filter-bar .payable-filter-actions{grid-column:1/-1}}
@media(max-width:700px){.payable-filter-bar,.receivable-filter-bar{grid-template-columns:1fr}.payable-filter-bar .payable-filter-search,.receivable-filter-bar .payable-filter-search,.receivable-filter-bar .payable-filter-actions{grid-column:auto}.receivable-filter-bar .payable-filter-actions{display:grid;grid-template-columns:1fr}.payable-filter-bar > .btn{width:100%}}
/* Ordens de Serviços: escopo próprio para não afetar outros módulos. */
.service-order-form{max-width:1600px;margin:0 auto;padding:18px}.service-order-form form{display:grid;gap:18px}.service-order-form .unified-form-section{background:#fff;border:1px solid #ddd;border-top:4px solid #e2b600;border-radius:8px;padding:18px;box-shadow:0 2px 7px rgba(0,0,0,.06)}.service-order-form .unified-form-section h2{margin:0 0 16px;color:#171717}.service-order-form .unified-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.service-order-form label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#292929}.service-order-form input,.service-order-form select,.service-order-form textarea{box-sizing:border-box;width:100%;min-height:42px;padding:9px 11px;border:1px solid #c8cdd2;border-radius:4px;background:#fff;font:inherit}.service-order-form textarea{min-height:110px;resize:vertical}.service-order-form .money-input-group{display:flex}.service-order-form .money-input-group span{display:flex;align-items:center;padding:0 10px;background:#f2f2f2;border:1px solid #c8cdd2;border-right:0}.service-order-form .money-input-group input{border-radius:0 4px 4px 0}.service-order-form .table-responsive,.service-order-form .unified-items-table-wrap{overflow-x:auto}.service-order-form .product-form-footer{display:flex;gap:10px;flex-wrap:wrap}@media(max-width:1000px){.service-order-form .unified-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.service-order-form{padding:10px}.service-order-form .unified-form-grid{grid-template-columns:1fr}.service-order-form .product-form-header{align-items:flex-start;gap:10px}.service-order-form .product-form-footer>*{width:100%}}
.service-order-form form>.unified-form-section:nth-of-type(1){order:1}.service-order-form form>.unified-form-section:nth-of-type(5){order:2}.service-order-form form>.unified-form-section:nth-of-type(6){order:3}.service-order-form form>.unified-form-section:nth-of-type(7){order:4}.service-order-form form>.unified-form-section:nth-of-type(2){order:5}.service-order-form .service-order-totals{order:6}.service-order-form form>.unified-form-section:nth-of-type(3){order:7}.service-order-form .service-order-attachments{order:8}.service-order-form form>.unified-form-section:nth-of-type(4){order:9}.service-order-form .product-form-footer{order:10}.service-order-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.service-order-grid>div{border-left:4px solid #e2b600;padding:14px;background:#fafafa}.service-order-grid strong{display:block;font-size:1.2rem}@media(max-width:640px){.service-order-grid{grid-template-columns:1fr}}
.service-order-list{max-width:1600px;margin:0 auto;padding:24px}.service-order-list-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.service-order-list-header h1{margin:0;color:#171717;font-size:1.8rem}.service-order-list-header p{margin:6px 0 0;color:#666}.service-order-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;background:#fff;border:1px solid #ddd;border-top:4px solid #e2b600;border-radius:8px;padding:16px 18px;margin-bottom:18px;box-shadow:0 2px 7px rgba(0,0,0,.05)}.service-order-filter{display:grid;grid-template-columns:180px minmax(280px,420px) auto auto;align-items:end;gap:10px}.service-order-filter label{display:flex;flex-direction:column;gap:5px;font-weight:700;font-size:.8rem}.service-order-filter .form-control{box-sizing:border-box;width:100%;height:42px;border:1px solid #c7ccd1;border-radius:4px;padding:8px 11px;background:#fff}.service-order-filter .btn,.service-order-toolbar>.btn{min-height:42px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}.service-order-table-card{background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 2px 7px rgba(0,0,0,.05);overflow:hidden}.service-order-table-wrap{overflow-x:auto}.service-order-table-card table{width:100%;min-width:1180px;border-collapse:collapse}.service-order-table-card th{padding:14px 16px;text-align:left;background:#171717;color:#fff;border-bottom:3px solid #e2b600;font-size:.78rem;text-transform:uppercase}.service-order-table-card td{padding:14px 16px;border-bottom:1px solid #e7e7e7;vertical-align:middle}.service-order-table-card tbody tr:hover{background:#fffbea}.service-order-money{font-weight:800;white-space:nowrap}.service-order-status{display:inline-block;border-radius:999px;background:#f2cf2f;color:#171717;font-weight:800;padding:5px 10px;font-size:.75rem;text-transform:capitalize}.service-order-empty{text-align:center!important;padding:46px!important;color:#555}.service-order-empty strong,.service-order-empty span{display:block}.service-order-empty span{font-weight:400;margin-top:6px;color:#777}.service-order-pagination{padding:14px 18px}@media(max-width:1050px){.service-order-toolbar{align-items:stretch;flex-direction:column}.service-order-filter{grid-template-columns:1fr 2fr auto auto}}@media(max-width:700px){.service-order-list{padding:12px}.service-order-list-header{display:block}.service-order-list-header .product-breadcrumb{margin-top:10px}.service-order-filter{grid-template-columns:1fr}.service-order-filter .btn,.service-order-toolbar>.btn{width:100%}}
.service-order-equipment-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:14px}.service-order-equipment-grid label{display:flex;flex-direction:column;gap:6px;font-weight:700}.service-order-equipment-grid .span-2{grid-column:span 2}.service-order-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0}.service-order-actions form{display:inline-flex;margin:0}.service-order-show .service-order-card,.service-order-cancel{background:#fff;border:1px solid #ddd;border-top:4px solid #e2b600;border-radius:8px;padding:18px;margin-top:16px}.service-order-cancel{display:flex;align-items:end;gap:10px}.service-order-cancel label{flex:1;font-weight:700}.service-order-cancel input{width:100%;margin-top:6px}@media(max-width:800px){.service-order-equipment-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.service-order-equipment-grid{grid-template-columns:1fr}.service-order-equipment-grid .span-2{grid-column:auto}.service-order-cancel{align-items:stretch;flex-direction:column}}
.service-order-company-field {
    grid-column: 1 / -1;
}

.service-order-company-field > select {
    max-width: 620px;
}

.service-order-company-preview {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #e0c13a;
    border-left: 5px solid #e2b600;
    border-radius: 6px;
    background: #fffdf4;
    color: #222;
}

.service-order-company-preview h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.service-order-company-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.service-order-company-preview-grid .span-2 {
    grid-column: span 2;
}

.service-order-company-preview-grid small,
.service-order-company-preview-grid strong,
.service-order-company-preview-grid span {
    display: block;
}

.service-order-company-preview-grid small {
    margin-bottom: 3px;
    color: #666;
}

.service-order-company-preview > p {
    margin: 14px 0 0;
    color: #6b5a00;
    font-size: 12px;
}

@media (max-width: 900px) {
    .service-order-company-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .service-order-company-preview-grid {
        grid-template-columns: 1fr;
    }

    .service-order-company-preview-grid .span-2 {
        grid-column: auto;
    }
}

.pcost-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pcost-topbar,
.pcost-panel-head,
.pcost-hero-meta dl,
.pcost-nav,
.pcost-op-summary,
.pcost-op-metrics,
.pcost-op-tablist {
    display: flex;
    align-items: center;
}

.pcost-topbar {
    justify-content: space-between;
    gap: 16px;
}

.pcost-kicker,
.pcost-note,
.pcost-op-facts,
.pcost-kpi span,
.pcost-hero-meta dt,
.pcost-op-metrics small {
    margin: 0;
    color: #6b6b6b;
    font-size: 12px;
}

.pcost-title,
.pcost-hero-meta h2,
.pcost-panel h2,
.pcost-ops > h2 {
    margin: 4px 0 0;
    color: #171717;
}

.pcost-title {
    font-size: 28px;
}

.pcost-hero,
.pcost-grid,
.pcost-kpis,
.pcost-op-metrics {
    display: grid;
    gap: 14px;
}

.pcost-hero {
    grid-template-columns: 168px minmax(220px, 1fr) minmax(320px, 1.4fr);
    padding: 16px;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
}

.pcost-hero-photo,
.pcost-hero-photo-empty {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f3f3;
}

.pcost-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcost-hero-number {
    color: #171717;
    font-size: 20px;
}

.pcost-hero-meta h2 {
    margin: 2px 0 12px;
    font-size: 22px;
}

.pcost-hero-meta dl {
    flex-wrap: wrap;
    gap: 10px 18px;
}

.pcost-hero-meta div {
    min-width: 120px;
}

.pcost-hero-meta dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.pcost-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pcost-kpi {
    padding: 14px 16px;
    border: 1px solid #ececec;
    border-top: 3px solid #f5c400;
    border-radius: 10px;
    background: #fafafa;
}

.pcost-kpi strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    color: #171717;
}

.pcost-nav {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    background: #fff8d6;
}

.pcost-nav a {
    padding: 8px 12px;
    border-radius: 8px;
    color: #171717;
    font-weight: 700;
    text-decoration: none;
}

.pcost-nav a:hover {
    background: #f5c400;
}

.pcost-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.pcost-panel,
.pcost-op {
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
}

.pcost-panel {
    padding: 16px 18px;
}

.pcost-panel h2,
.pcost-ops > h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.pcost-ops {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pcost-op {
    overflow: hidden;
}

.pcost-op-summary {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    border-left: 4px solid #f5c400;
}

.pcost-op-summary::-webkit-details-marker {
    display: none;
}

.pcost-op-title,
.pcost-op-tablist,
.pcost-panel-head {
    gap: 10px;
}

.pcost-op-name {
    font-size: 16px;
}

.pcost-op-metrics {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: repeat(7, minmax(80px, 1fr));
}

.pcost-over {
    color: #b42318;
    font-weight: 700;
}

.pcost-step-unassigned td {
    color: #555;
    font-style: italic;
}

.pcost-op-metrics span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-weight: 700;
}

.pcost-op[open] {
    box-shadow: 0 0 0 2px #f5c400;
}

.pcost-op-body {
    padding: 0 16px 16px;
    border-top: 1px solid #f3f3f3;
}

.pcost-op-tabs {
    min-height: 180px;
    overflow-anchor: none;
}

.pcost-op-tablist {
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}

.pcost-op-tablist button {
    appearance: none;
    background: #f6f6f6;
    border: 0;
    border-radius: 7px;
    box-sizing: border-box;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    min-height: 32px;
    padding: 6px 10px;
}

.pcost-op-tablist button.is-active {
    background: #f5c400;
}

.pcost-op-panel {
    display: none;
    min-height: 180px;
}

.pcost-op-panel.is-active {
    display: block;
}

.pcost-confirm-facts {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 16px;
}

.pcost-confirm-facts dt {
    color: #5b6b80;
    font-size: 12px;
    text-transform: uppercase;
}

.pcost-confirm-facts dd {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.pcost-reject-form,
.pcost-pending-actions {
    margin-top: 12px;
}

.pcost-pending-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pcost-reject-panel .pcost-reject-form {
    margin-top: 16px;
}

.pcost-reject-panel textarea {
    min-height: 110px;
    width: 100%;
}

.pcost-reject-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.pcost-insufficient-lead {
    color: #3d4654;
    font-size: 14px;
    margin: 0 0 16px;
}

.pcost-zero-cost-notice {
    background: #fffbeb;
    border: 1px solid #f5d76e;
    border-left: 4px solid #e1bd25;
    border-radius: 8px;
    color: #5c4a12;
    margin: 0 0 16px;
    padding: 12px 14px;
}

.pcost-zero-cost-notice h2 {
    color: #5c4a12;
    font-size: 16px;
    margin: 0 0 4px;
}

.pcost-zero-cost-notice p {
    margin: 0;
    font-size: 14px;
}

.pcost-zero-cost-product {
    color: #171717;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
}

.pcost-zero-cost-lead {
    color: #3d4654;
    font-size: 14px;
    margin: 0 0 16px;
}

.pcost-zero-cost-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.pcost-zero-cost-actions form {
    margin: 0;
}

.pcost-pending-head,
.pcost-pending-title,
.pcost-pending-toolbar,
.pcost-pending-filters,
.pcost-pending-row-actions {
    display: flex;
    align-items: center;
}

.pcost-pending-row-actions {
    flex-wrap: wrap;
    gap: 6px;
}

.pcost-pending-head {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.pcost-pending-title {
    gap: 10px;
    flex-wrap: wrap;
}

.pcost-pending-title h2 {
    margin: 0;
}

.pcost-pending-count {
    display: inline-flex;
    align-items: center;
    background: #fff3b0;
    color: #6d5200;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    text-transform: uppercase;
}

.pcost-pending-batch {
    white-space: nowrap;
}

.pcost-pending-toolbar {
    gap: 12px;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pcost-pending-filters {
    gap: 6px;
    flex-wrap: wrap;
}

.pcost-pending-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border: 1px solid #e4e4e4;
    border-radius: 999px;
    box-sizing: border-box;
    color: #3d4654;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    min-height: 28px;
    padding: 6px 12px;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none;
    text-transform: uppercase;
}

.pcost-pending-filter.is-active {
    background: #fff3b0;
    border-color: #e1bd25;
    color: #171717;
}

.pcost-pending-search {
    margin: 0;
    min-width: min(280px, 100%);
}

.pcost-pending-search input {
    width: 100%;
    height: 36px;
    border: 1px solid #c7ccd1;
    border-radius: 4px;
    padding: 6px 10px;
    font: inherit;
}

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

.pcost-pending-results {
    min-height: 180px;
}

.pcost-pending-filter-empty {
    color: #5b6b80;
    font-size: 14px;
    margin: 18px 0 0;
    text-align: center;
}

.pcost-pending-table {
    min-width: 1120px;
}

.pcost-pending-table tr[hidden] {
    display: none;
}

.pcost-pending-check {
    width: 36px;
}

.pcost-kind-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    white-space: nowrap;
}

.pcost-kind-material {
    background: #eef2f6;
    color: #3d4a5c;
}

.pcost-kind-insumo {
    background: #f7f1e1;
    color: #6a5420;
}

.pcost-pending-qty-alt {
    color: #5b6b80;
    font-size: 12px;
    margin-top: 2px;
}

.pcost-pending-btn {
    padding: 6px 10px;
    font-size: 11px;
}

.pcost-pending-empty {
    color: #5b6b80;
    padding: 28px 8px;
    text-align: center;
}

.pcost-pending-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    border: 1px solid #d8e7d8;
    border-radius: 50%;
    background: #f4faf4;
    color: #2f6b3a;
    font-size: 16px;
}

.pcost-pending-empty p {
    margin: 0;
}

.pcost-group-note {
    margin-top: 12px;
}

.pcost-status-aguardando_baixa {
    color: #8a6d00;
    background: #fff3b0;
}

.pcost-pending-product strong,
.pcost-pending-product span {
    display: block;
}

.pcost-pending-product strong {
    font-size: 14px;
}

.pcost-pending-product span {
    color: #5b6b80;
    font-size: 12px;
    margin-top: 2px;
}

.pcost-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f3f3f3;
}

.pcost-status-concluida {
    color: #0d6b2c;
    background: #d9f5e3;
}

.pcost-status-em_andamento,
.pcost-status-em_producao,
.pcost-status-em_testes {
    color: #171717;
    background: #f5c400;
}

.pcost-status-pendente,
.pcost-status-planejada,
.pcost-status-pronta_para_producao,
.pcost-status-aguardando_materiais {
    color: #8a6d00;
    background: #fff3b0;
}

.pcost-status-bloqueada {
    color: #7a3b00;
    background: #ffe0c2;
}

.pcost-status-cancelada {
    color: #7a1010;
    background: #ffd6d6;
}

@media (max-width: 1100px) {
    .pcost-hero,
    .pcost-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .pcost-topbar,
    .pcost-op-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .pcost-kpis,
    .pcost-op-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

body.pcost-modal-open {
    left: 0;
    overflow: hidden;
    position: fixed;
    right: 0;
    width: 100%;
}

.pcost-modal[hidden],
.pcost-toast[hidden] {
    display: none !important;
}

.pcost-modal {
    inset: 0;
    position: fixed;
    z-index: 1300;
}

.pcost-modal-backdrop {
    background: rgba(17, 17, 17, 0.45);
    inset: 0;
    position: absolute;
}

.pcost-modal-dialog {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    left: 50%;
    max-height: min(88vh, 720px);
    max-width: 760px;
    overflow: hidden;
    padding: 22px 22px 16px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(760px, calc(100vw - 24px));
}

.pcost-modal-dialog.is-compact {
    max-width: 520px;
    width: min(520px, calc(100vw - 24px));
}

.pcost-modal-field {
    margin: 0 0 14px;
}

.pcost-modal-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 6px;
}

.pcost-modal-qty {
    align-items: center;
    display: flex;
    gap: 8px;
}

.pcost-modal-qty input {
    flex: 1;
    min-width: 0;
}

.pcost-modal-qty-suffix {
    color: #3d4654;
    font-weight: 700;
}

.pcost-modal-eq {
    color: #3d4654;
    font-size: 13px;
    margin: 6px 0 0;
}

.pcost-modal-unit-value {
    font-weight: 700;
    margin: 0;
}

.pcost-modal-prev {
    color: #3d4654;
    margin: 0 0 14px;
}

.pcost-modal-prev strong {
    display: block;
    font-size: 13px;
    margin: 0 0 4px;
}

.pcost-modal-close {
    background: transparent;
    border: 0;
    color: #666;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    padding: 0 4px;
    position: absolute;
    right: 14px;
    top: 10px;
}

.pcost-modal-body {
    min-height: 0;
    overflow: auto;
    padding-right: 8px;
}

.pcost-modal-title {
    font-size: 20px;
    margin: 0 32px 14px 0;
}

.pcost-modal-kicker {
    color: #6b6b6b;
    font-size: 12px;
    margin: 0 0 6px;
}

.pcost-modal-code {
    font-size: 18px;
    margin: 8px 0 0;
}

.pcost-modal-name {
    color: #3d4654;
    margin: 2px 0 14px;
}

.pcost-modal-grid {
    display: grid;
    gap: 12px 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.pcost-modal-grid div {
    margin: 0;
}

.pcost-modal-grid dt {
    color: #6b6b6b;
    font-size: 12px;
    margin: 0 0 2px;
}

.pcost-modal-grid dd {
    font-weight: 700;
    margin: 0;
}

.pcost-modal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 8px;
}

.pcost-modal-list-item {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 10px 12px;
}

.pcost-modal-list-item strong {
    display: block;
}

.pcost-modal-list-item span {
    color: #3d4654;
    display: block;
    font-size: 13px;
}

.pcost-modal-lead {
    color: #3d4654;
    font-size: 14px;
    margin: 0 0 14px;
}

.pcost-modal-error {
    color: #842029;
    font-size: 13px;
    margin: 10px 0 0;
}

.pcost-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.pcost-modal-footer .btn {
    min-height: 36px;
}

.pcost-modal-reason {
    display: block;
    font-weight: 700;
    margin: 12px 0 6px;
}

.pcost-modal-reason-input {
    min-height: 110px;
    width: 100%;
}

.pcost-modal-alert {
    background: #fffbeb;
    border: 1px solid #f5d76e;
    border-left: 4px solid #e1bd25;
    border-radius: 8px;
    margin: 0 0 14px;
    padding: 12px 14px;
}

.pcost-modal-alert.is-danger {
    background: #fff5f5;
    border-color: #f1c0c0;
    border-left-color: #c0392b;
    color: #6b1c1c;
}

.pcost-toast {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #c8e0c8;
    border-left: 5px solid #2f7d32;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
    display: flex;
    gap: 12px;
    max-width: 420px;
    padding: 14px 16px;
    position: fixed;
    right: 24px;
    top: 24px;
    z-index: 1400;
}

.pcost-toast-icon {
    align-items: center;
    background: #2f7d32;
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex: 0 0 28px;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.pcost-toast-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pcost-toast-copy strong {
    font-size: 14px;
}

.pcost-toast-copy div {
    color: #4a4a4a;
    font-size: 13px;
}

.pcost-toast-close {
    background: transparent;
    border: 0;
    color: #666;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    margin-left: auto;
}

@media (max-width: 700px) {
    .pcost-modal-grid {
        grid-template-columns: 1fr;
    }

    .pcost-toast {
        left: 12px;
        max-width: none;
        right: 12px;
        top: 12px;
    }
}

/* Configuração de materiais por etapa: estilos restritos a esta página. */
.material-stages-page { max-width: 1440px; margin: 0 auto; }
.material-stages-header { margin-bottom: 22px; }
.material-stages-header .product-form-title { margin: 0 0 8px; font-size: 26px; }
.material-stages-header p { margin: 0; max-width: 900px; color: #64748b; line-height: 1.6; }
.material-stages-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.material-stage-card { min-width: 0; margin: 0; padding: 16px; border: 1px solid #dce3eb; border-radius: 12px; background: #fff; box-shadow: 0 2px 5px rgb(15 23 42 / 3%); }
.material-stage-card legend { padding: 0 8px; margin-left: 4px; color: #14263c; font-size: 16px; font-weight: 700; }
.material-stage-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.material-stage-option { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border: 1px solid #e5eaf0; border-radius: 8px; background: #f8fafc; cursor: pointer; transition: background .15s, border-color .15s; }
.material-stage-option span { min-width: 0; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.material-stage-option input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: #d6a900; }
.material-stage-option:hover { background: #fffbed; border-color: #e6c85a; }
.material-stage-option:has(input:checked) { background: #fff8d9; border-color: #e2bd30; }
.material-stage-option:has(input:checked) span { font-weight: 600; }
.material-stage-option:focus-within { outline: 2px solid #c89d00; outline-offset: 2px; }
.material-stages-page .material-stages-footer { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 22px; padding: 14px 18px; border: 1px solid #dce3eb; border-radius: 12px; background: #fff; box-shadow: 0 4px 18px rgb(15 23 42 / 10%); }
@media (max-width: 1100px) { .material-stages-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
    .material-stage-options { grid-template-columns: minmax(0, 1fr); }
    .material-stage-card { padding: 12px; }
    .material-stages-page .material-stages-footer { bottom: 6px; padding: 12px; }
    .material-stages-footer .btn { flex: 1; text-align: center; }
}

/* Resultados da busca de produtos em cotações, fora do recorte da tabela. */
.orcamento-product-suggestions { position: fixed; z-index: 1500; min-width: 0; box-sizing: border-box; background: #171717; border: 2px solid #242424; border-radius: 8px; box-shadow: 0 10px 24px rgb(0 0 0 / 20%); overscroll-behavior: contain; }
.orcamento-product-option { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; color: #fff; border-bottom: 1px solid #454545; white-space: normal; overflow-wrap: anywhere; }
.orcamento-product-option:last-child { border-bottom: 0; }
.orcamento-product-option strong { font-size: 14px; color: #fff; }
.orcamento-product-option span { font-size: 13px; font-weight: 600; }
.orcamento-product-option small { font-size: 11px; color: #ddd; }
.orcamento-product-option:hover, .orcamento-product-option:focus-visible { background: #333; outline: 2px solid #f5c400; outline-offset: -2px; }

/* Campos proporcionais dos produtos solicitados na cotação de compra. */
#orcamento-items-table { width: 100%; min-width: 920px; table-layout: fixed; }
#orcamento-items-table th, #orcamento-items-table td { padding: 12px; vertical-align: middle; }
#orcamento-items-table th:nth-child(1) { width: 10%; }
#orcamento-items-table th:nth-child(2) { width: 36%; }
#orcamento-items-table th:nth-child(3) { width: 17%; }
#orcamento-items-table th:nth-child(4) { width: 17%; }
#orcamento-items-table th:nth-child(5) { width: 9%; }
#orcamento-items-table th:nth-child(6) { width: 8%; }
#orcamento-items-table th:nth-child(7) { width: 64px; }
#orcamento-items-table .form-control { width: 100%; min-width: 0; height: 42px; box-sizing: border-box; padding: 8px 10px; border: 1px solid #cbd2da; border-radius: 7px; background: #fff; }
#orcamento-items-table .form-control:focus { border-color: #d4aa00; outline: 2px solid rgb(245 196 0 / 22%); outline-offset: 1px; }
#orcamento-items-table .orcamento-quantity { max-width: 110px; text-align: right; }
#orcamento-items-table .orcamento-unit { max-width: 96px; }
#orcamento-items-table .orcamento-item-grupo, #orcamento-items-table .orcamento-item-subgrupo { font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; color: #536176; }
#orcamento-items-table .orcamento-item-code { font-size: 12px; font-weight: 700; }
#orcamento-items-table .orcamento-remove-item { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-width: 40px; height: 42px; padding: 0; border-radius: 7px; }
#orcamento-items-table .orcamento-item-name { display: block; margin-top: 4px; font-size: 11px; color: #64748b; overflow-wrap: anywhere; }
#orcamento-items-table .orcamento-item-name:empty { display: none; }

/* Busca de fornecedores com o mesmo padrão das opções de produtos. */
.orcamento-supplier-picker { max-width: 880px; }
.orcamento-supplier-search-wrap .input-group { display: flex; align-items: stretch; gap: 10px; }
#orcamento_supplier_search { flex: 1; min-width: 0; width: 100%; height: 42px; box-sizing: border-box; border: 1px solid #cbd2da; border-radius: 7px; }
#orcamento-add-supplier { flex: 0 0 auto; min-height: 42px; border-radius: 7px; }
.orcamento-supplier-suggestions { z-index: 1500; background: #171717; border: 2px solid #242424; border-radius: 8px; max-height: 300px; box-shadow: 0 10px 24px rgb(0 0 0 / 20%); }
.orcamento-supplier-option { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; color: #fff; border-bottom: 1px solid #454545; white-space: normal; }
.orcamento-supplier-option:last-child { border-bottom: 0; }
.orcamento-supplier-option strong { font-size: 14px; }
.orcamento-supplier-option small { color: #ddd; font-size: 12px; }
.orcamento-supplier-option:hover, .orcamento-supplier-option:focus-visible { background: #333; outline: 2px solid #f5c400; outline-offset: -2px; }
@media (max-width: 560px) { .orcamento-supplier-search-wrap .input-group { flex-wrap: wrap; } #orcamento-add-supplier { width: 100%; } }

.pcost-subtitle { margin: 4px 0 8px; font-size: 0.9rem; color: #1f2937; }
.pcost-op-panel .table-wrap + .pcost-note + .pcost-subtitle, .pcost-op-panel .pcost-note + .pcost-subtitle, .pcost-op-panel p + .pcost-subtitle { margin-top: 18px; }

.pcost-op-panel .pcost-scrap { color: #b45309; }
.pcost-scrap-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 6px; }
.pcost-scrap-summary span { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #e2e8f0; border-left: 4px solid #94a3b8; border-radius: 8px; background: #f8fafc; font-weight: 700; }
.pcost-scrap-summary span.is-loss { border-left-color: #d97706; background: #fffbeb; color: #92400e; }
.pcost-scrap-summary small { color: #64748b; font-size: 0.75rem; font-weight: 600; }
@media (max-width: 800px) { .pcost-scrap-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pcost-rework-total { margin: 12px 0 0; padding: 10px 12px; border-left: 4px solid #ea580c; border-radius: 8px; background: #fff7ed; color: #7c2d12; }
.pcost-rework-total small { color: #9a3412; margin-left: 6px; }

.pcost-kind-badge.pcost-kind-rework { background: #ffedd5; color: #9a3412; margin-top: 4px; }


/* Menu lateral recolhível em tablet e celular. */
.topbar-menu-toggle,
.sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1100;
        width: min(280px, 85vw);
        max-height: none;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: none;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 24px rgba(0, 0, 0, .25);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1090;
        background: rgba(15, 23, 42, .45);
    }

    .topbar-menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        margin-right: 4px;
        border: 1px solid #3a3a3a;
        border-radius: 10px;
        background: #2a2a2a;
        color: #f5c400;
        cursor: pointer;
        font-size: 22px;
        line-height: 1;
    }

    .topbar-menu-toggle:focus-visible {
        outline: 2px solid #f5c400;
        outline-offset: 2px;
    }

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

    .topbar-identity {
        flex: 1 1 auto;
    }

    .content {
        padding: 22px 18px 32px;
    }
}

@media (max-width: 600px) {
    .topbar {
        padding: 0 10px;
    }

    .topbar-identity .user-avatar {
        width: 40px;
        height: 40px;
    }

    .topbar-user-role {
        display: none;
    }

    .content {
        padding: 16px 12px 28px;
    }
}
