/* Neria — painel interno do PokerPT.
   Marca: vermelho #FF0033 e verde #00C462 (logótipo). Grafite neutro. IBM Plex.
   Dois temas por tokens: claro (por defeito) e escuro. "Automático" segue o sistema;
   data-theme="light" | "dark" no <html> força um deles. */

:root {
  color-scheme: light;
  --brand-red: #FF0033; --brand-green: #00C462;

  /* Superfícies */
  --bg: #F4F4F6; --surface: #FFFFFF; --surface-2: #F8F8FA; --surface-3: #EFEFF2; --surface-sunk: #ECECF0;
  --line: #E3E3E8; --line-2: #ECECF0; --line-strong: #CFCFD6; --dash: #BDBEC6;
  --shadow: 0 10px 30px rgba(17, 18, 22, .12); --shadow-sm: 0 1px 2px rgba(17, 18, 22, .08);

  /* Texto */
  --ink: #17181C; --ink-2: #3B3D45; --muted: #5E606A; --faint: #7C7E88; --disabled: #A3A5AD;

  /* Acento (vermelho da marca, ajustado para contraste em texto) */
  --accent: #D1002B; --accent-hover: #A30022; --accent-bg: #FFEAEE; --accent-line: #F7C2CD;
  --accent-solid: #E0002D; --accent-solid-hover: #BF0026; --on-accent: #FFFFFF;

  /* Menu lateral (sempre escuro, nos dois temas) */
  --side-bg: #16171B; --side-hover: rgba(255, 255, 255, .06); --side-on: #2A2B31; --side-line: #2F3036;
  --side-text: #C9CACF; --side-muted: #8B8D95; --side-strong: #FFFFFF;

  /* Estados */
  --ok: #0A7340; --ok-bg: #E0F6EA; --ok-line: #B5E3C9;
  --bad: #8E3B2E; --bad-bg: #F6E8E4; --bad-line: #E6BDB4; --bad-row: #FCF7F6;
  --warn: #7A5400; --warn-bg: #FFF3D6; --warn-line: #F0C978; --warn-row: #FFFBF1; --warn-soft: #FFF9EC;
  --badge-bg: #E8A33D; --badge-ink: #16171B;
  --ev: #6B3FC4; --ev-bg: #F0EAFC; --ev-line: #D5C6F5; --info: #1F5FB8; --info-bg: #E6F0FC; --night: #2E3A66; --night-bg: #E4E7F3;

  /* Faixas de dia */
  --band: #ECECF1; --band-line: #DCDCE3; --band-today: #FFE3E9;

  /* Avatares (fundo / texto) */
  --av0-bg: #DCE6F7; --av0-fg: #22355A; --av1-bg: #F4E3D3; --av1-fg: #6B3F14; --av2-bg: #DFF0E8; --av2-fg: #12684D;
  --av3-bg: #E7E2F7; --av3-fg: #4B2E8F; --av4-bg: #FBE3EC; --av4-fg: #8A2350; --av5-bg: #E2F1F5; --av5-fg: #155B6B;

  --toast-bg: #17181C; --toast-fg: #FFFFFF;

  --sans: 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --r: 10px;
}

/* Tema escuro: superfícies em camadas (mais claro = mais elevado), sem preto puro,
   acento e estados dessaturados para não vibrarem sobre fundo escuro. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1013; --surface: #17181C; --surface-2: #1D1E23; --surface-3: #25262C; --surface-sunk: #131418;
    --line: #2A2B31; --line-2: #222328; --line-strong: #3A3B42; --dash: #4A4B53;
    --shadow: 0 12px 32px rgba(0, 0, 0, .5); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --ink: #ECEDF0; --ink-2: #C5C7CD; --muted: #9B9DA6; --faint: #7D7F88; --disabled: #5C5E66;
    --accent: #FF6B83; --accent-hover: #FF94A6; --accent-bg: #3A141C; --accent-line: #5E2230;
    --accent-solid: #E0002D; --accent-solid-hover: #FF1A47; --on-accent: #FFFFFF;
    --side-bg: #0B0C0E; --side-hover: rgba(255, 255, 255, .05); --side-on: #1D1E23; --side-line: #1F2025;
    --ok: #5CD497; --ok-bg: #12301F; --ok-line: #1E4A31;
    --bad: #F0A194; --bad-bg: #3A1E19; --bad-line: #5A2E26; --bad-row: #1C1514;
    --warn: #F2C66B; --warn-bg: #33270C; --warn-line: #6B5216; --warn-row: #1D190F; --warn-soft: #251E0D;
    --badge-bg: #E8A33D; --badge-ink: #16171B;
  --ev: #B9A0F5; --ev-bg: #2A2040; --ev-line: #43346A; --info: #8DB8F5; --info-bg: #15263D; --night: #AFB9E8; --night-bg: #1E2338;
    --band: #1B1C21; --band-line: #2A2B31; --band-today: #35151C;
    --av0-bg: #22324F; --av0-fg: #B9CCF0; --av1-bg: #3D2C1D; --av1-fg: #EBCBA8; --av2-bg: #173A2A; --av2-fg: #9EDDBE;
    --av3-bg: #2E2650; --av3-fg: #CBBEF2; --av4-bg: #46202F; --av4-fg: #F2B8CE; --av5-bg: #173A42; --av5-fg: #A6DCE8;
    --toast-bg: #ECEDF0; --toast-fg: #17181C;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1013; --surface: #17181C; --surface-2: #1D1E23; --surface-3: #25262C; --surface-sunk: #131418;
  --line: #2A2B31; --line-2: #222328; --line-strong: #3A3B42; --dash: #4A4B53;
  --shadow: 0 12px 32px rgba(0, 0, 0, .5); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --ink: #ECEDF0; --ink-2: #C5C7CD; --muted: #9B9DA6; --faint: #7D7F88; --disabled: #5C5E66;
  --accent: #FF6B83; --accent-hover: #FF94A6; --accent-bg: #3A141C; --accent-line: #5E2230;
  --accent-solid: #E0002D; --accent-solid-hover: #FF1A47; --on-accent: #FFFFFF;
  --side-bg: #0B0C0E; --side-hover: rgba(255, 255, 255, .05); --side-on: #1D1E23; --side-line: #1F2025;
  --ok: #5CD497; --ok-bg: #12301F; --ok-line: #1E4A31;
  --bad: #F0A194; --bad-bg: #3A1E19; --bad-line: #5A2E26; --bad-row: #1C1514;
  --warn: #F2C66B; --warn-bg: #33270C; --warn-line: #6B5216; --warn-row: #1D190F; --warn-soft: #251E0D;
  --badge-bg: #E8A33D; --badge-ink: #16171B;
  --ev: #B9A0F5; --ev-bg: #2A2040; --ev-line: #43346A; --info: #8DB8F5; --info-bg: #15263D; --night: #AFB9E8; --night-bg: #1E2338;
  --band: #1B1C21; --band-line: #2A2B31; --band-today: #35151C;
  --av0-bg: #22324F; --av0-fg: #B9CCF0; --av1-bg: #3D2C1D; --av1-fg: #EBCBA8; --av2-bg: #173A2A; --av2-fg: #9EDDBE;
  --av3-bg: #2E2650; --av3-fg: #CBBEF2; --av4-bg: #46202F; --av4-fg: #F2B8CE; --av5-bg: #173A42; --av5-fg: #A6DCE8;
  --toast-bg: #ECEDF0; --toast-fg: #17181C;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 14px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-bg); color: var(--ink); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.warn { color: var(--warn); }
[hidden] { display: none !important; }

/* Transição suave só ao trocar de tema (classe posta pelo JS durante 300 ms) */
html.theme-switching, html.theme-switching * { transition: background-color .25s ease, border-color .25s ease, color .25s ease !important; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; background: var(--side-bg); color: var(--side-text); padding: 24px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--side-line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; color: var(--side-strong); font-weight: 600; font-size: 18px; }
.brand.dark { color: var(--ink); padding: 0 0 16px; }
.logo { width: 30px; height: 30px; display: block; flex: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: var(--side-strong); font-size: 22px; width: 44px; height: 44px; cursor: pointer; border-radius: 8px; }
.side-links { display: flex; flex-direction: column; flex: 1; }
.group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); padding: 0 10px 6px; }
.group a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--side-text); text-decoration: none; }
.group a:hover { background: var(--side-hover); color: var(--side-strong); }
.group a.on { background: var(--side-on); color: var(--side-strong); font-weight: 500; box-shadow: inset 3px 0 0 var(--brand-red); }
.badge { background: var(--badge-bg); color: var(--badge-ink); border-radius: 10px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--side-line); }
.me { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.me-txt { display: flex; flex-direction: column; min-width: 0; }
.me-txt strong { color: var(--side-strong); font-weight: 500; }
.me-txt small { color: var(--side-muted); font-size: 12px; }
.logout { margin-left: auto; color: var(--side-muted); font-size: 12.5px; }
.logout:hover { color: var(--side-strong); }
.main { flex: 1; min-width: 0; padding: 28px 36px 60px; display: flex; flex-direction: column; gap: 20px; }

/* Seletor de tema (no menu lateral e no login) */
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.theme-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--side-muted); font-size: 12px; cursor: pointer; }
.theme-switch button:hover { color: var(--side-strong); }
.theme-switch button[aria-pressed="true"] { background: var(--side-on); color: var(--side-strong); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.theme-switch svg { width: 15px; height: 15px; flex: none; }
.theme-switch.on-light { background: var(--surface-3); }
.theme-switch.on-light button { color: var(--muted); }
.theme-switch.on-light button:hover { color: var(--ink); }
.theme-switch.on-light button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-theme { position: fixed; top: 16px; right: 16px; width: 220px; }

/* Avatares */
.av { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.av.sm { width: 26px; height: 26px; font-size: 10.5px; }
.av0 { background: var(--av0-bg); color: var(--av0-fg); } .av1 { background: var(--av1-bg); color: var(--av1-fg); } .av2 { background: var(--av2-bg); color: var(--av2-fg); }
.av3 { background: var(--av3-bg); color: var(--av3-fg); } .av4 { background: var(--av4-bg); color: var(--av4-fg); } .av5 { background: var(--av5-bg); color: var(--av5-fg); }

/* Cabeçalho de página */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { margin: 2px 0 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.page-head p { margin: 6px 0 0; }
.eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { text-decoration: none; letter-spacing: normal; text-transform: none; font-size: 13px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pager { display: flex; gap: 4px; }
.head-actions input.datejump { width: auto !important; min-height: 40px; height: 40px; padding: 0 10px; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 8px; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--dash); background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--accent-solid); color: var(--on-accent); border-color: var(--accent-solid); font-weight: 500; }
.btn.primary:hover { background: var(--accent-solid-hover); border-color: var(--accent-solid-hover); color: var(--on-accent); }
.btn.icon { width: 40px; padding: 0; font-size: 18px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-bg); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 8px 0; color: var(--accent); cursor: pointer; text-align: left; font-size: 13.5px; }
.linkbtn.danger { color: var(--bad); }

/* Cartões e números */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.table-card { padding: 0; overflow-x: auto; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { display: flex; align-items: baseline; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; color: var(--muted); }
.stat b { font-size: 20px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat b.ok { color: var(--ok); } .stat b.bad { color: var(--bad); } .stat b.warn { color: var(--warn); }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.empty { text-align: center; padding: 40px 20px; }
.empty h2 { margin: 0 0 8px; }
.empty p { color: var(--muted); margin: 0 0 16px; }
.empty-sm { color: var(--muted); padding: 16px 20px; }
.flash { padding: 12px 16px; border-radius: var(--r); background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.flash.err { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.flash.info { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-line); }

/* Chips e segmentos */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; font-size: 13px; color: var(--ink); text-decoration: none; }
.chip:hover { background: var(--surface-2); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { display: inline-flex; gap: 3px; background: var(--surface-3); border-radius: 10px; padding: 3px; }
.seg.wrap { flex-wrap: wrap; }
.seg a, .seg label { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 7px; color: var(--ink-2); font-size: 13px; text-decoration: none; cursor: pointer; margin: 0; }
.seg a.on, .seg label.on { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-sm); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.pill.on { background: var(--ok-bg); color: var(--ok); } .pill.pend { background: var(--warn-bg); color: var(--warn); } .pill.off { background: var(--surface-3); color: var(--muted); }
.tag { display: inline-flex; padding: 2px 8px; border-radius: 6px; font-size: 12px; background: var(--surface-3); color: var(--ink-2); }
.tag.dark { background: var(--ink); color: var(--bg); }
.tag-today { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-left: 8px; }

/* Tabela de artigos */
.atable { min-width: 1040px; font-variant-numeric: tabular-nums; }
.row { display: grid; grid-template-columns: 124px minmax(0, 1fr) 150px 74px 74px 74px 74px 210px; gap: 12px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line-2); }
.row.head { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-top: 0; padding-block: 10px; }
.row-nh { background: var(--bad-row); }
.row-nh .title { color: var(--muted); }
.row-noed { background: var(--warn-row); }
.c-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.title { font-weight: 500; color: var(--ink); text-decoration: none; }
.title:hover { color: var(--accent); text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--faint); }
.rec { color: var(--muted); }
.c-notes { color: var(--ink-2); font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.who strong { display: block; font-weight: 500; }
.who small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who > span:not(.av) { min-width: 0; overflow: hidden; }
.st { border: 0; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; justify-self: start; }
span.st { cursor: default; }
.st-feito { background: var(--ok-bg); color: var(--ok); }
.st-nao_houve { background: var(--bad-bg); color: var(--bad); }
.st-por_fazer { background: var(--warn-bg); color: var(--warn); }
button.st:hover { filter: brightness(.97); }
.tm { display: inline-flex; justify-content: center; width: 100%; padding: 6px 0; border-radius: 6px; font-family: var(--mono); font-size: 13px; border: 1px solid transparent; background: var(--surface-3); color: var(--ink); cursor: pointer; }
span.tm { cursor: default; }
.tm.empty { background: transparent; border: 1px dashed var(--dash); color: var(--faint); font-family: var(--sans); font-size: 12px; }
.tm.miss { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); font-family: var(--sans); font-size: 12px; font-weight: 500; }
.tm.none { background: transparent; color: var(--disabled); }
.tm-input { width: 100%; height: 30px; padding: 0 6px; border: 1px solid var(--accent); border-radius: 6px; font-family: var(--mono); font-size: 13px; text-align: center; background: var(--surface); }
.claim { border: 1px solid var(--warn-line); background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.claim.sm { padding: 4px 8px; }
.claim.quiet { background: transparent; border-color: var(--line-strong); color: var(--muted); font-weight: 500; }
.ed-pick { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 34px; padding: 3px 8px 3px 4px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.ed-pick:hover, .ed-pick:focus-visible { border-color: var(--line-strong); background: var(--surface-2); }
.ed-pick .ed-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-pick .chev { width: 14px; height: 14px; flex: none; color: var(--faint); }
.ed-pick.none { padding-left: 10px; border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 600; }
.ed-pick.none .chev { color: var(--warn); }
select.ed-select { min-height: 34px; height: 34px; padding: 0 8px; font-size: 13px; border-color: var(--accent); }
.dayband { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; background: var(--band); border-top: 1px solid var(--band-line); scroll-margin-top: 12px; }
.dayband strong { font-size: 15px; }
.dayband.today { background: var(--band-today); }
.jump { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Semana em colunas */
.week-scroll { overflow-x: auto; }
.week { display: grid; grid-template-columns: repeat(7, minmax(168px, 1fr)); gap: 10px; min-width: 1200px; }
.wday { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 200px; }
.wday.today { border: 2px solid var(--accent); padding: 11px; }
.wday.over { background: var(--accent-bg); }
.wday header { display: flex; align-items: baseline; }
.wday h2 { margin: 0; font-size: 15px; }
.wday h2 a { color: var(--ink); text-decoration: none; }
.wcard { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--surface-2); }
.wcard[draggable="true"] { cursor: grab; }
.wcard.dragging { opacity: .4; }
.wcard.noed { border-color: var(--warn-line); background: var(--warn-soft); }
.wcard.s-nao_houve { opacity: .65; }
.wcard .st { font-size: 12px; padding: 3px 9px; }
.wtitle { font-weight: 500; color: var(--ink); text-decoration: none; line-height: 1.3; }
.wtitle:hover { color: var(--accent); }
.wmeta { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); }
.add { border: 1px dashed var(--dash); border-radius: 8px; padding: 9px; text-align: center; font-size: 13px; text-decoration: none; margin-top: auto; }
.add:hover { background: var(--accent-bg); }

/* Formulários */
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > .grow, .split > .table-card { flex: 2 1 560px; min-width: 0; }
.split > .form-card:not(.grow) { flex: 1 1 320px; }
.side-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.form-card { display: flex; flex-direction: column; gap: 8px; }
.form-card fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
fieldset legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
label, .lbl { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-top: 6px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-bg); outline-offset: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent-solid); }
textarea { resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-sunk); color: var(--muted); }
input.narrow { width: 90px !important; flex: none; }
.grid2, .grid3, .times { display: grid; gap: 12px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.times { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.times > div, .grid2 > div, .grid3 > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.inline { display: flex; align-items: center; gap: 10px; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.var { border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 6px; padding: 4px 8px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); cursor: pointer; }
.var:hover { border-color: var(--accent); color: var(--accent); }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.day input { position: absolute; opacity: 0; }
.day span { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 40px; border-radius: 8px; border: 1px solid var(--line-strong); cursor: pointer; font-weight: 500; background: var(--surface); }
.day input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.day input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.radio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.radios { border: 0; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; cursor: pointer; margin: 0; background: var(--surface); }
.radio-card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface-2); }
.radio-card strong { display: block; font-weight: 500; color: var(--ink); }
.radio-card small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.rot { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.rot label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.wdgrid { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.wdgrid label { margin: 0; }
.preview, .history, .plain { list-style: none; margin: 0; padding: 0; }
.preview li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.preview li.noed { background: var(--warn-soft); }
.history li { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.plain li { padding: 6px 0; }
.danger-zone { border-color: var(--bad-line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.danger-zone h2 { margin: 0; }
.danger-zone p { margin: 0; }
.block { display: flex; flex-direction: column; gap: 10px; }
.sec { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sec.warn { color: var(--warn); }

/* Tabelas de utilizadores e recorrências */
.utable { min-width: 760px; }
.urow { display: grid; grid-template-columns: minmax(0, 1.7fr) 110px 120px 120px 130px 48px; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.urow.head, .rrow.head { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-top: 0; }
.urow.dim, .rrow.dim { color: var(--faint); }
.rtable { min-width: 860px; }
.rrow { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 150px 100px 96px; gap: 12px; align-items: center; padding: 13px 18px; border-top: 1px solid var(--line-2); }
.rrow > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rrow a { text-decoration: none; color: var(--ink); font-size: 13.5px; }
.rrow a:hover { color: var(--accent); }
.actions { display: flex; justify-content: flex-end; }
.menu { position: relative; }
.menu summary { list-style: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; font-size: 18px; color: var(--muted); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--surface-3); }
.menu-body { position: absolute; right: 0; top: 40px; z-index: 5; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; }
.inline-edit { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.inline-edit .btn { margin-top: 6px; align-self: flex-start; }
.invite-box { border-color: var(--ok-line); background: var(--ok-bg); }
.invite-box p { margin: 0 0 10px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: var(--mono); font-size: 12.5px; }

/* Entrada */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 72px 16px 24px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 8px; padding: 28px; box-shadow: var(--shadow-sm); }
.auth-card.wide { max-width: 480px; }
.auth-card h1 { margin: 0 0 4px; font-size: 24px; }
.auth-card form { display: flex; flex-direction: column; gap: 8px; }
.auth-card .btn.block { margin-top: 12px; }
.auth-card fieldset { border: 0; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }

/* Pré-visualização de links */
.lp-card { position: fixed; z-index: 60; width: 340px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; pointer-events: none; animation: lp-in .14s ease-out; }
@keyframes lp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lp-img { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: var(--surface-3); border-bottom: 1px solid var(--line); }
.lp-body { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 13px; }
.lp-site { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-height: 16px; }
.lp-site img { width: 16px; height: 16px; border-radius: 3px; object-fit: contain; }
.lp-title { font-weight: 600; font-size: 14px; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-desc { font-size: 13px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lp-url { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-skel { height: 12px; border-radius: 4px; background: var(--surface-3); }
.lp-skel.short { width: 60%; }
.lp-card.loading .lp-skel { animation: lp-pulse 1s ease-in-out infinite alternate; }
@keyframes lp-pulse { from { opacity: .5; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lp-card, .lp-card.loading .lp-skel { animation: none; } }

/* Aviso flutuante */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-fg); padding: 10px 16px; border-radius: 8px; font-size: 13.5px; z-index: 50; box-shadow: var(--shadow); }
.toast.err { background: var(--bad); color: var(--surface); }

/* Telemóvel */
/* ===== Versão 2: Férias, Horários, Eventos, Números ===== */
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--surface); font-weight: 500; }
.btn.ok:hover { filter: brightness(1.08); color: var(--surface); }
.btn.disabled { opacity: .4; pointer-events: none; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.flash.small { font-size: 13px; padding: 8px 12px; }
.flash.warnbox { background: var(--warn-soft); color: var(--ink-2); border-color: var(--warn-line); }
.flash.warnbox strong { color: var(--warn); }
.flash.warnbox ul { margin-top: 6px; }
.flash.warnbox li { padding: 3px 0; }
.bignum { font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bignum .muted { font-size: 14px; font-weight: 400; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.mini-row strong, .mini-row small { display: block; }
a.mini-row:hover strong { color: var(--accent); }
details.card summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.card summary::after { content: '+'; color: var(--muted); font-size: 18px; line-height: 1; }
details.card[open] summary::after { content: '−'; }
details.card[open] summary { margin-bottom: 8px; }
.x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); font-size: 18px; cursor: pointer; flex: none; }
.x:hover { background: var(--bad-bg); color: var(--bad); }

/* Férias */
.vtable { display: flex; flex-direction: column; }
.vrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line-2); }
.vrow:first-child { border-top: 0; }
.balances { display: flex; flex-direction: column; }
.bal { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n i" "m i"; column-gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-2); align-items: center; }
.bal > span:first-child { grid-area: n; font-weight: 500; }
.bal > .muted { grid-area: m; font-size: 12.5px; }
.bal input { grid-area: i; }

/* Turnos */
.sh { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 7px; font-size: 12.5px; font-weight: 600; border: 1px solid transparent; }
.sh-m { background: var(--info-bg); color: var(--info); }
.sh-t { background: var(--warn-bg); color: var(--warn); }
.sh-n { background: var(--night-bg); color: var(--night); }
.sh-d { background: var(--accent-bg); color: var(--accent); }
.sh-f { background: var(--surface-3); color: var(--muted); }
.sh-v { background: var(--ok-bg); color: var(--ok); }
.sh-e { background: var(--ev-bg); color: var(--ev); }
.sh-none { background: transparent; color: var(--disabled); border: 1px dashed var(--line-strong); }
.shift-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.shift-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.shift-legend .sh { min-width: 28px; height: 24px; font-size: 11.5px; }
.shift-grid { display: grid; grid-template-columns: 190px repeat(var(--days), minmax(46px, 1fr)); min-width: 900px; }
.shift-grid > div { display: flex; align-items: center; justify-content: center; padding: 6px 4px; border-top: 1px solid var(--line-2); min-height: 46px; }
.shift-grid .sg-name { justify-content: flex-start; padding-left: 16px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.shift-grid .sg-head { flex-direction: column; gap: 1px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: var(--surface-2); border-top: 0; }
.shift-grid .sg-head b { font-size: 15px; color: var(--ink); letter-spacing: 0; }
.shift-grid .sg-head.sg-name { flex-direction: row; background: var(--surface-2); }
.shift-grid .sg-head.we b { color: var(--muted); }
.shift-grid .today { background: var(--band-today) !important; }
.shift-grid .sg-head.today b { color: var(--accent); }
.shift-grid .wk { border-left: 2px solid var(--line-strong); }
.shift-grid .mine { background: var(--surface-2); }
.shift-grid .sg-name.mine { font-weight: 600; }
.shift-grid .sg-foot { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--surface-2); }
.shift-grid .sg-foot.zero { color: var(--bad); font-weight: 600; background: var(--bad-row); }
select.shift-sel { appearance: none; -webkit-appearance: none; width: 42px !important; min-height: 30px !important; height: 30px; padding: 0 !important; text-align: center; text-align-last: center; cursor: pointer; border-radius: 7px; }
select.shift-sel.sh-none { border: 1px dashed var(--line-strong); background: transparent; }
select.shift-sel:hover { border-color: var(--accent); }
select.shift-sel.saving { opacity: .5; }

/* Eventos */
.ev-card { display: flex; gap: 16px; color: var(--ink); text-decoration: none; }
.ev-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); color: var(--ink); }
.ev-card.going { border-left: 4px solid var(--ev); }
.ev-date { flex: none; width: 54px; height: 58px; border-radius: 10px; background: var(--ev-bg); color: var(--ev); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ev-date b { font-size: 22px; line-height: 1; }
.ev-date span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.ev-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; }
.ev-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.avs { display: inline-flex; align-items: center; }
.avs .av { margin-right: -6px; box-shadow: 0 0 0 2px var(--surface); }
.pill.ev { background: var(--ev-bg); color: var(--ev); }
.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width .3s ease; }
.ev-notes { white-space: normal; color: var(--ink-2); }
.evtag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; background: var(--ev-bg); color: var(--ev); font-size: 12px; font-weight: 500; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: flex-start; }
.evtag::before { content: '◆'; font-size: 9px; }
.evtag:hover { color: var(--ev); text-decoration: underline; }
.rider { list-style: none; margin: 0; padding: 0; }
.rider li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line-2); }
.rider li:first-child { border-top: 0; }
.rider li.done .r-label { color: var(--muted); text-decoration: line-through; }
.r-label { flex: 1; min-width: 0; }
.r-owner { flex: none; }
.r-owner select { min-height: 34px; height: 34px; padding: 0 8px; font-size: 13px; width: 170px; }
.tick-form { display: contents; }
.tick { width: 26px; height: 26px; flex: none; border-radius: 7px; border: 1.5px solid var(--line-strong); background: var(--surface); color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tick svg { width: 16px; height: 16px; }
.tick[aria-pressed="true"], .tick.on { background: var(--ok); border-color: var(--ok); color: var(--surface); }
button.tick:hover { border-color: var(--ok); }
.r-add { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.r-add input { flex: 2 1 200px; }
.r-add select { flex: 1 1 150px; width: auto; }
.ev-people { list-style: none; margin: 0 0 8px; padding: 0; }
.ev-people li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.ev-people .who { flex: 1 1 140px; }
.role-form { flex: 1 1 140px; }
.role-form input { min-height: 34px !important; height: 34px; font-size: 13px; }
.add-person { border-top: 1px solid var(--line); padding-top: 6px; }

/* Números */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi > span:first-child { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi b { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi b small { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 1px; }
.kpi.warn { border-color: var(--warn-line); background: var(--warn-soft); }
.kpi.warn b { color: var(--warn); }
.delta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.ntable { min-width: 980px; }
.nrow { display: grid; grid-template-columns: minmax(0, 1.6fr) 70px 80px 120px 70px 70px 76px 84px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.nrow.head { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-top: 0; }
a.nrow:hover { background: var(--surface-2); color: var(--ink); }
.nrow .num b { font-size: 16px; }
.nrow .warn { color: var(--warn); font-weight: 600; }
.quota { display: inline-block; width: 60px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; vertical-align: middle; margin-right: 8px; }
.quota > span { display: block; height: 100%; background: var(--accent-solid); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bar-col b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bar-col small { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.bar-v { width: 100%; max-width: 46px; background: var(--accent-solid); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar-col:last-child .bar-v { background: var(--accent-solid-hover); }
.wdbars { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.wdb { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 13px; }
.wdb b { text-align: right; font-variant-numeric: tabular-nums; }
.wdtrack { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wdtrack > span { display: block; height: 100%; background: var(--ink-2); border-radius: inherit; }
.week7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.d7 { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 10px; background: var(--surface-2); text-align: center; }
.d7.today { background: var(--band-today); }
.d7 small { font-size: 12px; color: var(--muted); }
.cards2 { gap: 16px; }
.cards2 > .card { display: block; }
.who.big { display: flex; gap: 12px; margin: 0; }
.who.big .av { width: 44px; height: 44px; font-size: 16px; }
.defs li { padding: 4px 0; }
.defs b { color: var(--ink-2); }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: sticky; top: 0; z-index: 20; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--side-line); }
  .brand { padding: 4px 0; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .side-links { display: none; padding: 12px 0 8px; }
  .side.open .side-links { display: flex; }
  .main { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 23px; }
  .grid3, .times, .radio-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radio-cards { grid-template-columns: 1fr; }
  .table-card { overflow: visible; background: transparent; border: 0; }
  .atable { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
  .atable .row.head { display: none; }
  .atable .row { grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; gap: 10px; }
  .atable .row-nh { background: var(--bad-row); } .atable .row-noed { background: var(--warn-row); }
  .atable .c-title { grid-column: 1 / -1; order: -1; }
  .atable .c-st { grid-column: 1 / 3; }
  .atable .c-ed { grid-column: 3 / 5; justify-self: end; }
  .atable .c-t { display: flex; flex-direction: column; gap: 4px; }
  .atable .c-t::before { content: attr(data-label); font-size: 11px; color: var(--muted); }
  .atable .c-notes { grid-column: 1 / -1; }
  .atable .dayband { border-radius: 10px; border: 0; margin-top: 8px; }
  .utable, .rtable { min-width: 0; }
  .urow, .rrow { grid-template-columns: 1fr auto; }
  .urow.head, .rrow.head { display: none; }
  .urow > div:not(:first-child):not(.actions), .rrow > div:not(:first-child):not(.actions) { grid-column: 1; font-size: 13px; }
  .urow .actions, .rrow .actions { grid-column: 2; grid-row: 1; }
  .table-card .utable, .table-card .rtable { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .auth-theme { position: absolute; }
}
@media (prefers-reduced-motion: reduce) { *, html.theme-switching * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 860px) {
  .vrow { grid-template-columns: 1fr auto; }
  .vrow > :nth-child(n+2):not(form):not(:last-child) { grid-column: 1; }
  .vrow > form, .vrow > :last-child { grid-column: 2; grid-row: 1; }
  .ntable { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
  .nrow.head { display: none; }
  .nrow { grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .nrow > div:first-child { grid-column: 1 / -1; }
  .nrow > div[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  .week7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shift-grid .sg-name { padding-left: 10px; }
  .shift-grid { grid-template-columns: 130px repeat(var(--days), 46px); }
  .r-owner select { width: 130px; }
  .cards2 { grid-template-columns: 1fr; }
  .table-card:has(.shift-grid), .table-card:has(.rider), .table-card:has(.vtable) { background: var(--surface); border: 1px solid var(--line); }
  .table-card:has(.shift-grid) { overflow-x: auto; }
}
