/* ===========================================================================
   Controle de Serviços — Works Design System
   Fraunces (serif/títulos) + Montserrat (UI) + IBM Plex Mono (dados)
   Papel quente · azul de marca #1B0DAE · sombras suaves · fontes locais (offline)
   =========================================================================== */

@font-face { font-family: 'Fraunces'; font-weight: 400 600; font-display: swap; font-optical-sizing: auto; src: url('/fonts/fraunces-latin.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 400 800; font-display: swap; src: url('/fonts/montserrat-latin.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('/fonts/plexmono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url('/fonts/plexmono-600.woff2') format('woff2'); }

:root {
  /* ── Marca ── */
  --blue: #1B0DAE; --blue-light: #3D2FD4; --blue-dark: #140A8C;
  --blue-50: #ECEAF7; --blue-100: #D7D2EF; --blue-200: #B7AFE3;

  /* ── Acento acolhedor (âmbar/terracota) ── */
  --amber: #C2703D; --amber-dark: #9A5330; --amber-600: #AE6135;
  --amber-50: #F6EDE4; --amber-100: #EEDCCB; --amber-200: #E2C4A9;
  --cream: #F5F4EE;

  /* ── Papel quente ── */
  --paper: #F5F4EE; --paper-2: #FBFAF5; --white: #FFFFFF;

  /* ── Neutros quentes (stone) ── */
  --gray-50: #FAF9F4; --gray-100: #F1F0E8; --gray-150: #E9E7DC;
  --gray-200: #E1DDD0; --gray-300: #CBC6B6; --gray-400: #9C978A;
  --gray-500: #6E6A5E; --gray-600: #4E4B42; --gray-700: #38352E;
  --gray-800: #26241F; --gray-900: #191712; --gray-950: #12100B;

  /* ── Semânticas dessaturadas ── */
  --success: #3F6B3A; --success-bg: #EAF1E6; --success-border: #C3D6BB;
  --warning: #9A6318; --warning-bg: #F7EEDD; --warning-border: #E7CE9F;
  --danger:  #A93B22; --danger-bg:  #F6E6DF; --danger-border:  #E4BEAE;

  /* ── Tipografia ── */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Montserrat', system-ui, -apple-system, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  /* ── Sombras suaves em camadas ── */
  --shadow-xs: 0 1px 2px rgba(16,22,40,.04);
  --shadow-sm: 0 1px 3px rgba(16,22,40,.05), 0 1px 2px rgba(16,22,40,.04);
  --shadow-md: 0 4px 12px -2px rgba(16,22,40,.07), 0 2px 6px -2px rgba(16,22,40,.05);
  --shadow-lg: 0 16px 40px -8px rgba(16,22,40,.12), 0 6px 14px -6px rgba(16,22,40,.07);
  --ring: 0 0 0 3px var(--blue-100);

  /* ── Raios ── */
  --r-xs: 8px; --r-sm: 10px; --r: 14px; --r-lg: 20px;

  /* ── Aliases legados (usados pelo app.js/markup existente) ── */
  --ground: var(--paper); --surface: var(--white); --surface-2: var(--gray-100); --surface-solid: var(--white);
  --ink: var(--gray-900); --muted: var(--gray-500); --faint: var(--gray-400);
  --line: var(--gray-200); --line-strong: var(--gray-300);
  --accent: var(--blue); --accent-2: var(--blue-light); --accent-ink: #fff;
  --accent-soft: var(--blue-50); --accent-deep: var(--blue-dark);
  --ok: var(--success); --ok-soft: var(--success-bg);
  --warn: var(--warning); --warn-soft: var(--warning-bg);
  --crit: var(--danger); --crit-soft: var(--danger-bg);
  --shadow: var(--shadow-sm);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans); font-size: 15px; line-height: 1.55; letter-spacing: -0.003em;
  background: var(--paper); color: var(--gray-900);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; border: none; color: inherit; }
input, select, textarea { font-family: inherit; }
a { color: var(--blue); }
svg { width: 1em; height: 1em; flex: 0 0 auto; }
.last-info svg { color: var(--blue); }

/* Títulos editoriais em serifa */
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
.app-title, .brand h1, .page-head h2, .big-q, .rep-head h2 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }

/* rótulos/eyebrows em sans; números/dados em mono */
.eyebrow, .step-title, th, .badge, .field label, .panel h3, .stat .k { font-family: var(--sans); }
.num, .stat .v, .timer, .pt-tag .n, td.n, .op-user .ocg { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Superfícies base (cartões) ---------- */
.card-glass, .panel, .stat, .modal, .login-card, .field-app .stepwrap {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r);
  box-shadow: var(--shadow-sm); position: relative;
}

/* ---------- Login / Autenticação ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-x: hidden;
  background-image: url('/img/bg-pattern.svg'); background-repeat: repeat; background-size: 300px; background-position: center; }
.login-card { width: 100%; max-width: 420px; min-width: 0; padding: 34px 32px; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
@media (max-width: 460px) { .login-card { padding: 26px 20px; } }
.brand { display: flex; align-items: center; gap: 13px; margin-bottom: 4px; }
.brand .logo { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--blue); color: #fff;
  display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: .02em; box-shadow: var(--shadow-sm); }
.brand h1 { font-size: 20px; color: var(--gray-950); }
.brand .tag { font-family: var(--sans); font-size: 10px; color: var(--gray-400); letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.subtitle { color: var(--gray-500); font-size: 14px; margin-bottom: 26px; font-weight: 500; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--white); border-right: 1px solid var(--gray-200); padding: 20px 14px; display: flex; flex-direction: column; }
.sidebar .brand { padding: 4px 8px 20px; }
.mod-switch { display: flex; gap: 4px; background: var(--gray-100); padding: 4px; border-radius: 12px; margin-bottom: 20px; }
.mod-switch button { flex: 1; padding: 8px; border-radius: 9px; background: transparent; color: var(--gray-500); font-weight: 600; font-size: 12.5px; transition: .15s; }
.mod-switch button.active { background: var(--white); color: var(--blue); box-shadow: var(--shadow-xs); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--gray-600);
  text-decoration: none; font-weight: 600; font-size: 14px; position: relative; transition: .15s; }
.nav a svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.7; }
.nav a:hover { background: var(--gray-100); color: var(--gray-900); }
.nav a.active { background: var(--blue-50); color: var(--blue); box-shadow: inset 3px 0 0 var(--blue); }
.side-foot { border-top: 1px solid var(--gray-200); padding-top: 14px; margin-top: 8px; font-size: 12px; color: var(--gray-500); }
.side-foot .u { color: var(--gray-950); font-weight: 700; font-size: 13px; }
.side-foot .row-foot { display: flex; gap: 8px; margin-top: 12px; }
.content { padding: 28px 32px; overflow: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 14px;
  border-bottom: 1px solid var(--gray-200); padding-bottom: 16px; }
.page-head h2 { font-size: 27px; color: var(--gray-950); }
.page-head .sub { color: var(--gray-500); font-size: 14px; margin-top: 5px; font-weight: 500; }

/* ---------- Botões ---------- */
.btn { background: var(--blue); color: #fff; padding: 11px 18px; border-radius: var(--r-sm); font-weight: 700; font-size: 14px;
  letter-spacing: -0.005em; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, box-shadow .15s, transform .05s; border: 1px solid transparent; white-space: nowrap; }
.btn:hover { background: var(--blue-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--ring); }
.btn svg { width: 17px; height: 17px; stroke-width: 1.8; }
.btn.secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-200); box-shadow: var(--shadow-xs); }
.btn.secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn.ghost { background: transparent; color: var(--gray-700); border-color: var(--gray-300); }
.btn.ghost:hover { color: var(--gray-900); background: var(--gray-100); }
select.btn { justify-content: flex-start; padding: 11px 34px 11px 14px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center; }

/* Grade de sons de alerta (tela Configurações) */
.sound-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.sound-opt { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-sm);
  padding: 12px 14px; font: inherit; font-weight: 600; color: var(--gray-800);
  box-shadow: var(--shadow-xs); transition: border-color .15s, background .15s, box-shadow .15s; }
.sound-opt:hover { border-color: var(--blue-200); background: var(--gray-50); }
.sound-opt .so-ic { display: inline-flex; color: var(--gray-500); flex: none; }
.sound-opt .so-ic svg { width: 18px; height: 18px; }
.sound-opt .so-lbl { flex: 1; min-width: 0; }
.sound-opt .so-mark { display: none; color: var(--blue); flex: none; }
.sound-opt .so-mark svg { width: 18px; height: 18px; stroke-width: 2.4; }
.sound-opt.on { border-color: var(--blue); background: var(--blue-50); color: var(--blue); box-shadow: var(--ring); }
.sound-opt.on .so-ic { color: var(--blue); }
.sound-opt.on .so-mark { display: inline-flex; }
.btn.ok { background: var(--success); color: #fff; } .btn.ok:hover { filter: brightness(.94); }
.btn.warn { background: var(--warning); color: #fff; } .btn.warn:hover { filter: brightness(.94); }
.btn.danger { background: var(--danger); color: #fff; } .btn.danger:hover { filter: brightness(.94); }
.btn.warm { background: var(--amber); color: #3a2500; } .btn.warm:hover { background: var(--amber-600); }
.btn.big { padding: 20px; font-size: 19px; min-height: 68px; border-radius: 16px; width: 100%; justify-content: center; gap: 12px; font-weight: 800; }
.btn.big svg { width: 26px; height: 26px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Campos ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 11px; color: var(--gray-500); margin-bottom: 7px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea { width: 100%; background: var(--white); border: 1px solid var(--gray-300); color: var(--gray-950);
  padding: 12px 14px; min-height: 48px; border-radius: var(--r-sm); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder, .field textarea::placeholder { color: var(--gray-400); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: var(--ring); }
.field select option { background: var(--white); color: var(--gray-950); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

/* ---------- Stat tiles ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { padding: 16px 18px; box-shadow: var(--shadow-md); transition: box-shadow .15s, transform .12s; }
.stat:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat .k { color: var(--gray-500); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; }
.stat .v { font-size: 30px; font-weight: 600; margin-top: 8px; color: var(--gray-950); line-height: 1; }
.stat .v small { font-size: 13px; color: var(--gray-400); font-weight: 500; }
.stat.alert { border-left: 3px solid var(--danger); }
.stat.alert .v { color: var(--danger); }
.stat.good .v { color: var(--success); }

/* ---------- Painéis / tabelas ---------- */
.panel { padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.panel h3 { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--gray-400); margin-bottom: 16px; padding-left: 11px; position: relative; }
.panel h3::before { content: ""; position: absolute; left: 0; top: 1px; bottom: 1px; width: 3px; background: var(--blue); border-radius: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--gray-150); }
th { color: var(--gray-400); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }
.table-wrap { overflow-x: auto; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .01em; border: 1px solid transparent; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge.pend { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge.off { background: var(--gray-100); color: var(--gray-600); border-color: var(--gray-200); }
.badge.crit { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }

.icon-btn { background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-500); width: 34px; height: 34px;
  border-radius: var(--r-sm); display: inline-grid; place-items: center; transition: .15s; box-shadow: var(--shadow-xs); }
.icon-btn svg { width: 16px; height: 16px; stroke-width: 1.7; }
.icon-btn:hover { color: var(--blue); border-color: var(--blue-200); background: var(--blue-50); }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(25,23,18,.35); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { border-radius: var(--r-lg); padding: 28px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
.modal h3 { font-family: var(--sans); margin-bottom: 20px; font-size: 17px; font-weight: 800; color: var(--gray-950); letter-spacing: -0.01em; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ---------- Toast / barra de rede ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--white); color: var(--gray-900);
  border: 1px solid var(--gray-200); padding: 12px 18px; border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 100; font-weight: 600; font-size: 13.5px; }
.toast.err { background: var(--danger); border-color: transparent; color: #fff; }
.toast.ok { background: var(--success); border-color: transparent; color: #fff; }
.netbar { position: fixed; top: 0; left: 0; right: 0; text-align: center; padding: 8px; font-size: 12.5px; font-weight: 700; z-index: 90; }
.netbar.off { background: var(--warning); color: #fff; }
.netbar.queue { background: var(--blue); color: #fff; }
.netbar.fail { background: var(--danger); color: #fff; }
.netbar.fail button { cursor: pointer; }

.empty { color: var(--gray-400); text-align: center; padding: 38px; font-size: 13.5px; }

/* ---------- Miniaturas / avatares ---------- */
.thumb { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; border: 1px solid var(--gray-200); vertical-align: middle; }
.thumb-lg { width: 68px; height: 68px; border-radius: var(--r-sm); object-fit: cover; border: 1px solid var(--gray-200); }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gray-200); }
.avatar-ph { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--blue-50); color: var(--blue); font-family: var(--mono); font-weight: 600; font-size: 13px; }
.avatar-ph.sq { border-radius: var(--r-sm); }
.avatar-ph svg { width: 16px; height: 16px; stroke-width: 1.7; }
.done-mark { width: 68px; height: 68px; margin: 0 auto; border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; border: 2px solid var(--success-border); }
.done-mark svg { width: 34px; height: 34px; stroke-width: 2; }
.cell-name { display: flex; align-items: center; gap: 10px; }

.emp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 4px; }
.emp-card { background: var(--white); border: 2px solid var(--gray-200); border-radius: var(--r); padding: 16px 8px; text-align: center; cursor: pointer; transition: .15s; box-shadow: var(--shadow-xs); }
.emp-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.emp-card:active { transform: scale(.98); }
.emp-card.sel { border-color: var(--blue); background: var(--blue-50); }
.emp-card img, .emp-card .ph { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; display: block; }
.emp-card .ph { display: grid; place-items: center; background: var(--blue-50); color: var(--blue); font-family: var(--mono); font-weight: 600; font-size: 23px; }
.emp-card .nm2 { font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--gray-950); }

/* ---------- App da colaboradora (registro concierge) ---------- */
.op-shell { min-height: 100vh; display: flex; flex-direction: column; }
.op-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px;
  background: var(--white); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 30; box-shadow: var(--shadow-xs); }
.op-head .brand { gap: 11px; }
.op-right { display: flex; align-items: center; gap: 14px; }
.op-user { display: flex; align-items: center; gap: 9px; }
.op-user .onm { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.op-user .ocg { font-size: 11px; color: var(--gray-500); }
.op-body { flex: 1; padding: 20px 16px 40px; background: var(--cream) url('/img/bg-pattern.svg') repeat; background-size: 300px; }
.op-summary { max-width: 500px; width: 100%; margin: 0 auto 14px; display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 14px; text-align: left; cursor: pointer; font-family: inherit; color: inherit; transition: .12s;
  background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--r); padding: 13px 16px; font-size: 14px; }
.op-summary:hover { border-color: var(--blue-200); box-shadow: var(--shadow-sm); }
.op-summary:active { transform: scale(.995); }
.op-summary .ol { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); white-space: nowrap; }
.op-summary #opcount { flex: 1; min-width: 0; }
.op-summary b { font-weight: 800; }
.op-summary .op-sum-cta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--blue);
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.op-summary .op-sum-cta svg { width: 15px; height: 15px; stroke-width: 2.4; }

/* Minhas atividades de hoje (app do colaborador) */
.act-head { margin-bottom: 12px; }
.act-kpis { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 14px; color: var(--gray-600); }
.act-kpis b { font-family: var(--mono); font-size: 18px; color: var(--gray-950); }
.act-list { display: flex; flex-direction: column; gap: 8px; }
.act-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: var(--r-sm); }
.act-time { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--blue); min-width: 46px; }
.act-main { flex: 1; min-width: 0; }
.act-pt { font-weight: 700; font-size: 15px; color: var(--gray-950); }
.act-sub { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }
.act-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }

/* Banner de fila (emergências/impedimentos) no topo do app */
.queue-banner { width: 100%; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 13px 15px;
  border-radius: var(--r); border: 1px solid var(--warning-border); background: var(--warning-bg); color: var(--gray-900);
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; text-align: left; transition: .12s; }
.queue-banner svg { width: 20px; height: 20px; color: var(--warning); flex: 0 0 auto; }
.queue-banner span:nth-of-type(1) { flex: 1; }
.queue-banner b { font-family: var(--mono); font-weight: 700; }
.queue-banner.urgent { border-color: var(--danger-border); background: var(--danger-bg); }
.queue-banner.urgent svg { color: var(--danger); }
.queue-banner .qb-cta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-700); white-space: nowrap; }
.queue-banner .qb-cta svg { width: 14px; height: 14px; color: inherit; }

/* Cards de demanda (Pendências e Emergências) */
.demand-group { margin-bottom: 18px; }
.dg-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.dg-h svg { width: 16px; height: 16px; }
.dg-em { color: var(--danger); } .dg-im { color: var(--warning); } .dg-ro { color: var(--blue); }
.demand-card.rotina { border-left: 4px solid var(--blue); }
.demand-card { width: 100%; display: block; text-align: left; cursor: pointer; font-family: inherit;
  border: 1px solid var(--gray-200); border-radius: var(--r); background: var(--white); padding: 14px 16px; margin-bottom: 10px; transition: .12s; }
.demand-card:hover { box-shadow: var(--shadow-sm); }
.demand-card:active { transform: scale(.99); }
.demand-card.emergencial { border-left: 4px solid var(--danger); }
.demand-card.impedimento { border-left: 4px solid var(--warning); }
.dc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dc-pt { font-weight: 700; font-size: 17px; color: var(--gray-950); }
.dc-sub { font-size: 13px; color: var(--gray-600); margin-top: 4px; }
.dc-cta { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--blue); }
.dc-cta svg { width: 16px; height: 16px; }
.dc-meta { margin-top: 8px; }
.dc-owner { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; }
.dc-owner.me { background: var(--success-bg, #e6f4ea); color: var(--success, #1a7f37); }
.dc-owner.other { background: var(--gray-100); color: var(--gray-600); }
.dc-owner.free { background: var(--warning-bg, #fdf3e3); color: var(--warning-strong, #9a6700); }
.demand-card.mine { border-left-color: var(--success, #1a7f37); box-shadow: 0 0 0 1px var(--success, #1a7f37); }
.emg-panel { border-color: var(--danger-border); box-shadow: 0 0 0 1px var(--danger-border); }
.emg-panel h3 svg { color: var(--danger); }
.emg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.emg-head h3 { margin: 0; }
.emg-tools { display: flex; align-items: center; gap: 8px; }
.emg-search { min-height: 36px; padding: 7px 11px; border: 1px solid var(--gray-200); border-radius: var(--r-sm);
  font: inherit; font-size: 13px; min-width: 220px; background: var(--white); }
.emg-search:focus { outline: none; box-shadow: var(--ring); border-color: var(--gray-300); }
/* Altura fixa: mesmo com centenas de emergências o painel nunca empurra o resto do dashboard. */
.emg-scroll, .dash-scroll { max-height: 340px; overflow-y: auto; }
.emg-scroll thead th, .dash-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--paper-2); }
@media (max-width: 600px) {
  .emg-head { flex-direction: column; align-items: stretch; }
  .emg-search { min-width: 0; width: 100%; }
}
.matalert-panel { border-color: var(--warning-border); box-shadow: 0 0 0 1px var(--warning-border); }
.matalert-panel h3 svg { color: var(--warning); }

/* ---- App de campo: novos componentes ---- */
/* Busca na lista de pendências + agrupamento por setor da rotina */
.dq-search { width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--gray-200);
  border-radius: var(--r-sm); font: inherit; font-size: 14px; background: var(--white); }
.dq-search:focus { outline: none; box-shadow: var(--ring); border-color: var(--gray-300); }
.dq-sector { margin-bottom: 8px; }
.dq-sector-h { font-size: 12px; font-weight: 800; color: var(--gray-500); text-transform: uppercase;
  letter-spacing: .05em; margin: 10px 0 8px; }
.dc-loc { display: inline-block; font-size: 12px; font-weight: 700; color: var(--gray-500);
  background: var(--gray-100); padding: 3px 9px; border-radius: 999px; margin-right: 6px; }
.dc-sla { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--gray-600);
  background: var(--gray-100); padding: 3px 9px; border-radius: 999px; margin-left: 6px; }
.dc-sla.late { background: var(--warning-bg); color: var(--warning); }
.dc-sla.over { background: var(--danger-bg); color: var(--danger); }

/* Próximo leito sugerido */
.next-suggest { width: 100%; text-align: left; cursor: pointer; font-family: inherit; margin-bottom: 16px;
  border: 1px solid var(--blue); border-left: 4px solid var(--blue); border-radius: var(--r);
  background: var(--white); padding: 13px 16px; transition: .12s; }
.next-suggest.urgent { border-color: var(--danger); border-left-color: var(--danger); background: var(--danger-bg); }
.next-suggest:active { transform: scale(.99); }
.ns-lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); }
.next-suggest.urgent .ns-lbl { color: var(--danger); }
.ns-pt { font-weight: 700; font-size: 18px; color: var(--gray-950); margin-top: 3px; }
.ns-loc { font-size: 12px; font-weight: 700; color: var(--gray-500); }
.ns-cta { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--blue); }
.ns-cta svg { width: 16px; height: 16px; }
.next-suggest.urgent .ns-cta { color: var(--danger); }

/* Cronômetro pausado + botão pausar/retomar */
.timer.paused { color: var(--warning); opacity: .65; }
#pause.resume { color: var(--success); font-weight: 700; }

/* Aviso de isolamento/precaução */
.pt-tag.iso { border-color: var(--danger-border); box-shadow: 0 0 0 1px var(--danger-border); }
.iso-warn { background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: var(--r);
  padding: 16px 18px; margin: 14px 0; }
.iso-warn-h { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--danger);
  text-transform: uppercase; letter-spacing: .04em; font-size: 14px; margin-bottom: 8px; }
.iso-warn-h svg { width: 20px; height: 20px; }
.iso-warn p { color: var(--gray-700); font-size: 14px; line-height: 1.5; margin: 0; }

/* Meta do turno */
.goal-box { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--r-sm);
  padding: 13px 15px; margin-bottom: 14px; }
.goal-top { display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.goal-sub { font-size: 12.5px; color: var(--gray-500); margin-top: 7px; font-weight: 600; }
.act-seg { margin-bottom: 14px; }

/* Lanterna do leitor de QR */
#torch.on { background: var(--amber-50); color: var(--amber-dark); font-weight: 700; }

/* App do solicitante (enfermagem) */
.rq-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--gray-200); border-radius: var(--r-sm); padding: 11px 13px; margin-bottom: 8px; }
.rq-row .rq-main { flex: 1; min-width: 0; }
.rq-row .rq-sub { font-size: 12px; color: var(--gray-500); margin-top: 3px; }
#rq-pt { border: 1px solid var(--gray-200); border-radius: var(--r-sm); padding: 6px; font: inherit; }
#rq-search { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: var(--r-sm); font: inherit; }

/* Painel da Líder */
.op-summary.leader { background: var(--blue-50, #eaf1fb); border-color: var(--blue-200, #bcd4f5); }
.op-summary.leader .ol { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); }
.op-summary.leader .ol svg { width: 18px; height: 18px; }
.lead-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.lead-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lead-kpis .lk { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--r-sm); padding: 12px; text-align: center; }
.lead-kpis .lk b { display: block; font-size: 26px; font-weight: 800; line-height: 1; }
.lead-kpis .lk span { font-size: 11.5px; color: var(--gray-500); font-weight: 600; }
.lead-kpis .lk.warn { background: var(--warning-bg); border-color: var(--warning-border); } .lead-kpis .lk.warn b { color: var(--warning); }
.lead-kpis .lk.crit { background: var(--danger-bg); border-color: var(--danger-border); } .lead-kpis .lk.crit b { color: var(--danger); }
.lead-drow { display: flex; align-items: center; gap: 10px; border: 1px solid var(--gray-200); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 8px; }
.lead-drow .ld-main { flex: 1; min-width: 0; }
.lead-drow .ld-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.lead-drow .ld-assign { min-height: 38px; padding: 6px 8px; max-width: 190px; border: 1px solid var(--gray-200); border-radius: var(--r-sm); background: var(--white); font: inherit; font-size: 13px; }
.lead-team { display: flex; flex-direction: column; gap: 2px; }
.lead-team .lt-row { display: flex; justify-content: space-between; padding: 7px 10px; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.lead-team .lt-row b { font-family: var(--mono); }

/* Check-in de EPI */
.epi-checkin .photo-grid { margin-top: 12px; }
.epi-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--gray-200);
  margin-right: 6px; vertical-align: middle; }

.resp-fixed { display: flex; align-items: center; gap: 10px; background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--r-sm); padding: 11px 13px; font-weight: 600; }
@media (max-width: 520px) { .op-user .onm, .op-user .ocg { display: none; } }
@media (max-width: 400px) { .op-head { padding: 12px 14px; gap: 8px; } .op-head .op-user { display: none; } .op-right { gap: 8px; } .op-head .brand .tag { font-size: 9px; letter-spacing: .06em; } }

.login-tabs button.active { color: var(--blue); }
.cred-box { border: 1px dashed var(--gray-300); border-radius: var(--r); padding: 14px 14px 2px; margin-top: 6px; background: var(--gray-50); }
.cred-box .step-title { margin-bottom: 12px; }

/* chips */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; font-weight: 600; }
.chip-x { background: transparent; color: var(--gray-400); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.chip-x:hover { background: var(--danger-bg); color: var(--danger); }
.chip-x svg { width: 12px; height: 12px; }
.add-inp { flex: 1; background: var(--white); border: 1px solid var(--gray-300); color: var(--gray-950); padding: 9px 12px; border-radius: var(--r-sm); font-size: 14px; }
/* botão só-ícone (ex.: áudio) + estado ligado */
.btn.icon-only { padding: 10px; min-width: 44px; }
.btn.ghost.on { background: var(--blue-50); color: var(--blue); border-color: var(--blue-200); }
.btn.ghost.on svg { animation: none; }

/* ---------- Painel de parede (TV) ---------- */
.wall-box { position: relative; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r); padding: 20px; }
.wall-box:fullscreen { overflow: auto; padding: 32px; border-radius: 0; }
/* Indicador geral (%) de leitos concluídos */
.wall-overall { display: flex; align-items: center; gap: 22px; padding: 18px 22px; margin-bottom: 18px;
  border: 1px solid var(--gray-200); border-radius: var(--r); background: var(--gray-50); }
.wall-overall .wo-ring { position: relative; --c: var(--success); width: 116px; height: 116px; flex: 0 0 auto; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--pct) * 1%), var(--gray-200) 0);
  display: grid; place-items: center; }
.wall-overall .wo-ring::before { content: ''; position: absolute; width: 84px; height: 84px; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 1px var(--gray-150); }
.wall-overall .wo-ring span { position: relative; font-family: var(--mono); font-weight: 700; font-size: 34px; color: var(--gray-950); line-height: 1; }
.wall-overall .wo-ring span small { font-size: 16px; color: var(--gray-500); }
.wall-overall .wo-txt { flex: 1; min-width: 0; }
.wall-overall .wo-lbl { font-family: var(--sans); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-700); }
.wall-overall .wo-sub { font-size: 15px; color: var(--gray-600); margin: 4px 0 10px; }
.wall-overall .wo-sub b { font-family: var(--mono); color: var(--gray-950); }
.wall-overall .wo-bar { height: 10px; }
.wall-overall.ok   .wo-ring { --c: var(--success); } .wall-overall.ok   .wo-bar i { background: var(--success); }
.wall-overall.warn .wo-ring { --c: var(--warning); } .wall-overall.warn .wo-bar i { background: var(--warning); }
.wall-overall.crit .wo-ring { --c: var(--danger);  } .wall-overall.crit .wo-bar i { background: var(--danger); }
.wall-box:fullscreen .wall-overall .wo-ring { width: 150px; height: 150px; }
.wall-box:fullscreen .wall-overall .wo-ring::before { width: 110px; height: 110px; }
.wall-box:fullscreen .wall-overall .wo-ring span { font-size: 44px; }
@media (max-width: 560px) { .wall-overall { flex-direction: column; text-align: center; align-items: stretch; } .wall-overall .wo-ring { margin: 0 auto; } }

.wall-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; font-size: 15px; font-weight: 600; }
.wall-legend .wl { display: inline-flex; align-items: center; gap: 8px; }
.wall-legend .wl i { width: 16px; height: 16px; border-radius: 5px; }
.wall-legend .wl b { font-family: var(--mono); }
.wall-legend .ok i { background: var(--success); } .wall-legend .pend i { background: var(--warning); } .wall-legend .parado i { background: var(--danger); }
/* Logo do cliente à esquerda da barra de percentual */
.wall-overall .wall-logo { flex: 0 0 auto; height: 128px; width: auto; max-width: 360px; object-fit: contain;
  border-radius: 10px; background: var(--white); padding: 8px 14px; box-shadow: inset 0 0 0 1px var(--gray-150); }
.wall-box:fullscreen .wall-overall .wall-logo, .wall-box.kiosk .wall-overall .wall-logo { height: 176px; max-width: 480px; }
@media (max-width: 560px) { .wall-overall .wall-logo { margin: 0 auto; } }

.wall-setores { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.wall-setor h4 { font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-600); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.wall-setor .ws-count { font-family: var(--mono); font-size: 11px; background: var(--gray-100); color: var(--gray-500); border-radius: 999px; padding: 2px 9px; }
/* Tamanho das células controlado por --cell (ajustado via JS para caber tudo na tela). */
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cell, 72px), 1fr)); gap: var(--cgap, 6px); }
/* Rótulos como "Q001-A" precisam caber em 1 linha, centralizados. */
.wall-cell { aspect-ratio: 1; border-radius: var(--r-sm); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2px; font-family: var(--mono); font-weight: 700; font-size: calc(var(--cell, 72px) * 0.2); letter-spacing: -.02em; line-height: 1.05;
  white-space: nowrap; color: #fff; }
.wall-cell.ok { background: var(--success); }
.wall-cell.pendente { background: var(--warning); }
.wall-cell.parado { background: var(--danger); }
/* Chamado (pedido de limpeza aberto) — destaque máximo, pulsa */
.wall-legend .chamado i { background: #E8590C; }
.wall-cell.chamado { background: #E8590C; display: flex; flex-direction: column; gap: 2px; line-height: 1.05; animation: chamadoPulse 1.4s ease-in-out infinite; }
.wall-cell.chamado.urgente { background: var(--danger); }
.wall-cell .wc-leito { font-weight: 700; font-size: calc(var(--cell, 72px) * 0.2); }
.wall-cell .wc-wait { font-size: calc(var(--cell, 72px) * 0.14); font-weight: 800; opacity: .95; }
@keyframes chamadoPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,89,12,.55); } 50% { box-shadow: 0 0 0 7px rgba(232,89,12,0); } }
@media (prefers-reduced-motion: reduce) { .wall-cell.chamado { animation: none; } }
.wall-setor.has-chamado h4 { color: #E8590C; }
.ws-chamado { font-family: var(--mono); font-size: 11px; background: #FDE7D9; color: #E8590C; border-radius: 999px; padding: 2px 9px; font-weight: 800; }
.icon-btn.cham { font-size: 15px; line-height: 1; }
.icon-btn.cham.on { color: #E8590C; border-color: #E8590C; background: #FDE7D9; }

/* Linha do tempo do leito (modal de histórico) */
.tl { display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow: auto; }
.tl-item { border-left: 3px solid var(--gray-300); padding: 9px 12px; font-size: 13.5px; }
.tl-item.ok { border-color: var(--success); }
.tl-item.pend { border-color: var(--warning); }
.tl-item.dem { border-color: #E8590C; }
.tl-item .tl-sub { font-size: 11.5px; color: var(--gray-500); font-family: var(--mono); margin-top: 2px; }
.wall-box:fullscreen .wall-setores { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
/* Alerta visual (nova solicitação) */
.wall-flash { animation: wallFlash 1.3s ease; }
@keyframes wallFlash { 0%,100% { box-shadow: var(--shadow-sm); } 25%,60% { box-shadow: 0 0 0 4px #E8590C, 0 0 44px rgba(232,89,12,.45); } }
@media (prefers-reduced-motion: reduce) { .wall-flash { animation: none; } }
/* Foco no quadrante (setor) com nova solicitação */
.wall-box { position: relative; }
.wall-setor.wall-focus { border-radius: var(--r); outline: 3px solid #E8590C; outline-offset: 4px;
  animation: focusPulse 1s ease-in-out 4; }
@keyframes focusPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,89,12,.5); } 50% { box-shadow: 0 0 0 10px rgba(232,89,12,0); } }
@media (prefers-reduced-motion: reduce) { .wall-setor.wall-focus { animation: none; } }
/* Banner de alerta na tela (também visível em tela cheia) */
.wall-emalert { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 14px; max-width: min(680px, 92%);
  background: var(--danger); color: #fff; padding: 14px 18px; border-radius: var(--r);
  box-shadow: 0 12px 40px -6px rgba(169,59,34,.6); animation: emAlertIn .25s ease, emAlertPulse 1.1s ease-in-out infinite .3s; }
.wall-emalert .wea-ic { font-size: 28px; line-height: 1; }
.wall-emalert .wea-txt { display: flex; flex-direction: column; line-height: 1.25; }
.wall-emalert .wea-txt b { font-size: 16px; }
.wall-emalert .wea-txt span { font-size: 13px; opacity: .95; }
.wall-emalert .wea-x { margin-left: 6px; background: rgba(255,255,255,.2); border: none; color: #fff; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.wall-emalert .wea-x svg { width: 16px; height: 16px; }
@keyframes emAlertIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes emAlertPulse { 0%,100% { box-shadow: 0 12px 40px -6px rgba(169,59,34,.6); } 50% { box-shadow: 0 12px 40px -6px rgba(169,59,34,.6), 0 0 0 6px rgba(169,59,34,.25); } }
@media (prefers-reduced-motion: reduce) { .wall-emalert { animation: emAlertIn .25s ease; } }
/* Modo quiosque (TV): células e setores maiores, títulos destacados */
.wall-box.kiosk { padding: 22px; }
.wall-box.kiosk .wall-setores { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.wall-box.kiosk .wall-setor h4 { font-size: 15px; }
.wall-box.kiosk .wall-legend { font-size: 16px; }

/* Dashboard do painel: resumo (anel) + mini card de emergência lado a lado.
   O card só existe quando há chamado aberto e some sozinho quando é concluído. */
.wall-dash { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; margin-bottom: 20px; }
.wall-dash .wall-overall { flex: 1 1 340px; margin-bottom: 0; }
.wall-emcard { flex: 1 1 300px; display: flex; flex-direction: column; background: var(--danger-bg);
  border: 1px solid var(--danger-border); border-left: 5px solid var(--danger); border-radius: var(--r); padding: 14px 16px;
  animation: emCardIn .25s ease; }
@keyframes emCardIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.wec-top { display: flex; align-items: center; gap: 10px; color: var(--danger); }
.wec-top svg { width: 26px; height: 26px; animation: sirenPulse 1s ease-in-out infinite; }
.wec-n { font-size: 30px; font-weight: 800; line-height: 1; }
.wec-lbl { font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
@keyframes sirenPulse { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .wec-top svg, .wall-emcard { animation: none; } }
.wec-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; overflow-y: auto; max-height: 150px; align-content: flex-start; }
.wec-chip { background: var(--white); border: 1px solid var(--danger-border); color: var(--gray-800); border-radius: 999px;
  padding: 5px 12px; font-weight: 700; font-size: 13.5px; height: fit-content; }
.wec-chip small { color: var(--gray-500); font-weight: 600; }
.wec-chip.urg { background: var(--danger); color: #fff; border-color: var(--danger); }
.wec-chip.urg small { color: rgba(255,255,255,.85); }
.ws-chamado svg { width: 13px; height: 13px; vertical-align: -2px; }
#wall-alert svg { width: 15px; height: 15px; vertical-align: -3px; }
.wall-box.kiosk .wec-n { font-size: 38px; }
.wall-box.kiosk .wec-list { max-height: 200px; }

/* Emergência no painel: foco no quadrante + alerta na tela */
.wall-setor { border-radius: var(--r); transition: box-shadow .2s; }
.wall-setor.wall-focus { animation: wallFocus 1.1s ease-in-out infinite; padding: 8px; margin: -8px; }
@keyframes wallFocus { 0%,100% { box-shadow: 0 0 0 3px #E8590C, 0 0 0 0 rgba(232,89,12,.5); } 50% { box-shadow: 0 0 0 3px #E8590C, 0 0 0 12px rgba(232,89,12,0); } }
@media (prefers-reduced-motion: reduce) { .wall-setor.wall-focus { animation: none; box-shadow: 0 0 0 3px #E8590C; } }
.wall-emalert { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 14px; max-width: min(92%, 620px);
  background: var(--danger); color: #fff; border-radius: var(--r); padding: 14px 16px;
  box-shadow: 0 12px 34px rgba(169,59,34,.5); animation: emAlertIn .25s ease, emAlertPulse 1s ease-in-out infinite .25s; }
.wall-emalert .wea-ic { font-size: 30px; line-height: 1; display: grid; place-items: center; }
.wall-emalert .wea-ic svg { width: 30px; height: 30px; color: #fff; animation: sirenPulse 1s ease-in-out infinite; }
.wall-emalert .wea-txt { display: flex; flex-direction: column; line-height: 1.25; }
.wall-emalert .wea-txt b { font-size: 16px; }
.wall-emalert .wea-txt span { font-size: 13px; opacity: .95; }
.wall-emalert .wea-x { margin-left: auto; background: rgba(255,255,255,.2); color: #fff; border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; flex: none; }
.wall-emalert .wea-x svg { width: 18px; height: 18px; }
@keyframes emAlertIn { from { opacity: 0; transform: translate(-50%,-10px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes emAlertPulse { 0%,100% { box-shadow: 0 12px 34px rgba(169,59,34,.5); } 50% { box-shadow: 0 12px 34px rgba(169,59,34,.5), 0 0 0 6px rgba(169,59,34,.25); } }
@media (prefers-reduced-motion: reduce) { .wall-emalert { animation: emAlertIn .25s ease; } }

/* Login: escolha de acesso (PWA) + botão trocar */
.login-back { display: inline-flex; align-items: center; gap: 6px; background: none; color: var(--gray-500);
  font-weight: 600; font-size: 13px; padding: 4px 0; margin-bottom: 8px; }
.login-back:hover { color: var(--blue); }
.access-pick { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.access-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--gray-200); border-radius: var(--r); background: var(--white); padding: 16px 18px; transition: .15s; }
.access-opt:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.access-opt .ao-ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: var(--blue-100, #e6effb); color: var(--blue); }
.access-opt .ao-ic svg { width: 24px; height: 24px; }
.access-opt .ao-txt { display: flex; flex-direction: column; }
.access-opt .ao-txt b { font-size: 16px; color: var(--gray-950); }
.access-opt .ao-txt small { font-size: 12.5px; color: var(--gray-500); }
.access-opt .ao-go { margin-left: auto; color: var(--gray-300); }
.access-opt .ao-go svg { width: 18px; height: 18px; }
.access-opt:hover .ao-go { color: var(--blue); }

.tt-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--gray-150); }
.tt-row:last-child { border-bottom: none; }
.tt-nm { flex: 1; font-weight: 500; font-size: 14px; }
.tt-sla { font-size: 11px; color: var(--gray-500); font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 6px; }
.tt-sla input { width: 64px; text-align: center; font-family: var(--mono); font-size: 14px; padding: 6px; border: 1px solid var(--gray-300); border-radius: var(--r-sm); background: var(--white); color: var(--gray-950); }

/* chips selecionáveis no app de campo */
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.pick { border: 2px solid var(--gray-200); background: var(--white); border-radius: 999px; padding: 12px 18px; min-height: 48px; font-size: 15px; font-weight: 600; color: var(--gray-800); display: inline-flex; align-items: center; gap: 8px; transition: .15s; }
.pick:hover { border-color: var(--blue); }
.pick:active { transform: scale(.97); }
.pick.on { border-color: var(--blue); background: var(--blue-50); color: var(--blue); font-weight: 700; }
.pick.on::before { content: "✓"; font-weight: 800; }
.tasktype-list .pick { padding: 15px 20px; font-size: 17px; min-height: 56px; }
.field textarea { resize: vertical; min-height: 72px; font-family: inherit; }

/* assinatura */
.sign-wrap { border: 1.5px dashed var(--gray-300); border-radius: var(--r-sm); background: var(--white); position: relative; }
.sign-wrap canvas { display: block; width: 100%; height: 130px; touch-action: none; border-radius: var(--r-sm); }
.sign-clear { position: absolute; top: 6px; right: 6px; background: var(--gray-50); border: 1px solid var(--gray-200); color: var(--gray-500); border-radius: var(--r-sm); width: 30px; height: 30px; display: grid; place-items: center; }
.sign-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gray-400); font-size: 13px; pointer-events: none; }
.subblock { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gray-200); }

/* ---------- App de campo ---------- */
.field-app { max-width: 540px; margin: 0 auto; }
.field-app .stepwrap { padding: 28px; border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.big-q { font-size: 25px; text-align: center; margin: 14px 0 22px; line-height: 1.25; color: var(--gray-950); }
.field-hint { text-align: center; color: var(--gray-500); font-size: 15px; margin: -12px 0 20px; line-height: 1.4; }
.pt-tag { text-align: center; background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--r); padding: 20px; margin-bottom: 20px; }
.pt-tag .n { font-size: 30px; font-weight: 600; color: var(--blue); }
.pt-tag .m { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.yn .btn.big { flex-direction: column; gap: 8px; min-height: 122px; font-size: 22px; font-weight: 800; }
.yn .btn.big svg { width: 40px; height: 40px; stroke-width: 2.2; }
.timer { font-size: 56px; font-weight: 500; text-align: center; letter-spacing: 2px; margin: 14px 0; color: var(--gray-950); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--gray-200); }
.photo-add { aspect-ratio: 1; border: 2px dashed var(--gray-300); border-radius: var(--r-sm); background: var(--gray-50); color: var(--gray-400); font-size: 34px; display: grid; place-items: center; cursor: pointer; transition: .15s; min-height: 96px; }
.photo-add:hover, .photo-add:active { border-color: var(--blue); color: var(--blue); }
.mat-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--r-sm); margin-bottom: 9px; }
.mat-row .nm { flex: 1; font-weight: 600; font-size: 15px; }
.mat-row input { width: 84px; height: 48px; text-align: center; font-family: var(--mono); font-size: 17px; border-radius: var(--r-sm); border: 1px solid var(--gray-300); background: var(--white); color: var(--gray-950); }
.qr-scan { width: 100%; border-radius: var(--r-sm); border: 1px solid var(--gray-200); background: #000; }
.step-title { color: var(--gray-500); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }

/* passos 1→4 */
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps .s { flex: 1; height: 7px; border-radius: 6px; background: var(--gray-150); transition: background .2s; }
.steps .s.on { background: var(--blue); }

/* deslizar para confirmar */
.slide { position: relative; height: 72px; border-radius: 16px; background: var(--gray-100);
  border: 1px solid var(--gray-200); overflow: hidden; user-select: none; touch-action: none; margin-top: 6px; }
.slide .fill { position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--blue-50); transition: width .05s linear; }
.slide .lbl { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: var(--gray-500); pointer-events: none; padding-left: 56px; }
.slide .thumb { position: absolute; top: 5px; left: 5px; width: 66px; height: 60px; border-radius: 12px;
  background: var(--blue); color: #fff; display: grid; place-items: center; cursor: grab; touch-action: none; box-shadow: var(--shadow-sm); }
.slide .thumb svg { width: 28px; height: 28px; stroke-width: 2.4; }
.slide:focus-visible { box-shadow: var(--ring); }
.slide.ok .thumb { background: var(--success); } .slide.ok .fill { background: var(--success-bg); }
.slide.warn .thumb { background: var(--warning); } .slide.warn .fill { background: var(--warning-bg); }
.slide.confirmed .thumb { background: var(--success); }
@media (prefers-reduced-motion: reduce) { .slide .fill { transition: none; } }

.last-info { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 12.5px; color: var(--gray-500);
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 16px; }
.last-info b { color: var(--gray-950); font-weight: 700; }
.resume { border: 1px solid var(--warning-border); background: var(--warning-bg); border-radius: var(--r); padding: 16px; margin-bottom: 4px; }
.resume .rt { font-weight: 700; margin-bottom: 4px; }
.resume .rs { font-family: var(--mono); font-size: 12px; color: var(--gray-500); margin-bottom: 12px; }
.review-note { color: var(--warning); font-size: 11px; font-weight: 600; }

/* ---------- Seletor de setores (colaboradora) ---------- */
.sector-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; padding: 8px;
  border: 1px solid var(--gray-200); border-radius: var(--r-sm); background: var(--gray-50); }
.secopt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--gray-200); font-size: 13px; cursor: pointer; user-select: none; }
.secopt:hover { border-color: var(--blue-200); }
.secopt input { accent-color: var(--blue); margin: 0; }

/* ---------- Submenus (acordeão) na barra lateral ---------- */
.nav-group { display: flex; flex-direction: column; }
.nav-group-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 9px 12px; border-radius: var(--r-sm); background: transparent; cursor: pointer;
  color: var(--gray-400); font-family: var(--sans); font-size: 10.5px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; transition: .15s; }
.nav-group-h:hover { background: var(--gray-100); color: var(--gray-700); }
.nav-group-h .chev { font-size: 9px; transition: transform .18s; opacity: .7; }
.nav-group.open > .nav-group-h .chev { transform: rotate(90deg); }
.nav-group-items { display: none; flex-direction: column; gap: 2px; margin: 1px 0 6px; }
.nav-group.open > .nav-group-items { display: flex; }

/* ---------- Barra lateral: recolher (desktop) ---------- */
.sb-top { display: none; }
.sb-collapse, .sb-show { display: none; }
@media (min-width: 821px) {
  /* barra presa à altura da tela: o rodapé (Sair) fica sempre visível, mesmo com
     conteúdo longo à direita. Com os submenus recolhidos ela cabe sem rolar; só
     rola como último recurso se muitos grupos forem abertos numa tela baixa. */
  .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .sb-top { display: flex; justify-content: flex-end; margin: -8px -6px 0; }
  .sb-collapse { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
    background: var(--gray-100); color: var(--gray-500); font-size: 17px; line-height: 1; transition: .15s; }
  .sb-collapse:hover { background: var(--gray-200); color: var(--gray-900); }
  /* estado recolhido: some a barra, conteúdo ocupa tudo, aparece o botão flutuante */
  body.sb-collapsed .shell { grid-template-columns: 1fr; }
  body.sb-collapsed #sb { display: none; }
  body.sb-collapsed .sb-show { display: grid; place-items: center; position: fixed; top: 12px; left: 12px; z-index: 90;
    width: 42px; height: 42px; border-radius: 11px; background: var(--white); border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md); color: var(--gray-800); font-size: 20px; }
  body.sb-collapsed .sb-show:hover { border-color: var(--blue-200); color: var(--blue); }
}

/* ---------- Responsivo ---------- */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 80; width: 268px; height: 100%; overflow-y: auto; transform: translateX(-100%); transition: .22s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .content { padding: 20px 16px; padding-top: 66px; }
  .topbar-mobile { display: flex; }
  .nav a { padding: 13px 13px; font-size: 15px; }
  .mod-switch button { padding: 12px; font-size: 14px; }
}
@media (max-width: 600px) {
  .content { padding: 16px 12px; padding-top: 64px; }
  .page-head h2 { font-size: 23px; }
  .row > * { flex: 1 1 100%; min-width: 0; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat .v { font-size: 26px; }
  .field-app { max-width: 100%; }
  .field-app .stepwrap { padding: 20px 16px; }
  .big-q { font-size: 23px; }
  .op-body { padding: 14px 10px 40px; }
  .op-summary { font-size: 15px; padding: 14px; }
  .modal { padding: 22px 18px; }
  table { font-size: 13px; }
  th, td { padding: 10px 9px; }
}
@media (max-width: 400px) {
  .cards { grid-template-columns: 1fr; }
  .yn .btn.big { min-height: 104px; font-size: 20px; }
  .photo-grid { gap: 8px; }
  .emp-grid { grid-template-columns: repeat(2, 1fr); }
  .pt-tag .n { font-size: 26px; }
  .timer { font-size: 48px; }
}
/* ---------- Mobile: ajustes finos do painel de gestão ---------- */
.table-wrap { -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
  /* cabeçalho de página empilha e botões de ação ocupam a largura */
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head .row { width: 100%; }
  .page-head .row > * { flex: 1 1 auto; justify-content: center; }
  /* alvos de toque maiores */
  .btn { min-height: 44px; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn svg { width: 18px; height: 18px; }
  /* controles do dashboard: período e datas ocupam a linha */
  .dash-controls { gap: 10px; }
  .seg { display: flex; flex-wrap: wrap; width: 100%; }
  .seg button { flex: 1 1 auto; }
  .dash-controls .cust { width: 100%; }
  .dash-controls .cust input { flex: 1; min-width: 0; }
  /* cobertura e logos de relatório */
  .coverage { flex-wrap: wrap; gap: 14px; }
  .coverage .cov-main { min-width: 0; flex: 1 1 100%; }
  .report-header-logo-client { height: 52px; }
  .report-header-logo-works { height: 22px; }
  /* rodapé de modal: botões preenchem a largura */
  .modal-foot { flex-wrap: wrap; }
  .modal-foot > .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 420px) {
  /* calendário do mês compacto */
  .mc-cell { min-height: 40px; padding: 3px 4px; }
  .mc-cell .mc-d { font-size: 11px; }
  .mc-cell .mc-n { font-size: 9.5px; }
}

.topbar-mobile { display: none; position: fixed; top: 0; left: 0; right: 0; height: 56px;
  background: var(--white); border-bottom: 1px solid var(--gray-200); align-items: center; padding: 0 14px; gap: 12px; z-index: 70; font-weight: 700; box-shadow: var(--shadow-xs); }
.topbar-mobile b { font-family: var(--serif); font-weight: 500; }
.topbar-mobile button { background: transparent; color: var(--gray-900); font-size: 22px; display: grid; place-items: center; }

/* ---------- Impressão ---------- */
@media print {
  .sidebar, .topbar-mobile, .no-print, .netbar { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .content { padding: 0; }
  body { background: #fff; color: #000; }
  .panel { border: none; box-shadow: none; }
  table, th, td { color: #000; border-color: #ccc; }
}
/* relatório fotográfico */
.rep-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.rep-sub { font-family: var(--mono); font-size: 12px; color: var(--gray-500); }
.photo-report .grp { margin-bottom: 26px; }
.photo-report .grp-h { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--blue); padding-bottom: 7px; margin-bottom: 14px; }
.photo-report .grp-h h4 { font-family: var(--serif); font-size: 17px; font-weight: 500; color: var(--gray-950); }
.photo-report .grp-c { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .06em; }
.svc-card { border: 1px solid var(--gray-200); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; background: var(--white); box-shadow: var(--shadow-xs); }
.svc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--gray-500); margin-bottom: 12px; align-items: center; }
.svc-meta b { color: var(--gray-950); font-weight: 700; }
.svc-meta svg { color: var(--blue); vertical-align: -2px; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ba .lbl { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); margin-bottom: 7px; }
.ba .imgs { display: flex; flex-wrap: wrap; gap: 7px; }
.ba img { width: 116px; height: 116px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--gray-200); cursor: zoom-in; transition: .15s; }
.ba img:hover { border-color: var(--blue); }
.ba .nophoto { font-size: 12px; color: var(--gray-400); font-style: italic; }
.svc-sub { font-size: 12.5px; color: var(--gray-500); margin-bottom: 8px; }
.svc-sub::before { content: ""; }
.sign-view { margin-top: 12px; }
.sign-view .lbl { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); margin-bottom: 6px; }
.sign-view img { max-width: 240px; border: 1px solid var(--gray-200); border-radius: var(--r-sm); background: #fff; cursor: zoom-in; }
@media (max-width: 620px) { .ba { grid-template-columns: 1fr; } }
@media print {
  .svc-card { page-break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
  .photo-report .grp-h { border-color: #333; }
  .ba img { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.print-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.qr-card { border: 1px solid var(--gray-200); border-radius: var(--r); padding: 14px; text-align: center; background: var(--white); box-shadow: var(--shadow-xs); }
.qr-card img { width: 100%; max-width: 150px; }
.qr-card .lbl { font-family: var(--mono); font-weight: 600; margin-top: 8px; font-size: 13px; }
@media print { .qr-card { border: 1px solid #333; background: #fff; box-shadow: none; page-break-inside: avoid; } }

/* ===========================================================================
   Dashboard — extras Works (ico-tiles, cobertura, período, skeleton, deltas)
   =========================================================================== */

/* Ladrilhos de ícone (Works 5.10) */
.ico-tile { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--blue-50); color: var(--blue); flex: none; }
.ico-tile svg { width: 22px; height: 22px; stroke-width: 1.7; }
.ico-tile.soft { background: var(--gray-100); color: var(--gray-700); }
.ico-tile.warm { background: var(--amber-50); color: var(--amber-dark); }
.ico-tile.good { background: var(--success-bg); color: var(--success); }
.ico-tile.danger { background: var(--danger-bg); color: var(--danger); }

/* Stat tile em linha (ícone + corpo) — altura FIXA p/ alinhar todos os cards */
.stat { display: flex; align-items: flex-start; gap: 14px; min-height: 122px; }
.stat .s-body { min-width: 0; flex: 1; }
.stat .k { min-height: 30px; }                 /* rótulo com altura reservada (1–2 linhas) → valores alinham */
.stat .v { margin-top: 2px; }                  /* valor em posição fixa (logo após o rótulo) */
.stat .delta { margin-top: 8px; }
.stat.warn { border-left: 3px solid var(--warning); }
.stat.warn .v { color: var(--warning); }
.stat[data-scroll] { cursor: pointer; }
.stat[data-scroll]:hover { border-color: var(--blue-200); }
.stat[data-scroll]:focus-visible { box-shadow: var(--ring); }

/* Chip de tendência (delta vs. período anterior) */
.delta { font-family: var(--mono); font-size: 11px; font-weight: 600; display: inline-flex; gap: 3px; align-items: center;
  padding: 2px 7px; border-radius: 999px; margin-top: 7px; }
.delta.up { color: var(--success); background: var(--success-bg); }
.delta.down { color: var(--danger); background: var(--danger-bg); }
.delta.flat { color: var(--gray-500); background: var(--gray-100); }

/* Barra de progresso / SLA (Works 5.8) + faixa de cobertura */
.bar { height: 8px; border-radius: 6px; background: var(--gray-150); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; transition: width .4s ease; }
.coverage { display: flex; align-items: center; gap: 20px; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 16px 20px; margin-bottom: 26px; flex-wrap: wrap; }
.coverage .cov-tile { }
.coverage .cov-main { flex: 1; min-width: 240px; }
.coverage .cov-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 9px; }
.coverage .cov-lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-400); }
.coverage .cov-pct { font-family: var(--mono); font-size: 26px; font-weight: 600; line-height: 1; color: var(--gray-950); }
.coverage .cov-sub { font-size: 12px; color: var(--gray-500); margin-top: 8px; }

/* Seletor de período */
.dash-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.seg { display: inline-flex; gap: 4px; background: var(--gray-100); padding: 4px; border-radius: 12px; }
.seg button { padding: 8px 15px; border-radius: 9px; background: transparent; color: var(--gray-500); font-weight: 600; font-size: 13px; transition: .15s; }
.seg button:hover { color: var(--gray-800); }
.seg button.active { background: var(--white); color: var(--blue); box-shadow: var(--shadow-xs); }
.dash-controls .cust { display: flex; gap: 8px; align-items: center; }
.dash-controls .cust input { padding: 8px 11px; border: 1px solid var(--gray-300); border-radius: var(--r-sm); background: var(--white); font-size: 13px; font-family: var(--mono); color: var(--gray-900); }

/* Eyebrows nas seções (ícone de linha + rótulo) */
.panel h3 { display: flex; align-items: center; gap: 8px; padding-left: 0; }
.panel h3::before { display: none; }
.panel h3 svg { width: 15px; height: 15px; color: var(--blue); stroke-width: 1.9; }

/* Estado vazio ilustrado */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg { width: 30px; height: 30px; stroke-width: 1.5; color: var(--gray-300); }
.empty .et { font-weight: 600; color: var(--gray-500); }

/* Skeletons de carregamento */
.skeleton { position: relative; overflow: hidden; background: var(--gray-100); border-radius: var(--r-xs); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.3s infinite; }
.sk-stat { height: 90px; } .sk-panel { height: 190px; } .sk-cov { height: 74px; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } }
@media print { .dash-controls, .delta, .skeleton { display: none !important; } }

/* Seletor / chip de cliente (multi-tenant) na sidebar */
.client-pick { display: block; margin-bottom: 14px; }
.client-pick .cl-lbl { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-400); margin-bottom: 5px; }
.client-pick select { width: 100%; padding: 9px 11px; border-radius: var(--r-sm); border: 1px solid var(--gray-300); background: var(--white); color: var(--gray-950); font-family: var(--sans); font-size: 13.5px; font-weight: 600; outline: none; cursor: pointer; }
.client-pick select:focus { border-color: var(--blue); box-shadow: var(--ring); }
.client-chip { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--blue); font-weight: 700; font-size: 13px; }
.client-chip svg { width: 15px; height: 15px; stroke-width: 1.8; }

/* ============================================================================
   Marca / Logos (Works = plataforma · logo do cliente = tenant)
   ============================================================================ */
/* Login — logo Works centralizado */
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo { height: 76px; width: auto; max-width: 260px; margin: 0 auto 16px; display: block; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.05)); transition: transform .2s ease; }
.login-logo:hover { transform: scale(1.02); }
.login-brand .app-title { font-size: 25px; color: var(--gray-950); font-weight: 700; letter-spacing: -0.02em; }
.login-brand .app-subtitle { margin-top: 4px; color: var(--gray-500); font-size: 13.5px; }

/* Escolha de acesso (Colaborador / Gestor) */
.access-pick { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.access-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  font-family: inherit; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r);
  padding: 16px 18px; transition: .14s; }
.access-opt:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.access-opt:active { transform: scale(.99); }
.access-opt .ao-ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gray-100); color: var(--gray-700); }
.access-opt .ao-ic svg { width: 22px; height: 22px; }
.access-opt .ao-txt { display: flex; flex-direction: column; line-height: 1.3; }
.access-opt .ao-txt b { font-size: 16px; color: var(--gray-950); }
.access-opt .ao-txt small { color: var(--gray-500); font-size: 12.5px; }
.access-opt .ao-go { margin-left: auto; color: var(--gray-400); }
.access-opt .ao-go svg { width: 18px; height: 18px; }
.access-opt:hover .ao-ic { background: var(--blue-100, #e3edfb); color: var(--blue); }
.login-back { background: none; border: none; cursor: pointer; color: var(--gray-500); font: inherit; font-size: 13px;
  font-weight: 600; padding: 0; margin-bottom: 8px; }
.login-back:hover { color: var(--blue); }

/* Configuração de logo do cliente */
.logo-cfg { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo-preview { width: 200px; height: 96px; border: 1px dashed var(--gray-300); border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--gray-50); overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Sidebar — cabeçalho: marca Works + nome do produto, com divisória */
.sidebar .brand { flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 8px 6px 18px; border-bottom: 1px solid var(--gray-200); margin-bottom: 16px; }
.brand-logo { height: 60px; width: auto; max-width: 100%; display: block; margin: 0 auto; object-fit: contain; object-position: center; }
.brand-sub { font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: -0.01em; color: var(--gray-800); }

/* Card do cliente (tenant) na sidebar */
.client-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--r); padding: 12px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.cl-eyebrow { display: block; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 8px; }

.client-logo-box { display: flex; align-items: center; justify-content: center; width: 100%; height: 120px;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 9px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.03); overflow: hidden; }
.client-logo { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; object-position: center; }

.client-select { width: 100%; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--gray-300);
  background: var(--white); color: var(--gray-950); font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.client-select:focus { border-color: var(--blue); box-shadow: var(--ring); }
.client-name { font-weight: 700; font-size: 13.5px; color: var(--gray-950); word-break: break-word; }

/* Barra de filtros (Colaboradoras: busca, cargo, situação) */
.emp-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.emp-filters .add-inp, .emp-filters .client-select { min-height: 40px; }

/* App de campo — logo do cliente no header */
.op-head .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.op-client-logo-box { display: flex; align-items: center; background: #ffffff; padding: 5px 10px; border-radius: var(--r-sm); border: 1px solid var(--gray-200); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.op-client-logo { height: 80px; width: auto; max-width: 300px; display: block; object-fit: contain; }
@media (max-width: 400px) { .op-client-logo { height: 60px; max-width: 200px; } }

/* Topbar mobile */
.topbar-logo { height: 40px; width: auto; max-width: 190px; object-fit: contain; vertical-align: middle; }

/* Logos para relatórios em tela e exportação/impressão */
.report-header-logos { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r); margin-bottom: 16px; }
.report-header-logo-works { height: 28px; width: auto; object-fit: contain; }
.report-header-logo-client { height: 80px; width: auto; max-width: 320px; object-fit: contain; }

@media print {
  .report-header-logos { border: none; padding: 0 0 12px 0; border-bottom: 2px solid var(--gray-300); border-radius: 0; }
}

/* Calendário do mês (dashboard — acompanhamento de limpezas) */
.mc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--gray-500); margin-bottom: 10px; }
.mc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mc-sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--gray-200); }
.mc-sw.full { background: var(--success-bg); border-color: var(--success-border); }
.mc-sw.part { background: var(--warning-bg); border-color: var(--warning-border); }
.mc-sw.none { background: var(--danger-bg); border-color: var(--danger-border); }
.mc-sw.future { background: var(--gray-100); border-color: var(--gray-200); }
.month-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.mc-h { text-align: center; font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .03em; padding-bottom: 2px; }
.mc-cell { min-height: 52px; border-radius: 9px; border: 1px solid var(--gray-200); padding: 5px 6px; display: flex; flex-direction: column; justify-content: space-between; background: var(--white); }
.mc-cell.blank { border: none; background: transparent; }
.mc-cell .mc-d { font-size: 12px; font-weight: 600; color: var(--gray-600); }
.mc-cell .mc-n { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--gray-500); align-self: flex-end; }
.mc-cell.full { background: var(--success-bg); border-color: var(--success-border); }
.mc-cell.full .mc-n { color: var(--success); }
.mc-cell.part { background: var(--warning-bg); border-color: var(--warning-border); }
.mc-cell.part .mc-n { color: var(--warning); }
.mc-cell.none { background: var(--danger-bg); border-color: var(--danger-border); }
.mc-cell.none .mc-n { color: var(--danger); }
.mc-cell.future { background: var(--gray-50); }
.mc-cell.future .mc-n { color: var(--gray-400); }
.mc-cell.today { box-shadow: 0 0 0 2px var(--blue); border-color: var(--blue); }
@media (max-width: 640px) {
  .mc-cell { min-height: 44px; padding: 4px; }
  .mc-cell .mc-n { font-size: 11px; }
}
