/* Telas de orçamento adaptadas do protótipo Grama aprovado. */
.quote-screen {
  --panel: #fff;
  --text: #23322c;
  --muted: #596960;
  --line: #e0e7e3;
  --soft: #f9fbfa;
  --solid: #246342;
  --focus: #246342;
  --inverse: #fff;
  --radius-panel: 6px;
  --radius-control: 5px;
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  min-width: 0;
}
:root[data-theme="dark"] .quote-screen {
  --panel: #222d34;
  --text: #edf2ef;
  --muted: #b1c0b8;
  --line: #3a4850;
  --soft: #26323a;
  --solid: #9bd0ad;
  --focus: #9bd0ad;
  --inverse: #16251b;
}
.content:has(.quote-screen) { max-width: none; }
.quote-screen .panel { min-width: 0; border-radius: 6px; box-shadow: none; }
.quote-screen .panel-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quote-screen .panel-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.quote-screen .panel-body { padding: 22px; }
.quote-screen button, .quote-screen summary { font-family: inherit; }
.quote-screen button { border-radius: 5px; min-height: 44px; font-size: 14px; }
.quote-screen button.primary { background: var(--solid); color: var(--inverse); border-color: var(--solid); }
.quote-screen input:not([type="checkbox"]), .quote-screen select, .quote-screen textarea { border-radius: 5px; background: var(--panel); color: var(--text); font-size: 15px !important; min-height: 44px; }
.quote-screen small { font-size: 13px !important; color: var(--muted); }
.q-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.q-page-heading h1 { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.3; letter-spacing: -.6px; }
.q-page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.q-page-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; padding: 0; background: transparent; border-color: transparent; color: var(--muted); }
.q-page-heading .actions { margin: 0; }
.q-page-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 24px; }
.q-page-metric { min-width: 0; padding: 17px 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.q-page-metric > span { color: var(--muted); font-size: 14px; }
.q-page-metric strong { display: block; font-size: 26px; font-weight: 600; line-height: 1.2; letter-spacing: -.5px; margin-top: 10px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.q-page-metric small { display: block; margin-top: 5px; }
.q-page-panel-head { flex-wrap: wrap; }
.q-page-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.q-page-filters input { width: 280px; }
.q-page-filters select { width: auto; min-width: 190px; }
.q-page-tabs { display: flex; overflow: auto; gap: 24px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.q-page-tabs button { padding: 14px 0; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); white-space: nowrap; }
.q-page-tabs button[aria-pressed="true"] { border-bottom-color: var(--solid); color: var(--solid); font-weight: 600; }
.q-page-tabs small { margin-left: 7px; color: inherit; }
.q-page-table-wrap { position: relative; overflow-x: auto; max-width: 100%; }
.quote-screen .q-table-wrap { position: relative; }
.q-proposals-table { width: 100%; min-width: 930px; border-collapse: collapse; table-layout: auto; }
.q-proposals-table th { font-size: 13px; font-weight: 500; color: var(--muted); background: var(--soft); text-transform: none; letter-spacing: 0; padding: 12px 18px; }
.q-proposals-table td { font-size: 14px; padding: 16px 18px; border-top: 1px solid var(--line); vertical-align: middle; }
.q-proposals-table tbody tr:hover { background: var(--soft); }
.q-proposals-table tbody tr { cursor: pointer; }
.q-page-row-link { display: grid; gap: 3px; width: 100%; text-align: left; padding: 0; border: 0; background: transparent; border-radius: 3px; color: var(--text); }
.q-page-row-link strong { font-size: 14px; font-weight: 500; max-width: 290px; overflow-wrap: anywhere; }
.q-page-row-link:hover strong { color: var(--solid); }
.q-page-cell-note { display: block; margin-top: 4px; }
.q-page-money, .q-page-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-page-money { font-weight: 500; }
.q-page-table-foot { border-top: 1px solid var(--line); padding: 14px 22px; color: var(--muted); font-size: 13px; }
.q-proposals-mobile { display: none; }
.q-mobile-proposal { display: grid; gap: 7px; width: 100%; padding: 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0 !important; background: transparent; text-align: left; }
.q-mobile-proposal > strong { font-weight: 500; font-size: 15px; }
.q-mobile-proposal > span { font-size: 14px; }
.q-mobile-proposal-top, .q-mobile-proposal-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.q-mobile-proposal-bottom { margin-top: 5px; font-variant-numeric: tabular-nums; }
.q-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.q-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.q-status.approved { color: var(--green); }
.q-status.negotiating { color: var(--yellow); }
.q-status.rejected, .q-status.expired { color: var(--red); }
.q-page-menu { position: relative; }
.q-page-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); font-size: 14px; }
.q-page-menu > summary::-webkit-details-marker { display: none; }
.q-page-menu > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; display: grid; gap: 3px; min-width: 220px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); box-shadow: 0 5px 20px #0002; }
.q-page-menu > div button { text-align: left; justify-content: flex-start; border: 0; background: transparent; }
.q-page-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.q-page-editor-main { min-width: 0; }
.q-editor-section { margin-bottom: 20px; }
.q-editor-options { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.q-editor-options > summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 32px; }
.q-editor-options[open] > summary { margin-bottom: 14px; }
.q-page-summary { position: sticky; top: 24px; }
.q-page-summary .panel-body { display: grid; gap: 18px; }
.q-page-summary .q-live { position: static; border: 0; padding: 0; margin: 0; }
.q-page-summary .q-totals { max-width: none; margin: 0; font-size: 14px; }
.q-page-summary .q-totals .grand { font-size: 20px; gap: 12px; align-items: center; padding-top: 15px; margin-top: 10px; }
.q-page-summary .q-totals .grand b { font-size: 24px; white-space: nowrap; }
.q-page-summary-purpose { border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: 14px; }
.q-page-summary .q-page-meta { margin-top: 0; padding-top: 0; border-top: 0; }
.quote-screen .q-section { border-radius: 6px; margin-bottom: 20px; }
.quote-screen .q-section > summary { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.quote-screen .q-section > summary b { font-size: 17px; font-weight: 600; }
.quote-screen .q-section-body { padding: 22px; }
.quote-screen .field label { font-size: 14px; font-weight: 500; }
.quote-screen .q-sticky { position: static; margin: 0; padding: 0; border: 0; background: transparent; }
.quote-screen .q-sticky .actions { justify-content: flex-end; margin: 0; }
.quote-screen .q-sticky .error:not(:empty) { margin: 0 0 15px; }
.quote-screen .q-pick { margin-bottom: 16px; }
.q-item-table { border-collapse: collapse; width: 100%; min-width: 660px; font-size: 14px; }
.q-item-table th { padding: 10px; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; background: var(--soft); }
.q-item-table .q-item { border: 0; border-radius: 0; padding: 0; background: transparent; }
.q-item-table td { padding: 14px 10px; vertical-align: top; border-top: 1px solid var(--line); }
.q-item-table .q-item-description { width: 42%; min-width: 200px; }
.q-item-table select { min-width: 80px; }
.q-item-table .q-input-qty { width: 62px; min-width: 62px; text-align: right; }
.q-item-table .q-input-money { width: 110px; min-width: 110px; text-align: right; }
.q-item-table .q-item-total { display: block; padding-top: 10px; white-space: nowrap; font-size: 14px; font-weight: 500; }
.q-item-table .q-item-foot { margin-top: 10px; gap: 12px; }
.q-item-table .check { font-size: 13px; }
.q-item-options { margin-top: 8px; font-size: 13px; }
.q-item-options summary { cursor: pointer; color: var(--muted); min-height: 30px; }
.q-item-options .field { margin: 8px 0; }
.q-item-remove { background: transparent; border: 0; min-width: 44px; font-size: 22px !important; }
.q-page-preview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.q-page-preview-main { min-width: 0; display: grid; gap: 20px; }
.q-proposal-preview { display: block; width: 100%; min-width: 0; height: 1100px; border: 1px solid #c4c4c4; border-radius: 3px; background: #fff; color-scheme: light; }
.q-page-preview-side { display: grid; gap: 18px; position: sticky; top: 24px; }
.q-page-side-total { display: block; font-size: 25px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 18px; }
.q-page-action-stack { display: grid; gap: 10px; }
.q-page-action-stack > button { width: 100%; }
.q-page-meta { margin: 20px 0 0; border-top: 1px solid var(--line); padding-top: 15px; font-size: 14px; }
.q-page-meta > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 4px 0; }
.q-page-meta dt { color: var(--muted); }
.q-page-meta dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.q-page-document-actions { margin-top: 20px; }
.q-page-timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; font-size: 14px; }
.q-page-timeline small { display: block; margin-top: 4px; }
.q-page-internal > summary { cursor: pointer; padding: 16px 22px; font-size: 14px; }
.q-page-internal .q-totals { margin: 0; max-width: none; }
.q-page-execution { margin-top: 20px; }
.q-page-approval-form { min-width: 0; }
.q-page-approval-form > .panel { margin-bottom: 20px; }
.q-plan-table { width: 100%; min-width: 620px; border-collapse: collapse; table-layout: fixed; }
.q-plan-table th { background: var(--soft); text-transform: none; letter-spacing: 0; font-size: 13px; padding: 12px; font-weight: 500; }
.q-plan-table td { padding: 14px 10px; vertical-align: top; border-top: 1px solid var(--line); }
.q-plan-table th:first-child { width: 38%; }
.q-plan-table th:nth-child(2) { width: 20%; }
.q-plan-table th:nth-child(3) { width: 10%; }
.q-plan-table th:nth-child(4) { width: 24%; }
.q-plan-table th:last-child { width: 8%; }
.q-plan-table td:first-child { padding-left: 16px; }
.q-plan-table td:first-child select { margin-top: 8px; min-height: 36px; font-size: 13px !important; }
.q-plan-table td:nth-child(2) select { width: 100%; min-width: 0; }
.q-plan-table input[type="date"], .q-plan-hours { width: 100%; min-width: 0; padding-left: 7px; padding-right: 7px; }
.q-plan-table td:last-child { padding-left: 2px; padding-right: 2px; }
.q-plan-table th { white-space: normal; }
.q-page-plan-actions { padding: 14px 22px; display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.q-page-bottom-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.q-page-task-list { display: grid; }
.q-page-task { display: grid; gap: 5px; padding: 17px 22px; border: 0; border-top: 1px solid var(--line); border-radius: 0 !important; background: transparent; text-align: left; }
.q-page-task:first-child { border-top: 0; }
.q-page-task:hover { background: var(--soft); }
.q-page-task strong { font-size: 15px; font-weight: 500; }
.q-page-task span { color: var(--muted); font-size: 14px; }
@media (max-width: 1180px) {
  .q-page-editor-grid { grid-template-columns: minmax(0, 1fr) 260px; }
  .q-page-preview-grid { grid-template-columns: minmax(0, 1fr) 250px; }
  .q-page-metric { padding: 15px; }
  .q-page-metric strong { font-size: 23px; }
}
@media (max-width: 980px) {
  .q-page-editor-grid, .q-page-preview-grid { grid-template-columns: minmax(0, 1fr); }
  .q-page-summary, .q-page-preview-side { position: static; }
  .q-page-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-page-preview-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .q-proposals-panel > .q-page-table-wrap { display: none; }
  .q-proposals-mobile { display: grid; }
  .q-page-heading { flex-direction: column; gap: 16px; }
  .q-page-heading h1 { font-size: 24px; }
  .q-page-heading .actions { width: 100%; }
  .q-page-metrics { gap: 10px; }
  .q-page-metric strong { font-size: 21px; }
  .q-page-panel-head, .q-page-filters { align-items: stretch; }
  .q-page-filters { width: 100%; }
  .q-page-filters input, .q-page-filters select { width: 100%; min-width: 0; }
  .quote-screen .panel-head, .quote-screen .panel-body, .quote-screen .q-section > summary, .quote-screen .q-section-body { padding: 17px; }
  .q-page-tabs { gap: 18px; padding: 0 17px; }
  .q-page-preview-side { grid-template-columns: minmax(0, 1fr); }
  .q-proposal-preview { height: 1000px; }
  .q-page-summary .q-totals .grand b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .quote-screen *, .quote-screen *::before, .quote-screen *::after { scroll-behavior: auto !important; transition: none !important; }
}
