/* Encomendas e Email vs Dropbox partilham os tokens e os componentes do painel:
   barra de ação, barra de resultado, lista à esquerda e detalhe à direita. */

.op-cards { display: grid; gap: 10px; }
.op-card {
  display: grid; gap: 6px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}
.op-card:hover { background: var(--surface-soft); }
.op-card.is-selected { border-color: var(--accent); background: var(--surface-selected); }
.op-card-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: center; }
.op-card-top strong { color: var(--ink-strong); }
.op-card-linhas { margin: 0; color: var(--muted); font-size: .86rem; }
.op-card-bloqueio { margin: 0; color: var(--warning); font-size: .84rem; }

.op-inspector { display: grid; gap: 12px; }
.op-inspector h2 { font-size: 1.02rem; }
.op-inspector h3 { margin: 8px 0 0; font-size: .84rem; color: var(--muted); font-weight: 650; }
.op-inspector > * { min-width: 0; max-width: 100%; }
.op-detail-line { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; font-size: .88rem; }
.op-detail-label { color: var(--muted); }
.op-detail-value { color: var(--ink-strong); overflow-wrap: anywhere; }
.op-detail-section { display: grid; gap: 10px; }
.op-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.op-detail-actions .is-disabled { opacity: .45; pointer-events: none; }
.op-assunto { margin: 0; font-weight: 600; color: var(--ink-strong); overflow-wrap: anywhere; }
.op-prova { margin: 0; padding: 10px 12px; border-radius: var(--radius-small); background: var(--accent-soft); color: var(--accent-strong); font-size: .86rem; }
.op-nota { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.op-vazio { color: var(--muted); font-size: .9rem; padding: 18px; }
/* Sem min-width: 0 o corpo do email, que é pré-formatado, alargava a página. */
.op-email-preview {
  margin: 0; padding: 14px; max-height: 420px; overflow: auto; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-soft);
  font-family: "Cascadia Mono", Consolas, monospace; font-size: .76rem; line-height: 1.5; white-space: pre;
}
.op-bloqueios { margin: 0; padding-left: 18px; display: grid; gap: 5px; color: var(--ink); font-size: .86rem; }
.op-bloqueios li { line-height: 1.45; overflow-wrap: anywhere; }

.op-pendencias { display: grid; gap: 16px; margin: 28px 0 0; }
.op-pendencias:empty { display: none; }
.op-pend-section { display: grid; gap: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.op-pend-section h3 { margin: 0; font-size: .98rem; }
.op-pend-section > .button { justify-self: start; }
.op-pend-item {
  display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: .88rem;
}

/* Amostras de cor das folhas de stock. A cor chega por CSSOM (encomendas.js),
   porque a política de segurança não deixa usar atributos style. */
.op-amostra {
  display: inline-block; flex: none; width: 18px; height: 18px; vertical-align: middle;
  border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface);
}
.op-amostra.is-sem-cor {
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 3px, var(--line) 3px, var(--line) 6px);
}
.op-cor-loja { margin: 12px 0 2px; font-size: .92rem; color: var(--ink-strong); }
.op-legenda { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: .86rem; }
.op-legenda-item { display: inline-flex; gap: 8px; align-items: center; }
.op-cor-titulo { margin: 10px 0 0; color: var(--muted); font-size: .82rem; font-weight: 620; }
.op-cor-item { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .88rem; min-width: 0; }
.op-cor-topo { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.op-cor-acoes { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: end; }
.op-cor-acoes .op-field { min-width: 180px; }

.op-config-form { display: grid; gap: 12px; max-width: 640px; padding-bottom: 4px; }
.op-config-form h3 { margin: 12px 0 0; font-size: .92rem; }
.op-config-form > .button { justify-self: start; }
.op-field { display: grid; gap: 5px; }
.op-field-label { color: var(--muted); font-size: .8rem; font-weight: 620; }
.op-field input, .op-field select { color: var(--ink); }
.op-checkboxes { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.op-checkbox { display: flex; gap: 8px; align-items: center; min-height: 32px; font-size: .88rem; color: var(--ink); }
.op-checkbox input { width: 17px; height: 17px; }

.op-form { display: grid; gap: 10px; padding: 12px 0 0; border-top: 1px solid var(--line); min-width: 0; }
.op-form > * { min-width: 0; }
.op-form > .button { justify-self: start; }
.op-textarea { font-size: .88rem; }

.op-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.op-table th, .op-table td { padding: 11px 13px; text-align: left; border-top: 1px solid var(--line); font-size: .86rem; vertical-align: top; }
.op-table thead th { color: var(--muted); background: #f3f6f5; font-weight: 650; font-size: .76rem; position: sticky; top: 0; border-top: 0; }
.op-table tbody tr { cursor: pointer; }
.op-table tbody tr:hover { background: var(--surface-soft); }
.op-table tbody tr.is-selected { background: var(--surface-selected); }
.op-table { min-width: 760px; }
.op-table td:nth-child(3) { min-width: 150px; max-width: 240px; overflow-wrap: anywhere; }
.op-table td:nth-child(4), .op-table td:nth-child(5) { min-width: 170px; overflow-wrap: anywhere; }
.op-table td:first-child { min-width: 150px; }
.op-table td:first-child .owner { margin-top: 4px; }
.op-table tbody tr:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.table-scroll:has(.op-table) { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
#conferencia-carregar-mais { margin-top: 12px; }
