/* static/admin.css
 * Sistema de desenho do painel interno da DMC (PLANO.md · Secção 3 e Secção 6).
 * Nenhuma cor fora das variáveis de :root / html[data-theme="dark"].
 */
@import url("fonts/themes.css");

:root {
  color-scheme: light;
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --surface-2: #F1F1EE;
  --border: #E4E4E0;
  --text: #1A1B1E;
  --text-2: #62656B;
  --accent: #1F4E79;
  --accent-soft: #E8EFF6;
  --ok: #1E7A4C;
  --ok-soft: #E6F3EC;
  --warn: #9A6200;
  --warn-soft: #FBF1DE;
  --risk: #B42318;
  --risk-soft: #FCE9E7;
  --info: #2457A6;
  --info-soft: #E7EEF9;
  --on-solid: var(--surface);
  --backdrop: color-mix(in srgb, var(--text) 42%, transparent);

  /* Aliases de compatibilidade para templates das fases seguintes */
  --creme: var(--bg);
  --paper: var(--surface);
  --sand: var(--border);
  --ink: var(--text);
  --muted: var(--text-2);
  --bordeaux: var(--accent);
  --board: var(--surface);
  --signal: var(--accent);
  --signal-ink: var(--accent);
  --line: var(--border);

  /* Tipografia única Inter; monospace apenas para códigos técnicos (IBAN, chaves de API) */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);
  --mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.tnum,
td[style*="text-align:right"],
th[style*="text-align:right"],
.stat-card__value,
.board__n,
.crm-card__money strong {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Escala tipográfica: 12, 13, 14 (base), 16, 20, 24 ───────────────────── */
h1 {
  font: 600 24px/1.25 var(--sans);
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 4px;
}
h2 {
  font: 600 16px/1.35 var(--sans);
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 12px;
}
h3 {
  font: 600 14px/1.4 var(--sans);
  color: var(--text);
  margin: 0 0 8px;
}
.sub {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.muted {
  color: var(--text-2);
}
.ok {
  color: var(--ok);
}

/* ─── Barra de topo pública/login ─────────────────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.top a {
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}
.top img {
  height: 28px;
  background: var(--surface);
  padding: 2px 4px;
  border-radius: 6px;
}
.top span {
  font: 500 12px/1.4 var(--sans);
  color: var(--text-2);
}
.top .linkbtn {
  color: var(--text-2);
}
.top .linkbtn:hover {
  color: var(--text);
}

/* ─── Grelha e Contentores ────────────────────────────────────────────────── */
.main {
  max-width: 1260px;
  margin: 0 auto;
  padding: 24px 32px 64px;
}
.grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  align-items: start;
}
.grid2 > * {
  min-width: 0;
  max-width: 100%;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

/* ─── Tabelas (Secção 3.4: cabeçalho --surface-2, 44px de linha) ──────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  font: 500 12px/1.35 var(--sans);
  color: var(--text-2);
  background: var(--surface-2);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 10px 12px;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
tr:hover td {
  background: var(--surface-2);
}
.nw {
  white-space: nowrap;
}

/* ─── Botões (Secção 3.4: principal, secundário, fantasma; 36px e 32px) ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  appearance: none;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-solid);
  font: 500 13px/1.2 var(--sans);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover {
  background: var(--info);
  border-color: var(--info);
  color: var(--on-solid);
  text-decoration: none;
}
.btn--line {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn--line:hover {
  background: var(--surface-2);
  border-color: var(--text-2);
  color: var(--text);
}
.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn--ghost:hover {
  background: var(--surface-2);
  border-color: transparent;
  color: var(--text);
}
.btn--small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}
.linkbtn {
  border: 0;
  background: none;
  color: var(--accent);
  font: 500 13px/1.4 var(--sans);
  cursor: pointer;
  padding: 0;
}
.linkbtn:hover {
  text-decoration: underline;
}

/* ─── Campos e Formulários (Secção 3.3 e 3.4: 36px altura, raio 6px, sem uppercase) */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
select,
textarea {
  font: 400 14px/1.4 var(--sans);
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
  max-width: 100%;
}
.form select,
.form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]),
.form textarea {
  width: 100%;
  box-sizing: border-box;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--surface-2);
  color: var(--text-2);
}
textarea {
  min-height: 84px;
  padding: 8px 10px;
}
form.inline {
  display: inline;
}
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.row label,
.form label,
.opsform .row label,
.opsform .wide,
.ui-field {
  display: grid;
  gap: 4px;
  font: 500 13px/1.35 var(--sans);
  color: var(--text-2);
  text-transform: none;
  letter-spacing: 0;
}
.ui-field__label {
  font: 500 13px/1.35 var(--sans);
  color: var(--text-2);
}
.ui-field__help {
  font: 400 12px/1.35 var(--sans);
  color: var(--text-2);
}
.form {
  display: grid;
  gap: 12px;
}

/* ─── Pílulas de estado (Secção 3.4 e Secção 6: 12px 500, sem maiúsculas) ─── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.pill--neutral,
.pill--superseded,
.pill--revoked,
.pill--expired {
  background: var(--surface-2);
  color: var(--text-2);
  border-color: var(--border);
}
.pill--info {
  background: var(--info-soft);
  color: var(--info);
  border-color: var(--info-soft);
}
.pill--ok,
.pill--published,
.pill--ours {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: var(--ok-soft);
}
.pill--warn,
.pill--draft,
.pill--internal {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn-soft);
}
.pill--risk {
  background: var(--risk-soft);
  color: var(--risk);
  border-color: var(--risk-soft);
}
.pill--accent,
.pill--cover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft);
}

/* ─── Avisos e mensagens de estado ────────────────────────────────────────── */
.warn {
  margin: 0;
  padding: 0;
  list-style: none;
}
.warn li {
  padding: 8px 12px;
  border-left: 3px solid var(--warn);
  background: var(--warn-soft);
  color: var(--text);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 13px;
}
.saved {
  padding: 10px 14px;
  border-left: 3px solid var(--ok);
  background: var(--ok-soft);
  color: var(--text);
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13px;
}
.newlink {
  padding: 12px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 16px;
  word-break: break-all;
  font-size: 13px;
}
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.feed li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.feed .k {
  font: 500 12px/1.4 var(--sans);
  color: var(--accent);
  margin-right: 6px;
}
.feed .when {
  color: var(--text-2);
  font-size: 12px;
}
.logo-prev {
  max-height: 48px;
  max-width: 200px;
  background: var(--surface);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.login {
  max-width: 380px;
  margin: 14vh auto;
  text-align: center;
}
.login form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.swatches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.swatches label {
  font-size: 13px;
}
.swatches input[type="color"] {
  width: 64px;
  height: 36px;
  padding: 2px;
}

/* ─── Operação e Voos ─────────────────────────────────────────────────────── */
.opsform {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
  scroll-margin-top: 20px;
}
.opsform:first-of-type {
  border-top: 0;
}
.opsform__title {
  margin: 0;
  font: 600 15px/1.35 var(--sans);
}
.opsform:target {
  background: var(--accent-soft);
}
.flightbox {
  padding: 10px 12px;
  border-left: 3px solid var(--ok);
  background: var(--ok-soft);
  border-radius: 6px;
  font-size: 13px;
}
.flightbox--late {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}
.flightbox p {
  margin: 0 0 4px;
}

/* ─── Cartões de número (Secção 3.4: fundo --surface, contorno --border, nunca preto) */
.stat-grid,
.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}
.stat-card,
.board__n {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font: 600 24px/1.2 var(--sans);
  color: var(--text);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.stat-card__label {
  font: 500 12px/1.35 var(--sans);
  color: var(--text-2);
}
.stat-card__value {
  font: 600 24px/1.2 var(--sans);
  color: var(--text);
}
.stat-card__sub,
.board__n small {
  font: 400 12px/1.4 var(--sans);
  color: var(--text-2);
  letter-spacing: 0;
  text-transform: none;
}
.board__n--ok,
.stat-card--ok .stat-card__value {
  color: var(--ok);
}
.board__n--test,
.stat-card--info .stat-card__value {
  color: var(--info);
}
.board__n--warn,
.stat-card--warn .stat-card__value {
  color: var(--warn);
}
.board__n--fail,
.stat-card--risk .stat-card__value {
  color: var(--risk);
}

/* ─── Verificar Sistema ───────────────────────────────────────────────────── */
table.checks td {
  padding: 10px 12px;
}
.checks__state span {
  display: inline-block;
  min-width: 58px;
  padding: 2px 8px;
  border-radius: 6px;
  font: 500 12px/1.4 var(--sans);
  text-align: center;
  color: var(--ok);
  background: var(--ok-soft);
}
.is-test .checks__state span {
  background: var(--info-soft);
  color: var(--info);
}
.is-warn .checks__state span {
  background: var(--warn-soft);
  color: var(--warn);
}
.is-fail .checks__state span {
  background: var(--risk-soft);
  color: var(--risk);
}
.checks__name {
  font-weight: 600;
  white-space: nowrap;
}
.checks__ms {
  white-space: nowrap;
  text-align: right;
  font: 400 12px/1.4 var(--mono);
  color: var(--text-2);
}
.steps {
  margin: 0;
  padding: 0 0 0 20px;
  display: grid;
  gap: 16px;
}
.steps li {
  padding-left: 4px;
}
.steps label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.steps input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.steps p {
  margin: 4px 0 8px;
  max-width: 72ch;
}
.steps .btn {
  margin: 0 6px 0 0;
}
code {
  font: 400 12px/1.4 var(--mono);
  background: var(--surface-2);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ─── Biblioteca / Catálogo ───────────────────────────────────────────────── */
.photolink {
  margin-left: 8px;
  font: 500 13px/1.4 var(--sans);
}
.importer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.importer h3 {
  margin: 0 0 4px;
  font: 600 15px/1.35 var(--sans);
}
.importer p {
  margin: 0 0 10px;
}
.bar-track {
  height: 8px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
}
.lib td {
  vertical-align: middle;
}
.lib__thumb {
  width: 84px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
  display: block;
}
.lib__nothumb {
  width: 84px;
  height: 56px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
}
.pager {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.photo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  scroll-margin-top: 20px;
}
.photo:target {
  outline: 2px solid var(--accent);
}
.photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}
.photo--off img {
  opacity: 0.35;
  filter: grayscale(1);
}
.photo__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px 0;
  min-height: 30px;
}
.photo__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px 10px;
}
.photo__acts button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 4px 8px;
  font: 500 12px/1.3 var(--sans);
  cursor: pointer;
  color: var(--text);
}
.photo__acts button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.prose-sm {
  max-height: 9.5em;
  overflow: hidden;
  position: relative;
  font-size: 14px;
  color: var(--text);
}
.prose-sm.is-open {
  max-height: none;
}

/* ─── Fase 4: Files (Tabela, Quadro, Calendário) e Hoje ───────────────────── */
.files-toolbar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  padding: 14px 16px;
}
.files-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.files-status-pills {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 8px;
  overflow-x: auto;
  max-width: 100%;
}
.files-pill {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-2);
  white-space: nowrap;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.files-pill:hover {
  color: var(--text);
  background: rgba(0, 0, 0, .03);
}
.files-pill.is-active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  font-weight: 600;
}
.files-pill__count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--text-2);
}
.files-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.view-switch-bar {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.view-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.view-switch-btn:hover {
  color: var(--text);
}
.view-switch-btn.is-active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.files-search-wrap {
  min-width: 260px;
}
.files-search-wrap input {
  width: 100%;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.files-table th {
  background: var(--surface-2);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.files-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.files-table tbody tr {
  transition: background .12s ease;
}
.files-table tbody tr:hover {
  background: var(--surface-2);
}
.file-code {
  font-weight: 600;
  color: var(--accent);
  font-size: 13px;
}
.file-title-sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 1px;
}
.file-dates {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.file-progress-bar {
  width: 110px;
  height: 4px;
  background: var(--surface-2);
  border-radius: 99px;
  margin-top: 3px;
  overflow: hidden;
}
.file-progress-bar__fill {
  height: 100%;
  border-radius: 99px;
  transition: width .2s ease;
}
.kanban-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kanban-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 280px;
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  border-color: var(--accent-soft);
}

/* ─── Editor nativo dia-a-dia (Modelo TripCreator + Ezus) ─────────────────── */
.editor-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.editor-layout.catalog-collapsed {
  grid-template-columns: 160px minmax(0, 1fr);
}
.editor-layout.catalog-collapsed .editor-catalog-panel {
  display: none !important;
}
.editor-rail {
  position: sticky;
  top: 60px;
}
.editor-days-nav {
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.editor-day-link {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 6px;
  align-items: center;
  padding: 5px 6px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
}
.editor-day-link:hover {
  background: var(--surface-2);
  border-color: var(--border);
  text-decoration: none;
}
.editor-day-link__num {
  font: 600 11px/1.3 var(--sans);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 0;
  text-align: center;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.editor-day-link__txt {
  display: grid;
  line-height: 1.2;
  overflow: hidden;
}
.editor-day-link__txt strong {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-day-link__txt small {
  font: 400 11px/1.2 var(--sans);
  color: var(--text-2);
}
.editor-day {
  scroll-margin-top: 120px;
  margin-bottom: 16px;
}
.editor-day__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.editor-day__badge {
  font: 600 11px/1.4 var(--sans);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.editor-items {
  display: grid;
  gap: 6px;
}
.editor-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--surface);
  scroll-margin-top: 20px;
  transition: border-color .15s ease;
}
.editor-item:hover {
  border-color: var(--accent);
}
.editor-item:target {
  outline: 2px solid var(--accent);
}
.editor-item__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.editor-item__handle {
  cursor: grab;
  color: var(--text-2);
  padding: 2px 4px;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}
.editor-item__left {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 200px;
  cursor: pointer;
}
.editor-item__thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
  flex-shrink: 0;
}
.editor-item__nothumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  flex-shrink: 0;
}
.editor-item__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.editor-item__title {
  font: 600 13px/1.3 var(--sans);
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-item__meta {
  font: 400 11px/1.3 var(--sans);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-item__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.editor-item__price {
  font: 600 12px/1.3 var(--sans);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.editor-item__details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.editor-item__details > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

#editor-secondary-panels details {
  margin-bottom: 6px;
}
#editor-secondary-panels details > summary {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
#editor-secondary-panels details[open] {
  animation: fadeIn .15s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Painel de Catálogo à direita estilo TripCreator */
.editor-catalog-panel {
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.editor-catalog-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.editor-catalog-panel__title {
  font: 600 13px/1.3 var(--sans);
  color: var(--text);
  margin: 0;
}
.editor-catalog-search {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.editor-catalog-filters {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.editor-catalog-filter-btn {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
}
.editor-catalog-filter-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.editor-catalog-target {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.editor-catalog-target select {
  font-size: 11px;
  padding: 2px 4px;
  flex: 1;
}
.editor-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
}
.catalog-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: grab;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.catalog-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.catalog-card__thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface-2);
}
.catalog-card__nothumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-2);
}
.catalog-card__body {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.catalog-card__title {
  font: 600 12px/1.3 var(--sans);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-card__meta {
  font: 400 11px/1.3 var(--sans);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-card__add-btn {
  font-size: 11px;
  padding: 3px 6px;
  white-space: nowrap;
}

/* Faixa financeira compacta e barra de ferramentas */
.editor-fin-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 10px;
}
.editor-fin-metrics {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.editor-fin-item {
  display: flex;
  flex-direction: column;
}
.editor-fin-item__lbl {
  font: 500 11px/1.2 var(--sans);
  color: var(--text-2);
}
.editor-fin-item__val {
  font: 600 15px/1.3 var(--sans);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.editor-fin-item__val--accent {
  color: var(--accent);
}
.editor-fin-context {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 12px/1.3 var(--sans);
  color: var(--text-2);
}
.editor-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
}
.editor-subbar-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.editor-subbar .btn {
  font-size: 12px;
  padding: 4px 8px;
  min-height: 28px;
}

/* Folha de Custos Compacta sem Rolagem Horizontal */
.cost-sheet-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 18px;
}
.cost-sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 0;
  table-layout: auto;
}
.cost-sheet-table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  font: 600 11px/1.3 var(--sans);
  color: var(--text-2);
  padding: 6px 6px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  z-index: 2;
}
.cost-sheet-table td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cost-sheet-table tr.is-alt-row {
  background: rgba(178,107,18,.05);
}
.cost-sheet-table input,
.cost-sheet-table select {
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 5px;
  min-height: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
}
.cost-sheet-table input:focus,
.cost-sheet-table select:focus {
  border-color: var(--accent);
  outline: none;
}
.cost-sheet-table tfoot td {
  position: sticky;
  bottom: 0;
  background: var(--surface-2);
  font-weight: 600;
  border-top: 2px solid var(--border);
  padding: 8px 6px;
  font-variant-numeric: tabular-nums;
}

  border-radius: 6px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  flex-shrink: 0;
}
.editor-item__details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.editor-item__details > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.editor-add {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.editor-add > summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  color: var(--accent);
}
.editor-add__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-top: 12px;
}
.editor-add__col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.editor-add__col h3 {
  margin: 0 0 10px;
  font: 600 14px/1.35 var(--sans);
}
.lib-results {
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.editor-lib-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  flex-wrap: wrap;
}
.editor-lib-row__thumb {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.editor-lib-row__nothumb {
  width: 48px;
  height: 36px;
  border-radius: 4px;
  background: var(--surface-2);
  flex-shrink: 0;
}
.editor-lib-row__info {
  display: grid;
  flex: 1;
  min-width: 150px;
  font-size: 13px;
  line-height: 1.25;
}
.editor-lib-row__info .muted {
  font-size: 12px;
}
.editor-lib-row__inputs {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.editor-lib-row__inputs input {
  padding: 4px 6px;
  font-size: 12px;
  min-height: 32px;
}

/* ─── App Shell: Menu Lateral Claro (--surface) + Área de Trabalho ────────── */
.app-shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}
.app-shell.is-collapsed {
  grid-template-columns: 64px 1fr;
}
.sidebar {
  background: var(--surface);
  color: var(--text);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  min-width: 0;
}
.sidebar__logo:hover {
  text-decoration: none;
}
.sidebar__logo img {
  height: 24px;
  background: var(--surface);
  border-radius: 4px;
  flex-shrink: 0;
}
.sidebar__name {
  font: 600 14px/1.3 var(--sans);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar__toggle:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--text-2);
}
.sidebar__cmdk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 6px;
  padding: 6px 10px;
  font: 400 13px/1.3 var(--sans);
  cursor: pointer;
  margin-bottom: 12px;
  text-align: left;
}
.sidebar__cmdk-lbl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar__cmdk:hover {
  border-color: var(--accent);
  color: var(--text);
}
.sidebar__cmdk kbd {
  font: 500 11px/1.2 var(--sans);
  background: var(--surface-2);
  color: var(--text-2);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.sidebar__group {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}
.sidebar__group--bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
  gap: 6px;
}
.sidebar__label {
  font: 500 12px/1.3 var(--sans);
  color: var(--text-2);
  padding: 0 8px 4px;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar__link:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.sidebar__link.is-on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.sidebar__ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sidebar__user-card {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.sidebar__user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 8px;
  font-size: 12px;
  color: var(--text-2);
}
.sidebar__username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
}
.sidebar__logout {
  font-size: 12px;
  color: var(--text-2);
}
.sidebar__logout:hover {
  color: var(--text);
}
.app-shell.is-collapsed .sidebar__name,
.app-shell.is-collapsed .sidebar__logo img,
.app-shell.is-collapsed .sidebar__cmdk-lbl span,
.app-shell.is-collapsed .sidebar__cmdk kbd,
.app-shell.is-collapsed .sidebar__label,
.app-shell.is-collapsed .sidebar__txt,
.app-shell.is-collapsed .sidebar__user-card {
  display: none;
}
.app-shell.is-collapsed .sidebar__cmdk {
  justify-content: center;
  padding: 7px 4px;
}
.app-shell.is-collapsed .sidebar__link {
  justify-content: center;
  padding: 9px 4px;
}
.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 32px;
  min-height: 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.workspace-topbar__sub {
  display: flex;
  align-items: center;
  min-width: 0;
}
.workspace-topbar__tabs {
  margin-bottom: -9px;
  border-bottom: 0;
}
.workspace-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.workspace .main {
  max-width: 1260px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px 64px;
}

/* ─── Barra de contexto do file (Sticky File Sub-Header) ──────────────────── */
.trip-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.trip-bar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 0;
}
.trip-bar__back {
  text-decoration: none;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
}
.trip-bar__back:hover {
  color: var(--text);
  text-decoration: none;
}
.trip-bar__sep {
  color: var(--border);
}
.trip-bar__ref {
  font: 600 13px/1.3 var(--sans);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 6px;
}
.trip-bar__title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.trip-bar__tabs {
  display: flex;
  gap: 16px;
  align-items: center;
  overflow-x: auto;
}
.trip-tab {
  text-decoration: none;
  font: 500 13px/1.3 var(--sans);
  padding: 14px 2px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.trip-tab:hover {
  color: var(--text);
  text-decoration: none;
}
.trip-tab.is-on {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.trip-tab.is-dimmed {
  opacity: 0.55;
}
.trip-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

/* ─── Separadores e Comutadores (.ui-tabs / .create-tabs) ─────────────────── */
.ui-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
}
.ui-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  font: 500 13px/1.3 var(--sans);
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.ui-tab:hover {
  color: var(--text);
  text-decoration: none;
}
.ui-tab.is-active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.ui-tab__count {
  font: 500 12px/1.2 var(--sans);
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--text-2);
}
.ui-tab.is-active .ui-tab__count {
  background: var(--accent-soft);
  color: var(--accent);
}

.create-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.create-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 6px;
  font: 500 13px/1.2 var(--sans);
  cursor: pointer;
  text-decoration: none;
}
.create-tab-btn:hover {
  border-color: var(--text-2);
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.create-tab-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* ─── Componentes _ui.html: Gaveta lateral, Estado vazio, Menu ⋯, Ícones ──── */
.ui-icon {
  display: inline-block;
  vertical-align: -3px;
  flex-shrink: 0;
}
.ui-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  z-index: 9995;
  justify-content: flex-end;
}
.ui-drawer-backdrop.is-open {
  display: flex;
}
.ui-drawer {
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ui-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.ui-drawer__title {
  margin: 0;
  font: 600 16px/1.35 var(--sans);
  color: var(--text);
}
.ui-drawer__sub {
  margin: 4px 0 0;
  font: 400 13px/1.4 var(--sans);
  color: var(--text-2);
}
.ui-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.ui-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ui-empty__text {
  margin: 0;
  font: 400 13px/1.4 var(--sans);
  color: var(--text-2);
}

.ui-action-menu {
  position: relative;
  display: inline-block;
}
.ui-action-menu__trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--text-2);
  cursor: pointer;
}
.ui-action-menu__trigger::-webkit-details-marker {
  display: none;
}
.ui-action-menu__trigger:hover {
  background: var(--surface-2);
  color: var(--text);
}
.ui-action-menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  display: grid;
  gap: 2px;
  z-index: 80;
}
.ui-action-menu__list a,
.ui-action-menu__list button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 400 13px/1.35 var(--sans);
  text-align: left;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}
.ui-action-menu__list a:hover,
.ui-action-menu__list button:hover {
  background: var(--surface-2);
  text-decoration: none;
}

/* ─── Preferências de Aparência e Idioma ──────────────────────────────────── */
.ui-preferences {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 6px 4px 2px;
}
.ui-preferences label {
  display: grid;
  gap: 4px;
  color: var(--text-2);
  font-size: 12px;
}
.ui-preferences select {
  min-width: 0;
  width: 100%;
  font-size: 12px;
  min-height: 32px;
  padding: 4px 6px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.ui-preferences button {
  grid-column: 1 / -1;
}
#ui-preferences-status {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-2);
}
.app-shell.is-collapsed .ui-preferences {
  display: none;
}

/* ─── Pesquisa Rápida (⌘K) e Gaveta do Assistente ─────────────────────────── */
.cmdk-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  z-index: 9999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.cmdk-backdrop.is-open {
  display: flex;
}
.cmdk-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 92%;
  max-width: 540px;
  overflow: hidden;
}
.cmdk-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 12px 16px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.cmdk-list {
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
}
.cmdk-list li a {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
}
.cmdk-list li a:hover,
.cmdk-list li a:focus {
  background: var(--surface-2);
  outline: none;
  text-decoration: none;
}

.copilot-drawer {
  width: 480px;
  max-width: 100vw;
}
.copilot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.copilot-header__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.copilot-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.copilot-context {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.copilot-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  width: 32px;
  height: 32px;
  color: var(--text-2);
  border-radius: 6px;
}
.copilot-icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.copilot-chips {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  background: var(--surface-2);
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.copilot-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
  flex-shrink: 0;
}
.copilot-chip:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.copilot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
  background: var(--bg);
}
.copilot-msg {
  display: flex;
  width: 100%;
}
.copilot-msg--user {
  justify-content: flex-end;
}
.copilot-msg--assistant {
  justify-content: flex-start;
}
.copilot-bubble {
  border-radius: 10px;
  padding: 10px 14px;
  max-width: 88%;
  word-break: break-word;
}
.copilot-msg--user .copilot-bubble {
  background: var(--accent);
  color: var(--on-solid);
}
.copilot-msg--assistant .copilot-bubble {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.copilot-bubble--muted {
  color: var(--text-2);
}
.copilot-bubble--error {
  color: var(--risk);
  background: var(--risk-soft);
  border-color: var(--risk);
}
.copilot-examples {
  margin: 8px 0 0 16px;
  padding: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}
.copilot-actions-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.copilot-act-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  margin-right: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.copilot-act-btn:hover,
.copilot-act-btn--primary {
  background: var(--accent);
  color: var(--on-solid);
  text-decoration: none;
}
.copilot-pre {
  background: var(--surface-2);
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  overflow-x: auto;
}
.copilot-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  align-items: flex-end;
}
#copilot-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  min-height: 36px;
  resize: none;
  max-height: 100px;
  outline: none;
}
#copilot-input:focus {
  border-color: var(--accent);
}
#copilot-send-btn {
  background: var(--accent);
  color: var(--on-solid);
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
#copilot-send-btn:hover {
  background: var(--info);
}

/* ─── Cabeçalho de página (Secção 4: título 24px, sem subtítulo explicativo) ─ */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.page-head__title h1 {
  margin: 0;
}
.page-head__date {
  font: 400 14px/1.4 var(--sans);
  color: var(--text-2);
}
.page-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  cursor: help;
  border-radius: 999px;
}
.help-tip:hover,
.help-tip:focus-visible {
  color: var(--text);
}
.help-tip__text {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: max-content;
  max-width: min(360px, 80vw);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 14%, transparent);
  font: 400 13px/1.5 var(--sans);
  color: var(--text);
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease;
}
.help-tip:hover .help-tip__text,
.help-tip:focus .help-tip__text,
.help-tip:focus-within .help-tip__text {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 700px) {
  .help-tip__text { position: fixed; top: auto; left: 16px; right: 16px; width: auto; max-width: none; }
}
.page-status {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-2);
}
.page-status:empty { display: none; }
.new-file-menu__trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.new-file-menu__trigger::-webkit-details-marker { display: none; }
.new-file-menu .ui-action-menu__list { min-width: 220px; z-index: 30; }
.new-file-menu .create-tab-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 8px 10px;
  font: 400 14px/1.4 var(--sans);
  color: var(--text);
  cursor: pointer;
}
.new-file-menu .create-tab-btn:hover,
.new-file-menu .create-tab-btn.is-active {
  background: var(--surface-2);
}

/* ─── File Layout (Fase 2: Painel lateral 280px + Área principal) ─────────── */
.file-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
  width: 100%;
  margin-top: 14px;
}

.file-sidebar {
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
}

.file-sidebar__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.file-sidebar__title {
  margin: 0;
  font: 600 16px/1.3 var(--sans);
  color: var(--text);
  overflow-wrap: anywhere;
}

.file-sidebar__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--text-2);
  font-size: 12px;
}

.file-sidebar__stage-form {
  margin: 4px 0 0;
}

.file-sidebar__stage-select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  font: 500 13px/1.4 var(--sans);
  color: var(--text);
  cursor: pointer;
}

.file-sidebar__section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-sidebar__section-title {
  margin: 0;
  font: 600 11px/1.2 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.file-sidebar__field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.file-sidebar__field-label {
  font: 500 11px/1.2 var(--sans);
  color: var(--text-2);
}

.file-sidebar__field input,
.file-sidebar__field select,
.file-sidebar__field textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font: 400 12px/1.4 var(--sans);
  color: var(--text);
}

.file-sidebar__field input:focus,
.file-sidebar__field select:focus,
.file-sidebar__field textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.file-financials {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-financials__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}

.file-financials__row--main {
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.file-financials__val--ok {
  color: var(--ok);
  font-weight: 600;
}

.file-sidebar__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.file-sidebar__actions .btn {
  width: 100%;
  justify-content: center;
}

.file-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.file-main .grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .file-layout {
    grid-template-columns: 1fr;
  }
  .file-sidebar {
    position: static;
    max-height: none;
  }
}

/* ─── Foco visível, Arrastar e Responsivo ─────────────────────────────────── */
:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.editor-workspace,
.editor-workspace * {
  box-sizing: border-box;
}
.editor-workspace :where(input, select, textarea, label, form, .card, .row, .editor-add__col) {
  min-width: 0;
  max-width: 100%;
}
.editor-workspace :where(input:not([type="checkbox"]), select, textarea) {
  width: 100%;
}
.editor-workspace .board > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.editor-workspace .editor-item__left {
  min-width: 0;
}
.editor-workspace .card {
  overflow-wrap: anywhere;
}

.responsive-admin {
  min-width: 0;
  max-width: 100%;
}
.responsive-admin .grid > * {
  min-width: 0;
  max-width: 100%;
}

.board-drag-handle {
  cursor: grab;
  touch-action: none;
  justify-self: start;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
}
.board-drag-handle:active {
  cursor: grabbing;
}
[data-move-card].is-dragging {
  opacity: 0.55;
}
[data-drop-stage].is-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}
.board-phase {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.board-phase select {
  min-width: 0;
  width: 100%;
  font-size: 12px;
  min-height: 32px;
}
[data-board-status].is-error {
  color: var(--risk);
}

.day-order-row {
  display: flex;
  align-items: center;
  border-radius: 6px;
  min-width: 0;
}
.day-order-row .editor-day-link {
  flex: 1;
  min-width: 0;
}
.day-order-handle {
  border: 0;
  background: transparent;
  font-size: 18px;
  padding: 8px;
  cursor: grab;
  touch-action: none;
  color: var(--text-2);
}
.day-order-row.is-dragging {
  opacity: 0.5;
}
.day-order-row.is-target {
  outline: 2px dashed var(--accent);
  background: var(--accent-soft);
}
#day-order-status {
  font-size: 13px;
}
#day-order-status.is-error {
  color: var(--risk);
}
#day-order,
.editor-day {
  scroll-margin-top: 120px;
}

.sidebar__mobile,
.trip-tab__short {
  display: none;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.grid-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.cal-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.inbox-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.card,
.table-wrap,
.rep-scroll,
.grid,
.grid-2col,
.grid-split,
.cal-layout,
.inbox-layout {
  min-width: 0;
  max-width: 100%;
}

:where(.grid, .grid2, .grid-2col, .grid-split, .cal-layout, .inbox-layout) > * {
  min-width: 0;
  max-width: 100%;
}

:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  max-width: 100%;
}

@media (max-width: 960px) {
  .editor-layout,
  .editor-add__grid,
  .importer,
  .grid,
  .grid-2col,
  .grid-split,
  .cal-layout,
  .inbox-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  .app-shell,
  .app-shell.is-collapsed {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar__group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
  }
  .sidebar__label,
  .sidebar__toggle,
  .sidebar__tag {
    display: none;
  }
  .sidebar__brand {
    border: 0;
    margin: 0;
    padding: 0;
  }
  .sidebar__cmdk {
    width: auto;
    margin: 0;
  }
  .sidebar__group--bottom {
    border: 0;
    padding: 0;
    margin-left: auto;
  }
  .trip-bar {
    padding: 10px 16px;
  }
  .workspace .main,
  .main {
    padding: 20px 16px 60px;
  }
  .row {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .board {
    grid-template-columns: 1fr 1fr;
  }
  .checks__ms {
    display: none;
  }
  .editor-workspace .board {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .editor-workspace .board__n {
    padding: 12px 16px;
    font-size: 20px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .editor-workspace .board__n small {
    font-size: 12px;
    line-height: 1.4;
    text-align: right;
    overflow-wrap: anywhere;
  }
  .editor-workspace .row {
    flex-wrap: wrap;
  }
  .editor-workspace .row > :where(label, details) {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .editor-workspace :where(button, .btn, summary, input:not([type="checkbox"]), select) {
    min-height: 44px;
    font-size: 16px;
    max-width: 100%;
    white-space: normal;
  }
  .btn {
    white-space: normal;
    max-width: 100%;
  }
  th {
    white-space: normal;
  }
  .editor-workspace :where(.editor-add__grid, .editor-layout) {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor-workspace .card {
    padding: 14px;
  }
  .editor-workspace table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
  .editor-workspace .editor-day__head form {
    flex-wrap: wrap;
  }
  .editor-workspace h1 {
    font-size: 20px;
    overflow-wrap: anywhere;
  }
  .workspace {
    max-width: 100vw;
  }
  .workspace-topbar {
    padding: 8px 16px;
  }
  .trip-bar__tabs {
    width: 100%;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
  }
  .trip-tab {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    flex-shrink: 0;
  }
  .trip-bar__right {
    display: none;
  }
  #copilot-send-btn,
  .copilot-icon-btn,
  .copilot-act-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .sidebar {
    padding: 8px 14px;
    gap: 8px;
  }
  .sidebar__brand {
    flex: 1;
  }
  .sidebar__mobile {
    display: block;
    min-height: 44px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
  }
  .sidebar__cmdk {
    order: 3;
    width: 100%;
    min-height: 44px;
  }
  .sidebar .sidebar__group {
    display: none;
    order: 4;
    width: 100%;
  }
  .sidebar.mobile-nav-open .sidebar__group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .sidebar.mobile-nav-open .sidebar__user-card {
    display: block;
    width: 100%;
  }
  .sidebar.mobile-nav-open .ui-preferences {
    display: grid;
  }
  .sidebar .sidebar__link {
    min-height: 44px;
  }
  .app-shell.is-collapsed .sidebar__name,
  .app-shell.is-collapsed .sidebar__cmdk-lbl span,
  .app-shell.is-collapsed .sidebar__cmdk kbd,
  .app-shell.is-collapsed .sidebar__txt,
  .app-shell.is-collapsed .sidebar__username {
    display: inline;
  }
  .app-shell.is-collapsed .sidebar.mobile-nav-open .sidebar__user-card {
    display: block;
  }
  .sidebar__user {
    gap: 14px;
  }
  .trip-bar {
    gap: 6px;
    padding: 8px 16px;
  }
  .trip-bar__left {
    width: 100%;
  }
  .trip-bar__ref {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .responsive-admin .card,
  .responsive-admin .row,
  .responsive-admin form {
    min-width: 0;
    max-width: 100%;
  }
  .responsive-admin table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  .responsive-admin input,
  .responsive-admin select,
  .responsive-admin textarea {
    min-width: 0;
    max-width: 100%;
  }
  .responsive-admin .row {
    flex-wrap: wrap;
  }
  .responsive-admin h1,
  .responsive-admin p {
    overflow-wrap: anywhere;
  }
}


/* ─── 10/11: Resumo do file em painéis e ficha lateral com o essencial em cima ─── */
.file-panes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: sticky;
  top: 56px;
  z-index: 5;
}
.file-pane-btn {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font: 500 13px/1.4 var(--sans);
  color: var(--text-2);
  cursor: pointer;
}
.file-pane-btn:hover { background: var(--surface-2); color: var(--text); }
.file-pane-btn.is-on { background: var(--accent-soft); color: var(--accent); }
.file-main.is-paned {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.file-main.is-paned > *,
.file-main.is-paned [data-wide] { grid-column: 1 / -1; }
.file-main.is-paned .grid,
.file-main.is-paned .grid > div { display: contents; }
.file-main.is-paned .grid > div > .card { grid-column: auto; margin: 0; }
.file-main.is-paned .grid > div > .card[data-wide] { grid-column: 1 / -1; }
.file-main.is-paned #faturacao-pagamentos-card form .row { flex-wrap: wrap; }
.file-main.is-paned .card[data-pane] { margin: 0; }
.file-main.is-paned [hidden] { display: none !important; }
.file-sidebar__head > div:first-child { gap: 8px; min-width: 0; }
.file-sidebar__head > div:first-child .pill { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sidebar__head > div:first-child > div { flex: none; }
.file-sidebar .file-sidebar__head { order: 0; }
.file-sidebar .file-financials { order: 1; }
.file-sidebar .file-sidebar__actions { order: 2; padding-top: 0; border-top: 0; }
.file-sidebar form.file-sidebar__section { order: 3; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 960px) {
  .file-main.is-paned { grid-template-columns: minmax(0, 1fr); }
  .file-panes { position: static; flex-wrap: nowrap; overflow-x: auto; }
  .file-pane-btn { white-space: nowrap; }
}


/* ─── 10/11: Programa compacto ─────────────────────────────────────────────── */
.editor-titlebar { display: none; }
#editor-secondary-panels > details:not([open]) { display: none; }
.editor-day__save { display: none; }
.editor-day__head { flex-wrap: nowrap; padding-bottom: 8px; margin-bottom: 8px; }
.editor-day__head > .row { min-width: 0; }
.editor-day__head .ui-action-menu,
.editor-item__right .ui-action-menu { flex: none; }
.editor-item__details:not([open]) > summary { display: none; }
.editor-item__details:not([open]) { margin: 0; padding: 0; border: 0; }
.ui-action-menu__list form { display: block; margin: 0; }
.ui-action-menu__list button { width: 100%; text-align: left; white-space: nowrap; }
.ui-action-menu__list .is-danger { color: var(--risk); }
.ui-action-menu__list { right: 0; left: auto; z-index: 40; }
.v3-nights { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; vertical-align: middle; }
.v3-nights-form { display: inline-flex; margin: 0; }
.v3-nights .btn { min-width: 24px; padding: 0 6px; height: 24px; }
.v3-nights__n { font-size: 12px; color: var(--text-2); }
.v3-ghost { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.editor-add { margin-top: 6px !important; }
.editor-add > summary { font-size: 12px; color: var(--text-2); cursor: pointer; }
.v3-lock { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.editor-estimates { padding: 8px 14px !important; margin-bottom: 8px !important; }
.editor-estimates > strong { font-size: 13px; }
.editor-estimates > p { display: inline; margin: 0 0 0 6px !important; font-size: 12px !important; color: var(--text-2); }
.editor-estimates form { margin-top: 6px; }
.editor-estimates form label:first-child { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.editor-estimates form label:first-child input { width: auto; margin: 0; }


/* ─── 10/11: Operação em painéis, um serviço por linha ─────────────────────── */
.ops-main.is-paned { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ops-main.is-paned > .ops-services { grid-column: 1 / -1; }
.ops-main.is-paned > .ops-side { display: contents; }
.ops-main.is-paned > .ops-side > .card { margin: 0; }
.ops-main.is-paned [hidden] { display: none !important; }
.ops-main.is-paned .ops-services > .card { margin-bottom: 12px; }
.ops-panes__tools { margin-left: auto; display: inline-flex; align-items: center; }
.ops-panes__tools[hidden] { display: none; }
.opsform__title { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.opsform__time { font: 500 13px/1.3 var(--mono); color: var(--text-2); min-width: 44px; }
.opsform.is-collapsed { padding: 8px 0; }
.opsform.is-collapsed > :not(.opsform__title) { display: none; }
.opsform.is-collapsed .opsform__title { font-size: 14px; font-weight: 500; }
.v3item.is-collapsed { display: none; }
.opsform__title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 960px) { .ops-main.is-paned { grid-template-columns: minmax(0, 1fr); } }
.ops-main.is-paned .ops-services > .card { padding: 12px 16px; margin-bottom: 8px; }
.ops-main.is-paned .ops-services > .card > h2 { font-size: 15px; margin: 0 0 4px; }


/* ─── 10/11: calendário, pessoas, preferências e Hoje no telemóvel ─────────── */
.cal-cell { min-height: 76px !important; min-width: 0; overflow: hidden; }
.cal-upcoming { max-height: calc(100vh - 330px); min-height: 220px; overflow-y: auto; }
.people-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.people-head input { max-width: 340px; flex: 1; min-width: 200px; }
.people-scroll { max-height: calc(100vh - 250px); overflow-y: auto !important; }
.people-scroll thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.people-scroll tr[hidden] { display: none; }
.ui-preferences > .btn { display: none; }
@media (max-width: 720px) {
  .people-scroll { max-height: none; }
  .cal-upcoming { max-height: none; }
  .files-table--stack thead { display: none; }
  .files-table--stack, .files-table--stack tbody, .files-table--stack tr, .files-table--stack td { display: block; width: 100%; }
  .files-table--stack tr { padding: 10px 0; border-top: 1px solid var(--border); }
  .files-table--stack td { padding: 2px 0 !important; border: 0 !important; text-align: left !important; }
}

/* ─── 11/11: Programa — arrastar, preços na linha e fornecedores por serviço ─── */
.editor-items { min-height: 44px; display: grid; gap: 6px; }
.editor-items__empty {
  margin: 0; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 8px;
  font-size: 12px; color: var(--text-2); text-align: center;
}
.editor-items:has(.editor-item) .editor-items__empty { display: none; }
body.is-dragging-service .editor-items { outline: 2px dashed var(--border); outline-offset: 3px; border-radius: 8px; }
body.is-dragging-service .editor-items__empty { display: block; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
body.is-dragging-service .editor-items:has(.editor-item) .editor-items__empty { display: none; }
body.is-dragging-service { cursor: grabbing; user-select: none; }
.editor-item__bar { cursor: grab; }
.editor-item__bar:active { cursor: grabbing; }
.editor-item__handle { border: 0; background: transparent; }
.editor-item.is-drop-ghost {
  background: var(--accent-soft); border: 2px dashed var(--accent); border-radius: 8px; opacity: 1;
}
.editor-item.is-drop-ghost > * { visibility: hidden; }
.catalog-card.is-drop-ghost {
  height: 44px; border: 2px dashed var(--accent); background: var(--accent-soft); border-radius: 8px;
}
.catalog-card.is-drop-ghost > * { visibility: hidden; }
.editor-item.is-dragging, .catalog-card.is-dragging {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18); background: var(--surface); border-radius: 8px;
  opacity: .96; transform: rotate(.6deg); z-index: 1000;
}
.editor-item.is-saving { opacity: .55; }
.editor-item--adding { padding: 12px; font-size: 13px; color: var(--accent); background: var(--accent-soft); border: 2px dashed var(--accent); border-radius: 8px; }
.editor-item.is-just-moved { animation: just-moved 2.2s ease-out; }
@keyframes just-moved { 0%, 40% { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); } 100% { background: transparent; box-shadow: 0 0 0 0 transparent; } }
.catalog-card { cursor: grab; }

.editor-item__prices { display: flex; align-items: flex-end; gap: 6px; flex: none; cursor: default; }
.editor-item__prices label { display: grid; gap: 1px; font: 500 10px/1.2 var(--sans); color: var(--text-2); margin: 0; }
.editor-item__prices input {
  width: 84px; height: 30px; padding: 0 8px; text-align: right; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); font: 500 13px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--text);
  -moz-appearance: textfield;
}
.editor-item__prices input::-webkit-outer-spin-button,
.editor-item__prices input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.editor-item__prices input:hover { border-color: var(--text-2); }
.editor-item__prices input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.editor-item__prices input[readonly] { background: var(--surface-2); color: var(--text-2); cursor: default; }
.editor-item__prices input.is-saving { opacity: .6; }
.editor-item__prices input.is-saved { border-color: var(--ok); background: var(--ok-soft); }
.editor-item__margin { min-width: 46px; height: 30px; display: inline-flex; align-items: center; justify-content: flex-end; font: 600 12px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ok); }
.editor-item__margin.is-low { color: var(--risk); }
.editor-item__unit { height: 30px; display: inline-flex; align-items: center; font-size: 11px; color: var(--text-2); white-space: nowrap; }
.editor-item__parts { border: 0; padding: 1px 6px; border-radius: 999px; background: var(--info-soft); color: var(--info); font: 500 11px/1.4 var(--sans); cursor: pointer; }
.editor-item__nosupplier { color: var(--warn); }

.ui-action-menu__list .menu-move { padding: 6px 10px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ui-action-menu__list .menu-move label { display: grid; gap: 3px; font-size: 11px; color: var(--text-2); }
.ui-action-menu__list .menu-move select { width: 100%; height: 30px; font-size: 12px; }

.v3-parts { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.v3-parts__head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; }
.v3-parts__head .muted { font-size: 12px; }
.v3-parts__rows { display: grid; gap: 6px; }
.v3-part { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(140px, 1.4fr) 100px 120px 30px; gap: 6px; align-items: center; }
.v3-part input, .v3-part select { height: 32px; font-size: 13px; min-width: 0; width: 100%; }
.v3-part input[data-f="cost"] { text-align: right; font-variant-numeric: tabular-nums; }
.v3-part__del { height: 30px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 16px; line-height: 1; }
.v3-part__del:hover { color: var(--risk); border-color: var(--risk); }
.v3-parts__sum { font-size: 12px; margin-left: auto; }

.editor-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 8px; z-index: 2000;
  background: var(--text); color: var(--surface); font: 500 13px/1.4 var(--sans); box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  transition: opacity .16s, transform .16s;
}
.editor-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.editor-toast[data-tone="risk"] { background: var(--risk); color: #fff; }
.editor-toast[data-tone="ok"] { background: var(--ok); color: #fff; }
@media (max-width: 720px) {
  .editor-item__bar { flex-wrap: wrap; }
  .editor-item__prices { width: 100%; padding-left: 28px; }
  .editor-item__prices input { width: 100%; }
  .editor-item__prices label { flex: 1; }
  .v3-part { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .editor-item.is-just-moved { animation: none; } .editor-toast { transition: none; } }

.editor-main { min-width: 0; }
.editor-item__details { min-width: 0; }
.editor-item__details .row { flex-wrap: wrap; }
.editor-item__details .v3-pricing { min-width: 0; overflow: hidden; }
.v3-pricing [hidden], .v3-parts [hidden] { display: none !important; }
.editor-items { grid-template-columns: minmax(0, 1fr); }
.editor-items > .editor-item { min-width: 0; }


/* ─── 11/11: voos no Programa e reações do advisor e do cliente ───────────── */
.editor-item__thumb--logo { object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 3px; cursor: default; }
.editor-item__thumb--code { display: grid; place-items: center; font: 600 13px/1 var(--sans); color: var(--text-2); border-style: solid; }
.flt { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 8px; padding: 10px; background: var(--surface-2); border-radius: 8px; }
.flt label { display: grid; gap: 3px; font: 500 11px/1.2 var(--sans); color: var(--text-2); margin: 0; }
.flt input, .flt select { height: 32px; font-size: 13px; }
.flt__num input { width: 96px; text-transform: uppercase; font-weight: 600; }
.flt__ap input { width: 66px; text-transform: uppercase; }
.flt__time input { width: 104px; }
.flt__plus select { width: 138px; }
.flt__hint { flex-basis: 100%; margin: 0; font-size: 12px; display: flex; align-items: center; gap: 8px; min-height: 24px; }
.flt__hint img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; background: #fff; border: 1px solid var(--border); }
.flt--edit { margin: 10px 0 0; }
.fb { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; font: 500 11px/1.5 var(--sans); white-space: nowrap; }
.fb--love { background: var(--ok-soft); color: var(--ok); }
.fb--unsure { background: var(--warn-soft); color: var(--warn); }
.fb--remove { background: var(--risk-soft); color: var(--risk); }
.fb--note { background: var(--info-soft); color: var(--info); cursor: help; }
.fb-list { list-style: none; margin: 0; padding: 0; display: grid; }
.fb-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.fb-list li:first-child { border-top: 0; }
.fb-list__who { color: var(--text-2); }
.fb-list__item { font-weight: 500; }
.fb-list__text { flex-basis: 100%; color: var(--text-2); }
.fb-list__at { font-size: 12px; margin-left: auto; }
.sidebar__count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--risk); color: #fff; font: 600 11px/20px var(--sans); text-align: center; }
.app-shell.is-collapsed .sidebar__count { position: absolute; margin: -14px 0 0 14px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; font-size: 10px; }


/* ─── 11/11: tabelas de preços dos fornecedores ───────────────────────────── */
.prices-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.prices-filter input[type="search"] { flex: 1; min-width: 220px; max-width: 420px; }
.prices-filter select { max-width: 280px; }
.prices-scroll { max-height: calc(100vh - 300px); overflow-y: auto; }
.prices-scroll thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.v3-prices { display: grid; gap: 4px; }
.v3-prices__q { height: 32px; font-size: 13px; }
.v3-prices__list { display: grid; gap: 2px; max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px; background: var(--surface); }
.v3-prices__list p { margin: 6px 8px; font-size: 12px; }
.v3-price { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) auto; gap: 10px; align-items: baseline; text-align: left; border: 0; background: transparent; padding: 6px 8px; border-radius: 6px; font: 400 13px/1.35 var(--sans); color: var(--text); cursor: pointer; }
.v3-price:hover, .v3-price:focus-visible { background: var(--accent-soft); }
.v3-price__who { font-weight: 600; }
.v3-price__who small { font-weight: 400; color: var(--text-2); }
.v3-price__what { color: var(--text-2); }
.v3-price__cost { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 720px) { .v3-price { grid-template-columns: 1fr auto; } .v3-price__what { grid-column: 1 / -1; grid-row: 2; } }

.editor-item__prices input.is-auto { font-style: italic; color: var(--text-2); }


/* ─── 11/11: ficha do file com listas fechadas e campos obrigatórios ───────── */
.file-sidebar__field .req { color: var(--risk); }
.file-sidebar__field select.is-missing { border-color: var(--warn); background: var(--warn-soft); }
.file-sidebar__hint { font-size: 11px; color: var(--text-2); }
.file-sidebar__missing { display: block; padding: 6px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); font: 500 12px/1.4 var(--sans); text-decoration: none; }

.editor-catalog-zone select { width: 100%; height: 32px; font-size: 13px; }
.editor-catalog-panel > * { flex-shrink: 0; }
.editor-catalog-panel > .editor-catalog-list { flex-shrink: 1; min-height: 120px; }
.editor-catalog-filters { min-height: 30px; }

/* ─── Files: quadro que cabe na largura, tabela com fase e responsável (11/11/2026) ─── */
.files-owner-filter { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.files-owner-filter select { min-height: 34px; font-size: 13px; max-width: 180px; }
.files-inline-select { font-size: 12px; min-height: 30px; padding: 2px 6px; min-width: 132px; max-width: 190px; width: 100%; }
#home-view-table .table-wrap { overflow-x: auto; }
#pages-table th, #pages-table td { padding-left: 8px; padding-right: 8px; }
.files-stage-sub { margin-top: 4px; }
[data-files-status].is-error { color: var(--risk); }
.files-flag { margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--risk); }
.kanban-fit {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
@media (max-width: 1100px) { .kanban-fit { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .kanban-fit { grid-template-columns: minmax(0, 1fr); } }
.kanban-col--fit { min-height: 160px; padding: 8px; gap: 6px; }
.kanban-col--fit .kanban-col__head {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  padding: 4px 6px 6px; font-size: 12.5px; border-bottom: 1px solid var(--border);
}
.kanban-col--fit .kanban-col__head strong { font-weight: 600; line-height: 1.25; }
.kanban-col--fit .kanban-col__head span.tabular-nums { color: var(--text-2); font-weight: 600; white-space: nowrap; }
.kanban-col__n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 11px; text-align: center; color: var(--text-2); }
.kanban-col--fit { min-width: 0; }
.kanban-card--compact { position: relative; padding: 8px 9px; gap: 3px; cursor: pointer; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.kanban-card--compact.is-late { border-left: 3px solid var(--risk); }
.kc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; min-width: 0; }
.kc-ref { font-weight: 700; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kc-val { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.kc-title { font-size: 12.5px; line-height: 1.3; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-meta { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-foot { display: flex; align-items: center; gap: 8px; margin-top: 3px; padding-top: 5px; border-top: 1px dashed var(--border); font-size: 11px; color: var(--text-2); }
.kc-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.kc-move { padding: 0 6px; font-size: 13px; line-height: 20px; flex: none; }
.kc-stage { flex: 1 1 0; width: 0; min-width: 0; margin-left: auto; font-size: 11px; min-height: 24px; padding: 1px 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-2); }
.kanban-card--compact .board-quick-move-menu { right: 6px; top: calc(100% - 6px); }
.kanban-empty { font-size: 12px; color: var(--text-2); text-align: center; margin: 18px 0; }
.kanban-closed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 10px; font-size: 12px; }
.kanban-closed__zone { border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 6px 12px; font-size: 12px; color: var(--text); cursor: pointer; }
.kanban-closed__zone strong { margin-left: 4px; }

/* ─── Painel (11/11/2026) ─── */
.dash-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-who select { min-height: 34px; font-size: 13px; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.dash-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; color: var(--text); text-decoration: none; }
a.dash-kpi:hover { border-color: var(--accent); }
.dash-kpi__val { font-size: 1.55rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dash-kpi small { color: var(--text-2); font-size: 12px; }
.dash-kpi--ok .dash-kpi__val { color: var(--ok); }
.dash-kpi--warn .dash-kpi__val { color: var(--warn); }
.dash-kpi--risk .dash-kpi__val { color: var(--risk); }
.dash-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.dash-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1000px) { .dash-grid3, .dash-grid2 { grid-template-columns: minmax(0, 1fr); } }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; min-width: 0; margin-bottom: 14px; }
.dash-grid3 .dash-card, .dash-grid2 .dash-card { margin-bottom: 0; }
.dash-card--ok { border-top: 3px solid var(--ok); }
.dash-card--warn { border-top: 3px solid var(--warn); }
.dash-card--info { border-top: 3px solid var(--info); }
.dash-card--risk { border-top: 3px solid var(--risk); }
.dash-card h2 { font-size: 13px; font-weight: 600; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dash-card h2 small { font-weight: 500; color: var(--text-2); font-size: 12px; }
.dash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dash-list > li { min-width: 0; }
.dash-list .dash-badge { flex: none; }
.dash-list a { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; color: var(--text); text-decoration: none; min-width: 0; }
.dash-list a:hover { background: var(--surface-2); }
.dash-list__main { min-width: 0; flex: 1; }
.dash-list__main strong { font-size: 12.5px; }
.dash-list__main div { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-badge { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.dash-badge--ok { background: var(--ok-soft); color: var(--ok); }
.dash-badge--warn { background: var(--warn-soft); color: var(--warn); }
.dash-badge--risk { background: var(--risk-soft); color: var(--risk); }
.dash-empty { font-size: 12.5px; color: var(--text-2); margin: 6px 0; }
.dash-more { font-size: 12px; margin-top: 6px; display: inline-block; }
.inhouse { overflow-x: auto; }
.inhouse table { border-collapse: collapse; width: 100%; min-width: 760px; table-layout: fixed; font-size: 11px; }
.inhouse th, .inhouse td { border-bottom: 1px solid var(--border); padding: 0; height: 26px; text-align: center; }
.inhouse th { font-weight: 500; color: var(--text-2); height: 30px; line-height: 1.1; }
.inhouse .ih-name { width: 190px; text-align: left; padding: 0 8px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inhouse .ih-name a { color: var(--text); font-weight: 600; }
.inhouse .ih-name span { color: var(--text-2); font-weight: 400; }
.inhouse .is-weekend { background: var(--surface-2); }
.inhouse .is-today { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
.inhouse .ih-bar { display: block; height: 18px; margin: 0 1px; border-radius: 5px; background: var(--ok); color: var(--on-solid); font-size: 10.5px; font-weight: 600; line-height: 18px; text-align: left; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
.inhouse .ih-bar--proposal { background: transparent; color: var(--text-2); border: 1.5px dashed var(--text-2); line-height: 15px; }
.inhouse .ih-bar.cut-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.inhouse .ih-bar.cut-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.inhouse tfoot td { color: var(--text-2); font-weight: 600; border-bottom: 0; }
.dash-legend { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--text-2); margin-top: 8px; flex-wrap: wrap; }
.dash-legend i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; background: var(--ok); vertical-align: middle; margin-right: 5px; }
.dash-legend i.dash-legend--proposal { background: transparent; border: 1.5px dashed var(--text-2); }
.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dash-table th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.dash-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dash-table td.num, .dash-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-table tr.is-late td:first-child { color: var(--risk); font-weight: 600; }

/* ─── Leitura do brief (11/11/2026) ─── */
.brief-reading { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--border); border-left: 3px solid var(--ok); border-radius: 8px; background: var(--surface); font-size: 13px; }
.brief-reading--warn { border-left-color: var(--warn); background: var(--warn-soft); }
.brief-reading summary { cursor: pointer; }
.brief-reading ul { margin: 2px 0 0 18px; padding: 0; }

/* Files: ações dentro da primeira coluna, para a tabela caber sem scroll (11/11/2026) */
.file-row-links { display: flex; gap: 10px; margin-top: 4px; font-size: 12px; }
.file-row-links a { color: var(--accent); font-weight: 600; text-decoration: none; }
.file-row-links a:hover { text-decoration: underline; }
#pages-table .files-inline-select { min-width: 0; max-width: 170px; }
#pages-table td:first-child { min-width: 150px; max-width: 220px; overflow-wrap: anywhere; }

/* Editor: nome do serviço inteiro e resumo da descrição, para confirmar a escolha (11/11/2026) */
.editor-item__title { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; overflow-wrap: anywhere; }
.editor-item__meta { white-space: normal; overflow: visible; text-overflow: clip; }
.editor-item__desc { font-size: 12px; line-height: 1.4; color: var(--text-2); margin: 2px 0 3px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
