/* Escala Patinha — interface */
:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #78716c;
  --line: #e7e3dc;
  --line-2: #d6d1c7;
  --accent: #e8590c;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e6;
  --ok: #15803d;
  --ok-soft: #e8f6ec;
  --warn: #b45309;
  --warn-soft: #fff6e0;
  --err: #be123c;
  --err-soft: #ffe9ee;

  /* situações */
  --T: #0f766e;   --T-soft: #d7f0ec;   --T-ink: #ffffff;
  --F: #f2a516;   --F-soft: #fdf1d3;   --F-ink: #4a3200;
  --FE: #7c3aed;  --FE-soft: #ece4fd;  --FE-ink: #ffffff;
  --AF: #e11d48;  --AF-soft: #fde4ea;  --AF-ink: #ffffff;
  --FR: #8a94a6;  --FR-soft: #eceff4;  --FR-ink: #ffffff;
  --empty: #ece8e1;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(28,25,23,.06), 0 4px 16px rgba(28,25,23,.06);
  --shadow-lg: 0 10px 40px rgba(28,25,23,.18);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --nav-w: 232px;
  --cell: 34px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171513; --surface: #211e1b; --surface-2: #1c1a17; --ink: #f2efe9; --ink-2: #d6d1c7;
    --muted: #a19a90; --line: #34302b; --line-2: #48423b; --accent: #fb7a2e; --accent-soft: #3a2415;
    --ok: #4ade80; --ok-soft: #16301f; --warn: #fbbf24; --warn-soft: #362a10; --err: #fb7185; --err-soft: #3b1720;
    --T: #14b8a6; --T-soft: #133a36; --T-ink: #04201d;
    --F: #f5b335; --F-soft: #3a2d10; --F-ink: #2a1c00;
    --FE: #a78bfa; --FE-soft: #2c2342; --FE-ink: #1a0f33;
    --AF: #fb7185; --AF-soft: #3d1a23; --AF-ink: #2d0710;
    --FR: #7d8799; --FR-soft: #262a31; --FR-ink: #0f1115;
    --empty: #2c2824; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg: #171513; --surface: #211e1b; --surface-2: #1c1a17; --ink: #f2efe9; --ink-2: #d6d1c7;
  --muted: #a19a90; --line: #34302b; --line-2: #48423b; --accent: #fb7a2e; --accent-soft: #3a2415;
  --ok: #4ade80; --ok-soft: #16301f; --warn: #fbbf24; --warn-soft: #362a10; --err: #fb7185; --err-soft: #3b1720;
  --T: #14b8a6; --T-soft: #133a36; --T-ink: #04201d;
  --F: #f5b335; --F-soft: #3a2d10; --F-ink: #2a1c00;
  --FE: #a78bfa; --FE-soft: #2c2342; --FE-ink: #1a0f33;
  --AF: #fb7185; --AF-soft: #3d1a23; --AF-ink: #2d0710;
  --FR: #7d8799; --FR-soft: #262a31; --FR-ink: #0f1115;
  --empty: #2c2824; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
}
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; flex: none; }
a { color: var(--accent); }
.num, .mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface);
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s; min-height: 38px;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.btn.sm { padding: 5px 9px; min-height: 30px; font-size: 13px; }
.btn.icon { padding: 0; width: 38px; justify-content: center; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 17px; height: 17px; flex: none; }

label.fld { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.inp, select.inp, textarea.inp {
  width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 9px 11px;
  font-size: 15px; font-weight: 400; color: var(--ink); min-height: 40px;
}
.inp:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; border-color: var(--accent); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- login ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 500px at 10% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px 26px; box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; font-size: 18px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: #fff; flex: none; }
.brand-mark svg { width: 20px; height: 20px; }
.auth h1 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.02em; }
.erro-box { background: var(--err-soft); color: var(--err); padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; }
.side .brand { padding: 4px 8px 16px; }
.nav-btn { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; font-weight: 600; color: var(--ink-2); text-align: left; width: 100%; position: relative; }
.nav-btn svg { width: 19px; height: 19px; flex: none; }
.nav-btn:hover { background: var(--surface-2); }
.nav-btn.on { background: var(--accent-soft); color: var(--accent); }
.nav-btn .badge { margin-left: auto; background: var(--err); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 99px; font-weight: 700; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.who { display: flex; gap: 10px; align-items: center; padding: 6px 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 14px; }
.who b { display: block; font-size: 14px; }
.who span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 10px 22px; display: flex; gap: 12px; align-items: center; min-height: 60px; }
.top h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.top .row { margin-left: auto; }
.content { padding: 20px 22px 40px; display: grid; gap: 18px; align-content: start; }
.bottom-nav { display: none; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.period { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 2px; }
.period b { min-width: 150px; text-align: center; font-size: 14.5px; text-transform: capitalize; }
.period .btn { border: 0; min-height: 34px; width: 34px; padding: 0; justify-content: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.card h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; position: relative; overflow: hidden; }
.kpi .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; gap: 7px; align-items: center; }
.kpi .val { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-family: var(--font); }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--k, var(--line)); }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: 14px; }
.banner svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* cobertura */
.cov { display: grid; gap: 12px; }
.cov-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.cov-name { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }
.cov-bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--empty); overflow: hidden; position: relative; }
.cov-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--T); }
.cov-bar.low i { background: var(--err); }
.cov-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 4px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); display: inline-flex; gap: 6px; align-items: center; }

/* semana mini */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ws-day { border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; cursor: pointer; background: var(--surface); display: grid; gap: 4px; }
.ws-day:hover { border-color: var(--ink-2); }
.ws-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ws-day .d { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.ws-day .n { font-size: 18px; font-weight: 800; }
.ws-day .bar { height: 40px; display: flex; align-items: flex-end; justify-content: center; }
.ws-day .bar i { width: 60%; border-radius: 4px 4px 2px 2px; background: var(--T); min-height: 3px; }
.ws-day.low .bar i { background: var(--err); }
.ws-day .c { font-size: 12px; color: var(--muted); }
.ws-day.fer { background: var(--accent-soft); }

/* alertas */
.alerts { display: grid; gap: 8px; }
.alert { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.alert .ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.alert.erro .ic { background: var(--err-soft); color: var(--err); }
.alert.aviso .ic { background: var(--warn-soft); color: var(--warn); }
.alert.info .ic { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.alert b { font-weight: 700; }
.empty-state { text-align: center; color: var(--muted); padding: 22px 10px; font-size: 14px; }
.empty-state .big { font-size: 28px; }

/* ---------- grade de escala ---------- */
.legend { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.brush { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.brush button { border: 0; background: transparent; padding: 5px 10px 5px 7px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.brush button.on { background: var(--ink); color: var(--surface); }
.sw { width: 16px; height: 16px; border-radius: 4px; display: inline-block; flex: none; }
.sw.T { background: var(--T); } .sw.F { background: var(--F); } .sw.FE { background: var(--FE); } .sw.AF { background: var(--AF); } .sw.FR { background: var(--FR); }
.sw.X { background: repeating-linear-gradient(45deg, var(--empty) 0 3px, transparent 3px 6px); border: 1px solid var(--line-2); }
.sw.P { background: var(--surface); border: 1.5px dashed var(--muted); }

.grid-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); max-height: calc(100vh - 230px); position: relative; }
table.grid { border-collapse: separate; border-spacing: 0; font-size: 13px; user-select: none; -webkit-user-select: none; min-width: 100%; }
.grid th, .grid td { padding: 0; border-bottom: 1px solid var(--line); text-align: center; }
.grid thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); height: 50px; min-width: var(--cell); font-weight: 600; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.grid thead th .wd { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.grid thead th .dn { display: block; font-size: 14px; font-weight: 800; }
.grid thead th.dom { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.grid thead th.fer .dn { color: var(--accent); }
.grid thead th.fer::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); }
.grid thead th.hoje .dn { background: var(--accent); color: #fff; border-radius: 6px; display: inline-block; padding: 0 5px; }
.grid .sc { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; min-width: 210px; max-width: 210px; border-right: 1px solid var(--line-2); padding: 0 10px; }
.grid thead .sc { z-index: 4; cursor: default; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.grid tr.setor th.sc, .grid tr.setor td { background: var(--surface-2); height: 34px; }
.grid tr.setor th.sc { font-weight: 800; font-size: 13px; }
.grid tr.setor th.sc .sn { display: flex; gap: 8px; align-items: center; }
.grid tr.setor td { font-size: 11.5px; font-family: var(--mono); color: var(--muted); }
.grid tr.setor td.low { color: var(--err); font-weight: 800; background: var(--err-soft); }
.grid .fname { display: flex; flex-direction: column; justify-content: center; height: 44px; cursor: pointer; }
.grid .fname b { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.grid .fname .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: inherit; font-size: inherit; }
.grid .fname > span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .warnbadge { font-size: 10.5px; font-weight: 800; padding: 0 6px; border-radius: 99px; background: var(--err-soft); color: var(--err); flex: none; }
.grid .warnbadge.aviso { background: var(--warn-soft); color: var(--warn); }
.grid td.cell { width: var(--cell); min-width: var(--cell); height: 44px; cursor: pointer; position: relative; }
.grid td.cell::before { content: ""; position: absolute; inset: 5px 3px; border-radius: 6px; background: repeating-linear-gradient(45deg, var(--empty) 0 3px, transparent 3px 6px); transition: transform .08s; }
.grid td.cell.dom { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.grid td.cell[data-s="T"]::before { background: var(--T); }
.grid td.cell[data-s="F"]::before { background: var(--F); }
.grid td.cell[data-s="FE"]::before { background: var(--FE); }
.grid td.cell[data-s="AF"]::before { background: var(--AF); }
.grid td.cell[data-s="FR"]::before { background: var(--FR); }
.grid td.cell[data-s="FR"]::after { content: "FE"; color: var(--FR-ink); }
.grid td.cell.ffech { background: var(--FR-soft); }
.grid thead th.fer-meio::after { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); width: 6px; height: 6px; }
.grid thead th.fer-aberto::after { opacity: .45; }
.grid thead th.fer-fechado { background: var(--FR-soft); }
.grid td.cell::after { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; }
.grid td.cell[data-s="F"]::after { content: "F"; color: var(--F-ink); }
.grid td.cell[data-s="FE"]::after { content: "FÉR"; color: var(--FE-ink); font-size: 9.5px; letter-spacing: -.02em; }
.grid td.cell[data-s="AF"]::after { content: "AF"; color: var(--AF-ink); }
.grid td.cell.bad::before { box-shadow: 0 0 0 2px var(--err); }
.grid td.cell.bad[data-s="T"]::after { content: "!"; color: #fff; }
.grid td.cell.off { cursor: not-allowed; }
.grid td.cell.off::before { background: transparent; border: 1px dashed var(--line-2); }
.grid td.cell.lock { cursor: default; }
.grid td.cell:not(.off):not(.lock):hover::before { transform: scale(1.12); }
.grid td.tot { font-family: var(--mono); font-size: 12.5px; min-width: 46px; padding: 0 6px; border-left: 1px solid var(--line); }
.grid td.tot.T { color: var(--T); font-weight: 800; }
.grid tfoot td, .grid tfoot th { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line-2); height: 36px; font-family: var(--mono); font-size: 12px; font-weight: 700; z-index: 2; }
.grid tfoot th.sc { z-index: 4; font-family: var(--font); }
.grid.semana { --cell: 64px; }
.grid.semana td.cell::before { inset: 5px 5px; }
.grid.semana td.cell::after { font-size: 12px; }
.grid.semana td.cell[data-s="T"]::after { content: "Trab."; color: var(--T-ink); }
.grid.semana td.cell[data-s="F"]::after { content: "Folga"; }
.grid.semana td.cell[data-s="FE"]::after { content: "Férias"; }
.grid.semana td.cell[data-s="AF"]::after { content: "Afast."; }
.grid.semana td.cell[data-s="FR"]::after { content: "Feriado"; }
.grid.painting td.cell { touch-action: none; }

/* ---------- quadro (arrastar) ---------- */
.board { display: grid; grid-template-columns: repeat(var(--lanes, 5), minmax(150px, 1fr)); gap: 12px; align-items: start; }
.lane { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 160px; display: flex; flex-direction: column; gap: 7px; transition: background .12s, border-color .12s; }
.lane-h { display: flex; flex-wrap: wrap; row-gap: 2px; align-items: center; gap: 8px; font-weight: 800; font-size: 13.5px; padding: 2px 4px 6px; }
.lane-h .n { margin-left: auto; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.lane.over { background: var(--accent-soft); border-color: var(--accent); border-style: dashed; }
.lane .sub-h { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 6px 4px 0; display: flex; gap: 6px; align-items: center; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line-2)); border-radius: 9px; padding: 8px 8px 8px 10px; display: flex; gap: 8px; align-items: center; cursor: grab; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.kcard:hover { border-color: var(--line-2); border-left-color: var(--c); }
.kcard .kt { min-width: 0; flex: 1; }
.kcard b { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard .handle { width: 26px; height: 30px; display: grid; place-items: center; color: var(--muted); touch-action: none; cursor: grab; flex: none; border-radius: 6px; }
.kcard .handle:hover { background: var(--surface-2); }
.kcard .handle svg { width: 16px; height: 16px; }
.kcard.dragging { opacity: .35; }
.kcard.lock { cursor: default; }
.kcard.lock .handle { display: none; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; box-shadow: var(--shadow-lg); transform-origin: 0 0; opacity: .95; rotate: -1.5deg; }
.lane .drop-hint { border: 1.5px dashed var(--line-2); border-radius: 9px; padding: 14px 8px; text-align: center; font-size: 12.5px; color: var(--muted); }
.lane-FR .lane-h { color: var(--FR); }
.lane-h .lane-all { margin-left: 2px; min-height: 26px; padding: 2px 7px; font-size: 12px; color: var(--muted); gap: 4px; }
.lane-h .lane-all svg { width: 14px; height: 14px; }
.lane-h .lane-all:hover { color: var(--ink); }
.lane-add { border: 1.5px dashed var(--line-2); border-radius: 14px; background: transparent; min-height: 120px; cursor: pointer; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); padding: 14px; }
.lane-add:hover { border-color: var(--accent); color: var(--accent); }
.lane-add svg { width: 22px; height: 22px; }
.lane-add span { font-size: 12px; }
.banner.neutro { background: var(--surface-2); border-color: var(--line); }
.banner .grow { min-width: 0; }
.toggle { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--surface-2); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .tg { width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; margin-top: 2px; }
.toggle .tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.toggle input:checked + .tg { background: var(--accent); }
.toggle input:checked + .tg::after { transform: translateX(16px); }
.toggle input:focus-visible + .tg { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle b { display: block; font-size: 14px; }
.toggle span:not(.tg) { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.fer-list { display: grid; }
.fer-row { display: grid; grid-template-columns: 112px 1fr auto auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.fer-row:last-child { border-bottom: 0; }
.fer-nome { font-size: 14px; min-width: 0; }
.seg.sm button { padding: 4px 8px; font-size: 12px; }
@media (max-width: 560px) { .fer-row { grid-template-columns: 1fr auto; } .fer-row .seg { grid-column: 1; } }
.lane-T .lane-h { color: var(--T); } .lane-F .lane-h { color: var(--warn); } .lane-FE .lane-h { color: var(--FE); } .lane-AF .lane-h { color: var(--AF); }

/* equipe */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.team .lane { min-height: 120px; }
.kcard .meta { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.kcard .meta i { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.kcard.inativo { opacity: .55; }

/* verificação */
.ver { display: grid; gap: 16px; }
.ver-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ver-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ver-head h3 { margin: 0; font-size: 17px; }
.ver-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border-bottom: 1px solid var(--line); }
.ver-kpis div { padding: 12px 16px; border-right: 1px solid var(--line); }
.ver-kpis div:last-child { border-right: 0; }
.ver-kpis b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ver-kpis span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ver-body { padding: 14px 16px; display: grid; gap: 10px; }
details.acc { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
details.acc summary { padding: 10px 12px; cursor: pointer; font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; list-style: none; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "▸"; margin-left: auto; color: var(--muted); transition: rotate .15s; }
details.acc[open] summary::after { rotate: 90deg; }
details.acc .acc-b { padding: 0 12px 12px; display: grid; gap: 6px; }
.log-list { display: grid; gap: 0; }
.log-item { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.log-item:last-child { border-bottom: 0; }

/* tabelas simples */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }

/* modal / sheet */
.overlay { position: fixed; inset: 0; background: rgba(20,17,14,.45); z-index: 200; display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 16px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lg); animation: pop .15s; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-h h3 { margin: 0; font-size: 17px; }
.modal-h .btn { margin-left: auto; }
.modal-b { padding: 18px; display: grid; gap: 14px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.modal-f .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

.pop { position: fixed; z-index: 300; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; animation: pop .1s; }
.pop .pop-t { font-size: 12px; color: var(--muted); padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop .pop-t b { color: var(--ink); display: block; font-size: 13.5px; }
.opt { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; text-align: left; font-size: 14px; }
.opt:hover, .opt.cur { background: var(--surface-2); }
.opt.cur::after { content: "✓"; margin-left: auto; color: var(--accent); font-weight: 800; }
.opt kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }

.checks { display: grid; gap: 6px; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.checks label { display: flex; gap: 9px; align-items: center; font-size: 14px; padding: 4px; cursor: pointer; }
.checks .grp { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; margin-top: 6px; }

.radio-cards { display: grid; gap: 8px; }
.radio-cards label { display: flex; gap: 10px; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; align-items: flex-start; }
.radio-cards label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-cards input { margin-top: 3px; accent-color: var(--accent); }
.radio-cards b { display: block; font-size: 14px; }
.radio-cards span { font-size: 12.5px; color: var(--muted); }

.toasts { position: fixed; z-index: 500; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; pointer-events: auto; animation: pop .15s; max-width: calc(100vw - 32px); }
.toast.erro { background: var(--err); color: #fff; }
.toast button { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-weight: 700; }

.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- celular ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 8px 12px; min-height: 54px; gap: 8px; }
  .top h2 { font-size: 17px; }
  .content { padding: 12px 16px 96px; gap: 14px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .bottom-nav button { border: 0; background: transparent; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; font-size: 11px; font-weight: 700; color: var(--muted); border-radius: 10px; position: relative; }
  .bottom-nav button svg { width: 22px; height: 22px; }
  .bottom-nav button.on { color: var(--accent); }
  .bottom-nav .badge { position: absolute; top: 2px; right: calc(50% - 20px); background: var(--err); color: #fff; font-size: 10px; padding: 0 5px; border-radius: 99px; }
  .board { grid-template-columns: 1fr; }
  .grid-wrap { max-height: calc(100vh - 250px); border-radius: 12px; }
  .grid .sc { min-width: 108px; max-width: 108px; padding: 0 7px; }
  .grid tr.setor th.sc .sn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .grid tr.setor th.sc .dot { display: none; }
  .grid tr.setor th.sc { box-shadow: inset 3px 0 0 var(--sc, transparent); }
  .grid .fname b { font-size: 13px; }
  .grid.semana { --cell: 36px; }
  .grid.semana td.cell::before { inset: 5px 2px; }
  .grid.semana td.cell::after { font-size: 10px; }
  .grid.semana td.cell[data-s="T"]::after { content: ""; }
  .grid.semana td.cell[data-s="F"]::after { content: "F"; }
  .grid.semana td.cell[data-s="FE"]::after { content: "FÉR"; }
  .grid.semana td.cell[data-s="AF"]::after { content: "AF"; }
  .grid.semana td.cell[data-s="FR"]::after { content: "FE"; }
  .grid td.tot { min-width: 34px; padding: 0 3px; }
  .period b { min-width: 118px; font-size: 13.5px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .val { font-size: 26px; }
  .overlay.sheet { place-items: end stretch; padding: 0; }
  .overlay.sheet .modal { width: 100%; border-radius: 18px 18px 0 0; max-height: 88vh; animation: up .18s; padding-bottom: env(safe-area-inset-bottom); }
  .hide-m { display: none !important; }
  .log-item { grid-template-columns: 1fr; gap: 2px; }
  .ver-kpis { grid-template-columns: repeat(3, 1fr); }
  .ver-kpis div:nth-child(3n) { border-right: 0; }
  .ver-kpis div { border-bottom: 1px solid var(--line); }
  .toasts { bottom: 86px; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- impressão ---------- */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff; font-size: 10px; }
  .side, .top, .bottom-nav, .toolbar, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  .content { padding: 0; }
  .print-title { display: block !important; font-size: 14px; font-weight: 800; margin-bottom: 6px; }
  .grid-wrap { max-height: none; overflow: visible; border: 0; }
  .grid { --cell: 22px; font-size: 9px; }
  .grid .sc { min-width: 120px; max-width: 120px; position: static; }
  .grid thead th, .grid tfoot td, .grid tfoot th { position: static; height: auto; }
  .grid td.cell { height: 20px; }
  .grid td.cell::before { inset: 2px 1px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .grid .fname { height: 20px; }
  .grid .fname .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: inherit; font-size: inherit; }
.grid .fname > span { display: none; }
}
.print-title { display: none; }

/* ======================= Painel do dia (TV) ======================= */
.painel { display: grid; gap: 16px; }
.ptopo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ptit { display: grid; line-height: 1.05; min-width: 200px; }
.pdow { font-size: 14px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.pdata { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.presumo { margin-left: auto; display: flex; gap: 22px; font-size: 16px; color: var(--ink-2); flex-wrap: wrap; }
.presumo span { display: flex; align-items: center; gap: 8px; }
.presumo b { font-size: 28px; color: var(--ink); font-family: var(--font); }
.presumo .sw, .pzona h4 .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex: none; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; align-items: stretch; }
.pcol { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 170px; transition: background .12s, border-color .12s; min-width: 0; }
.pcol header { display: flex; align-items: baseline; gap: 8px; }
.pcol-n { font-weight: 800; font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcol-c { margin-left: auto; font-size: 30px; font-weight: 800; color: var(--T); line-height: 1; }
.pcol-c small { font-size: 16px; color: var(--muted); font-weight: 700; }
.pcol.low { background: color-mix(in srgb, var(--err-soft) 60%, var(--surface)); }
.pcol.low .pcol-c { color: var(--err); }
.pcards { display: grid; gap: 8px; align-content: start; }
.pcard { background: var(--surface-2); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; padding: 10px 12px; cursor: grab; display: grid; gap: 1px; min-width: 0; }
.pcard b { font-size: 19px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard span { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard.lock, .pchip.lock { cursor: pointer; }
.pcard.dragging, .pchip.dragging { opacity: .35; }
.pvazio { color: var(--muted); font-size: 14px; padding: 10px; text-align: center; border: 1.5px dashed var(--line-2); border-radius: 10px; }
.pfora { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.pzona { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; transition: background .12s, border-color .12s; }
.pzona h4 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.pzona h4 b { margin-left: auto; font-size: 22px; font-family: var(--font); }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 9px; padding: 7px 11px; background: var(--surface-2); display: grid; cursor: grab; }
.pchip b { font-size: 16px; font-weight: 650; }
.pchip span { font-size: 12.5px; color: var(--muted); }
.pcol.over, .pzona.over { background: var(--accent-soft); border-color: var(--accent); }
.pprox h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pdays { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.pday { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 5px; align-content: start; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.pday:hover { border-color: var(--ink-2); }
.pday-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.pday-h b { font-size: 17px; }
.pday-h span { color: var(--muted); font-size: 13px; }
.pday-n { font-size: 13px; color: var(--muted); }
.pday-n b { color: var(--T); font-size: 16px; }
.pday-off { display: flex; flex-wrap: wrap; gap: 4px; }
.pday-off span { font-size: 13.5px; font-weight: 650; padding: 2px 7px; border-radius: 6px; background: var(--F-soft); border-left: 3px solid var(--c); }
.pday-off em { font-size: 13px; color: var(--muted); }
.pday-fer { font-size: 12px; font-weight: 800; color: var(--accent); }
.pday.fech { background: var(--FR-soft); }
.pdica { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1200px) { .pdays { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .pdays { grid-template-columns: repeat(2, 1fr); } .presumo { margin-left: 0; } .pdata { font-size: 26px; } }

.edit-pill { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-size: 13.5px; }
.edit-pill svg { width: 14px; height: 14px; }
.pill.tvp { background: var(--FR-soft); }
.relogio { font-size: 15px; font-weight: 800; }

/* ======================= Modo TV (tela grande touch) ======================= */
html.tv body { font-size: 17px; zoom: var(--tvz, 1); }
html.tv .app { grid-template-columns: 1fr; }
html.tv .side { display: none; }
html.tv .top { min-height: 74px; padding: 10px max(24px, env(safe-area-inset-right, 0px)) 10px max(24px, env(safe-area-inset-left, 0px)); gap: 14px; }
html.tv .top h2 { font-size: 22px; }
html.tv .relogio { font-size: 30px; letter-spacing: -.02em; padding: 0 6px; }
html.tv .content { padding: 18px 24px 124px; gap: 18px; }
html.tv .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 96%, transparent); border-top: 1px solid var(--line);
  padding: 8px max(24px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px)); }
html.tv .bottom-nav button { border: 0; background: transparent; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 8px;
  font-size: 18px; font-weight: 700; color: var(--muted); border-radius: 12px; min-height: 66px; cursor: pointer; position: relative; }
html.tv .bottom-nav button svg { width: 28px; height: 28px; }
html.tv .bottom-nav button.on { color: var(--accent); background: var(--accent-soft); }
html.tv .btn { min-height: 50px; font-size: 16px; padding: 10px 18px; border-radius: 11px; }
html.tv .btn.sm { min-height: 44px; font-size: 15px; padding: 8px 14px; }
html.tv .btn.icon { width: 52px; min-height: 52px; padding: 0; }
html.tv .btn svg { width: 21px; height: 21px; }
html.tv .inp, html.tv select.inp { min-height: 52px; font-size: 18px; }
html.tv .seg button { padding: 10px 18px; font-size: 16px; }
html.tv .period .btn { width: 54px; min-height: 52px; }
html.tv .period b { font-size: 18px; min-width: 200px; }
html.tv .brush button { padding: 11px 16px 11px 12px; font-size: 16px; }
html.tv .sw { width: 20px; height: 20px; }
html.tv .grid { --cell: 44px; font-size: 15px; }
html.tv .grid td.cell, html.tv .grid .fname { height: 56px; }
html.tv .grid .fname b { font-size: 16.5px; }
html.tv .grid .sc { min-width: 250px; max-width: 250px; }
html.tv .grid.semana { --cell: 130px; }
html.tv .grid.semana td.cell::after { font-size: 15px; }
html.tv .grid thead th { height: 62px; }
html.tv .grid thead th .dn { font-size: 19px; }
html.tv .grid-wrap { max-height: calc(100vh - 320px); }
html.tv .kcard { padding: 12px 12px 12px 14px; touch-action: none; }
html.tv .kcard b { font-size: 18px; }
html.tv .kcard span { font-size: 14px; }
html.tv .pcard, html.tv .pchip { touch-action: none; }
html.tv .lane-h { font-size: 17px; }
html.tv .lane-h .lane-all { min-height: 40px; font-size: 14px; padding: 4px 10px; }
html.tv .opt { padding: 15px 14px; font-size: 18px; }
html.tv .pop { min-width: 320px; }
html.tv .modal { width: min(700px, 100%); }
html.tv .modal-h h3 { font-size: 21px; }
html.tv .modal-b { font-size: 17px; }
html.tv label.fld { font-size: 15px; }
html.tv .toasts { bottom: 112px; }
html.tv .toast { font-size: 17px; padding: 14px 18px; }
html.tv .card h3 { font-size: 18px; }
html.tv .chip { font-size: 15px; padding: 6px 11px; }
html.tv .ptopo .btn.icon { width: 62px; min-height: 62px; }
html.tv .pdata { font-size: 40px; }
html.tv .edit-pill { font-size: 16px; padding: 8px 12px; }

/* arrastar no celular: barra fixa com os destinos */
.kcard, .pcard, .pchip { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.drop-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--surface); border-top: 1px solid var(--line-2); box-shadow: 0 -8px 30px rgba(0,0,0,.18);
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); animation: up .15s; }
.drop-tit { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 2px 8px; }
.drop-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.drop-alvo { border: 1.5px dashed var(--line-2); border-radius: 12px; min-height: 54px; padding: 8px 10px; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 700; font-size: 14px; text-align: center; background: var(--surface-2); }
.drop-alvo.over { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); transform: scale(1.04); }
.kcard.dragging { box-shadow: inset 0 0 0 2px var(--accent); }

/* painel: equipes encaixadas em colunas (sem buracos) e modo compacto quando há muita gente */
.pgrid { display: block; column-width: 230px; column-gap: 12px; }
.pgrid > .pcol { break-inside: avoid; -webkit-column-break-inside: avoid; margin-bottom: 12px; min-height: 0; display: flex; }
.pgrid > .card { break-inside: avoid; }
.pgrid.denso { column-width: 196px; column-gap: 10px; }
.pgrid.denso > .pcol { padding: 8px 9px 9px; gap: 6px; border-top-width: 4px; margin-bottom: 10px; border-radius: 12px; }
.pgrid.denso .pcol-n { font-size: 15.5px; }
.pgrid.denso .pcol-c { font-size: 21px; }
.pgrid.denso .pcol-c small { font-size: 13px; }
.pgrid.denso .pcards { gap: 4px; }
.pgrid.denso .pcard { padding: 5px 9px; border-left-width: 4px; border-radius: 8px; }
.pgrid.denso .pcard b { font-size: 16px; }
.pgrid.denso .pvazio { padding: 6px; font-size: 13px; }

/* TV de toque: sem seta do mouse */
html.sem-cursor, html.sem-cursor * { cursor: none !important; }
.kcard .meta i.vinc, .pill.vinc { background: var(--T-soft); color: var(--T); border-color: transparent; }

/* expediente até as 13h: a célula de quem trabalha mostra "13h" */
.grid td.cell.meio[data-s="T"]::after, .grid.semana td.cell.meio[data-s="T"]::after { content: "13h"; color: var(--T-ink); font-size: 10px; }
html.tv .grid td.cell.meio[data-s="T"]::after { font-size: 12px; }

/* folga de domingo: mesma família da folga, mais clara, para separar da folga da semana */
.sw.D { background: var(--F-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--F) 60%, transparent); }
.grid td.cell.dom[data-s="F"]::before { background: var(--F-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--F) 60%, transparent); }
.grid td.cell.dom[data-s="F"]::after { content: "D"; color: var(--warn); }
.grid.semana td.cell.dom[data-s="F"]::after { content: "Dom"; color: var(--warn); }
@media (max-width: 860px) { .grid.semana td.cell.dom[data-s="F"]::after { content: "D"; } }

/* busca discreta */
.busca { position: relative; display: inline-flex; align-items: center; width: 168px; transition: width .18s; flex: none; }
.busca:focus-within, .busca.ativa { width: 240px; }
.busca > svg { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.busca input { width: 100%; min-height: 38px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 7px 34px 7px 32px; font-size: 14px; color: var(--ink); }
.busca input::placeholder { color: var(--muted); }
.busca input::-webkit-search-cancel-button { display: none; }
.busca input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; border-color: var(--accent); background: var(--surface); }
.busca.ativa input { border-color: var(--accent); background: var(--accent-soft); padding-right: 74px; font-weight: 600; }
.busca-n { position: absolute; right: 32px; font-size: 11px; color: var(--accent); font-weight: 700; pointer-events: none; }
.busca-x { position: absolute; right: 4px; width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.busca-x:hover { background: var(--surface-2); color: var(--ink); }
.busca-x svg { width: 15px; height: 15px; }
@media (max-width: 860px) { .busca, .busca:focus-within, .busca.ativa { width: 100%; order: 10; } }
html.tv .busca { width: 220px; }
html.tv .busca:focus-within, html.tv .busca.ativa { width: 320px; }
html.tv .busca input { min-height: 52px; font-size: 18px; padding-left: 40px; }
html.tv .busca.ativa input { padding-right: 96px; }
html.tv .busca > svg { width: 20px; height: 20px; left: 13px; }
html.tv .busca-n { font-size: 14px; right: 46px; }
html.tv .busca-x { width: 40px; height: 40px; }
.opt[disabled] { opacity: .45; cursor: not-allowed; }
.opt[disabled]:hover { background: transparent; }
.drop-alvo .sw.D, .brush .sw.D { background: var(--F-soft); }
.dias-chk { display: flex; gap: 6px; flex-wrap: wrap; }
.dias-chk label { cursor: pointer; }
.dias-chk input { position: absolute; opacity: 0; pointer-events: none; }
.dias-chk span { display: inline-grid; place-items: center; min-width: 48px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 9px; font-weight: 700; font-size: 14px; background: var(--surface); }
.dias-chk input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dias-chk input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
