/* Docs DEV: estilos.
   Cores e fontes ficam nos tokens de :root. Para aplicar a identidade da Viitra,
   troque os valores abaixo (tema claro) e no bloco do tema escuro. */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --sunken: #f0f2f5;
  --line: #e1e5eb;
  --line-strong: #cdd3dc;
  --edge: #8d97a8;
  --fg: #172130;
  --muted: #586374;
  --accent: #0e6f63;
  --accent-fg: #ffffff;
  --accent-soft: #e2f2ef;
  --warn: #a14c16;
  --warn-soft: #fcece1;
  --notify: #8a5300;
  --notify-soft: #fdf2dc;
  --jira: #1f4fae;
  --jira-soft: #e8effc;
  --mark: #fff1b8;
  --st-todo: #eceef2;   --st-todo-fg: #4a5465;
  --st-prog: #e3edff;   --st-prog-fg: #1f4fae;
  --st-rev: #efe8fb;    --st-rev-fg: #5b3aa6;
  --st-qa: #fdf0d8;     --st-qa-fg: #85530a;
  --st-done: #e0f3e8;   --st-done-fg: #17683c;
  /* cores das branches no Git flow */
  --b-principal: #2c3646;
  --b-develop: #3d7a2a;
  --b-release: #6a46b8;
  --b-feature: #0e6f63;
  --b-historia: #2a62c9;
  --b-hotfix: #b5541c;
  --b-bugfix: #9a6700;
  --b-outra: #6b7484;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-lg: 0 24px 60px rgba(15, 20, 28, .28);

  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --top-h: 60px;
  --side-w: 256px;
  --painel-w: 468px;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1318; --surface: #171c23; --sunken: #12161c; --line: #262d37; --line-strong: #364050;
    --edge: #75808f; --fg: #e7ebf1; --muted: #a0aab9; --accent: #4cc3b0; --accent-fg: #0b1512;
    --accent-soft: #15322e; --warn: #f0a06a; --warn-soft: #35231a; --notify: #f2c46b; --notify-soft: #33280f;
    --jira: #9dbcff; --jira-soft: #18233a; --mark: #5a4a12;
    --st-todo: #262d37; --st-todo-fg: #c2c9d4; --st-prog: #1a2a4a; --st-prog-fg: #a9c4ff;
    --st-rev: #2a2142; --st-rev-fg: #cdb9f7; --st-qa: #3a2c10; --st-qa-fg: #f2c46b;
    --st-done: #143222; --st-done-fg: #93dfb2;
    --b-principal: #c3cad6; --b-develop: #8fd17a; --b-release: #a98af0; --b-feature: #4cc3b0; --b-historia: #7aa6ff;
    --b-hotfix: #f0a06a; --b-bugfix: #e3b341; --b-outra: #9aa4b4;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1318; --surface: #171c23; --sunken: #12161c; --line: #262d37; --line-strong: #364050;
  --edge: #75808f; --fg: #e7ebf1; --muted: #a0aab9; --accent: #4cc3b0; --accent-fg: #0b1512;
  --accent-soft: #15322e; --warn: #f0a06a; --warn-soft: #35231a; --notify: #f2c46b; --notify-soft: #33280f;
  --jira: #9dbcff; --jira-soft: #18233a; --mark: #5a4a12;
  --st-todo: #262d37; --st-todo-fg: #c2c9d4; --st-prog: #1a2a4a; --st-prog-fg: #a9c4ff;
  --st-rev: #2a2142; --st-rev-fg: #cdb9f7; --st-qa: #3a2c10; --st-qa-fg: #f2c46b;
  --st-done: #143222; --st-done-fg: #93dfb2;
  --b-principal: #c3cad6; --b-develop: #8fd17a; --b-release: #a98af0; --b-feature: #4cc3b0; --b-historia: #7aa6ff;
  --b-hotfix: #f0a06a; --b-bugfix: #e3b341; --b-outra: #9aa4b4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, pre, kbd { font-family: var(--font-mono); }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fg); color: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 10px; }
.cap { font: 500 11.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kbd { font: 500 11px var(--font-mono); padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--surface); }

.iconbtn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg);
}
.iconbtn:hover { border-color: var(--edge); }
.iconbtn.sm { width: 32px; height: 32px; border-radius: 7px; }
.iconbtn.plain { border-color: transparent; background: none; }
.iconbtn.plain:hover { background: var(--sunken); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px;
  border-radius: 7px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--fg);
}
.btn:hover { border-color: var(--edge); }
.btn.pri { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.btn.pri:hover { opacity: .9; }
.btn .ic { width: 14px; height: 14px; }

/* ---------- topo ---------- */
.top {
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--fg); text-decoration: none; white-space: nowrap; }
.brand i { font: 500 11px var(--font-mono); font-style: normal; padding: 2px 6px; border-radius: 4px; background: var(--fg); color: var(--surface); }
.brand-sep { color: var(--line-strong); font-size: 20px; font-weight: 300; margin: 0 -4px; }
.sistema { position: relative; min-width: 0; }
.sistema-btn {
  display: flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 0 10px 0 8px; border: 0; border-radius: 8px;
  background: none; color: var(--fg); font-size: 15px; font-weight: 600; white-space: nowrap;
}
.sistema-btn:hover, .sistema-btn[aria-expanded="true"] { background: var(--sunken); }
.sistema-btn > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.sistema-btn .chev { width: 16px; height: 16px; color: var(--muted); }
.sistema-ic { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-fg); }
.sistema-ic .ic { width: 16px; height: 16px; }
/* conta (canto direito do topo) */
.conta { position: relative; flex: none; }
.conta-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--sunken); color: var(--fg); font: 600 13px var(--font-body); letter-spacing: .02em;
}
.conta-btn:hover, .conta-btn[aria-expanded="true"] { border-color: var(--edge); }
.conta-menu {
  position: absolute; z-index: 55; top: calc(100% + 6px); right: 0; width: min(280px, calc(100vw - 24px)); padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg);
}
.conta-quem { display: grid; gap: 2px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.conta-quem b { font-size: 14px; }
.conta-quem small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.conta-papel { justify-self: start; margin-top: 6px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 600; }
.conta-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.conta-menu a, .conta-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--fg); font: 500 14px var(--font-body); text-align: left; text-decoration: none; cursor: pointer;
}
.conta-menu a:hover, .conta-menu a:focus-visible, .conta-menu button:hover, .conta-menu button:focus-visible { background: var(--sunken); }
.conta-menu .ic { width: 16px; height: 16px; color: var(--muted); }

/* tela de login (entrar.html) */
body.entrar { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.entrar-caixa { width: min(400px, 100%); display: grid; gap: 16px; }
.entrar-caixa > .brand { margin: 0; justify-self: center; font-size: 20px; }
.entrar-caixa form { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.entrar-caixa h1 { margin: 0; font-size: 20px; }
.entrar-caixa .btn { justify-self: stretch; justify-content: center; min-height: 40px; font-size: 14px; }
.entrar-nota { margin: 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.entrar-caixa form .entrar-nota { text-align: left; }

.sistema-menu {
  position: absolute; z-index: 55; top: calc(100% + 6px); left: 0; width: min(360px, calc(100vw - 24px)); padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg);
}
.sistema-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sistema-menu a { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 8px; color: var(--fg); text-decoration: none; }
.sistema-menu a:hover, .sistema-menu a:focus-visible { background: var(--sunken); }
.sistema-menu a[aria-current] { background: var(--sunken); box-shadow: inset 3px 0 0 var(--fg); }
.sistema-menu b { display: block; font-size: 14px; }
.sistema-menu small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.sistema-menu .sistema-ic { width: 32px; height: 32px; }
.sistema-menu [data-cor="verde"] .sistema-ic { background: #0e6f63; color: #fff; }
.sistema-menu [data-cor="roxo"] .sistema-ic { background: #6a46b8; color: #fff; }
.sistema-menu [data-cor="ambar"] .sistema-ic { background: #9a5b00; color: #fff; }
.sistema-menu [data-cor="azul"] .sistema-ic { background: #2a62c9; color: #fff; }

/* cor de destaque de cada sistema (campo "cor" em secoes.json); verde é o padrão do :root */
:root[data-cor="roxo"] { --accent: #6a46b8; --accent-fg: #ffffff; --accent-soft: #efe9fb; }
:root[data-cor="ambar"] { --accent: #9a5b00; --accent-fg: #ffffff; --accent-soft: #fbefdc; }
:root[data-cor="azul"] { --accent: #2a62c9; --accent-fg: #ffffff; --accent-soft: #e6eefb; }
@media (prefers-color-scheme: dark) {
  :root[data-cor="roxo"]:not([data-theme="light"]) { --accent: #b39cf5; --accent-fg: #120c22; --accent-soft: #2a2142; }
  :root[data-cor="ambar"]:not([data-theme="light"]) { --accent: #f2b75c; --accent-fg: #1a1206; --accent-soft: #33260f; }
  :root[data-cor="azul"]:not([data-theme="light"]) { --accent: #7aa6ff; --accent-fg: #0a1222; --accent-soft: #17243d; }
}
:root[data-cor="roxo"][data-theme="dark"] { --accent: #b39cf5; --accent-fg: #120c22; --accent-soft: #2a2142; }
:root[data-cor="ambar"][data-theme="dark"] { --accent: #f2b75c; --accent-fg: #1a1206; --accent-soft: #33260f; }
:root[data-cor="azul"][data-theme="dark"] { --accent: #7aa6ff; --accent-fg: #0a1222; --accent-soft: #17243d; }
.tab {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 8px;
  color: var(--muted); font-weight: 500; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.tab:hover { background: var(--sunken); color: var(--fg); }
.tab[aria-current="page"] { background: var(--accent-soft); color: var(--fg); font-weight: 600; }
.tab[aria-current="page"] .ic { color: var(--accent); }
.search-btn {
  flex: 1 1 200px; max-width: 420px; margin-left: auto; display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--bg); color: var(--muted); font-size: 14px; text-align: left;
}
.search-btn:hover { border-color: var(--edge); }
.search-btn span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- estrutura ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100vh - var(--top-h)); }
.app.sem-lateral { grid-template-columns: minmax(0, 1fr); }
.app.sem-lateral .side { display: none; }
.side {
  position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px 24px;
}
.recolher { flex: none; }
.side-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 2px 10px 8px; min-height: 32px; }
.side .secoes { display: none; list-style: none; margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.side .secoes .tab { min-height: 44px; }
.veu { display: none; }
.main { min-width: 0; padding: 20px 24px 48px; }
.main:focus { outline: none; }

.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 13px; padding-left: 6px; border-left: 1px solid var(--line); }
.tree li { margin: 1px 0; }
.trow { display: flex; align-items: center; gap: 2px; }
.chev, .tsp { width: 24px; height: 32px; flex: none; }
.chev { display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 5px; padding: 0; }
.chev:hover { color: var(--fg); background: var(--sunken); }
.chev .ic { transition: transform .15s; }
.chev[aria-expanded="true"] .ic { transform: rotate(90deg); }
.tlink {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; text-decoration: none;
  padding: 6px 8px; border-radius: 6px; color: var(--fg); font-size: 14px; font-weight: 500; line-height: 1.35;
}
.tlink:hover { background: var(--sunken); }
.tlink[aria-current] { background: var(--accent-soft); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.tlink .n { margin-left: auto; font: 500 11px var(--font-mono); color: var(--muted); }
.tlink .sw { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tree .sub .tlink { font-size: 13px; font-weight: 400; color: var(--muted); padding: 4px 8px; }
.tree .sub .tlink:hover { color: var(--fg); }

/* ---------- cabeçalho de conteúdo ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { padding: 2px 4px; border-radius: 4px; }
.crumbs b { color: var(--fg); font-weight: 600; padding: 2px 4px; }
.h1 { margin: 0; font-size: clamp(24px, 3vw, 30px); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
.lede { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; max-width: 76ch; }
.lede.recolhida { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mais { border: 0; background: none; padding: 2px 0; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.aviso-erro { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius); padding: 16px 18px; max-width: 760px; }
.aviso-erro h2 { margin: 0 0 6px; font-size: 17px; }
.aviso-erro p { margin: 6px 0 0; }
.aviso-erro code { background: var(--surface); padding: 1px 5px; border-radius: 4px; }
.carregando { color: var(--muted); }

/* ---------- realce de texto (passos, páginas) ---------- */
.st { display: inline-block; font-size: .82em; font-weight: 600; line-height: 1.5; padding: 0 6px; border-radius: 5px; white-space: nowrap; vertical-align: 1px; }
.st-todo { background: var(--st-todo); color: var(--st-todo-fg); }
.st-prog { background: var(--st-prog); color: var(--st-prog-fg); }
.st-rev { background: var(--st-rev); color: var(--st-rev-fg); }
.st-qa { background: var(--st-qa); color: var(--st-qa-fg); }
.st-done { background: var(--st-done); color: var(--st-done-fg); }
.code { font: 500 .85em var(--font-mono); padding: 1px 5px; border-radius: 4px; background: var(--sunken); border: 1px solid var(--line); overflow-wrap: anywhere; }
.nome { font-weight: 600; }
.ref { font-weight: 600; color: var(--fg); text-decoration: underline dotted; text-underline-offset: 3px; }
.ref:hover { color: var(--accent); }
.avisar { font-weight: 600; color: var(--fg); background: linear-gradient(transparent 62%, var(--notify-soft) 62%); }
.rot { display: inline-block; font-size: 12px; font-weight: 600; padding: 0 7px; margin-right: 6px; border-radius: 5px; line-height: 1.65; vertical-align: 1px; }
.rot-papel { background: var(--fg); color: var(--surface); }
.rot-cond { background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); }
.rot-nota { background: var(--notify-soft); color: var(--notify); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- fluxo ---------- */
.fx { display: grid; gap: 0; }
.fx-corpo { min-width: 0; display: flex; flex-direction: column; gap: 14px; min-height: calc(100vh - var(--top-h) - 68px); }
.vista-diagrama:not([hidden]) { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--sunken); border: 1px solid var(--line); }
.seg button { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px var(--line); }
.zoom { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-left: auto; }
.zoom button { height: 36px; min-width: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--fg); border-radius: 7px; }
.zoom button:hover { background: var(--sunken); }
.zoom output { font: 500 12.5px var(--font-mono); min-width: 52px; text-align: center; line-height: 36px; border-inline: 1px solid var(--line); }
.zoom .fit { display: flex; gap: 6px; padding: 0 12px; font-size: 13px; font-weight: 500; border-left: 1px solid var(--line); border-radius: 0 7px 7px 0; }

.palco-wrap { position: relative; flex: 1 1 auto; display: flex; min-height: 360px; }
.palco {
  position: relative; overflow: auto; border: 1px solid var(--line); border-radius: 12px;
  background-color: var(--surface);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 20px 20px;
  flex: 1 1 auto; min-width: 0; min-height: 180px;
  cursor: grab; overscroll-behavior: contain;
}
.palco.arrastando { cursor: grabbing; user-select: none; }
.palco-escala { position: relative; }
.diagrama { position: absolute; left: 0; top: 0; display: grid; padding: 26px 20px 30px; transform-origin: 0 0; }
.edges { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 1; }
.edges path { fill: none; stroke: var(--edge); stroke-width: 1.6; }
.edges path.alt { stroke: var(--warn); stroke-dasharray: 5 4; }
.edges .seta { fill: var(--edge); }
.edges .seta-alt { fill: var(--warn); }
.edges .elabel rect { fill: var(--surface); stroke: var(--line); }
.edges .elabel text { fill: var(--muted); font: 600 11px var(--font-body); }
.edges .elabel.alt rect { stroke: var(--warn-soft); }
.edges .elabel.alt text { fill: var(--warn); }
.edges .elabel.avisa rect { fill: var(--notify-soft); stroke: var(--notify-soft); }
.edges .elabel.avisa text { fill: var(--notify); }

.faixa { position: relative; z-index: 0; border-top: 1px dashed var(--line-strong); margin: 0 -20px; }
.faixa:first-child { border-top: 0; }
.faixa span { position: absolute; top: 6px; left: 12px; font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.diagrama.com-faixas .cell { padding-top: 34px; }
.cell { position: relative; z-index: 2; padding: 16px 0; display: grid; justify-items: center; align-content: center; gap: 6px; }

.node {
  position: relative; width: 156px; min-height: 64px; padding: 8px 11px 9px; border-radius: 9px;
  background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--fg);
  font: 500 13px/1.3 var(--font-body); text-align: left; display: grid; gap: 4px; align-content: start;
  transition: border-color .15s, box-shadow .15s;
}
.node:hover { border-color: var(--edge); }
.node .tg { display: flex; align-items: center; gap: 5px; font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.node .tg .ic { width: 11px; height: 11px; }
.node.decisao { background: var(--sunken); }
.node.marco { width: 132px; min-height: 44px; border-radius: 999px; text-align: center; justify-items: center; align-content: center; background: var(--sunken); }
.node.a-mapear { border-style: dashed; color: var(--muted); background: var(--sunken); }
.node.sub { border-color: var(--fg); box-shadow: 4px 4px 0 -1.5px var(--surface), 4px 4px 0 0 var(--fg); }
.node.alt { border-color: var(--warn); background: var(--warn-soft); }
.node.alt .tg { color: var(--warn); }
.node[aria-current="step"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4.5px var(--accent); }
.node.sub[aria-current="step"] { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4.5px var(--accent); }
.abrir { display: inline-flex; align-items: center; gap: 4px; font: 600 12px var(--font-body); color: var(--surface); background: var(--fg); border: 0; border-radius: 6px; padding: 4px 10px; text-decoration: none; }
.abrir:hover { opacity: .9; }

.fx-rodape { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 20px; margin-top: 10px; }
.fx-rodape .legend { flex: 1 1 320px; }
.mini-box { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mini {
  display: block; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); box-shadow: var(--shadow); cursor: pointer; touch-action: none;
}
.mini rect.n { fill: var(--line-strong); }
.mini rect.n.alt { fill: var(--warn); }
.mini rect.n.sel { fill: var(--accent); }
.mini rect.vp { fill: var(--accent); fill-opacity: .08; stroke: var(--accent); stroke-width: 1.5; }
.palco-dica { font-size: 12px; color: var(--muted); order: 2; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 16px; height: 11px; border-radius: 3px; border: 1.5px solid var(--line-strong); background: var(--surface); }
.lg.dec { width: 10px; height: 10px; transform: rotate(45deg); margin: 0 3px; background: var(--sunken); }
.lg.sub { border-color: var(--fg); box-shadow: 3px 3px 0 -1.5px var(--surface), 3px 3px 0 0 var(--fg); }
.lg.alt { border-color: var(--warn); background: var(--warn-soft); }
.lg.tbd { border-style: dashed; }
.lg.ret { width: 22px; height: 0; border: 0; border-top: 2px dashed var(--warn); border-radius: 0; background: none; }

/* lista (alternativa ao diagrama) */
.lista { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.li-it { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding-bottom: 8px; }
.li-it::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; border-left: 1.5px solid var(--line-strong); }
.li-it:last-child::before { display: none; }
.li-it.alt::before { border-left-style: dashed; border-color: var(--warn); }
.dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 500 12px var(--font-mono); background: var(--surface); border: 1.5px solid var(--line-strong); }
.dot.marco { background: var(--sunken); }
.dot.decisao { width: 24px; height: 24px; margin: 4px; border-radius: 5px; transform: rotate(45deg); }
.dot.decisao > span { transform: rotate(-45deg); }
.dot.alt { border-color: var(--warn); color: var(--warn); }
.li-it[aria-current] .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.card {
  display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 10px 12px; min-height: 44px; color: var(--fg); text-decoration: none;
}
.card:hover { border-color: var(--edge); }
.li-it[aria-current] .card { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.li-it.alt .card { border-color: var(--warn); background: var(--warn-soft); }
.li-it.decisao .card { background: var(--sunken); }
.li-it.marco .card { border: 0; background: none; padding: 5px 0; min-height: 0; color: var(--muted); font-size: 13.5px; }
.li-it.marco .card b { color: var(--fg); }
.card b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.card p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.mt { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; font: 500 11px var(--font-mono); color: var(--muted); }
.mt span { padding: 1px 6px; border-radius: 4px; background: var(--sunken); border: 1px solid var(--line); }
.saidas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.saida { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); text-decoration: none; }
.saida.alt { border-style: dashed; border-color: var(--warn); color: var(--warn); }
.saida.avisa { border-color: transparent; background: var(--notify-soft); color: var(--notify); }
.saida .ic { width: 12px; height: 12px; }

/* painel da etapa */
.painel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.painel:focus { outline: none; }
.ph { padding: 16px 20px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; background: var(--surface); border-radius: 12px 12px 0 0; }
.ph-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ph-acoes { display: flex; gap: 4px; }
.eyebrow { font: 500 11.5px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.eyebrow.alt { color: var(--warn); }
.h2 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.h2:focus { outline: none; }
.pn { display: flex; gap: 6px; }
.pnb { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px 0 6px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--muted); max-width: 50%; text-decoration: none; }
.pnb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pnb.nx { padding: 0 6px 0 10px; margin-left: auto; }
.pnb:hover { color: var(--fg); border-color: var(--edge); }
.jump { display: flex; gap: 4px; flex-wrap: wrap; }
.jump a { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: var(--sunken); color: var(--muted); text-decoration: none; border: 1px solid var(--line); }
.jump a:hover { color: var(--fg); border-color: var(--edge); }
.pb { padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 20px; }
.pb > section { scroll-margin-top: 12px; }
.resumo { margin: 0; font-size: 15px; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line); }
.tbd { color: var(--warn); font-style: italic; }
.sh { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.meta .sh { margin-bottom: 4px; }
.sh em { font-style: normal; font: 500 11px var(--font-mono); padding: 0 6px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); letter-spacing: 0; }
.niveis { display: flex; flex-wrap: wrap; gap: 4px; }
.nv { font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent); }
.nv.fora { background: none; border-color: var(--line-strong); color: var(--muted); text-decoration: line-through; }
.plain { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; }
.plain li { display: flex; gap: 9px; }
.plain li::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: 9px; border-radius: 50%; background: var(--edge); }

.filtros { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--muted); }
.chip b { font: 500 11px var(--font-mono); }
.chip .ic { width: 13px; height: 13px; }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.chip:disabled { opacity: .45; cursor: default; }
.passos { margin: 0; padding: 0; list-style: none; display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.passo { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 11px 12px; font-size: 14.5px; line-height: 1.55; border-top: 1px solid var(--line); background: var(--surface); transition: opacity .15s, background .15s; }
.passo:first-child { border-top: 0; }
.passos[data-filtro="jira"] .passo:not([data-k~="jira"]),
.passos[data-filtro="aviso"] .passo:not([data-k~="aviso"]),
.passos[data-filtro="git"] .passo:not([data-k~="git"]) { opacity: .35; }
.passos[data-filtro] .passo[data-k] { background: var(--surface); }
.passo.achado { background: var(--mark); }
.num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 500 11.5px var(--font-mono); border: 1px solid var(--line-strong); background: var(--surface); padding: 0; color: var(--fg); }
.num:hover { border-color: var(--accent); }
.num[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.num .ic { width: 14px; height: 14px; }
.passo.feito .txt { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.kinds { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.k { display: inline-flex; align-items: center; gap: 4px; font: 500 10.5px var(--font-mono); letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px 1px 4px; border-radius: 4px; }
.k .ic { width: 12px; height: 12px; }
.k-jira { background: var(--jira-soft); color: var(--jira); }
.k-aviso { background: var(--notify-soft); color: var(--notify); }
.k-git { background: var(--sunken); color: var(--muted); border: 1px solid var(--line); }
.marcados { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.pronto { padding: 14px; border-radius: 10px; background: var(--accent-soft); }
.pronto .sh { color: var(--fg); }
.check { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.check li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.check .ic { color: var(--accent); margin-top: 3px; }
.arts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.art { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); display: grid; gap: 2px; font-size: 13.5px; }
.art span { font-size: 12.5px; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tool { font: 500 12px var(--font-mono); padding: 2px 8px; border-radius: 5px; background: var(--sunken); border: 1px solid var(--line); }
.modelos { display: grid; gap: 8px; }
.modelo { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; scroll-margin-top: 12px; }
.modelo.piscar { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent); }
.mh { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; }
.mh .tgl { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; font-size: 14px; font-weight: 600; padding: 6px 0; min-height: 32px; }
.mh .tgl .ic { transition: transform .15s; }
.mh .tgl[aria-expanded="true"] .ic { transform: rotate(90deg); }
.pre { margin: 0; padding: 12px; border-top: 1px solid var(--line); background: var(--sunken); font: 12px/1.55 var(--font-mono); white-space: pre; overflow-x: auto; }
.obs { margin: 0; padding: 8px 12px 10px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.dica { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--sunken); font-size: 13.5px; }
.dica .ic { color: var(--muted); margin-top: 2px; }
.intro { padding: 20px; display: grid; gap: 14px; }
.intro p { margin: 0; color: var(--muted); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats div { padding: 10px 12px; border-radius: 9px; background: var(--sunken); border: 1px solid var(--line); }
.stats b { display: block; font-size: 20px; line-height: 1.2; }
.stats span { font-size: 12px; color: var(--muted); }

/* painel da etapa em gaveta, por cima do diagrama (todas as larguras) */
.painel {
  position: fixed; z-index: 45; top: var(--top-h); right: 0; bottom: 0; width: min(var(--painel-w, 480px), 100vw);
  border-radius: 0; border-width: 0 0 0 1px; box-shadow: var(--shadow-lg); overflow-y: auto;
  transform: translateX(105%); visibility: hidden; transition: transform .2s ease, visibility 0s .2s;
}
.fx.com-etapa .painel { transform: none; visibility: visible; transition: transform .2s ease; }
.ph { position: sticky; top: 0; z-index: 2; border-radius: 0; }
@media (max-width: 719.98px) {
  .painel { top: 0; width: 100vw; border: 0; z-index: 60; }
  .pb { padding-bottom: 96px; }
  .pn-rodape { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 10px 16px 14px; background: var(--surface); border-top: 1px solid var(--line); }
  .pn-rodape .pnb { flex: 1 1 0; min-width: 0; max-width: none; min-height: 46px; font-size: 13.5px; color: var(--fg); }
  .ph .pn { display: none; }
}
@media (min-width: 720px) { .pn-rodape { display: none; } }

/* ---------- git flow ---------- */
.gf-card { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gf-card .gf-corpo { border-radius: 0 0 12px 12px; overflow: hidden; }
.gf-legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.gf-legenda span { display: flex; align-items: center; gap: 6px; }
.gf-corpo { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.gf-nomes { border-right: 1px solid var(--line); background: var(--surface); position: relative; z-index: 2; }
.gf-nome { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 0 14px; font: 500 12.5px var(--font-mono); white-space: nowrap; transform: translateY(-50%); }
.gf-nome .sw { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.gf-scroll { overflow-x: auto; }
@media (max-width: 719.98px) {
  .gf-nomes { max-width: 34vw; }
  .gf-nome { padding: 0 8px; font-size: 11px; overflow: hidden; }
  .gf-nome > :last-child { overflow: hidden; text-overflow: ellipsis; }
}
.gf-svg { display: block; }
.gf-svg .lane { stroke-width: 3; stroke-linecap: round; }
.gf-svg .lig { fill: none; stroke-width: 2.5; }
.gf-svg .commit { fill: var(--surface); stroke-width: 3; }
.gf-svg .merge { fill: var(--surface); stroke-width: 3.5; }
.gf-svg .pr rect { fill: var(--surface); stroke: var(--line-strong); }
.gf-svg .pr text { fill: var(--fg); font: 600 10px var(--font-mono); }
.gf-svg .tag rect { fill: var(--b-principal); }
.gf-svg .tag text { fill: var(--surface); font: 600 10.5px var(--font-mono); }
.gf-svg .nb { cursor: pointer; }
.gf-svg .nb circle { fill: var(--surface); stroke: var(--line); }
.gf-svg .nb text { fill: var(--muted); font: 500 11px var(--font-mono); }
.gf-svg .nb:hover circle { stroke: var(--edge); }
.gf-svg .nb.on circle { fill: var(--fg); stroke: var(--fg); }
.gf-svg .nb.on text { fill: var(--surface); }
.gf-svg .nb:focus { outline: none; }
.gf-svg .nb:focus-visible circle { stroke: var(--accent); stroke-width: 3; }
.gf-svg .col-sel { fill: var(--accent-soft); }
.gf-passos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 8px; }
.gf-passo { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; scroll-margin-top: calc(var(--top-h) + 12px); }
.gf-passo[aria-current] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.gf-passo .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 500 11px var(--font-mono); border: 1px solid var(--line-strong); background: var(--surface); padding: 0; color: var(--fg); }
.gf-passo[aria-current] .n { background: var(--fg); color: var(--surface); border-color: var(--fg); }
.gf-passo b { font-weight: 600; }
.gf-passo p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.cmd { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 4px 4px 4px 10px; border-radius: 7px; background: var(--sunken); border: 1px solid var(--line); font: 500 12.5px var(--font-mono); }
.cmd code { flex: 1; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.gf-status { display: inline-block; margin-left: 10px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--sunken); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; vertical-align: middle; white-space: nowrap; }
.gf-doc { max-width: 900px; }

/* página de um fluxo: abas, prós e contras, explorador de cenários */
.gf-fluxo { display: grid; gap: 18px; }
.gf-abas { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.gf-abas a {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; white-space: nowrap;
  color: var(--muted); font-weight: 600; font-size: 14.5px; text-decoration: none; border-bottom: 2px solid transparent;
}
.gf-abas a:hover { color: var(--fg); }
.gf-abas a[aria-current] { color: var(--fg); border-bottom-color: var(--accent); }
.gf-abas .gf-status { margin-left: 0; font-size: 11px; }
.gf-pc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.pc { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.pc h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pc h2 .ic { width: 18px; height: 18px; padding: 2px; border-radius: 50%; }
.pc-usar h2 .ic { color: var(--accent-fg); background: var(--accent); }
.pc-evitar h2 .ic { color: var(--surface); background: var(--warn); }
.pc ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.pc-usar { border-top: 3px solid var(--accent); }
.pc-evitar { border-top: 3px solid var(--warn); }
.gf-prereq { margin: -4px 0 0; font-size: 13.5px; color: var(--muted); }
.gf-prereq b { color: var(--fg); }
.gf-explorador { display: grid; gap: 12px; }
.gf-cenarios { display: flex; flex-wrap: wrap; gap: 6px; }
.gf-cenarios a {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none;
}
.gf-cenarios a:hover { color: var(--fg); border-color: var(--edge); }
.gf-cenarios a[aria-current] { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.gf-cenarios .sw { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.gf-dg-area .gf { display: grid; gap: 12px; }
.gf-dg-desc { margin: 0; font-size: 14px; color: var(--muted); max-width: 90ch; }
.gf-dica { margin-left: auto; }
.gf-svg .hit { fill: transparent; cursor: pointer; }
.gf-svg .hit:hover { fill: var(--accent-soft); fill-opacity: .6; }
.gf-pop {
  position: absolute; z-index: 6; width: min(340px, calc(100% - 16px)); padding: 12px 14px 12px; display: grid; gap: 8px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow-lg); font-size: 14px;
  grid-template-columns: minmax(0, 1fr);
}
.gf-pop::before {
  content: ""; position: absolute; top: -7px; left: calc(var(--seta-x, 50%) - 7px); width: 12px; height: 12px;
  background: var(--surface); border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); transform: rotate(45deg);
}
.gf-pop:focus { outline: none; }
.gf-pop:focus-visible { box-shadow: var(--shadow-lg), 0 0 0 2px var(--accent); }
.gf-pop p { margin: 0; color: var(--muted); line-height: 1.5; }
.gp-h { display: flex; align-items: center; justify-content: space-between; margin: -4px -6px -4px 0; }
.gp-t { font-size: 15px; line-height: 1.35; }
.gp-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; }
.gp-nav .btn:disabled { opacity: .4; cursor: default; }
@media (max-width: 719.98px) {
  .gf-pop { position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-height: 60vh; overflow-y: auto; border-radius: 14px 14px 0 0; padding: 14px 16px 18px; z-index: 60; }
  .gf-pop::before { display: none; }
  .gf-dica { display: none; }
}
.secao-titulo { margin: 10px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.regras { margin: 0; padding: 14px 16px 14px 34px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line); font-size: 14px; display: grid; gap: 4px; }

/* ---------- páginas ---------- */
.pg { display: flex; gap: 40px; align-items: flex-start; }
.doc { flex: 1 1 560px; min-width: 0; max-width: 780px; display: flex; flex-direction: column; gap: 16px; line-height: 1.6; }
.doc h2 { margin: 14px 0 0; font-size: 19px; line-height: 1.3; font-weight: 700; scroll-margin-top: calc(var(--top-h) + 16px); }
.doc h3 { margin: 8px 0 0; font-size: 16px; line-height: 1.35; font-weight: 600; scroll-margin-top: calc(var(--top-h) + 16px); }
.doc p { margin: 0; }
.fatos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fatos div { background: var(--surface); padding: 10px 14px; display: grid; gap: 2px; }
.fatos span { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fatos b { font-weight: 600; font-size: 14.5px; }
.ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: i; }
.ol li { counter-increment: i; display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.ol li::before { content: counter(i); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 500 11px var(--font-mono); border: 1px solid var(--line-strong); background: var(--surface); margin-top: 1px; }
.ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ul li { display: flex; gap: 10px; }
.ul li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--edge); margin-top: 11px; }
.cl { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cl label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cl input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.tbl-wrap { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--sunken); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:first-child td { border-top: 0; }
.blk { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.blkh { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; min-height: 44px; }
.blk .pre { border-top: 0; font-size: 12.5px; }
.call { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 14.5px; }
.call .ic { margin-top: 4px; }
.call-atencao { background: var(--notify-soft); }
.call-atencao .ic { color: var(--notify); }
.call-dica, .call-info { background: var(--sunken); border: 1px solid var(--line); }
.call-dica .ic, .call-info .ic { color: var(--muted); }
.toc { position: sticky; top: calc(var(--top-h) + 20px); flex: 0 0 210px; display: grid; gap: 2px; font-size: 13px; }
.toc a { display: block; padding: 4px 10px; color: var(--muted); text-decoration: none; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--fg); }
.toc a[aria-current] { color: var(--fg); border-left-color: var(--accent); font-weight: 600; }
.toc a.h3 { padding-left: 22px; }
.cards-idx { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.cards-idx .card { height: 100%; padding: 14px 16px; }
@media (max-width: 1099.98px) { .toc { display: none; } }

/* ---------- busca ---------- */
.busca {
  width: min(680px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 80px)); margin: 64px auto auto; padding: 0;
  border: 0; border-radius: 14px; background: var(--surface); color: var(--fg); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
  overflow: hidden;
}
.busca[open] { display: flex; flex-direction: column; }
.busca::backdrop { background: rgba(15, 20, 28, .45); }
.bq { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.bq .ic { width: 20px; height: 20px; color: var(--muted); }
.bq input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 17px; font-weight: 500; background: none; min-height: 36px; }
.bq input::-webkit-search-cancel-button { display: none; }
.bf { display: flex; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; font-size: 12.5px; align-items: center; color: var(--muted); }
.bf .chip { flex: none; }
.br { overflow-y: auto; flex: 1; padding-bottom: 6px; overscroll-behavior: contain; }
.bgrp { padding: 10px 16px 4px; font: 500 11.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bres { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 16px; color: var(--fg); text-decoration: none; border-left: 3px solid transparent; cursor: pointer; }
.bres[aria-selected="true"] { background: var(--accent-soft); border-left-color: var(--accent); }
.bres .bi { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--sunken); border: 1px solid var(--line); color: var(--muted); }
.bpath { font-size: 12.5px; color: var(--muted); }
.bttl { font-weight: 600; font-size: 14.5px; }
.bsnip { display: block; font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.bvazio { padding: 28px 16px; color: var(--muted); font-size: 14px; text-align: center; }
.bfoot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 9px 16px; border-top: 1px solid var(--line); background: var(--sunken); font-size: 12.5px; color: var(--muted); }

/* ---------- telas médias e pequenas ---------- */
@media (max-width: 959.98px) {
  .app, .app.sem-lateral { grid-template-columns: minmax(0, 1fr); }
  .app.sem-lateral .side { display: block; }
  .side {
    position: fixed; z-index: 55; top: 0; left: 0; bottom: 0; height: auto; width: min(320px, 88vw);
    transform: translateX(-102%); visibility: hidden; transition: transform .2s ease, visibility 0s .2s; box-shadow: var(--shadow-lg);
  }
  .app.lateral-aberta .side { transform: none; visibility: visible; transition: transform .2s ease; }
  .app.lateral-aberta .veu { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 28, .4); }
}
@media (max-width: 719.98px) {
  .top { gap: 6px; padding: 0 8px; }
  .brand, .brand-sep { display: none; }
  .sistema-btn { font-size: 14px; padding: 0 6px; }
  .side .secoes { display: grid; gap: 2px; }
  .search-btn { flex: 0 0 auto; margin-left: auto; width: 44px; min-height: 44px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .search-btn span { display: none; }
  .top .iconbtn { width: 44px; height: 44px; border-color: transparent; }
  .main { padding: 14px 16px 40px; }
  .zoom { margin-left: 0; }
  .zoom .fit span { display: none; }
  .palco-dica { display: none; }
  .meta { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .top, .side, .toolbar, .mini, .palco-dica, .filtros, .marcados, .ph-acoes, .pn, .pn-rodape { display: none !important; }
  .app { display: block; }
  .painel { position: static !important; transform: none !important; visibility: visible !important; max-height: none !important; box-shadow: none !important; }
  .palco { max-height: none; overflow: visible; }
}

/* ---------- agenda: reuniões e calendário ---------- */
.ag { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 1180px; min-width: 0; }
.ag-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ag-acoes { display: flex; gap: 8px; }
.ag .call { margin: 0; }
.ag-demo .btn { margin-left: 6px; vertical-align: middle; }
.ag-conta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
.ag-conta > span { flex: 1 1 240px; }
.ag-conta b { color: var(--fg); }
.ag-conta .ic { width: 16px; height: 16px; color: var(--accent); }
.ag-contas tr.off th, .ag-contas tr.off td { color: var(--muted); }
.ag-contas td:last-child { text-align: right; }
.ag-painel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.ag-box { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.ag-box > .btn { justify-self: start; }
.ag-h { margin: 0; font-size: 16px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.ag-h small { font-size: 13px; font-weight: 400; color: var(--muted); }
.ag-h3 { margin: 6px 0 0; font: 500 11.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ag-vazio, .ag-nota { margin: 0; font-size: 13.5px; color: var(--muted); }
.ag-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ag-lista li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ag-quando { font-size: 13px; color: var(--muted); }
.ag-equipe { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ag-equipe li { display: grid; grid-template-columns: 10px minmax(0, auto) 1fr; align-items: center; gap: 4px 10px; font-size: 14px; }
.ag-equipe i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.ag-equipe .on i { background: var(--st-done-fg); box-shadow: 0 0 0 3px var(--st-done); }
.ag-equipe .aus i { background: var(--warn); }
.ag-equipe span { color: var(--muted); font-size: 13px; }

/* cores por tipo de evento */
.t-rito { --tc: var(--jira); --ts: var(--jira-soft); }
.t-release { --tc: var(--b-release); --ts: var(--st-rev); }
.t-ausencia { --tc: var(--warn); --ts: var(--warn-soft); }
.t-feriado { --tc: var(--st-done-fg); --ts: var(--st-done); }
.t-outro { --tc: var(--muted); --ts: var(--sunken); }
.ag-ev {
  display: flex; align-items: baseline; gap: 5px; max-width: 100%; min-height: 24px; padding: 2px 7px;
  border: 0; border-left: 3px solid var(--tc); border-radius: 5px; background: var(--ts); color: var(--fg);
  font-size: 12.5px; text-align: left; cursor: pointer; line-height: 1.3;
}
.ag-ev:hover { box-shadow: inset 0 0 0 1px var(--tc); }
.ag-ev b { font: 600 11px var(--font-mono); color: var(--tc); flex: none; }
.ag-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ag-lista .ag-ev { font-size: 13.5px; }

/* calendário */
.ag-cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ag-nav { display: flex; align-items: center; gap: 8px; }
.ag-semana { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 4px; }
.ag-semana-t { display: grid; min-width: 190px; }
.ag-semana-t small { font: 500 11.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.ag-semana-t b { font-size: 16px; font-weight: 600; }
.ag-semana-hoje { margin-left: auto; }
@media (max-width: 719.98px) {
  .ag-semana { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .ag-semana-t { grid-column: 2; }
  .ag-semana .btn > span { display: none; }
  .ag-semana-t { min-width: 0; text-align: center; }
  .ag-semana-hoje { grid-column: 1 / -1; margin: 0; justify-self: center; }
}
.ag-mes-t { margin: 0 4px; font-size: 18px; font-weight: 600; min-width: 170px; text-align: center; }
.ag-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.ag-leg span { display: inline-flex; align-items: center; gap: 5px; }
.ag-leg i { width: 10px; height: 10px; border-radius: 3px; background: var(--ts); border-left: 3px solid var(--tc); }
.ag-diarios { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); }
.ag-diarios .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.ag-link { border: 0; background: none; padding: 0; color: var(--fg); font: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ag-link:hover { text-decoration-color: currentColor; }
.ag-link .ic { width: 15px; height: 15px; }
.ag-mes { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.ag-sem, .ag-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.ag-sem span { padding: 7px 8px; background: var(--sunken); font: 500 11.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ag-grade { border-top: 1px solid var(--line); }
.ag-dia { display: flex; flex-direction: column; gap: 3px; min-height: 104px; padding: 6px; background: var(--surface); min-width: 0; }
.ag-dia.fds, .ag-dia.fer { background: var(--sunken); }
.ag-dia.fora { background: var(--bg); }
.ag-dia.fora .ag-dn, .ag-dia.fora .ag-ev { opacity: .55; }
.ag-dn { font: 500 12px var(--font-mono); color: var(--muted); align-self: flex-start; padding: 1px 6px; border-radius: 10px; }
.ag-dn small { display: none; }
.ag-dia.hoje .ag-dn { background: var(--accent); color: var(--accent-fg); }
.ag-so-cel { display: none; }

/* horários */
.ag-hor th small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.ag-hor td, .ag-hor th { vertical-align: top; }
.ag-hor tbody th { font: 600 14px var(--font-body); letter-spacing: 0; text-transform: none; color: var(--fg); white-space: nowrap; }
.ag-hor td b { display: block; font: 600 13px var(--font-mono); }
.ag-hor .hoje { background: var(--accent-soft); }
.ag-modo { display: inline-block; margin: 3px 4px 0 0; padding: 0 6px; border-radius: 4px; font-size: 12px; font-weight: 500; background: var(--sunken); color: var(--muted); }
.ag-modo.m-presencial { background: var(--jira-soft); color: var(--jira); }
.ag-modo.m-remoto { background: var(--st-done); color: var(--st-done-fg); }
.ag-modo.m-aus { background: var(--warn-soft); color: var(--warn); }
.ag-modo.m-fer { background: var(--st-done); color: var(--st-done-fg); }
.ag-sem-h { color: var(--muted); }

/* diálogos */
.ag-dlg {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 14px;
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
}
.ag-dlg::backdrop { background: rgba(15, 20, 28, .45); }
.ag-form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); margin: 0; }
.ag-form > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.ag-form > header h2 { margin: 0; font-size: 17px; font-weight: 600; }
.ag-dlg-corpo { padding: 16px 18px; overflow-y: auto; display: grid; grid-auto-rows: max-content; gap: 12px; }
.ag-form > footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--sunken); border-radius: 0 0 14px 14px; }
.ag-esp { flex: 1; }
.ag-perigo { color: var(--warn); }
.ag-perigo[data-confirmar] { background: var(--warn); border-color: var(--warn); color: #fff; }
.ag-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ag-campo { display: grid; gap: 4px; font-size: 13px; font-weight: 600; min-width: 0; }
.ag-campo[hidden] { display: none; }
.ag-campo small { font-weight: 400; color: var(--muted); font-size: 12px; }
.ag-l2 { grid-column: 1 / -1; }
.ag-campo input, .ag-campo select, .ag-campo textarea, .ag-hor-form input, .ag-hor-form select {
  width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--surface); color: var(--fg); font: 400 14px var(--font-body);
}
.ag-campo textarea { resize: vertical; }
.ag-campo input:focus, .ag-campo select:focus, .ag-campo textarea:focus, .ag-hor-form input:focus, .ag-hor-form select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.ag-hor-form input:disabled { opacity: .45; }
.ag-erro { margin: 0; color: var(--warn); font-size: 13.5px; font-weight: 600; }
.ag-erro:empty { display: none; }
.ag-fatos { margin: 0; display: grid; gap: 8px; }
.ag-fatos div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.ag-fatos dt { font: 500 11.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.ag-fatos dd { margin: 0; }
.ag-hor-form { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ag-hor-form th, .ag-hor-form td { padding: 4px; text-align: left; }
.ag-hor-form thead th { font: 500 11.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 719.98px) {
  .ag-sem { display: none; }
  .ag-mes { background: none; border: 0; border-radius: 0; overflow: visible; }
  .ag-grade { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; border: 0; }
  .ag-dia { min-height: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
  .ag-dia.vazio:not(.hoje), .ag-dia.fora { display: none; }
  .ag-dn small { display: inline; }
  .ag-dn { font-size: 13px; }
  .ag-ev { font-size: 13.5px; min-height: 30px; padding: 4px 9px; }
  .ag-so-cel { display: block; }
  .ag-mes-t { min-width: 0; font-size: 16px; }
  .ag-campos { grid-template-columns: minmax(0, 1fr); }
  .ag-fatos div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ag-dlg { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .ag-form { max-height: 92vh; }
}

/* planejar sprint */
.ag-sprint-atual { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 10px; border-radius: 8px; background: var(--accent-soft); font-size: 13.5px; }
.ag-sprint-atual .ic { width: 16px; height: 16px; color: var(--accent); flex: none; }
.ag-botoes { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-sprints { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.ag-sprints .chip { cursor: pointer; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 10px; font-size: 12.5px; font-weight: 600; color: var(--fg); }
.ag-sprints .chip:hover { border-color: var(--accent); }
.ag-sprints .chip b { color: var(--muted); }
.ag-dlg.ag-dlg-largo { width: min(680px, calc(100vw - 24px)); }
.ag-campos-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ag-ritos-wrap { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.ag-ritos td { padding: 6px; border-top: 1px solid var(--line); }
.ag-ritos thead th { padding: 8px 6px; background: var(--sunken); }
.ag-ritos tr.off td:not(:first-child) { opacity: .4; }
.ag-ritos tr.off .ag-rito span { color: var(--muted); font-weight: 500; }
.ag-rito { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ag-rito input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.ag-todo-dia { font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 719.98px) {
  .ag-campos-3 { grid-template-columns: minmax(0, 1fr); }
  .ag-ritos thead { display: none; }
  .ag-ritos, .ag-ritos tbody { display: block; }
  .ag-ritos tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
  .ag-ritos tr:first-child { border-top: 0; }
  .ag-ritos td { padding: 0; border: 0; }
  .ag-ritos td:first-child, .ag-ritos td:nth-child(2) { grid-column: 1 / -1; }
}

/* horários: outras formas de ver */
.m-presencial { --mc: var(--jira); --ms: var(--jira-soft); }
.m-remoto { --mc: var(--st-done-fg); --ms: var(--st-done); }
.m-aus { --mc: var(--warn); --ms: var(--warn-soft); }
.m-fer, .m-folga, .m-fora { --mc: var(--muted); --ms: var(--sunken); }
.m-comum { --mc: var(--accent); --ms: var(--accent-soft); }
.ag-per + .ag-per { margin-top: 6px; }

.ag-leg-modo i { background: color-mix(in srgb, var(--mc) 18%, var(--surface)); border-left-color: var(--mc); }

/* A: linha do tempo */
.ag-tl-dias { flex-wrap: wrap; justify-self: start; max-width: 100%; }
.ag-tl-dias small { font: 500 11px var(--font-mono); color: var(--muted); }
.ag-tl-wrap { min-width: 0; }
.ag-tl { display: grid; gap: 4px; }
.ag-tl-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; align-items: center; }
.ag-tl-row > span { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-tl-trilho {
  position: relative; height: 34px; border-radius: 6px; background-color: var(--sunken);
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--horas, 12)) 100%;
}
.ag-tl-esc .ag-tl-trilho { height: 16px; background: none; }
.ag-tl-esc i { position: absolute; top: 0; transform: translateX(-50%); font: 500 11px var(--font-mono); font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.ag-tl-esc i:first-child { transform: none; }
.ag-tl-esc i:last-child { transform: translateX(-100%); }
.ag-bar {
  position: absolute; top: 5px; bottom: 5px; display: flex; align-items: center; min-width: 3px; overflow: hidden;
  border-radius: 5px; background: color-mix(in srgb, var(--mc) 18%, var(--surface)); border-left: 3px solid var(--mc); font-style: normal;
}
.ag-bar span { padding: 0 6px; font: 600 11px var(--font-mono); color: var(--mc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ag-bar.m-fer { background: repeating-linear-gradient(135deg, var(--sunken) 0 6px, var(--line) 6px 8px); border-left-color: var(--line-strong); }
.ag-bar.sobre { z-index: 1; background: repeating-linear-gradient(135deg, var(--ms) 0 5px, var(--surface) 5px 8px); border: 1px dashed var(--mc); border-left-width: 3px; border-left-style: solid; }
.ag-tl-vazio { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 12.5px; font-style: normal; color: var(--muted); }
.ag-tl-agora { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--warn); z-index: 2; border-radius: 1px; }
.ag-tl-comum { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.ag-tl-comum > span { color: var(--accent); }

/* B: cartões por pessoa */
.ag-pcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.ag-pcard { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); min-width: 0; }
.ag-pcard-h { display: grid; gap: 2px; }
.ag-pcard-h b { font-size: 14.5px; }
.ag-st { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.ag-st i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line-strong); }
.ag-st.on i { background: var(--st-done-fg); box-shadow: 0 0 0 3px var(--st-done); }
.ag-st.aus i { background: var(--warn); }
.ag-mini { display: grid; gap: 4px; }
.ag-mini-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 70px; gap: 8px; align-items: center; }
.ag-mini-row > span { font: 500 11.5px var(--font-mono); color: var(--muted); text-transform: uppercase; }
.ag-mini-row > small { font: 500 11.5px var(--font-mono); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ag-mini-row.hoje > span, .ag-mini-row.hoje > small { color: var(--accent); font-weight: 700; }
.ag-tl-trilho.mini { height: 16px; border-radius: 4px; }
.ag-tl-trilho.mini .ag-bar { top: 3px; bottom: 3px; border-radius: 3px; border-left: 0; background: var(--mc); opacity: .75; }
.ag-tl-trilho.mini .ag-bar.m-fer { background: repeating-linear-gradient(135deg, var(--sunken) 0 4px, var(--line-strong) 4px 6px); opacity: 1; }
.ag-tl-trilho.mini .ag-bar.sobre { background: repeating-linear-gradient(135deg, var(--mc) 0 3px, transparent 3px 5px); border: 0; opacity: 1; }
.ag-tl-trilho.mini .ag-tl-vazio { display: none; }
.ag-mini-row.hoje .ag-tl-trilho.mini { box-shadow: 0 0 0 2px var(--accent-soft); }

/* gaveta do horário: a semana em abas (com prévia) e o editor do dia */
.ag-dlg.ag-gaveta {
  position: fixed; inset: 0 0 0 auto; margin: 0 0 0 auto; width: min(var(--painel-w), 100vw); height: 100dvh; max-height: 100dvh;
  border-radius: 0; box-shadow: var(--shadow-lg), -1px 0 0 var(--line); animation: ag-entra .2s ease;
}
.ag-gaveta .ag-form { height: 100%; max-height: 100dvh; }
.ag-gaveta .ag-dlg-corpo { flex: 1; align-content: start; }
.ag-gaveta .ag-form > footer { border-radius: 0; }
@keyframes ag-entra { from { transform: translateX(48px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ag-dlg.ag-gaveta { animation: none; } }
.ag-sem-f { display: grid; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
.ag-sem-tab { grid-template-columns: 34px minmax(0, 1fr) 84px; width: 100%; min-height: 34px; padding: 4px 8px; border: 0; border-radius: 7px; background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.ag-sem-tab:hover { background: var(--surface); }
.ag-sem-tab[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px var(--line-strong); }
.ag-sem-tab[aria-selected="true"] > span:first-child, .ag-sem-tab[aria-selected="true"] > small { color: var(--fg); font-weight: 700; }
.ag-sem-tab .ag-tl-trilho { display: block; background-color: var(--surface); }
.ag-sem-tab[aria-selected="true"] .ag-tl-trilho { background-color: var(--sunken); }
.ag-sem-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ag-dia-ed { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.ag-ed-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ag-ed-cab h3 { margin: 0; font-size: 16px; font-weight: 600; }
.seg.seg-sm button { min-height: 30px; padding: 0 10px; font-size: 13px; }
.ag-pers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ag-per-f { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "modo rem" "horas horas"; gap: 8px; align-items: center; padding: 10px; border-radius: 8px; background: var(--sunken); }
.ag-per-f > .seg { grid-area: modo; justify-self: start; background: var(--surface); }
.ag-per-f > [data-rem] { grid-area: rem; }
.ag-per-horas { grid-area: horas; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.ag-per-horas input { width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--fg); font: 400 14px var(--font-body); }
.ag-per-horas input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.ag-add { font-size: 13px; justify-self: start; }
.ag-dia-ed .ag-nota { margin: 0; }
.ag-ed-vazio { padding: 10px 0; }
.ag-copiar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.ag-copiar > span { margin-right: 2px; }
.ag-copiar .chip { cursor: pointer; color: var(--fg); font-weight: 600; }
.ag-copiar .chip:hover { border-color: var(--accent); }
.ag-copiado:empty { display: none; }
.ag-copiado { color: var(--accent); font-weight: 600; }

@media (max-width: 719.98px) {
  .ag-tl-row { grid-template-columns: 74px minmax(0, 1fr); gap: 8px; }
  .ag-tl-row > span { font-size: 12.5px; white-space: normal; line-height: 1.2; }
  .ag-tl-esc i.impar { display: none; }
  .ag-bar span { display: none; }
  .ag-tl-comum .ag-bar span { display: block; }
  .ag-dlg.ag-gaveta { width: 100vw; max-width: 100vw; max-height: 100dvh; margin: 0; border-radius: 0; }
}

/* horários em abas */
.ag-vista { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 4px 18px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ag-vista > .gf-abas { margin: 0 -18px; padding: 0 12px; }
.ag-vista-desc { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 72ch; }
.ag-vista-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.ag-vista-bar .ag-nota { max-width: 60ch; }
.ag-vista .tbl-wrap { border-radius: 8px; }
.ag-nome { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--fg); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.ag-nome:hover, .ag-nome:focus-visible { text-decoration-color: currentColor; }
span.ag-nome { cursor: default; }
.ag-riscado { opacity: .5; }
.ag-riscado b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
button.ag-nome { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
button.ag-nome > span { overflow: hidden; text-overflow: ellipsis; }
button.ag-nome .ic { flex: none; width: 14px; height: 14px; color: var(--muted); }
button.ag-nome:hover .ic, button.ag-nome:focus-visible .ic { color: var(--accent); }
.ag-pcard-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ag-pcard-t .btn { min-height: 28px; }
@media (max-width: 719.98px) {
  .ag-vista { padding: 4px 12px 14px; }
  .ag-vista > .gf-abas { margin: 0 -12px; padding: 0 6px; }
}
