:root {
  color-scheme: light;
  --navy: #0d2748;
  --navy-light: #173e69;
  --gold: #d6a51e;
  --gold-pale: #fff4cc;
  --background: #f3f6fa;
  --white: #ffffff;
  --text: #263445;
  --muted: #677789;
  --green: #23875c;
  --red: #c43d3d;
  --border: #d8e0e8;
  --blue-pale: #eef4fa;
  --shadow: 0 10px 30px rgba(13, 39, 72, 0.08);
}

/* Proposta entregue ao cliente — somente informações comerciais. */
.proposal-print {
  max-width: 900px;
  margin: 0 auto;
  padding: 34px;
  color: #1c2d42;
  background: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10pt;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
  text-rendering: geometricPrecision;
}

.proposal-print,
.proposal-print * {
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif !important;
}

.document-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(8, 29, 52, 0.82);
  backdrop-filter: blur(6px);
}

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

.document-preview-toolbar {
  min-height: 68px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #fff;
  background: #0d2748;
  border-bottom: 3px solid #d6a51e;
}

.document-preview-toolbar > strong {
  font-size: 11pt;
}

.document-preview-toolbar > div {
  display: flex;
  gap: 8px;
}

.document-preview-toolbar .button {
  min-width: 116px;
  min-height: 44px;
}

.document-preview-scroll {
  min-height: 0;
  padding: 24px;
  overflow: auto;
}

.document-preview-scroll .proposal-print {
  display: block;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

body.previewing-document {
  overflow: hidden;
}

.proposal-print-header {
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  border-bottom: 3px solid #d6a51e;
}

.proposal-print-header img {
  width: 118px;
  max-height: 76px;
  object-fit: contain;
}

.proposal-print-header > div {
  text-align: right;
}

.proposal-print-header .proposal-print-issuer {
  flex: 1;
  text-align: left;
}

.proposal-print-header .proposal-print-issuer > strong {
  display: block;
  margin: 4px 0;
  color: #0d2748;
  font-size: 10pt;
}

.proposal-print-header .proposal-print-issuer p {
  font-size: 8pt;
}

.proposal-print-header .proposal-print-document {
  min-width: 185px;
}

.proposal-print-header span,
.proposal-print-parties span {
  color: #a97a00;
  font-size: 7.5pt;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.proposal-print-header h1 {
  margin: 4px 0;
  color: #0d2748;
  font-size: 19pt;
}

.proposal-print-sample-notice {
  margin: 14px 0 0;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5d4812;
  background: #fff7d6;
  border: 1px solid #d6a51e;
  border-radius: 8px;
}

.proposal-print-sample-notice strong {
  font-size: 9pt;
  letter-spacing: 0.04em;
}

.proposal-print-sample-notice span {
  font-size: 8pt;
}

.proposal-print-header p,
.proposal-print-parties p,
.proposal-print-conditions p,
.proposal-print footer p {
  margin: 3px 0;
}

.proposal-print-parties {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.proposal-print-parties > div {
  padding: 13px 15px;
  background: #f5f7fa;
  border: 1px solid #dce3eb;
  border-radius: 8px;
}

.proposal-print-parties strong {
  margin: 5px 0;
  display: block;
  color: #0d2748;
  font-size: 10.5pt;
}

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

.proposal-print-items th {
  padding: 9px;
  color: #fff;
  background: #0d2748;
  font-size: 7.5pt;
  text-align: left;
}

.proposal-print-items td {
  padding: 10px 9px;
  border-bottom: 1px solid #dfe5ec;
  vertical-align: top;
  font-size: 9pt;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.proposal-print-items td:nth-child(n+3) {
  white-space: nowrap;
  text-align: right;
}

.proposal-print-items small {
  margin-top: 4px;
  display: block;
  color: #607185;
}

.proposal-print-bottom {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: 24px;
}

.production-order-print-bottom {
  grid-template-columns: 1fr;
}

.production-order-print-items th:nth-child(3),
.production-order-print-items td:nth-child(3) {
  width: 70px;
}

.production-order-print-items th:nth-child(4),
.production-order-print-items td:nth-child(4) {
  width: 120px;
}

.production-order-print-parties {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.production-detail-items th:nth-child(1) {
  width: 105px;
}

.production-detail-items th:nth-child(2) {
  width: 180px;
}

.production-detail-items th:nth-child(3),
.production-detail-items td:nth-child(3) {
  width: auto;
}

.production-detail-items th:nth-child(4) {
  width: 66px;
  text-align: right;
}

.production-detail-items td:nth-child(n+2) {
  white-space: normal;
  text-align: left;
}

.production-detail-items td:last-child {
  white-space: nowrap;
  text-align: right;
}

.production-detail-product td {
  padding-top: 12px;
  padding-bottom: 12px;
  background: #edf3f8;
  border-top: 2px solid #afc2d4;
}

.production-detail-product td:first-child,
.production-detail-product td:last-child {
  color: #0d2748;
  font-weight: 850;
}

.production-detail-component td {
  padding-top: 7px;
  padding-bottom: 7px;
}

.production-detail-component td:nth-child(2) {
  color: #344c64;
}

.proposal-print-conditions h2 {
  margin: 0 0 10px;
  color: #0d2748;
  font-size: 11pt;
}

.proposal-print-notes {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fff8e2;
  border-left: 4px solid #d6a51e;
}

.proposal-print-totals {
  padding: 13px 15px;
  align-self: start;
  border: 1px solid #cad4df;
  border-radius: 8px;
}

.proposal-print-totals p {
  margin: 0;
  padding: 7px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e3e8ee;
}

.proposal-print-totals p.grand {
  margin-top: 5px;
  color: #0d2748;
  border-bottom: 0;
  font-size: 11pt;
}

.proposal-print > footer {
  min-height: 0;
  height: auto;
  margin-top: 28px;
  padding: 13px 0 0;
  display: block;
  color: #607185;
  background: transparent;
  border-top: 1px solid #dce3eb;
  font-size: 7.5pt;
}

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

  html,
  body {
    width: auto;
    height: auto;
    overflow: visible;
    background: #fff;
  }

  body.printing-proposal #app-shell,
  body.printing-proposal #auth-gate,
  body.printing-proposal #toast {
    display: none !important;
  }

  body.printing-proposal .proposal-print {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: block !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.printing-proposal .document-preview-overlay {
    position: static;
    display: block !important;
    background: #fff;
    backdrop-filter: none;
  }

  body.printing-proposal .document-preview-toolbar {
    display: none !important;
  }

  body.printing-proposal .document-preview-scroll {
    padding: 0;
    overflow: visible;
  }

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

  .proposal-print-items tr,
  .proposal-print-parties,
  .proposal-print-bottom,
  .proposal-print-totals {
    break-inside: avoid;
  }
}

/* Financeiro e fluxo de Adesivos — primeira versão homologável */
.financial-view:not([hidden]) {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 22px 28px 110px;
}

.financial-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.financial-tabs button {
  min-height: 48px;
  border: 1px solid #d8dfd2;
  border-radius: 12px;
  background: #fff;
  color: #465641;
  font-weight: 700;
}

.financial-tabs button.active {
  border-color: #728469;
  background: #728469;
  color: #fff;
}

.financial-tabs small { display: block; font-weight: 500; }
.financial-panel { display: grid; gap: 16px; }
.financial-summary .financial-summary-filter {
  min-height: 88px;
  padding: 12px 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "hint hint";
  align-items: center;
  gap: 3px 10px;
  border: 1px solid #dbe4eb;
  border-top: 3px solid var(--brand-blue-600);
  border-radius: 11px;
  color: inherit;
  background: linear-gradient(145deg, #fff, #f8fafc);
  box-shadow: 0 7px 20px rgba(8, 29, 52, 0.05);
  text-align: left;
  cursor: pointer;
}

.financial-summary .financial-summary-filter:nth-child(2) { border-top-color: var(--brand-green-600); }
.financial-summary .financial-summary-filter:nth-child(3) { border-top-color: var(--shell-gold); }
.financial-summary .financial-summary-filter:nth-child(4) { border-top-color: #7457a6; }
.financial-summary .financial-summary-filter span { grid-area: label; }
.financial-summary .financial-summary-filter strong { grid-area: value; }
.financial-summary .financial-summary-filter small {
  grid-area: hint;
  color: #6c7968;
  font-size: 0.75rem;
}

.financial-summary .financial-summary-filter:hover,
.financial-summary .financial-summary-filter:focus-visible {
  border-color: #8da083;
  outline: 3px solid rgba(114, 132, 105, 0.2);
  outline-offset: 2px;
}

.financial-summary .financial-summary-filter.active {
  border-color: #52664c;
  background: #e6eee2;
  box-shadow: inset 0 0 0 2px #728469, 0 7px 20px rgba(8, 29, 52, 0.08);
}

.financial-filter-row.finance-payable-primary-filters {
  grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(180px, 220px)) minmax(150px, auto);
}

.finance-empty-filter-result {
  height: 120px;
  color: #657263;
  font-weight: 700;
  text-align: center;
}

.financial-filter-row,
.financial-term-row,
.financial-payment-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, auto);
  gap: 12px;
  align-items: end;
  padding: 14px 18px;
}

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

.financial-payment-form label,
.financial-term-row label {
  display: grid;
  gap: 6px;
  color: #4b5b47;
  font-weight: 650;
}

.financial-filter-row input,
.financial-filter-row select,
.financial-payment-form input,
.financial-payment-form select,
.financial-term-row select {
  min-height: 44px;
  border: 1px solid #ccd6c7;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
}

.finance-date-filter-row {
  grid-template-columns: repeat(2, minmax(170px, 240px)) minmax(140px, auto);
  justify-content: start;
  border-top: 1px solid #e1e7dd;
}

.finance-date-filter-row label {
  display: grid;
  gap: 6px;
  color: #4b5b47;
  font-weight: 650;
}

.finance-date-filter-row label span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.financial-customer-cell { white-space: pre-line; text-align: left !important; }
.financial-detail { scroll-margin-top: 20px; }
.financial-payment-heading,
.financial-payment-history {
  padding: 14px 18px;
}

.financial-payment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e1e7dd;
}

.financial-payment-heading div,
.financial-payment-history {
  display: grid;
  gap: 5px;
}

.financial-payment-heading span,
.financial-payment-history > span {
  color: #b37a12;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.financial-payment-history .workspace-table-scroll {
  max-height: 260px;
  overflow: auto;
}

.finance-payment-edit-button {
  min-height: 36px;
  padding: 7px 12px;
}

.finance-receivables-scroll {
  max-height: clamp(240px, calc(100dvh - 430px), 520px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.finance-receivables-scroll thead th {
  position: sticky;
  z-index: 4;
  top: 0;
}

/* Mantém a relação de fornecedores visível sem afastar o formulário de edição. */
.finance-suppliers-scroll {
  max-height: clamp(230px, 34dvh, 390px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.finance-suppliers-scroll thead th {
  position: sticky;
  z-index: 4;
  top: 0;
}

.finance-billing-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid #d8dfd2;
  border-left: 5px solid #c69a45;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0%, #f4f7f0 100%);
}

.finance-billing-intro > div { display: grid; gap: 5px; }
.finance-billing-intro span {
  color: #a87518;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.finance-billing-intro h2 { margin: 0; color: #465641; font-size: 1.25rem; }
.finance-billing-intro p { margin: 0; color: #6b7867; }
.finance-billing-intro-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.finance-billing-intro-actions .button { min-height: 44px; }

.finance-bank-registration-layout {
  display: grid;
  grid-template-columns: minmax(430px, .85fr) minmax(560px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.finance-bank-profile-list {
  position: sticky;
  top: 16px;
}

.finance-bank-profile-list .workspace-table-scroll {
  max-height: calc(100dvh - 350px);
  min-height: 240px;
  overflow: auto;
}

.finance-bank-profile-list tbody tr { cursor: pointer; }
.finance-bank-profile-list tbody tr:focus-visible {
  outline: 3px solid #c69a45;
  outline-offset: -3px;
}

.finance-bank-profile-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 16px 18px 20px;
  border: 0;
  border-top: 1px solid #e1e7dd;
}

.finance-bank-profile-form legend {
  padding: 0 5px;
  color: #a87518;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.finance-bank-profile-form .workspace-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-bank-profile-form input,
.finance-bank-profile-form select,
.finance-bank-profile-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #ccd6c7;
  border-radius: 10px;
  padding: 10px 12px;
  color: #3f4f3b;
  background: #fff;
}

.finance-bank-profile-form textarea { resize: vertical; }
.finance-bank-profile-form label small {
  color: #7b8777;
  font-size: .72rem;
  line-height: 1.35;
}

.finance-bank-profile-form .checkbox-card {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: end;
  padding: 10px 12px;
  border: 1px solid #d8dfd2;
  border-radius: 10px;
  background: #f6f8f3;
}

.finance-bank-profile-form .checkbox-card input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

.finance-bank-security-note {
  margin: 0 18px 16px;
  padding: 13px 15px;
  border: 1px solid #e6d7a9;
  border-radius: 10px;
  color: #69572c;
  background: #fff9e8;
  line-height: 1.45;
}

.finance-bank-profile-form > .button.save {
  margin: 0 18px 20px;
}

.adhesive-workflow-detail {
  border: 1px solid #d8dfd2;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.adhesive-workflow-detail > header {
  padding: 16px 20px;
  border-bottom: 1px solid #e1e7dd;
}

.adhesive-workflow-detail > header div { display: grid; gap: 4px; }
.adhesive-workflow-detail > header span { color: #b47d19; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.adhesive-workflow-detail > header strong { color: #465641; font-size: 18px; }
.adhesive-phase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adhesive-phase-grid .workspace-form { border: 0; border-radius: 0; box-shadow: none; }
.adhesive-phase-grid .workspace-form + .workspace-form { border-left: 1px solid #e1e7dd; }
.adhesive-phase-grid form > label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid #dce4d7;
  border-radius: 12px;
  color: #465641;
  background: #f8faf6;
  font-weight: 750;
}
.adhesive-phase-grid form select,
.adhesive-phase-grid form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #bfcbb8;
  border-radius: 9px;
  color: #394536;
  background: #fff;
  font: inherit;
}
.adhesive-phase-grid form select:focus,
.adhesive-phase-grid form input:focus {
  border-color: #7d9274;
  outline: 3px solid rgba(125, 146, 116, .18);
}
.adhesive-phase-grid form select:disabled,
.adhesive-phase-grid form input:disabled {
  color: #7d8878;
  background: #eef1eb;
}
.adhesive-print-lock { padding: 10px 12px; border-radius: 10px; background: #fff6df; color: #755719; }
.op-access-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.op-files-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid #cbd6c6;
  border-radius: 8px;
  color: #52694f;
  background: #f5f8f3;
  cursor: pointer;
}

.op-files-shortcut svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.op-files-shortcut:hover,
.op-files-shortcut:focus-visible {
  color: #fff;
  background: #657762;
}

@media (max-width: 600px) {
  .op-files-shortcut {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }
}

.table-card.adhesive-workflow-table-card {
  height: 390px;
}

.adhesive-workflow-groups .grouped-table {
  min-width: 780px;
}

.adhesive-workflow-groups .grouped-table th,
.adhesive-workflow-groups .grouped-table td {
  padding: 6px 5px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.adhesive-workflow-groups .grouped-table th:nth-child(1) { width: 11%; }
.adhesive-workflow-groups .grouped-table th:nth-child(2) { width: 19%; }
.adhesive-workflow-groups .grouped-table th:nth-child(3) { width: 7%; }
.adhesive-workflow-groups .grouped-table th:nth-child(4) { width: 17%; }
.adhesive-workflow-groups .grouped-table th:nth-child(5) { width: 11%; }
.adhesive-workflow-groups .grouped-table th:nth-child(6) { width: 14%; }
.adhesive-workflow-groups .grouped-table th:nth-child(7) { width: 11%; }
.adhesive-workflow-groups .grouped-table th:nth-child(8) { width: 10%; }

@media (max-width: 760px) {
  .financial-view:not([hidden]) { padding: 12px 10px 120px; }
  .financial-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .financial-summary .financial-summary-filter {
    grid-template-columns: 1fr;
    grid-template-areas: "label" "value" "hint";
    align-content: center;
  }
  .financial-payment-form,
  .financial-filter-row,
  .financial-filter-row.finance-payable-primary-filters,
  .finance-date-filter-row,
  .financial-term-row,
  .adhesive-phase-grid { grid-template-columns: 1fr; }
  .adhesive-phase-grid .workspace-form + .workspace-form { border-left: 0; border-top: 1px solid #e1e7dd; }
}

@media (max-width: 600px) {
  .document-preview-toolbar {
    min-height: 76px;
    padding: 8px 10px;
  }

  .document-preview-toolbar > strong {
    max-width: 110px;
  }

  .document-preview-toolbar .button {
    min-width: 86px;
  }

  .document-preview-scroll {
    padding: 10px;
  }

  .document-preview-scroll .proposal-print {
    min-width: 720px;
  }
}

/* Áreas e módulo Comercial — primeira versão de homologação */
.area-heading {
  margin-top: 18px;
}

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

.area-card {
  min-height: 118px;
  padding: 16px;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: 1fr auto;
  gap: 7px 13px;
  text-align: left;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.area-card:hover:not(.future),
.area-card:focus-visible:not(.future) {
  border-color: var(--navy-light);
  transform: translateY(-1px);
}

.area-icon {
  width: 52px;
  height: 52px;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--navy);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.area-card.commercial .area-icon {
  background: var(--green);
}

.area-card.stock .area-icon {
  background: #167a83;
}

.area-card.administration .area-icon {
  background: #694a8d;
}

.area-card.logistics .area-icon {
  background: #6d4c91;
}

.area-card.future {
  cursor: default;
  background: #f8fafc;
  color: #7d8996;
  box-shadow: none;
}

.area-card.future .area-icon {
  background: #a7b1bc;
}

.area-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.area-copy strong {
  color: var(--navy);
  font-size: 16px;
}

.area-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.area-card > b {
  color: var(--green);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.area-card.future > b {
  color: #8894a1;
}

#pcp-hub,
#logistics-hub {
  padding-top: 4px;
}

.module-grid.logistics-module-grid {
  grid-template-columns: minmax(240px, 340px);
}

.route-cell {
  min-width: 230px;
  white-space: normal;
}

.workspace-heading {
  margin-bottom: 14px;
  padding: 19px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--white);
  background: linear-gradient(120deg, #0b2442, #173f6c);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.workspace-heading span,
.records-card header span,
.workspace-form header span {
  display: block;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.workspace-heading h1 {
  margin: 5px 0 4px;
  font-size: 22px;
}

.workspace-heading p {
  margin: 0;
  color: #d8e4f1;
}

.commercial-summary {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.commercial-summary article {
  min-height: 76px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.commercial-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.commercial-summary strong {
  color: var(--navy);
  font-size: 25px;
}

.workspace-tabs {
  margin-bottom: 12px;
  padding: 5px;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  background: #e7edf4;
  border-radius: 9px;
}

.workspace-tabs button {
  min-height: 44px;
  padding: 0 17px;
  flex: 0 0 auto;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-weight: 800;
}

.workspace-tabs button.active {
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 4px 12px rgba(13, 39, 72, 0.2);
}

.admin-navigation {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 9px;
  overflow-x: auto;
  background: transparent;
}

.admin-navigation button {
  min-height: 72px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(13, 39, 72, 0.06);
  text-align: left;
}

.admin-navigation button > b {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--navy-light);
  border-radius: 9px;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.admin-navigation button > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-navigation button strong,
.admin-navigation button small {
  display: block;
  white-space: normal;
}

.admin-navigation button strong {
  font-size: 10pt;
}

.admin-navigation button small {
  color: var(--muted);
  font-size: 8pt;
  font-weight: 600;
}

.admin-navigation button.active > b {
  color: var(--navy);
  background: var(--gold);
}

.admin-navigation button.active small {
  color: #d8e4f1;
}

.admin-single-panel {
  grid-template-columns: minmax(0, 920px);
}

.admin-secondary-panel:not([hidden]) {
  margin-top: 14px;
}

.salespeople-table {
  min-width: 900px !important;
}

.workspace-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.workspace-panel.proposals-panel {
  grid-template-columns: 1fr;
}

.records-card,
.workspace-form {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.records-card > header,
.workspace-form > header {
  min-height: 64px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.records-card header strong,
.workspace-form header strong {
  margin-top: 3px;
  display: block;
  color: var(--navy);
  font-size: 15px;
}

.records-header-with-search > label {
  width: min(360px, 46%);
  min-width: 240px;
  display: grid;
  gap: 4px;
}

.records-header-with-search > label > span {
  color: var(--muted);
  font-size: 7.5pt;
  font-weight: 800;
}

.records-header-with-search input {
  width: 100%;
  min-height: 44px;
}

.workspace-table-scroll {
  max-width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.workspace-table-scroll table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.workspace-table-scroll th {
  height: 40px;
  padding: 0 12px;
  text-align: left;
  color: #dfe9f4;
  background: var(--navy);
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.workspace-table-scroll td {
  min-height: 46px;
  padding: 10px 12px;
  border-bottom: 1px solid #e8edf2;
  vertical-align: middle;
}

.workspace-table-scroll tbody tr[data-editable="true"] {
  cursor: pointer;
}

.workspace-table-scroll tbody tr[data-editable="true"]:hover {
  background: #f1f6fb;
}

.workspace-table-scroll td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.workspace-empty {
  padding: 25px 12px !important;
  text-align: center;
  color: var(--muted);
}

.workspace-form {
  padding-bottom: 15px;
}

.workspace-form-grid {
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workspace-form-grid label,
.workspace-form-grid > div {
  min-width: 0;
}

.workspace-form-grid .span-two {
  grid-column: span 2;
}

.workspace-form-grid label > span,
.delivery-fieldset label > span {
  margin-bottom: 6px;
  display: block;
  color: #48596b;
  font-size: 10px;
  font-weight: 800;
}

.workspace-form input,
.workspace-form select,
.workspace-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  color: var(--text);
  background: var(--white);
  border: 1px solid #cbd5df;
  border-radius: 6px;
  font: inherit;
}

.workspace-form textarea {
  min-height: 72px;
  resize: vertical;
}

.workspace-form input:focus,
.workspace-form select:focus,
.workspace-form textarea:focus {
  outline: 2px solid rgba(23, 62, 105, 0.22);
  border-color: var(--navy-light);
}

.cnpj-lookup-control {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  margin: 0 !important;
}

.cnpj-lookup-control button {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  color: #fff;
  background: var(--olive, #6f8067);
  border: 0;
  border-radius: 6px;
  font: 700 20px/1 "Segoe UI", sans-serif;
  cursor: pointer;
}

.cnpj-lookup-control button:hover,
.cnpj-lookup-control button:focus-visible {
  background: #53634d;
  outline: 2px solid rgba(83, 99, 77, 0.25);
  outline-offset: 2px;
}

#client-company-cnpj-help {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8pt;
  line-height: 1.35;
}

.workspace-form > .button,
.proposal-item-builder > .button {
  min-height: 44px;
  margin: 0 15px;
}

.active-toggle {
  min-height: 44px;
  margin: 0 15px 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.active-toggle input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

.delivery-fieldset,
.proposal-item-builder {
  margin: 0 15px 15px;
  padding: 12px 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.delivery-fieldset legend {
  margin-left: 12px;
  padding: 0 6px;
  color: var(--navy);
  font-weight: 900;
}

.delivery-fieldset > p {
  margin: 0 15px;
  color: var(--muted);
  font-size: 10px;
}

.delivery-address-toggle {
  min-height: 44px;
  margin: 0 15px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.delivery-address-toggle input {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
}

.delivery-address-toggle span,
.delivery-address-toggle strong,
.delivery-address-toggle small {
  display: block;
}

.delivery-address-toggle strong {
  color: var(--text);
}

.delivery-address-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}

#proposal-delivery-fields :disabled {
  color: #526273;
  background: #eef2f6;
  opacity: 1;
  cursor: not-allowed;
}

.proposal-item-builder .form-section-title {
  margin: 0 15px;
}

.proposal-builder-instruction {
  margin: 7px 15px 12px;
  color: var(--muted);
  line-height: 1.45;
}

.proposal-group-picker {
  margin: 0 15px 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 9px;
}

.proposal-group-picker button {
  position: relative;
  min-height: 66px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-align: left;
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.proposal-group-picker button > b {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--white);
  border: 1px solid #cbd5df;
  border-radius: 50%;
}

.proposal-group-picker button span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proposal-group-picker button strong {
  color: var(--navy);
  font-size: 11px;
}

.proposal-group-picker button small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}

.proposal-group-picker button:hover,
.proposal-group-picker button:focus-visible {
  border-color: var(--navy-light);
  outline: 2px solid rgba(23, 62, 105, 0.16);
}

.proposal-group-picker button.active {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 7px 18px rgba(13, 39, 72, 0.18);
}

.proposal-group-picker button.active::after {
  content: "\2713";
  position: absolute;
  top: 7px;
  right: 8px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

.proposal-group-picker button.active strong,
.proposal-group-picker button.active small {
  color: var(--white);
}

.proposal-group-picker button.active > b {
  color: var(--navy);
  border-color: var(--white);
}

.item-basic-grid {
  margin: 0 15px 14px;
  padding: 13px;
  background: var(--blue-pale);
  border: 1px solid #d4e1ed;
  border-radius: 8px;
}

.item-spec-sections {
  margin: 0 15px 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.item-spec-section {
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid #d2dce6;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(13, 39, 72, 0.05);
}

.item-spec-section[hidden] {
  display: none;
}

.item-spec-section > header {
  min-height: 55px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f5f8fb;
  border-bottom: 1px solid #dde5ed;
}

.item-spec-section > header > b {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--navy-light);
  border-radius: 7px;
  font-size: 9px;
}

.item-spec-section > header > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-spec-section > header strong {
  color: var(--navy);
  font-size: 11px;
}

.item-spec-section > header span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}

.item-spec-section .workspace-form-grid {
  padding: 12px;
}

.item-spec-section select {
  background-color: #fbfcfe;
}

.proposal-selection-preview {
  margin: 0 15px 14px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 9px;
  box-shadow: 0 7px 18px rgba(13, 39, 72, 0.15);
}

.proposal-selection-preview > div:first-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proposal-selection-preview > div:first-child span {
  width: fit-content;
  padding: 3px 7px;
  color: var(--navy);
  background: var(--gold);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.proposal-selection-preview > div:first-child strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.proposal-preview-chips {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proposal-preview-chips span {
  min-height: 27px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  font-size: 9px;
  line-height: 1.25;
}

.proposal-preview-chips small {
  color: #cfdae7;
  line-height: 1.4;
}

.item-spec-grid label:not([hidden]) {
  animation: proposal-field-in 120ms ease-out;
}

.item-spec-grid .internal-cost-field:not([hidden]) {
  padding: 8px;
  background: #fff8e7;
  border: 1px solid #e4bd61;
  border-radius: 7px;
}

.item-spec-grid .internal-cost-field > span {
  color: #74530b;
}

.proposal-bimetal-divider:not([hidden]) {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #4f4734;
  background: #fff8e7;
  border: 1px solid #e4bd61;
  border-radius: 7px;
}

.proposal-bimetal-divider strong {
  font-size: 10px;
}

.proposal-bimetal-divider small {
  color: #77684a;
  font-size: 9px;
}

@keyframes proposal-field-in {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

.proposal-item-edit-indicator {
  margin: 0 15px 10px;
  padding: 10px 12px;
  color: #684b08;
  background: #fff7df;
  border: 1px solid #e4bd61;
  border-radius: 7px;
  font-weight: 700;
  line-height: 1.4;
}

.proposal-item-builder.editing {
  border-color: #d6a51e;
  box-shadow: 0 0 0 2px rgba(214, 165, 30, 0.12);
}

.proposal-item-builder-actions {
  margin: 0 15px 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.proposal-item-builder-actions .button {
  min-height: 44px;
}

.proposal-items-table {
  margin: 0 15px 15px;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.proposal-items-table table {
  min-width: 760px;
}

.proposal-total {
  min-height: 65px;
  padding: 10px 13px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  background: var(--navy);
  border-radius: 7px;
}

.proposal-total span {
  color: #cbd9e8;
  font-size: 10px;
}

.proposal-total strong {
  margin-top: 4px;
  font-size: 19px;
}

.proposal-total.secondary-total {
  color: var(--navy);
  background: #e9f0f7;
  border: 1px solid #ccd9e6;
}

.proposal-total.secondary-total span {
  color: var(--muted);
}

.proposal-total.grand-total {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
}

.pricing-override-fieldset {
  margin: 0 15px 15px;
  padding: 12px 0 2px;
  border: 1px solid #e1c261;
  border-radius: 8px;
  background: #fffaf0;
}

.pricing-override-fieldset legend {
  margin-left: 12px;
  padding: 0 6px;
  color: #72530a;
  font-weight: 900;
}

.pricing-override-fieldset .active-toggle {
  margin-bottom: 0;
}

.pricing-override-fieldset p {
  margin: 0;
  color: #72530a;
  line-height: 1.45;
}

.stock-workspace-panel {
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.8fr);
}

.stock-table {
  min-width: 980px !important;
}

.stock-table tr.stock-low td {
  background: #fff6df;
}

.commission-guidance {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  background: #fffaf0;
  font-size: 10pt;
  line-height: 1.45;
}

.stock-product-thumb,
.stock-product-placeholder {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #eef3f8;
}

.stock-product-placeholder {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.product-photo-preview {
  width: calc(100% - 30px);
  min-height: 130px;
  margin: 15px 15px 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: #f4f7fa;
  border: 1px dashed #bfcbd7;
  border-radius: 8px;
}

.product-photo-preview img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: var(--white);
}

.table-action.print {
  color: #4e3770;
  background: #f1ecf8;
  border-color: #d7cbe6;
}

.table-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-action {
  min-height: 36px;
  padding: 0 10px;
  color: var(--navy);
  background: #edf3f9;
  border: 1px solid #ccd8e4;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
}

.table-action.primary {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.table-action.danger {
  color: var(--red);
  background: #fff1f1;
  border-color: #f0c8c8;
}

.status-pill {
  min-height: 28px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--navy);
  background: #eaf1f8;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.aceita,
.status-pill.ganha,
.status-pill.convertida,
.status-pill.ativo {
  color: #126342;
  background: #e4f5ed;
}

.status-pill.recusada,
.status-pill.perdida,
.status-pill.inativo {
  color: #9d2d2d;
  background: #fdeaea;
}

.acceptance-guidance {
  margin: 14px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #55431b;
  background: var(--gold-pale);
  border: 1px solid #e8cc70;
  border-radius: 7px;
}

.acceptance-guidance span {
  line-height: 1.45;
}

.history-status-counters {
  padding: 10px 15px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: #fff;
  scrollbar-width: thin;
}

.history-status-counter {
  min-width: 104px;
  min-height: 52px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7e0e9;
  border-radius: 7px;
  color: var(--navy);
  background: #f7f9fc;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.history-status-counter strong {
  min-width: 28px;
  font-size: 18px;
  text-align: center;
}

.history-status-counter span {
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.history-status-counter:hover,
.history-status-counter:focus-visible,
.history-status-counter.active {
  border-color: #b28512;
  background: #fff7dd;
  outline: none;
}

.history-status-counter.aceita,
.history-status-counter.convertida,
.history-status-counter.ativo {
  color: #126342;
  background: #eef9f3;
}

.history-status-counter.recusada,
.history-status-counter.expirada {
  color: #9d2d2d;
  background: #fff3f3;
}

.proposal-history-filters {
  padding: 12px 15px;
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(4, minmax(130px, 0.8fr)) auto;
  gap: 10px;
  align-items: end;
  background: #f7f9fc;
  border-bottom: 1px solid var(--border);
}

.proposal-lead-time-panel {
  margin: 12px 15px 0;
  overflow: hidden;
  border: 1px solid #e6c66f;
  border-radius: 12px;
  background: #fffaf0;
}

.proposal-lead-time-notifications {
  margin: 12px 15px 0;
  overflow: hidden;
  border: 1px solid #cbd8c4;
  border-radius: 12px;
  background: #fff;
}

.proposal-commitment-fields {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 1.25fr) minmax(220px, 1fr);
  gap: 12px;
  border: 1px solid #d9c270;
  border-radius: 10px;
  background: #fffaf0;
}

.proposal-commitment-upload-field {
  padding: 10px 12px;
  border: 1px dashed #c9a947;
  border-radius: 8px;
  background: #fff;
}

.proposal-commitment-upload-field input[type="file"] {
  min-height: 46px;
  padding: 8px;
  cursor: pointer;
}

.proposal-commitment-upload-field input[type="file"]:required {
  border-color: #b77a11;
  box-shadow: 0 0 0 2px rgba(183, 122, 17, 0.1);
}

.proposal-commitment-alerts {
  margin: 12px 15px 0;
  overflow: hidden;
  border: 1px solid #d9c270;
  border-radius: 12px;
  background: #fffaf0;
  box-shadow: 0 7px 20px rgba(120, 91, 20, 0.08);
}

.proposal-commitment-workspace {
  margin-bottom: 18px;
}

.proposal-commitment-empty {
  min-height: 130px;
  padding: 30px;
  display: grid;
  place-items: center;
  color: #746b50;
  background: #fff;
  font-weight: 750;
}

.proposal-commitment-alerts > header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eadca9;
  background: #fff5d9;
}

.proposal-commitment-alerts > header div { display: grid; gap: 2px; }
.proposal-commitment-alerts > header span {
  color: #8b6411;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
}
.proposal-commitment-alerts > header strong { color: #554516; font-size: 13px; }
.proposal-commitment-alerts > header small { color: #756643; }
#proposal-commitment-alerts-list { display: grid; gap: 1px; background: #eadca9; }

.proposal-commitment-alert {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr) auto;
  align-items: center;
  gap: 12px;
  background: #fff;
}
.proposal-commitment-alert.blocked { border-left: 5px solid #c13e3e; }
.proposal-commitment-alert.ready { border-left: 5px solid #2f8a60; }
.proposal-commitment-copy { min-width: 0; display: grid; gap: 3px; }
.proposal-commitment-copy strong { color: #4f451f; }
.proposal-commitment-copy small { color: #746b50; overflow-wrap: anywhere; }
.proposal-commitment-files { min-width: 0; display: grid; gap: 6px; }
.proposal-commitment-files > span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.proposal-commitment-files b {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proposal-commitment-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.proposal-commitment-actions .table-action,
.proposal-commitment-files .table-action { min-height: 40px; }

.proposal-customer-selector {
  align-content: start;
}

.proposal-customer-selector input[type="search"] {
  margin-bottom: 5px;
  border-color: #a9b8a5;
  background: #fbfdf9;
}

.proposal-customer-selector input[type="search"]:focus {
  border-color: #647761;
  box-shadow: 0 0 0 3px rgba(100, 119, 97, 0.14);
  outline: 0;
}
.workspace-table-scroll tr.proposal-commitment-blocked-row td { background: #fff8e8; }

@media (max-width: 980px) {
  .proposal-commitment-fields,
  .proposal-commitment-alert { grid-template-columns: 1fr; }
  .proposal-commitment-alerts > header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.proposal-credit-alerts {
  margin: 12px 15px 0;
  overflow: hidden;
  border: 1px solid #e0a2a2;
  border-radius: 12px;
  background: #fff8f8;
  box-shadow: 0 7px 20px rgba(143, 42, 42, 0.09);
}

.proposal-credit-alerts > header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edcccc;
  background: #fff0f0;
}

.proposal-credit-alerts > header div { display: grid; gap: 2px; }
.proposal-credit-alerts > header span {
  color: #a33131;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
}
.proposal-credit-alerts > header strong { color: #742727; font-size: 13px; }
.proposal-credit-alerts > header small { color: #7f4d4d; }
#proposal-credit-alerts-list { display: grid; gap: 1px; background: #edcccc; }

.proposal-credit-alert {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  background: #fff;
}
.proposal-credit-alert.approved { border-left: 5px solid #2f8a60; }
.proposal-credit-alert.rejected { border-left: 5px solid #c13e3e; }
.proposal-credit-alert.pending-executive { border-left: 5px solid #d28b22; }
.proposal-credit-alert.request-required { border-left: 5px solid #c13e3e; }
.proposal-credit-alert-copy { min-width: 0; display: grid; gap: 3px; }
.proposal-credit-alert-copy strong { color: #4e3333; }
.proposal-credit-alert-copy small { color: #765f5f; overflow-wrap: anywhere; }
.proposal-credit-alert-status,
.proposal-credit-inline {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}
.proposal-credit-alert-status.pending-executive,
.proposal-credit-inline.pending-executive { color: #754d0d; background: #fff0bd; }
.proposal-credit-alert-status.request-required,
.proposal-credit-inline.request-required { color: #8f2525; background: #ffe0e0; }
.proposal-credit-alert-status.rejected,
.proposal-credit-inline.rejected { color: #8f2525; background: #ffe0e0; }
.proposal-credit-alert-status.approved { color: #17603f; background: #dcf3e7; }
.proposal-credit-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.proposal-credit-alert-actions .button { min-height: 44px; }
.proposal-credit-inline { display: inline-flex; align-items: center; min-height: 36px; }
.workspace-table-scroll tr.proposal-credit-blocked-row td { background: #fff5f5; }

@media (max-width: 850px) {
  .proposal-credit-alerts > header { align-items: flex-start; flex-direction: column; }
  .proposal-credit-alert { grid-template-columns: 1fr; }
  .proposal-credit-alert-status { justify-self: start; }
}

.proposal-lead-time-notifications > header {
  padding: 11px 14px;
  display: grid;
  gap: 2px;
  border-bottom: 1px solid #dce5d7;
  background: #f4f8f1;
}

.proposal-lead-time-notifications > header span {
  color: #6b7f62;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
}

.proposal-lead-time-notifications > header strong { color: #40503c; }

.proposal-lead-time-notification {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e5ebe1;
}

.proposal-lead-time-notification:last-child { border-bottom: 0; }
.proposal-lead-time-notification.approved { border-left: 5px solid #2f8a60; }
.proposal-lead-time-notification.rejected { border-left: 5px solid #c44b4b; }
.proposal-lead-time-notification-copy { display: grid; gap: 3px; }
.proposal-lead-time-notification-copy strong { color: #3f503b; }
.proposal-lead-time-notification-copy small { color: #6f7d6b; overflow-wrap: anywhere; }
.proposal-lead-time-notification-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.proposal-lead-time-panel > header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eddca9;
}

.proposal-lead-time-panel > header div { display: grid; gap: 2px; }
.proposal-lead-time-panel > header span {
  color: #9b6b12;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
}
.proposal-lead-time-panel > header strong { color: #4d5b47; font-size: 13px; }
.proposal-lead-time-panel > header small { color: #756643; }

.proposal-lead-time-list { display: grid; gap: 1px; background: #eddca9; }

.proposal-lead-time-item {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 1.1fr) auto;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.proposal-lead-time-highlight {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(205, 158, 50, 0.62);
  outline-offset: -3px;
  animation: lead-time-approval-highlight 1.2s ease-in-out 2;
}

@keyframes lead-time-approval-highlight {
  0%, 100% { background: #fff; }
  50% { background: #fff2c9; }
}

.proposal-lead-time-copy { min-width: 0; display: grid; gap: 3px; }
.proposal-lead-time-copy strong { color: #3e503b; }
.proposal-lead-time-copy small { color: #74806f; overflow-wrap: anywhere; }
.proposal-lead-time-request { display: grid; gap: 6px; }
.proposal-lead-time-request textarea {
  width: 100%;
  min-height: 48px;
  padding: 9px 10px;
  resize: vertical;
  border: 1px solid #d8c47f;
  border-radius: 8px;
  color: #3e503b;
  background: #fffef9;
  font: inherit;
}
.proposal-lead-time-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.proposal-lead-time-actions .button { min-height: 44px; }
.proposal-lead-time-status {
  padding: 8px 10px;
  border-radius: 999px;
  color: #6f5618;
  background: #fff0bd;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.commercial-op-history-filters {
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(135px, 0.8fr)) auto;
}

.commercial-op-history-card {
  margin-top: 16px;
}

.proposal-history-filters label > span {
  margin-bottom: 5px;
  display: block;
  color: #48596b;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.proposal-history-filters input,
.proposal-history-filters select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--white);
  border: 1px solid #cbd5df;
  border-radius: 6px;
  font: inherit;
}

.proposal-history-filters .button {
  min-height: 44px;
  margin: 0;
  white-space: nowrap;
}

.proposal-history-result {
  margin: 0;
  padding: 8px 15px;
  color: var(--muted);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
}

.workspace-table-scroll tr.proposal-history-highlight td {
  background: #fff1b8;
  animation: proposal-history-pulse 1s ease-in-out 2;
}

@keyframes proposal-history-pulse {
  50% {
    background: #ffe285;
  }
}

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

  .workspace-panel {
    grid-template-columns: 1fr;
  }

  .stock-workspace-panel {
    grid-template-columns: 1fr;
  }

  .admin-navigation {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }
}

@media (max-width: 600px) {
  .records-header-with-search {
    align-items: stretch !important;
    flex-direction: column;
  }

  .records-header-with-search > label {
    width: 100%;
    min-width: 0;
  }

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

  .area-card {
    min-height: 102px;
  }

  .workspace-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-heading .button {
    width: 100%;
    min-height: 44px;
  }

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

  .commercial-summary article {
    min-height: 82px;
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-tabs button {
    min-height: 48px;
  }

  .admin-navigation {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    overflow: visible;
  }

  .admin-navigation button {
    min-height: 68px;
    padding: 8px;
  }

  .admin-navigation button > b {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .proposal-group-picker {
    grid-template-columns: 1fr;
  }

  .proposal-group-picker button {
    min-height: 56px;
  }

  .proposal-history-filters {
    grid-template-columns: 1fr;
  }

  .proposal-lead-time-panel > header,
  .proposal-lead-time-item,
  .proposal-lead-time-notification {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .history-status-counters {
    padding: 10px;
  }

  .history-status-counter {
    min-width: 116px;
    min-height: 56px;
  }

  .proposal-history-filters .button {
    width: 100%;
  }

  .item-spec-sections {
    grid-template-columns: 1fr;
  }

  .proposal-selection-preview {
    grid-template-columns: 1fr;
  }

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

  .workspace-form-grid .span-two {
    grid-column: auto;
  }

  .workspace-form > .button,
  .proposal-item-builder > .button {
    width: calc(100% - 30px);
  }

  .proposal-item-builder-actions .button {
    width: 100%;
  }

  .workspace-table-scroll table {
    min-width: 700px;
  }

  .workspace-table-scroll th,
  .workspace-table-scroll td {
    height: 44px;
  }

  .workspace-table-scroll table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .workspace-table-scroll th:first-child,
  .workspace-table-scroll td:first-child {
    position: sticky;
    left: 0;
  }

  .workspace-table-scroll th:first-child {
    z-index: 3;
    background: var(--navy);
  }

  .workspace-table-scroll td:first-child {
    z-index: 2;
    background: var(--white);
    box-shadow: 2px 0 4px rgba(13, 39, 72, 0.1);
  }

  .table-action {
    min-height: 44px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--background);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10pt;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

/* Navegação fixa inspirada no fluxo operacional da Sonhe, preservando a
   identidade visual e os módulos exclusivos da hsports. */
.app-sidebar {
  --sidebar-width: 246px;
  position: fixed;
  z-index: 18;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  height: 100dvh;
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: #fff;
  border-right: 1px solid #dde4eb;
  box-shadow: 8px 0 26px rgba(13, 39, 72, 0.06);
}

.sidebar-brand {
  min-height: 72px;
  padding: 0 5px 15px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #e4e9ef;
}

.sidebar-brand > img:first-child {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: #000;
}

.sidebar-brand > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sidebar-brand strong {
  color: var(--navy);
  font-size: 17px;
  line-height: 1;
}

.sidebar-brand span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
}

.sidebar-brand .sidebar-jm-logo {
  width: 50px;
  height: 38px;
  object-fit: contain;
  border-radius: 5px;
  background: #000;
}

.sidebar-navigation {
  min-height: 0;
  margin: 14px -4px;
  padding: 0 4px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sidebar-nav-item {
  width: 100%;
  min-height: 54px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #526170;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: left;
}

.sidebar-nav-item svg,
.sidebar-account button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav-item > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sidebar-nav-item strong,
.sidebar-nav-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav-item strong {
  font-size: 10pt;
}

.sidebar-nav-item small {
  color: #82909f;
  font-size: 8pt;
}

.sidebar-nav-item:hover:not(:disabled),
.sidebar-nav-item:focus-visible,
.sidebar-nav-item.active {
  color: var(--navy);
  background: #eef2f0;
  border-color: #e2e9e5;
  outline: none;
}

.sidebar-nav-item.active {
  color: #245c45;
  box-shadow: inset 4px 0 #2e7658;
}

.sidebar-nav-item.future {
  opacity: 0.55;
  cursor: default;
}

.sidebar-account {
  padding-top: 13px;
  border-top: 1px solid #e1e7ed;
}

.sidebar-user-copy {
  min-height: 52px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.sidebar-user-copy .user-avatar {
  width: 40px;
  height: 40px;
  color: #245c45;
  background: #e5eee9;
}

.sidebar-user-copy > div:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sidebar-user-copy strong,
.sidebar-user-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy strong {
  color: var(--navy);
  font-size: 9pt;
}

.sidebar-user-copy span {
  color: var(--muted);
  font-size: 8pt;
}

.sidebar-account > button {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #8c4c3c;
  background: #fff9f6;
  border: 1px solid #e6d7d0;
  border-radius: 8px;
  font-weight: 800;
}

.app-shell > .hero,
.app-shell > main,
.app-shell > footer {
  width: auto;
  margin-left: 246px;
}

.app-shell > .hero {
  min-height: 82px;
  padding: 15px 28px;
}

.hero {
  flex: 0 0 auto;
  min-height: 94px;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  background:
    radial-gradient(circle at 86% 30%, rgba(214, 165, 30, 0.17), transparent 25%),
    linear-gradient(120deg, #0a203b, var(--navy));
  border-bottom: 4px solid var(--gold);
}

.hero-navigation {
  display: flex;
  align-items: center;
  gap: 17px;
}

.home-button {
  min-height: 44px;
  padding: 0 13px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  font-size: 10px;
  font-weight: 800;
}

.back-button {
  border-color: rgba(214, 165, 30, 0.72);
  background: rgba(214, 165, 30, 0.12);
}

.home-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.home-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hero-title span {
  width: 2px;
  height: 27px;
  display: inline-block;
  background: var(--gold);
}

.hero-subtitle {
  margin-top: 8px;
  color: #d9e5f2;
  font-size: 13px;
}

.brand-signature {
  width: 326px;
  height: 68px;
  padding-left: 15px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-left: 1px solid rgba(214, 165, 30, 0.55);
}

.brand-signature img {
  height: 66px;
  display: block;
  border-radius: 4px;
  object-fit: contain;
  background: #000;
}

.brand-signature .brand-hsports {
  width: 76px;
}

.brand-signature .brand-jm {
  width: 196px;
}

.brand-signature > span {
  width: 1px;
  height: 44px;
  flex: 0 0 auto;
  background: rgba(214, 165, 30, 0.42);
}

main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 22px 14px;
}

.home-view {
  background:
    linear-gradient(rgba(243, 246, 250, 0.94), rgba(243, 246, 250, 0.98)),
    radial-gradient(circle at 8% 8%, rgba(214, 165, 30, 0.2), transparent 28%);
}

.home-intro {
  min-height: 103px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 15%, rgba(214, 165, 30, 0.2), transparent 28%),
    linear-gradient(120deg, #102e52, #173e69);
  box-shadow: var(--shadow);
}

.home-eyebrow {
  color: #e7bd47;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.home-intro h1 {
  margin: 6px 0 5px;
  font-size: 21px;
  line-height: 1.1;
}

.home-intro p {
  margin: 0;
  color: #d9e5f2;
  font-size: 11px;
}

.home-jm-signature {
  min-width: 185px;
  margin-left: auto;
  padding: 0 20px;
  display: grid;
  justify-items: center;
  gap: 4px;
  border-left: 1px solid rgba(214, 165, 30, 0.36);
}

.home-jm-signature span {
  color: #e7bd47;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.home-jm-signature img {
  width: 165px;
  height: 62px;
  display: block;
  border: 1px solid rgba(214, 165, 30, 0.3);
  border-radius: 5px;
  object-fit: contain;
  background: #000;
}

.home-status-card {
  min-width: 230px;
  padding-left: 22px;
  display: grid;
  justify-items: end;
  gap: 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.system-badge {
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(128, 223, 178, 0.35);
  border-radius: 999px;
  color: #bdebd4;
  background: rgba(35, 135, 92, 0.2);
  font-size: 9px;
  font-weight: 800;
}

.system-badge i,
.module-card.active small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #59c58f;
  box-shadow: 0 0 0 3px rgba(89, 197, 143, 0.15);
}

.home-status-card strong {
  margin-top: 2px;
  font-size: 17px;
}

.home-status-card > span {
  color: #c9d9e9;
  font-size: 9px;
}

.linked-workbook-home {
  min-height: 49px;
  margin-top: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
}

.workbook-mini-icon {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--white);
  background: var(--green);
  font-size: 9px;
  font-weight: 900;
}

.linked-workbook-home > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.linked-workbook-home span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.linked-workbook-home strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbook-ready {
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: #edf8f2;
  font-size: 8px;
  font-weight: 800;
}

.home-daily-agenda {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #d7e0ea;
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 7px 20px rgba(13, 39, 72, 0.06);
}

.home-daily-agenda > header {
  min-height: 70px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--white);
  background: linear-gradient(120deg, #102e52, #173e69);
}

.home-daily-agenda > header > div:first-child {
  display: grid;
  gap: 2px;
}

.home-daily-agenda > header span,
.home-daily-agenda > header small {
  color: #d8e5f2;
}

.home-daily-agenda > header > div:first-child > span {
  color: #e7bd47;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.home-daily-agenda > header strong {
  font-size: 15px;
}

.home-daily-agenda > header strong b {
  font-weight: 700;
}

.home-daily-agenda > header small {
  font-size: 9px;
}

.home-approval-counter {
  min-width: 155px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(231, 189, 71, 0.42);
  border-radius: 8px;
  background: rgba(214, 165, 30, 0.13);
}

.home-approval-counter > b {
  min-width: 34px;
  font-size: 25px;
  line-height: 1;
  text-align: center;
}

.home-approval-counter > span {
  max-width: 82px;
  color: #fff4cc !important;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
}

.home-agenda-summary {
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #e1e7ee;
  background: #f7f9fc;
}

.home-agenda-summary span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #526579;
  background: #eaf0f6;
  font-size: 8px;
  font-weight: 750;
}

.home-agenda-list {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-agenda-item {
  min-height: 58px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #dce4ed;
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.home-agenda-item:hover,
.home-agenda-item:focus-visible {
  border-color: #b88808;
  background: #fffaf0;
  outline: none;
}

.home-agenda-item > b {
  min-width: 32px;
  height: 32px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: #60768f;
  font-size: 8px;
}

.home-agenda-item.approval > b {
  color: #4d3500;
  background: #f0c754;
}

.home-agenda-item > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.home-agenda-item strong {
  color: var(--navy);
  font-size: 10px;
}

.home-agenda-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-agenda-item > i {
  color: #9a7200;
  font-size: 18px;
  font-style: normal;
}

.home-agenda-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.pcp-daily-agenda {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #cbd8e5;
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 7px 20px rgba(13, 39, 72, 0.06);
}

.pcp-daily-agenda > header {
  min-height: 76px;
  padding: 14px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--white);
  background: linear-gradient(120deg, #102e52, #194974);
}

.pcp-daily-agenda > header > div:first-child {
  display: grid;
  gap: 3px;
}

.pcp-daily-agenda > header span:first-child {
  color: #e7bd47;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.pcp-daily-agenda > header strong {
  font-size: 15px;
}

.pcp-daily-agenda > header small {
  color: #d8e5f2;
  font-size: 9px;
}

.pcp-agenda-counter {
  min-width: 155px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(231, 189, 71, 0.45);
  border-radius: 8px;
  background: rgba(214, 165, 30, 0.14);
}

.pcp-agenda-counter b {
  min-width: 34px;
  font-size: 25px;
  line-height: 1;
  text-align: center;
}

.pcp-agenda-counter span {
  max-width: 84px;
  color: #fff4cc !important;
  font-size: 9px !important;
  font-weight: 800;
  line-height: 1.2;
}

.pcp-agenda-summary {
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #e1e7ee;
  background: #f7f9fc;
}

.pcp-agenda-summary span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #526579;
  background: #eaf0f6;
  font-size: 8px;
  font-weight: 800;
}

.pcp-agenda-summary span.previous {
  color: #7a4a00;
  background: #fff0d5;
}

.pcp-agenda-loading,
.pcp-agenda-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.pcp-agenda-list {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pcp-agenda-item {
  min-height: 76px;
  padding: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #dce4ed;
  border-left: 4px solid #2d6eb5;
  border-radius: 7px;
  background: #fff;
}

.pcp-agenda-item.previous {
  border-color: #ebcf9b;
  border-left-color: #c78117;
  background: #fffaf1;
}

.pcp-agenda-item.approved-change {
  border-color: #cbbd8e;
  border-left-color: #9b7417;
  background: #fffbed;
}

.pcp-agenda-item.approved-change .pcp-agenda-copy > div span {
  color: #654a0b;
  background: #f7e5a8;
}

.pcp-agenda-item.acknowledged {
  border-left-color: var(--green);
  background: #f4fbf7;
}

.pcp-agenda-check {
  min-width: 74px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}

.pcp-agenda-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green);
}

.pcp-agenda-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pcp-agenda-copy > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.pcp-agenda-copy strong {
  color: var(--navy);
  font-size: 11px;
}

.pcp-agenda-copy > div span {
  padding: 3px 6px;
  border-radius: 999px;
  color: #1e5d91;
  background: #e8f3fc;
  font-size: 7px;
  font-weight: 850;
}

.pcp-agenda-copy > div span.previous {
  color: #7a4a00;
  background: #ffe7bd;
}

.pcp-agenda-copy b,
.pcp-agenda-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcp-agenda-copy b {
  color: var(--text);
  font-size: 9px;
}

.pcp-agenda-copy small {
  color: var(--muted);
  font-size: 8px;
}

.pcp-agenda-open {
  min-width: 72px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #bed0e0;
  border-radius: 6px;
  color: var(--navy-light);
  background: #eff6fc;
  font: inherit;
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}

.pcp-agenda-open:hover,
.pcp-agenda-open:focus-visible {
  border-color: #9a7200;
  background: #fff7dd;
  outline: none;
}

.process-strip {
  min-height: 68px;
  margin-top: 10px;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
}

.process-step {
  display: flex;
  align-items: center;
  gap: 9px;
}

.process-step b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e3ec;
  border-radius: 50%;
  color: var(--navy);
  background: var(--blue-pale);
  font-size: 9px;
}

.process-step span {
  color: var(--navy);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.25;
}

.process-strip > i {
  color: var(--gold);
  font-size: 22px;
  font-style: normal;
}

.modules-heading {
  min-height: 43px;
  padding: 9px 2px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modules-heading > div:first-child {
  display: grid;
  gap: 2px;
}

.modules-heading > div:first-child span {
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.modules-heading > div:first-child strong {
  color: var(--navy);
  font-size: 13px;
}

.module-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.module-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.module-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.active-dot {
  background: var(--green);
}

.future-dot {
  background: #aeb9c5;
}

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

.module-card {
  min-height: 75px;
  padding: 11px;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid #8798aa;
  border-radius: 7px;
  color: var(--text);
  background: var(--white);
  text-align: left;
  box-shadow: 0 2px 8px rgba(13, 39, 72, 0.035);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.module-card:hover {
  transform: translateY(-1px);
  border-color: #b8c6d5;
  box-shadow: 0 7px 18px rgba(13, 39, 72, 0.08);
}

.module-card.planning {
  border-left-color: var(--navy-light);
}

.module-card.medal {
  border-left-color: #2d6eb5;
}

.module-card.trophy {
  border-left-color: #d6841e;
}

.module-card.shipping {
  border-left-color: #6c4a91;
}

.module-card.assembly {
  border-left-color: #23875c;
}

.module-card.repository {
  border-left-color: #2d6eb5;
}

.module-card.active {
  border-color: #65a88a;
  border-left-color: var(--green);
  background: linear-gradient(135deg, #ffffff, #eef9f4);
}

.module-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy);
  background: var(--blue-pale);
  font-size: 10px;
  font-weight: 900;
}

.module-card.active .module-icon {
  color: var(--white);
  background: var(--green);
}

.module-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.module-copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-copy span b {
  color: var(--navy);
  font-size: inherit;
}

.module-card small {
  align-self: start;
  padding: 4px 6px;
  border-radius: 999px;
  color: #7b8794;
  background: #eef1f4;
  font-size: 7px;
  font-weight: 800;
  white-space: nowrap;
}

.module-card.active small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  background: #dff3e9;
}

.entrada-view {
  overflow: hidden;
}

.summary-card.production .summary-accent {
  background: #2d6eb5;
}

.ops-workspace {
  height: calc(100% - 150px);
  min-height: 410px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(420px, 0.88fr);
  gap: 12px;
}

.mobile-ops-nav {
  display: none;
}

.ops-list-panel,
.op-form-panel {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  overflow: hidden;
}

.ops-list-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.ops-list-header {
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #edf1f5;
}

.ops-list-header > div {
  display: grid;
  gap: 3px;
}

.ops-list-header > div span,
.form-title > div span {
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ops-list-header > div strong,
.form-title > div strong {
  color: var(--navy);
  font-size: 13px;
}

.ops-search {
  width: min(330px, 54%);
  min-height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: #f8fafc;
}

.ops-search svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.ops-search input {
  width: 100%;
  min-width: 0;
  padding: 7px 0;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 9px;
}

.ops-filter-group {
  padding: 7px 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border-bottom: 1px solid #edf1f5;
  background: #f7f9fb;
}

.ops-filter {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--navy);
  background: var(--white);
  font-size: 8px;
  font-weight: 800;
}

.ops-filter.active {
  border-color: var(--navy-light);
  color: var(--white);
  background: var(--navy-light);
}

.ops-table-scroll {
  min-height: 0;
  overflow: auto;
  position: relative;
}

.ops-table {
  table-layout: fixed;
}

.ops-table th {
  height: 39px;
  padding: 0 6px;
  font-size: 8px;
}

.ops-table td {
  height: 37px;
  padding: 0 6px;
  font-size: 8.5px;
}

.ops-table th:nth-child(1) {
  width: 10%;
}

.ops-table th:nth-child(2) {
  width: 12%;
}

.ops-table th:nth-child(3) {
  width: 13%;
}

.ops-table th:nth-child(4) {
  width: 8%;
}

.ops-table th:nth-child(5) {
  width: 16%;
}

.ops-table th:nth-child(6) {
  width: 23%;
}

.ops-table th:nth-child(7),
.ops-table th:nth-child(8) {
  width: 9%;
}

.ops-table td.event-cell {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-table tbody tr {
  cursor: pointer;
}

.ops-table tbody tr.selected td {
  background: #eaf2fb;
  box-shadow: inset 0 1px 0 rgba(23, 62, 105, 0.08);
}

.ops-table tbody tr.selected td:first-child {
  box-shadow: inset 4px 0 0 var(--navy-light);
  color: var(--navy);
  font-weight: 900;
}

.ops-status {
  max-width: 100%;
  padding: 4px 7px;
  display: inline-flex;
  overflow: hidden;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-status.status-aguardando {
  color: #7a5d00;
  background: #ffe89a;
}

.ops-status.status-em-revisao {
  color: #7b4300;
  background: #ffd7a3;
}

.ops-status.status-em-producao {
  color: #185789;
  background: #dceeff;
}

.ops-status.status-bloqueado,
.ops-status.status-atrasado {
  color: #922828;
  background: #ffd0d0;
}

.ops-status.status-cancelado {
  color: #63378b;
  background: #eadcf7;
}

.ops-status.status-pronto-pra-despacho {
  color: #154f87;
  background: #d8eaff;
}

.ops-status.status-despachado,
.ops-status.status-finalizado {
  color: #176844;
  background: #cfeedd;
}

.ops-empty {
  min-height: 260px;
}

.op-form-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.form-title {
  min-height: 58px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf1f5;
}

.form-title > div {
  display: grid;
  gap: 3px;
}

.form-clear {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  background: var(--white);
  font-size: 8px;
  font-weight: 800;
}

.form-clear:hover {
  color: var(--navy);
  background: var(--blue-pale);
}

.form-scroll {
  min-height: 0;
  padding: 0 13px 14px;
  overflow: auto;
}

.edit-mode-banner {
  min-height: 48px;
  margin: 11px 0 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 9px;
  border: 1px solid #a9c5df;
  border-radius: 6px;
  color: var(--navy);
  background: #eaf3fc;
}

.edit-mode-banner > span {
  grid-row: 1 / 3;
  padding: 6px 8px;
  border-radius: 5px;
  color: var(--white);
  background: var(--navy-light);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.edit-mode-banner strong {
  font-size: 12px;
}

.edit-mode-banner small {
  color: var(--muted);
  font-size: 7px;
}

.form-section {
  padding-top: 13px;
}

.form-section + .form-section {
  margin-top: 12px;
  border-top: 1px solid #edf1f5;
}

.form-section-title {
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  font-size: 9px;
  font-weight: 850;
}

.form-section-title b {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--navy-light);
  font-size: 7px;
}

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

.form-grid label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.form-grid label > span,
.product-quantity > span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.product-quantity input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #ccd6df;
  border-radius: 5px;
  outline: none;
  color: var(--text);
  background: var(--white);
  font-size: 9px;
}

.form-grid textarea {
  height: auto;
  min-height: 72px;
  padding: 8px 9px;
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.product-quantity input:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(23, 62, 105, 0.08);
}

.form-grid input[readonly] {
  cursor: not-allowed;
  color: var(--navy);
  background: #e9eef4;
  font-weight: 850;
}

.form-grid .op-status-select {
  border-width: 2px;
  font-weight: 850;
}

.op-status-select.status-aguardando {
  border-color: #e0b52d;
  color: #7a5d00;
  background: #fff7d6;
}

.op-status-select.status-em-revisao {
  border-color: #d88728;
  color: #7b4300;
  background: #fff0da;
}

.op-review-banner {
  margin: 0 20px 16px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  border: 1px solid #e6a44d;
  border-left: 5px solid #d88728;
  border-radius: 10px;
  color: #663700;
  background: #fff5e7;
}

.op-review-banner span {
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.op-review-banner strong,
.op-review-banner small {
  font-size: 10pt;
}

.op-status-select.status-em-producao {
  border-color: #4f91ca;
  color: #185789;
  background: #e8f4ff;
}

.op-status-select.status-bloqueado,
.op-status-select.status-atrasado {
  border-color: #d45a5a;
  color: #922828;
  background: #fff0f0;
}

.op-status-select.status-cancelado {
  border-color: #8b62ad;
  color: #63378b;
  background: #f2eafb;
}

.op-status-select.status-pronto-pra-despacho {
  border-color: #4c87c2;
  color: #154f87;
  background: #e8f2ff;
}

.op-status-select.status-despachado,
.op-status-select.status-finalizado {
  border-color: #55a57e;
  color: #176844;
  background: #eaf8f1;
}

.form-span-two {
  grid-column: 1 / -1;
}

.op-commercial-guidance {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.op-commercial-items-editor {
  display: grid;
  gap: 10px;
}

.op-composition-change-control {
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid #d4dfcf;
  border-radius: 9px;
  background: #f7faf4;
}

.op-composition-change-control legend {
  padding: 0 7px;
  color: var(--navy);
  font-weight: 900;
}

.op-composition-change-control > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.op-composition-change-control .active-toggle {
  margin: 0;
}

.op-commercial-item-card {
  overflow: hidden;
  border: 1px solid #d7e0d2;
  border-radius: 8px;
  background: #fbfcf9;
  box-shadow: 0 4px 12px rgba(64, 82, 58, 0.06);
}

.op-commercial-item-card > header {
  min-height: 54px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #dde5d9;
  background: #eef3ea;
}

.op-commercial-item-card > header > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--navy-light);
  font-size: 8px;
}

.op-commercial-item-card > header > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.op-commercial-item-card > header strong,
.op-commercial-item-card > header span {
  overflow-wrap: anywhere;
}

.op-commercial-item-card > header strong {
  color: var(--navy);
  font-size: 9px;
}

.op-commercial-item-card > header span,
.op-commercial-item-card > header small {
  color: var(--muted);
  font-size: 7px;
}

.op-commercial-item-card > header small {
  padding: 4px 6px;
  border: 1px solid #cbd8c6;
  border-radius: 999px;
  white-space: nowrap;
}

.op-commercial-item-basics,
.op-commercial-item-specs {
  padding: 10px;
}

.op-commercial-item-specs {
  border-top: 1px solid #e2e8df;
  background: #fff;
}

.op-commercial-item-specs > strong {
  margin-bottom: 8px;
  display: block;
  color: var(--gold-dark);
  font-size: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-section {
  padding-bottom: 3px;
}

.product-card {
  padding: 9px;
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #dce6ef;
  border-radius: 6px;
  background: #f7fafe;
}

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

.product-quantity {
  padding: 7px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-radius: 5px;
  background: #eaf2fb;
}

.product-quantity.trophy {
  background: #fff1df;
}

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

.switch-row {
  min-height: 32px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e1e8ef;
  border-radius: 5px;
  color: var(--text);
  background: var(--white);
  font-size: 7.5px;
  font-weight: 700;
}

.switch-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--green);
}

.switch-row:has(input:checked) {
  border-color: #85bfa3;
  color: #176844;
  background: #eef9f4;
}

.switch-row:has(input:disabled) {
  color: #a3adb7;
  background: #f2f4f6;
}

.form-footer {
  min-height: 64px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e6ddd0;
  background: var(--gold-pale);
}

.form-footer small {
  flex: 1;
  color: #7d6d38;
  font-size: 7.5px;
  line-height: 1.35;
}

.button.save-op {
  min-width: 162px;
  background: var(--green);
}

.form-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button.delete-op {
  min-width: 86px;
  border: 1px solid #c63535;
  color: #a81f1f;
  background: #fff6f6;
}

.button.delete-op:hover {
  color: #fff;
  background: #b82b2b;
}

.button.save-op svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.file-card,
.table-card,
.detail-card,
.search-box,
.summary-card {
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(13, 39, 72, 0.02);
}

.file-card {
  min-height: 62px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 7px;
}

.file-main,
.file-actions {
  display: flex;
  align-items: center;
}

.file-main {
  min-width: 0;
  gap: 11px;
}

.file-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy-light);
  background: var(--blue-pale);
}

.file-icon svg,
.button svg,
.search-box svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.file-copy span,
.section-eyebrow,
.edit-eyebrow {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.055em;
}

.file-copy strong {
  max-width: 660px;
  overflow: hidden;
  color: var(--navy);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-copy small {
  max-width: 690px;
  overflow: hidden;
  color: #8795a4;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-actions {
  flex: 0 0 auto;
  gap: 10px;
  margin-left: 18px;
}

.linked-badge {
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #cfe7dc;
  border-radius: 999px;
  color: var(--green);
  background: #edf8f2;
  font-size: 10px;
  font-weight: 750;
}

.linked-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(35, 135, 92, 0.12);
}

.button {
  min-height: 36px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 5px;
  color: var(--white);
  font-size: 11px;
  font-weight: 750;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}

.button:hover:not(:disabled) {
  filter: brightness(1.05);
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button:disabled {
  cursor: default;
  opacity: 0.5;
}

.button.secondary {
  background: var(--navy-light);
}

.button.save {
  flex: 1;
  min-width: 170px;
  background: var(--green);
}

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

.summary-card {
  min-height: 64px;
  display: flex;
  border-radius: 6px;
  overflow: hidden;
}

.summary-accent {
  flex: 0 0 7px;
}

.summary-card > div:last-child {
  padding: 8px 14px;
  display: grid;
}

.summary-card strong {
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
}

.summary-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.summary-card.total .summary-accent {
  background: var(--navy-light);
}

.summary-card.pending .summary-accent {
  background: var(--gold);
}

.summary-card.late .summary-accent {
  background: var(--red);
}

.summary-card.done .summary-accent {
  background: var(--green);
}

.controls {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  gap: 14px;
}

.search-box {
  min-height: 43px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  color: var(--muted);
}

.search-box svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-right: 9px;
}

.search-box span {
  flex: 0 0 auto;
  padding-right: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 12px;
}

.search-box input::placeholder {
  color: #9aa7b5;
}

.filter-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 7px;
}

.filter-button {
  min-height: 43px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--navy);
  background: var(--white);
  font-size: 10px;
  font-weight: 800;
}

.filter-button.active {
  border-color: var(--navy-light);
  color: var(--white);
  background: var(--navy-light);
}

.table-card {
  height: 252px;
  margin-top: 12px;
  border-radius: 6px;
  overflow: hidden;
}

.table-scroll {
  height: 100%;
  overflow: auto;
  position: relative;
}

.grouped-tables {
  height: 100%;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  background: #f3f6f9;
}

.grouped-tables[hidden] {
  display: none;
}

.grouped-other-list {
  grid-column: 1 / -1;
}

.grouped-list {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--white);
}

.grouped-list-header {
  flex: 0 0 42px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  color: var(--navy);
  background: #eef4fb;
}

.grouped-list-header > div {
  display: grid;
  gap: 1px;
}

.grouped-list-header span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.grouped-list-header strong {
  font-size: 11px;
  letter-spacing: 0.025em;
}

.grouped-list-header b {
  min-width: 48px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--white);
  background: var(--navy-light);
  font-size: 8px;
  text-align: center;
}

.trophy-list .grouped-list-header {
  color: #7c4500;
  background: #fff4e5;
}

.trophy-list .grouped-list-header b {
  background: #bd7015;
}

.grouped-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}

.grouped-table {
  min-width: 560px;
}

.grouped-table th {
  height: 38px;
  padding: 0 6px;
  font-size: 7.5px;
}

.grouped-table td {
  height: 38px;
  padding: 0 6px;
  font-size: 9px;
}

.grouped-table .status-pill {
  min-width: 67px;
  padding: 4px 7px;
  font-size: 7.5px;
}

.grouped-tables.trophy-workflow .grouped-table {
  width: 100%;
  min-width: 470px;
  table-layout: fixed;
}

.grouped-tables.trophy-workflow .grouped-table th,
.grouped-tables.trophy-workflow .grouped-table td {
  padding-inline: 3px;
  overflow-wrap: anywhere;
}

.grouped-tables.trophy-workflow .grouped-table th:nth-child(1) { width: 9%; }
.grouped-tables.trophy-workflow .grouped-table th:nth-child(2) { width: 13%; }
.grouped-tables.trophy-workflow .grouped-table th:nth-child(3) { width: 11%; }
.grouped-tables.trophy-workflow .grouped-table th:nth-child(4) { width: 20%; }
.grouped-tables.trophy-workflow .grouped-table th:nth-child(5) { width: 12%; }
.grouped-tables.trophy-workflow .grouped-table th:nth-child(6) { width: 16%; }
.grouped-tables.trophy-workflow .grouped-table th:nth-child(7) { width: 19%; }

.grouped-tables.trophy-workflow .status-pill {
  min-width: 0;
  width: 100%;
  white-space: normal;
}

.grouped-table tr.stage-locked td {
  color: #667064;
  background: #f2f4ef;
}

.grouped-table tr.stage-locked .status-pill {
  color: #5d654f;
  border: 1px solid #cfd5c8;
  background: #e6eae1;
}

.grouped-empty {
  min-height: 155px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.grouped-empty[hidden] {
  display: none;
}

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

.module-table-standard {
  min-width: 820px;
}

.module-table-status {
  min-width: 3240px;
  table-layout: fixed;
}

.module-table-assembly {
  min-width: 1180px;
}

.module-table-status th,
.module-table-status td {
  min-width: 0;
  height: 54px;
  padding: 7px 8px;
  line-height: 1.3;
  white-space: normal;
}

.module-table-status th {
  height: 58px;
  letter-spacing: 0.025em;
}

.module-table-status .status-op-col {
  width: 84px;
}

.module-table-status .status-order-col {
  width: 108px;
}

.module-table-status .status-dispatch-col {
  width: 116px;
}

.module-table-status .status-priority-col,
.module-table-status .status-quantity-col {
  width: 94px;
}

.module-table-status .status-stage-col {
  width: 118px;
}

.module-table-status .status-route-col {
  width: 164px;
}

.module-table-status .status-date-col {
  width: 116px;
}

.module-table-status .status-notes-col {
  width: 280px;
}

.module-table-status .status-situation-col {
  width: 148px;
}

.module-table-status th.status-core-col {
  background: #536251;
}

.module-table-status th.status-medal-col {
  background: #66765f;
}

.module-table-status th.status-trophy-col {
  background: #766f56;
}

.module-table-status th.status-summary-col {
  background: #5f6b5d;
}

.module-table-status .status-group-start {
  border-left: 4px solid #d6b85f;
}

.module-table-status td.status-text-cell {
  overflow-wrap: anywhere;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.module-table-status .stage-pill,
.module-table-status .status-pill {
  min-width: 0;
  max-width: 100%;
  line-height: 1.2;
  white-space: normal;
}

.module-table-status tbody tr,
.module-table-assembly tbody tr {
  cursor: default;
}

thead {
  position: sticky;
  z-index: 2;
  top: 0;
}

th {
  height: 48px;
  padding: 0 10px;
  color: var(--white);
  background: var(--navy);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

td {
  height: 43px;
  padding: 0 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tbody tr {
  cursor: pointer;
  transition: box-shadow 0.12s ease, filter 0.12s ease;
}

tbody tr:hover {
  filter: brightness(0.985);
}

tbody tr.selected {
  position: relative;
  box-shadow: inset 4px 0 0 var(--navy-light);
}

tbody tr.status-pendente td {
  background: #fff9e8;
}

tbody tr.status-atrasado td {
  color: #8f2323;
  background: #ffeded;
}

tbody tr.status-finalizado td {
  color: #176844;
  background: #eaf7f1;
}

tbody tr.status-finalizado-com-atraso td {
  color: #8a4b00;
  background: #fff1dc;
}

.status-pill {
  min-width: 88px;
  padding: 5px 11px;
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
}

.status-pill.status-pendente {
  color: #7a5d00;
  background: #ffe89a;
}

.status-pill.status-em-revisao {
  color: #7b4300;
  background: #ffd7a3;
}

.status-pill.status-atrasado {
  color: #922828;
  background: #ffd0d0;
}

.status-pill.status-finalizado {
  color: #176844;
  background: #cfeedd;
}

.status-pill.status-finalizado-com-atraso {
  min-width: 0;
  color: #7d4600;
  background: #ffdca3;
  line-height: 1.15;
  white-space: normal;
}

.stage-pill {
  min-width: 72px;
  padding: 4px 8px;
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 850;
}

.stage-pill.stage-pronto {
  color: #176844;
  background: #cfeedd;
}

.stage-pill.stage-pronto-com-atraso {
  color: #7d4600;
  background: #ffdca3;
}

.stage-pill.stage-pendente {
  color: #7a5d00;
  background: #ffe89a;
}

.stage-pill.stage-na {
  color: #718091;
  background: #e9eef3;
}

.workflow-cell {
  color: var(--navy);
  font-weight: 750;
}

.read-only-module .table-card {
  height: calc(100% - 235px);
  min-height: 310px;
}

.empty-state {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: var(--muted);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 5px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy-light);
  background: var(--blue-pale);
  font-size: 11px;
  font-weight: 900;
}

.empty-state strong {
  color: var(--navy);
  font-size: 13px;
}

.empty-state span {
  font-size: 11px;
}

.detail-card {
  min-height: 145px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(350px, 0.9fr);
  border-radius: 6px;
  overflow: hidden;
}

.detail-content {
  padding: 16px;
}

.section-eyebrow {
  color: var(--navy);
}

.detail-grid {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(5, minmax(105px, 1fr));
  gap: 8px;
}

.detail-field {
  min-height: 70px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid #edf1f5;
  border-radius: 5px;
  background: #f6f8fb;
}

.detail-field span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.detail-field strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-panel {
  padding: 16px 18px;
  background: var(--gold-pale);
}

.edit-eyebrow {
  color: var(--navy);
}

.edit-panel label {
  margin-top: 13px;
  display: block;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
}

.edit-panel .workflow-status-group {
  margin-top: 10px;
}

.workflow-status-group span {
  display: block;
  margin-bottom: 6px;
}

.workflow-status-group select {
  width: 100%;
  min-height: 37px;
  padding: 0 10px;
  border: 1px solid #cbd6e0;
  border-radius: 5px;
  outline: none;
  color: var(--text);
  background: var(--white);
}

.workflow-status-group select:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(23, 62, 105, 0.1);
}

.edit-row {
  margin-top: 7px;
  display: flex;
  gap: 9px;
}

.edit-row input {
  width: 155px;
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid #cbd6e0;
  border-radius: 5px;
  outline: none;
  color: var(--text);
  background: var(--white);
}

.edit-row input:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(23, 62, 105, 0.1);
}

.edit-panel small {
  margin-top: 8px;
  display: block;
  color: #7d6d38;
  font-size: 9px;
}

footer {
  flex: 0 0 34px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--white);
  background: var(--navy);
  font-size: 10px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 50px;
  max-width: 440px;
  padding: 13px 16px;
  border-radius: 7px;
  color: var(--white);
  background: var(--green);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--red);
}

.loading {
  cursor: progress;
}

.loading .button,
.loading .filter-button,
.loading input,
.loading tbody {
  pointer-events: none;
}

@media (max-width: 1120px) {
  .brand-signature {
    width: 236px;
    gap: 7px;
  }

  .brand-signature .brand-hsports {
    width: 55px;
  }

  .brand-signature .brand-jm {
    width: 150px;
  }

  .file-copy small,
  .linked-badge {
    display: none;
  }

  .detail-card {
    grid-template-columns: 1fr 360px;
  }

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

/* Autenticação e controle de acesso */

.auth-gate {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(390px, 0.92fr) minmax(480px, 1.08fr);
  background: #f4f7fa;
}

.auth-brand-panel {
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  background:
    radial-gradient(circle at 76% 18%, rgba(214, 165, 30, 0.25), transparent 28%),
    linear-gradient(145deg, #07192e, #12365f);
  border-right: 5px solid var(--gold);
}

.auth-brand-logos {
  width: 390px;
  display: grid;
  grid-template-columns: 140px 238px;
  grid-template-areas:
    ". signature"
    "hsports jm";
  align-items: center;
  gap: 7px 12px;
}

.auth-brand-logos > span {
  grid-area: signature;
  color: #e6b93d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-align: center;
}

.auth-brand-panel .auth-hsports-logo {
  grid-area: hsports;
  width: 140px;
  height: 140px;
  object-fit: contain;
  object-position: left center;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.25);
}

.auth-brand-panel .auth-jm-logo {
  grid-area: jm;
  width: 238px;
  height: 140px;
  object-fit: contain;
  object-position: left center;
  border: 1px solid rgba(214, 165, 30, 0.3);
  border-radius: 9px;
  background: #000;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.auth-brand-copy {
  margin-top: 24px;
}

.auth-brand-panel span,
.auth-eyebrow {
  color: #e6b93d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.auth-brand-panel strong {
  margin-top: 7px;
  display: block;
  font-size: 29px;
}

.auth-brand-panel p {
  max-width: 450px;
  margin: 12px 0 0;
  color: #ccdaea;
  font-size: 14px;
  line-height: 1.55;
}

.auth-form-panel {
  padding: 34px;
  display: grid;
  place-items: center;
  overflow: auto;
}

.auth-form {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--white);
  box-shadow: 0 20px 55px rgba(13, 39, 72, 0.12);
}

.auth-mobile-brand {
  display: none;
}

.auth-form h1 {
  margin: 8px 0 7px;
  color: var(--navy);
  font-size: 24px;
}

.auth-form > p {
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.auth-form > label,
.auth-password-row label {
  margin-top: 13px;
  display: grid;
  gap: 6px;
}

.auth-form label > span {
  color: var(--navy);
  font-size: 9px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid #c9d4df;
  border-radius: 7px;
  color: var(--text);
  background: #fbfcfd;
  outline: none;
}

.auth-form input:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(23, 62, 105, 0.11);
}

.auth-password-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-primary-button {
  width: 100%;
  min-height: 45px;
  margin-top: 22px;
  border: 0;
  border-radius: 7px;
  color: var(--white);
  background: var(--navy-light);
  font-size: 11px;
  font-weight: 850;
}

.auth-primary-button:hover {
  background: #205287;
}

.auth-primary-button:disabled {
  opacity: 0.62;
  cursor: progress;
}

.auth-form > small {
  min-height: 17px;
  margin-top: 10px;
  display: block;
  color: var(--red);
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}

.hero-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-account {
  min-width: 190px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 34px minmax(90px, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.user-account > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-account strong,
.user-account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-account strong {
  font-size: 9px;
}

.user-account span {
  color: #c6d6e6;
  font-size: 7px;
}

.user-account button {
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: var(--white);
  background: transparent;
  font-size: 7px;
  font-weight: 800;
}

.module-card.administration {
  border-left-color: #8b5fb0;
}

.module-card.administration.active .module-icon {
  background: #765095;
}

.view-only-note {
  min-height: 210px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #cad6e2;
  border-radius: 7px;
  color: var(--navy);
  background:
    radial-gradient(circle at 92% 12%, rgba(214, 165, 30, 0.13), transparent 35%),
    var(--white);
}

.view-only-note div {
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.view-only-note strong {
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.3;
}

.view-only-note span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.users-view {
  overflow: auto;
}

.users-heading {
  min-height: 92px;
  padding: 17px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: 8px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 10%, rgba(214, 165, 30, 0.2), transparent 28%),
    linear-gradient(120deg, #102e52, #173e69);
}

.users-heading span,
.users-list-card header span,
.audit-card header span {
  color: #e4b945;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.users-heading h1 {
  margin: 5px 0 4px;
  font-size: 20px;
}

.users-heading p {
  margin: 0;
  color: #d4e0ec;
  font-size: 9px;
}

.button.user-new-button,
.button.save-user-button {
  border: 0;
  color: var(--white);
  background: var(--green);
}

.button.user-new-button {
  min-width: 125px;
}

.users-workspace {
  height: 390px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(390px, 0.7fr);
  gap: 12px;
}

.users-list-card,
.user-form-card,
.audit-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.users-list-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.users-list-card header,
.audit-card header {
  min-height: 54px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf1f5;
}

.users-list-card header > div,
.audit-card header > div {
  display: grid;
  gap: 3px;
}

.users-list-card header strong,
.audit-card header strong {
  color: var(--navy);
  font-size: 11px;
}

.users-table-scroll,
.audit-table-scroll {
  min-height: 0;
  overflow: auto;
}

.users-table,
.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}

.users-table th,
.users-table td,
.audit-table th,
.audit-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  white-space: nowrap;
}

.users-table th,
.audit-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #587086;
  background: #f6f8fa;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.users-table tbody tr {
  cursor: pointer;
}

.users-table tbody tr:hover,
.users-table tbody tr.selected {
  background: #eef5fb;
}

.access-count,
.user-status-pill {
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 800;
}

.access-count {
  color: var(--navy-light);
  background: #e2edf7;
}

.user-status-pill.active {
  color: #176844;
  background: #d9f0e4;
}

.user-status-pill.inactive {
  color: #922828;
  background: #f6dada;
}

.user-form-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.user-form-scroll {
  min-height: 0;
  padding: 12px 13px;
  overflow: auto;
}

.user-form-card .form-grid input,
.user-form-card .form-grid select {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #ccd7e1;
  border-radius: 5px;
  color: var(--text);
  background: var(--white);
}

.user-active-row {
  margin-top: 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe3eb;
  border-radius: 6px;
  color: var(--navy);
  background: #f8fafc;
  font-size: 8px;
  font-weight: 800;
}

.user-active-row input {
  accent-color: var(--green);
}

.permission-section {
  margin-top: 12px;
}

.permission-section > div:first-child {
  display: grid;
  gap: 3px;
}

.permission-section > div:first-child > span {
  color: var(--navy);
  font-size: 8px;
  font-weight: 900;
}

.permission-section > div:first-child > small {
  color: var(--muted);
  font-size: 7px;
}

.permission-table {
  margin-top: 8px;
  display: grid;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.permission-row {
  min-height: 30px;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 52px;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #edf1f5;
  font-size: 7px;
}

.permission-row:last-child {
  border-bottom: 0;
}

.permission-row.header {
  min-height: 25px;
  color: #657789;
  background: #f5f8fa;
  font-size: 6px;
  font-weight: 900;
}

.permission-row label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.permission-row input {
  margin: 0;
  accent-color: var(--green);
}

.user-form-actions {
  margin: 9px 13px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.save-user-button,
.delete-user-button {
  min-height: 42px;
}

.delete-user-button {
  border: 0;
  color: var(--white);
  background: var(--red);
}

.audit-card {
  min-height: 210px;
  margin-top: 12px;
}

.audit-card header small {
  color: var(--muted);
  font-size: 7px;
}

.audit-table-scroll {
  max-height: 210px;
}

.repository-view {
  overflow: hidden;
}

.repository-view:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.repository-file-icon {
  color: var(--white);
  background: var(--navy-light);
  font-size: 10px;
  font-weight: 900;
}

.linked-badge.not-ready {
  color: #9a6d13;
  border-color: #ead89d;
  background: #fff8df;
}

.linked-badge.not-ready i {
  background: var(--gold);
}

.repository-permission-banner {
  min-height: 55px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #c9d7e5;
  border-left: 4px solid var(--navy-light);
  border-radius: 7px;
  background: #f8fbfe;
}

.repository-permission-banner > div {
  display: grid;
  gap: 3px;
}

.repository-permission-banner span,
.repository-config-card > div > span,
.repository-panel-heading span,
.repository-selected-heading span,
.repository-upload-panel > div > span {
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.repository-permission-banner strong {
  color: var(--navy);
  font-size: 12px;
}

.repository-permission-banner p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  text-align: right;
}

.repository-config-card {
  min-height: 72px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #ead89d;
  border-radius: 7px;
  background: #fffbeb;
}

.repository-config-card > div {
  min-width: 240px;
  display: grid;
  gap: 3px;
}

.repository-config-card > div > strong {
  color: var(--navy);
  font-size: 11px;
}

.repository-config-card > div > small {
  color: var(--muted);
  font-size: 8px;
}

.repository-config-card form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.repository-config-card input {
  flex: 1;
  min-width: 260px;
  height: 35px;
  padding: 0 10px;
  border: 1px solid #d7c47d;
  border-radius: 5px;
  color: var(--text);
  background: var(--white);
  font-size: 9px;
}

.repository-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
}

.repository-ops-panel,
.repository-files-panel {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.repository-ops-panel {
  display: flex;
  flex-direction: column;
}

.repository-panel-heading {
  padding: 12px;
  display: grid;
  gap: 9px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.repository-panel-heading > div,
.repository-selected-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.repository-panel-heading strong,
.repository-selected-heading strong,
.repository-upload-panel strong {
  color: var(--navy);
  font-size: 11px;
}

.repository-search-group {
  display: grid;
  grid-template-columns: minmax(92px, 0.7fr) minmax(140px, 1.3fr);
  gap: 8px;
}

.repository-search {
  display: grid;
  gap: 4px;
}

.repository-search span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.repository-search input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 9px;
}

.repository-op-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.repository-op-item {
  width: 100%;
  min-height: 62px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  color: var(--text);
  background: var(--white);
  text-align: left;
}

.repository-op-item:hover,
.repository-op-item.selected {
  background: #eff6fc;
}

.repository-op-item.selected {
  box-shadow: inset 4px 0 0 var(--navy-light);
}

.repository-op-item > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.repository-op-item strong {
  color: var(--navy);
  font-size: 10px;
}

.repository-op-item span,
.repository-op-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repository-op-item span {
  color: var(--text);
  font-size: 9px;
}

.repository-op-item small {
  color: var(--muted);
  font-size: 8px;
}

.repository-count {
  flex: 0 0 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #956b13;
  background: #fff2c8;
  font-size: 9px;
}

.repository-count.ready {
  color: var(--green);
  background: #e1f3ea;
}

.repository-files-panel {
  display: flex;
  flex-direction: column;
}

.repository-selected-heading {
  min-height: 65px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.repository-selected-heading > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.repository-selected-heading small {
  max-width: 620px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repository-file-count {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--navy-light);
  background: var(--blue-pale);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.repository-selected-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.repository-operational-preview {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #70826d;
  border-radius: 6px;
  color: #fff;
  background: #647761;
  font: inherit;
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}

.repository-operational-preview:hover,
.repository-operational-preview:focus-visible {
  background: #4f6250;
}

.repository-upload-panel {
  min-height: 74px;
  padding: 10px 13px;
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(300px, 1fr) auto;
  align-items: end;
  gap: 9px;
  border-bottom: 1px solid #cfe7dc;
  background: #f1faf6;
}

.repository-upload-panel > div,
.repository-upload-panel label {
  display: grid;
  gap: 4px;
}

.repository-upload-panel label > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.repository-upload-panel label > small {
  color: #587064;
  font-size: 8px;
  line-height: 1.35;
}

.repository-upload-panel select,
.repository-upload-panel input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #bdd9ca;
  border-radius: 5px;
  color: var(--text);
  background: var(--white);
  font-size: 8px;
}

.repository-upload-panel .button {
  min-height: 34px;
  min-width: 110px;
}

.repository-missing-folder {
  min-height: 58px;
  padding: 11px 14px;
  display: grid;
  gap: 4px;
  border-bottom: 1px solid #ead89d;
  color: #7a5d18;
  background: #fff8df;
}

.repository-missing-folder strong {
  font-size: 10px;
}

.repository-missing-folder span {
  font-size: 8px;
}

.repository-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

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

.repository-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 10px;
  color: #68798a;
  background: #f1f5f8;
  font-size: 7px;
  text-align: left;
}

.repository-table th:nth-child(1) {
  width: 38%;
}

.repository-table th:nth-child(2) {
  width: 16%;
}

.repository-table th:nth-child(3) {
  width: 23%;
}

.repository-table th:nth-child(4) {
  width: 23%;
}

.repository-table td {
  padding: 10px;
  overflow: hidden;
  border-bottom: 1px solid #edf1f5;
  color: var(--text);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repository-table td.repository-file-name {
  color: var(--navy);
  font-weight: 750;
}

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

.repository-open,
.repository-delete {
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  color: var(--white);
  background: var(--navy-light);
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

.repository-open:hover {
  background: var(--navy);
}

.repository-delete {
  color: #9f1f1f;
  background: #feeaea;
}

.repository-delete:hover {
  color: var(--white);
  background: #b42318;
}

.confirmation-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(10, 30, 54, 0.72);
}

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

.confirmation-dialog {
  width: min(480px, 100%);
  padding: 22px;
  display: grid;
  gap: 16px;
  border: 1px solid #e6c8c8;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(7, 27, 49, 0.32);
}

.confirmation-dialog-heading,
.confirmation-file-summary,
.confirmation-dialog form,
.confirmation-dialog label {
  display: grid;
  gap: 5px;
}

.confirmation-dialog-heading span,
.confirmation-file-summary span,
.confirmation-dialog label span {
  color: #9f1f1f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.confirmation-dialog-heading strong {
  color: var(--navy);
  font-size: 16px;
}

.confirmation-dialog p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.confirmation-file-summary {
  padding: 12px;
  border-radius: 6px;
  background: #f7f9fb;
}

.confirmation-file-summary strong {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 10px;
}

.confirmation-dialog input {
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid #d8a8a8;
  border-radius: 5px;
  font-size: 10px;
}

.confirmation-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.confirmation-dialog-actions .button {
  min-height: 44px;
}

.confirmation-cancel {
  color: var(--navy);
  background: #edf2f7;
}

.confirmation-delete {
  color: var(--white);
  background: #b42318;
}

.confirmation-delete:hover {
  background: #8f1710;
}

.repository-empty {
  padding: 28px 16px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

@media (max-width: 1280px) {
  .brand-signature {
    width: 78px;
    padding-left: 8px;
    display: flex;
  }

  .brand-signature .brand-hsports {
    width: 66px;
  }

  .brand-signature .brand-jm,
  .brand-signature > span {
    display: none;
  }

  .users-workspace {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  }
}

@media (max-width: 900px) {
  .auth-gate {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-mobile-brand {
    margin: -4px 0 22px;
    padding-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-bottom: 1px solid #e5eaf0;
  }

  .auth-mobile-hsports-logo {
    width: 82px;
    height: 82px;
    object-fit: contain;
    border-radius: 12px;
    background: #000;
  }

  .auth-mobile-jm-logo {
    width: 154px;
    height: 82px;
    object-fit: contain;
    border: 1px solid rgba(214, 165, 30, 0.28);
    border-radius: 8px;
    background: #000;
  }
}

/* Linguagem visual iconográfica — Segoe UI 10 pt */

.process-icon,
.module-icon,
.icon-action-button,
.icon-text-button,
.save-user-button,
.delete-user-button {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10pt;
}

.process-icon svg,
.module-icon svg,
.icon-action-button svg,
.icon-text-button svg,
.save-user-button svg,
.delete-user-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.process-step b.process-icon {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: var(--navy-light);
  box-shadow: 0 5px 14px rgba(13, 39, 72, 0.16);
}

.process-icon svg {
  width: 23px;
  height: 23px;
}

.process-icon.medal-flow {
  background: #2b72bb;
}

.process-icon.trophy-flow {
  background: #d7831f;
}

.process-icon.assembly-flow {
  background: #23875c;
}

.process-icon.shipping-flow {
  background: #6d4c91;
}

.process-step span {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10pt;
}

.module-grid {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
}

.module-card {
  --module-color: #617386;
  min-height: 96px;
  padding: 14px;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-areas:
    "icon copy"
    "icon status";
  gap: 6px 13px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--module-color);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(13, 39, 72, 0.06);
}

.module-card.planning {
  --module-color: #1e4f7a;
}

.module-card.medal {
  --module-color: #2b72bb;
}

.module-card.trophy {
  --module-color: #d7831f;
}

.module-card.shipping {
  --module-color: #6d4c91;
}

.module-card.assembly {
  --module-color: #23875c;
}

.module-card.repository {
  --module-color: #4265a8;
}

.module-card.administration {
  --module-color: #71438f;
}

.module-card.active {
  border-color: var(--border);
  border-left-color: var(--module-color);
  background:
    linear-gradient(
      135deg,
      #ffffff 45%,
      color-mix(in srgb, var(--module-color) 8%, white)
    );
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--module-color) 40%, var(--border));
  box-shadow: 0 10px 24px rgba(13, 39, 72, 0.12);
}

.module-icon {
  grid-area: icon;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  color: #ffffff;
  background: var(--module-color);
  box-shadow: 0 6px 15px color-mix(in srgb, var(--module-color) 28%, transparent);
}

.module-card.active .module-icon {
  color: #ffffff;
  background: var(--module-color);
}

.module-icon svg {
  width: 29px;
  height: 29px;
}

.module-copy {
  grid-area: copy;
  gap: 4px;
}

.module-copy strong {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10pt;
  white-space: normal;
}

.module-copy span {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 9pt;
  white-space: normal;
}

.module-card small,
.module-card.active small {
  grid-area: status;
  width: max-content;
  padding: 4px 8px;
  color: var(--module-color);
  background: color-mix(in srgb, var(--module-color) 10%, white);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 8pt;
}

.icon-action-button,
.icon-text-button,
.save-user-button,
.delete-user-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icon-action-button svg,
.save-user-button svg,
.delete-user-button svg {
  width: 20px;
  height: 20px;
}

.icon-text-button svg {
  width: 17px;
  height: 17px;
}

.users-heading h1 {
  font-family: "Segoe UI", Arial, sans-serif;
}

.users-heading p,
.users-list-card,
.user-form-card,
.audit-card,
.users-table,
.audit-table,
.user-form-card input,
.user-form-card select,
.user-form-card button {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10pt;
}

.users-table th,
.audit-table th,
.permission-row.header {
  font-size: 8pt;
}

.users-table td,
.audit-table td,
.permission-row,
.user-form-card label > span,
.permission-section > div:first-child > span,
.permission-section > div:first-child > small {
  font-size: 9pt;
}

.user-name-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-list-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #ffffff;
  background: var(--navy-light);
  font-size: 9pt;
  font-weight: 800;
}

.users-table tbody tr.selected .user-list-avatar {
  background: var(--green);
}

.access-count,
.user-status-pill {
  font-size: 8pt;
}

.user-form-card .form-title::before {
  width: 34px;
  height: 34px;
  margin-right: 9px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: var(--navy-light);
  content: "＋";
  font-size: 18px;
  font-weight: 400;
}

.user-form-card .form-title {
  justify-content: flex-start;
}

.user-form-card .form-title .form-clear {
  margin-left: auto;
}

@media (max-width: 1180px) {
  .module-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 900px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .process-strip {
    overflow-x: auto;
    gap: 18px;
  }

  .process-step {
    flex: 0 0 auto;
  }

  .users-workspace {
    height: auto;
    grid-template-columns: 1fr;
  }

  .users-list-card,
  .user-form-card {
    min-height: 380px;
  }
}

@media (max-width: 560px) {
  .module-grid {
    grid-template-columns: 1fr;
  }

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

/* Primeira experiência móvel (360–430 px).
   As regras ficam isoladas para preservar integralmente o layout desktop. */
@media (max-width: 600px) {
  html,
  body {
    min-width: 320px;
    font-size: 10pt;
  }

  button,
  input,
  select,
  .button,
  .filter-button,
  .ops-filter,
  .repository-open {
    min-height: 44px;
  }

  .pcp-daily-agenda > header {
    padding: 14px;
    align-items: stretch;
    flex-direction: column;
  }

  .pcp-agenda-counter {
    width: 100%;
  }

  .pcp-agenda-list {
    grid-template-columns: 1fr;
  }

  .pcp-agenda-item {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .pcp-agenda-check {
    grid-column: 1 / -1;
    padding: 0 4px;
  }

  .pcp-agenda-open {
    min-width: 88px;
  }

  .auth-gate {
    min-height: 100dvh;
    height: auto;
    overflow-y: auto;
  }

  .auth-form-panel {
    min-height: 100dvh;
    padding: 24px 16px;
    align-items: center;
  }

  .auth-form {
    width: 100%;
    max-width: 430px;
    padding: 24px 20px;
  }

  .auth-mobile-brand {
    margin-bottom: 18px;
    padding-bottom: 14px;
    gap: 10px;
  }

  .auth-mobile-hsports-logo {
    width: 72px;
    height: 72px;
  }

  .auth-mobile-jm-logo {
    width: 132px;
    height: 72px;
  }

  .auth-form h1 {
    font-size: 22px;
    line-height: 1.2;
  }

  .auth-form input,
  .auth-primary-button {
    min-height: 48px;
  }

  .auth-password-row {
    grid-template-columns: 1fr;
  }

  .app-shell {
    height: 100dvh;
  }

  .hero {
    min-height: 72px;
    padding: 10px 12px;
    gap: 10px;
    align-items: flex-start;
  }

  .hero-navigation {
    min-width: 0;
    gap: 6px;
  }

  .home-button {
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    font-size: 8px;
  }

  .home-button svg {
    width: 20px;
    height: 20px;
  }

  .hero-title {
    min-height: 44px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    font-size: 14px;
  }

  .hero-title span,
  .hero-subtitle,
  .brand-signature,
  .user-account > div:nth-child(2) {
    display: none;
  }

  .hero-right {
    gap: 4px;
  }

  .user-account {
    min-width: 0;
    padding: 0;
    grid-template-columns: 44px auto;
    gap: 5px;
    border: 0;
    background: transparent;
  }

  .user-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .user-account button {
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
  }

  main {
    padding: 12px;
    overscroll-behavior: contain;
  }

  .entrada-view,
  .repository-view {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .home-intro {
    padding: 18px 16px;
    display: grid;
    gap: 14px;
  }

  .home-intro h1 {
    font-size: 20px;
  }

  .home-intro p {
    font-size: 10pt;
    line-height: 1.45;
  }

  .home-jm-signature {
    display: none;
  }

  .home-status-card {
    min-width: 0;
    padding: 12px 0 0;
    justify-items: start;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }

  .linked-workbook-home {
    align-items: flex-start;
  }

  .linked-workbook-home strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .workbook-ready,
  .module-legend {
    display: none;
  }

  .home-daily-agenda > header {
    padding: 14px;
    align-items: stretch;
    flex-direction: column;
  }

  .home-approval-counter {
    min-width: 0;
    justify-content: flex-start;
  }

  .home-agenda-list {
    grid-template-columns: 1fr;
  }

  .home-agenda-item {
    min-height: 56px;
  }

  .process-strip {
    padding: 12px;
    gap: 14px;
    scroll-snap-type: x proximity;
  }

  .process-step {
    min-width: 96px;
    scroll-snap-align: start;
  }

  .modules-heading {
    align-items: flex-end;
  }

  .module-card {
    min-height: 104px;
    padding: 14px;
  }

  .module-card:hover {
    transform: none;
  }

  .file-card,
  .file-main,
  .file-actions {
    align-items: stretch;
  }

  .file-card {
    padding: 12px;
    flex-direction: column;
    gap: 10px;
  }

  .file-copy strong,
  .file-copy small {
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .file-copy small {
    display: block;
  }

  .file-actions {
    width: 100%;
    margin-left: 0;
  }

  .file-actions .button {
    width: 100%;
  }

  .summary-grid,
  .ops-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-card {
    min-height: 72px;
  }

  .summary-card > div:last-child {
    padding: 9px;
  }

  .summary-card strong {
    font-size: 19px;
  }

  .ops-workspace,
  .users-workspace,
  .repository-workspace {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .mobile-ops-nav {
    position: sticky;
    z-index: 8;
    top: 0;
    margin: 10px 0 8px;
    padding: 7px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 5px 16px rgba(13, 39, 72, 0.1);
    backdrop-filter: blur(10px);
  }

  .mobile-ops-nav button {
    min-width: 0;
    min-height: 46px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #c7d4e1;
    border-radius: 7px;
    color: var(--navy);
    background: var(--white);
    font-size: 9pt;
    font-weight: 800;
  }

  .mobile-ops-nav button:first-child {
    border-color: var(--navy-light);
    color: var(--white);
    background: var(--navy-light);
  }

  .mobile-ops-nav svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .op-form-panel,
  .view-only-note {
    order: 1;
    scroll-margin-top: 68px;
  }

  .ops-list-panel {
    order: 2;
    scroll-margin-top: 68px;
  }

  .ops-list-panel,
  .users-list-card,
  .user-form-card,
  .repository-ops-panel,
  .repository-files-panel {
    min-width: 0;
    min-height: 0;
  }

  .ops-list-header,
  .users-list-heading,
  .repository-panel-heading,
  .repository-selected-heading {
    padding: 12px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .repository-selected-actions {
    width: 100%;
    justify-content: space-between;
  }

  .repository-operational-preview {
    min-height: 44px;
  }

  .ops-search,
  .repository-search input {
    width: 100%;
    min-height: 44px;
  }

  .repository-search-group {
    grid-template-columns: 1fr;
  }

  .ops-filter-group,
  .filter-group {
    padding: 8px;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .ops-filter,
  .filter-button {
    min-width: 108px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .ops-table-scroll,
  .table-card,
  .repository-table-scroll {
    height: auto;
    min-height: 230px;
    max-height: 55vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ops-table {
    min-width: 760px;
  }

  .ops-table,
  .module-table {
    border-collapse: separate;
    border-spacing: 0;
  }

  th,
  td,
  .ops-table th,
  .ops-table td {
    height: 44px;
  }

  .ops-table th:first-child,
  .ops-table td:first-child,
  .module-table th:first-child,
  .module-table td:first-child {
    position: sticky;
    left: 0;
    width: 78px;
    min-width: 78px;
  }

  .ops-table th:first-child,
  .module-table th:first-child {
    z-index: 5;
    background: var(--navy);
  }

  .ops-table td:first-child,
  .module-table td:first-child {
    z-index: 2;
    background: var(--white);
    box-shadow: 2px 0 3px rgba(13, 39, 72, 0.08);
  }

  .ops-table tbody tr.selected td:first-child {
    background: #eaf2fb;
  }

  .module-table tbody tr.status-pendente td:first-child {
    background: #fff9e8;
  }

  .module-table tbody tr.status-atrasado td:first-child {
    background: #ffeded;
  }

  .module-table tbody tr.status-finalizado td:first-child {
    background: #eaf7f1;
  }

  .module-table tbody tr.status-finalizado-com-atraso td:first-child {
    background: #fff1dc;
  }

  .op-form-panel {
    max-height: none;
  }

  .form-title,
  .form-footer {
    padding: 12px;
  }

  .form-clear {
    min-width: 64px;
    min-height: 44px;
  }

  .form-scroll,
  .user-form-scroll {
    max-height: none;
    overflow: visible;
  }

  .form-section {
    padding: 14px 12px;
  }

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

  .form-grid .form-span-two {
    grid-column: auto;
  }

  .form-grid input,
  .form-grid select,
  .form-grid textarea,
  .user-form-card .form-grid input,
  .user-form-card .form-grid select {
    min-height: 48px;
  }

  .op-commercial-item-card > header {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .op-commercial-item-card > header > b {
    width: 36px;
    height: 36px;
  }

  .op-commercial-item-card > header > small {
    grid-column: 2;
    justify-self: start;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-quantity {
    min-height: 88px;
  }

  .switch-row {
    min-height: 44px;
  }

  .form-footer,
  .form-footer-actions,
  .user-form-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 10px;
  }

  .form-footer-actions,
  .form-footer-actions .button,
  .user-form-actions .button {
    width: 100%;
  }

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

  .grouped-tables {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .detail-card {
    grid-template-columns: 1fr;
  }

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

  .detail-field strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .edit-row {
    flex-direction: column;
  }

  .edit-row input,
  .edit-row .button {
    width: 100%;
    min-height: 44px;
  }

  .users-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .users-heading .button {
    width: 100%;
  }

  .users-table-scroll,
  .audit-table-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .users-table,
  .audit-table {
    min-width: 680px;
  }

  .permission-table {
    overflow-x: auto;
  }

  .permission-row {
    min-width: 330px;
  }

  .permission-row label {
    min-height: 44px;
  }

  .repository-permission-banner,
  .repository-config-card,
  .repository-upload-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 12px;
  }

  .repository-config-card form {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .repository-config-card input,
  .repository-upload-panel select,
  .repository-upload-panel input,
  .repository-upload-panel .button {
    width: 100%;
    min-height: 44px;
  }

  .repository-op-list {
    max-height: 340px;
  }

  .repository-op-item {
    min-height: 64px;
  }

  .repository-table {
    min-width: 620px;
  }

  .repository-open,
  .repository-delete {
    min-height: 44px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
  }

  .confirmation-overlay {
    padding: 12px;
  }

  .confirmation-dialog {
    padding: 18px;
  }

  .confirmation-dialog-actions {
    grid-template-columns: 1fr;
  }

  footer {
    min-height: 34px;
    height: auto;
    padding: 6px 12px;
  }

  .toast {
    right: 12px;
    bottom: 46px;
    left: 12px;
    max-width: none;
  }
}

/* Painel de indicadores e navegação contextual — homologação 06/08/2026. */
.sidebar-nav-item {
  --module-accent: #315f8f;
  --module-soft: #eaf1f8;
}

.sidebar-nav-item[data-sidebar-area="home"] {
  --module-accent: #3676c5;
  --module-soft: #eaf3ff;
}

.sidebar-nav-item[data-sidebar-area="commercial"] {
  --module-accent: #23875c;
  --module-soft: #e5f5ed;
}

.sidebar-nav-item[data-sidebar-area="estoque"] {
  --module-accent: #14818a;
  --module-soft: #e1f5f5;
}

.sidebar-nav-item[data-sidebar-area="pcp"] {
  --module-accent: #db7c27;
  --module-soft: #fff0df;
}

.sidebar-nav-item[data-sidebar-area="admin"] {
  --module-accent: #7655a6;
  --module-soft: #f0eafb;
}

.sidebar-nav-item[data-sidebar-area="logistica"] {
  --module-accent: #d04f68;
  --module-soft: #fde9ee;
}

.sidebar-nav-item > svg {
  width: 32px;
  height: 32px;
  padding: 6px;
  color: var(--module-accent);
  background: var(--module-soft);
  border-radius: 9px;
}

.sidebar-nav-item:hover:not(:disabled),
.sidebar-nav-item:focus-visible,
.sidebar-nav-item.active {
  color: var(--module-accent);
  background: var(--module-soft);
  border-color: color-mix(in srgb, var(--module-accent) 18%, #fff);
}

.sidebar-nav-item.active {
  box-shadow: inset 4px 0 var(--module-accent);
}

.sidebar-motivation {
  margin: 0 0 8px;
  padding: 10px;
  display: grid;
  gap: 4px;
  color: #2e5948;
  background:
    radial-gradient(circle at 95% 5%, rgba(255, 194, 87, 0.36), transparent 42%),
    linear-gradient(135deg, #eef7f1, #fff9e9);
  border: 1px solid #dce9df;
  border-radius: 11px;
}

.sidebar-motivation span {
  color: #c7831d;
  font-size: 7pt;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.sidebar-motivation strong {
  font-size: 9pt;
  line-height: 1.25;
}

.sidebar-motivation small {
  color: #66786f;
  font-size: 7.5pt;
  line-height: 1.35;
}

@media (min-width: 901px) and (max-height: 780px) {
  .app-sidebar {
    padding-top: 11px;
    padding-bottom: 9px;
  }

  .sidebar-brand {
    min-height: 62px;
    padding-bottom: 9px;
  }

  .sidebar-navigation {
    margin-top: 8px;
    margin-bottom: 8px;
    gap: 3px;
  }

  .sidebar-nav-item {
    min-height: 47px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .sidebar-motivation {
    padding: 8px 10px;
  }

  .sidebar-motivation small {
    font-size: 7pt;
  }

  .sidebar-account {
    padding-top: 8px;
  }

  .sidebar-user-copy {
    min-height: 44px;
  }

  .sidebar-account > button {
    margin-top: 5px;
  }
}

.app-shell > .context-navigation {
  width: auto;
  margin-left: 246px;
}

.context-navigation {
  flex: 0 0 auto;
  min-height: 78px;
  padding: 9px 22px;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #f7f9fc;
  border-bottom: 1px solid #dce4ec;
  box-shadow: 0 5px 14px rgba(13, 39, 72, 0.05);
  scrollbar-width: thin;
}

.commercial-context-navigation {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
}

.commercial-context-navigation button {
  min-width: 132px;
  min-height: 58px;
  padding: 8px 11px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #42556a;
  background: #fff;
  border: 1px solid #dce4eb;
  border-radius: 9px;
  text-align: left;
}

.commercial-context-navigation button svg {
  width: 35px;
  height: 35px;
  padding: 7px;
  color: #23875c;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: #e6f5ed;
  border-radius: 9px;
}

.commercial-context-navigation button:nth-child(3) svg {
  color: #3676c5;
  background: #e8f1fc;
}

.commercial-context-navigation button:nth-child(n+4) svg {
  color: #b97514;
  background: #fff2dc;
}

.commercial-context-navigation button > span,
.context-navigation button > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.commercial-context-navigation strong,
.commercial-context-navigation small {
  overflow-wrap: anywhere;
}

.commercial-context-navigation strong {
  color: var(--navy);
  font-size: 9pt;
}

.commercial-context-navigation small {
  color: var(--muted);
  font-size: 7.5pt;
}

.commercial-context-navigation button.active {
  color: #fff;
  background: linear-gradient(135deg, #174f3a, #23875c);
  border-color: #23875c;
  box-shadow: 0 6px 14px rgba(35, 135, 92, 0.19);
}

.commercial-context-navigation button.active strong,
.commercial-context-navigation button.active small {
  color: #fff;
}

.commercial-context-navigation button.active svg {
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
}

.admin-context-navigation {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  margin-bottom: 0;
}

.admin-context-navigation button {
  min-width: 160px;
  min-height: 58px;
}

.home-dashboard {
  display: grid;
  gap: 15px;
}

.dashboard-welcome {
  display: grid;
  grid-template-columns:
    minmax(360px, 1.4fr)
    repeat(3, minmax(190px, 0.58fr));
  gap: 13px;
}

.dashboard-welcome-copy,
.exchange-rate-card,
.weather-now-card,
.dashboard-system-card {
  min-width: 0;
  min-height: 168px;
  padding: 19px;
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.dashboard-welcome-copy {
  color: #fff;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 195, 73, 0.3), transparent 34%),
    linear-gradient(125deg, #153c67, #235d82 62%, #2d7964);
}

.dashboard-welcome-copy > span,
.dashboard-section-heading span {
  color: #f3bf4a;
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.dashboard-welcome-copy h1 {
  margin: 6px 0 4px;
  font-size: 21px;
}

.dashboard-welcome-copy h1 b {
  color: #ffe296;
}

.dashboard-welcome-copy p {
  margin: 0;
  color: #deebf3;
  line-height: 1.4;
}

.dashboard-welcome-copy blockquote {
  margin: 14px 0 0;
  padding: 9px 12px;
  color: #fff8df;
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid #f3bf4a;
  border-radius: 0 7px 7px 0;
  font-size: 9pt;
  line-height: 1.4;
}

.dashboard-welcome-copy cite {
  margin-top: 3px;
  display: block;
  color: #ffd875;
  font-size: 7.5pt;
  font-style: normal;
  font-weight: 800;
}

.exchange-rate-card {
  color: #164d3a;
  background:
    radial-gradient(circle at 100% 0, rgba(75, 190, 139, 0.23), transparent 42%),
    #f3fbf6;
  border: 1px solid #cfe7d8;
}

.exchange-rate-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #367a60;
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.exchange-rate-card header button {
  width: 36px;
  height: 36px;
  color: #23875c;
  background: #fff;
  border: 1px solid #cae2d3;
  border-radius: 50%;
  font-size: 16px;
}

.exchange-rate-card > strong {
  margin: 13px 0 5px;
  display: block;
  color: #123d30;
  font-size: 25px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.exchange-rate-card p {
  margin: 0 0 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #5c766c;
}

.exchange-rate-card p span.up {
  color: #b14d35;
}

.exchange-rate-card p span.down {
  color: #23875c;
}

.exchange-rate-card > small,
.exchange-rate-card p small {
  color: #6e837b;
  font-size: 7.3pt;
  line-height: 1.35;
}

.weather-now-card {
  color: #3d5961;
  background:
    radial-gradient(circle at 100% 0, rgba(126, 174, 184, 0.24), transparent 42%),
    #f3f9fa;
  border: 1px solid #cedfe2;
}

.weather-now-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #527b82;
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.weather-now-card header button {
  width: 36px;
  height: 36px;
  color: #527b82;
  background: #fff;
  border: 1px solid #cbdde0;
  border-radius: 50%;
}

.weather-now-value {
  margin: 10px 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather-now-value svg {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  fill: none;
  stroke: #5f8a91;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.weather-now-value strong {
  color: #344f56;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.weather-now-card p {
  margin: 0 0 7px;
  display: grid;
  gap: 2px;
}

.weather-now-card p span {
  color: #49686f;
  font-weight: 800;
}

.weather-now-card p small,
.weather-now-card > small {
  color: #6d858a;
  font-size: 7.3pt;
  line-height: 1.35;
}

.weather-now-card > small {
  display: block;
}

.dashboard-system-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  color: #6a5122;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 199, 75, 0.31), transparent 40%),
    #fffaf0;
  border: 1px solid #eadcbf;
}

.dashboard-system-card > strong {
  color: var(--navy);
  font-size: 12pt;
}

.dashboard-system-card > span {
  color: #7b6b4d;
  overflow-wrap: anywhere;
}

.dashboard-section {
  padding: 15px;
  background: #fff;
  border: 1px solid #dce4eb;
  border-radius: 12px;
  box-shadow: 0 7px 22px rgba(13, 39, 72, 0.06);
}

.dashboard-section-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-section-heading h2 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 14pt;
}

.dashboard-section-heading > small {
  color: var(--muted);
}

.op-status-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(125px, 1fr));
  gap: 9px;
}

.op-status-card {
  --status-accent: #74879b;
  min-width: 0;
  min-height: 86px;
  padding: 11px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto 1fr;
  gap: 5px 8px;
  background: color-mix(in srgb, var(--status-accent) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--status-accent) 24%, #fff);
  border-radius: 10px;
}

.op-status-card i {
  width: 30px;
  height: 30px;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--status-accent);
  border-radius: 8px;
  font-size: 7pt;
  font-style: normal;
  font-weight: 900;
}

.op-status-card span {
  min-width: 0;
  color: #536476;
  font-size: 8pt;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.op-status-card strong {
  color: var(--status-accent);
  font-size: 19px;
  line-height: 1;
}

.op-status-card.total { --status-accent: #234f7b; }
.op-status-card.aguardando { --status-accent: #d79125; }
.op-status-card.em-revisao { --status-accent: #8b63ae; }
.op-status-card.em-producao { --status-accent: #2e7a9a; }
.op-status-card.atrasado,
.op-status-card.bloqueado { --status-accent: #c55252; }
.op-status-card.pronto-pra-despacho { --status-accent: #4b8d70; }
.op-status-card.despachado { --status-accent: #3a74ba; }
.op-status-card.finalizado { --status-accent: #23875c; }
.op-status-card.cancelado { --status-accent: #7d8792; }

.dashboard-loading-card,
.dashboard-empty-card {
  min-height: 86px;
  padding: 18px;
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f6f8fb;
  border: 1px dashed #cad4de;
  border-radius: 10px;
  text-align: center;
}

.business-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 9px;
}

.kpi-card {
  --kpi-accent: #3676c5;
  min-width: 0;
  min-height: 105px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: color-mix(in srgb, var(--kpi-accent) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--kpi-accent) 19%, #fff);
  border-top: 4px solid var(--kpi-accent);
  border-radius: 9px;
}

.kpi-card.proposals { --kpi-accent: #d18a22; }
.kpi-card.wins { --kpi-accent: #23875c; }
.kpi-card.crm { --kpi-accent: #3676c5; }
.kpi-card.future-bi { --kpi-accent: #7655a6; }

.kpi-card span,
.kpi-card small {
  color: #607185;
  overflow-wrap: anywhere;
}

.kpi-card span {
  font-weight: 800;
}

.kpi-card strong {
  color: var(--kpi-accent);
  font-size: 21px;
}

.kpi-card small {
  margin-top: auto;
  font-size: 7.5pt;
}

.commercial-focused-form:not([hidden]) {
  grid-column: 1 / -1;
  width: min(100%, 980px);
}

.client-initial-contact {
  margin: 0 15px 15px;
  padding: 0;
  border: 1px solid #ccd8c8;
  border-radius: 10px;
  background: #f7faf5;
}

.client-initial-contact legend {
  margin-left: 14px;
  padding: 0 8px;
  color: #516348;
  font-weight: 800;
}

.client-initial-contact > p {
  margin: 10px 15px 0;
  color: var(--muted);
}

.client-initial-contact .workspace-form-grid {
  padding-top: 10px;
}

/* Mantém os cadastros existentes consultáveis sem empurrar o formulário de
   novo contato para fora da área de trabalho. */
.commercial-client-directory-scroll,
.commercial-contact-directory-scroll {
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.commercial-client-directory-scroll {
  max-height: clamp(230px, 34dvh, 360px);
}

.commercial-contact-directory-scroll {
  max-height: clamp(190px, 28dvh, 300px);
}

.commercial-client-directory-scroll thead th,
.commercial-contact-directory-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

/* A lista de vendas do Faturamento rola dentro do próprio cartão para manter
   o formulário de NF e as ações da venda selecionada visíveis logo abaixo. */
.billing-table-card .billing-records-scroll {
  height: auto;
  max-height: clamp(240px, 36dvh, 410px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.billing-records-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

.workspace-heading > div,
.records-card header > div,
.workspace-form header > div,
.module-copy,
.area-copy {
  min-width: 0;
}

.workspace-heading h1,
.workspace-heading p,
.records-card header strong,
.workspace-form header strong,
.module-copy strong,
.module-copy span,
.users-heading h1,
.users-heading p {
  overflow-wrap: anywhere;
}

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

  .dashboard-welcome-copy {
    grid-column: 1 / -1;
  }

  .dashboard-system-card {
    min-height: 100px;
    grid-column: 1 / -1;
  }

  .op-status-dashboard {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .business-kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .app-sidebar {
    width: 88px;
    padding: 12px 8px;
  }

  .sidebar-brand {
    min-height: 62px;
    padding: 0 0 12px;
    display: flex;
    justify-content: center;
  }

  .sidebar-brand > img:first-child {
    width: 46px;
    height: 46px;
  }

  .sidebar-brand > div,
  .sidebar-brand .sidebar-jm-logo,
  .sidebar-motivation,
  .sidebar-nav-item small,
  .sidebar-user-copy > div:last-child {
    display: none;
  }

  .sidebar-navigation {
    margin: 10px 0;
    padding: 0;
  }

  .sidebar-nav-item {
    min-height: 58px;
    padding: 6px 3px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    text-align: center;
  }

  .sidebar-nav-item strong {
    font-size: 8pt;
  }

  .sidebar-user-copy {
    display: flex;
    justify-content: center;
  }

  .sidebar-account > button {
    font-size: 0;
  }

  .sidebar-account > button svg {
    width: 22px;
    height: 22px;
  }

  .app-shell > .hero,
  .app-shell > .context-navigation,
  .app-shell > main,
  .app-shell > footer {
    margin-left: 88px;
  }

  .context-navigation {
    padding-right: 12px;
    padding-left: 12px;
  }

  .commercial-context-navigation,
  .admin-context-navigation {
    display: flex;
  }
}

@media (max-width: 600px) {
  .app-shell {
    height: 100dvh;
    padding-bottom: 72px;
  }

  .app-sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 72px;
    padding: 5px 6px;
    flex-direction: row;
    border-top: 1px solid #d8e1e8;
    border-right: 0;
    box-shadow: 0 -7px 22px rgba(13, 39, 72, 0.12);
  }

  .sidebar-brand {
    display: none;
  }

  .sidebar-motivation {
    display: none;
  }

  .sidebar-navigation {
    min-width: 0;
    height: 62px;
    margin: 0;
    padding: 0 2px;
    flex: 1;
    flex-direction: row;
    gap: 3px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sidebar-nav-item {
    width: 72px;
    min-width: 72px;
    min-height: 58px;
    padding: 5px 3px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    text-align: center;
    scroll-snap-align: start;
  }

  .sidebar-nav-item svg {
    width: 22px;
    height: 22px;
  }

  .sidebar-nav-item strong {
    font-size: 8pt;
  }

  .sidebar-nav-item small {
    display: none;
  }

  .sidebar-account {
    min-width: 82px;
    padding: 0 0 0 5px;
    display: grid;
    grid-template-columns: 36px 42px;
    align-items: center;
    gap: 3px;
    border-top: 0;
    border-left: 1px solid #e1e7ed;
  }

  .sidebar-user-copy {
    min-height: 0;
    display: block;
  }

  .sidebar-user-copy .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 9pt;
  }

  .sidebar-user-copy > div:last-child {
    display: none;
  }

  .sidebar-account > button {
    width: 42px;
    min-width: 42px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    font-size: 0;
  }

  .sidebar-account > button svg {
    width: 21px;
    height: 21px;
  }

  .app-shell > .hero,
  .app-shell > .context-navigation,
  .app-shell > main,
  .app-shell > footer {
    margin-left: 0;
  }

  .app-shell > .hero {
    min-height: 68px;
    padding: 10px 12px;
  }

  .context-navigation {
    min-height: 68px;
    padding: 6px 8px;
  }

  .commercial-context-navigation,
  .admin-context-navigation {
    display: flex;
  }

  .commercial-context-navigation button,
  .admin-context-navigation button {
    min-width: 146px;
    min-height: 54px;
  }

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

  .dashboard-welcome-copy,
  .exchange-rate-card,
  .weather-now-card,
  .dashboard-system-card {
    min-height: 0;
    padding: 15px;
  }

  .dashboard-system-card {
    grid-column: auto;
  }

  .dashboard-welcome-copy h1 {
    font-size: 18px;
  }

  .op-status-dashboard,
  .business-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-section {
    padding: 12px;
  }

  .dashboard-section-heading {
    align-items: start;
    flex-direction: column;
  }

  .toast {
    bottom: 116px;
  }
}

@media print {
  html,
  body {
    width: auto;
    height: auto;
    overflow: visible;
    background: #fff;
  }

  body.printing-proposal #app-shell,
  body.printing-proposal #auth-gate,
  body.printing-proposal #toast {
    display: none !important;
  }

body.printing-proposal .proposal-print {
    display: block !important;
  }
}

@media (max-width: 1250px) {
  .finance-bank-registration-layout { grid-template-columns: 1fr; }
  .finance-bank-profile-list { position: static; }
  .finance-bank-profile-list .workspace-table-scroll { max-height: 360px; }
  .financial-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .financial-tabs { grid-template-columns: 1fr 1fr; }
  .finance-billing-intro { align-items: stretch; flex-direction: column; }
  .finance-bank-profile-form .workspace-form-grid { grid-template-columns: 1fr; }
  .finance-bank-profile-form .workspace-form-grid .span-two { grid-column: auto; }
  .finance-bank-profile-form fieldset { padding-inline: 12px; }
  .finance-bank-security-note,
  .finance-bank-profile-form > .button.save { margin-inline: 12px; }
}

/* BI por setor — painel enxuto para gestão à vista e TVs da produção. */
.bi-view {
  min-width: 0;
  min-height: 0;
  padding: 24px 28px 86px;
  display: grid;
  align-content: start;
  gap: 18px;
  overflow: auto;
  background:
    radial-gradient(circle at 96% 0%, rgba(208, 180, 103, 0.18), transparent 27%),
    #f3f5ef;
}

.bi-view[hidden],
.bi-view [hidden] {
  display: none !important;
}

.bi-toolbar,
.bi-sector-picker-panel,
.bi-settings-panel,
.bi-deadline-board {
  min-width: 0;
  background: #fff;
  border: 1px solid #d8dfd2;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(64, 82, 57, 0.08);
}

.bi-toolbar {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-top: 5px solid #738769;
}

.bi-tv-branding,
.bi-tv-title,
.bi-tv-signature,
.bi-kpi-mascot {
  display: none;
}

.bi-heading-copy {
  min-width: 220px;
}

.bi-heading-copy > span,
.bi-settings-panel header span,
.bi-deadline-board > header > div:first-child span {
  color: #b57e14;
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.bi-heading-copy h1 {
  margin: 4px 0;
  color: #3e503b;
  font-size: clamp(24px, 2.2vw, 38px);
  line-height: 1.05;
}

.bi-heading-copy p {
  margin: 0;
  color: #6f7b6c;
}

.bi-toolbar-actions {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.bi-toolbar-actions > label {
  min-width: 220px;
  display: grid;
  gap: 4px;
}

.bi-toolbar-actions > label > span {
  color: #62705f;
  font-size: 8pt;
  font-weight: 800;
  text-transform: uppercase;
}

.bi-sector-picker-panel {
  padding: 16px 18px;
  border-top: 4px solid #d0b467;
}

.bi-sector-picker-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.bi-sector-picker-panel > header span {
  display: block;
  color: #b57e14;
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.bi-sector-picker-panel > header strong {
  margin-top: 3px;
  display: block;
  color: #40503d;
  font-size: 12pt;
}

.bi-sector-picker-panel > header small {
  color: #788476;
}

.bi-sector-picker-options {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 9px;
}

.bi-sector-picker-option {
  min-height: 52px;
  padding: 9px 13px;
  color: #40503d;
  background: #f5f7f2;
  border: 1px solid #ccd7c7;
  border-radius: 11px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.bi-sector-picker-option:hover,
.bi-sector-picker-option:focus-visible,
.bi-sector-picker-option.active {
  color: #fff;
  background: #687d60;
  border-color: #687d60;
  box-shadow: 0 5px 14px rgba(67, 87, 60, 0.2);
}

.bi-toolbar-actions select,
.bi-period-selector button,
.bi-toolbar-actions > .button {
  min-height: 46px;
  border-radius: 10px;
}

.bi-period-selector {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: #edf1e9;
  border: 1px solid #d6dfd0;
  border-radius: 12px;
}

.bi-period-selector button {
  min-width: 82px;
  padding: 0 14px;
  color: #51614e;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.bi-period-selector button.active {
  color: #fff;
  background: #687d60;
  box-shadow: 0 4px 12px rgba(67, 87, 60, 0.18);
}

.bi-settings-panel {
  padding: 17px 20px;
}

.bi-settings-panel > header,
.bi-deadline-board > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bi-settings-panel header strong,
.bi-deadline-board > header strong {
  margin-top: 3px;
  display: block;
  color: #40503d;
  font-size: 12pt;
}

.bi-settings-panel header small {
  color: #788476;
}

.bi-widget-options {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 9px;
}

.bi-widget-options label {
  min-height: 48px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #445541;
  background: #f5f7f2;
  border: 1px solid #d8dfd2;
  border-radius: 10px;
  font-weight: 700;
}

.bi-widget-options input {
  width: 20px;
  height: 20px;
  accent-color: #657b5d;
}

.bi-shared-department-settings {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dce3d7;
}

.bi-shared-department-settings > div:first-child span {
  display: block;
  color: #b57e14;
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.bi-shared-department-settings > div:first-child strong {
  margin-top: 3px;
  display: block;
  color: #40503d;
}

.bi-shared-department-options {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.bi-shared-department-options label {
  min-height: 46px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #445541;
  background: #f5f7f2;
  border: 1px solid #d8dfd2;
  border-radius: 10px;
  font-weight: 750;
}

.bi-shared-department-options input {
  width: 20px;
  height: 20px;
  accent-color: #657b5d;
}

.bi-kpi-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.bi-commercial-dashboard {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.bi-commercial-dashboard .bi-kpi-card {
  min-height: 230px;
}

.bi-kpi-card {
  min-width: 0;
  min-height: 190px;
  padding: 20px 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  color: #fff;
  background: #61765a;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  box-shadow: 0 15px 36px rgba(55, 72, 50, 0.14);
  overflow: hidden;
}

.bi-kpi-card.pending { background: linear-gradient(145deg, #89752f, #b0912f); }
.bi-kpi-card.completed { background: linear-gradient(145deg, #277555, #3e9470); }
.bi-kpi-card.total { background: linear-gradient(145deg, #526c80, #6f899d); }
.bi-kpi-card.late { background: linear-gradient(145deg, #d7182a, #ff4438); }
.bi-kpi-card.late.attention {
  background: linear-gradient(145deg, #c90f24, #ff382f);
  animation: bi-alert-pulse 1.25s ease-in-out infinite;
}

.bi-kpi-card > span {
  font-size: clamp(13px, 1.2vw, 19px);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bi-kpi-card > strong {
  font-size: clamp(64px, 6vw, 104px);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.bi-kpi-card > small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 10pt;
  font-weight: 700;
}

@keyframes bi-alert-pulse {
  0%, 100% { box-shadow: 0 15px 36px rgba(201, 15, 36, 0.3); filter: saturate(1); }
  50% { box-shadow: 0 0 0 8px rgba(255, 56, 47, 0.2), 0 18px 46px rgba(201, 15, 36, 0.55); filter: saturate(1.25); }
}

.bi-deadline-board {
  overflow: hidden;
}

.bi-deadline-board > header {
  min-height: 70px;
  padding: 15px 20px;
  border-bottom: 1px solid #dce3d7;
}

.bi-live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #657362;
  font-weight: 700;
}

.bi-live-status i {
  width: 10px;
  height: 10px;
  background: #2c9569;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(44, 149, 105, 0.12);
}

.bi-table-scroll {
  max-height: min(42vh, 430px);
  overflow: auto;
}

.bi-deadline-board table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.bi-deadline-board th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 16px;
  color: #fff;
  background: #65795e;
  font-size: 8pt;
  letter-spacing: 0.07em;
  text-align: left;
}

.bi-deadline-board th:nth-child(1) { width: 14%; }
.bi-deadline-board th:nth-child(2) { width: 25%; }
.bi-deadline-board th:nth-child(3) { width: 29%; }
.bi-deadline-board th:nth-child(4) { width: 14%; }
.bi-deadline-board th:nth-child(5) { width: 18%; }

.bi-deadline-board td {
  padding: 13px 16px;
  color: #354332;
  border-bottom: 1px solid #e2e7de;
  font-size: 10pt;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.bi-deadline-board .bi-op-cell {
  color: #3f553b;
  font-size: 12pt;
  font-weight: 900;
}

.bi-deadline-board .bi-date-cell {
  font-variant-numeric: tabular-nums;
}

.bi-deadline-board .bi-status-cell {
  color: #465c42;
  font-weight: 800;
}

.bi-row-late td { background: #fff0ef; }
.bi-row-pending td { background: #fffdf4; }
.bi-row-completed td { background: #f0faf5; }

.bi-empty-state {
  min-height: 150px;
  padding: 24px;
  display: grid;
  place-content: center;
  gap: 5px;
  color: #50604d;
  text-align: center;
}

.bi-empty-state span { color: #7d897a; }

.bi-executive-dashboard {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 2px;
}

.bi-shared-dashboard {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  align-items: start;
  gap: 16px;
}

.bi-shared-sector {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8dfd2;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(64, 82, 57, 0.08);
}

.bi-shared-sector > header {
  min-height: 68px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #3e503b;
  background: #f2f5ef;
  border-bottom: 3px solid #d0b467;
}

.bi-shared-sector > header span {
  display: block;
  color: #a97512;
  font-size: 7pt;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.bi-shared-sector > header strong {
  margin-top: 3px;
  display: block;
  font-size: 15pt;
}

.bi-shared-sector > header small {
  flex: 0 0 auto;
  color: #687664;
  font-weight: 800;
}

.bi-shared-metrics {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.bi-shared-metric {
  min-width: 0;
  min-height: 72px;
  padding: 9px 11px;
  display: grid;
  align-content: center;
  gap: 2px;
  background: #f8f9f7;
  border: 1px solid #dce3d7;
  border-left: 5px solid #82917c;
  border-radius: 11px;
}

.bi-shared-metric > span {
  color: #687664;
  font-size: 7pt;
  font-weight: 850;
  text-transform: uppercase;
}

.bi-shared-metric > strong {
  color: #354532;
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.bi-shared-metric.pending { border-left-color: #c39828; }
.bi-shared-metric.late { border-left-color: #d0362b; }
.bi-shared-metric.completed { border-left-color: #2f8b65; }
.bi-shared-metric.total { border-left-color: #567b9b; }
.bi-shared-metric.late.attention {
  color: #fff;
  background: linear-gradient(145deg, #d7182a, #ff4438);
  border-color: #c90f24;
  border-left-color: #c90f24;
  animation: bi-alert-pulse 1.25s ease-in-out infinite;
}

.bi-shared-metric.late.attention > span,
.bi-shared-metric.late.attention > strong { color: #fff; }

.bi-shared-op-list {
  margin: 0 12px 12px;
  overflow: hidden;
  border: 1px solid #dce3d7;
  border-radius: 11px;
}

.bi-shared-op-row {
  min-height: 42px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: minmax(70px, 0.65fr) minmax(150px, 1.7fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr);
  align-items: center;
  gap: 9px;
  color: #465442;
  border-bottom: 1px solid #e1e6dd;
}

.bi-shared-op-row:last-child { border-bottom: 0; }
.bi-shared-op-row.heading {
  min-height: 34px;
  color: #fff;
  background: #71816a;
  font-size: 7pt;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.bi-shared-op-row > span { min-width: 0; overflow-wrap: anywhere; }
.bi-shared-op-row.late { color: #9d241d; background: #fff2f1; }
.bi-shared-op-row.pending { background: #fffdf4; }
.bi-shared-op-row.completed { color: #246b4e; background: #f0faf5; }
.bi-shared-op-row > span:first-child { font-weight: 900; }

.bi-shared-empty {
  margin: 0;
  padding: 24px;
  color: #768373;
  text-align: center;
  font-weight: 700;
}

.bi-executive-section {
  --bi-section-accent: #74876c;
  --bi-section-soft: #f1f5ef;
  --bi-section-strong: #4a6045;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(150deg, #fff 0%, var(--bi-section-soft) 165%);
  border: 1px solid color-mix(in srgb, var(--bi-section-accent) 28%, #fff);
  border-radius: 22px;
  box-shadow: 0 16px 42px color-mix(in srgb, var(--bi-section-accent) 15%, transparent);
}

.bi-executive-section[data-bi-executive-widget="production"] {
  --bi-section-accent: #5f7f91;
  --bi-section-soft: #edf5f8;
  --bi-section-strong: #385b6e;
  grid-column: 1 / -1;
}

.bi-executive-section[data-bi-executive-widget="commercial"] {
  --bi-section-accent: #b9862e;
  --bi-section-soft: #fff7e7;
  --bi-section-strong: #7d5717;
}

.bi-executive-section[data-bi-executive-widget="finance"] {
  --bi-section-accent: #718087;
  --bi-section-soft: #f1f4f5;
  --bi-section-strong: #485960;
}

.bi-executive-section > header {
  min-height: 78px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 92% -25%, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(120deg, var(--bi-section-strong), var(--bi-section-accent));
  border-bottom: 4px solid color-mix(in srgb, var(--bi-section-accent) 62%, #f2c85b);
}

.bi-executive-section > header span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.bi-executive-section > header strong {
  margin-top: 3px;
  display: block;
  font-size: clamp(14pt, 1.45vw, 19pt);
}

.bi-executive-section > header small {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  font-weight: 800;
}

.bi-executive-production-summary,
.bi-commercial-kpis,
.bi-finance-kpis {
  padding: 13px;
  display: grid;
  gap: 10px;
}

.bi-executive-production-summary,
.bi-finance-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.bi-mini-kpi {
  min-width: 0;
  min-height: 108px;
  padding: 13px 15px;
  display: grid;
  align-content: center;
  gap: 5px;
  color: #40503d;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dce3d7;
  border-left: 6px solid #82917c;
  border-radius: 16px;
  box-shadow: 0 7px 18px rgba(55, 72, 50, 0.055);
}

.bi-mini-kpi > span {
  color: #647260;
  font-size: 8pt;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bi-mini-kpi > strong {
  color: #354532;
  font-size: clamp(28px, 2.6vw, 46px);
  line-height: 1;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.bi-mini-kpi > small {
  color: #778374;
  font-weight: 700;
}

.bi-mini-kpi.pending,
.bi-mini-kpi.commercial-pending { border-left-color: #c39828; }
.bi-mini-kpi.completed,
.bi-mini-kpi.commercial-won,
.bi-mini-kpi.receivable { border-left-color: #2f8b65; }
.bi-mini-kpi.payable { border-left-color: #c95b52; }
.bi-mini-kpi.commercial-lost { border-left-color: #c95b52; }
.bi-mini-kpi.balance { border-left-color: #567b9b; }
.bi-mini-kpi.late { border-left-color: #d0362b; }

.bi-mini-kpi.late.attention {
  color: #fff;
  background: linear-gradient(145deg, #d7182a, #ff4438);
  border-color: #c90f24;
  border-left-color: #c90f24;
  animation: bi-alert-pulse 1.25s ease-in-out infinite;
}

.bi-mini-kpi.late.attention > span,
.bi-mini-kpi.late.attention > strong,
.bi-mini-kpi.late.attention > small { color: #fff; }

.bi-department-matrix {
  padding: 0 13px 13px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bi-department-row {
  min-width: 0;
  min-height: 58px;
  padding: 8px 11px;
  display: grid;
  grid-template-columns: minmax(150px, 1.6fr) repeat(3, minmax(62px, 0.55fr));
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d9e1e5;
  border-radius: 14px;
  box-shadow: 0 5px 14px rgba(49, 71, 80, 0.05);
}

.bi-department-row > strong {
  min-width: 0;
  color: #3f4f3c;
  font-size: 9pt;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.bi-department-row > span {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #4a5947;
  font-variant-numeric: tabular-nums;
  padding: 6px 4px;
  border-radius: 9px;
}

.bi-department-row > span small {
  color: #7b8678;
  font-size: 6.8pt;
  font-weight: 750;
}

.bi-department-row > span b { font-size: 13pt; }
.bi-department-row > span.pending { background: #fff5d8; }
.bi-department-row > span.pending b { color: #986c0d; }
.bi-department-row > span.late { background: #ffe3e4; }
.bi-department-row > span.late b { color: #d00c24; }
.bi-department-row > span.completed { background: #e5f7ee; }
.bi-department-row > span.completed b { color: #237553; }

.bi-department-row.attention {
  background: #fffafa;
  border-color: #f1a3a8;
  box-shadow: 0 7px 20px rgba(201, 15, 36, 0.1);
}

#bi-expected-balance.negative { color: #b42318; }

/* O usuário pode alternar entre leitura clean e caixas de alto contraste. */
.bi-view[data-bi-visual="clean"] .bi-kpi-card {
  color: #3e503b;
  background: #fff;
  border-color: #d8dfd2;
  border-left: 7px solid #7f9078;
  box-shadow: 0 10px 28px rgba(64, 82, 57, 0.08);
}

.bi-view[data-bi-visual="clean"] .bi-kpi-card.pending { border-left-color: #c39828; }
.bi-view[data-bi-visual="clean"] .bi-kpi-card.completed { border-left-color: #2f8b65; }
.bi-view[data-bi-visual="clean"] .bi-kpi-card.total { border-left-color: #567b9b; }
.bi-view[data-bi-visual="clean"] .bi-kpi-card.late { border-left-color: #d0362b; }
.bi-view[data-bi-visual="clean"] .bi-kpi-card.late.attention {
  color: #fff;
  background: linear-gradient(145deg, #d7182a, #ff4438);
  border-color: #c90f24;
}
.bi-view[data-bi-visual="clean"] .bi-kpi-card.late.attention > strong,
.bi-view[data-bi-visual="clean"] .bi-kpi-card.late.attention > small { color: #fff; }
.bi-view[data-bi-visual="clean"] .bi-kpi-card > strong { color: #354532; }
.bi-view[data-bi-visual="clean"] .bi-kpi-card > small { color: #778374; }

.bi-view[data-bi-visual="color"] .bi-shared-metric,
.bi-view[data-bi-visual="color"] .bi-mini-kpi {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
  border-left: 0;
  box-shadow: 0 9px 22px rgba(55, 72, 50, 0.13);
}

.bi-view[data-bi-visual="color"] .bi-shared-metric > span,
.bi-view[data-bi-visual="color"] .bi-shared-metric > strong,
.bi-view[data-bi-visual="color"] .bi-mini-kpi > span,
.bi-view[data-bi-visual="color"] .bi-mini-kpi > strong,
.bi-view[data-bi-visual="color"] .bi-mini-kpi > small {
  color: #fff;
}

.bi-view[data-bi-visual="color"] .bi-shared-metric.pending,
.bi-view[data-bi-visual="color"] .bi-mini-kpi.pending,
.bi-view[data-bi-visual="color"] .bi-mini-kpi.commercial-pending {
  background: linear-gradient(145deg, #a38220, #c5a442);
}

.bi-view[data-bi-visual="color"] .bi-mini-kpi.commercial-pending {
  background: linear-gradient(145deg, #a56718, #e09b2f);
}

.bi-view[data-bi-visual="color"] .bi-shared-metric.late,
.bi-view[data-bi-visual="color"] .bi-mini-kpi.late,
.bi-view[data-bi-visual="color"] .bi-mini-kpi.commercial-lost,
.bi-view[data-bi-visual="color"] .bi-mini-kpi.payable {
  background: linear-gradient(145deg, #d7182a, #ff4438);
}

.bi-view[data-bi-visual="color"] .bi-mini-kpi.payable {
  background: linear-gradient(145deg, #ba3157, #ec5378);
}

.bi-view[data-bi-visual="color"] .bi-shared-metric.completed,
.bi-view[data-bi-visual="color"] .bi-mini-kpi.completed,
.bi-view[data-bi-visual="color"] .bi-mini-kpi.commercial-won,
.bi-view[data-bi-visual="color"] .bi-mini-kpi.receivable {
  background: linear-gradient(145deg, #277555, #3e9470);
}

.bi-view[data-bi-visual="color"] .bi-mini-kpi.receivable {
  background: linear-gradient(145deg, #087a82, #21a6a8);
}

.bi-view[data-bi-visual="color"] .bi-shared-metric.total,
.bi-view[data-bi-visual="color"] .bi-mini-kpi.balance {
  background: linear-gradient(145deg, #536c78, #7c9098);
}

.bi-view[data-bi-visual="color"] .bi-department-row > span.pending {
  color: #fff;
  background: linear-gradient(145deg, #a38220, #c5a442);
}

.bi-view[data-bi-visual="color"] .bi-department-row > span.late {
  color: #fff;
  background: linear-gradient(145deg, #d7182a, #ff4438);
}

.bi-view[data-bi-visual="color"] .bi-department-row > span.completed {
  color: #fff;
  background: linear-gradient(145deg, #277555, #3e9470);
}

.bi-view[data-bi-visual="color"] .bi-department-row > span small,
.bi-view[data-bi-visual="color"] .bi-department-row > span b { color: #fff; }

body.bi-tv-mode {
  overflow: hidden;
  background: #edf1e9;
}

body.bi-tv-mode .app-sidebar,
body.bi-tv-mode .app-shell > .hero,
body.bi-tv-mode .app-shell > .context-navigation,
body.bi-tv-mode .app-shell > footer,
body.bi-tv-mode .bi-sector-picker-panel,
body.bi-tv-mode #toast {
  display: none !important;
}

body.bi-tv-mode .bi-view {
  position: fixed;
  inset: 0;
  z-index: 2400;
  width: 100vw;
  height: 100vh;
  margin: 0 !important;
  padding: 14px 20px;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 5%, rgba(208, 180, 103, 0.13), transparent 25%),
    #edf1e9;
}

body.bi-tv-mode .bi-toolbar {
  position: relative;
  min-height: 82px;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: minmax(185px, 1fr) minmax(260px, auto) minmax(185px, 1fr);
  align-items: center;
  gap: 14px;
  color: #3e503b;
  background: rgba(255, 255, 255, 0.96);
  border-color: #d0b467;
  box-shadow: 0 10px 28px rgba(64, 82, 57, 0.09);
}

body.bi-tv-mode .bi-heading-copy {
  display: none;
}

body.bi-tv-mode .bi-tv-branding {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-self: start;
}

body.bi-tv-mode .bi-tv-company-logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid rgba(208, 180, 103, 0.72);
  border-radius: 13px;
  box-shadow: 0 5px 16px rgba(46, 60, 42, 0.14);
}

body.bi-tv-mode .bi-tv-title {
  min-width: 0;
  margin: 0;
  display: block;
  justify-self: center;
  color: #3e503b;
  font-size: clamp(28px, 3.2vw, 52px);
  line-height: 1;
  text-align: center;
  text-wrap: balance;
}

body.bi-tv-mode .bi-tv-signature {
  position: relative;
  width: auto;
  height: 58px;
  aspect-ratio: 2.52;
  display: grid;
  place-items: center;
  justify-self: end;
  overflow: hidden;
  opacity: 0.7;
}

body.bi-tv-mode .bi-tv-signature img {
  position: absolute;
  top: -38.5%;
  left: -12.8%;
  width: 120.9%;
  height: 180.8%;
  object-fit: fill;
  filter: brightness(0) saturate(100%) invert(27%) sepia(16%) saturate(713%) hue-rotate(61deg) brightness(92%) contrast(88%);
}

body.bi-tv-mode .bi-toolbar-actions {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 2600;
  display: block !important;
}

body.bi-tv-mode .bi-toolbar-actions > :not(#bi-tv-toggle) {
  display: none !important;
}

body.bi-tv-mode .bi-toolbar-actions #bi-tv-toggle {
  min-width: 132px;
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(62, 80, 59, 0.94);
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 24px rgba(38, 53, 35, 0.24);
  opacity: 0.82;
}

body.bi-tv-mode .bi-toolbar-actions #bi-tv-toggle:hover,
body.bi-tv-mode .bi-toolbar-actions #bi-tv-toggle:focus-visible {
  opacity: 1;
}

body.bi-tv-mode #bi-settings-toggle {
  display: none;
}

body.bi-tv-mode .bi-kpi-card {
  position: relative;
  min-height: clamp(270px, 31vh, 340px);
  justify-items: center;
  text-align: center;
  color: #3e503b;
  background: #fff !important;
  border-color: #d8dfd2;
  border-left: 7px solid #7f9078;
  box-shadow: 0 10px 28px rgba(64, 82, 57, 0.08);
}

body.bi-tv-mode .bi-kpi-card:is(.pending, .late, .completed) .bi-kpi-mascot {
  position: absolute;
  bottom: 12px;
  left: 16px;
  z-index: 1;
  width: auto;
  max-height: calc(100% - 64px);
  height: clamp(118px, 11vw, 168px);
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 7px 7px rgba(42, 55, 39, 0.16));
  pointer-events: none;
}

body.bi-tv-mode .bi-kpi-card:is(.pending, .late, .completed) > span,
body.bi-tv-mode .bi-kpi-card:is(.pending, .late, .completed) > strong,
body.bi-tv-mode .bi-kpi-card:is(.pending, .late, .completed) > small {
  position: relative;
  z-index: 2;
}

body.bi-tv-mode .bi-kpi-card:is(.pending, .late, .completed) > strong,
body.bi-tv-mode .bi-kpi-card:is(.pending, .late, .completed) > span {
  width: 100%;
  margin-left: 0;
  text-align: center;
}

body.bi-tv-mode .bi-kpi-card:is(.pending, .late, .completed) > small {
  margin-left: clamp(122px, 11vw, 164px);
}

body.bi-tv-mode .bi-kpi-card.pending {
  border-left-color: #c39828;
}
body.bi-tv-mode .bi-kpi-card.completed {
  border-left-color: #2f8b65;
}
body.bi-tv-mode .bi-kpi-card.total {
  border-left-color: #567b9b;
}
body.bi-tv-mode .bi-kpi-card.late {
  border-left-color: #d7182a;
}
body.bi-tv-mode .bi-kpi-card.late.attention {
  color: #fff;
  background: linear-gradient(145deg, #d7182a, #ff4438) !important;
  border-color: #c90f24;
}

body.bi-tv-mode .bi-kpi-card > strong { color: #354532; }
body.bi-tv-mode .bi-kpi-card > small { color: #778374; }
body.bi-tv-mode .bi-kpi-card.late.attention > strong,
body.bi-tv-mode .bi-kpi-card.late.attention > small { color: #fff; }

body.bi-tv-mode .bi-kpi-card > strong {
  font-size: clamp(82px, 10vh, 148px);
}

body.bi-tv-mode .bi-commercial-dashboard {
  align-self: center;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.bi-tv-mode .bi-commercial-dashboard .bi-kpi-card {
  min-height: clamp(330px, 48vh, 510px);
}

body.bi-tv-mode .bi-deadline-board {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

body.bi-tv-mode .bi-table-scroll {
  max-height: none;
}

body.bi-tv-mode .bi-deadline-board th,
body.bi-tv-mode .bi-deadline-board td {
  padding: 9px 10px;
  font-size: clamp(11px, 0.85vw, 15px);
  line-height: 1.15;
}

body.bi-tv-mode .bi-deadline-board .bi-op-cell {
  font-size: clamp(13px, 1vw, 18px);
}

body.bi-tv-mode .bi-executive-dashboard {
  min-height: 0;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  grid-template-rows: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 10px;
  overflow: hidden;
  scrollbar-color: #809078 #293929;
}

body.bi-tv-mode .bi-shared-dashboard {
  min-height: 0;
  overflow: auto;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  scrollbar-color: #82917c #edf1e9;
}

body.bi-tv-mode .bi-shared-sector {
  box-shadow: none;
}

body.bi-tv-mode .bi-shared-sector > header {
  min-height: 58px;
  padding-block: 9px;
}

body.bi-tv-mode .bi-shared-metric { min-height: 62px; }
body.bi-tv-mode .bi-shared-metric:is(.pending, .late, .completed) {
  position: relative;
  padding-left: 62px;
  overflow: hidden;
}

body.bi-tv-mode .bi-shared-metric:is(.pending, .late, .completed) .bi-kpi-mascot {
  position: absolute;
  bottom: 2px;
  left: 8px;
  width: auto;
  height: 56px;
  max-height: calc(100% - 4px);
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgba(42, 55, 39, 0.13));
  pointer-events: none;
}

body.bi-tv-mode .bi-shared-op-row {
  min-height: 30px;
  padding: 4px 8px;
  gap: 6px;
  font-size: clamp(10px, 0.75vw, 14px);
  line-height: 1.1;
}

body.bi-tv-mode .bi-shared-op-row.heading {
  min-height: 27px;
  font-size: clamp(9px, 0.62vw, 12px);
}

body.bi-tv-mode .bi-executive-section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  box-shadow: none;
  border-color: #d4ddd0;
}

body.bi-tv-mode .bi-executive-section[data-bi-executive-widget="production"] {
  grid-template-rows: auto auto minmax(0, 1fr);
}

body.bi-tv-mode .bi-executive-section > header {
  position: relative;
  min-height: 62px;
  padding: 10px 18px;
  justify-content: center;
  color: #fff;
  background:
    radial-gradient(circle at 92% -25%, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(120deg, var(--bi-section-strong), var(--bi-section-accent));
  border-bottom-color: color-mix(in srgb, var(--bi-section-accent) 62%, #f2c85b);
}

body.bi-tv-mode .bi-executive-section > header > div {
  min-width: 0;
  flex: 1 1 auto;
  padding-inline: 92px;
  text-align: center;
}

body.bi-tv-mode .bi-executive-section > header > small {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

body.bi-tv-mode .bi-executive-section > header span { color: rgba(255, 255, 255, 0.78); }
body.bi-tv-mode .bi-executive-section > header small {
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.34);
}

body.bi-tv-mode .bi-view[data-bi-visual="color"] .bi-executive-section > header {
  color: #fff;
  background:
    radial-gradient(circle at 92% -25%, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(120deg, var(--bi-section-strong), var(--bi-section-accent));
}

body.bi-tv-mode .bi-view[data-bi-visual="color"] .bi-executive-section > header span { color: rgba(255, 255, 255, 0.78); }
body.bi-tv-mode .bi-view[data-bi-visual="color"] .bi-executive-section > header small {
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.34);
}

body.bi-tv-mode .bi-mini-kpi > strong {
  font-size: clamp(28px, 3.3vh, 52px);
}

body.bi-tv-mode .bi-mini-kpi {
  justify-items: center;
  text-align: center;
}

body.bi-tv-mode .bi-executive-production-summary {
  padding: 6px 10px;
}

body.bi-tv-mode .bi-executive-production-summary .bi-mini-kpi {
  min-height: 82px;
  padding: 8px 14px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

body.bi-tv-mode .bi-executive-production-summary .bi-mini-kpi:is(.pending, .late, .completed) {
  position: relative;
  padding-inline: 116px;
  overflow: hidden;
}

body.bi-tv-mode .bi-executive-production-summary .bi-mini-kpi:is(.pending, .late, .completed) .bi-kpi-mascot {
  position: absolute;
  bottom: 2px;
  left: 10px;
  width: auto;
  max-height: calc(100% - 4px);
  height: 78px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(42, 55, 39, 0.14));
  pointer-events: none;
}

body.bi-tv-mode .bi-executive-production-summary .bi-mini-kpi > strong {
  font-size: clamp(25px, 3vh, 42px);
}

body.bi-tv-mode .bi-department-matrix {
  min-height: 0;
  padding: 0 10px 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(54px, 1fr);
  gap: 6px;
  overflow: hidden;
}

body.bi-tv-mode .bi-department-row {
  min-height: 0;
  padding: 4px 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px 7px;
}

body.bi-tv-mode .bi-department-row > strong {
  grid-column: 1 / -1;
  text-align: center;
}

body.bi-tv-mode .bi-department-row > strong,
body.bi-tv-mode .bi-department-row > span b {
  font-size: clamp(12px, 0.95vw, 18px);
}

body.bi-tv-mode .bi-commercial-kpis,
body.bi-tv-mode .bi-finance-kpis {
  min-height: 0;
  padding: 10px;
}

body.bi-tv-mode .bi-commercial-kpis .bi-mini-kpi,
body.bi-tv-mode .bi-finance-kpis .bi-mini-kpi {
  min-height: 0;
  padding: 10px 13px;
}

body.bi-tv-mode .bi-finance-kpis .bi-mini-kpi > strong {
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: clamp(24px, 2.3vw, 42px);
}

body.bi-tv-mode .bi-view[data-bi-visual="color"] .bi-kpi-card.pending {
  color: #fff;
  background: linear-gradient(145deg, #a38220, #c5a442) !important;
  border-left: 0;
}

body.bi-tv-mode .bi-view[data-bi-visual="color"] .bi-kpi-card.late {
  color: #fff;
  background: linear-gradient(145deg, #d7182a, #ff4438) !important;
  border-left: 0;
}

body.bi-tv-mode .bi-view[data-bi-visual="color"] .bi-kpi-card.completed {
  color: #fff;
  background: linear-gradient(145deg, #277555, #3e9470) !important;
  border-left: 0;
}

body.bi-tv-mode .bi-view[data-bi-visual="color"] .bi-kpi-card.total {
  color: #fff;
  background: linear-gradient(145deg, #536c78, #7c9098) !important;
  border-left: 0;
}

body.bi-tv-mode .bi-view[data-bi-visual="color"] .bi-kpi-card > strong,
body.bi-tv-mode .bi-view[data-bi-visual="color"] .bi-kpi-card > small {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .bi-kpi-card.late.attention,
  .bi-mini-kpi.late.attention,
  .bi-shared-metric.late.attention { animation: none; }
}

@media (max-width: 1100px) {
  .bi-toolbar { align-items: stretch; flex-direction: column; }
  .bi-toolbar-actions { justify-content: flex-start; }
  .bi-widget-options { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .bi-executive-dashboard { grid-template-columns: 1fr; }
  .bi-shared-dashboard { grid-template-columns: 1fr; }
  .bi-executive-section[data-bi-executive-widget="production"] { grid-column: auto; }
  .bi-department-matrix { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body.bi-tv-mode .bi-toolbar {
    grid-template-columns: minmax(120px, 1fr) minmax(220px, auto) minmax(110px, 1fr);
  }
  body.bi-tv-mode .bi-tv-company-logo { width: 50px; height: 50px; }
  body.bi-tv-mode .bi-tv-signature { width: auto; height: 48px; }
}

@media (max-width: 600px) {
  .bi-view { padding: 12px 10px 120px; }
  .bi-toolbar { padding: 15px; }
  .bi-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .bi-toolbar-actions > label { min-width: 0; grid-column: 1 / -1; }
  .bi-period-selector { grid-column: 1 / -1; }
  .bi-period-selector button { flex: 1; }
  .bi-toolbar-actions > .button { width: 100%; min-width: 0; }
  .bi-sector-picker-panel > header { align-items: flex-start; flex-direction: column; }
  .bi-sector-picker-options { grid-template-columns: 1fr; }
  .bi-widget-options { grid-template-columns: 1fr; }
  .bi-settings-panel > header,
  .bi-deadline-board > header { align-items: flex-start; flex-direction: column; }
  .bi-kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bi-kpi-card { min-height: 150px; padding: 15px; }
  .bi-kpi-card > strong { font-size: 52px; }
  .bi-executive-section > header { align-items: flex-start; }
  .bi-executive-production-summary,
  .bi-commercial-kpis,
  .bi-finance-kpis { grid-template-columns: 1fr; }
  .bi-mini-kpi { min-height: 96px; }
  .bi-shared-op-row {
    grid-template-columns: 66px minmax(140px, 1.6fr) 88px 88px;
  }
  .bi-department-row {
    grid-template-columns: minmax(100px, 1.3fr) repeat(3, minmax(48px, 0.6fr));
    gap: 5px;
  }
  .bi-department-row > span small { font-size: 6pt; }
  .bi-deadline-board th,
  .bi-deadline-board td { padding: 10px 7px; font-size: 8pt; }
  .bi-deadline-board table { min-width: 720px; }
  .bi-deadline-board th:nth-child(1) { width: 14%; }
  .bi-deadline-board th:nth-child(2) { width: 24%; }
  .bi-deadline-board th:nth-child(3) { width: 30%; }
  .bi-deadline-board th:nth-child(4) { width: 14%; }
  .bi-deadline-board th:nth-child(5) { width: 18%; }
}
