@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,700&display=swap');
/* Atividades da TLT — tokens de design
   Tema claro é o padrão (uso em escritório); escuro por data-theme="dark". */
:root {
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* superfícies */
  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #e9ecf3;
  --line: #dde1ea;
  --line-2: #c4cad8;

  /* texto */
  --text: #101528;
  --text-2: #434a5f;
  --muted: #626a80;

  /* marca: o azul da logo da TLT (#07104a) */
  --brand: #07104a;
  --brand-hover: #15227a;
  --brand-ink: #ffffff;
  --brand-tint: #e6e9f8;
  --brand-text: #0c1a6b;
  --accent: #e0a100;        /* âmbar: só para chamar atenção (contador com atraso) */

  /* barra lateral */
  --side-bg: #07104a;
  --side-text: #d7dcf2;
  --side-muted: #9aa4d2;
  --side-hover: rgba(255, 255, 255, .07);
  --side-active: rgba(255, 255, 255, .13);
  --side-line: rgba(255, 255, 255, .12);

  /* situações: par texto / fundo */
  --pending: #7d5200;
  --pending-bg: #fdf0cd;
  --progress: #1a59a6;
  --progress-bg: #e2edfb;
  --done: #17633f;
  --done-bg: #dff2e7;
  --review: #5642ad;
  --review-bg: #ebe8fb;
  --late: #ad2219;
  --late-bg: #fce7e5;

  /* forma */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;
  --shadow-1: 0 1px 2px rgba(10, 18, 50, .07);
  --shadow-2: 0 10px 30px rgba(10, 18, 50, .14), 0 2px 6px rgba(10, 18, 50, .06);
  --focus: 0 0 0 3px rgba(40, 70, 210, .32);

  /* medidas */
  --side: 236px;
  --top: 56px;
  --drawer: 480px;

  /* movimento */
  --t: .16s;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --bg: #0b0e18;
  --surface: #121624;
  --surface-2: #171c2c;
  --surface-3: #1f2538;
  --line: #262d42;
  --line-2: #3a425c;
  --text: #e8ebf6;
  --text-2: #aeb5ca;
  --muted: #8b93aa;
  --brand: #8ea3ff;
  --brand-hover: #a7b7ff;
  --brand-ink: #060b26;
  --brand-tint: #1c2449;
  --brand-text: #a9b8ff;
  --accent: #f0b429;
  --side-bg: #0d1122;
  --side-text: #d0d6ea;
  --side-muted: #8791b3;
  --side-line: #262d42;
  --pending: #f3c969;
  --pending-bg: #3a2e10;
  --progress: #8ebcf5;
  --progress-bg: #162b47;
  --done: #7fdcb1;
  --done-bg: #143225;
  --review: #b9adf5;
  --review-bg: #2a2450;
  --late: #ff9d94;
  --late-bg: #421a17;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 14px 36px rgba(0, 0, 0, .55);
  --focus: 0 0 0 3px rgba(142, 163, 255, .4);
}

/* Atividades da TLT — estilos. Mobile-first: base = telefone;
   760px = barra lateral de ícones; 1100px = tabela e duas colunas;
   1280px = barra lateral completa. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.45; font-synthesis: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus); border-radius: var(--r-1); }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- casca ---------- */
#app { min-height: 100dvh; }
.side { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: var(--top); padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .logo { width: 64px; height: 26px; }
.top h1 { flex: 1; min-width: 0; font-size: 1.0667rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top .crumb { display: none; }
#view { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 16px 16px 96px; }
.brand { text-decoration: none; color: inherit; }
/* logo: azul sobre fundo claro, branca sobre azul e no tema escuro */
.logo { display: block; flex: none; width: 150px; height: 61px; background: url(logo-azul.svg) left center / contain no-repeat; }
[data-theme="dark"] .logo, .side .logo, .pitch .logo { background-image: url(logo-branco.svg); }

/* barra de abas (telefone) */
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: var(--r-2); font-size: .8rem; color: var(--muted); }
.tabbar button.on { color: var(--brand-text); font-weight: 600; }
.tabbar .plus { align-self: center; justify-self: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); justify-content: center; box-shadow: var(--shadow-2); }
.tabbar .plus svg { width: 22px; height: 22px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--surface); font-weight: 500; font-size: .9334rem; white-space: nowrap; transition: background var(--t), border-color var(--t), transform var(--t); }
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: .8667rem; }
.btn.danger { color: var(--late); }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--r-1); color: var(--text-2); }
.iconbtn:hover { background: var(--surface-3); color: var(--text); }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-text); font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.avatar.lg { width: 38px; height: 38px; font-size: .9334rem; }
.avatar.off { background: var(--surface-3); color: var(--muted); }
kbd { display: inline-block; min-width: 20px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface-2); font: 500 .8rem var(--mono); text-align: center; color: var(--text-2); }

/* campos */
label.f { display: block; font-size: .8667rem; font-weight: 500; color: var(--text-2); }
label.f > input, label.f > select, label.f > textarea, .input { display: block; width: 100%; margin-top: 5px; min-height: 38px; padding: 8px 10px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--surface); font-size: .9334rem; color: var(--text); }
label.f > textarea { resize: vertical; line-height: 1.45; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--brand); box-shadow: var(--focus); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--text-2); border-color: var(--line); opacity: 1; -webkit-text-fill-color: var(--text-2); }
.help { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.err { margin-top: 8px; font-size: .8667rem; color: var(--late); }
.err:empty { display: none; }

/* cabeçalho de página */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.ph > div:first-child { flex: 1; min-width: 220px; }
.ph h2 { font-size: 1.4667rem; letter-spacing: -.01em; }
.ph p { margin-top: 4px; color: var(--text-2); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-1); }
.card > header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card > header h3 { flex: 1; font-size: 1rem; }
.card > header .count { font: 500 .8667rem var(--mono); color: var(--muted); }
.card .body { padding: 16px; }
.notice { padding: 10px 12px; border-radius: var(--r-1); background: var(--pending-bg); color: var(--pending); font-size: .8667rem; }
.notice.info { background: var(--brand-tint); color: var(--brand-text); }
.notice.review { background: var(--review-bg); color: var(--review); }

/* indicadores */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { display: block; width: 100%; padding: 12px 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-1); transition: border-color var(--t), transform var(--t); }
button.kpi:hover { border-color: var(--line-2); transform: translateY(-1px); }
.kpi span { display: block; font-size: .8rem; color: var(--text-2); }
.kpi strong { display: block; margin-top: 2px; font: 600 1.8rem/1.15 var(--mono); letter-spacing: -.02em; }
.kpi small { display: block; margin-top: 2px; font-size: .8rem; color: var(--muted); }
.kpi.late strong { color: var(--late); }
.kpi.today strong { color: var(--pending); }
.kpi.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }

/* selos */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: .8rem; font-weight: 600; white-space: nowrap; background: var(--st-bg); color: var(--st); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-pending { --st: var(--pending); --st-bg: var(--pending-bg); }
.s-progress { --st: var(--progress); --st-bg: var(--progress-bg); }
.s-done { --st: var(--done); --st-bg: var(--done-bg); }
.s-review { --st: var(--review); --st-bg: var(--review-bg); }
.due { display: inline-flex; align-items: center; gap: 5px; font-size: .8667rem; white-space: nowrap; color: var(--text-2); }
.due.late { color: var(--late); font-weight: 600; }
.due.today { color: var(--pending); font-weight: 600; }
.due.none, .due.ok { color: var(--muted); }
.due svg { width: 14px; height: 14px; }
.who { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: .8667rem; }
.who span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; background: var(--surface-3); font-size: .8rem; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.chip.warn { background: var(--pending-bg); color: var(--pending); }

/* ---------- lista de atividades ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-1); overflow: hidden; }
.lhead { display: none; }
.group { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.group.late { color: var(--late); }
.group b { font: 500 .8rem var(--mono); color: var(--muted); }
.row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t t" "m a"; gap: 6px 10px; align-items: center; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background var(--t); }
.row:last-child { border-bottom: 0; }
.row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--st, transparent); }
.row:hover, .row.sel { background: var(--surface-2); }
.row:focus-visible { box-shadow: inset var(--focus); border-radius: 0; }
.row .t { grid-area: t; min-width: 0; }
.row .t strong { display: block; font-weight: 500; font-size: .9667rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row.s-done .t strong { color: var(--text-2); }
.row .t small { display: block; margin-top: 2px; font-size: .8rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row .m { grid-area: m; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.row .c-who, .row .c-due, .row .c-st, .row .c-cost { display: contents; }
.row .c-cost span { font-size: .8rem; color: var(--muted); }
.row .a { grid-area: a; }
.row .go { color: var(--muted); }
.empty { padding: 44px 20px; text-align: center; color: var(--text-2); }
.empty strong { display: block; margin-bottom: 4px; font-size: 1rem; color: var(--text); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: .8667rem; color: var(--text-2); }
.pager div { display: flex; align-items: center; gap: 8px; }

/* filtros */
.tabs { display: flex; gap: 2px; margin: 0 -16px 12px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: flex; align-items: center; gap: 7px; padding: 9px 11px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: .9334rem; font-weight: 500; white-space: nowrap; color: var(--text-2); }
.tabs button b { padding: 0 6px; border-radius: 9px; background: var(--surface-3); font: 500 .8rem/18px var(--mono); color: var(--text-2); }
.tabs button.on { color: var(--brand-text); border-bottom-color: var(--brand); }
.tabs button.on b { background: var(--brand-tint); color: var(--brand-text); }
.tabs button.alert b { background: var(--late-bg); color: var(--late); }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-1); background: var(--surface-3); }
.seg button { min-height: 32px; padding: 0 11px; border-radius: 4px; font-size: .8667rem; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.search { position: relative; flex: 1 1 100%; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; min-height: 38px; padding: 0 34px 0 34px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--surface); }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.tools select { min-height: 38px; flex: 1 1 140px; padding: 0 8px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--surface); font-size: .9rem; }
.tools .sp { flex: 1; }
.active-filter { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border-radius: 14px; background: var(--brand-tint); color: var(--brand-text); font-size: .8667rem; font-weight: 500; }
.active-filter button { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; }
.active-filter button:hover { background: rgba(0, 0, 0, .08); }

/* quadro */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-3); border-radius: var(--r-2); padding: 10px; min-height: 200px; }
.col h3 { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: .8667rem; }
.col h3 b { font: 500 .8rem var(--mono); color: var(--muted); }
.bcard { display: block; width: 100%; margin-bottom: 8px; padding: 10px 12px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--st); border-radius: var(--r-1); box-shadow: var(--shadow-1); }
.bcard:hover { border-color: var(--line-2); border-left-color: var(--st); }
.bcard strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; font-size: .9rem; }
.bcard div { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.col p { padding: 6px 4px; font-size: .8rem; color: var(--muted); }

/* ---------- minha mesa ---------- */
.desk { display: grid; gap: 16px; }
.mini .row { grid-template-areas: "t a" "m a"; padding: 10px 14px 10px 18px; }
.mini .row .t strong { -webkit-line-clamp: 1; font-size: .9334rem; }
.mini .row .c-who, .mini .row .c-st, .mini .row .c-cost { display: none; }
.mini.sent .row .c-who { display: contents; }
.prog { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.prog span { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width .3s var(--ease); }
.prog.review span { background: var(--review); }
.hint { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--muted); }

/* ---------- gaveta de detalhes ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(8, 12, 34, .46); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: 100%; max-width: var(--drawer); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-2); transform: translateX(102%); transition: transform .22s var(--ease); }
.drawer.on { transform: none; }
.drawer > header { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.drawer > header .ref { flex: 1; min-width: 0; font-size: .8rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.drawer .scroll { flex: 1; overflow-y: auto; padding: 18px; }
.drawer .title { width: 100%; padding: 6px 8px; margin: -6px -8px 12px; border: 1px solid transparent; border-radius: var(--r-1); background: none; font-size: 1.2667rem; font-weight: 600; line-height: 1.25; resize: none; }
.drawer .title:not(:disabled):hover { border-color: var(--line-2); }
.drawer .title:disabled { background: none; color: var(--text); -webkit-text-fill-color: var(--text); border-color: transparent; }
.statusbox { padding: 12px; margin-bottom: 16px; border-radius: var(--r-2); background: var(--surface-2); border: 1px solid var(--line); }
.statusbox .seg { display: flex; margin-top: 8px; background: var(--surface-3); }
.statusbox .seg button { flex: 1; min-height: 36px; }
.statusbox .seg button.on.s-pending { background: var(--pending-bg); color: var(--pending); }
.statusbox .seg button.on.s-progress { background: var(--progress-bg); color: var(--progress); }
.statusbox .seg button.on.s-done { background: var(--done-bg); color: var(--done); }
.statusbox p { display: flex; align-items: flex-start; gap: 7px; font-size: .8667rem; color: var(--text-2); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.fgrid .wide { grid-column: 1 / -1; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.people div { font-size: .8rem; color: var(--muted); }
.people .who { display: flex; margin-top: 4px; font-size: .9334rem; color: var(--text); }
details.orig { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-1); }
details.orig summary { padding: 9px 12px; font-size: .8667rem; font-weight: 500; cursor: pointer; color: var(--text-2); }
details.orig dl, .cells { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; padding: 4px 12px 12px; font-size: .8667rem; }
details.orig dt, .cells dt { color: var(--muted); }
details.orig dd, .cells dd { font-family: var(--mono); font-size: .8334rem; word-break: break-word; }
.timeline { margin-top: 20px; }
.timeline h4 { margin: 0 0 10px; font-size: .8667rem; font-weight: 600; color: var(--text-2); }
.timeline ol { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; font-size: .8667rem; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline time { display: block; font-size: .8rem; color: var(--muted); }
.drawer > footer { display: flex; align-items: center; gap: 8px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.drawer > footer .sp { flex: 1; font-size: .8rem; color: var(--muted); }

/* ---------- diálogos ---------- */
dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); }
dialog::backdrop { background: rgba(8, 12, 34, .48); }
dialog[open] { animation: pop .18s var(--ease); }
dialog form { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
dialog h3 { font-size: 1.1334rem; }
dialog .dtop { display: flex; align-items: flex-start; gap: 10px; }
dialog .dtop div { flex: 1; }
dialog .dfoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.quick button { height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line-2); font-size: .8334rem; color: var(--text-2); }
.quick button.on { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-text); font-weight: 600; }
details.more summary { font-size: .8667rem; font-weight: 500; color: var(--brand-text); cursor: pointer; }
details.more > div { display: grid; gap: 12px; margin-top: 10px; }

/* ---------- conferência da importação ---------- */
.revpage { max-width: 720px; margin: 0 auto; }
.revpage .bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.revpage .bar .prog { flex: 1; }
.revpage .bar > span { font: 500 .8667rem var(--mono); color: var(--text-2); white-space: nowrap; }
.rcard { padding: 20px; }
.rcard h3 { margin: 8px 0 10px; font-size: 1.3334rem; line-height: 1.25; }
.rcard .meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.rcard .cells { padding: 12px; margin: 12px 0 18px; border-radius: var(--r-1); background: var(--surface-2); border: 1px solid var(--line); }
.rcard .cells .hl { color: var(--review); font-weight: 500; }
.answers { display: grid; gap: 8px; }
.answers button { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: var(--r-2); border: 1px solid var(--line-2); background: var(--surface); text-align: left; font-weight: 600; transition: border-color var(--t), background var(--t); }
.answers button:hover { border-color: var(--st); background: var(--st-bg); }
.answers button span { flex: 1; }
.answers button small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.answers button i { width: 10px; height: 10px; border-radius: 50%; background: var(--st); }

/* ---------- visão geral ---------- */
.grid2 { display: grid; gap: 16px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; width: 100%; text-align: left; font-size: .8667rem; }
.bar-row .track { grid-column: 1 / -1; display: flex; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar-row .track span { display: block; height: 100%; background: var(--brand); }
.bar-row .track span.late { background: var(--late); }
.bar-row .track span.pending { background: var(--pending); }
.bar-row .track span.progress { background: var(--progress); }
.bar-row .track span.review { background: var(--review); }
.bar-row strong { font: 500 .8667rem var(--mono); }
button.bar-row:hover > span:first-child { color: var(--brand-text); text-decoration: underline; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 18px; }
.cols div { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.cols i { display: block; width: 100%; max-width: 34px; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--brand); opacity: .82; }
.cols div:last-child i { opacity: 1; }
.cols b { position: absolute; top: -16px; font: 500 .8rem var(--mono); color: var(--text-2); }
.cols small { margin-top: 5px; font-size: .7667rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: .8rem; color: var(--text-2); }
.legend i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; background: var(--brand); }
.legend i.late { background: var(--late); }

/* ---------- responsáveis e usuários ---------- */
.people-list .row { grid-template-areas: "t a" "m m"; cursor: pointer; }
.people-list .who-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.people-list .who-cell strong { display: block; font-weight: 500; }
.people-list .who-cell small { font-size: .8rem; color: var(--muted); }
.stat { font-size: .8334rem; color: var(--text-2); }
.stat b { font: 500 .9rem var(--mono); color: var(--text); }
.stat.late b { color: var(--late); }
.admin { display: grid; gap: 16px; }
.admin form { display: grid; gap: 12px; }
.urow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.urow:last-child { border-bottom: 0; }
.urow > div:nth-child(2) { flex: 1; min-width: 150px; }
.urow strong { display: block; font-weight: 500; }
.urow small { font-size: .8rem; color: var(--muted); }
.urow .acts { display: flex; gap: 6px; margin-left: auto; }

/* ---------- acesso ---------- */
.auth { min-height: 100dvh; display: grid; }
.auth .pitch { display: none; }
.auth .form { display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 400px; margin: 0 auto; padding: 32px 22px; }
.auth .form .logo { width: 172px; height: 70px; margin-bottom: 26px; }
.auth h1 { font-size: 1.6rem; letter-spacing: -.01em; }
.auth .lead { margin: 6px 0 22px; color: var(--text-2); }
.auth form { display: grid; gap: 14px; }
.auth .btn.primary { min-height: 44px; }
.auth .foot { margin-top: 22px; font-size: .8334rem; color: var(--muted); }
.auth .proto { margin-top: 26px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: .8rem; color: var(--muted); }
.auth .proto button { color: var(--brand-text); text-decoration: underline; }

/* aviso */
#toast { position: fixed; z-index: 60; left: 50%; bottom: 88px; transform: translate(-50%, 12px); max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: var(--r-2); background: var(--text); color: var(--bg); font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.menu { position: absolute; z-index: 50; right: 12px; top: calc(var(--top) - 4px); width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-2); }
.menu .me { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .me small { display: block; color: var(--muted); }
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 0 10px; border-radius: var(--r-1); font-size: .9rem; text-align: left; }
.menu button:hover { background: var(--surface-3); }
.skel { height: 54px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }

@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#view > * { animation: fade .2s var(--ease); }

.only-wide { display: none; }
.row.late, .bcard.late { --st: var(--late); }

/* ---------- 760px: barra lateral recolhida, tabela ---------- */
@media (min-width: 760px) {
  #app { display: grid; grid-template-columns: 64px minmax(0, 1fr); }
  .tabbar { display: none; }
  .only-wide { display: inline-flex; }
  .side { position: sticky; top: 0; z-index: 25; display: flex; flex-direction: column; height: 100dvh; padding: 14px 10px 10px; background: var(--side-bg); color: var(--side-text); border-right: 1px solid var(--side-line); }
  .side .brand { display: flex; align-items: center; justify-content: center; height: 40px; margin-bottom: 18px; }
  .side .logo { width: 44px; height: 18px; }
  .side nav span, .side nav b, .side .label, .side .sync div, .side .foot button span { display: none; }
  .side nav { display: grid; gap: 4px; }
  .side nav button, .side .foot button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 40px; border-radius: var(--r-1); color: var(--side-text); font-size: .9334rem; font-weight: 500; }
  .side nav button:hover, .side .foot button:hover { background: var(--side-hover); }
  .side nav button.on { background: var(--side-active); color: #fff; }
  .side .foot { margin-top: auto; display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--side-line); }
  .side .sync { display: flex; justify-content: center; padding: 8px 0; }
  .side .dot { width: 8px; height: 8px; border-radius: 50%; background: #5cc698; box-shadow: 0 0 0 3px rgba(92, 198, 152, .22); }
  .top { padding: 0 24px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); }
  .top .logo { display: none; }
  .top .crumb { display: inline; color: var(--muted); font-weight: 400; }
  #view { padding: 22px 24px 40px; }
  #toast { bottom: 28px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tabs { margin: 0 0 12px; padding: 0; }
  .search { flex: 1 1 240px; max-width: 360px; }
  .tools select { flex: 0 1 190px; }
  .answers { grid-template-columns: repeat(3, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .auth .pitch { display: flex; flex-direction: column; justify-content: space-between; padding: 44px; background: #07104a; color: #d7dcf2; }
  .auth .pitch .logo { width: 212px; height: 86px; }
  .auth .pitch h2 { max-width: 15ch; font-size: 2.2rem; line-height: 1.12; color: #fff; letter-spacing: -.02em; }
  .auth .pitch ul { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .9667rem; }
  .auth .pitch li { display: flex; gap: 10px; }
  .auth .pitch li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: #e0a100; }
  .auth .pitch small { color: #9aa4d2; }
  .auth .form .logo { display: none; }
}

/* ---------- 1100px: tabela e duas colunas ---------- */
@media (min-width: 1100px) {
  .lhead, .row { grid-template-columns: minmax(0, 1fr) 150px 136px 108px 92px 84px; grid-template-areas: none; gap: 14px; }
  .lhead { display: grid; padding: 9px 14px 9px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .8rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
  .lhead button { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
  .lhead button:hover, .lhead button.on { color: var(--text); }
  .lhead .r { text-align: right; justify-self: end; }
  .row { padding: 9px 14px 9px 18px; }
  .row .t, .row .m, .row .a { grid-area: auto; }
  .row .m { display: contents; }
  .row .c-who, .row .c-due, .row .c-st, .row .c-cost { display: flex; align-items: center; min-width: 0; }
  .row .c-cost { justify-content: flex-end; }
  .row .c-cost span { font-size: .8667rem; color: var(--text-2); }
  .row .a { justify-self: end; }
  .mini .lhead { display: none; }
  .mini .row { grid-template-columns: minmax(0, 1fr) 150px 104px; }
  .mini .row .c-who, .mini .row .c-st, .mini .row .c-cost { display: none; }
  .mini.sent .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t a" "m a"; gap: 4px 10px; }
  .mini.sent .row .t { grid-area: t; } .mini.sent .row .m { grid-area: m; display: flex; } .mini.sent .row .a { grid-area: a; }
  .mini.sent .row .c-who { display: flex; } .mini.sent .row .c-due { display: flex; }
  .people-list .lhead, .people-list .row { grid-template-columns: minmax(0, 1.4fr) 110px 100px 110px minmax(120px, 1fr) 40px; }
  .people-list .row .m { display: contents; }
  .desk { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); align-items: start; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid2 .span { grid-column: 1 / -1; }
  .admin { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); align-items: start; }
}

/* ---------- 1280px: barra lateral completa ---------- */
@media (min-width: 1280px) {
  #app { grid-template-columns: var(--side) minmax(0, 1fr); }
  .side { padding: 18px 12px 12px; }
  .side .brand { display: block; height: auto; padding: 0 8px; margin-bottom: 20px; }
  .side .logo { width: 156px; height: 63px; }
  .side .label { display: block; margin: 0 10px 8px; font-size: .7334rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); }
  .side nav button, .side .foot button { justify-content: flex-start; padding: 0 10px; }
  .side nav span { display: inline; flex: 1; text-align: left; }
  .side nav b { display: inline; padding: 0 6px; border-radius: 9px; background: rgba(255, 255, 255, .12); font: 500 .8rem/18px var(--mono); }
  .side nav b.alert { background: #e0a100; color: #1b1400; }
  .side .foot button span { display: inline; }
  .side .sync { justify-content: flex-start; align-items: center; gap: 9px; padding: 8px 10px; }
  .side .sync div { display: block; }
  .side .sync span, .side .sync small { display: block; font-size: .8rem; }
  .side .sync small { font-size: .8rem; color: var(--side-muted); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
@media print {
  .side, .top, .tabbar, .tools, .tabs, .drawer, .scrim, #toast { display: none !important; }
  #app { display: block; } #view { padding: 0; max-width: none; }
  .list, .card { box-shadow: none; }
}

[hidden]{display:none!important}.cols>button{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;flex:1;min-width:0;height:100%}.cols>button i{display:block;min-height:2px;width:65%;background:var(--brand);border-radius:4px 4px 0 0}.cols>button b,.cols>button small{font-family:var(--mono);font-size:.8rem}.drawer>footer{flex-wrap:wrap}#drawer-error{flex-basis:100%}#drawer-error:empty{display:none}.confirm-error{margin-top:12px}
.cols>button{position:relative}
