/* ============================================================
   Pessoal — tokens de tema
   ============================================================ */
:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f2f2f4;
  --surface-3: #e9e9ec;
  --border: #e3e3e8;
  --border-strong: #cfcfd6;
  --text: #17171c;
  --text-2: #55555f;
  --text-3: #8a8a96;
  --accent: #0f7a5c;
  --accent-hover: #0b6249;
  --accent-soft: #e2f2ec;
  --accent-text: #ffffff;
  --focus: rgba(15, 122, 92, 0.35);
  --danger: #d23b3b;
  --danger-soft: #fdeeee;
  --ok: #138a4f;
  --ok-soft: #e7f6ee;
  --warn: #b26b00;
  --warn-soft: #fff4e0;
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, 0.06);
  --shadow: 0 4px 16px rgba(16, 16, 24, 0.08), 0 1px 3px rgba(16, 16, 24, 0.06);
  --shadow-lg: 0 24px 64px rgba(16, 16, 24, 0.18), 0 2px 8px rgba(16, 16, 24, 0.08);
  --overlay: rgba(20, 20, 28, 0.38);

  --st-aberto: #2f6fdb;
  --st-em_andamento: #6247f5;
  --st-pausado: #b26b00;
  --st-concluido: #138a4f;
  --st-cancelado: #8a8a96;
  --pr-urgente: #d23b3b;
  --pr-alta: #e5701f;
  --pr-media: #6b7a90;
  --pr-baixa: #a0a7b4;

  --series-1: #2a78d6;
  --series-2: #eb6834;

  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-w: 248px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #111114;
    --surface: #18181c;
    --surface-2: #202026;
    --surface-3: #2a2a31;
    --border: #2a2a31;
    --border-strong: #3a3a44;
    --text: #ededf0;
    --text-2: #a9a9b4;
    --text-3: #75757f;
    --accent: #4fd1a5;
    --accent-hover: #6fdcb6;
    --accent-soft: #173229;
    --accent-text: #06231a;
    --focus: rgba(79, 209, 165, 0.45);
    --danger: #ef6464;
    --danger-soft: #3a1c1e;
    --ok: #3fbf7f;
    --ok-soft: #15301f;
    --warn: #e6a23c;
    --warn-soft: #33270f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
    --overlay: rgba(0, 0, 0, 0.55);
    --st-aberto: #5b93f0;
    --st-em_andamento: #8b77ff;
    --st-pausado: #e6a23c;
    --st-concluido: #3fbf7f;
    --st-cancelado: #75757f;
    --pr-urgente: #ef6464;
    --pr-alta: #f08a45;
    --pr-media: #8a97ab;
    --pr-baixa: #5f6672;
    --series-1: #3987e5;
    --series-2: #d95926;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #111114;
  --surface: #18181c;
  --surface-2: #202026;
  --surface-3: #2a2a31;
  --border: #2a2a31;
  --border-strong: #3a3a44;
  --text: #ededf0;
  --text-2: #a9a9b4;
  --text-3: #75757f;
  --accent: #4fd1a5;
  --accent-hover: #6fdcb6;
  --accent-soft: #173229;
  --accent-text: #06231a;
  --focus: rgba(79, 209, 165, 0.45);
  --danger: #ef6464;
  --danger-soft: #3a1c1e;
  --ok: #3fbf7f;
  --ok-soft: #15301f;
  --warn: #e6a23c;
  --warn-soft: #33270f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --overlay: rgba(0, 0, 0, 0.55);
  --st-aberto: #5b93f0;
  --st-em_andamento: #8b77ff;
  --st-pausado: #e6a23c;
  --st-concluido: #3fbf7f;
  --st-cancelado: #75757f;
  --pr-urgente: #ef6464;
  --pr-alta: #f08a45;
  --pr-media: #8a97ab;
  --pr-baixa: #5f6672;
  --series-1: #3987e5;
  --series-2: #d95926;
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
.oculto { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd {
  font: 11px/1 var(--mono);
  padding: 2px 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-2);
}
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }

/* ============================================================
   Controles
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primario { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primario:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-perigo { color: var(--danger); }
.btn-perigo:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-perigo-cheio { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-fantasma { border-color: transparent; background: transparent; }
.btn-fantasma:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn-icone { width: 32px; padding: 0; justify-content: center; }
.btn-icone.btn-sm { width: 26px; }
.btn svg, .icone { width: 16px; height: 16px; flex: none; }

.campo, .select {
  height: 32px; padding: 0 10px; width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); outline: none;
}
.campo:focus, .select:focus, textarea.campo:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
textarea.campo { height: auto; min-height: 120px; padding: 10px; resize: vertical; line-height: 1.55; }
.rotulo { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 4px; }
.check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin: 0; }

/* ============================================================
   Layout
   ============================================================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }
.sidebar {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-right: 1px solid var(--border);
}
.sidebar-topo { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.marca { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; color: var(--text); flex: 1; }
.marca:hover { text-decoration: none; }
.marca-logo {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font-size: 13px; font-weight: 700;
}
.busca-atalho {
  display: flex; align-items: center; gap: 8px; margin: 0 10px 8px; height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
  color: var(--text-3); cursor: pointer; font-size: 13px; text-align: left;
}
.busca-atalho:hover { border-color: var(--border-strong); }
.busca-atalho span { flex: 1; }
.nav { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.nav-secao { margin-top: 14px; }
.nav-titulo {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-3);
}
.nav-item {
  display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px;
  border-radius: 6px; color: var(--text-2); font-weight: 500; cursor: pointer; font-size: 13px;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.ativo { background: var(--accent-soft); color: var(--accent); }
.nav-item .nav-rotulo { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .contador { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.nav-item.ativo .contador { color: var(--accent); }
.nav-item .contador.alerta { color: var(--danger); font-weight: 600; }
.nav-item .remover { opacity: 0; }
.nav-item:hover .remover { opacity: 1; }
.ponto { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sidebar-rodape { border-top: 1px solid var(--border); padding: 8px; display: flex; gap: 4px; align-items: center; }
.sidebar-rodape .btn { flex: 1; justify-content: flex-start; }

.timer-widget {
  margin: 8px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid var(--accent); display: flex; align-items: center; gap: 10px;
}
.timer-widget .info { flex: 1; min-width: 0; cursor: pointer; }
.timer-widget .titulo { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-widget .tempo { font: 600 16px/1.2 var(--mono); color: var(--accent); }
.pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulso 1.6s infinite; flex: none; }
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.vista { display: contents; }
.principal { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.cabecalho {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 24px;
  border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap;
}
.cabecalho h1 { font-size: 16px; font-weight: 650; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cabecalho .acoes { display: flex; gap: 8px; align-items: center; }
.conteudo { flex: 1; overflow: auto; min-height: 0; }
.menu-mobile { display: none; }

/* ============================================================
   Toolbar de filtros
   ============================================================ */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.toolbar .busca { position: relative; flex: 1 1 220px; max-width: 340px; }
.toolbar .busca .campo { padding-left: 32px; }
.toolbar .busca svg { position: absolute; left: 10px; top: 8px; color: var(--text-3); }
.chip-filtro {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border: 1px dashed var(--border-strong); border-radius: 999px; background: transparent;
  color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.chip-filtro:hover { border-color: var(--accent); color: var(--text); }
.chip-filtro.ativo { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip-filtro .x { margin-right: -4px; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; }
.chip-filtro .x:hover { background: var(--accent); color: var(--accent-text); }
.segmentado { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.segmentado button {
  height: 30px; padding: 0 10px; border: 0; background: var(--surface); color: var(--text-2);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500;
}
.segmentado button + button { border-left: 1px solid var(--border); }
.segmentado button.ativo { background: var(--surface-3); color: var(--text); }
.espaco { flex: 1; }

/* ============================================================
   Tabela
   ============================================================ */
.tabela { width: 100%; border-collapse: separate; border-spacing: 0; }
.tabela th {
  position: sticky; top: 0; z-index: 1; background: var(--bg);
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3);
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}
.tabela th.ordenavel { cursor: pointer; }
.tabela th.ordenavel:hover { color: var(--text); }
.tabela th.ordenado { color: var(--accent); }
.tabela td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; background: var(--surface); }
.tabela tr.linha { cursor: pointer; }
.tabela tr.linha:hover td { background: var(--surface-2); }
.tabela tr.foco td { background: var(--surface-2); box-shadow: inset 0 0 0 0 transparent; }
.tabela tr.foco td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tabela tr.selecionada td { background: var(--accent-soft); }
.tabela .col-check { width: 36px; padding-left: 24px; }
.tabela .col-id { width: 56px; color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.tabela .col-titulo { min-width: 260px; }
.tabela .col-tempo { text-align: right; padding-right: 24px; font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.titulo-linha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.titulo-linha .t { font-weight: 500; color: var(--text); }
.concluida .titulo-linha .t { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.metas { display: inline-flex; gap: 10px; color: var(--text-3); font-size: 12px; align-items: center; }
.metas span { display: inline-flex; align-items: center; gap: 3px; }
.metas svg { width: 13px; height: 13px; }
.vazio { padding: 64px 24px; text-align: center; color: var(--text-3); }
.vazio h3 { color: var(--text); font-size: 15px; margin: 12px 0 4px; }
.vazio .vazio-icone { width: 44px; height: 44px; margin: 0 auto; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); }
.mais-itens { padding: 12px 24px; color: var(--text-3); font-size: 12px; }

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
}
.badge .ponto { width: 7px; height: 7px; }
.status-aberto .ponto { background: var(--st-aberto); }
.status-em_andamento .ponto { background: var(--st-em_andamento); }
.status-pausado .ponto { background: var(--st-pausado); }
.status-concluido .ponto { background: var(--st-concluido); }
.status-cancelado .ponto { background: var(--st-cancelado); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.prio-barras { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.prio-barras i { width: 3px; border-radius: 1px; background: var(--border-strong); }
.prio-barras i:nth-child(1) { height: 5px; }
.prio-barras i:nth-child(2) { height: 8px; }
.prio-barras i:nth-child(3) { height: 12px; }
.prio-baixa .prio-barras i:nth-child(-n + 1) { background: var(--pr-baixa); }
.prio-media .prio-barras i:nth-child(-n + 2) { background: var(--pr-media); }
.prio-alta .prio-barras i { background: var(--pr-alta); }
.prio-urgente { color: var(--pr-urgente); font-weight: 600; }
.prio-urgente .prio-barras { display: none; }
.prio-urgente::before { content: '!'; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 3px; background: var(--pr-urgente); color: #fff; font-size: 10px; font-weight: 800; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px;
  border-radius: 999px; font-size: 11.5px; font-weight: 500;
  border: 1px solid var(--border); color: var(--text-2); background: var(--surface);
}
.tag .ponto { width: 6px; height: 6px; }
.tag .x { cursor: pointer; color: var(--text-3); margin-right: -3px; }
.tag .x:hover { color: var(--danger); }
.prazo { font-size: 12.5px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.prazo.atrasado { color: var(--danger); font-weight: 600; }
.prazo.hoje { color: var(--warn); font-weight: 600; }
.progresso { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.progresso-barra { width: 36px; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.progresso-barra i { display: block; height: 100%; background: var(--ok); }

/* ============================================================
   Barra de ações em lote
   ============================================================ */
.barra-lote {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 14px;
  background: var(--text); color: var(--bg); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.barra-lote .n { font-weight: 600; margin-right: 6px; white-space: nowrap; }
.barra-lote .btn { background: transparent; border-color: transparent; color: var(--bg); }
.barra-lote .btn:hover { background: rgba(127, 127, 127, 0.25); }

/* ============================================================
   Kanban
   ============================================================ */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; padding: 16px 24px; min-height: 100%; align-items: start; }
.coluna { background: var(--surface-2); border-radius: var(--radius-lg); padding: 10px; min-height: 120px; }
.coluna.alvo { outline: 2px dashed var(--accent); outline-offset: -2px; }
.coluna-topo { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-weight: 600; font-size: 13px; }
.coluna-topo .contador { color: var(--text-3); font-weight: 500; }
.cartao {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow-sm);
}
.cartao:hover { border-color: var(--border-strong); }
.cartao.arrastando { opacity: 0.4; }
.cartao .topo { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-bottom: 4px; font-family: var(--mono); }
.cartao .t { font-weight: 500; margin-bottom: 8px; overflow-wrap: anywhere; }
.cartao .rodape { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ============================================================
   Página do chamado
   ============================================================ */
.chamado { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 100%; }
.chamado-corpo { padding: 28px 40px 80px; max-width: 900px; width: 100%; }
.chamado-lado { border-left: 1px solid var(--border); background: var(--surface); padding: 20px; }
.titulo-edit {
  width: 100%; border: 0; background: transparent; font-size: 24px; font-weight: 650; line-height: 1.3;
  padding: 4px 6px; margin: 0 -6px 4px; border-radius: 6px; resize: none; overflow: hidden; outline: none;
}
.titulo-edit:hover { background: var(--surface-2); }
.titulo-edit:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--focus); }
.secao { margin-top: 28px; }
.secao-topo { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.secao-topo h2 { font-size: 13px; font-weight: 600; margin: 0; color: var(--text); }
.secao-topo .muted { font-size: 12px; }
.secao-topo .espaco { flex: 1; }
.descricao-view { padding: 8px 10px; margin: 0 -10px; border-radius: 6px; cursor: text; min-height: 40px; overflow-wrap: anywhere; }
.descricao-view:hover { background: var(--surface-2); }
.descricao-view.vazia { color: var(--text-3); }
.md p { margin: 0 0 10px; }
.md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { font-size: 15px; margin: 16px 0 8px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md code { font: 12.5px var(--mono); background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.md pre { background: var(--surface-2); border: 1px solid var(--border); padding: 12px; border-radius: var(--radius); overflow: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.md-ajuda { font-size: 12px; color: var(--text-3); margin-top: 6px; display: flex; gap: 8px; align-items: center; }

.subtarefas { list-style: none; margin: 0; padding: 0; }
.subtarefa { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 6px; }
.subtarefa:hover { background: var(--surface-2); }
.subtarefa .texto { flex: 1; border: 0; background: transparent; padding: 2px 4px; border-radius: 4px; outline: none; min-width: 0; }
.subtarefa .texto:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--focus); }
.subtarefa.feita .texto { color: var(--text-3); text-decoration: line-through; }
.subtarefa .alca { cursor: grab; color: var(--text-3); opacity: 0; }
.subtarefa:hover .alca, .subtarefa:hover .remover { opacity: 1; }
.subtarefa .remover { opacity: 0; }
.subtarefa.arrastando { opacity: 0.4; }
.nova-subtarefa { display: flex; gap: 8px; margin-top: 6px; }
.barra-progresso { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; flex: 0 0 80px; }
.barra-progresso i { display: block; height: 100%; background: var(--ok); transition: width 0.2s; }

.anexos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.anexo { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); position: relative; }
.anexo .miniatura { height: 96px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); overflow: hidden; }
.anexo .miniatura img { width: 100%; height: 100%; object-fit: cover; }
.anexo .info { padding: 6px 8px; font-size: 12px; }
.anexo .nome { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; }
.anexo .remover { position: absolute; top: 6px; right: 6px; opacity: 0; background: var(--surface); }
.anexo:hover .remover { opacity: 1; }
.zona-upload {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 14px;
  text-align: center; color: var(--text-3); font-size: 12.5px; cursor: pointer; margin-top: 10px;
}
.zona-upload:hover, .zona-upload.alvo { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.comentario-novo { display: flex; gap: 10px; align-items: flex-start; }
.comentario-novo textarea { min-height: 70px; }
.timeline { list-style: none; padding: 0; margin: 16px 0 0; }
.timeline li { display: flex; gap: 10px; padding: 6px 0; }
.timeline .marcador { width: 24px; flex: none; display: flex; justify-content: center; padding-top: 7px; }
.timeline .marcador i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.timeline .evento { font-size: 12.5px; color: var(--text-2); }
.timeline .evento time { color: var(--text-3); margin-left: 6px; }
.comentario { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.comentario .topo { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-3); }
.comentario .topo .espaco { flex: 1; }
.comentario .corpo { padding: 10px 12px; overflow-wrap: anywhere; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.origem { font-size: 10.5px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); text-transform: uppercase; letter-spacing: 0.03em; }

.propriedades { display: grid; gap: 14px; }
.prop .rotulo { margin-bottom: 4px; }
.tags-editor { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 5px; min-height: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); position: relative; }
.tags-editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.tags-editor input { border: 0; outline: none; background: transparent; flex: 1; min-width: 80px; height: 22px; padding: 0 4px; }
.cronometro-caixa { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
.cronometro-caixa .tempo { font: 600 22px/1.2 var(--mono); margin-bottom: 8px; }
.cronometro-caixa.rodando { border-color: var(--accent); background: var(--accent-soft); }
.cronometro-caixa.rodando .tempo { color: var(--accent); }
.datas { font-size: 12px; color: var(--text-3); display: grid; gap: 2px; border-top: 1px solid var(--border); padding-top: 14px; }

/* ============================================================
   Calendário
   ============================================================ */
.calendario-wrap { display: grid; grid-template-columns: 1fr 240px; min-height: 100%; }
.calendario { padding: 16px 24px; }
.cal-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-semana { padding: 6px 8px; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; background: var(--surface-2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-dia { min-height: 112px; padding: 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-dia.fora { background: var(--bg); }
.cal-dia.fora .cal-num { color: var(--text-3); }
.cal-dia.alvo { background: var(--accent-soft); }
.cal-num { font-size: 12px; font-weight: 600; padding: 2px 4px; color: var(--text-2); }
.cal-dia.hoje .cal-num { color: var(--accent-text); background: var(--accent); border-radius: 999px; align-self: flex-start; min-width: 22px; text-align: center; }
.cal-item {
  display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 6px; border-radius: 4px;
  background: var(--surface-2); cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-left: 3px solid var(--pr-media);
}
.cal-item:hover { background: var(--surface-3); }
.cal-item .t { overflow: hidden; text-overflow: ellipsis; }
.cal-item.pr-urgente { border-left-color: var(--pr-urgente); }
.cal-item.pr-alta { border-left-color: var(--pr-alta); }
.cal-item.pr-baixa { border-left-color: var(--pr-baixa); }
.cal-item.feito { opacity: 0.5; text-decoration: line-through; }
.cal-item.atrasado { color: var(--danger); }
.cal-lado { border-left: 1px solid var(--border); background: var(--surface); padding: 16px; overflow: auto; }
.cal-lado h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); margin: 0 0 8px; }
.cal-lado .cal-item { margin-bottom: 4px; }

/* ============================================================
   Dashboard
   ============================================================ */
.dash { padding: 20px 24px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; }
.kpi .r { font-size: 12px; color: var(--text-2); font-weight: 500; }
.kpi .v { font-size: 26px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi .s { font-size: 12px; color: var(--text-3); }
.kpi.alerta .v { color: var(--danger); }
.paineis { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.painel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; min-width: 0; }
.painel h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.painel .sub { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }
.legenda { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 10px; height: 10px; border-radius: 3px; }
.grafico { width: 100%; height: auto; display: block; overflow: visible; }
.grafico .eixo { fill: var(--text-3); font-size: 11px; }
.grafico .grade { stroke: var(--border); stroke-width: 1; }
.grafico .s1 { fill: var(--series-1); }
.grafico .s2 { fill: var(--series-2); }
.grafico .hit { fill: transparent; }
.grafico .hit:hover { fill: var(--surface-3); opacity: 0.6; }
.barras-h { display: grid; gap: 8px; }
.barra-h { display: grid; grid-template-columns: minmax(80px, 140px) 1fr 64px; gap: 10px; align-items: center; font-size: 12.5px; }
.barra-h .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.barra-h .trilho { height: 10px; }
.barra-h .trilho i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; }
.barra-h .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 500; }
.tooltip {
  position: fixed; z-index: 80; pointer-events: none; background: var(--text); color: var(--bg);
  padding: 6px 10px; border-radius: 6px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap;
}
.tabela-dados { margin-top: 10px; font-size: 12px; }
.tabela-dados summary { cursor: pointer; color: var(--text-3); }
.tabela-dados table { border-collapse: collapse; margin-top: 6px; }
.tabela-dados td, .tabela-dados th { padding: 3px 10px 3px 0; text-align: left; font-variant-numeric: tabular-nums; }

/* ============================================================
   Overlays: modal, paleta, menu, toast
   ============================================================ */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; animation: aparecer 0.12s ease-out; }
@keyframes aparecer { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 76vh; display: flex; flex-direction: column; animation: subir 0.14s ease-out; }
@keyframes subir { from { transform: translateY(6px); opacity: 0; } }
.modal-topo { padding: 16px 18px 0; font-weight: 600; font-size: 15px; }
.modal-corpo { padding: 14px 18px; overflow: auto; display: grid; gap: 12px; }
.modal-rodape { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.modal-rodape .espaco { flex: 1; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.novo-titulo { font-size: 17px; font-weight: 600; border: 0; outline: none; background: transparent; width: 100%; padding: 2px 0; }
.novo-descricao { border: 0; outline: none; background: transparent; width: 100%; resize: none; min-height: 60px; color: var(--text-2); }

.paleta { max-width: 620px; }
.paleta-busca { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.paleta-busca input { flex: 1; height: 52px; border: 0; outline: none; background: transparent; font-size: 16px; }
.paleta-lista { overflow: auto; padding: 6px; max-height: 52vh; }
.paleta-grupo { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px 4px; }
.paleta-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.paleta-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paleta-item .id { font: 12px var(--mono); color: var(--text-3); }
.paleta-item.ativo { background: var(--accent-soft); color: var(--accent); }
.paleta-item kbd { margin-left: 2px; }
.paleta-rodape { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); }

.menu {
  position: fixed; z-index: 60; min-width: 180px; max-width: 280px; max-height: 320px; overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px;
}
.menu-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; cursor: pointer; font-size: 13px; }
.menu-item:hover, .menu-item.ativo { background: var(--surface-2); }
.menu-item .marcado { margin-left: auto; color: var(--accent); }
.menu-sep { height: 1px; background: var(--border); margin: 4px 0; }
.menu input.campo { margin-bottom: 4px; }

.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 90; display: grid; gap: 8px; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 12px; align-items: center; animation: subir 0.15s ease-out; max-width: 380px; }
.toast.erro { background: var(--danger); color: #fff; }
.toast button { background: none; border: 0; color: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }

.atalhos-lista { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; font-size: 13px; }
.atalhos-lista div:nth-child(even) { text-align: right; }

/* ============================================================
   Login
   ============================================================ */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-caixa { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.login-caixa .marca { margin-bottom: 20px; }
.login-caixa h1 { font-size: 18px; margin: 0 0 4px; }
.login-caixa p { margin: 0 0 18px; color: var(--text-3); font-size: 13px; }
.login-caixa .btn { width: 100%; justify-content: center; height: 38px; margin-top: 12px; }
.login-caixa .campo { height: 38px; }
.erro-msg { color: var(--danger); font-size: 12.5px; margin-top: 10px; min-height: 18px; }

.carregando { padding: 48px; text-align: center; color: var(--text-3); }

/* ============================================================
   Agente (Ferofinha)
   ============================================================ */
.presenca { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); display: inline-block; }
.presenca-trabalhando { background: var(--accent); animation: pulso 1.6s infinite; }
.presenca-online { background: var(--ok); }
.presenca-ocioso { background: var(--warn); }
.presenca-offline, .presenca-nunca_conectado { background: var(--border-strong); }
.agente { padding: 20px 24px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.agente-identidade { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.agente-identidade h1 { flex: none; }
.agente-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #d4459f); color: #fff; font-weight: 750; font-size: 16px; flex: none; }
.agente-status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.agente-aviso { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-lg); border: 1px dashed var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 13px; }
.agente-aviso strong { color: var(--text); }
.agente-grade { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.agente-quadro { display: grid; gap: 20px; }
.agente-coluna .secao-topo { margin-bottom: 8px; }
.agente-cartao { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.agente-cartao.ativ-fazendo { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.agente-cartao.ativ-feita, .agente-cartao.ativ-cancelada { opacity: 0.85; }
.agente-cartao-topo { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 4px; }
.agente-cartao-titulo { font-weight: 550; overflow-wrap: anywhere; }
.agente-cartao-detalhe { font-size: 12.5px; color: var(--text-2); margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.agente-resultado { font-size: 12.5px; margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: var(--ok-soft); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.agente-resultado.ruim { background: var(--danger-soft); }
.agente-cartao-rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; }
.agente-chamado { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.agente-vazio { padding: 14px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-3); font-size: 12.5px; text-align: center; }
.ativ-badge { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.ativ-badge.ativ-fazendo { background: var(--accent-soft); color: var(--accent); }
.ativ-badge.ativ-feita { background: var(--ok-soft); color: var(--ok); }
.ativ-badge.ativ-falhou { background: var(--danger-soft); color: var(--danger); }
.ativ-badge .pulso { width: 6px; height: 6px; }
.agente-feed { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 14px 6px; position: sticky; top: 0; max-height: calc(100vh - 120px); overflow: auto; }
.feed-pulso { width: 7px; height: 7px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { padding: 8px 0 8px 12px; border-left: 2px solid var(--border-strong); margin-left: 4px; }
.feed-item + .feed-item { border-top: 1px solid var(--border); }
.feed-item.nivel-sucesso { border-left-color: var(--ok); }
.feed-item.nivel-erro { border-left-color: var(--danger); }
.feed-item.nivel-aviso { border-left-color: var(--warn); }
.feed-item.novo { animation: destacar 2.4s ease-out; }
@keyframes destacar { from { background: var(--accent-soft); } to { background: transparent; } }
.feed-texto { font-size: 13px; overflow-wrap: anywhere; }
.feed-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.indicador-agente { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, var(--accent), #d4459f); color: #fff; font-size: 10px; font-weight: 800; flex: none; }
.agente-no-chamado { display: grid; gap: 6px; }
.agente-no-chamado .agente-cartao { margin-bottom: 0; }
@media (max-width: 1100px) {
  .agente-grade { grid-template-columns: 1fr; }
  .agente-feed { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .agente { padding: 16px; }
  .agente-status .muted { display: none; }
  .agente-quadro, .agente-coluna { min-width: 0; }
}

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 1100px) {
  .chamado { grid-template-columns: 1fr; }
  .chamado-lado { border-left: 0; border-top: 1px solid var(--border); order: -1; }
  .propriedades { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .calendario-wrap { grid-template-columns: 1fr; }
  .cal-lado { border-left: 0; border-top: 1px solid var(--border); }
  .tabela .col-solicitante { display: none; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform 0.18s; box-shadow: var(--shadow-lg); }
  .app.menu-aberto .sidebar { transform: none; }
  .app.menu-aberto::after { content: ''; position: fixed; inset: 0; background: var(--overlay); z-index: 35; }
  .menu-mobile { display: inline-flex; }
  .cabecalho, .toolbar { padding-left: 16px; padding-right: 16px; }
  .tabela .col-cliente, .tabela .col-tempo, .tabela .col-prio, .tabela .col-id { display: none; }
  .tabela .col-check { padding-left: 16px; }
  .tabela .col-titulo { min-width: 0; }
  .kanban { grid-template-columns: repeat(4, 82vw); overflow-x: auto; padding: 12px 16px; }
  .chamado-corpo { padding: 20px 16px 64px; }
  .titulo-edit { font-size: 20px; }
  .calendario { padding: 12px 8px; }
  .cal-dia { min-height: 64px; }
  .cal-item .t { display: none; }
  .cal-item { padding: 0; height: 6px; border-left-width: 0; background: var(--pr-media); }
  .cal-item.pr-urgente { background: var(--pr-urgente); }
  .cal-item.pr-alta { background: var(--pr-alta); }
  .dash { padding: 16px; }
  .paineis { grid-template-columns: 1fr; }
  .grade-2 { grid-template-columns: 1fr; }
  .barra-lote { left: 8px; right: 8px; transform: none; overflow-x: auto; bottom: 12px; }
  .overlay { padding-top: 8vh; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
}
/* Escritório 3D da Ferofinha */
.escritorio-cena {
  position: relative;
  margin: 18px 24px 0;
  height: min(64vh, 610px);
  min-height: 390px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, #d19a70);
  border-radius: 22px;
  overflow: hidden;
  background: #f3e8dc;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.escritorio-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.escritorio-canvas:active { cursor: grabbing; }
.escritorio-overlay { position: absolute; z-index: 2; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
.escritorio-overlay.topo { top: 16px; }
.escritorio-overlay.base { bottom: 16px; align-items: end; }
.escritorio-sinal { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #ffffffb8; border-radius: 999px; background: #fffaf0dc; backdrop-filter: blur(10px); color: #685248; font-size: 10px; font-weight: 750; letter-spacing: .09em; box-shadow: 0 4px 18px #7357421a; }
.escritorio-sinal .pulso { width: 7px; height: 7px; background: #6d9b79; }
.escritorio-ajuda { padding: 8px 11px; border-radius: 999px; color: #6d5a4d; background: #fffaf0b8; backdrop-filter: blur(8px); font-size: 11px; }
.escritorio-legenda { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid #ffffffbd; border-radius: 999px; background: #fffaf0e8; backdrop-filter: blur(10px); color: #53433c; font-size: 12px; font-weight: 650; box-shadow: 0 4px 18px #7357421a; }
.escritorio-presencinha { padding-right: 9px; border-right: 1px solid #ddcfc3; color: #966048; }
.escritorio-presenca { display: inline-flex; align-items: center; gap: 7px; }
.escritorio-atividade { display: flex; flex-direction: column; align-items: end; gap: 6px; max-width: min(48%, 420px); }
.escritorio-chip { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; border-radius: 12px; background: #fffaf0e8; border: 1px solid #ffffffba; color: #584940; font-size: 12px; box-shadow: 0 4px 16px #73574214; backdrop-filter: blur(8px); }
.escritorio-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.escritorio-chip .pulso { width: 6px; height: 6px; flex: none; }
.escritorio-chip.ocio { color: #76675c; }
.escritorio-resumo { display: grid; grid-template-columns: repeat(3, minmax(100px, 150px)) minmax(240px, 1fr); gap: 10px; padding: 14px 24px 28px; }
.escritorio-mini, .escritorio-fila { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.escritorio-mini { min-height: 75px; padding: 13px 15px; display: flex; flex-direction: column; justify-content: space-between; color: var(--text-2); font-size: 12px; }
.escritorio-mini strong { color: var(--text); font-size: 23px; line-height: 1; }
.escritorio-fila { padding: 12px 14px; min-width: 0; }
.escritorio-fila h2 { margin: 0 0 6px; font-size: 12px; font-weight: 650; }
.escritorio-fila ul { list-style: none; display: grid; gap: 5px; margin: 0; padding: 0; }
.escritorio-fila li { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-2); font-size: 12px; }
.escritorio-fila li > span:nth-child(2) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; }
.escritorio-fila li a { color: var(--accent); flex: none; }
.escritorio-fila-ponto { width: 6px; height: 6px; border-radius: 50%; background: #d19a70; flex: none; }
.escritorio-fila p { margin: 0; font-size: 12px; }
@media (max-width: 900px) {
  .escritorio-resumo { grid-template-columns: repeat(3, minmax(80px, 1fr)); }
  .escritorio-fila { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .escritorio-cena { margin: 12px 12px 0; height: 56vh; min-height: 350px; border-radius: 16px; }
  .escritorio-overlay { left: 10px; right: 10px; }
  .escritorio-overlay.topo { top: 10px; align-items: flex-start; }
  .escritorio-overlay.base { bottom: 10px; flex-direction: column-reverse; align-items: stretch; }
  .escritorio-ajuda { max-width: 145px; text-align: right; font-size: 10px; }
  .escritorio-legenda { align-self: flex-start; font-size: 11px; }
  .escritorio-atividade { max-width: 100%; align-items: stretch; }
  .escritorio-chip { padding: 7px 10px; font-size: 11px; }
  .escritorio-resumo { grid-template-columns: repeat(3, 1fr); padding: 12px 12px 22px; gap: 7px; }
  .escritorio-mini { padding: 10px; min-height: 65px; font-size: 10px; }
  .escritorio-mini strong { font-size: 20px; }
  .escritorio-fila { padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .escritorio-sinal .pulso, .escritorio-chip .pulso { animation: none; }
}

/* The office is a fixed dollhouse view; keep the entire floor plan comfortably in frame. */
.escritorio-cena {
  height: min(74vh, 760px);
  min-height: 470px;
  background: linear-gradient(145deg, #e8d9cb, #d4c0ad);
  border-color: #c8ad97;
  box-shadow: 0 18px 42px #68472e24, inset 0 1px #fff9;
}
.escritorio-canvas,
.escritorio-canvas:active { cursor: default; touch-action: auto; }
.escritorio-overlay.topo { justify-content: flex-start; }
.escritorio-sinal { box-shadow: 0 8px 22px #66442d20; }
.escritorio-clima {
  display: inline-flex; align-items: center; gap: 9px; max-width: min(58vw, 590px); padding: 9px 13px;
  border: 1px solid #ffffffbd; border-radius: 999px; background: #fffaf0e8; backdrop-filter: blur(10px);
  color: #685248; font-size: 11px; font-weight: 650; box-shadow: 0 8px 22px #66442d20; pointer-events: auto;
}
.escritorio-clima span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.escritorio-clima a { flex: none; color: #8c624c; font-size: 10px; text-decoration: underline; text-underline-offset: 2px; }
.escritorio-clima.clima-chuva { background: #f4f7f6e8; }
.escritorio-chip { box-shadow: 0 8px 20px #66442d20; }
@media (max-width: 760px) {
  .escritorio-cena { height: 66vh; min-height: 380px; }
  .escritorio-clima { max-width: min(57vw, 380px); padding: 8px 10px; font-size: 10px; gap: 6px; }
}
