/* Chamados e O.S. no padrão da Suíte: tokens, casca e componentes iguais aos do desktop do Centro de Custos
   (public/d/css) e do celular (/m/). Carregado depois de app.css e navigation.css. */
:root {
  color-scheme: light;
  --bg: #f2f8fa;
  --surface: #fefefe;
  --text: #0b2530;
  --muted: #5d7480;
  --line: #d6e4e9;
  --primary: #0a7896;
  --brand: #0a7896;
  --on-brand: #fefefe;
  --cyan: #12a9d1;
  --soft: #e8f8fc;
  --nav: #031f29;
  --good: #1d7a4f;
  --good-bg: #e3f6ec;
  --warn: #8a5200;
  --warn-bg: #fff5d9;
  --warn-bar: #e0a33a;
  --bad: #b8452c;
  --bad-bg: #fdecea;
  --out: #a24a12;
  --out-bg: #fdf0e6;
  --neutral-bg: #eef1f3;
  --neutral: #3f5a66;
  --field: #6f8f9b;
  --focus: #0a7896;
  --neutral-500: #8fa6b0;
  --shadow-sm: 0 0 0 1px #d6e4e9;
  --shadow-pop: 0 0 0 1px #d6e4e9, 0 18px 40px rgba(3, 31, 41, .16);
  --radius: 14px;
  --side-w: 236px;
  --top-h: 64px;
  --drawer-w: 500px;
  --font: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
}
:root[data-theme='escuro'] {
  color-scheme: dark;
  --bg: #031f29;
  --surface: #0b2f3b;
  --text: #f2f8fa;
  --muted: #b9d4dd;
  --line: #164656;
  --primary: #5fd0ee;
  --soft: #0a3a48;
  --nav: #021820;
  --good: #3ccf8e;
  --good-bg: rgba(60, 207, 142, .14);
  --warn: #f2b544;
  --warn-bg: rgba(242, 181, 68, .14);
  --bad: #ff9d8a;
  --bad-bg: rgba(255, 120, 100, .16);
  --out: #f2a26a;
  --out-bg: rgba(224, 128, 58, .16);
  --neutral-bg: rgba(143, 166, 176, .14);
  --neutral: #b9d4dd;
  --field: #5a8493;
  --focus: #5fd0ee;
  --neutral-500: #6f8f9b;
  --shadow-sm: 0 0 0 1px #164656;
  --shadow-pop: 0 0 0 1px #164656, 0 18px 40px rgba(0, 0, 0, .4);
}
html, body { background: var(--bg); }
body { font-size: calc(14px * var(--fs, 1)); line-height: 1.5; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--primary); }
[hidden] { display: none !important; }
.ph, .ph-fill { line-height: 1; }
/* Filtros SVG da cápsula de abas (vendor/suite-tabs.js): o svg { 20px } global fazia a página rolar 20 px a mais. */
body > svg[aria-hidden='true'] { width: 0; height: 0; overflow: hidden; }

/* Tipografia de página */
h1 { font-size: calc(26px * var(--fs, 1)); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
h2 { font-size: calc(15px * var(--fs, 1)); font-weight: 600; }
h1 { text-wrap: balance; }
.empty p, .subtitle { text-wrap: pretty; }
.eyebrow { font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.subtitle { font-size: calc(13.5px * var(--fs, 1)); color: var(--muted); margin-top: 4px; }
.page-head { align-items: flex-end; gap: 24px; margin-bottom: 20px; }

/* Botões */
.button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text); font-size: calc(13.5px * var(--fs, 1)); font-weight: 600; transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease; }
.button:hover { background: var(--soft); text-decoration: none; }
.button:active { transform: scale(.97); }
.button.primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 16px rgba(10, 120, 150, .22); }
.button.primary:hover { background: #0b4a5c; filter: none; }
[data-theme='escuro'] .button.primary { color: var(--on-brand); }
[data-theme='escuro'] .button.primary:hover { background: #0d7f9f; }
.button.danger { background: var(--surface); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.button.danger:hover { background: var(--bad-bg); }
.button.small { min-height: 32px; padding: 0 12px; font-size: calc(12.5px * var(--fs, 1)); border-radius: 9px; }
.button svg { width: 17px; height: 17px; }
.ibtn, .icon-button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: inline-grid; place-items: center; transition: background-color .15s ease, color .15s ease; }
.ibtn:hover, .icon-button:hover { background: var(--soft); color: var(--primary); }
.ibtn .ph, .ibtn .ph-fill { font-size: calc(20px * var(--fs, 1)); }

/* Campos */
input, select, textarea { min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--field);
  color: var(--text); font-size: calc(14px * var(--fs, 1)); outline: none; transition: box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 2px var(--focus); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
select { padding-right: 32px; }
textarea { min-height: 88px; padding: 10px 12px; field-sizing: content; max-height: 60vh; }
.tabs-select { display: none; }
input[type='checkbox'] { box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.field { gap: 6px; font-size: calc(12px * var(--fs, 1)); }
.field-label { font-size: calc(12px * var(--fs, 1)); font-weight: 600; color: var(--muted); }
.field-error { font-size: calc(12px * var(--fs, 1)); font-weight: 600; }
.check-field { font-size: calc(13px * var(--fs, 1)); }
.form-message { border-radius: 10px; font-size: calc(13px * var(--fs, 1)); font-weight: 600; padding: 10px 12px; }

/* Cartões, KPI e listas */
.panel, .metrics { border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm), 0 1px 2px rgba(3, 31, 41, .04); }
.panel + .panel { margin-top: 20px; }
.panel-head { padding: 16px 20px; }
.panel-head h2 { font-size: calc(15px * var(--fs, 1)); font-weight: 600; }
.panel-body { padding: 18px 20px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; background: transparent; box-shadow: none; border-radius: 0; }
.metric { padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm), 0 1px 2px rgba(3, 31, 41, .04); border: 0; }
.metric + .metric { border: 0; }
.metric-label { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 8px; font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.metric-label svg { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--soft); color: var(--primary); }
.metric-label:not(:has(svg)) { flex-direction: row; justify-content: flex-start; }
.metric-value { font-size: calc(21px * var(--fs, 1)); font-weight: 600; line-height: 1.2; }
.metric small { font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
.metric.warning .metric-label svg { background: var(--warn-bg); color: var(--warn); }
.work-row { padding: 14px 20px; }
.work-icon { border-radius: 9px; background: var(--soft); color: var(--primary); }

/* Chips de situação */
.badge { height: 24px; padding: 0 9px; border-radius: 12px; font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; background: var(--neutral-bg); color: var(--neutral); }
.badge.blue { background: var(--soft); color: var(--primary); }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; white-space: nowrap; }
.chip.ok { background: var(--good-bg); color: var(--good); }

/* Tabelas */
.table-wrap { overflow: auto; }
.data-table { font-size: calc(13px * var(--fs, 1)); }
.data-table th { height: 40px; padding: 0 14px; background: transparent; font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .05em; color: var(--muted); }
.data-table td { height: 56px; padding: 6px 14px; }
.data-table td strong { font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
.data-table td small { margin-top: 2px; font-size: calc(11.5px * var(--fs, 1)); }
.data-table tbody tr:hover { background: var(--soft); }
.protocol { font-size: calc(11.5px * var(--fs, 1)); }
.pagination { padding: 12px 16px; font-size: calc(13px * var(--fs, 1)); }
.view-switch { padding: 3px; border: 0; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); gap: 2px; }
.view-switch button { height: 32px; padding: 0 12px; border-radius: 8px; font-size: calc(12.5px * var(--fs, 1)); font-weight: 600; color: var(--neutral); }
.view-switch button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(3, 31, 41, .1), 0 0 0 1px var(--line); }
.filters { padding: 14px 16px; margin-bottom: 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.kanban-col { border-radius: 12px; }
.kanban-card { border-radius: 12px; }

/* Textos de apoio e blocos de detalhe: escala do Centro (corpo 13-14px, apoio 12px) */
.work-row-main strong { font-size: calc(13.5px * var(--fs, 1)); font-weight: 600; }
.work-row-main small { font-size: calc(12px * var(--fs, 1)); margin-top: 2px; }
.work-row { min-height: 72px; }
.empty h2 { font-size: calc(16px * var(--fs, 1)); }
.empty p { font-size: calc(13.5px * var(--fs, 1)); }
.empty > svg { width: 32px; height: 32px; }
.loading { font-size: calc(13.5px * var(--fs, 1)); }
.description { font-size: calc(14px * var(--fs, 1)); }
.key-values { gap: 18px 16px; }
.key-values dt { font-size: calc(12px * var(--fs, 1)); font-weight: 600; margin-bottom: 4px; }
.key-values dd { font-size: calc(13.5px * var(--fs, 1)); }
.comment p { font-size: calc(13.5px * var(--fs, 1)); }
.comment time { font-size: calc(11.5px * var(--fs, 1)); }
.timeline li { font-size: calc(13px * var(--fs, 1)); }
.timeline time { font-size: calc(11.5px * var(--fs, 1)); }
.attachment { border: 0; border-radius: 12px; box-shadow: var(--shadow-sm); padding: 10px 12px; }
.attachment .file-info { font-size: calc(13px * var(--fs, 1)); }
.attachment small { font-size: calc(11.5px * var(--fs, 1)); margin-top: 2px; }
.upload-box { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 0; }
.upload-box p { font-size: calc(12px * var(--fs, 1)); }
.checklist-item h3 { font-size: calc(14px * var(--fs, 1)); }
.checklist-item .required { font-size: calc(11.5px * var(--fs, 1)); }
.checklist-progress { height: 6px; background: var(--line); }
.template-item { border: 0; border-radius: 12px; box-shadow: var(--shadow-sm); }
.pending-row { font-size: calc(13px * var(--fs, 1)); }

/* Abas (Centro: .tab) */
.tabs { gap: 4px 18px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tabs a { height: 44px; padding: 0 4px; display: inline-flex; align-items: center; border-radius: 0; color: var(--muted); font-size: calc(13.5px * var(--fs, 1)); font-weight: 600; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { background: transparent; color: var(--primary); box-shadow: inset 0 -2px 0 var(--focus); }

/* Entrar: marca à esquerda, formulário à direita (Centro: login.css) */
.lg { position: fixed; inset: 0; z-index: 65; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(480px, 1fr); background: var(--bg); color: var(--text); }
.lg-marca { position: relative; overflow: hidden; min-width: 0; display: flex; flex-direction: column; padding: 48px 56px 40px; background: #021820; color: #fefefe; }
.lg-fundo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lg-fundo span { position: absolute; border-radius: 50%; }
.lg-fundo .b1 { left: -120px; top: -100px; width: 520px; height: 520px; background: #12a9d1; opacity: .45; filter: blur(90px); animation: lgBlobA 16s ease-in-out infinite alternate; }
.lg-fundo .b2 { right: -160px; top: 240px; width: 560px; height: 560px; background: #0b5a70; opacity: .8; filter: blur(96px); animation: lgBlobB 19s ease-in-out infinite alternate; }
.lg-fundo .b3 { left: -60px; bottom: -200px; width: 520px; height: 520px; background: #1a4da1; opacity: .4; filter: blur(100px); animation: lgBlobC 21s ease-in-out infinite alternate; }
.lg-fundo .pontos { inset: 0; border-radius: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 20px 20px; }
@keyframes lgBlobA { to { transform: translate(90px, 120px) scale(1.15); } }
@keyframes lgBlobB { to { transform: translate(-100px, -60px) scale(.9); } }
@keyframes lgBlobC { to { transform: translate(120px, -90px) scale(1.2); } }
.lg-topo { position: relative; display: flex; align-items: center; gap: 14px; }
.lg-topo img { height: 34px; width: auto; }
.lg-chip { height: 26px; padding: 0 10px; border-radius: 8px; display: flex; align-items: center; background: rgba(95, 208, 238, .14); color: #5fd0ee; font-size: calc(11.5px * var(--fs, 1)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lg-meio { position: relative; flex: 1; min-height: 0; max-width: 560px; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 24px 0; }
.lg-meio h1 { margin: 0; font-size: calc(38px * var(--fs, 1)); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.lg-meio > p { margin: 0; font-size: calc(15.5px * var(--fs, 1)); line-height: 1.6; color: #b9d4dd; }
.lg-cards { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.lg-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); backdrop-filter: blur(12px); }
.lg-card > .ph { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(95, 208, 238, .14); color: #5fd0ee; font-size: calc(21px * var(--fs, 1)); }
.lg-card span { display: flex; flex-direction: column; gap: 2px; font-size: calc(13px * var(--fs, 1)); line-height: 1.5; color: #b9d4dd; }
.lg-card b { font-size: calc(14.5px * var(--fs, 1)); font-weight: 600; color: #fefefe; }
.lg-rodape { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: calc(12.5px * var(--fs, 1)); color: #8fb3bf; }
.lg-rodape span { display: flex; align-items: center; gap: 8px; }
.lg-rodape .ph { font-size: calc(16px * var(--fs, 1)); color: #5fd0ee; }
.lg-lado { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.lg-tema { flex: none; display: flex; justify-content: flex-end; padding: 20px 24px 0; }
.lg-rolar { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 12px 48px 24px; }
.lg-caixa { width: 100%; max-width: 420px; }
.lg-vista { display: flex; flex-direction: column; gap: 18px; }
.lg-logo-mobile { display: none; }
.lg-titulo { display: flex; flex-direction: column; gap: 6px; }
.lg-titulo h2 { font-size: calc(30px * var(--fs, 1)); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.lg-titulo h2:focus { outline: none; }
.lg-titulo p { font-size: calc(14px * var(--fs, 1)); line-height: 1.5; color: var(--muted); }
.lg-ir { min-height: 50px; width: 100%; font-size: calc(15px * var(--fs, 1)); background: linear-gradient(110deg, #0a7896, #12a9d1 60%, #3cc0e2); color: #fefefe; }
.lg-ir:hover { background: linear-gradient(110deg, #0b4a5c, #0a7896 60%, #12a9d1); }
.lg-primeiro { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); font-size: calc(13px * var(--fs, 1)); line-height: 1.5; color: var(--muted); }
.lg-primeiro > .ph { flex: none; font-size: calc(18px * var(--fs, 1)); color: var(--primary); }
.lg-primeiro b { font-weight: 600; color: var(--text); }
@media (max-width: 860px) {
  .lg { grid-template-columns: minmax(0, 1fr); }
  .lg-marca { display: none; }
  .lg-rolar { padding: 12px 20px 24px; }
  .lg-logo-mobile { display: block; height: 30px; width: auto; align-self: flex-start; padding: 8px 12px; border-radius: 10px; background: #031f29; box-sizing: content-box; }
}

/* Tela do técnico: Meu dia */
.tec-resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.tec-resumo > div { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.tec-resumo > div + div { border-left: 1px solid var(--line); }
.tec-resumo small { font-size: calc(11.5px * var(--fs, 1)); color: var(--muted); }
.tec-resumo b { font-size: calc(22px * var(--fs, 1)); font-weight: 600; }
.tec-resumo b.alerta { color: var(--bad); }
.tec-grupo { margin-bottom: 20px; }
.tec-titulo { display: flex; align-items: center; gap: 8px; margin: 0 0 8px 2px; font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tec-titulo span { height: 18px; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--neutral-bg); color: var(--neutral); font-size: calc(11.5px * var(--fs, 1)); display: grid; place-items: center; letter-spacing: 0; }
.tec-grupo.atraso .tec-titulo { color: var(--bad); }
.tec-grupo.ativo .tec-titulo { color: var(--primary); }
.tec-lista { display: flex; flex-direction: column; gap: 10px; }
.tec-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.tec-row.ativo { box-shadow: inset 0 0 0 2px var(--cyan); }
.tec-main { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; color: var(--text); text-decoration: none; }
.tec-main:hover { text-decoration: none; }
.tec-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--primary); font-size: calc(19px * var(--fs, 1)); }
.tec-tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tec-tx strong { font-size: calc(14px * var(--fs, 1)); font-weight: 600; overflow-wrap: anywhere; }
.tec-tx small { font-size: calc(12px * var(--fs, 1)); color: var(--muted); overflow-wrap: anywhere; }
.tec-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.tec-data { display: inline-flex; align-items: center; gap: 4px; font-size: calc(11.5px * var(--fs, 1)); color: var(--muted); }
.tec-acoes { display: flex; flex-direction: column; gap: 6px; flex: none; }
.tec-acoes .button { min-width: 112px; }
.scan video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #021820; }
.scan p { margin-top: 10px; font-size: calc(13px * var(--fs, 1)); }
.scan-manual { display: flex; gap: 10px; align-items: flex-end; margin-top: 16px; }
.scan-manual .field { flex: 1; }
@media (max-width: 800px) {
  .tec-head .toolbar .button { flex: 1; min-height: 48px; }
  .tec-row { flex-direction: column; align-items: stretch; }
  .tec-acoes { flex-direction: row; }
  .tec-acoes .button { flex: 1; min-height: 48px; }
}

/* Faixas de aviso (Centro: .faixa) */
.notice { margin: 0 32px 0; padding: 10px 14px; border: 0; border-radius: 12px; font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
/* Faixa informativa: neutra, texto 400 na cor do texto, ícone neutro e anel de 1 px (D3). */
.notice.preview, .notice.local-work-note { background: var(--neutral-bg); color: var(--text); font-weight: 400; box-shadow: inset 0 0 0 1px var(--line); }
.notice.preview svg, .notice.local-work-note svg { color: var(--neutral); }
#toast { left: 50%; bottom: 24px; transform: translateX(-50%); border-radius: 12px; background: #031f29; color: #fefefe; box-shadow: 0 14px 34px rgba(3, 31, 41, .3); }

@media (min-width: 801px) {
  /* Casca: menu lateral fixo + barra do topo, igual ao /d/ do Centro */
  .workspace { display: flex; min-height: 100vh; background: var(--bg); }
  .workspace > .area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .side { position: sticky; top: 0; z-index: 30; width: var(--side-w); flex: none; height: 100vh; background: var(--nav); color: #fefefe; display: flex; flex-direction: column; padding: 18px 14px 14px; gap: 18px; box-shadow: 4px 0 24px rgba(3, 31, 41, .18), 1px 0 0 rgba(3, 31, 41, .06); }
  .side .marca { display: flex; flex-direction: column; gap: 6px; padding: 4px 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-decoration: none; }
  .side .marca:hover { text-decoration: none; }
  .side .marca img { height: 28px; width: auto; align-self: flex-start; }
  .side .marca span { font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #5fd0ee; }
  .side nav { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 14px; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .side .grupo { display: flex; flex-direction: column; gap: 2px; }
  .side .grupo > span { padding: 0 12px 4px; font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #8fb3bf; }
  .nav { position: relative; isolation: isolate; width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; gap: 12px; font-size: calc(13.5px * var(--fs, 1)); font-weight: 500; color: #b9d4dd; background: transparent; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
  .nav::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(90deg, rgba(18, 169, 209, .22), rgba(18, 169, 209, .04)); transform: scaleX(0); transform-origin: left; opacity: 0; transition: transform .25s cubic-bezier(.2, .8, .2, 1), opacity .25s ease; }
  .nav:hover { background: transparent; color: #fefefe; text-decoration: none; }
  .nav:hover::before { transform: scaleX(1); opacity: 1; }
  .nav:focus-visible { outline: 2px solid #5fd0ee; outline-offset: -2px; }
  .nav .ph { font-size: calc(18px * var(--fs, 1)); color: #6f8f9b; transition: transform .22s cubic-bezier(.2, .8, .2, 1), color .15s ease; }
  .nav:hover .ph { transform: scale(1.18) translateX(1px); color: #5fd0ee; }
  .nav:active .ph { transform: scale(.94); }
  .nav .rot { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav[aria-current='page'] { background: rgba(18, 169, 209, .16); color: #fefefe; }
  .nav[aria-current='page'] .ph { color: #5fd0ee; }
  .nav[aria-current='page']::after { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #12a9d1; box-shadow: 0 0 10px rgba(18, 169, 209, .7); animation: menuBarra .3s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes menuBarra { from { transform: scaleY(0); opacity: 0 } to { transform: none; opacity: 1 } }
  .nav .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #b8452c; color: #fefefe; font-size: calc(11.5px * var(--fs, 1)); font-weight: 700; display: grid; place-items: center; }
  .nav .badge[hidden] { display: none; }
  .side .quem { display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
  .avatar { width: 36px; height: 36px; border-radius: 50%; background: #5fd0ee; display: grid; place-items: center; font-size: calc(13px * var(--fs, 1)); font-weight: 700; color: #021820; flex: none; }
  .side .quem .nome { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .side .quem b { font-size: calc(13px * var(--fs, 1)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side .quem .nome span { font-size: calc(11.5px * var(--fs, 1)); color: #b9d4dd; }
  .side .quem .ibtn { color: #b9d4dd; }
  .side .quem .ibtn:hover { background: rgba(255, 255, 255, .08); color: #fefefe; }
  .topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); flex: none; display: flex; align-items: center; justify-content: flex-start; gap: 16px; padding: 0 24px 0 32px; background: var(--surface); border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
  .topbar .app-brand { display: none; }
  .topbar .espaco { flex: 1; }
  .assistant-top .ph { font-size: calc(20px * var(--fs, 1)); }
  .busca { position: relative; width: 440px; min-width: 220px; flex: 0 1 440px; margin: 0; }
  .busca > .ph { position: absolute; left: 12px; top: 11px; font-size: calc(18px * var(--fs, 1)); color: var(--muted); pointer-events: none; }
  .busca .inp { height: 40px; padding: 0 60px 0 40px; background: var(--bg); }
  .busca input::-webkit-search-cancel-button { display: none; }
  .busca kbd { position: absolute; right: 10px; top: 10px; height: 20px; padding: 0 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line); font: calc(11.5px * var(--fs, 1)) var(--font); color: var(--muted); display: grid; place-items: center; }
  .selo { height: 32px; padding: 0 12px; border-radius: 999px; font-size: calc(12px * var(--fs, 1)); font-weight: 600; display: flex; align-items: center; gap: 7px; white-space: nowrap; text-decoration: none; }
  .selo:hover { text-decoration: none; }
  .selo .ponto { width: 8px; height: 8px; border-radius: 50%; flex: none; }
  .selo.ok { background: var(--good-bg); color: var(--good); }
  .selo.ok .ponto { background: #3ccf8e; }
  .selo.off { background: var(--warn-bg); color: var(--warn); }
  .selo.off .ponto { background: #e0a33a; }
  .selo.enviando { background: var(--soft); color: var(--primary); }
  .selo.enviando .ponto { background: #12a9d1; animation: blink 1s ease-in-out infinite; }
  .suite { position: relative; }
  .suite > .btn { height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: calc(13.5px * var(--fs, 1)); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
  .suite > .btn:hover { background: var(--soft); }
  .suite > .btn .ph-squares-four { color: var(--primary); }
  .suite > .btn .ph { font-size: calc(17px * var(--fs, 1)); }
  .suite > .btn .ph-caret-down { font-size: calc(12px * var(--fs, 1)); }
  .pop { position: absolute; z-index: 40; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop); }
  .suite .pop { right: 0; top: 46px; width: 300px; padding: 8px; }
  .suite .pop .lbl { display: block; padding: 6px 10px 8px; font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
  .res { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; text-decoration: none; }
  .res:hover { background: var(--soft); text-decoration: none; }
  .res.atual { background: var(--soft); }
  .res .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--soft); color: var(--primary); display: grid; place-items: center; flex: none; }
  .res.atual .ic { background: var(--surface); }
  .res .ic .ph { font-size: calc(17px * var(--fs, 1)); }
  .res .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .res .tx b { font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
  .res .tx span { font-size: calc(11.5px * var(--fs, 1)); color: var(--muted); }
  .res > .ph { font-size: calc(15px * var(--fs, 1)); color: var(--muted); }
  .suite .sep { height: 1px; margin: 6px 4px; background: var(--line); }
  .page { flex: 1; max-width: none; margin: 0; padding: 28px 32px 40px; }
  .notice { margin: 20px 32px 0; }
  .notice + .page { padding-top: 20px; }
  .workspace[data-area='menu'] .page { padding-top: 28px; }

  /* Formulários em painel lateral, no lugar dos modais */
  dialog.dialog { margin: 0 0 0 auto; width: var(--drawer-w); max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; background: var(--surface);
    box-shadow: -24px 0 60px rgba(3, 31, 41, .22); }
  dialog.dialog[open] { display: flex; flex-direction: column; animation: slideIn .32s cubic-bezier(.2, .8, .2, 1) both; }
  dialog.dialog::backdrop { background: rgba(3, 31, 41, .38); backdrop-filter: none; }
  .dialog-head { flex: none; padding: 18px 20px; }
  .dialog-head h2 { font-size: calc(17px * var(--fs, 1)); font-weight: 600; }
  .dialog-body { flex: 1; min-height: 0; overflow: auto; padding: 20px; }
  .dialog .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .dialog .form-actions { position: sticky; bottom: -20px; margin: 20px -20px -20px; padding: 14px 20px; background: var(--surface); }
}
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
/* Formulário ocupa a altura do painel: o rodapé (Cancelar / ação) fica sempre no pé, em toda janela. */
dialog.dialog:not(.dialog-small) .dialog-body > form { min-height: 100%; display: flex; flex-direction: column; }
dialog.dialog:not(.dialog-small) .dialog-body > form > .form-actions { margin-top: auto; }
dialog.dialog:not(.dialog-small) .dialog-body > form > .form-grid { margin-bottom: 20px; }
/* Meu dia no computador: ícone à esquerda, protocolo e hora numa linha, sem repetir o ícone. */
@media (min-width: 801px) {
  .tec-main { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; align-items: start; }
  .tec-ic { grid-row: 1 / span 2; }
  .tec-top { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; font-size: calc(12.5px * var(--fs, 1)); color: var(--muted); }
  .tec-os { display: inline-flex; align-items: center; gap: 6px; }
  .tec-os .ph { display: none; }
  .tec-hora { color: var(--text); font-weight: 600; }
  .tec-hora::before { content: '·'; margin-right: 10px; color: var(--muted); font-weight: 400; }
}
@keyframes blink { 50% { opacity: .35; } }

@media (min-width: 801px) and (max-width: 1279px) {
  .topbar { gap: 12px; padding: 0 20px 0 24px; }
  .page { padding: 24px 24px 40px; }
  .notice { margin-left: 24px; margin-right: 24px; }
}

@media (max-width: 800px) {
  .side, .busca, .selo { display: none; }
  .workspace > .area { display: block; }
  .topbar { height: auto; min-height: 56px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 20px 4px; gap: 10px; background: transparent; border: 0; box-shadow: none; justify-content: space-between; }
  .topbar .app-brand { display: flex; flex-direction: row; align-items: center; gap: 8px; margin-right: auto; }
  .app-symbol { height: 18px; width: auto; }
  .app-brand-copy { display: flex; }
  .app-brand-name { display: none; }
  .app-brand small { font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
  .suite { position: relative; display: block; }
  .suite > .btn { height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: calc(13.5px * var(--fs, 1)); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
  .suite > .btn .ph-caret-down { display: none; }
  .suite > .btn .ph-squares-four { color: var(--primary); font-size: calc(16px * var(--fs, 1)); }
  .pop { position: absolute; z-index: 40; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop); }
  .suite .pop { right: 0; top: 52px; width: min(300px, calc(100vw - 40px)); padding: 8px; }
  .suite .pop .lbl { display: block; padding: 6px 10px 8px; font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
  .res { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 44px; border-radius: 10px; color: var(--text); text-decoration: none; }
  .res.atual { background: var(--soft); }
  .res .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--soft); color: var(--primary); display: grid; place-items: center; flex: none; }
  .res .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .res .tx b { font-size: calc(13.5px * var(--fs, 1)); font-weight: 600; }
  .res .tx span { font-size: calc(11.5px * var(--fs, 1)); color: var(--muted); }
  .suite .sep { height: 1px; margin: 6px 4px; background: var(--line); }
  .topbar > .ibtn, .topbar > .webmail-top { display: none; }
  .notice { margin: 8px 20px 0; }
  #toast { bottom: calc(58px + var(--mobile-tabs-base, 12px) + 14px); }
  .page { padding: 12px 20px calc(58px + var(--mobile-tabs-base, 12px) + 26px); }
  h1 { font-size: calc(22px * var(--fs, 1)); font-weight: 500; letter-spacing: 0; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 14px; }
  .page-head > .toolbar { justify-content: flex-start; }
  .page-head > .toolbar .button.primary { flex: 1; min-height: 48px; }
  .eyebrow { font-size: calc(11.5px * var(--fs, 1)); }
  .subtitle { font-size: calc(12.5px * var(--fs, 1)); margin-top: 2px; }
  .panel, .filters, .metric { border-radius: 12px; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
  .metric { padding: 12px; border-radius: 0; box-shadow: none; gap: 4px; }
  .metric + .metric { border-left: 1px solid var(--line); }
  .metric-label { flex-direction: row; font-size: calc(11px * var(--fs, 1)); letter-spacing: .03em; }
  .metric-label svg { display: none; }
  .metric-value { font-size: calc(20px * var(--fs, 1)); }
  .metric small { font-size: calc(11.5px * var(--fs, 1)); }
  .panel-head { padding: 12px 14px; }
  .work-row { padding: 12px 14px; min-height: 64px; }
  .button { min-height: 44px; }
  .button.small { min-height: 40px; }
  input, select, textarea { min-height: 48px; font-size: calc(16px * var(--fs, 1)); }
  .filters { padding: 12px; }
  .filters .field, .filters .field.search { min-width: 0; flex: 1 1 100%; max-width: none; }
  /* Tabelas viram listas de cartões */
  .data-table thead { display: none; }
  .data-table, .data-table tbody { display: block; }
  .data-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .data-table tr:last-child { border-bottom: 0; }
  .data-table td { display: block; height: auto; padding: 0; border: 0; font-size: calc(12.5px * var(--fs, 1)); }
  .data-table td:first-child { flex: 1 1 100%; }
  .data-table td strong { font-size: calc(14px * var(--fs, 1)); }
  .data-table .optional-column { display: none; }
  .data-table td:last-child { margin-left: auto; }
  /* Formulários em folha de tela cheia */
  dialog.dialog { position: fixed; inset: 0; margin: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; background: var(--bg); }
  dialog.dialog[open] { display: flex; flex-direction: column; animation: sheetUp .28s cubic-bezier(.2, .8, .2, 1) both; }
  dialog.dialog::backdrop { background: rgba(3, 31, 41, .38); }
  .dialog-head { flex: none; padding: calc(env(safe-area-inset-top, 0px) + 10px) 20px 10px; border: 0; }
  .dialog-head h2 { font-size: calc(17px * var(--fs, 1)); font-weight: 600; }
  .dialog-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 20px 0; }
  .dialog .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .dialog .form-actions { position: sticky; bottom: 0; margin: 16px -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
  .dialog .form-actions .button.primary { flex: 1; min-height: 52px; }
}
/* C: celular (rodada 32) */
@media (max-width: 800px) {
  .metrics { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); }
  .metric-label { font-size: calc(11px * var(--fs, 1)); }
  .metric small { overflow-wrap: anywhere; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .filters .field.search, .filters .field:first-child { grid-column: 1 / -1; }
  .filters .field label, .filters .field > span:first-child { font-size: calc(11.5px * var(--fs, 1)); }
  .filters > .button { grid-column: 1 / -1; min-height: 48px; justify-content: center; }
  .filters .view-switch { display: none; }
  .tec-resumo > div { padding: 12px; }
  .tec-resumo b { font-size: calc(24px * var(--fs, 1)); }
  .tec-row.ativo { box-shadow: inset 0 0 0 2px var(--cyan), var(--shadow-sm); }
  .tec-acoes .button, .tec-head .toolbar .button { min-height: 48px; font-size: calc(14px * var(--fs, 1)); }
  .checklist-item .button, .checklist-item .choice, .checklist-item label { min-height: 44px; }
  .menu-item, .res, .mobile-tab { min-height: 48px; }
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 801px) { .app-symbol { display: none; } }
@media print {
  .side, .topbar { display: none; }
  .workspace { display: block; }
  .page { padding: 0; }
}
/* A barra lateral mantem o efeito mesmo com "reduzir movimento" do Windows (pedido do Lucas). Sem deslocamento nem laco, mas a troca de estado continua visivel (cor, fundo, contorno e opacidade em 150 ms), igual ao Centro e ao Orcamentos. */
@media (prefers-reduced-motion: reduce) { :not(.side):not(.side *), :not(.side):not(.side *)::before, :not(.side):not(.side *)::after { animation: none !important; transition-property: color, background-color, border-color, box-shadow, opacity !important; transition-duration: .15s !important; transition-delay: 0s !important; } }

@media (min-width: 801px) {
  /* Menu recolhivel: 72 px recolhido; com o mouse em cima abre por cima da pagina (.espia) e os itens entram em cascata. */
  :root { --side-aberto: 236px; }
  .workspace.anima .side { transition: width .38s cubic-bezier(.2, .8, .2, 1), padding .38s cubic-bezier(.2, .8, .2, 1), margin-right .38s cubic-bezier(.2, .8, .2, 1), box-shadow .38s ease; }
  .side .marca { position: relative; min-height: 59px; }
  .side .marca .simb { position: absolute; left: 50%; top: 4px; height: 26px; width: auto; transform: translateX(-50%) scale(.6); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .28s cubic-bezier(.2, .8, .2, 1); }
  .side .marca .logo, .side .marca span { transition: opacity .18s ease; }
  .nav .rot { max-width: 240px; transition: opacity .2s ease, max-width .38s cubic-bezier(.2, .8, .2, 1), transform .32s cubic-bezier(.2, .8, .2, 1); }
  .side .grupo > span { max-height: 28px; overflow: hidden; white-space: nowrap; transition: opacity .18s ease, max-height .28s ease, padding .28s ease; }
  .nav { transition: background-color .15s ease, color .15s ease, padding .28s cubic-bezier(.2, .8, .2, 1), gap .28s ease; }
  .side .recolher { position: absolute; top: 30px; right: -13px; z-index: 2; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(3, 31, 41, .22); display: grid; place-items: center; cursor: pointer; opacity: .9; transition: transform .2s ease, opacity .2s ease, background-color .2s ease, color .2s ease; }
  .side .recolher:hover { opacity: 1; transform: scale(1.12); background: #12a9d1; color: #fefefe; }
  .side .recolher:focus-visible { outline: 2px solid #5fd0ee; outline-offset: 2px; }
  .side .recolher .ph { font-size: calc(14px * var(--fs, 1)); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
  .workspace.recolhido .side .recolher .ph, .workspace.espia .side .recolher .ph { transform: rotate(180deg); }
  .workspace.recolhido .side { width: 72px; padding: 18px 10px 14px; }
  .workspace.recolhido .side .marca .logo, .workspace.recolhido .side .marca span, .workspace.recolhido .nav .rot { opacity: 0; pointer-events: none; }
  .workspace.recolhido .side .marca .simb { opacity: 1; transform: translateX(-50%) scale(1); }
  .workspace.recolhido .side .grupo > span { opacity: 0; max-height: 0; padding-bottom: 0; }
  .workspace.recolhido .side .grupo { gap: 4px; }
  .workspace.recolhido .nav { padding: 0 15px; gap: 0; }
  .workspace.recolhido .nav .rot { max-width: 0; transform: translateX(-14px); transition-delay: calc((7 - var(--n, 0)) * 16ms); }
  .workspace.recolhido .nav .badge { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; font-size: calc(10px * var(--fs, 1)); padding: 0 4px; }
  .workspace.recolhido .nav[aria-current='page']::after { left: -10px; }
  .workspace.recolhido .side nav { margin: 0 -10px; padding: 0 10px; }
  .workspace.recolhido .side .quem { flex-direction: column; padding: 10px 0 0; }
  .workspace.recolhido .side .quem .nome { display: none; }
  .side nav { overflow-x: hidden; }
  .workspace.espia .side { width: var(--side-aberto); margin-right: calc(72px - var(--side-aberto)); box-shadow: 10px 0 36px rgba(3, 31, 41, .32), 1px 0 0 rgba(3, 31, 41, .06); }
  [data-theme='escuro'] .side { box-shadow: 4px 0 28px rgba(0, 0, 0, .55), 1px 0 0 rgba(255, 255, 255, .04); }
  [data-theme='escuro'] .workspace.espia .side { box-shadow: 10px 0 40px rgba(0, 0, 0, .7), 1px 0 0 rgba(255, 255, 255, .04); }
  @keyframes menuItem { from { opacity: 0; transform: translateX(-10px) } to { opacity: 1; transform: none } }
  .workspace:not(.recolhido) .nav .rot, .workspace:not(.recolhido) .side .quem .nome, .workspace:not(.recolhido) .side .marca .logo, .workspace:not(.recolhido) .side .marca span { animation: menuItem .34s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--n, 0) * 26ms + 50ms); }
  .side .grupo > .nav:nth-of-type(1) { --n: 1 } .side .grupo > .nav:nth-of-type(2) { --n: 2 } .side .grupo > .nav:nth-of-type(3) { --n: 3 } .side .grupo > .nav:nth-of-type(4) { --n: 4 } .side .grupo > .nav:nth-of-type(5) { --n: 5 } .side .grupo > .nav:nth-of-type(6) { --n: 6 } .side .grupo > .nav:nth-of-type(n+7) { --n: 7 }
}
.menu-dica { position: fixed; z-index: 60; transform: translateY(-50%); padding: 7px 11px; border-radius: 8px; background: var(--nav); color: #fefefe; font-family: inherit; font-size: calc(12.5px * var(--fs, 1)); font-weight: 500; white-space: nowrap; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); pointer-events: none; }

/* B: detalhe do chamado, painéis e confirmações (Rodada 30) */
.b-back { display: inline-flex; align-items: center; gap: 6px; font-size: calc(13px * var(--fs, 1)); font-weight: 600; color: var(--primary); text-decoration: none; margin-bottom: 14px; }
.b-back svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.b-head h1 { font-size: calc(26px * var(--fs, 1)); font-weight: 600; margin: 0 0 6px; letter-spacing: 0; }
.b-meta { margin: 0 0 12px; font-size: calc(12.5px * var(--fs, 1)); color: var(--muted); }
.b-marks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.b-grid { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 16px; align-items: start; max-width: 1320px; }
.b-main, .b-side { display: grid; gap: 16px; min-width: 0; }
.b-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 20px; min-width: 0; }
.b-card .eyebrow { margin-bottom: 10px; }
.b-h2 { font-size: calc(15px * var(--fs, 1)); font-weight: 600; margin: 0 0 12px; }
.b-card .description { margin: 0 0 12px; }
.b-attach:empty { display: none; }
.b-os header { display: flex; align-items: center; gap: 12px; }
.b-os header > div { flex: 1; min-width: 0; }
.b-os h2 { font-size: calc(15px * var(--fs, 1)); font-weight: 600; margin: 0; }
.b-os header p, .b-os.b-empty p { margin: 2px 0 0; font-size: calc(12.5px * var(--fs, 1)); color: var(--muted); }
.b-os.b-empty { display: flex; align-items: center; gap: 14px; }
.b-os.b-empty > div { flex: 1; }
.b-os.b-empty h2 { font-size: calc(15px * var(--fs, 1)); margin: 0; }
.b-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.b-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.b-os-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.b-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--neutral-bg); font-size: calc(13px * var(--fs, 1)); }
.b-checklist { margin-top: 14px; }
.b-os-link { margin-top: 10px; font-size: calc(12.5px * var(--fs, 1)); }
.b-actions { display: grid; gap: 8px; }
.b-actions .button { width: 100%; justify-content: center; min-height: 40px; }
.b-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.b-links .link { background: none; border: 0; padding: 0 4px; font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 600; color: var(--primary); cursor: pointer; }
.b-links .link.bad { color: var(--bad); }
.b-info { display: grid; gap: 0; padding: 6px 20px; }
.b-fact { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.b-fact:first-child { border-top: 0; }
.b-fact > span { font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.b-fact strong { font-weight: 600; font-size: calc(14px * var(--fs, 1)); }
.b-fact small { color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); }
.b-fact .muted { color: var(--muted); }
.b-deadline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.b-deadline em { font-style: normal; font-size: calc(13px * var(--fs, 1)); font-weight: 600; color: var(--muted); }
.b-deadline em.late { color: var(--bad); }
.b-bar { height: 6px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; margin: 4px 0; }
.b-bar i { display: block; height: 100%; background: var(--cyan); border-radius: 999px; }
.b-bar.late i { background: var(--bad); }
.b-tag { font-weight: 600; color: var(--primary); text-decoration: none; }
.b-person { display: flex; align-items: center; gap: 8px; }
.b-av { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: calc(10.5px * var(--fs, 1)); font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.b-av.lg { width: 36px; height: 36px; font-size: calc(13px * var(--fs, 1)); }
/* linha do tempo */
.b-compose { display: grid; gap: 10px; margin-bottom: 14px; }
.b-compose textarea { min-height: 64px; width: 100%; }
.b-compose-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.b-compose-row .b-hint { flex: 1; font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
.b-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--neutral-bg); gap: 2px; }
.b-seg label { position: relative; }
.b-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.b-seg span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: calc(13px * var(--fs, 1)); font-weight: 600; color: var(--neutral); }
.b-seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
/* Controle segmentado no escuro (D4): trilho na superfície, opção marcada em petróleo claro com anel ciano. */
[data-theme='escuro'] .b-seg, [data-theme='escuro'] .seg, [data-theme='escuro'] .view-switch { background: var(--surface); }
[data-theme='escuro'] .b-seg input:checked + span, [data-theme='escuro'] .seg button.on, [data-theme='escuro'] .view-switch button.active { background: #1a4a5a; color: #f2f8fa; box-shadow: inset 0 0 0 1px rgba(95, 208, 238, .45); }
.b-seg input:focus-visible + span { outline: 2px solid var(--focus); }
.b-seg svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.b-event { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.b-event .b-ico { width: 30px; height: 30px; border-radius: 50%; }
.b-event .b-ico svg { width: 15px; height: 15px; }
.b-event p { margin: 0; }
.b-event .b-bubble { margin-top: 6px; padding: 9px 12px; border-radius: 10px; background: var(--neutral-bg); font-size: calc(13.5px * var(--fs, 1)); white-space: pre-wrap; overflow-wrap: anywhere; }
.b-event time { color: var(--muted); font-size: calc(12px * var(--fs, 1)); margin-left: 6px; }
.b-event.publico .b-bubble { background: var(--soft); }
/* painéis (formulários e comandos) */
.dialog-head { display: flex; align-items: center; gap: 12px; }
.dialog-glyph { width: 38px; height: 38px; border-radius: 10px; background: var(--soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.dialog-glyph svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dialog-titles { flex: 1; min-width: 0; }
.dialog-titles h2 { margin: 0; }
.dialog-titles p { margin: 2px 0 0; font-size: calc(12.5px * var(--fs, 1)); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog .form-actions .button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-right: 6px; }
.b-field { border: 0; margin: 0; padding: 0; min-width: 0; grid-column: 1 / -1; }
.b-field legend { font-size: calc(12px * var(--fs, 1)); font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 8px; }
.b-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.b-pick { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; min-height: 44px; }
.b-pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.b-pick:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--soft); }
.b-pick:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.b-pick > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.b-pick span:not(.b-av) { display: grid; gap: 2px; min-width: 0; }
.b-pick strong { font-size: calc(13.5px * var(--fs, 1)); font-weight: 600; }
.b-pick small { font-size: calc(12px * var(--fs, 1)); color: var(--muted); line-height: 1.35; }
.b-result:has(input[value=necessita_material]:checked) { border-color: var(--warn-bar); box-shadow: inset 0 0 0 1px var(--warn-bar); background: var(--warn-bg); }
.b-result-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--neutral-bg); box-shadow: inset 0 0 0 1px var(--line); font-size: calc(13px * var(--fs, 1)); font-weight: 400; color: var(--text); }
.b-result-note.warn { background: var(--warn-bg); color: var(--warn); font-weight: 600; box-shadow: none; }
.b-result-note[hidden], .b-pieces[hidden] { display: none; }
.b-result-note svg, .b-hint svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.b-hint { display: flex; align-items: center; gap: 8px; font-size: calc(12.5px * var(--fs, 1)); color: var(--muted); margin: 0; }
.b-block { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); }
.b-block > span svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.b-block p { margin: 4px 0 0; color: var(--text); font-size: calc(13px * var(--fs, 1)); }
.b-block small { display: block; margin: 8px 0; color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); }
.b-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.b-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 600; cursor: pointer; min-height: 36px; }
.b-chip:hover { border-color: var(--primary); }
.b-more summary { cursor: pointer; font-size: calc(13px * var(--fs, 1)); font-weight: 600; color: var(--primary); margin-bottom: 10px; }
.b-more .field { margin-top: 10px; }
.b-seg-field { display: grid; gap: 6px; }
.b-seg-field > small { font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
.b-warn { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
.b-warn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dialog [aria-invalid=true] { border-color: var(--bad) !important; }

@keyframes bPop { from { transform: scale(0); } to { transform: scale(1); } }
dialog.dialog.dialog-small { margin: auto; width: 440px; height: auto; max-height: 90dvh; border-radius: 14px; animation: none; }
dialog.dialog.dialog-small[open] { animation: bPop .18s ease-out both; }
dialog.dialog.dialog-small .dialog-head { flex-direction: column; align-items: flex-start; border: 0; padding-bottom: 0; }
dialog.dialog.dialog-small .dialog-head .icon-button { position: absolute; top: 14px; right: 14px; }
dialog.dialog.dialog-small .dialog-titles p { white-space: normal; }
dialog.dialog.dialog-small .form-actions { position: static; justify-content: flex-end; }
@media (max-width: 1100px) { .b-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  .b-head h1 { font-size: calc(22px * var(--fs, 1)); }
  .b-card { padding: 16px; }
  dialog.dialog.dialog-small { width: calc(100% - 32px); }
}

/* A: casca do desktop, Início e lista de Chamados (Rodada 30) */
.av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-size: calc(11px * var(--fs, 1)); font-weight: 700; color: #fefefe; }
.av-vazio { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--field); border-radius: 50%; }
.av-vazio .ph { font-size: calc(15px * var(--fs, 1)); }
.resp { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: calc(13px * var(--fs, 1)); white-space: nowrap; }
.resp.vazio { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: calc(12px * var(--fs, 1)); font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral); }
.pill .ph { font-size: calc(14px * var(--fs, 1)); }
.pill.azul { background: var(--soft); color: var(--primary); }
.pill.verde { background: var(--good-bg); color: var(--good); }
.pill.ambar { background: var(--warn-bg); color: var(--warn); }
.pill.laranja { background: var(--out-bg); color: var(--out); }
.pill.vermelho { background: var(--bad-bg); color: var(--bad); }
.pill.urgente { background: var(--bad); color: #fefefe; }
[data-theme='escuro'] .pill.urgente { background: #b8452c; color: #fefefe; }
.pill.cinza { background: var(--neutral-bg); color: var(--neutral); }
.badge.soft { background: rgba(18, 169, 209, .22); color: #5fd0ee; }

@media (min-width: 801px) {
  .busca-res { position: absolute; z-index: 45; left: 0; right: 0; top: 46px; max-height: 420px; overflow: auto; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-pop); }
  .busca-res a { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
  .busca-res a:hover, .busca-res a:focus-visible { background: var(--soft); }
  .busca .busca-res a .ph { position: static; font-size: calc(18px * var(--fs, 1)); color: var(--primary); }
  .busca-res a span { display: flex; flex-direction: column; min-width: 0; }
  .busca-res a b { font-size: calc(13px * var(--fs, 1)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .busca-res a small { font-size: calc(11.5px * var(--fs, 1)); color: var(--muted); }
  .busca-res p { margin: 0; padding: 12px; font-size: calc(13px * var(--fs, 1)); color: var(--muted); }
  .busca .busca-res[hidden] { display: none; }
  .nav .badge.soft { min-width: 22px; background: rgba(18, 169, 209, .25); color: #5fd0ee; }
}
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; min-width: 0; }
.kpi:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--focus), 0 8px 20px rgba(3, 31, 41, .08); transform: translateY(-1px); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-nome { font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--soft); color: var(--primary); font-size: calc(17px * var(--fs, 1)); flex: none; }
.kpi.vermelho .kpi-ic { background: var(--bad-bg); color: var(--bad); }
.kpi.vermelho .kpi-valor { color: var(--bad); }
.kpi.laranja .kpi-ic { background: var(--out-bg); color: var(--out); }
.kpi.verde .kpi-ic { background: var(--good-bg); color: var(--good); }
.kpi-valor { font-size: calc(28px * var(--fs, 1)); font-weight: 600; line-height: 1.15; }
.kpi small { font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
.inicio-grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 28%); gap: 20px; align-items: start; }
.panel.semana > .panel-head { flex-wrap: wrap; row-gap: 6px; }
.semana-col:nth-child(odd) small { visibility: hidden; }
.inicio-lado { display: flex; flex-direction: column; gap: 20px; }
.inicio-lado .panel + .panel { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-head h2 { white-space: nowrap; }
.panel-head > a { font-size: calc(12.5px * var(--fs, 1)); font-weight: 600; text-decoration: none; white-space: nowrap; flex: none; }
.atencao-linha { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.atencao-linha:last-child { border-bottom: 0; }
.atencao-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.atencao-txt:hover strong { color: var(--primary); }
.atencao-txt strong { font-size: calc(13.5px * var(--fs, 1)); font-weight: 600; }
.atencao-txt small { font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
.atencao-txt .protocol { color: var(--muted); }
.atencao-tags { display: flex; gap: 8px; flex: none; }
.atencao-linha .resp { width: 148px; flex: none; }
.atencao-linha > .button { width: 148px; flex: none; }
.semana-barras { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 12px 18px 0; }
.semana-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.semana-par { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.semana-par span { width: 38%; max-width: 14px; border-radius: 3px 3px 0 0; min-height: 2px; }
.semana-par .b1 { background: #12a9d1; }
.semana-par .b2 { background: #3ccf8e; }
.semana-col.atual .semana-par span { opacity: .55; }
.semana-col small { font-size: calc(11.5px * var(--fs, 1)); color: var(--muted); }
.semana-nota { margin: 0; padding: 10px 18px 14px; font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
.legenda { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
.legenda i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.legenda .l1 { background: #12a9d1; margin-left: 0; }
.legenda .l2 { background: #3ccf8e; }
.prev-linha { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.prev-linha:last-child { border-bottom: 0; }
.prev-linha:hover { background: var(--soft); }
.prev-dia { width: 30px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; flex: none; }
.prev-dia b { font-size: calc(16px * var(--fs, 1)); font-weight: 600; }
.prev-dia small { font-size: calc(11.5px * var(--fs, 1)); color: var(--muted); }
.prev-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prev-txt strong { font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
.prev-txt small { font-size: calc(11.5px * var(--fs, 1)); color: var(--muted); }
.vazio-nota { margin: 0; padding: 18px; font-size: calc(13px * var(--fs, 1)); color: var(--muted); }
.filtros-pilula.skeleton-linha { height: 40px; }
.busca-tk { position: relative; flex: 0 1 300px; min-width: 200px; }
.busca-tk .ph { position: absolute; left: 12px; top: 11px; font-size: calc(18px * var(--fs, 1)); color: var(--muted); pointer-events: none; }
.busca-tk input { width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.filtros-pilula select { width: auto; max-width: 240px; height: 40px; min-height: 40px; border-radius: 999px; padding: 0 34px 0 16px; font-size: calc(13px * var(--fs, 1)); font-weight: 600; background-color: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.chips-f { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip-f { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: 600 calc(13px * var(--fs, 1)) var(--font); cursor: pointer; }
.chip-f span { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--soft); color: var(--primary); font-size: calc(11.5px * var(--fs, 1)); display: inline-grid; place-items: center; }
.chip-f:hover { background: var(--soft); }
.chip-f.ativo { background: var(--brand); color: var(--on-brand); box-shadow: none; }
.chip-f.ativo span { background: rgba(3, 31, 41, .28); color: var(--on-brand); }
.tk-table th { white-space: nowrap; }
.tk-table td { vertical-align: middle; height: 60px; }
.tk-table tbody tr[data-href] { cursor: pointer; }
.tk-num { width: auto; white-space: nowrap; font-size: calc(12.5px * var(--fs, 1)); }
.tk-num a { color: var(--muted); text-decoration: none; }
.tk-titulo { color: var(--text); text-decoration: none; }
.tk-titulo:hover strong { color: var(--primary); }
.tk-table td small { display: block; color: var(--muted); }
.tk-eq { font-size: calc(12.5px * var(--fs, 1)); white-space: nowrap; }
.prazo { display: flex; flex-direction: column; line-height: 1.3; white-space: nowrap; }
.prazo b { font-size: calc(12.5px * var(--fs, 1)); font-weight: 500; }
.prazo small { font-size: calc(11.5px * var(--fs, 1)); }
.prazo.late small { color: var(--bad); font-weight: 600; }
.prazo.soon small { color: var(--warn); font-weight: 600; }
.sk { display: block; height: 12px; width: 70%; border-radius: 999px; background: linear-gradient(90deg, var(--line), var(--soft), var(--line)); background-size: 200% 100%; animation: skShine 1.2s ease-in-out infinite; }
@keyframes skShine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (max-width: 1279px) and (min-width: 801px) {
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .inicio-grade { grid-template-columns: minmax(0, 1fr); }
  .atencao-linha .resp, .atencao-linha > .button { width: 132px; }
  .tk-table th:nth-child(3), .tk-table .tk-eq { display: none; }
}
@media (max-width: 800px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inicio-grade { grid-template-columns: minmax(0, 1fr); }
  .atencao-linha { flex-wrap: wrap; padding: 12px 14px; }
  .atencao-txt { flex: 1 1 100%; }
  .filtros-pilula select, .busca-tk { flex: 1 1 100%; }
}

/* D: telas do computador da Rodada 31 (agenda, equipamentos, relatórios, Meu dia) */
.av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: calc(10px * var(--fs, 1)); font-weight: 700; flex: none; }
.pessoa { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pessoa > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--neutral-bg); box-shadow: var(--shadow-sm); }
.seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--neutral); font-family: inherit; font-size: calc(13px * var(--fs, 1)); font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.ag-controles { display: flex; align-items: center; gap: 8px; }
.ag-legenda { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 14px; font-size: calc(12.5px * var(--fs, 1)); color: var(--muted); }
.ag-legenda .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.dot.sched { background: var(--primary); } .dot.run { background: var(--cyan); } .dot.pause { background: var(--warn-bar); } .dot.late { background: var(--bad); } .dot.done { background: var(--good); }
.ag-semana { display: grid; grid-template-columns: repeat(5, minmax(0, 1.2fr)) repeat(2, minmax(0, .6fr)); min-height: 420px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; }
.ag-dia { border-left: 1px solid var(--line); min-width: 0; }
.ag-dia:first-child { border-left: 0; }
.ag-dia > header { display: flex; align-items: baseline; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); font-size: calc(11.5px * var(--fs, 1)); font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.ag-dia > header b { font-size: calc(14px * var(--fs, 1)); color: var(--text); letter-spacing: 0; }
.ag-dia.hoje { background: var(--soft); }
.ag-dia.hoje > header b { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--on-brand); }
.ag-lista { display: grid; gap: 8px; padding: 8px; align-content: start; }
.ag-os { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; padding: 8px 10px 8px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent); background: var(--soft); color: var(--text); text-decoration: none; min-width: 0; }
.ag-os:hover { box-shadow: inset 0 0 0 1px var(--primary); }
.ag-os .ag-hora { font-size: calc(11.5px * var(--fs, 1)); font-weight: 700; color: var(--primary); }
.ag-os .av { width: 20px; height: 20px; font-size: calc(8.5px * var(--fs, 1)); justify-self: end; }
.ag-os strong { grid-column: 1 / -1; font-size: calc(13px * var(--fs, 1)); line-height: 1.25; overflow-wrap: anywhere; }
.ag-os small { grid-column: 1 / -1; font-size: calc(11.5px * var(--fs, 1)); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-os.run { background: color-mix(in srgb, var(--cyan) 14%, var(--surface)); }
.ag-os.pause { background: var(--warn-bg); } .ag-os.pause .ag-hora { color: var(--warn); }
.ag-os.late { background: var(--bad-bg); } .ag-os.late .ag-hora { color: var(--bad); }
.ag-os.done { background: var(--good-bg); } .ag-os.done .ag-hora { color: var(--good); }
.ag-os.cancel { background: var(--neutral-bg); opacity: .7; }
.ag-dia.fim .ag-os .av, .ag-dia.fim .ag-os small { display: none; }
.ag-mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; }
.ag-cab { padding: 12px; font-size: calc(11.5px * var(--fs, 1)); font-weight: 700; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); }
.ag-cel { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 82px; padding: 12px; border: 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; }
button.ag-cel { cursor: pointer; } button.ag-cel:hover { background: var(--soft); }
.ag-cel b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; font-size: calc(13px * var(--fs, 1)); }
.ag-cel.hoje b { min-width: 28px; height: 28px; padding: 0 6px; background: var(--brand); color: var(--on-brand); border-radius: 999px; }
.ag-cel em { font-style: normal; font-size: calc(11.5px * var(--fs, 1)); font-weight: 700; padding: 3px 9px; border-radius: 12px; background: var(--soft); color: var(--primary); }
.ag-cel em.done { background: var(--good-bg); color: var(--good); } .ag-cel em.late { background: var(--bad-bg); color: var(--bad); }
.filtros-pilula { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.filtros-pilula .busca { position: relative; display: block; width: 300px; max-width: 100%; }
.filtros-pilula .busca i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filtros-pilula .busca input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 0; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); font: inherit; }
.chip-filtro { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); font-weight: 600; font-size: calc(13px * var(--fs, 1)); font-family: inherit; cursor: pointer; }
.chip-filtro b { font-size: calc(12px * var(--fs, 1)); padding: 1px 7px; border-radius: 10px; background: var(--neutral-bg); }
.chip-filtro.on { background: var(--brand); color: var(--on-brand); box-shadow: none; } .chip-filtro.on b { background: rgba(3, 31, 41, .28); color: var(--on-brand); }
.pilula select { height: 38px; padding: 0 34px 0 16px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); font-weight: 600; font-size: calc(13px * var(--fs, 1)); font-family: inherit; max-width: 100%; }
.eq-tabela td small, .rel-tabela td small { display: block; color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.eq-tabela .prox { font-weight: 600; } .eq-tabela .prox.venceu { color: var(--bad); } .eq-tabela .prox.hoje { color: var(--warn); }
.badge i { margin-right: 5px; }
.kpis5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.kpis5 .metric { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.kpis5 .metric-label { font-size: calc(11.5px * var(--fs, 1)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpis5 .metric-value { font-size: calc(28px * var(--fs, 1)); font-weight: 700; margin: 6px 0 2px; }
.kpis5 small { color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); }
.rel-tabela td { vertical-align: middle; }
.pdf { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.pdf.ok { color: var(--primary); } .pdf.bad { color: var(--bad); } .pdf.wait { color: var(--muted); }
.pdf.wait i { animation: dgiro 1s linear infinite; } @keyframes dgiro { to { transform: rotate(360deg) } }
.ag-planos { margin-top: 4px; } .ag-planos .panel-head { display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 1400px) {
  .kpis5 { gap: 8px; } .kpis5 .metric { padding: 12px 14px; } .kpis5 .metric-value { font-size: calc(24px * var(--fs, 1)); }
  .rel-tabela th:nth-child(2), .rel-tabela td:nth-child(2) { display: none; }
}
@media (max-width: 760px) { .kpis5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ag-semana { grid-template-columns: 1fr; } .ag-dia.fim .ag-os small, .ag-dia.fim .ag-os .av { display: initial; } }
@media print { .side, .topbar, .page-head .toolbar, .filtros-pilula, .mobile-nav { display: none !important; } }

/* D: Meu dia no computador */
@media (min-width: 1024px) {
  .tec-resumo { max-width: 1100px; }
  .tec-lista { max-width: 1100px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 12px; align-items: start; }
  .tec-titulo { font-size: calc(14px * var(--fs, 1)); letter-spacing: 0; text-transform: none; color: var(--text); }
  .tec-titulo::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
  .tec-grupo.ativo .tec-titulo::before { background: var(--cyan); }
  .tec-grupo.atraso .tec-titulo::before { background: var(--bad); }
  .tec-grupo.atraso .tec-titulo, .tec-grupo.ativo .tec-titulo { color: var(--text); }
  .tec-row { padding: 16px; border-radius: 14px; }
}
.kpis5 .metric-label, .kpis5 .metric-value, .kpis5 small { text-align: left; }
dialog.dialog.dialog-small .dialog-body { flex: none; }
.dialog [aria-invalid=true] { border-color: var(--bad) !important; box-shadow: 0 0 0 1px var(--bad); }

/* E: ficha do equipamento, checklists, cadastros em árvore, equipes, chamado aberto e portal */

.e-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.e-ficha { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; margin-top: 16px; }
.e-ficha-main, .e-ficha-lado { display: grid; gap: 16px; min-width: 0; }
.e-ficha .panel { margin: 0; }
.e-ficha-extra { display: grid; gap: 16px; margin-top: 16px; }
.e-info dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; margin: 0; padding: 20px; }
.e-info dt, .e-prox small { font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.e-info dd { margin: 4px 0 0; font-weight: 500; }
.e-linhas { display: grid; }
.e-linha { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.e-linha:first-child { border-top: 0; }
.e-linha:hover { background: var(--soft); }
.e-linha strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-linha small { color: var(--muted); }
.e-prot { color: var(--muted); font-variant-numeric: tabular-nums; text-decoration: none; }
.e-vazio { margin: 0; padding: 18px 20px; color: var(--muted); }
.e-cont { margin-left: auto; font-size: calc(13px * var(--fs, 1)); color: var(--muted); }
.e-qr { display: grid; justify-items: center; gap: 8px; padding: 22px 18px; text-align: center; }
.e-qr p { margin: 0; color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.e-qr-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--soft); color: var(--primary); font-size: calc(28px * var(--fs, 1)); }
.e-prox { padding: 18px 20px; display: grid; gap: 6px; }
.e-prox strong { font-size: calc(22px * var(--fs, 1)); }
.e-prox p { margin: 0; }
.e-versao { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--neutral-bg); color: var(--neutral); font-weight: 600; font-size: calc(12px * var(--fs, 1)); }
.e-acoes { display: flex; gap: 8px; justify-content: flex-end; }
.e-arvore { display: grid; gap: 14px; margin-top: 16px; }
.e-cliente > summary { display: flex; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; list-style: none; }
.e-cliente > summary::-webkit-details-marker { display: none; }
.e-cli-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--soft); color: var(--primary); }
.e-cliente ul { list-style: none; margin: 0; padding: 0 20px 14px 36px; }
.e-no > div { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.e-no > div span { margin-left: auto; font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
.e-no ul { border-left: 1px solid var(--line); padding-left: 18px; margin-left: 8px; }
.e-eq { padding: 0 !important; margin: 0 0 4px !important; }
.e-eq a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 2px 0; border-radius: 8px; background: var(--neutral-bg); color: var(--text); text-decoration: none; font-size: calc(14px * var(--fs, 1)); }
.e-eq a span { color: var(--neutral); }
.e-equipe { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.e-tec { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; padding: 16px; margin: 0; }
.e-tec small { display: block; color: var(--muted); }
.e-tec dl { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 0; }
.e-tec dt { font-size: calc(11.5px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.e-tec dd { margin: 2px 0 0; font-size: calc(20px * var(--fs, 1)); font-weight: 700; }
.e-tec dd.alerta { color: var(--bad); }
.e-aberto { display: grid; justify-items: center; gap: 6px; padding: 8px 0 14px; text-align: center; }
.e-aberto h3 { margin: 8px 0 0; font-size: calc(20px * var(--fs, 1)); }
.e-aberto p { margin: 0; color: var(--muted); }
.e-check { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--good-bg); color: var(--good); font-size: calc(32px * var(--fs, 1)); animation: ePop .45s cubic-bezier(.2, .8, .2, 1) both; }
.e-prot-grande { font-size: calc(22px * var(--fs, 1)); font-variant-numeric: tabular-nums; }
.e-prazo { display: inline-flex; align-items: center; gap: 6px; }
@keyframes ePop { from { transform: scale(0); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .e-check { animation: none; } }
.e-portal-cta { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 16px; }
.e-portal-cta > div { flex: 1; }
.e-portal-cta p { margin: 2px 0 0; color: var(--muted); }

@media (max-width: 1100px) { .e-ficha { grid-template-columns: 1fr; } .e-info dl { grid-template-columns: repeat(2, 1fr); } }

/* F: celular completo (rodada 32) */
.m-acao, .m-hero, .so-mob { display: none; }
@media (max-width: 800px) {
  .topbar > .selo { display: none; }
  .topbar .m-acao { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 0; border-radius: 22px; background: var(--brand); color: var(--on-brand); font: 600 calc(13.5px * var(--fs, 1)) var(--font); cursor: pointer; }
  [data-theme='escuro'] .topbar .m-acao { background: linear-gradient(180deg, #2bc0e4 0%, #0f93b7 100%); color: #00141b; }
  .topbar .m-acao-novo { width: 44px; padding: 0; margin-left: auto; }
  .topbar .m-acao-qr { padding: 0 14px; margin-left: auto; }
  .topbar .m-acao svg { width: 20px; height: 20px; }
  .so-desk { display: none; }
  .so-mob { display: inline; }

  /* Início do gestor */
  .m-hero { display: block; margin: 4px 0 14px; }
  .m-hero small { display: block; font-size: calc(13px * var(--fs, 1)); color: var(--muted); }
  .m-hero h1 { margin: 2px 0 0; font-size: calc(26px * var(--fs, 1)); line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
  .page:has(.m-hero) > .page-head { display: none; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
  .kpis .kpi { padding: 10px 12px; gap: 2px; border-radius: 0; box-shadow: none; transform: none; }
  .kpis .kpi + .kpi { border-left: 1px solid var(--line); }
  .kpis .kpi:nth-child(5), .kpi-ic, .kpi small { display: none; }
  .kpi-nome { font-size: calc(11px * var(--fs, 1)); letter-spacing: 0; text-transform: none; font-weight: 600; }
  .kpi-valor { font-size: calc(26px * var(--fs, 1)); font-weight: 600; line-height: 1.1; }
  .inicio-grade { display: block; }
  .inicio-lado { display: none; }
  .inicio-grade > .panel { background: transparent; box-shadow: none; border-radius: 0; }
  .inicio-grade > .panel > .panel-head { padding: 4px 2px 10px; border: 0; }
  .atencao-linha { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); border: 0; }
  .atencao-linha .atencao-txt { order: 2; }
  .atencao-linha .atencao-tags { order: 1; display: flex; flex-wrap: wrap; gap: 6px; }
  .atencao-linha > :last-child { order: 3; align-self: flex-end; }

  /* Lista de chamados em cartões */
  .page > .panel:has(.tk-table) { background: transparent; box-shadow: none; }
  .tk-table, .tk-table tbody { display: block; }
  .tk-table tr { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 6px 8px; align-items: center; margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); border: 0; }
  .tk-table td { display: block; padding: 0; min-width: 0; }
  .tk-table td.optional-column { display: block; }
  .tk-table td.tk-eq { display: none; }
  .tk-table .tk-num { grid-column: 1 / 3; grid-row: 1; font-size: calc(12px * var(--fs, 1)); }
  .tk-table .tk-num a { color: var(--muted); font-weight: 500; }
  .tk-table td:nth-child(7) { grid-column: 3; grid-row: 1; justify-self: end; text-align: right; }
  .tk-table td:nth-child(7) b { display: none; }
  .tk-table td:nth-child(7) small { font-size: calc(12px * var(--fs, 1)); }
  .tk-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .tk-table td:nth-child(2) strong { font-size: calc(15px * var(--fs, 1)); }
  .tk-table td:nth-child(5) { grid-column: 1; grid-row: 3; }
  .tk-table td:nth-child(4) { grid-column: 2; grid-row: 3; }
  .tk-table td:nth-child(6) { grid-column: 3; grid-row: 3; justify-self: end; }
  .tk-table td:nth-child(6) .resp > span:not(.av) { display: none; }
  .chips-f { display: flex; flex-wrap: wrap; gap: 8px; }
  .chips-f .chip-f { min-height: 40px; }
  .filtros-pilula { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .filtros-pilula .busca-tk { grid-column: 1 / -1; }
  .filtros-pilula > :last-child:nth-child(even):not(.busca-tk) { grid-column: 1 / -1; }
  .filtros-pilula .pilula { display: block; min-width: 0; }
  #report-filters > .pilula:first-child { grid-column: 1 / -1; }
  .filtros-pilula select, .filtros-pilula .pilula select { width: 100%; max-width: none; min-height: 44px; font-size: calc(13px * var(--fs, 1)); padding-left: 14px; }
  .filtros-pilula .view-switch { display: none; }
  /* Linhas de lista: título em cima; protocolo, data e selo embaixo, sem corte. */
  .e-linha { flex-wrap: wrap; gap: 4px 10px; padding: 12px 14px; }
  .e-linha strong { order: -1; flex: 1 1 100%; white-space: normal; overflow: visible; }
  .e-linha .badge { flex: none; margin-left: auto; }
  /* KPIs: valor ancorado embaixo, mesmo quando o rótulo quebra em duas linhas. */
  .kpis .kpi, .kpis5 .metric, .metrics .metric { justify-content: space-between; }
  .tabs { display: none; }
  .tabs-select { display: grid; gap: 6px; margin-bottom: 16px; }
  #main .panel:has(.eq-tabela) { background: transparent; box-shadow: none; }

  /* Faixa sem internet */
  #offline.notice { display: flex; align-items: center; gap: 8px; margin: 8px 20px 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); }
  #offline.notice[hidden] { display: none; }
  #offline.notice a { margin-left: auto; color: inherit; text-decoration: underline; font-weight: 700; }

  /* Meu dia */
  .tec-head h1 { font-size: calc(28px * var(--fs, 1)); font-weight: 600; }
  .tec-head .toolbar, .tec-resumo { display: none; }
  .tec-titulo { font-size: calc(16px * var(--fs, 1)); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); }
  .tec-ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
  .tec-grupo.ativo .tec-ponto { background: var(--cyan); }
  .tec-grupo.atraso .tec-ponto { display: none; }
  .tec-grupo.atraso .tec-titulo .ph { color: var(--bad); }
  .tec-titulo span { background: transparent; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
  .tec-row { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; border-radius: 14px; }
  .tec-main { display: flex; flex-direction: column; gap: 6px; }
  .tec-ic { display: none; }
  .tec-top { display: flex; align-items: center; justify-content: space-between; font-size: calc(13px * var(--fs, 1)); color: var(--muted); }
  .tec-os { display: inline-flex; align-items: center; gap: 8px; }
  .tec-hora { color: var(--text); font-size: calc(15px * var(--fs, 1)); }
  .tec-tx strong { font-size: calc(17px * var(--fs, 1)); line-height: 1.25; }
  .tec-desde { display: inline-flex; align-items: center; gap: 8px; font-size: calc(14px * var(--fs, 1)); font-weight: 600; color: var(--primary); }
  .tec-desde i { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); }
  .tec-nota { display: flex; gap: 6px; align-items: center; font-size: calc(13px * var(--fs, 1)); color: var(--warn); }
  .tec-tags { display: none; }
  .tec-acoes .button { min-height: 48px; }
  .tec-row.pausada .tec-acoes .button, .tec-acoes .button:only-child { flex: 1; }

  /* Folha Suíte vinda de baixo */
  .suite { position: static; }
  .suite .pop:not([hidden]) { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; z-index: 90; padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(3, 31, 41, .28); animation: sheetUp .26s cubic-bezier(.2, .8, .2, 1) both; }
  .suite .pop:not([hidden])::before { content: ''; display: block; width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--line); }
  .suite .pop .lbl { font-size: calc(17px * var(--fs, 1)); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); padding: 4px 4px 10px; }
  .suite .pop .res { min-height: 64px; }

  /* Menu */

  /* Ler QR */
  dialog.scan-dialog { background: #031f29; color: #f2f8fa; }
  dialog.scan-dialog .dialog-head { background: transparent; color: #f2f8fa; justify-content: space-between; }
  dialog.scan-dialog .dialog-head h2 { color: #f2f8fa; font-size: calc(16px * var(--fs, 1)); }
  dialog.scan-dialog .icon-button { background: rgba(255, 255, 255, .12); color: #f2f8fa; border-radius: 50%; width: 44px; height: 44px; }
  dialog.scan-dialog .dialog-body { display: flex; flex-direction: column; padding: 0 16px 16px; }
  .scan { flex: 1; display: flex; flex-direction: column; gap: 16px; }
  .scan-visor { position: relative; flex: 1; min-height: 260px; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #0b3a4a, #031f29); }
  .scan-visor video { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; background: transparent; }
  .scan-canto { position: absolute; width: 56px; height: 56px; border: 4px solid #5fd0ee; }
  .scan-canto.c1 { top: 18%; left: 18%; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
  .scan-canto.c2 { top: 18%; right: 18%; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
  .scan-canto.c3 { bottom: 18%; left: 18%; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
  .scan-canto.c4 { bottom: 18%; right: 18%; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
  .scan-linha { position: absolute; left: 20%; right: 20%; top: 50%; height: 2px; background: #5fd0ee; box-shadow: 0 0 14px #5fd0ee; }
  .scan-manual { display: block; margin: 0; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
  .scan-manual p { margin: 0 0 10px; font-size: calc(14px * var(--fs, 1)); color: #cfe3ea; text-align: center; }
  .scan-linha-form { display: flex; gap: 10px; }
  .scan-linha-form input { flex: 1; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #f2f8fa; }
  .scan-found { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; background: var(--surface); color: var(--text); }
  .scan-ok { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: var(--good); }
  .scan-found strong { font-size: calc(18px * var(--fs, 1)); }
  .scan-found-acoes { display: flex; gap: 10px; margin-top: 10px; }
  .scan-found-acoes .button { flex: 1; min-height: 48px; justify-content: center; }
  dialog.scan-achou .scan-manual { display: none; }

  /* Pendências */
  .pending-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .pending-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .pending-actions .button { flex: 1; min-height: 44px; }
}
@media (min-width: 801px) {
  .m-hero, .m-acao, .so-mob { display: none; }
  .scan-visor { position: relative; border-radius: 12px; overflow: hidden; background: #021820; }
  .scan-canto, .scan-linha { display: none; }
  .scan-found { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
  .scan-found-acoes { display: flex; gap: 10px; margin-top: 10px; }
  .scan-linha-form { display: flex; gap: 10px; }
  .scan-linha-form input { flex: 1; }
  .scan-ok { margin: 0; font-weight: 600; color: var(--good); }
}
.scan-ok .ph, .scan-ok svg { width: 18px; height: 18px; }
@media (max-width: 800px) {
  .page:has(#filtros-tk, #report-filters) > .page-head > .toolbar { display: none; }
  .tk-table td:nth-child(2) .tk-titulo { display: block; }
  .tk-table td:nth-child(2) { min-height: 0; align-self: start; }
}
@media (max-width: 800px) {
  .tk-table td { height: auto; }
  .tec-main { align-items: stretch; }
  .topbar .m-acao { white-space: nowrap; }
}

/* F: checklist com botões grandes */
.choice-native { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.choice-btns { display: flex; gap: 8px; margin: 4px 0 8px; }
.choice-btns button { flex: 0 1 180px; min-height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: 600 calc(15px * var(--fs, 1)) var(--font); cursor: pointer; }
.choice-btns button[data-v="true"].on { background: var(--good-bg); box-shadow: inset 0 0 0 2px var(--good); color: var(--good); }
.choice-btns button[data-v="false"].on { background: var(--bad-bg); box-shadow: inset 0 0 0 2px var(--bad); color: var(--bad); }
.choice-btns button:disabled { opacity: .6; cursor: default; }
@media (max-width: 800px) {
  .checklist-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .checklist-item:last-of-type { border-bottom: 0; }
  .choice-btns button { flex: 1; }
  .checklist-item h3 { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; font-size: calc(15px * var(--fs, 1)); font-weight: 600; }
  .checklist-item .required { font-size: calc(12px * var(--fs, 1)); font-weight: 400; color: var(--muted); }
  .checklist-item input[type="file"] { min-height: 48px; padding: 10px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .checklist-progress { height: 6px; }
}

/* F: ajustes de celular, parte 3 */
.m-voltar { display: none; }
.field:has(> .qr-pick) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: end; }
.field:has(> .qr-pick) > .field-label { grid-column: 1 / -1; grid-row: 1; }
.field:has(> .qr-pick) > small, .field:has(> .qr-pick) > .field-error { grid-column: 1 / -1; }
.field:has(> .qr-pick) > select { grid-column: 1; grid-row: 2; }
.field:has(> .qr-pick) > .qr-pick { grid-column: 2; grid-row: 2; margin: 0; min-height: 44px; }
#offline.notice a { margin-left: auto; font-weight: 700; }
@media (max-width: 800px) {
  .field:has(> .qr-pick) > .qr-pick { min-height: 48px; padding-inline: 14px; }
  .area[data-rota="checklists"] .m-voltar, .area[data-rota="cadastros"] .m-voltar, .area[data-rota="relatorios"] .m-voltar,
  .area[data-rota="pendencias"] .m-voltar, .area[data-rota="preventivas"] .m-voltar, .area[data-rota="atividades"] .m-voltar { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 4px 20px 0; font-weight: 600; color: var(--primary); text-decoration: none; }
  .m-voltar svg { width: 18px; height: 18px; }

  /* Portal */
  .e-portal-cta { flex-wrap: wrap; background: var(--brand); color: var(--on-brand); box-shadow: none; }
  .e-portal-cta .e-qr-ic { background: rgba(3, 31, 41, .22); color: var(--on-brand); }
  .e-portal-cta strong { color: var(--on-brand); font-size: calc(17px * var(--fs, 1)); }
  .e-portal-cta p { color: var(--on-brand); }
  .e-portal-cta > .button, [data-theme='escuro'] .e-portal-cta > .button.primary { flex: 1 1 100%; min-height: 48px; justify-content: center; background: #fefefe; color: #0a7896; box-shadow: none; }

  /* Equipamentos em cartões */
  .eq-tabela thead { display: none; }
  .eq-tabela, .eq-tabela tbody { display: block; }
  .eq-tabela tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; margin: 0 0 12px; padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); border: 0; }
  .eq-tabela td { display: block; height: auto; padding: 0; border: 0; min-width: 0; }
  .eq-tabela td:nth-child(1) { grid-column: 1; grid-row: 1; font-size: calc(13px * var(--fs, 1)); }
  .eq-tabela td:nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; }
  .eq-tabela td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .eq-tabela td:nth-child(2) strong { font-size: calc(16px * var(--fs, 1)); }
  .eq-tabela td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
  .eq-tabela td:nth-child(3) strong { font-size: calc(13px * var(--fs, 1)); font-weight: 400; color: var(--muted); }
  .eq-tabela td:nth-child(5) { display: none; }
  .eq-tabela td:nth-child(6) { grid-column: 1 / -1; grid-row: 4; font-size: calc(13px * var(--fs, 1)); }
  .eq-tabela td:nth-child(6)::before { content: 'Próxima preventiva '; font-weight: 400; color: var(--text); }
  .page > .panel:has(.eq-tabela) { background: transparent; box-shadow: none; padding-inline: 0; }
}
@media (max-width: 800px) {
  .page:has(#eq-host) > .page-head > .toolbar { display: none; }
  .area[data-rota="checklists"] .m-acao-novo, .area[data-rota="cadastros"] .m-acao-novo, .area[data-rota="relatorios"] .m-acao-novo,
  .area[data-rota="pendencias"] .m-acao-novo, .area[data-rota="menu"] .m-acao-novo, .area[data-rota="agenda"] .m-acao-novo { display: none; }
  .area[data-rota="checklists"] .suite, .area[data-rota="cadastros"] .suite, .area[data-rota="relatorios"] .suite, .area[data-rota="pendencias"] .suite, .area[data-rota="menu"] .suite, .area[data-rota="agenda"] .suite { margin-left: auto; }
}
@media (max-width: 800px) {
  .filtros-pilula:has(.chip-filtro) { display: flex; flex-wrap: wrap; }
  .filtros-pilula:has(.chip-filtro) > .busca { flex: 1 1 100%; }
  .chip-filtro { white-space: nowrap; min-height: 40px; }
}

/* G: progresso do checklist no Meu dia */
.tec-prog { display: grid; gap: 4px; margin-top: 6px; }
.tec-prog-bar { height: 6px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; display: block; }
.tec-prog-bar i { display: block; height: 100%; background: var(--cyan); border-radius: 999px; }
.tec-prog small { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
@media (max-width: 800px) {
  .kpis5 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
  .kpis5 .metric { padding: 10px 10px; border-radius: 0; box-shadow: none; }
  .kpis5 .metric + .metric { border-left: 1px solid var(--line); }
  .kpis5 .metric:nth-child(5), .kpis5 small { display: none; }
  .kpis5 .metric-label { font-size: calc(11px * var(--fs, 1)); letter-spacing: 0; text-transform: none; font-weight: 600; }
  .kpis5 .metric-value { font-size: calc(22px * var(--fs, 1)); margin: 2px 0 0; }
  .rel-tabela thead { display: none; }
  .rel-tabela, .rel-tabela tbody { display: block; }
  .rel-tabela tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 6px 10px; align-items: center; margin: 0 0 12px; padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); border: 0; }
  .rel-tabela td { display: block; height: auto; padding: 0; border: 0; min-width: 0; font-size: calc(12.5px * var(--fs, 1)); }
  .rel-tabela td:nth-child(2), .rel-tabela td:nth-child(8) { display: none; }
  .rel-tabela td:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
  .rel-tabela td:nth-child(6) { grid-column: 3; grid-row: 1; justify-self: end; color: var(--muted); }
  .rel-tabela td:nth-child(3) { grid-column: 1; grid-row: 2; color: var(--muted); }
  .rel-tabela td:nth-child(4) { grid-column: 2; grid-row: 2; color: var(--muted); }
  .rel-tabela td:nth-child(5) { grid-column: 3; grid-row: 2; justify-self: end; }
  .rel-tabela td:nth-child(7) { grid-column: 1 / 3; grid-row: 3; }
  .rel-tabela td:nth-child(9) { grid-column: 3; grid-row: 3; justify-self: end; }
  .page:has(.rel-tabela) .table-wrap { background: transparent; box-shadow: none; }
}

/* G: painel lateral da O.S. */
.os-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(500px, 100vw); z-index: 60; background: var(--surface, #fff); box-shadow: -12px 0 32px rgba(3, 31, 41, .18); border-left: 1px solid var(--line); display: flex; flex-direction: column; animation: fadeUp .18s ease-out; }
.os-drawer-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 20px 24px 12px; border-bottom: 1px solid var(--line); }
.os-drawer-head h2 { margin: 0; font-size: calc(18px * var(--fs, 1)); }
.os-drawer-head .b-meta { margin: 4px 0 0; }
.os-drawer-body { padding: 16px 24px 32px; overflow-y: auto; flex: 1; }
.os-drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.os-drawer .b-os-link { margin-top: 16px; }
@media (max-width: 1099px) { .os-drawer { display: none; } }
@media (max-width: 800px) {
  /* Consulta no celular: a edição fica no computador */
  .area[data-rota="checklists"] #main [data-action^="new"], .area[data-rota="checklists"] #main [data-template-edit],
  .area[data-rota="cadastros"] #main [data-action^="new"], .area[data-rota="cadastros"] #main [data-action^="edit"] { display: none; }
  .area[data-rota="checklists"] .page-head .subtitle, .area[data-rota="cadastros"] .page-head .subtitle { font-size: 0; }
  .area[data-rota="checklists"] .page-head .subtitle::after, .area[data-rota="cadastros"] .page-head .subtitle::after { content: 'Para consultar. A edição fica no computador.'; font-size: calc(12.5px * var(--fs, 1)); }
}

/* Controles nativos com o tema (D5): caixas e rádios na cor de foco, select com seta desenhada, botão de arquivo
   como botão secundário e <details> sem triângulo nativo. */
input[type='checkbox'], input[type='radio'] { accent-color: var(--focus); }
select:not([multiple]) { appearance: none; -webkit-appearance: none; padding-right: 36px; background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%235d7480' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px; }
[data-theme='escuro'] select:not([multiple]) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23b9d4dd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type='file'] { padding: 6px 8px 6px 6px; min-height: 44px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
input[type='file']::file-selector-button { height: 32px; margin-right: 12px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text); font: inherit; font-size: calc(12.5px * var(--fs, 1)); font-weight: 600; cursor: pointer; transition: background-color .15s ease; }
input[type='file']::file-selector-button:hover { background: var(--soft); }
.b-more summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.b-more summary::-webkit-details-marker { display: none; }
.b-more summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.b-more[open] summary::before { transform: rotate(45deg); }
.multi-pick { display: grid; gap: 8px; }
.multi-busca { position: relative; display: block; }
.multi-busca .ph { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.multi-busca input { width: 100%; padding-left: 38px; }
.multi-lista { display: grid; gap: 2px; padding: 4px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.multi-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-size: calc(13.5px * var(--fs, 1)); }
.multi-item:hover { background: var(--soft); }
.multi-item input { width: 18px; min-height: 18px; margin: 0; box-shadow: none; }
.multi-item[hidden] { display: none; }
.multi-conta { font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
/* Padrão único de detalhe (chamado, O.S., plano, equipamento): voltar em link, ações logo abaixo do título quando a
   lateral desce (até 1100 px), sem divisória quando só há links e sem o segundo voltar do celular. */
.b-links:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
@media (max-width: 1100px) {
  .b-side { display: contents; }
  .b-side > .b-actions { order: -1; }
}
.area:has(#main .b-back) .m-voltar { display: none !important; }
.plano-eqs { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.plano-eqs .e-linha { padding: 10px 14px; }
.plano-eqs .e-linha .ph { color: var(--muted); }
.filtros-pilula .view-switch { margin-left: auto; }

/* Logo do login pelo tema (o de fundo escuro virava um bloco escuro no tema claro do celular). */
.lg-logo-mobile.so-escuro { display: none !important; }
[data-theme='escuro'] .lg-logo-mobile.so-escuro { display: block !important; }
[data-theme='escuro'] .lg-logo-mobile.so-claro { display: none !important; }
@media (max-width: 860px) { .lg-logo-mobile { padding: 0; background: none; border-radius: 0; height: 48px; } }
/* Equipes: cartões alinhados (o .panel + .panel empurrava todos menos o primeiro). */
.e-equipe > .panel + .panel { margin-top: 0; }
/* Pendências: aviso alinhado ao conteúdo e respiro antes dos painéis. */
#main > .notice, #main .notice.local-work-note { margin: 0 0 12px; display: flex; gap: 10px; align-items: flex-start; }
#main .notice.local-work-note > span { flex: none; display: inline-flex; }
#main .notice + .subtitle.section-space { margin-bottom: 16px; }
/* Gaveta da O.S.: local do equipamento em linha própria. */
.os-drawer .key-values dd small { display: block; margin-top: 2px; }
/* Lateral: nome longo do usuário quebra em duas linhas em vez de cortar. */
@media (min-width: 801px) { .side .quem b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
/* Menu: selo Atual igual ao do menu Suíte e realce do item atual na linha inteira. */
.menu-card { overflow: hidden; }
.menu-item.atual { background: var(--soft); margin: 0 -14px; padding-left: 14px; padding-right: 14px; width: calc(100% + 28px); }
@media (max-width: 800px) {
  .area[data-rota="cadastros"] #main [data-edit-catalog] { display: none; }
}

/* Celular: ações do checklist na página ficam no fim do formulário (fixas, ficavam por baixo da cápsula de abas). */
@media (max-width: 800px) { #main .form-actions { position: static; margin-bottom: 0; } }
/* Texto de apoio dentro dos cartões coloridos da Agenda: --neutral (o --muted ficava em 4,2:1 sobre o ciano e o verde suaves). */
.ag-os small { color: var(--neutral); }
.os-drawer .key-values dd small { font-size: calc(12px * var(--fs, 1)); }
