/* Linguagem visual inspirada no iOS/macOS: fonte do sistema, listas agrupadas,
   azul do sistema como única cor de ação, modo escuro automático. */
:root {
  --bg: #f5f5f7; --card: #ffffff; --card-2: #fbfbfd;
  --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #86868b;
  --sep: rgba(60, 60, 67, .13); --fill: rgba(118, 118, 128, .12); --fill-2: rgba(118, 118, 128, .2);
  /* cor de ação: neutra (preto) até a pessoa escolher a empresa */
  --accent: #1d1d1f; --accent-press: #000; --accent-ink: #fff; --accent-text: #1d1d1f; --accent-soft: rgba(0, 0, 0, .06);
  --em: linear-gradient(90deg, #ff5500, #f5a300);
  --green: #34c759; --orange: #ff9500; --red: #ff3b30;
  --bar: rgba(245, 245, 247, .78);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 24px rgba(0, 0, 0, .04);
  /* marcas */
  --oggi: #ff5500; --oggi-deep: #c43d00; --ontrade: #ffdf0e; --ontrade-deep: #8a6a00;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --r: 14px; --r-lg: 22px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000; --card: #1c1c1e; --card-2: #2c2c2e;
    --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #8e8e93;
    --sep: rgba(84, 84, 88, .55); --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .36);
    --accent: #f5f5f7; --accent-press: #fff; --accent-ink: #000; --accent-text: #f5f5f7; --accent-soft: rgba(255, 255, 255, .1);
    --em: linear-gradient(90deg, #ff8a3d, #ffdf0e);
    --green: #30d158; --orange: #ff9f0a; --red: #ff453a;
    --bar: rgba(0, 0, 0, .72); --shadow: none;
    --oggi-deep: #ff8a4c; --ontrade-deep: #ffdf0e;
  }
}

/* tema Oggi Live: laranja e preto */
:root[data-brand=oggi] {
  --accent: #ff5500; --accent-press: #e84d00; --accent-ink: #111; --accent-text: #c43d00; --accent-soft: rgba(255, 85, 0, .1);
  --em: linear-gradient(90deg, #ff6a1a, #ff4500);
}
/* tema Ontrade: amarelo e preto */
:root[data-brand=ontrade] {
  --accent: #ffdf0e; --accent-press: #f2d000; --accent-ink: #111; --accent-text: #1d1d1f; --accent-soft: rgba(255, 223, 14, .2);
}
@media (prefers-color-scheme: dark) {
  :root[data-brand=oggi] { --accent: #ff5f0f; --accent-press: #ff7a33; --accent-text: #ff7a33; --em: linear-gradient(90deg, #ff8a4d, #ff5500); }
  :root[data-brand=ontrade] { --accent-text: #ffdf0e; --em: linear-gradient(90deg, #ffe45c, #ffc400); }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 17px; line-height: 1.47; letter-spacing: -.022em; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-user-select: none; user-select: none; }
.hidden { display: none !important; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1180px; }

/* barra de navegação translúcida */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--sep); }
.nav .in { max-width: 640px; margin: 0 auto; padding: 0 20px; height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav.wide .in { max-width: 1180px; }
.nav-title { font-size: 17px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-chip { font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--fill); border-radius: 99px; padding: 4px 11px; white-space: nowrap; letter-spacing: -.01em; }

/* título grande */
.hero { padding: 36px 0 4px; }
.kicker { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; letter-spacing: -.01em; }
h1 { font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -.035em; margin: 0; }
h1 em { font-style: normal; background: var(--em); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Ontrade no claro: amarelo não se lê como texto, vira marca-texto atrás do preto */
@media (prefers-color-scheme: light) {
  :root[data-brand=ontrade] h1 em { background: linear-gradient(transparent 58%, #ffdf0e 58%, #ffdf0e 92%, transparent 92%); -webkit-background-clip: border-box; background-clip: border-box; color: var(--ink); padding: 0 .06em; margin: 0 -.06em; }
}
/* pontinho da marca no título da barra */
.nav-title::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; transition: background .3s; }
.lede { font-size: 17px; color: var(--ink-2); margin: 12px 0 0; }
.lede span { color: var(--ink-3); }
/* prazo: linha simples com ícone de relógio, como uma legenda do sistema */
.deadline { display: flex; align-items: flex-start; gap: 7px; margin: 16px 0 0; font-size: 15px; font-weight: 600; color: var(--accent-text); letter-spacing: -.01em; }
.deadline:empty { display: none; }
.deadline::before { content: ''; width: 17px; height: 17px; margin-top: 2px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7v5.2l3.3 2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7v5.2l3.3 2'/%3E%3C/svg%3E") center / contain no-repeat; }
.deadline.late { color: var(--orange); }

/* seções e listas agrupadas */
.section { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 8px; }
.section-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; margin: 0; }
.section-head .link { font-size: 15px; }
.group { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.foot-note { font-size: 13px; color: var(--ink-3); padding: 8px 16px 0; margin: 0; letter-spacing: -.005em; }
/* botões de texto: área de toque de 44px sem mudar o visual */
.link { background: none; border: 0; padding: 0 2px; min-height: 44px; display: inline-flex; align-items: center; color: var(--accent-text); cursor: pointer; font-size: 17px; border-radius: 8px; }
.link:active { opacity: .5; }
.section-head .link { margin: -11px -2px; }

/* controle segmentado */
.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--fill); border-radius: 10px; padding: 2px; margin-bottom: 14px; }
.segmented::before { content: ''; position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); background: var(--card); border-radius: 8px; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); transition: transform .3s cubic-bezier(.3,.7,.4,1), opacity .2s; opacity: 0; }
.segmented[data-sel="0"]::before { opacity: 1; transform: translateX(0); }
.segmented[data-sel="1"]::before { opacity: 1; transform: translateX(100%); }
@media (prefers-color-scheme: dark) { .segmented::before { background: #636366; } }
.segmented[data-sel="0"]::before { background: var(--oggi); }
.segmented[data-sel="1"]::before { background: var(--ontrade); }
.segmented::before { transition: transform .3s cubic-bezier(.3,.7,.4,1), opacity .2s, background .3s; }
.segmented button[aria-pressed=true] { color: #111; }
.segmented button { position: relative; z-index: 1; border: 0; background: none; min-height: 40px; padding: 0 8px; font-size: 15px; font-weight: 500; cursor: pointer; border-radius: 8px; color: var(--ink); }
.segmented button[aria-pressed=true] { font-weight: 600; }

/* campos estilo Ajustes */
.row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 16px; position: relative; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.row label { width: 76px; flex: none; font-size: 17px; }
.row input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 17px; padding: 0; min-height: 50px; color: var(--ink); -webkit-appearance: none; appearance: none; border-radius: 0; }
.row input::placeholder { color: var(--ink-3); opacity: .7; }
.row input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--card) inset; -webkit-text-fill-color: var(--ink); caret-color: var(--ink); }
.row:focus-within label { color: var(--accent-text); }

/* cartão "respondendo como" */
.me { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(180deg, #a1a1aa, #71717a); color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 600; flex: none; letter-spacing: 0; }
/* avatar: preto das marcas com as iniciais na cor de cada uma */
.avatar.oggi, .avatar.ontrade { background: #111; }
.avatar.oggi { color: var(--oggi); }
.avatar.ontrade { color: var(--ontrade); }
@media (prefers-color-scheme: dark) { .avatar.oggi, .avatar.ontrade { background: #2c2c2e; } }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { display: block; color: var(--ink-2); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* dias */
.day { position: relative; }
.day + .day::before { content: ''; position: absolute; top: 0; left: 76px; right: 0; border-top: .5px solid var(--sep); z-index: 1; }
.day-main { width: 100%; display: flex; align-items: center; gap: 14px; background: none; border: 0; padding: 12px 16px; text-align: left; cursor: pointer; transition: background .15s; }
.day-main:active { background: var(--fill); }
.cal { width: 46px; height: 50px; border-radius: 11px; background: var(--card-2); box-shadow: inset 0 0 0 .5px var(--sep); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; transition: background .2s, box-shadow .2s; }
.cal small { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--red); line-height: 1; }
.cal b { font-size: 23px; font-weight: 500; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dtxt { flex: 1; min-width: 0; }
.dtxt b { display: block; font-weight: 500; font-size: 17px; }
.dtxt small { display: block; color: var(--ink-2); font-size: 14px; letter-spacing: -.01em; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--fill-2); display: grid; place-items: center; flex: none; transition: background .2s, border-color .2s, transform .2s cubic-bezier(.3,.7,.4,1.4); color: var(--accent-ink); }
.check svg { opacity: 0; transform: scale(.5); transition: all .2s cubic-bezier(.3,.7,.4,1.4); }
.day.on .check { background: var(--accent); border-color: var(--accent); }
.day.on .check svg { opacity: 1; transform: none; }
.day.on .cal { background: var(--accent); box-shadow: none; color: var(--accent-ink); }
.day.on .cal small { color: inherit; opacity: .7; }
.day-extra { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s cubic-bezier(.3,.7,.4,1); }
.day.on .day-extra { grid-template-rows: 1fr; }
.day-extra > div { overflow: hidden; }
.sub-rows { margin: 0 16px 12px 76px; background: var(--bg); border-radius: 12px; }
@media (prefers-color-scheme: dark) { .sub-rows { background: var(--card-2); } }
.sub-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; min-height: 52px; position: relative; }
.sub-row + .sub-row::before { content: ''; position: absolute; top: 0; left: 12px; right: 0; border-top: .5px solid var(--sep); }
.sub-row .t b { display: block; font-weight: 500; font-size: 15px; line-height: 1.3; }
.sub-row .t small { display: block; color: var(--orange); font-size: 13px; font-weight: 600; }
.sub-row .t span { font-size: 15px; white-space: nowrap; }
@media (max-width: 520px) { .sub-rows { margin-left: 16px; } }

/* interruptor iOS */
.switch { position: relative; width: 51px; height: 31px; border-radius: 99px; background: var(--fill-2); border: 0; padding: 0; cursor: pointer; flex: none; transition: background .25s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06); transition: transform .25s cubic-bezier(.3,.7,.4,1); }
.switch[aria-checked=true] { background: var(--accent); }
:root:not([data-brand]) .switch[aria-checked=true], :root[data-brand=""] .switch[aria-checked=true] { background: var(--green); }
.switch[aria-checked=true]::after { transform: translateX(20px); }

/* stepper iOS */
.stepper { display: flex; align-items: center; background: var(--fill); border-radius: 10px; height: 36px; flex: none; }
.stepper button { width: 46px; height: 44px; margin: -4px 0; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); border-radius: 10px; touch-action: manipulation; }
.stepper button:active { background: var(--fill-2); }
.stepper button:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
.stepper output { min-width: 26px; text-align: center; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; border-left: .5px solid var(--sep); border-right: .5px solid var(--sep); line-height: 18px; }

.quick { display: flex; column-gap: 20px; padding: 2px 4px 0; flex-wrap: wrap; }
.quick .link { font-size: 15px; }
.guest-row { cursor: pointer; }

/* barra de ação fixa */
.dock-space { height: 140px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep); padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
.dock .in { max-width: 600px; margin: 0 auto; }
.cta { width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 17px; font-weight: 600; cursor: pointer; transition: background .3s, color .3s, transform .1s, opacity .2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cta:active { background: var(--accent-press); transform: scale(.985); }
.cta:disabled { background: var(--fill-2); color: var(--ink-3); cursor: default; transform: none; }
.cta small { font-weight: 400; opacity: .8; font-size: 15px; }
.error { color: var(--red); font-size: 14px; text-align: center; margin: 0 0 10px; font-weight: 500; }

.foot { text-align: center; color: var(--ink-3); font-size: 13px; padding: 48px 0 0; }
.foot b { color: var(--ink-2); font-weight: 600; }
.foot .heart { color: var(--red); }

/* confirmação: cartão estilo Wallet */
.done { padding: 40px 0 40px; }
.badge { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin-bottom: 20px; box-shadow: 0 8px 24px color-mix(in srgb, var(--green) 35%, transparent); }
.pass { margin-top: 28px; border-radius: var(--r-lg); overflow: hidden; background: var(--card); box-shadow: 0 2px 6px rgba(0,0,0,.05), 0 18px 50px rgba(0,0,0,.08); }
/* passe: preto da marca, brilho suave no canto inferior e faixa da cor da empresa na base;
   o logo fica sempre sobre o preto, com contraste total */
.pass-top { padding: 22px 22px 20px; color: #fff; background: radial-gradient(90% 120% at 0% 100%, rgba(255, 85, 0, .38), transparent 70%), #111; border-bottom: 5px solid #ff5500; }
.pass-top .val { color: #fff; padding-right: 96px; }
.pass-top.ontrade { background: radial-gradient(90% 120% at 0% 100%, rgba(255, 223, 14, .28), transparent 70%), #111; border-bottom-color: #ffdf0e; }
.pass-top .lbl { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.pass-top .val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.pass-top .meta { display: flex; justify-content: space-between; margin-top: 18px; gap: 12px; }
.pass-top .meta div { font-size: 15px; font-weight: 600; }
.pass ul { list-style: none; margin: 0; padding: 4px 0; }
.pass li { display: flex; align-items: center; gap: 14px; padding: 12px 22px; position: relative; }
.pass li + li::before { content: ''; position: absolute; top: 0; left: 22px; right: 0; border-top: .5px solid var(--sep); }
.pass li .cal { width: 40px; height: 44px; }
.pass li .cal b { font-size: 19px; }
.pass li .t { flex: 1; font-weight: 500; }
.pass li .g { font-size: 14px; font-weight: 600; color: var(--orange); }
.btn-secondary { display: block; width: 100%; margin-top: 20px; height: 50px; border: 0; border-radius: 14px; background: var(--fill); color: var(--accent-text); font-size: 17px; font-weight: 500; cursor: pointer; }
.btn-secondary:active { background: var(--fill-2); }

/* fechado */
.closed-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink-2); margin-bottom: 22px; }

/* telas maiores */
@media (min-width: 740px) {
  .hero { padding-top: 64px; }
  h1 { font-size: 48px; letter-spacing: -.04em; }
  .lede { font-size: 19px; }
  .section { margin-top: 44px; }
}

/* entalhe/ilha do iPhone deitado */
.wrap, .nav .in, .dock { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* teclado aberto no celular: a barra fixa some para não cobrir o campo */
body.typing .dock { transform: translateY(110%); }
.dock { transition: transform .2s ease; }

/* telas estreitas (iPhone SE, Androids compactos) */
@media (max-width: 360px) {
  .wrap, .nav .in, .dock { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  h1 { font-size: 30px; }
  .row label { width: 64px; font-size: 16px; }
  .row input { font-size: 16px; }
  .day-main { gap: 12px; padding: 12px 14px; }
  .day + .day::before { left: 72px; }
  .sub-rows { margin: 0 12px 12px; }
  .pill-chip { display: none; }
}

/* PC: mouse e teclado */
@media (hover: hover) and (pointer: fine) {
  .day-main:hover { background: var(--fill); }
  .day.on .day-main:hover { background: transparent; }
  .link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .cta:not(:disabled):hover { background: var(--accent-press); }
  .btn:hover { background: var(--fill-2); }
  .btn.solid:hover { background: var(--accent-press); }
  .btn-secondary:hover { background: var(--fill-2); }
  .segmented button:not([aria-pressed=true]):hover { color: var(--ink-2); }
  .stepper button:not(:disabled):hover { background: var(--fill-2); }
}
:focus { outline: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.row input:focus-visible { outline: none; }
.day-main:focus-visible { outline-offset: -3px; border-radius: var(--r); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ---------- painel da recepção ---------- */
.admin-hero { padding: 40px 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.admin-hero h1 { font-size: 40px; }
.sub { color: var(--ink-2); margin: 6px 0 0; font-size: 15px; }
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px; margin-top: 20px; }
.login-box { margin-top: 28px; }
.login-box .row label { width: 70px; }
.login-box .cta { margin-top: 16px; }
.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.bar .grp { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; margin: 0; }
.btn { height: 36px; padding: 0 16px; border-radius: 99px; border: 0; background: var(--fill); color: var(--accent-text); font-weight: 500; cursor: pointer; font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.btn:active { background: var(--fill-2); }
.btn.solid { background: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--red); }
select.select { height: 36px; padding: 0 34px 0 14px; border-radius: 99px; border: 0; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; font-size: 16px; font-weight: 500; cursor: pointer; color: var(--ink); }
.tabs { display: inline-grid; grid-auto-flow: column; background: var(--fill); border-radius: 10px; padding: 2px; margin-top: 28px; }
.tab { border: 0; background: none; padding: 7px 18px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.tab.on { background: var(--card); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); font-weight: 600; }
@media (prefers-color-scheme: dark) { .tab.on { background: #636366; } }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 20px; }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--fill-2); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.tab-count:empty { display: none; }
.arch-note { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-top: 20px; padding: 6px 16px; border-radius: var(--r); background: color-mix(in srgb, var(--orange) 12%, var(--card)); color: var(--ink); font-size: 15px; font-weight: 500; }
.arch-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-top: .5px solid var(--sep); }
.arch-row.on .arch-dates b { color: var(--accent-text); }
.arch-dates { flex: 1; min-width: 0; }
.arch-dates b { display: block; font-weight: 600; }
.arch-dates span { color: var(--ink-2); font-size: 14px; }
.tile.total { background: var(--accent); color: var(--accent-ink); }
.tile.total .dt, .tile.total .x { color: inherit; opacity: .7; }
.tile { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; }
.tile .d { font-weight: 600; font-size: 15px; }
.tile .dt { font-size: 13px; color: var(--ink-3); }
.tile .n { font-size: 44px; font-weight: 700; line-height: 1; margin: 16px 0 8px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tile .x { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.tbl-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: .5px solid var(--sep); }
th { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td.c, th.c { text-align: center; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: rgba(255, 85, 0, .12); color: var(--oggi-deep); white-space: nowrap; }
.pill.ont { background: rgba(255, 223, 14, .28); color: var(--ink); }
.yes { color: var(--green); font-weight: 700; }
.empty { text-align: center; color: var(--ink-3); padding: 36px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) {
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { padding: 14px; } .tile .n { font-size: 36px; margin-top: 10px; }
  .admin-hero h1 { font-size: 34px; }
  .admin-hero .select { width: 100%; height: 44px; }
  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .tab { padding: 7px 6px; }
  .arch-row { flex-wrap: wrap; }
  .arch-dates { flex-basis: 100%; }
  .arch-row .btn { flex: 1; justify-content: center; height: 40px; }
  .tab { min-height: 36px; }
  .card { padding: 18px; } .tbl-wrap { margin: 0 -18px; padding: 0 18px; }
  .card > .bar { flex-direction: column; align-items: stretch; }
  .card > .bar .grp { display: grid; grid-template-columns: 1fr; }
  .card > .bar .grp .btn, .card > .bar > .btn { justify-content: center; height: 44px; }
  #tbl td, #tbl th { white-space: nowrap; }
}

/* lista da semana (impressão) */
.plist-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.plist-eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.plist-title { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.plist-meta { font-size: 12px; color: var(--ink-2); text-align: right; line-height: 1.5; }
.ptable { table-layout: fixed; font-size: 14px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ptable col.cn { width: 4%; } .ptable col.cname { width: 27%; } .ptable col.cmail { width: 25%; }
.ptable col.cco { width: 9%; } .ptable col.cday { width: 7%; }
.ptable th { padding: 10px 8px; border-bottom: 1px solid var(--ink); color: var(--ink); }
.ptable th small { display: block; font-weight: 400; color: var(--ink-3); text-transform: none; font-size: 11px; letter-spacing: 0; }
.ptable td { padding: 8px; border-bottom: .5px solid var(--sep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptable tbody tr:nth-child(even) td { background: var(--bg); }
.ptable td.n { color: var(--ink-3); font-size: 12px; }
.ptable td.nm { font-weight: 600; }
.ptable td.em, .ptable td.co { color: var(--ink-2); font-size: 13px; }
.ptable .ok { font-weight: 700; color: var(--accent); }
.ptable .gst { font-size: 11px; font-weight: 700; color: var(--orange); margin-left: 2px; }
.ptable tfoot td { border-bottom: 0; font-weight: 600; font-size: 13px; }
.ptable tfoot tr:first-child td { border-top: 1.5px solid var(--ink); padding-top: 10px; }
.ptable tfoot tr.grand td { font-size: 15px; font-weight: 700; }

@page { size: A4 portrait; margin: 16mm 14mm 16mm; }
@media print {
  :root { --bg: #f2f2f2; --ink: #000; --ink-2: #333; --ink-3: #666; --sep: #bbb; --accent: #000; --orange: #000; }
  html, body { background: #fff; color: #000; font-size: 11px; }
  .noprint, .nav, .tabs { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .card { box-shadow: none; padding: 0; margin: 0; border-radius: 0; }
  #view-over { display: none !important; }
  #view-print { display: block !important; }
  .ptable { font-size: 9.5pt; line-height: 1.3; }
  .ptable td { padding: 6px 8px; border-bottom: 1px solid #ccc; }
  .ptable th { padding: 8px; }
  .ptable tfoot td { padding: 6px 8px; }
  .ptable thead { display: table-header-group; }
  .ptable tr { break-inside: avoid; }
  .plist-title { font-size: 18pt; }
}

/* logo da empresa na barra superior (public/logo-oggi.png e public/logo-ontrade.png) */
.nav-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-logo { height: 26px; width: auto; max-width: 96px; object-fit: contain; display: block; }
.nav-logo[alt="Ontrade"] { border-radius: 6px; }
.nav-logo:not(.hidden) + .nav-title::before { display: none; }

/* Ontrade: chave ligada = amarelo com bolinha preta, como o símbolo do logo */
:root[data-brand=ontrade] .switch[aria-checked=true]::after { background: #111; }

/* logo no topo: com logo, a barra mostra "logo | Almoço" sem repetir o nome da empresa */
.nav-logo { height: 36px; max-width: 120px; border-radius: 0; }
.nav-logo:not(.hidden) + .nav-title { border-left: .5px solid var(--sep); padding-left: 10px; }
.nav-logo:not(.hidden) + .nav-title .co-name { display: none; }
@media (max-width: 360px) { .nav-logo { height: 32px; } }
/* logo no cartão final (sempre a versão para fundo escuro) */
.pass-top { position: relative; }
.pass-logo { position: absolute; top: 18px; right: 20px; height: 40px; width: auto; }
.pass-logo:not([src]) { display: none; }

/* ---------- painel: conta e usuários ---------- */
.nav-actions { display: flex; align-items: center; gap: 8px; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border: 0; border-radius: 99px; background: var(--fill); cursor: pointer; font-size: 15px; font-weight: 500; }
.me-chip:active { background: var(--fill-2); }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; background: #111; color: #fff; }
.avatar.sm.super { background: linear-gradient(135deg, #ff5500, #ffdf0e); color: #111; }
@media (prefers-color-scheme: dark) { .avatar.sm { background: #3a3a3c; } }
.user-row .avatar.sm { width: 40px; height: 40px; font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.group.flat { box-shadow: none; background: var(--bg); }
@media (prefers-color-scheme: dark) { .group.flat { background: var(--card-2); } }
.split { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
.split > .card { margin-top: 20px; }
.card.narrow { max-width: 520px; }
.card .me { padding: 0 0 4px; }
.cred { margin-top: 20px; padding: 18px; border-radius: var(--r); background: color-mix(in srgb, var(--green) 10%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 35%, transparent); }
.cred-title { margin: 0; font-weight: 700; font-size: 17px; }
.cred dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 16px; font-size: 15px; }
.cred dt { color: var(--ink-2); }
.cred dd { margin: 0; font-weight: 600; word-break: break-all; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .02em; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: .5px solid var(--sep); flex-wrap: wrap; }
.user-row:first-child { border-top: 0; }
.user-who { flex: 1; min-width: 160px; }
.user-who b { display: block; font-weight: 600; }
.user-who b small { font-weight: 400; color: var(--ink-3); }
.user-who span { color: var(--ink-2); font-size: 14px; word-break: break-all; }
.role { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.role.superadmin { background: #111; color: #ffdf0e; }
.user-actions { display: flex; gap: 8px; }
.must { margin-bottom: 18px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--orange) 14%, var(--card)); font-weight: 500; font-size: 15px; }
.ok-msg { color: var(--green); font-weight: 600; font-size: 14px; margin: 0; text-align: center; }
.stack .error { margin: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 560px) {
  .me-chip span:last-child { display: none; }
  .me-chip { padding: 0 4px; }
  .user-actions { width: 100%; }
  .user-actions .btn { flex: 1; justify-content: center; height: 40px; }
  .tabs { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
}

/* ---------- PC: duas colunas ----------
   esquerda fixa (pergunta, prazo, quem é você) · direita (dias + confirmar) */
@media (min-width: 1000px) {
  main.wrap { max-width: 1120px; }
  .nav .in { max-width: 1120px; }
  #form:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); column-gap: 72px; align-items: start; }
  .col-a { position: sticky; top: 52px; padding-bottom: 48px; }
  .col-b { padding-top: 64px; }
  .col-b > .section:first-child { margin-top: 0; }
  .dock { position: sticky; bottom: 0; z-index: 5; padding: 18px 0 22px; margin-top: 6px; border-top: 0; background: linear-gradient(to top, var(--bg) 72%, transparent); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .dock .in { max-width: none; }
  .dock-space { display: none; }
  .col-b .foot { padding-top: 16px; padding-bottom: 40px; }
  body.typing .dock { transform: none; }
  #done, #closed { max-width: 640px; margin: 0 auto; }
}

/* aviso de lista fechada / reaberta no painel */
.open-note { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-top: 20px; padding: 12px 12px 12px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); font-size: 15px; font-weight: 500; }
.open-note::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.open-note span { flex: 1; min-width: 200px; }
.open-note.is-open { background: color-mix(in srgb, var(--green) 10%, var(--card)); }
.open-note.is-open::before { background: var(--green); }
.open-note:not(.is-open) .btn { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 560px) { .open-note .btn { width: 100%; justify-content: center; height: 44px; } }

/* dia de feriado: bloqueado */
.day.holiday .day-main { cursor: default; }
.day.holiday .day-main:active, .day.holiday .day-main:hover { background: transparent; }
.day.holiday .cal { opacity: .45; }
.day.holiday .dtxt b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.day.holiday .dtxt small { color: var(--ink-2); }
.holiday-tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--fill); color: var(--ink-2); flex: none; }
.tile.off { background: var(--fill); box-shadow: none; }
.tile.off .n { color: var(--ink-3); font-size: 22px; margin-top: 26px; }
.hol-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: .5px solid var(--sep); }
.hol-row:first-child { border-top: 0; }
.hol-row .hd { flex: 1; min-width: 0; }
.hol-row .hd b { display: block; font-weight: 600; }
.hol-row .hd span { color: var(--ink-2); font-size: 14px; }
.hol-form { display: grid; grid-template-columns: 170px 1fr auto; gap: 10px; margin: 16px 0 8px; }
.hol-form input { height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 16px; min-width: 0; }
@media (prefers-color-scheme: dark) { .hol-form input { background: var(--card-2); color-scheme: dark; } }
.hol-form .btn { height: 44px; }
@media (max-width: 560px) { .hol-form { grid-template-columns: 1fr; } .hol-form .btn { justify-content: center; } }

td.muted { color: var(--ink-3); }

/* convidados: uma linha de opções, um toque */
.guests { margin: 0 16px 14px 76px; }
.g-chips { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 6px; }
.g-chips button { height: 40px; border: 0; border-radius: 10px; background: var(--fill); color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; touch-action: manipulation; }
.g-chips button:active { background: var(--fill-2); }
.g-chips button[aria-checked=true] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.g-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 15px; }
.g-note { margin: 10px 2px 0; font-size: 13px; color: var(--ink-2); }
.g-note b { color: var(--orange); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .g-chips button:not([aria-checked=true]):hover { background: var(--fill-2); } }
@media (max-width: 520px) { .guests { margin-left: 16px; } }
@media (max-width: 360px) { .guests { margin: 0 12px 12px; } .g-chips { gap: 4px; } .g-chips button { font-size: 14px; } }

/* convidados: "Só eu | Com convidado" (mesmo componente do seletor de empresa, sem cor de marca) */
.g-seg { margin: 0; }
.g-seg[data-sel]::before { background: var(--card); }
.g-seg[data-sel="1"]::before { background: var(--accent); }
@media (prefers-color-scheme: dark) { .g-seg[data-sel="0"]::before { background: #636366; } }
.g-seg button { font-size: 15px; color: var(--ink-2); }
.g-seg button[aria-checked=true] { color: var(--ink); font-weight: 600; }
.g-seg[data-sel="1"] button[aria-checked=true] { color: var(--accent-ink); }

/* celular: o botão fixo fica guardado até haver dia marcado, e sobe quando há o que confirmar */
.dock { transition: transform .32s cubic-bezier(.3,.7,.4,1); }
.dock.idle { transform: translateY(110%); }
@media (min-width: 1000px) { .dock.idle { transform: none; } }

/* WhatsApp no painel e na lista impressa */
.ptable col.cn { width: 4%; } .ptable col.cname { width: 23%; } .ptable col.cmail { width: 21%; }
.ptable col.cwa { width: 13%; } .ptable col.cco { width: 9%; } .ptable col.cday { width: 6%; }
.ptable td.wa { font-size: 13px; font-variant-numeric: tabular-nums; }
.wa-link { color: var(--ink); text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wa-link::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #25d366; margin-right: 6px; vertical-align: 1px; }
.wa-link:hover { text-decoration: underline; }
.me .who span + span { margin-top: 1px; }
/* rótulos dos campos cabem "WhatsApp" em qualquer tela */
.row label { width: 86px; }
@media (max-width: 360px) { .row label { width: 78px; } }

/* ---------- PC e notebook: tudo em uma tela, sem rolar ----------
   O convidado fica na mesma linha do dia, então a lista não cresce ao marcar. */
.guest-note { display: none; }
@media (min-width: 1000px) {
  main.wrap { max-width: 1200px; }
  .nav .in { max-width: 1200px; }
  #form:not(.hidden) { grid-template-columns: minmax(0, 1fr) minmax(0, 620px); column-gap: 64px; align-items: center; min-height: calc(100vh - 53px); }
  .col-a { position: static; padding: 28px 0; }
  .col-b { padding: 28px 0 8px; }
  .hero { padding-top: 0; }
  h1 { font-size: clamp(34px, 3.3vw, 46px); }
  .lede { font-size: 17px; margin-top: 10px; }
  .deadline { margin-top: 12px; }
  .section { margin-top: 26px; }
  .col-b > .section:first-child { margin-top: 0; }
  .segmented { margin-bottom: 10px; }
  .row { min-height: 46px; } .row input { min-height: 46px; }
  .foot-note { padding-top: 6px; }

  /* linha do dia com o convidado ao lado */
  .day { position: relative; }
  .day-main { padding: 9px 16px; }
  .day.on .day-main { padding-right: 340px; }
  .day-extra { display: none; }
  .day.on .day-extra { display: flex; align-items: center; position: absolute; top: 0; bottom: 0; right: 54px; }
  .day-extra > div { overflow: visible; }
  .guests { display: flex; align-items: center; gap: 8px; margin: 0; }
  .g-seg { width: 186px; }
  .g-seg button { min-height: 34px; font-size: 14px; }
  .g-more { margin: 0; }
  .g-more > span, .g-note { display: none !important; }
  .g-more .stepper { height: 34px; }
  .g-more .stepper button { height: 40px; width: 38px; }
  .guest-note { display: block; margin: 6px 4px 0; font-size: 14px; color: var(--ink-2); }
  .guest-note.hidden { display: none; }
  .guest-note b { color: var(--orange); font-weight: 600; }
  .quick { padding-top: 0; }

  .dock { position: static; padding: 12px 0 0; margin: 0; background: none; }
  .col-b .foot { padding: 14px 0 0; }
}
@media (min-width: 1000px) {
  /* ✓ sempre na ponta direita; convidado entre o texto e o ✓ */
  .day-main { position: relative; }
  .day-main .check { position: absolute; right: 16px; top: 50%; margin-top: -13px; }
  .day-main { padding-right: 58px; }
  .day.on .day-main { padding-right: 400px; }
  .holiday-tag { margin-right: 0; }
  .day.holiday .day-main { padding-right: 16px; }
  .g-seg { width: 222px; }
  .g-seg button { white-space: nowrap; padding: 0 6px; }
}
@media (min-width: 1000px) {
  /* seletor sempre alinhado na mesma coluna; o contador ocupa o espaço ao lado */
  .guests { width: 336px; justify-content: flex-start; }
}
@media (min-width: 1000px) {
  /* confirmação em duas colunas: mensagem à esquerda, cartão à direita */
  #done:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: 72px; align-content: center;
    max-width: 1100px; min-height: calc(100vh - 53px); padding: 24px 0; }
  #done > .badge, #done > h1, #done > .lede, #done > #again { grid-column: 1; }
  #done > .pass { grid-column: 2; grid-row: 1 / span 4; align-self: center; margin-top: 0; }
  #done > #again { justify-self: start; width: auto; padding: 0 24px; margin-top: 24px; }
  #done > .foot { grid-column: 1 / -1; padding-top: 24px; }
}
@media (min-width: 1000px) {
  #done:not(.hidden) { grid-template-rows: 1fr auto auto auto auto 1fr auto; }
  #done > .badge { grid-row: 2; margin-bottom: 18px; }
  #done > h1 { grid-row: 3; }
  #done > .lede { grid-row: 4; max-width: 460px; }
  #done > #again { grid-row: 5; }
  #done > .pass { grid-row: 1 / 7; }
  #done > .foot { grid-row: 7; }
}

/* ---------- lista impressa: por empresa, nomes grandes ---------- */
.ptable col.cn { width: 5%; } .ptable col.cname { width: 34%; } .ptable col.cmail { width: 22%; }
.ptable col.cwa { width: 14%; } .ptable col.cday { width: 5%; }
.ptable td.nm { font-size: 16px; font-weight: 600; color: var(--ink); }
.ptable td.n { font-size: 13px; }
.ptable td.em { font-size: 12.5px; }
.ptable td.wa { font-size: 13px; }
.ptable td.c .ok { font-size: 16px; }
.pgroup { margin-top: 22px; }
.pgroup-title { display: flex; align-items: baseline; gap: 10px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.pgroup-title small { font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.co-dot { width: 12px; height: 12px; border-radius: 50%; align-self: center; flex: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.co-dot.oggi { background: #ff5500; }
.co-dot.ontrade { background: #ffdf0e; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.ptable tfoot tr.sub td { border-top: 1.5px solid var(--ink); font-weight: 700; font-size: 14px; padding-top: 9px; }
.ptable td small { font-weight: 500; font-size: 11px; color: var(--ink-2); }
.ptotals { margin-top: 26px; break-inside: avoid; }
.ptotals .ptable tr:first-child td { border-top: 2px solid var(--ink); padding-top: 10px; }
.ptotals .ptable td { font-weight: 600; background: none !important; }
.ptotals .ptable tr.grand td { font-size: 16px; font-weight: 800; }
@media print {
  .pgroup.newpage { break-before: page; page-break-before: always; margin-top: 0; }
  .pgroup-title { font-size: 17pt; }
  .ptable { font-size: 10pt; line-height: 1.3; }
  .ptable td { padding: 6px 8px; }
  .ptable td.nm { font-size: 12pt; }
  .ptable td.em { font-size: 9pt; }
  .ptable td.wa, .ptable td.n { font-size: 9.5pt; }
  .ptable td.c .ok { font-size: 12pt; }
  .ptotals .ptable tr.grand td { font-size: 12pt; }
}
/* larguras: nome grande, WhatsApp e dias sem cortar */
.ptable col.cn { width: 4%; } .ptable col.cname { width: 31%; } .ptable col.cmail { width: 18%; }
.ptable col.cwa { width: 17%; } .ptable col.cday { width: 6%; }
.ptable td.c, .ptable th.c { padding-left: 3px; padding-right: 3px; }
.ptable td.wa { padding-left: 6px; padding-right: 4px; }
.ptable td.c .gst { margin-left: 1px; }
@media print { .ptable td.c, .ptable th.c { padding-left: 2px; padding-right: 2px; } }

/* nome nunca é cortado: quebra em duas linhas se precisar */
.ptable td.nm { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }

/* subtotal: número em cima, convidados embaixo */
.ptable tfoot tr.sub td.c { white-space: normal; overflow: visible; line-height: 1.1; }
.ptable tfoot tr.sub td.c small { display: block; margin-top: 2px; }

/* impressão sem e-mail/WhatsApp: nome largo, coluna Semana e resumo por empresa */
.ptable col.cn { width: 5%; } .ptable col.cname { width: 48%; } .ptable col.cday { width: 7.4%; } .ptable col.ctot { width: 10%; }
.ptable td.nm { font-size: 17px; }
.ptable td.wk { font-weight: 700; border-left: 1px solid var(--line-2, var(--sep)); }
.ptable th.c:last-child { border-left: 1px solid var(--line-2, var(--sep)); }
.ptable td small { display: block; font-size: 10.5px; font-weight: 500; color: var(--ink-2); margin-top: 1px; }
.ptable td .co-dot { display: inline-block; margin-right: 8px; vertical-align: 1px; width: 10px; height: 10px; }
.psum { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin: 16px 0 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.psum-item { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border: 1px solid var(--sep); border-radius: 12px; }
.psum-item .co-dot { align-self: center; }
.psum-item span { font-weight: 600; }
.psum-item b { margin-left: auto; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.psum-item small { color: var(--ink-2); font-size: 12px; }
.psum-item.total { background: #111; color: #fff; border-color: #111; }
.psum-item.total small { color: rgba(255,255,255,.75); }
.ptotals .pgroup-title { font-size: 18px; margin-bottom: 4px; }
@media print {
  .ptable td.nm { font-size: 13pt; }
  .ptable td.wk { font-size: 11pt; }
  .psum-item b { font-size: 18pt; }
  .psum-item { padding: 8px 12px; }
  .ptable td small { font-size: 7.5pt; }
}

/* ---------- prévia da impressão como folha A4 na tela ---------- */
#view-print .card { background: var(--fill); box-shadow: none; }
#sheets { overflow-x: auto; padding: 4px 0 8px; }
@media screen {
  #sheets .plist {
    /* cores fixas de papel, mesmo no modo escuro */
    --ink: #111; --ink-2: #555; --ink-3: #888; --sep: #d6d6d6; --bg: #f2f2f2; --card: #fff;
    width: 210mm; min-height: 297mm; margin: 0 auto; padding: 16mm 14mm; background: #fff; color: #111;
    box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 18px 50px rgba(0,0,0,.12); border-radius: 2px;
  }
  #sheets .pgroup.newpage { margin-top: 18mm; padding-top: 10mm; border-top: 1.5px dashed #bbb; position: relative; }
  #sheets .pgroup.newpage::before { content: 'nova folha'; position: absolute; top: -10px; right: 0; background: #fff; padding: 0 8px; font-size: 11px; color: #999; }
}
.psum-item span small { display: block; font-size: 11px; font-weight: 500; opacity: .75; }
.ptable tr.grand td small { display: inline; margin-left: 6px; font-size: 11px; }
@media print { #sheets .plist { width: auto; min-height: 0; padding: 0; box-shadow: none; } }

/* ---------- folha A4: medidas iguais na prévia e na impressão ----------
   (a quebra de página é planejada no painel com base nestas medidas) */
#sheets .plist { font-size: 10pt; }
#sheets .plist-title { font-size: 18pt; }
#sheets .plist-head { padding-bottom: 8px; }
#sheets .psum { margin: 10px 0 0; }
#sheets .psum-item { padding: 8px 12px; }
#sheets .psum-item b { font-size: 18pt; }
#sheets .pgroup { margin-top: 7mm; }
#sheets .pgroup-title { font-size: 16pt; break-after: avoid; page-break-after: avoid; }
#sheets .ptable { font-size: 10pt; line-height: 1.3; }
#sheets .ptable th { padding: 6px 4px; }
#sheets .ptable td { padding: 6px 6px; }
#sheets .ptable td.nm { font-size: 13pt; }
#sheets .ptable td.wk { font-size: 11pt; }
#sheets .ptable td.n { font-size: 9pt; }
#sheets .ptable td.c .ok { font-size: 12pt; }
#sheets .ptable tr { break-inside: avoid; page-break-inside: avoid; }
#sheets .ptable thead { display: table-header-group; }   /* cabeçalho repete em cada folha */
#sheets .ptable tfoot { display: table-row-group; }      /* subtotal aparece uma vez só */
#sheets .ptotals { margin-top: 7mm; break-inside: avoid; page-break-inside: avoid; }
#sheets .ptotals .ptable tr.grand td { font-size: 12pt; }
/* empresa que transbordaria por poucas linhas: aperta para caber na folha */
#sheets .pgroup.tight .ptable td { padding-top: 3px; padding-bottom: 3px; }
#sheets .pgroup.tight .ptable td.nm { font-size: 12pt; }
/* quebras decididas pelo planejador */
#sheets .newpage { break-before: page; page-break-before: always; }
@media screen {
  #sheets .pgroup:not(.newpage) + .pgroup:not(.newpage), #sheets .pgroup:not(.newpage) ~ .ptotals:not(.newpage) { border-top: 0; }
  #sheets .ptotals.newpage { margin-top: 18mm; padding-top: 10mm; border-top: 1.5px dashed #bbb; position: relative; }
  #sheets .ptotals.newpage::before { content: 'nova folha'; position: absolute; top: -10px; right: 0; background: #fff; padding: 0 8px; font-size: 11px; color: #999; }
}
@media print { #sheets .pgroup.newpage, #sheets .ptotals.newpage { margin-top: 0; padding-top: 0; border-top: 0; } }

/* uma folha por empresa: separadas na tela, página nova na impressão */
#sheets .plist + .plist { break-before: page; page-break-before: always; }
@media screen { #sheets .plist + .plist { margin-top: 28px; } }
#sheets .plist-head.mini { padding-bottom: 6px; }
#sheets .plist-head.mini .plist-title { font-size: 13pt; }
#sheets .plist-head.mini + .pgroup { margin-top: 5mm; }
@media print { #sheets .plist + .plist { margin-top: 0; } }
