/* Escala da equipe: complementa o painel.css (mesma base escura com verde). */
:root { --t0: #1d3a5a; --t0c: #9cc5f1; --t1: #2c2346; --t1c: #c4b5fd; --t2: #1c3826; --t2c: #95d5a9; --red: #ef4444; }
.loja-ico { color: #0b0b0b; }
.fila-rot.verde { color: var(--verde-2); }
.btn-sec.forte { background: var(--verde-fundo); border-color: transparent; color: #fff; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .btn-sec.forte:hover { background: #21994d; } .btn-sec:not(.forte):hover { background: #ffffff12; } }
.mini-b { min-height: 36px !important; padding: 0 12px !important; font-size: 12.5px !important; border-radius: 8px !important; flex: none; gap: 6px; }
.b-ok.mini-b { font-weight: 600; }
.metrica.ruim strong { color: #fca5a5; }

/* hoje */
.duas { margin-bottom: 14px; }
.agora { list-style: none; padding: 8px 0 12px; }
.agora li { display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.agora li.ag-grupo { padding: 12px 16px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8f8f8f; }
.agora li.vazio-li, .agora li.mais { color: var(--muted-2); font-size: 13px; }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, #454545, #282828); border: 1px solid #ffffff0a; color: #e5e5e5; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.chip { display: inline-grid; place-items: center; min-width: 52px; min-height: 26px; padding: 0 10px; border-radius: 7px; font-size: 11.5px; font-weight: 600; }
.chip.t0, .cel.t0, .mk.t0 { background: var(--t0); color: var(--t0c); }
.chip.t1, .cel.t1, .mk.t1 { background: var(--t1); color: var(--t1c); }
.chip.t2, .cel.t2, .mk.t2 { background: var(--t2); color: var(--t2c); }
.alertas li { align-items: center; }
.alertas li > svg { margin-top: 0; flex: none; }
.al-txt { flex: 1; min-width: 0; }
.al-txt b { display: block; font-weight: 600; font-size: 13px; color: #ececec; }
.al-txt small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.alertas li { transition: background-color .2s; }
.alertas li.red { background: #ffffff04; border-color: #ffffff0a; box-shadow: inset 3px 0 0 #ef4444; } .alertas li.red svg { color: #f87171; }
.alertas li.amber { background: #ffffff04; border-color: #ffffff0a; box-shadow: inset 3px 0 0 #f1c66b; }
@media (hover: hover) and (pointer: fine) { .alertas li:not(.mais):hover { background: #ffffff08; } }
.alertas li.novo { animation: chega 1.1s var(--curva) both; box-shadow: inset 3px 0 0 #ef4444, 0 0 0 2px #ef444466; background: #2a1717; }
@keyframes chega { 0% { opacity: 0; transform: translateY(-6px) scale(.98); } 100% { opacity: 1; transform: none; } }
.alertas li.mais { background: none; border: 0; color: var(--muted-2); padding: 4px 12px; }
.mini-cob { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0 10px; }
.mini-cob th { text-align: left; font-weight: 500; padding: 7px 10px; color: #cfcfcf; white-space: nowrap; }
.mini-cob th small { display: block; color: var(--muted-2); font-size: 11px; font-weight: 400; }
.mini-cob thead th { text-align: center; color: var(--muted-2); font-size: 11px; }
.mini-cob td { padding: 4px; text-align: center; }
.cb { display: inline-grid; place-items: center; min-width: 40px; min-height: 30px; padding: 0 6px; border-radius: 7px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cb.ok { background: transparent; color: #9a9a9a; font-weight: 500; }
.cb.falta { display: inline-flex; gap: 4px; background: #3a1717; color: #fca5a5; box-shadow: inset 0 0 0 1px #ef444455; min-height: 36px; transition: background-color .15s; }
.cb.falta svg { width: 13px; height: 13px; }
.grade.mes .cb.falta svg { display: none; }
@media (hover: hover) and (pointer: fine) { .cb.falta:hover { background: #4a1c1c; } }
.cb.passou { color: #8a8a8a; font-weight: 500; }
.cb.fech { color: #8a8a8a; font-weight: 400; font-size: 11px; font-style: italic; }
.trocas-lista { display: grid; gap: 12px; }
.trocas-lista.curta { padding: 10px 14px 14px; gap: 10px; }
.trocas-lista.curta .troca { box-shadow: none; background: #1b1b1b; }

/* escala */
.barra-esc { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.nav-sem { display: flex; align-items: center; gap: 10px; }
.nav-sem[hidden], .btn-sec[hidden] { display: none; }
.nav-sem b { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 110px; text-align: center; }
.nav-sem .ico-btn:disabled { opacity: .4; cursor: not-allowed; }
.grade-wrap { overflow-x: auto; }
/* textos só para leitor de tela ficam presos dentro da tabela (senão vazam e criam rolagem lateral) */
.grade-wrap, .tabela-wrap, .cb { position: relative; }
/* rolagem própria (com cabeçalho fixo) só em tela grande; no resto a página rola uma vez só */
@media (min-width: 1024px) and (min-height: 700px) { .grade-wrap { overflow: auto; max-height: calc(100dvh - 230px); } }
.grade { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
.grade th, .grade td { border-bottom: 1px solid #ffffff05; }
.grade thead th { position: sticky; top: 0; z-index: 2; background: #1a1a1a; padding: 10px 4px 8px; font-weight: 500; color: var(--muted-2); text-align: center; white-space: nowrap; }
.grade thead th small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.grade thead th span { display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: 6px; color: #d4d4d4; font-variant-numeric: tabular-nums; }
.grade thead th.hoje span { background: var(--verde-fundo); color: #fff; }
.grade thead th.fechado { opacity: .45; }
.grade .nome { position: sticky; left: 0; z-index: 1; background: #171717; text-align: left; padding: 6px 12px; white-space: nowrap; font-weight: 500; }
.grade thead th.nome { z-index: 3; color: var(--muted-2); }
.grade tbody th.nome { min-width: 210px; }
.grade .nome-in { display: flex; align-items: center; gap: 10px; }
.grade .nm { overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.grade td { padding: 3px; text-align: center; transition: background-color .2s; }
.grade .grupo th.nome { padding: 16px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8e8e8e; background: #141414; }
.grade .grupo td { background: #141414; }
.reg { margin-left: 6px; padding: 2px 6px; border-radius: 5px; background: #ffffff0d; color: #a8a8a8; letter-spacing: 0; text-transform: none; font-weight: 500; }
.grade .cob th.nome { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.grade .cob th.nome small { color: #8a8a8a; margin-left: 4px; }
.grade .cob td, .grade .cob th { border-bottom-color: transparent; }
.grade .cob + .grupo th, .grade .cob + .grupo td { border-top: 1px solid #ffffff0c; }
.hrs { color: var(--muted); font-size: 12px; padding: 0 12px !important; font-variant-numeric: tabular-nums; }
.cel { position: relative; width: 100%; min-height: 40px; border-radius: 9px; display: grid; place-content: center; line-height: 1.15; transition: transform .16s var(--curva), box-shadow .2s, opacity .25s, filter .25s; }
.cel b { font-weight: 600; font-size: 12px; }
.cel small { font-size: 10.5px; opacity: .78; font-variant-numeric: tabular-nums; }
.grade.semana .cel { min-width: 84px; }
.grade.mes .cel { min-width: 30px; min-height: 40px; }
.grade.mes td { padding: 2px 1px; }
.grade.mes .cb { min-width: 30px; padding: 0 2px; font-size: 10.5px; }
.cel.folga { color: #8a8a8a; background: transparent; }
.cel.folga b { font-weight: 400; font-size: 11.5px; }
.cel.at, .mk.at { background: #3a1d1d; color: #ff9b9b; }
.cel.fe, .mk.fe { background: #3a301a; color: #f1c66b; }
.cel.hj { box-shadow: inset 0 0 0 1px #ffffff2a; }
/* marcas com forma diferente, não só cor: extra = círculo com +, troca = losango */
.cel.extra::after, .mk.ex { content: "+"; position: absolute; top: 3px; right: 3px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; background: #f59e0b; color: #1a1204; font: 800 11px/1 "Inter", sans-serif; box-shadow: 0 0 0 2px #00000055; }
.cel.troca::after, .mk.tr { content: ""; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 1px; transform: rotate(45deg); background: #38bdf8; box-shadow: 0 0 0 2px #00000055; }
.cel:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .cel:not(.folga):hover { transform: translateY(-1px); } }
@media (hover: hover) and (pointer: fine) { .cel:hover { box-shadow: inset 0 0 0 1px #ffffff40; } }
.cel.pisca { animation: pisca 1.4s ease 2; }
@keyframes pisca { 50% { box-shadow: 0 0 0 3px #f59e0b, 0 0 18px #f59e0b88; } }
.grade.monta .cel { animation: monta .45s var(--curva) both; animation-delay: calc(var(--i, 0) * 9ms); }
@keyframes monta { from { opacity: 0; transform: scale(.6); } }
.mk { display: inline-block; width: 14px; height: 14px; border-radius: 4px; flex: none; }
.mk.folga { background: #ffffff08; border: 1px solid #ffffff14; }
.leg-esc .mk.ex, .leg-esc .mk.tr { position: static; box-shadow: none; }
.leg-esc .mk.ex::before { content: "+"; }
.leg-esc .mk.tr { margin: 0 3px; }

/* menu de cada dia */
.menu-cel { position: fixed; z-index: 70; width: 230px; padding: 6px; border-radius: 14px; background: #1f1f1f; border: 1px solid var(--border-2); box-shadow: 0 24px 50px -12px #000c; animation: abre-menu .18s var(--curva); }
@keyframes abre-menu { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
.menu-cel p { padding: 8px 10px 8px; border-bottom: 1px solid #ffffff0c; margin-bottom: 4px; }
.menu-cel p b { display: block; font-size: 13px; }
.menu-cel p small { color: var(--muted-2); font-size: 11.5px; }
.menu-cel button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: 9px; text-align: left; font-size: 13px; }
.menu-cel button small { display: block; color: var(--muted-2); font-size: 11px; }
.menu-cel button[aria-checked="true"] { background: #ffffff0d; font-weight: 600; }
.menu-cel button > span { flex: 1; }
.menu-cel .mk-ok { width: 16px; height: 16px; color: var(--verde-2); flex: none; }
.menu-cel button:focus-visible { outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .menu-cel button:hover { background: #ffffff10; } }

/* trocas */
.troca { padding: 16px 18px; display: grid; gap: 10px; max-width: 760px; }
.troca.nova { box-shadow: 0 0 0 2px #22c55e55; animation: chega 1s var(--curva) both; }
.troca-cab { display: flex; align-items: center; gap: 10px; }
.troca-cab > div { flex: 1; min-width: 0; }
.troca-cab b { display: block; font-size: 14px; }
.troca-cab small { color: var(--muted-2); font-size: 12px; }
.troca-txt { font-size: 14px; color: #dcdcdc; }
.troca-mot { font-size: 12.5px; color: var(--muted); }
.troca-ok { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #95d5a9; }
.troca-ok svg { color: var(--verde-2); }
.troca-ok.aviso { color: #f1c66b; } .troca-ok.aviso svg { color: #f1c66b; }
.troca .p-acoes { max-width: 380px; }

/* horas */
.kpi.alerta { background: linear-gradient(135deg, #3a301a, #1f1a10); border-color: #5a4a26; }
.kpi.alerta strong { color: #f1c66b; }
.tb-horas td small { display: block; color: #8a8a8a; font-size: 11px; }
.tb-nome { font-weight: 500; }

/* app da equipe */
.app-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: start; }
.app-lado { max-width: 560px; padding-top: 18px; display: grid; gap: 14px; }
.app-lado h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; text-wrap: balance; }
.desc.grande { font-size: 15px; color: var(--muted); }
.ver-como { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.ver-como select { min-height: 44px; padding: 0 12px; border-radius: 10px; background: #1b1b1b; border: 1px solid var(--border-2); font-size: 16px; color: var(--text); max-width: 360px; }
.ver-como select option, .ver-como select optgroup { background: #202020; color: #f5f5f5; }
.links-eq .agora small { font-variant-numeric: tabular-nums; }
.fone { width: 360px; height: 740px; border-radius: 50px; padding: 11px; background: linear-gradient(150deg, #2a2a33, #111116); box-shadow: 0 40px 90px -24px #000, 0 0 0 1px #ffffff1c, inset 0 0 0 1px #ffffff12; flex: none; }
.fone-tela { position: relative; height: 100%; border-radius: 40px; overflow: auto; overscroll-behavior: contain; background: #f4f5f7; color: #15161a; scrollbar-width: none; font-size: 14px; }
.fone-tela::-webkit-scrollbar { display: none; }
.f-status { display: flex; justify-content: space-between; align-items: center; padding: 14px 26px 6px; font-size: 13px; font-weight: 600; }
.f-sinal { display: flex; gap: 2px; align-items: flex-end; }
.f-sinal i { width: 4px; border-radius: 1px; background: #15161a; } .f-sinal i:nth-child(1) { height: 5px; } .f-sinal i:nth-child(2) { height: 8px; } .f-sinal i:nth-child(3) { height: 11px; }
.f-topo { display: flex; align-items: center; gap: 10px; padding: 10px 20px; }
.f-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #0b0b0b; }
.f-topo b { display: block; font-size: 13.5px; } .f-topo small { color: #6b6f78; font-size: 11.5px; }
.f-ola { padding: 10px 20px 4px; }
.f-ola small { display: block; color: #6b6f78; font-size: 13px; }
.f-ola b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.f-ola span { color: #6b6f78; font-size: 12.5px; }
.f-prox { margin: 14px 16px 6px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, #16803c, #0f5f2c); color: #fff; box-shadow: 0 14px 30px -14px #16803caa; }
.f-prox small { display: block; font-size: 12px; opacity: .85; }
.f-prox b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; }
.f-prox span { font-size: 13px; opacity: .92; }
.f-sec { padding: 16px 20px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #5f636c; font-weight: 600; }
.f-dias { list-style: none; margin: 0 12px 18px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px #0000000d; }
.f-dias li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #eef0f3; min-height: 58px; }
.f-dias li:last-child { border: 0; }
.f-data { width: 54px; flex: none; }
.f-data b { display: block; font-size: 13px; } .f-data small { color: #5f636c; font-size: 11.5px; }
.f-info { flex: 1; min-width: 0; }
.f-info b { display: block; font-size: 13.5px; font-weight: 600; }
.f-info small { color: #6b6f78; font-size: 12px; }
.f-info .f-fol { color: #5f636c; font-weight: 500; }
.f-dias li.trab .f-data b { color: #16803c; }
.f-tag { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; font-style: normal; }
.f-tag.amber { background: #fff3d6; color: #8a5a00; } .f-tag.ok { background: #dcf5e4; color: #146c35; } .f-tag.azul { background: #dbeefe; color: #0b5c94; }
.f-trocar { min-height: 36px; padding: 0 14px; border-radius: 10px; background: #eef0f3; color: #15161a; font-size: 12.5px; font-weight: 600; }
.f-folha { position: sticky; bottom: 0; left: 0; right: 0; margin-top: -100%; min-height: 100%; display: flex; align-items: flex-end; background: #0b0d1255; animation: fundo .2s ease both; }
@keyframes fundo { from { background: transparent; } }
.f-folha-in { width: 100%; padding: 18px 18px 22px; border-radius: 24px 24px 0 0; background: #fff; display: grid; gap: 6px; animation: sobe .3s var(--curva) both; }
@keyframes sobe { from { transform: translateY(40%); opacity: 0; } }
.f-folha-in > b { font-size: 16px; } .f-folha-in > small { color: #6b6f78; font-size: 12.5px; }
.f-lbl { margin-top: 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #5f636c; font-weight: 600; }
.f-ops { display: grid; gap: 6px; }
.f-ops label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid #e6e8ec; cursor: pointer; }
.f-ops label:has(input:checked) { border-color: #16803c; background: #f0faf3; }
.f-ops input, .f-mots input { accent-color: #16803c; width: 18px; height: 18px; flex: none; }
.f-ops b { display: block; font-size: 13.5px; } .f-ops small { color: #6b6f78; font-size: 11.5px; }
.f-mots { display: flex; flex-wrap: wrap; gap: 6px; }
.f-mots label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1.5px solid #e6e8ec; font-size: 12.5px; cursor: pointer; }
.f-mots label:has(input:checked) { border-color: #16803c; background: #f0faf3; color: #146c35; }
.f-mots input { position: absolute; opacity: 0; pointer-events: none; }
.f-mots label:has(input:focus-visible), .f-ops label:has(input:focus-visible) { outline: 2px solid #16803c; outline-offset: 2px; }
.fone-tela :focus-visible { outline-color: #16803c; }
.f-trocar:active, .f-enviar:active { transform: scale(.97); }
.f-trocar, .f-enviar { transition: transform .12s; }
.f-enviar { margin-top: 12px; min-height: 48px; border-radius: 14px; background: #16803c; color: #fff; font-weight: 700; font-size: 14.5px; }
.f-cancelar { min-height: 44px; border-radius: 14px; color: #6b6f78; font-weight: 600; }
.f-nada { color: #6b6f78; font-size: 13px; }
.f-feito { text-align: center; justify-items: center; padding-top: 26px; }
.f-feito p { color: #6b6f78; font-size: 13px; max-width: 260px; }
.f-check { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #dcf5e4; color: #16803c; margin-bottom: 4px; }
.f-check svg { width: 26px; height: 26px; stroke-width: 2.4; }
.f-feito .f-enviar { width: 100%; }

@media (max-width: 1150px) { .app-wrap { gap: 26px; } }
@media (max-width: 960px) {
  .app-wrap { grid-template-columns: 1fr; }
  .app-lado { order: -1; padding-top: 0; }
  .fone { margin: 0 auto; }
}
@media (max-width: 700px) {
  .grade-wrap { max-height: none; }
  .grade tbody th.nome { min-width: 0; max-width: 132px; }
  .grade .nome-in { gap: 0; }
  .grade .av { display: none; }
  .grade .nm { max-width: 120px; white-space: normal; line-height: 1.2; font-size: 12px; }
  .grade .grupo th.nome { white-space: normal; }
  .grade.semana .cel { min-width: 64px; }
  .grade.semana .cel small { display: none; }
  .hrs { display: none; } .grade thead th.num { display: none; }
  .cab-pagina .acoes-pg { flex-wrap: wrap; }
  .fone { width: 100%; max-width: 380px; height: 680px; border-radius: 40px; padding: 8px; }
  .fone-tela { border-radius: 33px; }
  .mini-cob th { white-space: normal; min-width: 110px; }
  .trilha { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .tb-horas th:nth-child(2), .tb-horas td:nth-child(2), .tb-horas th:nth-child(5), .tb-horas td:nth-child(5), .tb-horas th:nth-child(7), .tb-horas td:nth-child(7), .tb-horas th:nth-child(9), .tb-horas td:nth-child(9) { display: none; }
}

/* ---------- legenda (fica em cima da grade) ---------- */
.legenda-esc { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.leg-tit { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.leg-tit small { display: block; margin-top: 2px; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; }
.leg-esc { display: flex; flex-wrap: wrap; gap: 6px; }
.leg-it { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px 0 9px; border-radius: 99px; border: 1px solid var(--border); background: #ffffff04; color: #cfcfcf; font-size: 12.5px; transition: background-color .2s, border-color .2s, color .2s, opacity .2s; }
.leg-it small { color: var(--muted-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.leg-it em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; background: #ffffff0d; color: #bdbdbd; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.leg-it[aria-pressed="true"] { background: #2b3930; border-color: #4ade8055; color: #fff; }
.leg-it[aria-pressed="true"] em { background: var(--verde-fundo); color: #fff; }
.leg-it.zero { opacity: .5; cursor: default; }
.leg-it.fixo { border-style: dashed; }
@media (hover: hover) and (pointer: fine) { .leg-it:not(.zero):not(.fixo):hover { background: #ffffff0c; border-color: var(--border-2); } }
.mk.falta { display: inline-grid; place-items: center; width: auto; height: 18px; padding: 0 5px; border-radius: 5px; background: #3a1717; color: #fca5a5; font: 700 10px/1 "Inter", sans-serif; font-style: normal; box-shadow: inset 0 0 0 1px #ef444455; }
.mk.hoje { width: 14px; height: 14px; border-radius: 4px; background: #ffffff10; box-shadow: inset 0 0 0 1px #ffffff40; }
.leg-it .mk.ex, .leg-it .mk.tr { position: static; box-shadow: none; flex: none; }
.leg-it .mk.ex::before { content: "+"; }
.leg-it .mk.tr { margin: 0 3px; }
/* destaque pela legenda: o resto da grade apaga */
.grade[data-filtro]:not([data-filtro=""]) .cel { opacity: .16; filter: saturate(.4); }
.grade[data-filtro="t0"] .cel.t0, .grade[data-filtro="t1"] .cel.t1, .grade[data-filtro="t2"] .cel.t2,
.grade[data-filtro="folga"] .cel.folga, .grade[data-filtro="at"] .cel.at, .grade[data-filtro="fe"] .cel.fe,
.grade[data-filtro="extra"] .cel.extra, .grade[data-filtro="troca"] .cel.troca { opacity: 1; filter: none; box-shadow: 0 0 0 1px #ffffff55, 0 6px 16px -6px #000; }
.grade[data-filtro="folga"] .cel.folga { background: #ffffff0a; color: #e5e5e5; }
.grade[data-filtro]:not([data-filtro=""]):not([data-filtro="falta"]) .cob .cb { opacity: .35; }
.grade[data-filtro="falta"] .cb.falta { animation: chama 1.6s ease-in-out 2; }
@keyframes chama { 50% { box-shadow: inset 0 0 0 1px #ef4444, 0 0 0 4px #ef444433; } }
.leg-mini { display: inline-flex; align-items: center; gap: 6px; }
.leg-mini .cb { min-width: 0; min-height: 22px; padding: 0 6px; font-size: 10.5px; }
.leg-mini .cb.ok { box-shadow: inset 0 0 0 1px #ffffff14; }
.leg-mini .cb.falta { margin-left: 6px; }

/* ---------- movimento ---------- */
/* a tela entra subindo; os cartões chegam um depois do outro */
.view.entra :is(.metrica, .kpi, .duas > .painel, .troca, .app-lado > *, .legenda-esc, .grade-wrap, .tb-horas) { animation: sobe-in .5s var(--curva) both; animation-delay: calc(var(--i, 0) * 45ms); }
.view.entra .cab-pagina { animation: sobe-in .45s var(--curva) both; }
.view.entra .fone { animation: fone-in .7s var(--curva) both .1s; }
@keyframes sobe-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes fone-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
/* o dia que acabou de mudar dá um pulo e brilha */
.cel.muda { animation: muda .9s var(--curva) both; }
@keyframes muda { 0% { transform: scale(.7); box-shadow: 0 0 0 0 #4ade80aa; } 45% { transform: scale(1.06); box-shadow: 0 0 0 4px #4ade8055; } 100% { transform: none; box-shadow: 0 0 0 0 #4ade8000; } }
/* trocar de semana desliza na direção certa */
.grade.vai tbody .cel, .grade.vai tbody .cb { animation: vem-dir .38s var(--curva) both; }
.grade.volta tbody .cel, .grade.volta tbody .cb { animation: vem-esq .38s var(--curva) both; }
@keyframes vem-dir { from { opacity: 0; transform: translateX(14px); } }
@keyframes vem-esq { from { opacity: 0; transform: translateX(-14px); } }
/* Semana / Mês inteiro: a pílula desliza */
#modo { position: relative; }
#modo::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0)); border-radius: 7px; background: #2b3930; box-shadow: inset 0 1px 0 #ffffff08; transition: transform .35s var(--curva), width .35s var(--curva); }
#modo button { position: relative; z-index: 1; transition: color .2s; }
#modo button.sel { background: transparent; box-shadow: none; }
/* cartões reagem ao mouse */
@media (hover: hover) and (pointer: fine) {
  .metrica, .kpi { transition: transform .25s var(--curva), border-color .25s; }
  .metrica:hover, .kpi:hover { transform: translateY(-2px); border-top-color: #ffffff22; }
}
/* bolinha de "ao vivo" */
.vivo { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--verde); vertical-align: 1px; animation: vivo 2s ease-out infinite; }
@keyframes vivo { 0% { box-shadow: 0 0 0 0 #22c55e88; } 70%, 100% { box-shadow: 0 0 0 7px #22c55e00; } }
.metrica strong, .kpi strong { font-variant-numeric: tabular-nums; }

/* coluna de hoje e linha sob o mouse, para achar a pessoa e o dia rápido */
.grade td.hj-col { background: #ffffff06; }
@media (hover: hover) and (pointer: fine) {
  .grade tr.pes:hover th.nome { background: #1f1f1f; }
  .grade tr.pes:hover td { background: #ffffff05; }
}

/* ordenar a tabela de horas */
.ordena { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; color: inherit; font: inherit; }
.ordena svg { width: 13px; height: 13px; opacity: .55; }
th[aria-sort="ascending"] .ordena, th[aria-sort="descending"] .ordena { color: var(--text); }
th[aria-sort="ascending"] .ordena svg, th[aria-sort="descending"] .ordena svg { opacity: 1; color: var(--verde-2); }
.tabela th.num .ordena { flex-direction: row-reverse; }
@media (hover: hover) and (pointer: fine) { .ordena:hover { color: var(--text); } }

/* aviso com Desfazer */
#toast { display: flex; align-items: center; gap: 14px; width: max-content; text-align: left; visibility: hidden; transition: transform .45s var(--curva), opacity .3s, visibility 0s .45s; }
#toast.on { visibility: visible; transition-delay: 0s; }
#desfazer { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 9px; background: #ffffff14; color: #fff; font-weight: 600; font-size: 13px; }
#desfazer[hidden] { display: none; }
#desfazer svg { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) { #desfazer:hover { background: #ffffff24; } }

/* pular para o conteúdo (teclado) */
.pular { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 16px; border-radius: 10px; background: var(--verde-fundo); color: #fff; font-weight: 600; text-decoration: none; transform: translateY(-160%); }
.pular:focus { transform: none; }
main:focus, h1[tabindex]:focus { outline: none; }

/* Animação reduzida (opção do Windows/celular): nada se mexe de lugar,
   mas as coisas ainda aparecem e mudam com um esmaecer suave. */
@media (prefers-reduced-motion: reduce) {
  .view.entra :is(.metrica, .kpi, .duas > .painel, .troca, .app-lado > *, .legenda-esc, .grade-wrap, .tb-horas, .cab-pagina, .fone) { animation: esmaece .45s ease both !important; animation-delay: calc(var(--i, 0) * 45ms) !important; }
  .grade.vai tbody :is(.cel, .cb), .grade.volta tbody :is(.cel, .cb), .grade.monta .cel { animation: esmaece .3s ease both !important; }
  .cel.muda { animation: brilha 1.1s ease both !important; }
  .alertas li.novo, .troca.nova { animation: esmaece .6s ease both !important; }
  .cel, .cb, .leg-it, .alertas li, .grade td, #modo button, #desfazer { transition: opacity .25s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease, filter .25s ease !important; }
  #toast { transition: opacity .25s ease, visibility 0s .25s !important; transform: translate(-50%, 0) !important; }
  #toast.on { transition-delay: 0s !important; }
}
@keyframes esmaece { from { opacity: 0; } }
@keyframes brilha { 0% { box-shadow: 0 0 0 0 #4ade8000; } 35% { box-shadow: 0 0 0 3px #4ade80aa; } 100% { box-shadow: 0 0 0 0 #4ade8000; } }

@media (max-width: 700px) { .leg-it { min-height: 34px; padding: 0 8px; gap: 6px; } .legenda-esc { gap: 8px; } }
.leg-abre { display: none; }
@media (max-width: 700px) {
  .leg-tit { display: none; }
  .leg-abre { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border-2); background: #ffffff06; font-size: 13px; color: var(--text); }
  .leg-abre svg { width: 16px; height: 16px; }
  .leg-abre .seta { transition: transform .25s var(--curva); }
  .leg-abre[aria-expanded="true"] .seta { transform: rotate(180deg); }
  .legenda-esc:not(.aberta) .leg-esc { display: none; }
  .legenda-esc.aberta .leg-esc { animation: esmaece .3s ease both; }
}

/* ---------- funcionários ---------- */
.barra-func { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.busca-func { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; max-width: 360px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: #ffffff08; border: 1px solid var(--border-2); color: var(--muted-2); transition: border-color .2s; }
.busca-func:focus-within { border-color: #4ade8077; }
.busca-func svg { width: 17px; height: 17px; flex: none; }
.busca-func input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 16px; color: var(--text); }
.busca-func input::placeholder { color: #8a8a8a; font-size: 14px; }
.filtro-func { display: flex; gap: 6px; flex-wrap: wrap; }
.filtro-func button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border); background: #ffffff04; color: var(--muted); font-size: 12.5px; transition: background-color .2s, color .2s, border-color .2s; }
.filtro-func button em { font-style: normal; font-size: 11px; font-weight: 600; color: #9a9a9a; font-variant-numeric: tabular-nums; }
.filtro-func button[aria-pressed="true"] { background: #2b3930; border-color: #4ade8055; color: #fff; }
.filtro-func button[aria-pressed="true"] em { color: #b4e4c2; }
@media (hover: hover) and (pointer: fine) { .filtro-func button:hover { background: #ffffff0c; color: var(--text); } }
.lista-func-wrap .painel-cab { padding-bottom: 4px; }
.lista-func { list-style: none; padding: 4px 8px 8px; }
.func { display: grid; grid-template-columns: auto minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 10px; border-radius: 12px; transition: background-color .2s; }
.func + .func { box-shadow: 0 -1px 0 #ffffff07; }
@media (hover: hover) and (pointer: fine) { .func:hover { background: #ffffff05; } }
.func.recem { animation: recem 1.6s var(--curva) both; }
@keyframes recem { 0% { background: #22c55e33; } 100% { background: transparent; } }
.func-nome b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.func-nome small, .func-turno small, .func-hoje small { display: block; color: var(--muted-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.func-turno { display: flex; align-items: center; gap: 10px; min-width: 0; }
.func-turno .chip { flex: none; min-width: 0; }
.sit { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: #cfcfcf; }
.sit::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #666; flex: none; }
.sit.verde { color: #95d5a9; } .sit.verde::before { background: var(--verde); box-shadow: 0 0 0 3px #22c55e26; }
.sit.red { color: #fca5a5; } .sit.red::before { background: #ef4444; }
.sit.amber { color: #f1c66b; } .sit.amber::before { background: #f1c66b; }
.func-zap { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #cfcfcf; font-variant-numeric: tabular-nums; white-space: nowrap; }
.func-zap svg { width: 14px; height: 14px; color: var(--muted-2); }
.func-zap .sem { color: var(--muted-2); }
.vazio-func { display: grid; justify-items: center; gap: 12px; padding: 34px 12px; color: var(--muted-2); text-align: center; }
.grade .nm { text-align: left; color: inherit; font: inherit; padding: 4px 0; border-radius: 6px; }
@media (hover: hover) and (pointer: fine) { .grade .nm:hover { color: var(--verde-2); text-decoration: underline; text-underline-offset: 3px; } }

/* ficha (gaveta lateral) */
body.travado { overflow: hidden; }
.gaveta { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; }
.gaveta[hidden] { display: none; }
.gaveta-fundo { position: absolute; inset: 0; background: #000000a8; backdrop-filter: blur(2px); animation: esmaece .25s ease both; }
.gaveta-in { position: relative; width: min(480px, 100%); height: 100%; display: flex; flex-direction: column; background: #131313; border-left: 1px solid var(--border-2); box-shadow: -30px 0 60px -20px #000; animation: entra-dir .38s var(--curva) both; }
@keyframes entra-dir { from { transform: translateX(40px); opacity: 0; } }
@keyframes entra-baixo { from { transform: translateY(30px); opacity: 0; } }
.gaveta-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--border); }
.gaveta-cab h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
.gaveta-corpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px 24px; display: grid; gap: 18px; align-content: start; }
.campo { display: grid; gap: 7px; border: 0; min-width: 0; }
.campo > label, .campo > legend { font-size: 13px; font-weight: 500; color: #dedede; padding: 0; }
.campo > legend { margin-bottom: 7px; }
.campo label small { color: var(--muted-2); font-weight: 400; }
.obrig { color: #fca5a5; }
.campo input:not([type=radio]), .campo select { min-height: 46px; padding: 0 14px; border-radius: 11px; background: #1b1b1b; border: 1px solid var(--border-2); color: var(--text); font-size: 16px; color-scheme: dark; transition: border-color .2s, box-shadow .2s; width: 100%; }
.campo input:focus, .campo select:focus { outline: none; border-color: #4ade80aa; box-shadow: 0 0 0 3px #22c55e22; }
.campo input[aria-invalid="true"] { border-color: #ef4444; box-shadow: 0 0 0 3px #ef444422; }
.campo input::placeholder { color: #7d7d7d; }
.ajuda { font-size: 12px; color: var(--muted-2); }
.erro { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: #fca5a5; }
.erro::before { content: "!"; flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: #ef4444; color: #fff; font: 800 11px/1 "Inter", sans-serif; }
.erro[hidden] { display: none; }
.opcoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.op { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border-2); background: #ffffff04; cursor: pointer; transition: border-color .2s, background-color .2s; }
.op input { accent-color: var(--verde); width: 17px; height: 17px; flex: none; margin: 0; }
.op b { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.op small { display: block; color: var(--muted-2); font-size: 11.5px; margin-top: 1px; }
.op:has(input:checked) { border-color: #4ade8088; background: #1c2a21; }
.op:has(input:focus-visible) { outline: 2px solid var(--verde-2); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .op:hover { border-color: #ffffff30; } }
#op-inicio:has(.dia) { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.op.larga { grid-column: 1 / -1; }
.op.dia { min-height: 44px; padding: 0; justify-content: center; }
.op.dia input { position: absolute; opacity: 0; }
.op.dia b { font-size: 12.5px; }
.nota-op { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: #ffffff05; }
.nota-op svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.previa { padding: 14px; border-radius: 14px; background: #ffffff05; border: 1px solid var(--border); }
.previa-tit { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }
.previa-tit small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; margin-top: 2px; color: #bdbdbd; font-size: 12.5px; }
.previa-dias { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.previa-dias li { display: grid; gap: 4px; text-align: center; }
.previa-dias small { font-size: 10.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; }
.previa-dias .cel { min-height: 36px; border-radius: 8px; cursor: default; transition: background-color .25s, color .25s; }
.previa-dias .cel b { font-size: 11px; }
.previa-dias .cel.folga { box-shadow: inset 0 0 0 1px #ffffff10; }
.gaveta-pe { position: relative; display: flex; align-items: center; gap: 8px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: #131313; }
.gaveta-pe .esp { flex: 1; }
.deslig { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; border-radius: 10px; font-size: 13px; }
.deslig svg, .confirma svg { width: 16px; height: 16px; }
.confirma { position: absolute; inset: 0; display: grid; align-content: center; gap: 10px; padding: 12px 22px; background: #1f1414; border-top: 1px solid #ef444455; animation: esmaece .2s ease both; }
.confirma[hidden] { display: none; }
.confirma p { font-size: 13px; color: #f1d0d0; }
.confirma div { display: flex; gap: 8px; justify-content: flex-end; }
.b-rec.sim { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 10px; background: #b91c1c; border-color: transparent; color: #fff; font-weight: 600; }
.gaveta-pe.confirmando { min-height: 118px; }
.view.entra .lista-func-wrap { animation: sobe-in .5s var(--curva) both .1s; }
@media (max-width: 1150px) { .func { grid-template-columns: auto minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; } .func-zap { display: none; } }
@media (max-width: 700px) {
  .busca-func { max-width: none; }
  .func { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av nome bt" ". turno turno" ". hoje hoje"; row-gap: 6px; }
  .func > .av { grid-area: av; } .func-nome { grid-area: nome; } .func-turno { grid-area: turno; } .func-hoje { grid-area: hoje; } .func > .btn-sec { grid-area: bt; }
  .func > .btn-sec span { display: none; }
  .func-hoje small { white-space: normal; }
  .gaveta-in { width: 100%; border-left: 0; animation-name: entra-baixo; }
  .gaveta-cab, .gaveta-corpo, .gaveta-pe { padding-left: 16px; padding-right: 16px; }
  .opcoes { grid-template-columns: 1fr 1fr; }
  #op-inicio:has(.dia) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gaveta-pe .btn-sec:not(.forte) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gaveta-in, .view.entra .lista-func-wrap, .view.entra .func, .view.entra .barra-func { animation: esmaece .3s ease both !important; }
  .func.recem { animation: recem 1.6s ease both !important; }
  .op, .filtro-func button, .func, .busca-func, .campo input, .campo select { transition: border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease !important; }
}
.deslig[hidden] { display: none; }

/* ---------- unidades ---------- */
.un-wrap { display: block; margin-top: 1px; }
.un-sel { appearance: none; -webkit-appearance: none; max-width: 150px; padding: 2px 18px 2px 0; border: 0; border-radius: 4px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 2px center; color: var(--muted-2); font-size: 11.5px; cursor: pointer; text-overflow: ellipsis; }
.un-sel option { background: #202020; color: #f5f5f5; }
@media (hover: hover) and (pointer: fine) { .un-sel:hover { color: var(--text); } }
.unidade-cel { display: none; }

/* ---------- feriados ---------- */
.grade thead th.feriado small { color: #c4b5fd; }
.grade thead th.feriado span { box-shadow: inset 0 0 0 1px #a78bfa66; }
.grade td.fer-col { background: #a78bfa0c; }
.grade td.fer-col.hj-col { background: #a78bfa14; }
.mini-cob thead th.feriado small { color: #c4b5fd; }
.mk.fer { width: 14px; height: 14px; border-radius: 4px; background: #a78bfa22; box-shadow: inset 0 0 0 1px #a78bfa88; }
.leg-it.fer { border-color: #a78bfa44; }
.alertas li.azul { background: #ffffff04; border-color: #ffffff0a; box-shadow: inset 3px 0 0 #a78bfa; } .alertas li.azul svg { color: #c4b5fd; }

/* ---------- avisou que não pode ---------- */
.cel.indisp { background-image: repeating-linear-gradient(135deg, transparent 0 6px, #ef444426 6px 8px); }
.cel.indisp.folga { color: #fca5a5; }
.cel.indisp::before { content: ""; position: absolute; left: 4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px #00000066; }
.grade[data-filtro="indisp"] .cel.indisp { opacity: 1; filter: none; box-shadow: 0 0 0 1px #ef444499, 0 6px 16px -6px #000; }
.mk.indisp { width: 14px; height: 14px; border-radius: 4px; background: repeating-linear-gradient(135deg, #2a2a2a 0 3px, #ef444466 3px 5px); box-shadow: inset 0 0 0 1px #ef444488; }
.menu-cel .menu-aviso { display: block; margin-top: 6px; padding: 6px 8px; border-radius: 7px; background: #3a1717; color: #fca5a5; font-size: 11.5px; font-style: normal; }
.menu-cel .menu-sec { border: 0; margin: 4px 0 0; padding: 8px 10px 4px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); border-top: 1px solid #ffffff0c; }
.av.mini { width: 24px; height: 24px; font-size: 9.5px; }
.menu-cel { max-height: calc(100dvh - 16px); overflow-y: auto; }

/* ---------- montar à mão ---------- */
#manual.ativo { background: #2b3930; border-color: #4ade8066; color: #fff; }
.pincel-barra { position: sticky; top: 8px; z-index: 20; display: grid; gap: 10px; margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: #171d19f2; border: 1px solid #4ade8044; box-shadow: 0 14px 30px -14px #000; backdrop-filter: blur(6px); animation: esmaece .25s ease both; }
.pincel-barra[hidden] { display: none; }
.pincel-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pincel-cab p b { display: block; font-size: 13.5px; }
.pincel-cab p small { color: var(--muted); font-size: 12px; }
.pincel-fim { display: flex; gap: 8px; }
.pinceis { display: flex; flex-wrap: wrap; gap: 6px; }
.pin { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border-2); background: #ffffff06; color: #dcdcdc; font-size: 13px; font-weight: 500; transition: background-color .2s, border-color .2s, transform .15s; }
.pin[aria-pressed="true"] { background: #f5f5f5; color: #0b0b0b; border-color: #f5f5f5; }
.pin[aria-pressed="true"] .mk { box-shadow: 0 0 0 2px #0b0b0b22; }
.pin:active { transform: scale(.96); }
.grade.pintando .cel { cursor: cell; }
.grade.pintando .cel.folga { box-shadow: inset 0 0 0 1px #ffffff12; }
.cel.nao { animation: nao .4s ease; }
@keyframes nao { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }

/* ---------- arrastar ---------- */
.cel { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cel.fantasma { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; margin: 0; opacity: .95; box-shadow: 0 18px 36px -10px #000, 0 0 0 2px #ffffffaa; transition: none; animation: none; }
.grade.arrastando .cel { transition: box-shadow .15s, opacity .15s; }
.grade.arrastando .cel.origem { opacity: .3; }
.cel.alvo-ok { box-shadow: 0 0 0 2px var(--verde-2), 0 0 18px #22c55e55 !important; }
.cel.alvo-nao { box-shadow: 0 0 0 2px #ef4444aa !important; cursor: not-allowed; }
.grade.arrastando { cursor: grabbing; }

/* ---------- horas: banco e feriados ---------- */
#kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tb-horas td.num small { display: block; color: #8a8a8a; font-size: 11px; white-space: nowrap; }
.banco { font-weight: 600; font-variant-numeric: tabular-nums; }
.banco.b-pos { color: #95d5a9; } .banco.b-neg { color: #fca5a5; }

/* ---------- funcionários: ciente e imprimir ---------- */
.ci { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: #3a301a; color: #f1c66b; }
.ci.ok { background: #1c3826; color: #95d5a9; }
.ci svg { width: 12px; height: 12px; stroke-width: 3; }
.func-acoes { display: flex; align-items: center; gap: 6px; }
.ico-btn.mini-ico { width: 36px; height: 36px; border-radius: 10px; }
.ico-btn.mini-ico svg { width: 16px; height: 16px; }
.imp-pes { justify-self: start; }

/* ---------- celular: ciente e "não posso" ---------- */
.f-ciente { display: flex; align-items: center; gap: 12px; margin: 10px 16px 0; padding: 12px 14px; border-radius: 16px; background: #fff7e6; border: 1px solid #f5d99b; }
.f-ciente > span:not(.f-ci-ico) { flex: 1; min-width: 0; }
.f-ciente b { display: block; font-size: 13.5px; color: #5c3d00; }
.f-ciente small { color: #7a5a1a; font-size: 12px; }
.f-ciente.ok { background: #eefaf2; border-color: #bfe8cc; }
.f-ciente.ok b { color: #145c2f; } .f-ciente.ok small { color: #3f7552; }
.f-ci-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #dcf5e4; color: #16803c; flex: none; }
.f-ci-ico svg { width: 18px; height: 18px; }
.f-ciente-bt { flex: none; min-height: 40px; padding: 0 14px; border-radius: 11px; background: #16803c; color: #fff; font-weight: 700; font-size: 13px; }
.f-ciente:focus { outline: none; }
.f-naoposso { display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 32px); margin: 0 16px 22px; min-height: 46px; border-radius: 14px; border: 1.5px dashed #d9dce2; color: #3d4048; font-weight: 600; font-size: 13.5px; background: #fff; }
.f-naoposso svg { width: 18px; height: 18px; color: #b42318; }
.f-tag.red { background: #fde2e1; color: #9b1c1c; }
.f-diasel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: 190px; overflow-y: auto; }
.f-diasel label { display: grid; text-align: center; padding: 8px 4px; border-radius: 12px; border: 1.5px solid #e6e8ec; cursor: pointer; }
.f-diasel label:has(input:checked) { border-color: #16803c; background: #f0faf3; }
.f-diasel label:has(input:focus-visible) { outline: 2px solid #16803c; outline-offset: 2px; }
.f-diasel input { position: absolute; opacity: 0; pointer-events: none; }
.f-diasel b { font-size: 12px; } .f-diasel small { font-size: 11px; color: #5f636c; }

/* ---------- impressão: documentos próprios (mês, semana, pessoa, horas) ---------- */
.impressao { display: none; }
.menu-impr { width: 270px; }
.menu-impr button { min-height: 50px; }
.menu-impr button svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.btn-sec.gerando { opacity: .7; cursor: progress; }
.btn-sec.gerando svg { animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
@media print {
  html { color-scheme: light !important; } /* sem isso a margem da folha sai preta */
  html, body { background: #fff !important; }
  body > *:not(.impressao) { display: none !important; }
  .impressao { display: block !important; color: #111; font: 9px/1.3 "Inter", Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .d-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 5px; border-bottom: 2px solid #111; margin-bottom: 6px; }
  .d-cab p { font-size: 9.5px; color: #555; }
  .d-cab h1 { font-size: 17px; letter-spacing: -.01em; line-height: 1.15; }
  .d-fer { font-size: 9.5px; color: #5b21b6; font-weight: 600; text-align: right; }
  .d-fer.neutro { color: #333; }
  .d-leg { display: flex; flex-wrap: wrap; gap: 3px 14px; margin: 0 0 6px; font-size: 8px; color: #333; }
  .d-leg span { display: inline-flex; align-items: center; gap: 4px; }
  .d-leg i { display: inline-grid; place-items: center; min-width: 16px; height: 12px; padding: 0 2px; border-radius: 2px; font-style: normal; font-weight: 700; font-size: 7.5px; border: .5pt solid #c9c9cf; }
  .c-t0 { background: #dbeafe; color: #1e3a8a; } .c-t1 { background: #ede9fe; color: #4c1d95; } .c-t2 { background: #dcfce7; color: #14532d; }
  .c-at { background: #fee2e2; color: #991b1b; } .c-fe { background: #fef3c7; color: #92400e; } .c-fol { background: #fff; color: #888; }
  .c-x { background: #fff; color: #111; } .d-leg .c-ferk { background: #f3efff; border-color: #8b5cf6; }

  /* mês e semana */
  .d-grade { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 6px; break-inside: avoid; }
  .d-grade thead { display: table-header-group; }
  .d-grade tr { break-inside: avoid; }
  .d-grade th, .d-grade td { border: .5pt solid #c9c9cf; text-align: center; padding: 0; height: 14px; font-size: 8px; }
  .d-grade col.c-nome { width: 36mm; } .d-grade col.c-tot { width: 11mm; }
  .doc-semana .d-grade col.c-nome { width: 50mm; }
  .d-grade .d-nome { text-align: left; padding: 0 4px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; color: #111; }
  .d-grade .d-nome small { color: #777; font-weight: 400; font-size: 7px; }
  .d-grade thead th { background: #1f2937; color: #fff; font-weight: 600; }
  .d-grade thead th.d-nome { background: #1f2937; color: #fff; }
  .d-grade thead th.fds { background: #4b5563; }
  .d-grade thead th.fer { background: #6d28d9; }
  .d-grade thead th.ds { font-size: 6.5px; font-weight: 500; height: 10px; }
  .d-grade .d-eq th { background: #fff !important; color: #111; text-align: left; font-size: 10px; font-weight: 700; border: 0; padding: 5px 0 2px; height: auto; }
  .d-grade .d-eq small { font-weight: 400; color: #666; font-size: 8.5px; }
  .d-grade .d-tot { width: 11mm; font-weight: 600; }
  .d-grade td { font-weight: 700; }
  .d-grade td.fer { border-left: 1pt solid #8b5cf6; border-right: 1pt solid #8b5cf6; }
  .d-grade td.c-fol.fer { background: #f5f3ff; }
  .d-grade sup { font-size: 6px; margin-left: 1px; vertical-align: top; }
  .d-cob th, .d-cob td { height: 11px; font-size: 7px; color: #555; font-weight: 500; background: #fafafa; }
  .d-cob td.falta { color: #b91c1c; font-weight: 800; background: #fee2e2; }
  .d-ass { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 24px; margin-top: 14px; break-inside: avoid; }
  .d-ass span { display: block; border-bottom: 1px solid #111; height: 22px; }
  .d-ass small { color: #555; font-size: 8px; }
  .d-rod { margin-top: 6px; color: #999; font-size: 7.5px; }
  .doc-semana .d-grade th, .doc-semana .d-grade td { height: 23px; font-size: 10px; }
  .doc-semana .d-grade .d-nome { width: 50mm; font-size: 10.5px; }
  .doc-semana .d-grade thead th.dia { padding: 3px 2px; font-size: 8.5px; font-weight: 500; text-transform: capitalize; }
  .doc-semana .d-grade thead th.dia b { display: block; font-size: 11.5px; font-weight: 700; }
  .doc-semana .d-grade thead th.dia small { display: block; font-size: 7.5px; text-transform: none; }
  .doc-semana .d-grade td b { display: block; font-size: 11px; }
  .doc-semana .d-grade td small { display: block; font-weight: 500; font-size: 8px; opacity: .85; }
  .doc-semana .d-grade td em { font-style: normal; font-weight: 500; }
  .doc-semana .d-cob th, .doc-semana .d-cob td { height: 13px; font-size: 8px; }
  .doc-semana .d-grade .d-eq th { font-size: 10.5px; }
  .doc-semana .d-leg { font-size: 9px; }

  /* uma pessoa */
  .pi-quem { text-align: right; } .pi-quem b { display: block; font-size: 15px; } .pi-quem span { color: #555; font-size: 10px; }
  .pi-cal { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 4px; }
  .pi-cal th { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; padding: 5px 4px; border: .5pt solid #bbb; background: #1f2937; color: #fff; }
  .pi-cal td { height: 23mm; vertical-align: top; padding: 4px 5px; border: .5pt solid #bbb; font-size: 10px; }
  .pi-cal td.fora { background: #f5f5f5; }
  .pi-cal td.fer { outline: 1.5pt solid #8b5cf6; outline-offset: -2pt; }
  .pi-cal td .n { display: block; font-weight: 800; font-size: 13px; }
  .pi-cal td b { display: block; font-size: 10px; } .pi-cal td small { display: block; font-size: 9px; opacity: .8; }
  .pi-cal td em { font-style: normal; color: #888; }
  .pi-cal td .fn { color: #5b21b6; font-weight: 700; opacity: 1; }
  .pi-tot { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 18px; font-size: 11px; } .pi-tot b { font-size: 13px; }
  .pi-ci { margin-top: 10px; color: #14532d; font-size: 10px; }

  /* horas */
  .d-horas { width: 100%; border-collapse: collapse; font-size: 8.5px; margin-top: 4px; }
  .d-horas th { background: #1f2937; color: #fff; font-weight: 600; padding: 5px 4px; text-align: left; border: .5pt solid #1f2937; }
  .d-horas td { padding: 4px; border: .5pt solid #d4d4d8; }
  .d-horas .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .d-horas tbody tr:nth-child(even) td { background: #f9fafb; }
  .d-horas td.b-neg { color: #b91c1c; font-weight: 700; } .d-horas td.b-pos { color: #15803d; font-weight: 700; }
  .d-horas tfoot td { font-weight: 800; background: #e5e7eb; border-top: 1.5pt solid #111; }
  .d-horas tr { break-inside: avoid; }
  .d-notas { margin: 8px 0 0 14px; color: #555; font-size: 8px; }
}

@media (max-width: 700px) {
  .unidade-cel { display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; font-size: 12px; color: var(--muted-2); }
  .unidade-cel select { flex: 1; min-height: 40px; padding: 0 10px; border-radius: 10px; background: #1b1b1b; border: 1px solid var(--border-2); color: var(--text); font-size: 16px; }
  .pincel-barra { top: 4px; padding: 10px; }
  .pincel-cab p small { display: none; }
  .pin { min-height: 36px; padding: 0 11px; font-size: 12.5px; }
  .func-acoes .mini-ico { display: none; }
  .f-diasel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .pincel-barra { animation: esmaece .25s ease both !important; }
  .cel.nao { animation: none !important; outline: 2px solid #ef4444; }
  .pin { transition: background-color .2s ease, border-color .2s ease, color .2s ease !important; }
}
@media (max-width: 700px) { .pinceis { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 10px 2px; } .pinceis::-webkit-scrollbar { display: none; } .pin { flex: none; } .pincel-cab p b { font-size: 13px; } }

/* botões do cabeçalho não quebram o texto no meio; a fila é que quebra */
.cab-pagina .acoes-pg { flex-wrap: wrap; }
.cab-pagina .acoes-pg .btn-sec { white-space: nowrap; }

/* ---------- avisos no celular quando a escala muda ---------- */
.f-notif { position: sticky; top: 8px; z-index: 5; height: 0; margin: 0 10px; }
.f-notif-in { position: relative; display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 11px 36px 11px 12px; border-radius: 20px; background: #ffffffeb; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 12px 30px -8px #0000004d, 0 0 0 1px #0000000d; text-align: left; color: #15161a; animation: desce .5s var(--curva) both; }
@keyframes desce { from { transform: translateY(-120%); opacity: 0; } }
.f-notif-in .f-ico { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; flex: none; }
.f-notif-in small { display: block; font-size: 11px; color: #6b6f78; }
.f-notif-in b { display: block; font-size: 13.5px; margin-top: 1px; }
.f-notif-in span span { display: block; font-size: 12.5px; color: #3d4048; line-height: 1.35; margin-top: 1px; }
.f-notif-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #6b6f78; }
.f-notif-x svg { width: 15px; height: 15px; }
.f-ciente.muda { display: grid; gap: 10px; align-items: stretch; background: #fff7e6; border-color: #f5c66b; }
.f-ciente.muda.pisca { animation: chama-cel 1.2s ease 2; }
@keyframes chama-cel { 50% { box-shadow: 0 0 0 4px #f59e0b55; } }
.f-mudou { list-style: none; display: grid; gap: 6px; margin-top: 6px; }
.f-mudou li { position: relative; padding-left: 14px; font-size: 12.5px; color: #4a3500; line-height: 1.35; }
.f-mudou li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #d97706; }
.f-mudou small { display: block; color: #8a6a2a; font-size: 11px; }
.f-ciente-bt.largo { width: 100%; min-height: 44px; }
.f-hist { list-style: none; margin: 0 12px 20px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px #0000000d; }
.f-hist li { padding: 10px 14px; border-bottom: 1px solid #eef0f3; }
.f-hist li:last-child { border: 0; }
.f-hist b { display: block; font-size: 12.5px; font-weight: 500; color: #15161a; line-height: 1.35; }
.f-hist small { display: block; margin-top: 2px; color: #5f636c; font-size: 11px; }

/* gestor: quem foi avisado e quem já deu ciência */
.troca-avisos { list-style: none; display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: #ffffff05; border: 1px solid var(--border); }
.troca-avisos li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.troca-avisos li > span { flex: 1; min-width: 160px; }
.troca-avisos li b { color: var(--text); font-weight: 600; }
.troca-avisos svg { width: 15px; height: 15px; flex: none; }
.troca-avisos li.falta svg { color: #f1c66b; } .troca-avisos li.ok svg { color: var(--verde-2); }
.troca-avisos li.ok > span { color: #95d5a9; }
.link-cel { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-2); background: #ffffff06; color: #dcdcdc; font-size: 12px; display: inline-flex; align-items: center; text-decoration: none; }
.link-cel.zap { border-color: #25d36655; color: #86efac; }
@media (hover: hover) and (pointer: fine) { .link-cel:hover { background: #ffffff10; } }
@media (prefers-reduced-motion: reduce) {
  .f-notif-in { animation: esmaece .3s ease both !important; }
  .f-ciente.muda.pisca { animation: chama-cel 1.2s ease 2 !important; }
}
