:root {
  --black: #0c0c0c;
  --graphite: #454240;
  --graphite-2: #302f2e;
  --brown: #332019;
  --brown-deep: #24140f;
  --orange: #ef6c00;
  --orange-dark: #aa4300;
  --paper: #eeeae7;
  --paper-2: #f7f5f3;
  --line: #b8b0aa;
  --text: #171514;
  --muted: #706963;
  --white: #fff;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--brown);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 275px minmax(0, 1fr); }
.sidebar {
  min-height: 100vh;
  padding: 18px 12px;
  background: linear-gradient(180deg, #0a0807 0%, #492006 58%, #a33d00 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.brand {
  width: 242px;
  padding: 12px 14px;
  background: #070707;
  color: var(--white);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.42;
}
.brand .sidebar-logo { display: block; color: var(--orange); font-size: 34px; letter-spacing: 3px; line-height: 1; }
.brand small { display: block; margin-top: 8px; color: #f2efed; font-size: 11px; letter-spacing: .7px; line-height: 1.35; }
#mainNav { display: grid; gap: 6px; }
.nav-button {
  width: 100%;
  min-height: 57px;
  border: 0;
  padding: 11px 18px;
  background: var(--graphite-2);
  color: var(--white);
  text-align: left;
  border-left: 4px solid transparent;
}
.nav-button:hover, .nav-button:focus-visible { border-left-color: var(--orange); outline: none; }
.nav-button.active { background: linear-gradient(90deg, var(--orange-dark), var(--orange)); border-left-color: #ff9a45; }
.sidebar-foot {
  margin: auto 8px 0;
  padding: 9px 3px;
  background: var(--black);
  color: #77b5dc;
  font-size: 14px;
}

.workspace { min-width: 0; min-height: 100vh; background: var(--brown); display: flex; flex-direction: column; }
.app-header {
  height: 102px;
  padding: 15px 36px 10px;
  border-bottom: 5px solid var(--orange);
  color: var(--white);
  background: linear-gradient(90deg, #0d0d0d 0%, #161616 100%);
}
.app-header h1 { margin: 0 0 5px; font-size: 28px; }
.app-header p { margin: 0; color: #d8d4d1; }
.connection-strip {
  display: grid;
  grid-template-columns: minmax(390px, 2.2fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 8px;
  padding: 10px 12px;
  background: var(--paper);
}
.device-main, .connection-button {
  min-height: 42px;
  border: 0;
  background: var(--graphite);
  color: var(--white);
  font-weight: 800;
}
.device-main { display: flex; align-items: center; padding: 0 18px; }
.connection-button.orange { background: var(--orange); color: #23140c; }
.connection-button:disabled { cursor: not-allowed; opacity: .72; }

.page-header {
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 25px;
  background: #f2f2f1;
}
.step-number {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  background: var(--orange);
  color: var(--white);
  font-size: 24px;
  font-weight: 800;
}
.page-title h2 { margin: 0 0 7px; font-size: 27px; }
.page-title p { margin: 0; color: var(--muted); }
.page-content { flex: 1; padding: 34px 46px var(--action-space, 150px); background: var(--brown); }
.panel { max-width: 1550px; margin: 0 auto; padding: 28px; background: var(--paper); border: 1px solid #8c817b; }
.panel-title { margin: 0 0 20px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px 24px; }
.field { grid-column: span 3; }
.field.wide { grid-column: span 6; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 39px;
  border: 1px solid #aaa29d;
  background: var(--white);
  padding: 7px 10px;
  color: var(--text);
}
.field textarea { min-height: 86px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(239,108,0,.35); border-color: var(--orange); }
.readonly { background: #ddd8d4 !important; }
.helper { color: var(--muted); font-size: 14px; line-height: 1.5; }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.notice { margin-top: 22px; padding: 13px 15px; border-left: 5px solid var(--orange); background: #fff8f1; color: #5b2a0a; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { background: var(--paper-2); border: 1px solid var(--line); padding: 16px; }
.metric-card strong { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; }
.metric-card span { font-size: 22px; font-weight: 800; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-button, .small-button {
  border: 1px solid #766d67;
  background: var(--graphite);
  color: var(--white);
  padding: 10px 16px;
  font-weight: 700;
}
.choice-button.selected, .small-button.primary { border-color: var(--orange); background: var(--orange); color: #23140c; }
.small-button.exception { border-color: #b45309; background: #fff1df; color: #7a2f00; }
.table-wrap { overflow: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: var(--white); }
th, td { padding: 10px 12px; border-bottom: 1px solid #d5cfcb; text-align: left; white-space: nowrap; }
th { background: var(--graphite); color: var(--white); }
.lch-panel { max-width: 1600px; padding: 20px; }
.lch-panel .panel-title { margin-bottom: 14px; }
.lch-table-wrap { overflow-x: hidden; }
.lch-table { width: 100%; min-width: 0; table-layout: fixed; }
.lch-table .col-type { width: 5%; }
.lch-table .col-color { width: 6%; }
.lch-table .col-origin { width: 12%; }
.lch-table .col-lch { width: 15%; }
.lch-table .col-differences { width: 15%; }
.lch-table .col-delta { width: 7%; }
.lch-table .col-status { width: 7%; }
.lch-table .col-action { width: 18%; }
.lch-table th,
.lch-table td {
  padding: 8px 5px;
  white-space: normal;
  overflow-wrap: normal;
  font-size: 14px;
  line-height: 1.2;
  vertical-align: middle;
}
.lch-table th { font-size: 13px; }
.lch-table th:nth-child(n+4),
.lch-table td:nth-child(n+4) { text-align: center; }
.lch-table select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 3px 4px;
  font-size: 13px;
}
.lch-table .small-button {
  width: auto;
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.15;
  flex: 1 1 0;
}
.lch-values,
.lch-differences {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}
.lch-values span,
.lch-differences span {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 44px;
  padding: 5px 2px;
  border: 1px solid #ddd6d1;
  background: #f3f0ed;
  text-align: center;
  font-size: 12px;
  line-height: 1.15;
  align-content: center;
}
.lch-values.sample span {
  border-color: #efc29f;
  background: #fff8f1;
}
.lch-differences span {
  border-color: #e0c6b3;
  background: #f8eee7;
}
.lch-values b,
.lch-differences b {
  color: var(--muted);
  font-size: 10px;
}
.lch-empty { color: var(--muted); }
.delta-main { font-size: 16px; }
.tolerance-out {
  border-color: var(--orange) !important;
  background: #ffd4b3 !important;
  color: #713000 !important;
  font-weight: 900;
}
.review-target { outline: 3px solid var(--orange); outline-offset: -3px; }
.review-target [data-justify-reel-opacity],
.review-target [data-justify-reel-lch],
.review-target [data-justify-reel-density],
.review-target [data-justify-lch],
.review-target [data-justify-density] { box-shadow: 0 0 0 4px rgba(243, 108, 0, .24); }
.measurement-actions { display: flex; align-items: stretch; gap: 5px; flex-wrap: nowrap; width: 100%; }
.correction-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mini-button {
  min-width: 0;
  border: 1px solid #766d67;
  background: #ddd8d4;
  color: #312e2c;
  padding: 5px 6px;
  font-size: 9.5px;
  line-height: 1.1;
  font-weight: 800;
  flex: 1 1 0;
}
.mini-button.danger { border-color: #9b3d13; color: #8a2e08; background: #f5ded2; }
.density-panel { max-width: 1600px; padding: 20px; }
.density-guide { display: flex; gap: 12px; margin: 0 0 14px; }
.paper-density-summary { margin: -4px 0 14px; padding: 9px 12px; border-left: 4px solid var(--orange); background: #fff8f1; font-size: 13px; }
.paper-density-summary.pending { color: #8a3f00; font-weight: 700; }
.mandatory-substrate-alert { display: grid; gap: 5px; margin: 0 0 18px; padding: 14px 16px; border: 2px solid var(--orange); border-left-width: 8px; background: #fff1e5; color: #542400; }
.mandatory-substrate-alert strong { font-size: 15px; }
.mandatory-substrate-alert span { font-size: 13px; }
.density-guide span { padding: 7px 12px; background: #ddd8d4; font-size: 13px; font-weight: 700; }
.density-guide strong { color: var(--orange-dark); }
.density-table-wrap { overflow-x: hidden; }
.density-table { width: 100%; table-layout: fixed; }
.density-table th,
.density-table td { padding: 7px 5px; white-space: normal; text-align: center; font-size: 13px; line-height: 1.15; vertical-align: middle; }
.density-table th:first-child,
.density-table td:first-child { width: 7%; text-align: left; }
.density-table th:last-child,
.density-table td:last-child { width: 19%; }
.density-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.density-actions .small-button { min-width: 0; padding: 6px 3px; font-size: 11px; line-height: 1.1; }
.density-actions .small-button.exception,
.density-actions .measurement-complete { grid-column: 1 / -1; }
.reel-density-actions .small-button { min-height: 48px; padding: 6px 4px; }
.density-actions .mini-button { grid-column: 1 / -1; }
.release-panel { max-width: 1500px; }
.release-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.release-heading p { margin: -10px 0 18px; color: var(--muted); }
.release-overall { padding: 9px 13px; font-size: 12px; font-weight: 800; }
.release-overall.ready { background: #d8d3cf; color: #312e2c; }
.release-overall.pending { background: #ffd4b3; color: #713000; }
.release-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.release-card { min-height: 112px; display: grid; gap: 8px; align-content: center; padding: 14px; border: 1px solid var(--line); background: var(--paper-2); }
.release-card strong { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.release-card span { font-size: 19px; font-weight: 800; }
.release-card span.warn { color: var(--orange-dark); }
.release-card small { color: var(--muted); }
.release-detail { margin-top: 16px; }
.release-detail th, .release-detail td { text-align: center; }
.release-detail th:first-child, .release-detail td:first-child { text-align: left; }
.decision-box { margin-top: 18px; padding: 18px; border: 2px solid var(--orange); background: var(--graphite); color: var(--white); text-align: center; }
.decision-box h3 { margin: 0 0 5px; font-size: 23px; }
.decision-box p { margin: 0 0 14px; color: #e2dedb; }
.decision-actions { display: flex; justify-content: center; gap: 12px; }
.decision-button { min-height: 46px; border: 1px solid var(--orange); padding: 0 24px; font-weight: 800; }
.decision-button.approve { background: var(--orange); color: #23140c; }
.decision-button.reject { background: transparent; color: var(--white); }
.decision-button:disabled { opacity: .45; cursor: not-allowed; }
.adjustment-form { margin-top: 18px; padding: 18px; border-left: 5px solid var(--orange); background: #fff8f1; }
.adjustment-form h3 { margin-top: 0; }
.exception-release-form { margin-top: 18px; padding: 18px; border: 2px solid var(--orange); background: #fff1e5; }
.exception-release-form h3 { margin: 0 0 5px; color: #8a2e08; }
.exception-release-form > p { margin: 0 0 16px; color: #713000; }
.adjustment-history { margin-top: 18px; }
.adjustment-history > div { margin-top: 8px; padding: 10px 12px; border-left: 4px solid var(--orange); background: var(--paper-2); line-height: 1.45; }
.report-details { margin-top: 20px; padding: 18px; border: 2px solid var(--orange); background: var(--paper-2); }
.report-details-heading, .release-record-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.report-details-heading h3 { margin: 0 0 4px; }
.report-details-heading p { margin: 0; color: var(--muted); }
.release-record { margin-top: 16px; padding: 16px; border-left: 5px solid #77716d; background: var(--white); }
.release-record.outside { border-left-color: var(--orange); }
.release-record-title { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.release-record-title > strong { color: var(--orange-dark); }
.release-audit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.release-audit-grid > div { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); background: var(--paper-2); }
.release-audit-grid small, .release-justification small { color: var(--muted); font-weight: 800; }
.release-justification { display: grid; gap: 6px; margin-top: 12px; padding: 12px; border-left: 4px solid var(--orange); background: #fff1e5; }
.release-record h4 { margin: 16px 0 8px; }
.no-deviations { padding: 12px; background: #e8e5e2; font-weight: 700; }
.reel-panel { max-width: 1500px; }
.reel-identification { margin: 18px 0; }
.reel-summary-grid { margin-bottom: 18px; }
.reel-module { margin-top: 16px; padding: 16px; border: 1px solid var(--line); background: var(--white); }
.reel-module > h3 { margin: 0 0 12px; padding-bottom: 9px; border-bottom: 3px solid var(--graphite); }
.reel-button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reel-button-row > strong { margin-left: auto; padding: 10px 16px; background: var(--paper-2); font-size: 18px; }
.next-reel-entry { margin: 20px 0; padding: 16px; border-left: 5px solid var(--orange); background: #fff8f1; display: grid; grid-template-columns: minmax(220px, 320px) 1fr; align-items: end; gap: 18px; }
.next-reel-entry .helper { padding-bottom: 12px; }
.order-completed { margin: 20px 0; padding: 18px; border: 2px solid var(--orange); background: var(--graphite); color: var(--white); display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.order-completed strong { font-size: 20px; }
.order-completed span { text-align: right; }
.record-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-button.adjustment { border-color: var(--orange); color: #8a3f00; }
.reel-adjustment-panel { border: 2px solid var(--orange); }
.saved-adjustments { display: grid; gap: 10px; margin: 14px 0; }
.reel-adjustment-record { padding: 13px 15px; border-left: 5px solid var(--orange); background: #fff8f1; }
.reel-adjustment-record > strong { display: block; color: #9b4100; }
.reel-adjustment-record > span { display: block; margin: 4px 0 8px; color: var(--muted); font-size: 13px; }
.reel-adjustment-record p { margin: 5px 0; white-space: normal; }
.report-reel-adjustments { margin-top: 18px; }
.reel-deviation-list { margin: 14px 0; padding: 14px; background: #f2edE9; border: 1px solid var(--line); }
.reel-deviation-list h4 { margin: 0 0 8px; }
.reel-deviation-list div { padding: 6px 0; border-bottom: 1px solid #d5cfcb; }
@media (max-width: 900px) { .next-reel-entry { grid-template-columns: 1fr; } }
.reel-history { margin-top: 20px; }
.reading-history { margin-top: 16px; border: 1px solid var(--line); background: var(--paper-2); }
.reading-history summary { cursor: pointer; padding: 11px 14px; background: #ddd8d4; color: #312e2c; font-size: 13px; font-weight: 800; }
.reading-history .table-wrap { border-width: 1px 0 0; }
.reading-history th, .reading-history td { padding: 7px 9px; font-size: 12px; }
.connection-reminder-overlay { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px; background: rgba(12, 8, 6, .88); }
.connection-reminder { width: min(620px, 100%); padding: 30px; border: 3px solid var(--orange); background: var(--paper); text-align: center; box-shadow: 0 20px 70px rgba(0,0,0,.55); }
.connection-reminder-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--orange); color: var(--white); font-size: 32px; font-weight: 900; }
.connection-reminder h2 { margin: 0 0 10px; font-size: 27px; }
.connection-reminder p { margin: 0 0 20px; color: var(--muted); font-size: 17px; }
.connection-reminder-actions { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; }
.connection-reminder .decision-button.reject { background: var(--graphite); color: var(--white); }
.connection-reminder small { color: var(--orange-dark); font-weight: 700; }
.out-of-standard-list { display: grid; gap: 12px; margin: 14px 0 18px; }
.deviation-card { overflow: hidden; border: 1px solid var(--line); border-left: 6px solid var(--orange); background: var(--white); }
.deviation-card-heading { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--paper-2); }
.deviation-card-heading > b { display: grid; place-items: center; width: 28px; height: 28px; background: var(--graphite); color: #fff; }
.deviation-card-heading > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.deviation-card-heading strong { font-size: 15px; }
.deviation-card-heading span { color: var(--orange-dark); font-weight: 800; }
.deviation-comparison { display: grid; grid-template-columns: 1fr 1fr; }
.deviation-comparison > div { padding: 12px 14px; }
.deviation-result { background: #fff4ec; border-right: 1px solid var(--line); }
.deviation-limit { background: #f4f2f0; }
.deviation-comparison small { display: block; margin-bottom: 7px; color: var(--muted); font-weight: 900; }
.deviation-comparison div > div { display: flex; gap: 7px; flex-wrap: wrap; }
.deviation-comparison div > div span { padding: 5px 8px; background: #fff; border: 1px solid #ddd2ca; color: #5d2710; font-weight: 800; }
.history-reset-panel { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 18px; padding: 16px; border: 2px solid #b92b22; background: #fff4f2; }
.history-reset-panel div { display: grid; gap: 5px; }
.history-reset-panel strong { color: #9b211b; }
.history-reset-panel span { color: var(--muted); }
@media (max-width: 760px) { .deviation-comparison { grid-template-columns: 1fr; } .deviation-result { border-right: 0; border-bottom: 1px solid var(--line); } .history-reset-panel { align-items: stretch; flex-direction: column; } }
.settings-panel { max-width: 1250px; }
.settings-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.settings-heading p { margin: -10px 0 18px; color: var(--muted); }
.settings-table th:nth-child(2), .settings-table th:nth-child(3), .settings-table td:nth-child(2), .settings-table td:nth-child(3) { width: 24%; text-align: center; }
.settings-table input { width: 100%; min-height: 36px; border: 1px solid #aaa29d; padding: 6px 9px; text-align: center; }
.settings-table input[readonly] { background: #ddd8d4; color: #5b5652; }
.admin-activation { display: grid; grid-template-columns: 1fr auto; gap: 5px 18px; align-items: center; margin-top: 16px; padding: 14px; border: 1px solid var(--orange); background: #fff8f1; }
.admin-activation span { color: var(--muted); }
.admin-activation button { grid-column: 2; grid-row: 1 / span 2; }
.lch-table .status-chip { padding: 4px 5px; font-size: 11px; }
.status-chip { display: inline-block; padding: 4px 9px; background: #d8d3cf; color: #312e2c; font-size: 12px; font-weight: 800; }
.status-chip.orange { background: #ffd4b3; color: #713000; }
.status-chip.approved { background: #d9f2df; color: #176b35; }
.metric-card.opacity-complete { border-color: #7bc38d; background: #e4f5e8; }
.metric-card.opacity-complete strong, .metric-card.opacity-complete span { color: #176b35; }
.opacity-complete-result { padding: 12px 18px; background: #d9f2df; color: #176b35; }
.status-chip.rejected { background: #fbe0dd; color: #a7231c; }
.measurement-complete { flex: 1; align-self: center; color: #176b35; font-size: 12px; font-weight: 800; text-align: center; }
.measurement-retry-icon { border: 1px solid #b8aaa2; background: #fff; color: #4a403b; cursor: pointer; font-size: 17px; padding: 3px 8px; }
.empty-state { padding: 45px 25px; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--text); }

/* V1.138 — Projeto e Instrução de Trabalho */
.project-panel, .instruction-panel { max-width: 1380px; }
.document-heading { margin-bottom: 22px; border-left: 7px solid var(--orange); padding: 4px 0 4px 18px; }
.document-heading h3 { margin: 7px 0 6px; font-size: 25px; }
.document-heading p { max-width: 1050px; margin: 0; color: var(--muted); line-height: 1.5; }
.project-brand { display: flex; align-items: center; gap: 14px; }
.project-brand > div { display: grid; gap: 3px; }
.project-brand small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .7px; }
.project-logo-mark { min-width: 86px; padding: 9px 12px; background: var(--graphite); border-bottom: 5px solid var(--orange); color: var(--white); font-size: 23px; font-weight: 900; letter-spacing: 2px; text-align: center; }
.tolerance-scope { margin-top: 24px; border: 1px solid var(--line); background: #f8f6f4; }
.tolerance-scope-heading { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #ded9d5; }
.tolerance-scope-heading > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; background: var(--graphite); color: var(--white); font-size: 18px; font-weight: 900; }
.reel-scope .tolerance-scope-heading > span { background: var(--orange); color: #25150d; }
.tolerance-scope-heading h4 { margin: 0 0 3px; }
.tolerance-scope-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.tolerance-scope .table-wrap { border-width: 1px 0 0; }
.approval-rule { display: flex; gap: 18px; margin: 22px 0; padding: 15px 18px; border-left: 6px solid var(--orange); background: #fff8f1; }
.approval-rule strong { white-space: nowrap; }
.approval-rule span { color: #654125; line-height: 1.45; }
.document-code { color: var(--orange-dark); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.project-highlight { display: grid; gap: 8px; margin-bottom: 18px; border: 2px solid var(--orange); padding: 18px 20px; background: #fff7ef; }
.project-highlight span { color: var(--orange-dark); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.project-highlight strong { font-size: 18px; line-height: 1.45; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.project-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-card { border: 1px solid #cfc7c1; border-top: 5px solid var(--graphite); padding: 16px 18px; background: var(--white); }
.project-card.critical { border-top-color: #b82d22; }
.project-card.purpose, .project-card.gain { border-top-color: var(--orange); }
.project-card h4, .project-section h4, .instruction-step h4 { margin: 0 0 8px; }
.project-card p, .instruction-step p { margin: 0; color: var(--muted); line-height: 1.5; }
.project-card ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.6; }
.project-quality { border-left: 7px solid var(--orange); background: #fff7ef; }
.project-quality p { margin: 0; color: #4f3424; font-size: 15px; line-height: 1.65; }
.project-roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.project-roles div { display: grid; gap: 6px; border: 1px solid #d9d1cb; border-top: 4px solid var(--graphite); padding: 13px; background: var(--white); }
.project-roles span { color: var(--muted); line-height: 1.45; }
.project-indicators { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.project-indicators span { border-left: 4px solid var(--orange); padding: 10px 12px; background: var(--white); font-weight: 800; }
.project-conclusion { display: grid; gap: 9px; border: 2px solid var(--orange); padding: 20px; background: var(--graphite); color: var(--white); }
.project-conclusion span { color: #ffb071; font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.project-conclusion strong { font-size: 17px; line-height: 1.55; }
.project-document { counter-reset: project-section; }
.project-cover { margin-bottom: 24px; border: 2px solid var(--graphite); border-top: 9px solid var(--orange); padding: 26px; background: linear-gradient(135deg, #fff 0%, #f6f1ed 100%); }
.project-cover h3 { max-width: 1050px; margin: 22px 0 10px; font-size: 29px; line-height: 1.22; }
.project-cover > p { max-width: 1040px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.project-cover-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.project-cover-meta span { border-left: 4px solid var(--orange); padding: 10px 12px; background: var(--white); color: var(--muted); font-size: 12px; }
.project-cover-meta b { display: block; margin-bottom: 3px; color: var(--text); }
.project-numbered { margin-bottom: 20px; border: 1px solid #cfc7c1; padding: 20px; background: #f8f5f2; }
.project-numbered > h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 20px; }
.project-numbered > h3 > b { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; background: var(--graphite); color: var(--white); }
.project-numbered > p { margin: 9px 0 0; color: #5f5651; line-height: 1.65; }
.project-objectives, .project-questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.project-objectives span, .project-questions span { border-left: 4px solid var(--orange); padding: 11px 13px; background: var(--white); line-height: 1.45; }
.project-note { border-left: 5px solid var(--orange); padding: 13px 16px; background: #fff5eb; }
.project-menu-table { width: 100%; margin-top: 5px; overflow: visible; }
.project-menu-table table { width: 100%; min-width: 0; table-layout: fixed; }
.project-menu-table th,
.project-menu-table td { padding: 9px 8px; white-space: normal; overflow-wrap: break-word; word-break: normal; }
.project-menu-table th { vertical-align: middle; font-size: 12px; line-height: 1.2; }
.project-menu-table td { vertical-align: top; color: #544b46; font-size: 11px; line-height: 1.4; }
.project-menu-table th:nth-child(1), .project-menu-table td:nth-child(1) { width: 6%; text-align: center; }
.project-menu-table th:nth-child(2), .project-menu-table td:nth-child(2) { width: 15%; color: var(--text); }
.project-menu-table th:nth-child(3), .project-menu-table td:nth-child(3) { width: 22%; }
.project-menu-table th:nth-child(4), .project-menu-table td:nth-child(4) { width: 29%; }
.project-menu-table th:nth-child(5), .project-menu-table td:nth-child(5) { width: 28%; }
.project-stage-number { display: grid; place-items: center; width: 30px; height: 30px; margin: auto; background: var(--orange); color: var(--white); font-weight: 900; }
.project-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-rules article { border: 1px solid #d8d0ca; border-top: 5px solid var(--orange); padding: 15px; background: var(--white); }
.project-rules h4 { margin: 0 0 7px; }
.project-rules p { margin: 0; color: var(--muted); line-height: 1.55; }
.project-control-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.project-control-list li { border-left: 4px solid var(--graphite); padding: 10px 13px; background: var(--white); color: var(--muted); line-height: 1.5; }
.project-control-list strong { color: var(--text); }
.project-footer { margin-top: 18px; border-top: 2px solid var(--orange); padding: 13px 0 0; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.report-metrics { display: flex; flex-wrap: wrap; gap: 5px; min-width: 360px; }
.report-metric { display: grid; gap: 1px; min-width: 78px; border: 1px solid #d8d0ca; padding: 5px 7px; background: #f7f4f1; text-align: center; }
.report-metric b { color: var(--muted); font-size: 10px; }
.report-metric strong { font-size: 13px; }
.report-metric small { color: #6a605b; font-size: 9px; white-space: nowrap; }
.attempt-report-wrap { width: 100%; overflow-x: hidden; }
.attempt-report-table { width: 100%; min-width: 0; table-layout: fixed; }
.attempt-report-table .attempt-sequence { width: 6%; }
.attempt-report-table .attempt-module { width: 18%; }
.attempt-report-table .attempt-color { width: 8%; }
.attempt-report-table .attempt-field { width: 12%; }
.attempt-report-table .attempt-result { width: 30%; }
.attempt-report-table .attempt-status { width: 10%; }
.attempt-report-table .attempt-date { width: 10%; }
.attempt-report-table .attempt-serial { width: 6%; }
.attempt-report-table th,
.attempt-report-table td { padding: 8px 6px; white-space: normal; overflow-wrap: break-word; vertical-align: middle; font-size: 11px; line-height: 1.3; }
.attempt-report-table th { font-size: 11px; }
.attempt-report-table .report-metrics { min-width: 0; gap: 4px; }
.attempt-report-table .report-metric { min-width: 66px; padding: 4px 5px; }
.attempt-report-table .report-metric strong { font-size: 12px; }
.attempt-report-table .report-metric small { white-space: normal; line-height: 1.15; }
.attempt-report-table .status-chip { max-width: 100%; padding: 4px 5px; white-space: normal; text-align: center; }
.project-section { margin-bottom: 18px; border: 1px solid #cfc7c1; padding: 18px; background: #f8f5f2; }
.method-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.method-flow > div { display: grid; align-content: start; gap: 6px; min-height: 150px; padding: 14px; background: var(--white); }
.method-flow b { display: grid; place-items: center; width: 34px; height: 34px; background: var(--orange); color: var(--white); font-size: 17px; }
.method-flow strong { font-size: 15px; }
.method-flow span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.instruction-alert { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; border-left: 7px solid var(--orange); padding: 14px 16px; background: #fff7ef; }
.instruction-alert strong { white-space: nowrap; color: var(--orange-dark); }
.instruction-alert span { color: var(--muted); line-height: 1.45; }
.instruction-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.instruction-step { display: grid; grid-template-columns: 48px 1fr; gap: 14px; min-height: 128px; border: 1px solid #d3cbc5; padding: 15px; background: var(--white); }
.instruction-step > b { display: grid; place-items: center; width: 42px; height: 42px; background: var(--graphite); color: var(--white); font-size: 18px; }
.instruction-checklist > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.instruction-checklist span { padding: 10px 12px; background: var(--white); color: #2f5f3b; font-weight: 700; }

.action-bar {
  position: fixed;
  left: 301px;
  right: 26px;
  bottom: 10px;
  z-index: 100;
  min-height: 90px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px;
  max-height: 45vh;
  overflow-y: auto;
  border: 2px solid var(--orange);
  background: var(--graphite);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, .28);
}
.action-bar:empty { display: none; }
.main-action {
  min-height: 52px;
  border: 0;
  padding: 0 32px;
  background: transparent;
  color: var(--white);
  font-weight: 800;
}
.main-action:hover, .main-action:focus-visible { color: #ffb071; outline: none; }
.secondary-action { min-height: 46px; border: 1px solid #ffb071; padding: 0 22px; background: transparent; color: #ffdbc0; font-weight: 800; cursor: pointer; }
.secondary-action:hover, .secondary-action:focus-visible { background: #5a514d; color: var(--white); outline: none; }
.setup-release-blocked { display: grid; justify-items: center; gap: 4px; color: #ffd2b0; text-align: center; }
.setup-release-blocked strong { color: #fff; font-size: 17px; }
.setup-release-blocked span { font-size: 13px; }
.danger-text { color: #b34700; font-weight: 700; }

.profile-picker, .machine-picker { position: relative; z-index: 20; }
.machine-picker:focus-within { z-index: 200; }
.machine-picker .profile-options { z-index: 210; }
.profile-input-wrap { position: relative; display: flex; }
.profile-input-wrap input { padding-right: 52px; }
.profile-options-button { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 48px; border: 0; border-left: 1px solid #d0c8c2; background: var(--white); color: var(--text); font-size: 18px; cursor: pointer; }
.profile-options-button:hover, .profile-options-button:focus-visible { background: #f2ece7; outline: none; }
.profile-options { position: absolute; top: calc(100% - 19px); left: 0; right: 0; z-index: 50; max-height: 280px; overflow-y: auto; border: 1px solid #aaa29d; background: var(--white); box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.profile-option { display: grid; width: 100%; gap: 3px; border: 0; border-bottom: 1px solid #e3ddd8; padding: 11px 14px; background: var(--white); color: var(--text); text-align: left; cursor: pointer; }
.profile-option:last-child { border-bottom: 0; }
.profile-option:hover, .profile-option.active { background: #fff0e3; }
.profile-option strong { font-size: 14px; }
.profile-option span { color: var(--muted); font-size: 12px; }
.profile-option-empty { padding: 14px; color: var(--muted); }
.criticality-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.criticality-options label { display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid #c7beb8; padding: 8px 12px; background: var(--white); color: var(--text); font-weight: 800; cursor: pointer; }
.criticality-options input { width: 18px; height: 18px; accent-color: var(--orange); }
.physical-reading-status { display: grid; gap: 4px; margin: 0 0 18px; border-left: 6px solid var(--orange); padding: 12px 15px; background: #fff7ef; }
.physical-reading-status strong { font-size: 14px; }
.physical-reading-status span { color: var(--muted); font-size: 13px; }
.physical-reading-status.active { border-left-color: #138a43; background: #edf9f1; }
.physical-reading-status.active strong, .physical-reading-status.captured strong { color: #087231; }
.physical-reading-status.captured { border-left-color: #138a43; background: #dff4e6; }
.physical-reading-status.warning { border-left-color: #b34700; background: #fff0e6; }
.physical-reading-status.complete { border-left-color: #77706b; background: #eeeae7; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .brand { width: 100%; font-size: 18px; }
  .connection-strip { grid-template-columns: 1fr 1fr; }
  .device-main { grid-column: 1 / -1; }
  .field, .field.wide { grid-column: span 6; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .release-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .release-audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-roles, .project-indicators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-cover-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid.three-columns { grid-template-columns: 1fr; }
  .instruction-checklist > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-bar { left: 256px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { min-height: auto; }
  .sidebar-foot { display: none; }
  .connection-strip { grid-template-columns: 1fr; }
  .device-main { grid-column: auto; }
  .page-content { padding: 18px 12px; }
  .panel { padding: 18px; }
  .field, .field.wide { grid-column: 1 / -1; }
  .cards { grid-template-columns: 1fr; }
  .release-summary-grid { grid-template-columns: 1fr; }
  .release-audit-grid { grid-template-columns: 1fr; }
  .decision-actions { flex-direction: column; }
  .criticality-options { grid-template-columns: 1fr 1fr; }
  .project-grid, .instruction-steps, .method-flow, .instruction-checklist > div, .project-roles, .project-indicators, .project-cover-meta, .project-objectives, .project-questions, .project-rules { grid-template-columns: 1fr; }
  .instruction-alert { display: grid; }
  .page-content { padding-bottom: var(--action-space, 145px); }
  .action-bar { left: 12px; right: 12px; bottom: 8px; }
}

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body { background: #fff !important; color: #111; }
  .sidebar, .app-header, .connection-strip, .page-header, .action-bar { display: none !important; }
  .app-shell, .workspace { display: block; background: #fff !important; }
  .page-content { padding: 0; background: #fff !important; }
  .project-panel { max-width: none; padding: 0; }
  .project-cover, .project-numbered, .project-highlight, .project-conclusion { break-inside: avoid; box-shadow: none; }
  .project-menu-table { overflow: visible; }
  .project-menu-table table { min-width: 0; font-size: 8pt; }
  .project-menu-table th, .project-menu-table td { padding: 5px; font-size: 7.5pt; }
  .project-card, .project-rules article, .project-roles > div { break-inside: avoid; }
}

/* V1.52 — ações de medição mantidas horizontalmente em cada linha */
.lch-table td:last-child { padding-left: 4px; padding-right: 4px; }
.measurement-actions > button { white-space: normal; }

/* V1.74 — diagnóstico controlado Pantone Digital (somente leitura) */
.digital-diagnostic { margin-top: 18px; }
.digital-diagnostic .diagnostic-actions { display: flex; justify-content: flex-end; padding: 12px 0 0; }
.digital-diagnostic code { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9em; }
.diagnostic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.diagnostic-grid h4 { margin: 0 0 8px; }
.diagnostic-standard-card { margin-top: 12px; padding: 12px; border: 1px solid #cfc9c5; background: #fff; }
.diagnostic-standard-card.matched { border: 2px solid #f26d00; }
@media (max-width: 1100px) { .diagnostic-grid { grid-template-columns: 1fr; } }

.diag-probe-chip{display:inline-block;margin:2px 6px 2px 0;padding:3px 6px;border:1px solid #c9c1ba;background:#f7f4f1;font-family:monospace;font-size:12px;}

/* V1.104 — previews do display eXact decodificado */
.exact-screen-decoded-card { margin: 12px 0; padding: 12px; border: 1px solid #cfc8c2; background: #fff; }
.exact-screen-preview { margin-top: 10px; overflow: auto; }
.exact-screen-preview img { image-rendering: pixelated; width: auto; max-width: 100%; min-width: 240px; border: 1px solid #4a4542; background: #111; }
.official-report-separation {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 6px solid #f36c00;
  background: #fff5ec;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.official-report-separation strong { color: #8d2f00; }
.official-report-separation span { color: #665d58; }
.official-report {
  margin: 22px 0;
  border: 2px solid #494542;
  background: #fff;
}
.official-report > summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  color: #fff;
  background: #494542;
}
.official-report > summary::-webkit-details-marker { display: none; }
.official-report > summary span {
  padding: 5px 8px;
  background: #f36c00;
  color: #111;
  font-weight: 900;
}
.official-report > summary strong { font-size: 1.18rem; }
.official-report > summary small { color: #f4e7df; }
.process-control-report > summary { background: #33201a; }
.official-report-body { padding: 20px; }
.report-phase-description {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid #f36c00;
  background: #faf7f5;
  color: #5c514b;
}
.report-phase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.report-phase-grid > div {
  padding: 13px;
  border: 1px solid #d8d0cb;
  background: #f7f4f2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.report-phase-grid small { color: #6a605b; font-weight: 700; }
.report-phase-grid strong { font-size: 1.05rem; }
@media (max-width: 900px) {
  .official-report > summary { grid-template-columns: 1fr; }
  .report-phase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* V1.192 — reconexão sem perda de etapa e retomada de produção interrompida. */
.reconnect-notice {
  margin: 0 24px;
  padding: 12px 16px;
  border: 2px solid #f36c00;
  background: #fff3e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.reconnect-notice[hidden] { display: none; }
.reconnect-notice div { display: flex; flex-direction: column; gap: 3px; }
.reconnect-notice strong { color: #8d2f00; }
.resume-order-panel { margin-top: 14px; border: 2px solid #f36c00; background: #fff8f1; }
.resume-order-panel[hidden] { display: none; }
.resume-order-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; border-bottom: 1px solid #dbcfc7; }
.resume-order-card:last-child { border-bottom: 0; }
.resume-order-card div { display: flex; flex-direction: column; gap: 4px; }
.resume-order-card span { font-weight: 800; color: #8d2f00; }
.resume-order-card small { color: #6b625d; }
@media (max-width: 800px) {
  .reconnect-notice, .resume-order-card { align-items: stretch; flex-direction: column; }
}

html { scroll-padding-bottom: var(--action-space, 150px); }
@media print { .page-content { padding-bottom: 0; } }

/* Adaptacao automatica para notebooks e telas pequenas. */
@media screen {
  .app-header { height: auto; min-height: 90px; }
  .app-header h1 { font-size: clamp(19px, 1.9vw, 28px); line-height: 1.25; overflow-wrap: anywhere; }
  .app-header h1 small { font-size: .72em; }
  .brand { max-width: 100%; }
  .table-wrap { max-width: 100%; overflow-x: auto; }
}
@media screen and (min-width: 761px) and (max-width: 1200px), screen and (min-width: 761px) and (max-height: 760px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100dvh; min-height: 0; overflow-y: auto; padding: 10px 8px; gap: 10px; }
  .brand { width: 100%; padding: 10px; }
  .brand .sidebar-logo { font-size: 28px; }
  .brand small { font-size: 10px; }
  #mainNav { gap: 5px; }
  .nav-button { min-height: 40px; padding: 8px 10px; font-size: 13px; }
  .sidebar-foot { font-size: 11px; margin: auto 0 0; }
  .app-header { min-height: 0; padding: 10px 18px; }
  .app-header h1 { font-size: 21px; margin-bottom: 4px; }
  .app-header p { font-size: 12px; }
  .connection-strip { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; padding: 7px 10px; }
  .device-main { grid-column: auto; min-width: 0; padding: 6px 10px; font-size: 12px; overflow-wrap: anywhere; }
  .connection-button { padding: 6px 10px; min-height: 34px; font-size: 12px; }
  .page-header { min-height: 74px; padding: 12px 18px; gap: 14px; }
  .step-number { width: 42px; height: 42px; flex-basis: 42px; font-size: 21px; }
  .page-title h2 { font-size: 22px; margin-bottom: 4px; }
  .page-title p { font-size: 13px; }
  .page-content { padding: 16px 18px var(--action-space, 120px); }
  .panel { padding: 18px; }
  .panel-title { margin-bottom: 14px; font-size: 18px; }
  .form-grid { gap: 12px 16px; }
  .notice { margin-top: 14px; padding: 10px 12px; }
  .action-bar { left: 204px; right: 14px; bottom: 8px; }
  .main-action { min-height: 42px; padding: 8px 18px; font-size: 14px; }
  .reconnect-notice { margin: 0 10px; }
}
@media screen and (max-width: 760px) {
  .app-header { padding: 12px; }
  .app-header h1 { font-size: 19px; }
  .sidebar { padding: 10px; gap: 10px; }
  .brand { width: 100%; padding: 10px; }
  #mainNav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-button { min-height: 42px; padding: 8px; font-size: 13px; }
  .page-header { padding: 12px; gap: 12px; }
  .page-title h2 { font-size: 21px; }
  .page-title p { font-size: 13px; }
}

/* Barra inferior compacta: 45px em vez de 90px para uma linha. */
@media screen {
  .action-bar { min-height: 45px; padding: 4px 8px; gap: 6px; }
  .action-bar .main-action, .action-bar .secondary-action { min-height: 33px; padding: 4px 16px; }
}


/* Nomes das cores centralizados e contidos na propria celula. */
.lch-table th:nth-child(2), .lch-table td:nth-child(2) {
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.lch-table td:nth-child(2) strong {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

/* Mais espaco para nomes completos, preservando as nove colunas. */
.lch-table .col-type { width: 2%; }
.lch-table .col-color { width: 9%; }
.lch-table th:first-child { font-size: 0; }
.lch-table th:nth-child(2), .lch-table td:nth-child(2) {
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
  padding-left: 2px;
  padding-right: 2px;
}
.lch-table td:nth-child(2) strong {
  font-size: 12px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.3;
}
/* As tabelas das bobinas nao possuem colgroup. */
.lch-table:not(:has(colgroup)) th:first-child { width: 2%; }
.lch-table:not(:has(colgroup)) th:nth-child(2) { width: 9%; }

/* Padrao visual das tabelas de medicao e controle por bobina. */
@media screen {
  body { font-size: 14px; line-height: 1.4; }
  button, input, select, textarea { font-family: inherit; }
  .lch-table-wrap, .density-table-wrap { overflow-x: auto; }
  .lch-table { min-width: 1000px; }
  .density-table { min-width: 920px; }
  .lch-table th, .density-table th {
    padding: 10px 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    vertical-align: middle;
    text-align: center;
    overflow-wrap: normal;
    word-break: normal;
  }
  .lch-table td, .density-table td {
    padding: 10px 7px;
    font-size: 13px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
  }
  .lch-table td:nth-child(2) strong, .density-table td:first-child strong {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
  }
  .density-table th:first-child, .density-table td:first-child { width: 9%; text-align: center; }
  .density-table th:nth-last-child(2), .density-table td:nth-last-child(2) { width: 12%; }
  .density-table th:last-child, .density-table td:last-child { width: 21%; }
  .lch-table .status-chip, .density-table .status-chip {
    max-width: 100%;
    padding: 5px 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
  }
  .density-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .density-actions .small-button, .reel-density-actions .small-button,
  .lch-table .small-button {
    min-height: 40px;
    padding: 7px 5px;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: normal;
  }
  .density-actions .small-button.exception { min-height: 36px; }
  .measurement-complete { font-size: 11px; line-height: 1.35; }
  .lch-values span { font-size: 12px; line-height: 1.35; }
  .lch-values b { font-size: 11px; font-weight: 600; }
  .panel-title { line-height: 1.35; }
}

/* Tabelas compactas dentro da largura disponivel, sem rolagem lateral. */
@media screen {
  .density-table, .lch-table { min-width: 0; width: 100%; table-layout: fixed; }
  .density-table-wrap, .lch-table-wrap { overflow-x: auto; }
  .density-table th, .density-table td { padding: 8px 3px; font-size: 11px; line-height: 1.25; }
  .density-table th { font-weight: 700; }
  .density-table th:first-child, .density-table td:first-child { width: 10%; }
  .density-table th:nth-last-child(2), .density-table td:nth-last-child(2) { width: 12%; }
  .density-table th:last-child, .density-table td:last-child { width: 19%; }
  .density-table td:first-child strong { font-size: 11px; }
  .density-table th, .density-table td { border-right: 1px solid #e2dcd7; }
  .density-table tbody tr:nth-child(even) { background: #faf8f6; }
  .density-table .status-chip { font-size: 10px; padding: 4px 2px; line-height: 1.25; }
  .density-actions { grid-template-columns: 1fr; gap: 3px; }
  .density-actions .small-button, .reel-density-actions .small-button {
    min-height: 26px; padding: 4px 3px; font-size: 10px; line-height: 1.2;
  }
  .density-actions .small-button br { display: none; }
  .density-actions .small-button.exception { min-height: 28px; }
  .density-actions .measurement-complete { font-size: 10px; line-height: 1.25; }
  .lch-table th, .lch-table td { padding: 7px 3px; font-size: 11px; line-height: 1.25; }
  .lch-table td:nth-child(2) strong { font-size: 11px; }
  .lch-table .lch-values { gap: 2px; }
  .lch-table .lch-values span { min-width: 0; font-size: 10px; padding: 3px 1px; }
  .lch-table .lch-values b { font-size: 9px; }
  .lch-table .status-chip { font-size: 9px; padding: 3px 2px; overflow-wrap: anywhere; }
  .lch-table .measurement-actions { flex-wrap: wrap; gap: 3px; }
  .lch-table .measurement-complete { font-size: 9px; overflow-wrap: anywhere; }
  .lch-table .small-button { min-height: 30px; padding: 5px 3px; font-size: 10px; }
  .lch-table th, .lch-table td { border-right: 1px solid #e2dcd7; }
}

#sgcfKeyboard { position:fixed; bottom:0; left:0; right:0; z-index:1000; background:#302f2e; color:white; padding:8px; box-shadow:0 -4px 18px #0006; }
#sgcfKeyboard[hidden] { display:none; }
.keyboard-heading { display:flex; align-items:center; justify-content:space-between; max-width:850px; margin:0 auto 5px; }
.keyboard-row { display:flex; justify-content:center; gap:5px; max-width:850px; margin:4px auto; }
#sgcfKeyboard button { flex:1; min-width:0; min-height:32px; border:1px solid #777; border-radius:4px; background:#f7f5f3; color:#171514; font-size:15px; padding:4px; touch-action:manipulation; }
#sgcfKeyboard .keyboard-heading button { flex:0 0 auto; font-size:12px; padding:4px 12px; }
body.keyboard-open .page-content { padding-bottom:calc(var(--action-space,120px) + 310px); }

@media print { #sgcfKeyboard {display:none !important;} }

/* Oculta a barra de acoes durante a digitacao no teclado virtual. */
@media screen { body:has(#sgcfKeyboard:not([hidden])) .action-bar { display: none; } }


/* Padrao visual operacional: acoes separadas e leituras compactas. */
@media screen {
 .action-bar { gap:10px; padding:6px; justify-content:flex-end; }
 .action-bar button.main-action { flex:0 1 auto; border:1px solid #f28a35; border-radius:4px; background:#ef6c00; color:#171514; min-height:34px; padding:6px 14px; font-size:12px; line-height:1.3; }
 .action-bar button.bar-secondary { margin-right:auto; border-color:#b9b0aa; background:transparent; color:#fff; }
 .action-bar button:disabled {opacity:.5;cursor:not-allowed;}
 .density-actions { grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
 .density-actions button[data-density-step],.density-actions button[data-reel-step] { min-height:30px; padding:4px 1px; font-size:11px; line-height:1.2; border-radius:3px; }
 .density-table td { padding:7px 3px; }
 .density-table .measurement-complete { grid-column:1/-1; }
 .employee-registry { margin-bottom:24px; padding:18px; border:1px solid #c6bdb5; border-top:3px solid #ef6c00; background:#f7f5f3; }
 .employee-registry h3 {margin:0 0 6px;}
 .employee-form {display:grid;grid-template-columns:minmax(100px,1fr) minmax(160px,2fr) auto;gap:12px;align-items:end;margin:16px 0;}
 .employee-name-hint {min-height:18px;color:#5a3a25;font-weight:600;}
 .report-identity {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0;}
 .report-identity>div {padding:12px;background:#f3f0ed;border:1px solid #ded6d0;}
 .report-identity small,.report-identity strong {display:block;}
 .report-identity small {font-size:10px;letter-spacing:.6px;color:#756b63;margin-bottom:5px;}
 .report-identity strong {font-size:13px;overflow-wrap:anywhere;}
 .report-details {background:#fff;padding:20px;border:1px solid #d5cec7;margin-top:20px;}
 .report-details-heading {align-items:flex-start;gap:14px;border-bottom:2px solid #ef6c00;padding-bottom:14px;}
 .report-details-heading h3 {font-size:21px;margin:0 0 8px;}
 .report-details-heading p {margin:4px 0;font-size:12px;color:#625951;line-height:1.5;}
 .official-report-separation {margin:16px 0;padding:10px 12px;font-size:12px;border-left-width:3px;}
 .official-report {margin:18px 0;border:1px solid #d5cec7;}
 .official-report>summary {padding:13px 15px;gap:10px;}
 .official-report>summary strong {font-size:15px;}
 .official-report-body {padding:14px;}
 .report-details table {table-layout:fixed;width:100%;}
 .report-details th,.report-details td {font-size:11px;padding:8px 5px;white-space:normal;overflow-wrap:anywhere;line-height:1.45;border-right:1px solid #e7e1dc;}
 .report-details tbody tr:nth-child(even) {background:#f8f6f4;}
 .report-details .status-chip {font-size:10px;font-weight:600;padding:4px;line-height:1.3;}
 .report-details .attempt-report-table {min-width:0;}
 .report-details .attempt-sequence {width:5%;}
 .report-details .attempt-module {width:12%;}
 .report-details .attempt-color {width:11%;}
 .report-details .attempt-field {width:11%;}
 .report-details .attempt-result {width:24%;}
 .report-details .attempt-status {width:12%;}
 .report-details .attempt-date {width:16%;}
 .report-details .attempt-serial {width:9%;}
 .panel:has(#reportSearch)>h3 {font-size:22px;margin-bottom:10px;}
 .panel:has(#reportSearch)> .table-wrap th,.panel:has(#reportSearch)> .table-wrap td {font-size:12px;white-space:normal;padding:10px 7px;overflow-wrap:anywhere;}
 .panel:has(#reportSearch)> .table-wrap tbody tr:nth-child(even) {background:#f8f6f4;}
}
@media screen and (max-width:760px) { .employee-form,.report-identity {grid-template-columns:1fr;} }
@media print {
 .report-details {border:0;padding:0;}
 .report-details .mini-button {display:none;}
 .report-details th,.report-details td {font-size:8pt;white-space:normal;overflow-wrap:anywhere;padding:5px;border:1px solid #ddd;}
 .report-details thead {display:table-header-group;}
 .report-details tr {break-inside:avoid;}
}

/* Relatorio: identificacao compacta e valores na largura total. */
.report-details .report-compact {width:100%;min-width:0;table-layout:fixed;}
.report-details .report-compact th,.report-details .report-compact td {font-size:11px;line-height:1.25;padding:6px 5px;overflow-wrap:normal;word-break:normal;vertical-align:middle;}
.report-details .report-compact th {font-size:10px;white-space:nowrap;}
.report-details .report-compact .report-reading-heading {background:#eeeae6;}
.report-details .report-compact .report-reading-heading td {border-top:1px solid #c5b9ae;border-bottom:0;}
.report-details .report-compact .report-reading-values {background:#fff;}
.report-details .report-compact .report-reading-values>td {padding:6px 8px 10px;border-bottom:2px solid #d8cec5;}
.report-details .report-values-line {width:100%;}
.report-details .report-compact .report-metrics {display:flex;flex-wrap:nowrap;align-items:stretch;gap:5px;min-width:0;width:100%;}
.report-details .report-compact .report-metric {display:flex;flex-direction:column;justify-content:center;flex:1 1 0;min-width:0;padding:4px 3px;gap:2px;border:1px solid #ded6cf;background:#faf8f6;line-height:1.2;}
.report-details .report-compact .report-metric b {font-size:10px;white-space:nowrap;}
.report-details .report-compact .report-metric strong {font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums;}
.report-details .report-compact .report-metric small {font-size:9px;white-space:normal;line-height:1.2;}
.report-details .report-compact .report-metric.tolerance-out {background:#ffe2cb;border-color:#ef9c5c;}
.report-details .report-compact .report-values-line>.report-metric {display:inline-flex;min-width:120px;}
.report-details .report-compact .status-chip {font-size:9px;padding:3px 4px;line-height:1.2;}
.report-details .report-plain-result {font-size:12px;line-height:1.35;}
@media screen and (max-width:1100px) {
 .panel:has(#reportSearch) {padding:12px;}
 .report-details {padding:10px;}
 .official-report-body {padding:8px;}
 .report-details .report-compact th,.report-details .report-compact td {font-size:10px;padding:5px 3px;}
 .report-details .report-compact .report-metric strong {font-size:11px;}
 .report-details .report-compact .report-metric small {font-size:8px;}
}
@media print { .report-compact tbody {break-inside:auto;} .report-reading-heading {break-after:avoid;} .report-reading-values {break-before:avoid;} .report-details .report-compact .report-metric strong {font-size:9pt;} }

/* Desvios da liberacao no mesmo padrao compacto do relatorio. */
.report-details .out-of-standard-list {display:grid;gap:10px;margin:10px 0;}
.report-details .deviation-card {display:block;min-width:0;margin:0;border:1px solid #d5c9be;border-radius:0;background:#fff;overflow:hidden;}
.report-details .deviation-card-heading {display:flex;align-items:center;gap:8px;padding:6px 8px;background:#eeeae6;border:0;min-height:0;}
.report-details .deviation-card-heading>b {display:inline-grid;place-items:center;width:24px;height:24px;min-width:24px;font-size:11px;background:#ef6c00;color:#fff;}
.report-details .deviation-card-heading>div {display:flex;flex:1;align-items:center;justify-content:space-between;gap:12px;min-width:0;}
.report-details .deviation-card-heading strong,.report-details .deviation-card-heading span {font-size:11px;line-height:1.3;margin:0;}
.report-details .deviation-comparison {display:grid;grid-template-columns:1fr;gap:0;min-width:0;}
.report-details .deviation-result,.report-details .deviation-limit {display:grid;grid-template-columns:115px minmax(0,1fr);align-items:center;gap:8px;padding:6px 8px;margin:0;border:0;background:#fff;min-width:0;}
.report-details .deviation-limit {border-top:1px solid #e8e0da;background:#faf8f6;}
.report-details .deviation-result>small,.report-details .deviation-limit>small {font-size:9px;font-weight:700;line-height:1.25;margin:0;white-space:normal;}
.report-details .deviation-result>div,.report-details .deviation-limit>div {display:flex;flex-wrap:nowrap;align-items:stretch;gap:5px;min-width:0;}
.report-details .deviation-result>div>span,.report-details .deviation-limit>div>span {display:block;flex:1 1 0;min-width:0;padding:5px 3px;text-align:center;font-size:11px;line-height:1.3;white-space:normal;overflow-wrap:normal;word-break:normal;background:#f7f3ef;border:1px solid #e4d9d0;margin:0;}
.report-details .deviation-result>div>span {background:#ffe3cf;color:#77350e;font-weight:700;border-color:#eab58e;}
@media screen and (max-width:1100px) {
 .report-details .deviation-result,.report-details .deviation-limit {grid-template-columns:95px minmax(0,1fr);gap:5px;padding:5px 6px;}
 .report-details .deviation-result>div>span,.report-details .deviation-limit>div>span {font-size:10px;padding:4px 2px;}
}
@media print { .report-details .deviation-card {break-inside:avoid;} }

/* V218: rodape operacional; teclado aberto e a unica ocultacao em tela. */
@media screen {
 #actionBar.action-bar:not(:empty) {display:flex !important;visibility:visible !important;opacity:1 !important;position:fixed !important;bottom:8px !important;z-index:900;min-height:64px;padding:8px;gap:12px;border:2px solid #ef6c00;background:#474341;}
 body:has(#sgcfKeyboard:not([hidden])) #actionBar.action-bar {display:none !important;}
 #actionBar.action-bar button.main-action,#actionBar.action-bar button.secondary-action {min-height:48px;padding:10px 20px;font-size:15px;line-height:1.3;}
}

.central-history-form{align-items:end;gap:12px;margin-bottom:16px}.central-history-form label{display:flex;flex-direction:column;gap:6px;min-width:150px}.central-history-form label:first-child{flex:1;min-width:220px}.central-history-form input,.central-history-form select{height:44px;padding:8px 12px;border:1px solid #aaa;background:#fff;font:inherit;box-sizing:border-box}.central-history-form button{min-height:44px}

.analytics-block{padding:18px;margin:18px 0;border:1px solid #c7beb7;border-left:5px solid #ef6c00;background:#fff}.analytics-final{border-left-color:#354f40}.analytics-block h4{font-size:20px;margin:0 0 12px}.analytics-block p{line-height:1.5}.analytics-table{min-width:980px;font-size:14px}.analytics-table td{vertical-align:top;white-space:normal;min-width:110px}.analytics-table td:first-child{min-width:125px}.analytics-table small{display:block;color:#655d57;margin-top:5px}.analytics-trend{display:block;width:190px;height:60px}.analytics-insights{background:#f6f3ee;padding:16px;margin-top:16px}.analytics-insights h4{font-size:17px}.analytics-insights li{margin:7px 0;line-height:1.5}.analytics-history>details{margin:12px 0;padding:12px;border:1px solid #ddd}.analytics-history summary{cursor:pointer;font-weight:700;padding:10px}.analytics-warning{display:block;color:#8a3d00;padding:9px;background:#fff2dc}.analytics-reel-selector{display:flex;align-items:center;gap:16px;margin:16px 0;flex-wrap:wrap}.analytics-reel-selector label{font-weight:700}.analytics-reel-selector select{padding:12px;font:inherit;max-width:100%;background:#fff;border:2px solid #ef6c00}#analyticsSelectedReel{margin-top:24px}.analytics-adjustment{border-top:1px solid #ddd;padding:12px}.analytics-block .report-phase-grid strong{font-size:16px;overflow-wrap:anywhere}@media print{.analytics-reel-selector,.analytics-reel-overview button{display:none}.analytics-table{min-width:0;font-size:9px}.analytics-table td{min-width:0}.analytics-trend{width:100px}.analytics-block{break-before:auto}.analytics-block h4{break-after:avoid}}

/* Relatório enxuto: sequência por cor */
.analytics-table.analytics-compact{min-width:680px;width:100%;table-layout:auto;font-size:14px}.analytics-compact td{padding:10px 8px;vertical-align:top}.analytics-compact th{padding:10px 8px}.analytics-compact th:nth-child(2){min-width:240px}.analytics-compact .analytics-color-start td{border-top:2px solid #9c8a7c}.analytics-compact .analytics-following td{background:#fffaf4}.analytics-attempt-number{font-size:12px;color:#6a5c51}.analytics-extra{margin-top:12px}.analytics-compact .status-chip{white-space:nowrap}

.report-details .analytics-compact td,.report-details .analytics-compact th{font-size:13px;line-height:1.35;padding:8px}.analytics-compact small{margin-top:3px}.analytics-compact td p{margin:0 0 5px}@media print{.analytics-table.analytics-compact{min-width:0}.report-details .analytics-compact td,.report-details .analytics-compact th{font-size:9pt;padding:5px}.analytics-compact th:nth-child(2){min-width:0}}

/* Três relatórios independentes, fechados ao abrir */
.official-report>summary{cursor:pointer}.official-report>summary .analytics-expand-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;padding:0;background:#ef6c00;color:white;font-size:24px;line-height:1}.official-report>summary .analytics-expand-icon::before{content:'+'}.official-report[open]>summary .analytics-expand-icon::before{content:'−'}.official-report>summary:focus-visible{outline:3px solid #ef6c00;outline-offset:3px}

.official-report{scroll-margin-top:16px}.analytics-collapse-footer{display:flex;justify-content:center;padding:18px 0 4px}.analytics-collapse-button{display:inline-flex;align-items:center;gap:10px;background:#47433f;color:#fff;border:2px solid #ef6c00;border-radius:3px;padding:10px 20px;font:inherit;font-weight:700;cursor:pointer}.analytics-collapse-button span{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;background:#ef6c00;font-size:24px;line-height:1}.analytics-collapse-button:focus-visible{outline:3px solid #ef6c00;outline-offset:3px}@media print{.analytics-collapse-footer{display:none}}

.analytics-reel-attempts{margin:16px 0;border:1px solid #d8cec5}.analytics-reel-attempts>summary{padding:12px 16px;cursor:pointer;font-weight:700;background:#f6f3ee}.analytics-reel-attempts>.analytics-block{margin:0;border-top:1px solid #d8cec5}.analytics-reel-attempts>summary:focus-visible{outline:3px solid #ef6c00;outline-offset:2px}

#analyticsSelectedReel[hidden]{display:none}#analyticsSelectedReel{scroll-margin-top:16px}

.op-transfer-dialog{width:min(680px,90vw);max-height:85vh;overflow:auto;padding:24px;border:2px solid #ef6c00;background:#fff;color:#222}.op-transfer-dialog label{display:block;font-weight:700;margin:12px 0}.op-transfer-dialog input,.op-transfer-dialog textarea,.op-transfer-dialog select{display:block;width:100%;padding:10px;box-sizing:border-box;margin-top:6px;font:inherit}.op-transfer-card{border:1px solid #cfbca8;padding:16px;margin:12px 0}.op-transfer-actions{margin-bottom:18px}.op-journey .choice-row{margin:10px 0}

.keyboard-open .op-transfer-dialog{max-height:calc(100dvh - 310px);margin-top:10px;margin-bottom:290px}

/* Transferência é uma ação eventual, recolhida junto às ações do cadastro. */
.panel:has(#orderForm) .record-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.op-transfer-menu{position:relative;margin:0}.op-transfer-menu>summary{cursor:pointer;color:#645a52;font-size:13px;font-weight:400;padding:8px 4px;white-space:nowrap;list-style:none}.op-transfer-menu>summary::after{content:' ▾';font-size:11px}.op-transfer-menu[open]>summary::after{content:' ▴'}.op-transfer-menu>summary::-webkit-details-marker{display:none}.op-transfer-menu>summary:focus-visible{outline:2px solid #ef6c00;outline-offset:2px}.op-transfer-menu-options{position:absolute;right:0;top:100%;z-index:200;width:250px;max-width:80vw;border:1px solid #c7beb7;background:#fff;box-shadow:0 4px 12px #0002;padding:4px}.op-transfer-menu-options button{display:block;width:100%;text-align:left;background:#fff;color:#342a22;border:0;border-radius:0;padding:12px;font:inherit;font-size:14px;font-weight:400;cursor:pointer;white-space:normal}.op-transfer-menu-options button:hover,.op-transfer-menu-options button:focus-visible{background:#fff0e1;outline:2px solid #ef6c00;outline-offset:-2px}#opCentralCheck{display:block;width:100%;min-width:0;box-sizing:border-box;clear:both;margin:12px 0;line-height:1.45;overflow-wrap:break-word}

/* Teclado de toque: letras claras e áreas maiores. */
#sgcfKeyboard{padding:10px 12px calc(10px + env(safe-area-inset-bottom));font-family:'Segoe UI',Arial,sans-serif;box-sizing:border-box}#sgcfKeyboard .keyboard-heading,#sgcfKeyboard .keyboard-row{max-width:1040px}#sgcfKeyboard .keyboard-row{gap:7px;margin:5px auto}#sgcfKeyboard button{font-family:'Segoe UI',Arial,sans-serif;font-size:23px;font-weight:600;line-height:1.15;min-height:44px;padding:7px 4px;border:1px solid #bcb7b2;border-radius:7px;background:#fff;color:#171514;box-shadow:0 2px 0 #0005;letter-spacing:.2px}#sgcfKeyboard button:active{background:#ffe0bf;border-color:#ef6c00;box-shadow:none}#sgcfKeyboard button:focus-visible{outline:3px solid #ef6c00;outline-offset:1px}#sgcfKeyboard .keyboard-heading{margin-bottom:7px}#sgcfKeyboard .keyboard-heading button{font-size:15px;font-weight:600;min-height:38px;padding:7px 14px}#sgcfKeyboard [data-key=shift],#sgcfKeyboard [data-key=space],#sgcfKeyboard [data-key=back],#sgcfKeyboard [data-key=done]{font-size:16px;font-weight:700}#sgcfKeyboard [data-key=done]{background:#ef6c00;color:#111;border-color:#ef6c00}#sgcfKeyboard.keyboard-numeric .keyboard-row{max-width:660px}#sgcfKeyboard.keyboard-numeric button{min-height:48px;font-size:25px}#sgcfKeyboard.keyboard-numeric [data-key=shift],#sgcfKeyboard.keyboard-numeric [data-key=space],#sgcfKeyboard.keyboard-numeric [data-key=back],#sgcfKeyboard.keyboard-numeric [data-key=done]{font-size:15px}body.keyboard-open .page-content{padding-bottom:calc(var(--action-space,120px) + 420px)}.keyboard-open .op-transfer-dialog{max-height:calc(100dvh - 430px);margin-top:8px;margin-bottom:420px}@media(max-height:700px){#sgcfKeyboard{padding:6px 8px}#sgcfKeyboard .keyboard-row{margin:3px auto;gap:5px}#sgcfKeyboard button{min-height:38px;font-size:21px;padding:5px 3px}#sgcfKeyboard.keyboard-numeric button{min-height:42px}#sgcfKeyboard .keyboard-heading{margin-bottom:4px}body.keyboard-open .page-content{padding-bottom:calc(var(--action-space,120px) + 350px)}.keyboard-open .op-transfer-dialog{max-height:calc(100dvh - 360px);margin-bottom:350px}}

.settings-admin-access{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:16px;margin:16px 0;border:1px solid #d4c6b9;background:#fff8f0}.settings-admin-access p{margin:6px 0 0;line-height:1.4;font-size:14px}.settings-admin-buttons{display:flex;gap:8px;flex-wrap:wrap}.settings-admin-buttons .main-action{min-height:44px;padding:12px 18px;font-size:14px;margin:0}

.pending-cards{display:flex;gap:14px;flex-wrap:wrap;margin:20px 0}.pending-card{flex:1;min-width:150px;text-align:left;padding:16px;background:#f6f2ed;color:#26221f;border:1px solid #c6bcb3;border-left:4px solid #ee7300;cursor:pointer}.pending-card span{display:block;font-size:14px;line-height:1.4}.pending-card strong{display:block;font-size:32px;margin-top:8px}.pending-card-stale{background:#fff1df}.pending-card:focus-visible{outline:3px solid #ee7300}.pending-stale td{background:#fff5e7}.pending-table{min-width:1000px}.pending-table td{vertical-align:top}.pending-footnote{font-size:13px;color:#655b52;margin:18px 0}#pendingReportStatus{margin:16px 0}
.pending-table{min-width:880px;width:100%;table-layout:fixed;font-size:13px}.pending-table th,.pending-table td{overflow-wrap:anywhere;white-space:normal;padding:10px 8px}.pending-table th:nth-child(1){width:7%}.pending-table th:nth-child(2){width:10%}.pending-table th:nth-child(3){width:7%}.pending-table th:nth-child(4){width:18%}.pending-table th:nth-child(5){width:15%}.pending-table th:nth-child(6){width:16%}.pending-table th:nth-child(7){width:11%}.pending-table th:nth-child(8){width:16%}.pending-table .mini-button{width:100%;min-height:36px;white-space:normal;font-size:12px;padding:6px}

.pending-table th:nth-child(1){width:8%}.pending-table th:nth-child(3){width:8%}.pending-table th:nth-child(4){width:17%}.pending-table th:nth-child(8){width:15%}

.completed-reading-navigation{margin-bottom:20px}.reading-stage-tabs{margin:16px 0}.reading-release-justifications{margin-top:20px;padding:14px;border:1px solid #c6bcb3}.reading-release-justifications summary{cursor:pointer;font-weight:bold}.completed-reading-panel button:disabled{opacity:.65;cursor:default}

/* Teclado SGCI: distribuição de teclas inspirada no teclado Windows ABNT2. */
#sgcfKeyboard{background:#353638;padding:10px 12px;font-family:'Segoe UI',Arial,sans-serif}
#sgcfKeyboard .keyboard-heading,#sgcfKeyboard .keyboard-row{max-width:1180px}
#sgcfKeyboard .keyboard-row{gap:5px;margin:5px auto}
#sgcfKeyboard button{flex-basis:0;min-width:0;min-height:46px;background:#595b5e;border:1px solid #77797c;color:#fff;border-radius:4px;box-shadow:0 2px 0 #1d1e20;font-size:23px;font-weight:500;padding:5px 2px;letter-spacing:0}
#sgcfKeyboard button:active,#sgcfKeyboard .keyboard-key-active{background:#d56700;border-color:#ff9c42;color:#fff}
#sgcfKeyboard .keyboard-function{background:#484a4d;font-size:15px;font-weight:600}
#sgcfKeyboard .keyboard-heading small{font-weight:400;font-size:12px;margin-left:12px;color:#d1d3d5}
#sgcfKeyboard .keyboard-heading button{background:#484a4d;color:#fff;font-size:14px;min-height:32px;padding:4px 12px}
#sgcfKeyboard .keyboard-modifier{font-size:13px;color:#ffc68f;margin-left:auto;margin-right:12px}
#sgcfKeyboard [data-key=space]{position:relative;background:#66686c;flex-grow:6}
#sgcfKeyboard .keyboard-space-mark{font-size:12px;font-weight:400;color:#e5e5e5}
#sgcfKeyboard [data-key=done]{background:#d56700;color:#fff;font-size:15px}
#sgcfKeyboard.keyboard-numeric .keyboard-row{max-width:600px}
#sgcfKeyboard.keyboard-numeric button{min-height:48px;font-size:25px}
#sgcfKeyboard.keyboard-numeric .keyboard-function{font-size:15px}
body.keyboard-open .page-content{padding-bottom:calc(var(--action-space,120px) + 340px)}
.keyboard-open .op-transfer-dialog{max-height:calc(100dvh - 350px);margin-top:8px;margin-bottom:340px}
@media(max-height:700px){#sgcfKeyboard{padding:6px 8px}#sgcfKeyboard .keyboard-row{gap:4px;margin:4px auto}#sgcfKeyboard button{min-height:40px;font-size:21px;padding:4px 1px}#sgcfKeyboard .keyboard-function{font-size:13px}#sgcfKeyboard .keyboard-heading small{display:none}body.keyboard-open .page-content{padding-bottom:calc(var(--action-space,120px) + 300px)}.keyboard-open .op-transfer-dialog{max-height:calc(100dvh - 310px);margin-bottom:300px}}

@media(max-height:700px){#sgcfKeyboard.keyboard-numeric button{min-height:42px}}

#sgcfKeyboard .keyboard-function.keyboard-key-active{background:#d56700;border-color:#ff9c42;color:#fff}

.it-figure{margin:16px 0 0}.it-image-button{display:block;width:100%;padding:6px;border:1px solid #c7bdb4;background:#fff;cursor:zoom-in}.it-image-button img{display:block;width:100%;height:210px;object-fit:contain;object-position:center}.it-figure figcaption{padding:10px 2px;line-height:1.4;font-size:14px}.it-figure small{display:block;color:#71665d;margin-top:5px;font-size:12px}.instruction-step h4{margin-top:0}.it-image-dialog{width:min(1200px,96vw);max-height:94dvh;padding:16px;border:2px solid #ef6c00;background:#fff}.it-image-dialog img{display:block;width:100%;height:auto;margin-top:14px}.it-image-dialog>button{position:sticky;top:0;min-height:44px;z-index:1}.it-image-dialog::backdrop{background:#000b}@media(max-width:1050px){.instruction-steps{grid-template-columns:1fr}.it-image-button img{height:240px}}

/* Downloads dos documentos oficiais */
.document-download{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;text-align:center;min-height:44px;box-sizing:border-box}

.pop-section{margin:24px 0;padding-top:10px;border-top:1px solid #ddd}.pop-section h4{font-size:19px;margin-bottom:12px}.pop-section p,.pop-section li{line-height:1.6}.pop-section li{margin:10px 0}

.interruption-control{margin-left:auto;white-space:normal}.production-interruption-dialog{width:min(560px,92vw);max-height:90dvh;overflow:auto;border:2px solid #ef7000;padding:24px}.production-interruption-dialog::backdrop{background:#0009}.production-interruption-dialog label{display:block;font-weight:700;margin:16px 0}.production-interruption-dialog input,.production-interruption-dialog textarea{display:block;width:100%;box-sizing:border-box;margin-top:8px;padding:12px;font:inherit}.interruption-error{color:#ac271a}.paused-production button{margin:8px}.local-interrupted-productions{margin-bottom:24px;padding-bottom:18px;border-bottom:1px solid #bbb}.production-interruption-history{padding:14px;border:1px solid #ccc;margin:16px 0}

.paused-production #pausedResume,.production-interruption-dialog .main-action{background:#ef7000;color:#181818;border:1px solid #bd5900;padding:14px 18px;font-weight:700;cursor:pointer}.interruption-control{max-width:185px}
