/* Jiraya — interface
   Tipografia: Atkinson Hyperlegible (legibilidade como princípio).
   Cores: tinta azul-petróleo, papel frio, marigold para "agora/ativo". */

:root {
  --ink: #1b2430;
  --ink-2: #4a5768;
  --ink-3: #6f7c8c;
  --paper: #f2f4f6;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #dbe1e8;
  --line-2: #c7d0da;
  --primary: #0e5e6f;
  --primary-ink: #ffffff;
  --primary-soft: #e3f0f2;
  --now: #d99a1c;
  --now-soft: #fbf1dc;
  --todo: #66768a;
  --todo-soft: #eceff3;
  --doing: #a8700b;
  --doing-soft: #f8edd6;
  --done: #2d7a4c;
  --done-soft: #e1f1e7;
  --danger: #b3261e;
  --danger-soft: #fbe6e4;
  --focus: #1d77d6;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(20, 32, 48, .06), 0 2px 8px rgba(20, 32, 48, .05);
  --side: 264px;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7ecf2; --ink-2: #b6c1ce; --ink-3: #8b98a8;
    --paper: #12171e; --surface: #1a212b; --surface-2: #202835; --line: #2c3644; --line-2: #3a4656;
    --primary: #4fb3c4; --primary-ink: #08242a; --primary-soft: #173840;
    --now: #f0b843; --now-soft: #3a2f17; --todo: #9aa8b8; --todo-soft: #252e3a;
    --doing: #f0b843; --doing-soft: #3a2f17; --done: #6fcf97; --done-soft: #183526;
    --danger: #ff8a80; --danger-soft: #3d1d1b; --focus: #7cb8ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink);
  background: var(--paper); font-variant-numeric: tabular-nums;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--ink-3); }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Estrutura ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; background: linear-gradient(to right, var(--surface) calc(var(--side) - 1px), var(--line) calc(var(--side) - 1px), var(--line) var(--side), transparent var(--side)); }
.side {
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; flex: none; object-fit: contain; }
.public-card .brand { flex-direction: column; gap: 6px; font-size: 1.35rem; padding-bottom: 22px; }
.public-card .brand-logo { width: 88px; height: 88px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .94rem; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.nav .sep { height: 1px; background: var(--line); margin: 10px 6px; }
.nav .count { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 7px; line-height: 18px; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who strong { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line);
  background: var(--surface); position: sticky; top: 0; z-index: 20;
}
.topbar .search { flex: 1; max-width: 520px; position: relative; }
.topbar .search input { padding-left: 36px; height: 38px; }
.topbar .search .ico { position: absolute; left: 11px; top: 10px; color: var(--ink-3); }
.topbar .bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: var(--ink-2); }
.topbar .bell:hover { background: var(--surface-2); }
.topbar .bell .dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem; display: grid; place-items: center; padding: 0 4px; }
.btn.menu-btn { display: none; }
.topbar .top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.content { padding: 28px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .lead { color: var(--ink-2); margin: 4px 0 0; max-width: 70ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-3); }

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
  .btn.menu-btn { display: inline-flex; }
  .app { background: none; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
}

/* ---------- Componentes ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.panel + .panel { margin-top: 18px; }
.grid > .panel + .panel, .grid > section + section { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.panel-head .muted { font-size: .88rem; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush .panel-head { padding: 16px 20px 0; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 1.7rem; line-height: 1.1; }
.stat span { color: var(--ink-2); font-size: .9rem; }
.stat a { margin-top: 6px; font-size: .88rem; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: .92rem;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: .84rem; border-radius: 7px; }
.btn.icon { width: 34px; padding: 0; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--todo-soft); color: var(--todo); white-space: nowrap; }
.chip.cat-a_fazer { background: var(--todo-soft); color: var(--todo); }
.chip.cat-em_andamento { background: var(--doing-soft); color: var(--doing); }
.chip.cat-concluido { background: var(--done-soft); color: var(--done); }
.chip.blocked { background: var(--danger-soft); color: var(--danger); }
.chip.now { background: var(--now-soft); color: var(--doing); }
.chip.outline { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); }
.chip.state-ativa { background: var(--now-soft); color: var(--doing); }
.chip.state-planejada { background: var(--primary-soft); color: var(--primary); }
.chip.state-concluida { background: var(--done-soft); color: var(--done); }
.chip.state-cancelada { background: var(--danger-soft); color: var(--danger); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: .75rem; padding: 1px 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }

.type { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; font-size: .7rem; font-weight: 700; color: #fff; flex: none; }
.type-historia { background: #2d7a4c; } .type-tarefa { background: #2f6db3; } .type-bug { background: #b3261e; }
.type-spike { background: #7b4bb7; } .type-subtarefa { background: #5b7083; } .type-epico { background: #a8700b; }
.prio { font-size: .78rem; font-weight: 700; }
.prio-mais_alta, .prio-alta { color: var(--danger); } .prio-media { color: var(--doing); } .prio-baixa, .prio-mais_baixa { color: var(--ink-3); }
.key { font-weight: 700; color: var(--ink-2); font-size: .85rem; white-space: nowrap; }

.avatar { --h: 200; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .72rem; font-weight: 700; flex: none;
  background: hsl(var(--h) 45% 88%); color: hsl(var(--h) 45% 28%); }
.avatar.lg { width: 40px; height: 40px; font-size: .9rem; }
.avatar.sm { width: 22px; height: 22px; font-size: .62rem; }
.avatar-empty { background: var(--surface-2); color: var(--ink-3); border: 1px dashed var(--line-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar:not(.avatar-empty) { background: hsl(var(--h) 30% 26%); color: hsl(var(--h) 60% 85%); } }

.progress { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--done); border-radius: 999px; }

/* Tabelas e listas */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-dragging { opacity: .4; }
.table tr.drop-before td { box-shadow: inset 0 3px 0 var(--primary); }
.table .num { text-align: right; }
.table-wrap { overflow-x: auto; }
.row-title { display: flex; align-items: center; gap: 9px; min-width: 260px; }
.row-title a { color: var(--ink); font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow a { color: var(--ink); font-weight: 600; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Formulários */
.form { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.field .help { font-size: .84rem; color: var(--ink-3); }
.field .err { font-size: .84rem; color: var(--danger); font-weight: 600; }
input[type=text], input[type=email], input[type=date], input[type=datetime-local], input[type=number], input[type=search], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 11px; min-height: 38px; height: 38px;
}
textarea { height: auto; }
select[multiple] { height: auto; }
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=file] { height: auto; padding: 6px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.invalid { border-color: var(--danger) !important; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 16px; }
.fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 14px; }
.fieldset legend { font-weight: 700; padding: 0 6px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 160px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; margin-bottom: 18px; }
.filters .field.wide { grid-column: auto; }
.filters > .btn { justify-self: start; }
@media (max-width: 720px) { .filters .field.wide { grid-column: auto; } }

/* Dicas de aprendizado */
.hint { position: relative; display: inline-flex; vertical-align: middle; }
.hint-icon { width: 18px; height: 18px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: .72rem; font-weight: 700; display: grid; place-items: center; cursor: help; }
.hint-text {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 300px;
  background: var(--ink); color: var(--paper); font-size: .82rem; font-weight: 400; line-height: 1.45; padding: 9px 12px; border-radius: 8px;
  opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 30; pointer-events: none; white-space: normal;
}
.hint:hover .hint-text, .hint:focus .hint-text, .hint:focus-within .hint-text { opacity: 1; visibility: visible; }
.learn {
  border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 10px 10px 0; padding: 12px 16px; color: var(--ink);
  font-size: .92rem; margin-bottom: 18px;
}
.learn strong { color: var(--primary); }
.learn p:last-child { margin-bottom: 0; }
.learn details summary { cursor: pointer; font-weight: 700; color: var(--primary); }

/* Mensagens */
.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid; font-size: .93rem; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert.ok { background: var(--done-soft); border-color: color-mix(in srgb, var(--done) 35%, transparent); color: var(--done); }
.alert.erro { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.alert.aviso { background: var(--now-soft); border-color: color-mix(in srgb, var(--now) 45%, transparent); color: var(--doing); }
.alert.info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); color: var(--primary); }
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 100; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: .92rem; animation: toast-in .18s ease-out; }
.toast.erro { background: var(--danger); color: #fff; }
.toast ul { margin: 6px 0 0; padding-left: 18px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.empty { text-align: center; padding: 34px 20px; color: var(--ink-2); }
.empty h3 { color: var(--ink); }
.empty p { max-width: 52ch; margin: 0 auto 14px; }

dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15, 22, 30, .45); }
dialog .dlg-body { padding: 22px 22px 8px; }
dialog .dlg-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }

/* Faixa da sprint: o elemento-assinatura */
.sprint-ribbon { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 20px; display: grid; gap: 12px; }
.sprint-ribbon .goal { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.sprint-ribbon .goal strong { font-size: 1.08rem; }
.sprint-ribbon .goal .label { color: var(--ink-3); font-size: .85rem; font-weight: 700; }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.days span { height: 10px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); }
.days span.past { background: var(--primary-soft); border-color: transparent; }
.days span.today { background: var(--now); border-color: var(--now); }
.days span.off { opacity: .45; }
.ribbon-meta { display: flex; justify-content: space-between; color: var(--ink-3); font-size: .84rem; gap: 10px; flex-wrap: wrap; }

/* Quadro */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(184px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 240px; }
.col-head { padding: 12px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.col-head h3 { margin: 0; font-size: .92rem; }
.col-head .n { margin-left: auto; color: var(--ink-3); font-size: .82rem; font-weight: 700; }
.col-head .bar { width: 4px; height: 16px; border-radius: 2px; }
.col[data-cat="a_fazer"] .bar { background: var(--todo); }
.col[data-cat="em_andamento"] .bar { background: var(--doing); }
.col[data-cat="concluido"] .bar { background: var(--done); }
.col.over-wip .col-head .n { color: var(--danger); }
.col-body { padding: 10px; display: grid; gap: 9px; flex: 1; align-content: start; min-height: 120px; }
.col.drop-target { outline: 2px dashed var(--primary); outline-offset: -4px; background: var(--primary-soft); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; display: grid; gap: 8px; cursor: grab; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.card:hover { border-color: var(--line-2); }
.card.is-dragging { opacity: .45; }
.card.is-blocked { border-left: 4px solid var(--danger); }
.card .t { font-weight: 600; font-size: .92rem; line-height: 1.35; color: var(--ink); }
.card .t:hover { color: var(--primary); }
.card .meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card .meta.top { flex-wrap: nowrap; min-width: 0; }
.card .meta.top small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card .meta .push { margin-left: auto; }
.card .pts { font-size: .76rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.card .move { display: grid; gap: 6px; }
.card .move select { width: 100%;  min-height: 30px; height: 30px; padding: 2px 8px; font-size: .82rem; }
.card .blockmsg { font-size: .8rem; color: var(--danger); font-weight: 600; }

/* Item */
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1080px) { .item-layout { grid-template-columns: 1fr; } }
.props { display: grid; gap: 12px; }
.props .row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; font-size: .92rem; }
.props .row > span:first-child { color: var(--ink-3); font-weight: 700; font-size: .84rem; }
.desc { white-space: pre-wrap; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.checklist li.ok { border-color: color-mix(in srgb, var(--done) 40%, var(--line)); background: var(--done-soft); }
.checklist li .grow { flex: 1; }
.gwt b { display: inline-block; min-width: 54px; color: var(--primary); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.comment { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 32px 1fr; gap: 10px; }
.comment .body { white-space: pre-wrap; }
.dynrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.dynrow.gwt3 { grid-template-columns: 1fr 1fr 1fr auto; }
@media (max-width: 720px) { .dynrow.gwt3 { grid-template-columns: 1fr; } }

/* Calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: var(--surface-2); padding: 8px; font-size: .8rem; font-weight: 700; color: var(--ink-3); text-align: center; }
.cal .day { background: var(--surface); min-height: 112px; padding: 6px 7px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day.out { background: var(--surface-2); color: var(--ink-3); }
.cal .day .d { font-size: .82rem; font-weight: 700; }
.cal .day.today .d { background: var(--now); color: #fff; border-radius: 999px; width: 24px; height: 24px; display: grid; place-items: center; }
.cal .ev { font-size: .74rem; line-height: 1.3; padding: 2px 6px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cal .ev.sprint { background: var(--now-soft); color: var(--doing); }
.cal .ev.prazo { background: var(--danger-soft); color: var(--danger); }
.cal .ev.ausencia { background: var(--todo-soft); color: var(--todo); }
@media (max-width: 720px) { .cal .day { min-height: 70px; } .cal .ev { font-size: 0; height: 6px; padding: 0; } }

/* Gráficos */
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .ideal { stroke: var(--ink-3); stroke-dasharray: 5 4; fill: none; stroke-width: 1.5; }
.chart .actual { stroke: var(--primary); fill: none; stroke-width: 2.5; }
.chart .scope { stroke: var(--now); fill: none; stroke-width: 2; }
.chart .done { stroke: var(--done); fill: none; stroke-width: 2.5; }
.chart .dotp { fill: var(--primary); }
.chart .bar { fill: var(--primary); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

/* Página pública */
.public { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.public-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.public-card.wide { width: min(760px, 100%); }
.public-card .brand { padding: 0 0 18px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 46px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 1rem; }
.gbtn:hover { background: var(--surface-2); text-decoration: none; }
.gbtn svg { width: 20px; height: 20px; }

/* Assistente */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.steps li::before { counter-increment: s; content: counter(s); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.steps li.done::before { content: "✓"; background: var(--done); border-color: var(--done); color: #fff; }
.steps li.next { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.steps li p { margin: 2px 0 0; color: var(--ink-3); font-size: .9rem; }

/* Guia */
.guide { max-width: 78ch; }
.guide h2 { margin-top: 1.6em; }
.guide .pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.toc { position: sticky; top: 80px; }
.toc a { display: block; padding: 5px 0; color: var(--ink-2); font-size: .92rem; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.split-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; } .gap-s { gap: 8px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hide-sm { }
@media (max-width: 720px) { .hide-sm { display: none !important; } }

.event-card { gap: 6px; }
.event-card .btn { margin-top: auto; }
.chip.fixed { min-width: 170px; justify-content: center; }
.item-layout > *, .grid > * { min-width: 0; }
.checklist li select { width: 170px; flex: none; }
.page-head > div:first-child { flex: 1 1 420px; min-width: 0; }
.page-head .actions { align-self: flex-start; }
.card .claim { height: 24px; padding: 0 8px; font-size: .75rem; border-radius: 6px; }
.card .meta.top .push { flex: none; }
.card .meta.top .key { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .grid.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat b { font-size: 1.35rem; } }
.card .claim-full { width: 100%; }
.public-card.center { text-align: center; } .public-card.center .btn { margin: 0 auto; }
.gsi-slot { display: flex; justify-content: center; min-height: 44px; align-items: center; }
.gsi-slot.is-busy { opacity: .5; pointer-events: none; }
