/* Tokens e peças comuns às telas da plataforma; copiado de docs/design/plataforma (base:start…base:end). */
@font-face { font-family: "Bricolage Grotesque"; src: local("Bricolage Grotesque"), url("fonts/BricolageGrotesque-Bold.ttf") format("truetype"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: local("Bricolage Grotesque"), url("fonts/BricolageGrotesque-Regular.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Corpo"; src: local("Figtree"), url("fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Corpo"; src: local("Figtree Bold"), url("fonts/InstrumentSans-Bold.ttf") format("truetype"); font-weight: 600 800; font-display: swap; }
:root {
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --text: "Figtree", "Corpo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-xs: .78rem; --t-sm: .875rem; --t-md: 1rem; --t-lg: 1.125rem; --t-xl: 1.45rem; --t-2xl: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem);
  --r-sm: 6px; --r: 10px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --bg: #f3f4f7; --surface: #ffffff; --surface-2: #e9ecf1; --ink: #1b1f27; --ink-2: #566070;
  --line: #d8dde6; --line-strong: #b9c1cd;
  --accent: #4f46e5; --accent-hover: #3f37c9; --accent-soft: #eceefc; --on-accent: #ffffff;
  --brand: #6366f1; --brand-2: #fbbf24;
  --ok: #1a7a4a; --ok-soft: #e1f3e8; --warn: #8f5300; --warn-soft: #fbefd9;
  --danger: #bd2c3d; --danger-soft: #fbe6e9; --info: #2457c5; --info-soft: #e4ecfb;
  --neutral: #566070; --neutral-soft: #e9ecf1;
  --c-spec: #3b82f6; --c-design: #ec4899; --c-coder: #10b981; --c-code-review: #eab308; --c-qa: #f97316; --c-memory: #14b8a6; --c-aio: #6366f1;
  --shadow-1: 0 1px 2px rgb(27 31 39 / 6%), 0 6px 18px rgb(27 31 39 / 7%);
  --shadow-2: 0 2px 6px rgb(27 31 39 / 8%), 0 18px 44px rgb(27 31 39 / 16%);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: only light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 8rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -.015em; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--t-2xl); } h2 { font-size: var(--t-xl); } h3 { font-size: var(--t-md); }
p { margin: 0; } ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.muted { color: var(--ink-2); } .small { font-size: var(--t-sm); } .xs { font-size: var(--t-xs); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font: .86em var(--mono); background: var(--surface-2); padding: .05em .35em; border-radius: 4px; }

.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) clamp(var(--s-4), 3vw, var(--s-6)); min-height: 56px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: var(--s-2); color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: var(--t-lg); flex: none; }
.brand img { width: 34px; height: auto; } .brand .a { color: var(--accent); }
/* "AioSquads" é mais larga que a marca antiga: no celular, o ícone e a letra diminuem para caber na barra */
@media (max-width: 700px) { .brand { font-size: var(--t-md); gap: 6px; } .brand img { width: 28px; } .topbar-row { gap: var(--s-2); } }
.nav-topo { display: flex; gap: var(--s-1); } .nav-topo a { color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: var(--t-sm); padding: .35rem .7rem; border-radius: var(--r-sm); } .nav-topo a:hover { background: var(--surface-2); color: var(--ink); } .nav-topo a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.nav-topo .n { background: var(--brand-2); color: #3b2a00; border-radius: var(--r-pill); font-size: .7rem; font-weight: 800; padding: 0 .42rem; margin-left: .35rem; }
/* abaixo de 900 px, as seções descem para uma linha própria, rolável na horizontal */
@media (max-width: 900px) {
  .topbar-row { flex-wrap: wrap; row-gap: 0; }
  .nav-topo { order: 1; flex: 1 0 100%; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; scrollbar-width: none; margin-inline: calc(-1 * clamp(var(--s-4), 3vw, var(--s-6))); padding: 0 clamp(var(--s-4), 3vw, var(--s-6)) var(--s-2); }
  .nav-topo::-webkit-scrollbar { display: none; }
  .nav-topo a { flex: none; }
}
@media (max-width: 700px) { .nav-topo a { display: inline-flex; align-items: center; min-height: 44px; } .nav-topo { padding-bottom: var(--s-1); } }
/* o aviso de cadastros esperando (Administração e Meus times do admin) */
.aviso-cad { display: flex; gap: var(--s-4); align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 35%, transparent); border-radius: var(--r); padding: var(--s-3) var(--s-4); }
.aviso-cad b { color: var(--info); font-family: var(--display); font-size: var(--t-md); }
.crumbs { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); color: var(--ink-2); min-width: 0; }
.crumbs a { color: var(--ink-2); text-decoration: none; font-weight: 600; } .crumbs a:hover { color: var(--ink); }
.crumbs strong { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow { flex: 1; min-width: 0; }
.user { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); color: var(--ink-2); }
.user .ini { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font: 700 .75rem var(--display); color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 40px; padding: .45rem .95rem; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 650; font-size: var(--t-sm); text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s var(--ease); }
.btn:hover { background: var(--surface-2); } .btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); } .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); } .btn-ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); } .btn-danger:hover { background: var(--danger-soft); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn-sm { min-height: 32px; padding: .2rem .65rem; font-size: var(--t-xs); border-radius: var(--r-sm); }
.btn-lg { min-height: 54px; padding: .7rem 1.6rem; font: 700 var(--t-lg) var(--display); border-radius: var(--r-lg); }
.btn svg { width: 16px; height: 16px; flex: none; }

.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.estado { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .65rem .2rem .5rem; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 700; background: var(--neutral-soft); color: var(--neutral); white-space: nowrap; }
.estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.estado[data-e="ligado"] { background: var(--ok-soft); color: var(--ok); }
.estado[data-e="subindo"], .estado[data-e="desligando"] { background: var(--info-soft); color: var(--info); }
.estado[data-e="subindo"]::before, .estado[data-e="desligando"]::before { animation: pulsar 1.1s ease-in-out infinite; }
.estado[data-e="erro"] { background: var(--danger-soft); color: var(--danger); }
@keyframes pulsar { 50% { opacity: .25; transform: scale(.7); } }

/* avatar: a cabeça do mascote recortada num círculo com a cor do papel */
.av { --c: var(--brand); --d: 40px; width: var(--d); height: var(--d); border-radius: 50%; overflow: hidden; flex: none; background: color-mix(in srgb, var(--c) 20%, var(--surface)); border: 2px solid color-mix(in srgb, var(--c) 55%, var(--surface)); display: block; position: relative; }
.av img { position: absolute; width: 160%; max-width: none; left: -30%; top: -12%; }
.av[data-r="spec"] { --c: var(--c-spec); } .av[data-r="design"] { --c: var(--c-design); } .av[data-r="coder"] { --c: var(--c-coder); }
.av[data-r="code-review"] { --c: var(--c-code-review); } .av[data-r="qa"] { --c: var(--c-qa); } .av[data-r="memory"] { --c: var(--c-memory); } .av[data-r="aio"] { --c: var(--c-aio); }
.av[data-r="aio"] img { width: 112%; left: -6%; top: 11%; } /* o Aio tem outra proporção: a cabeça inteira no círculo */
.av.voce { display: grid; place-items: center; background: var(--surface-2); border-color: var(--line-strong); font: 700 .7rem var(--display); color: var(--ink); }

.switch { position: relative; width: 38px; height: 22px; flex: none; border-radius: 999px; border: 0; background: var(--line-strong); transition: background .2s; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--spring); box-shadow: 0 1px 2px rgb(0 0 0 / 30%); }
.switch[aria-checked="true"] { background: var(--accent); } .switch[aria-checked="true"]::after { transform: translateX(16px); }
.switch[disabled] { opacity: .55; cursor: not-allowed; }

.field { display: grid; gap: .3rem; } .field > label, .label { font-weight: 650; font-size: var(--t-sm); }
.input { width: 100%; min-height: 44px; padding: .5rem .75rem; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); }
.input:focus-visible { border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: var(--t-xs); color: var(--ink-2); } .erro-txt { font-size: var(--t-sm); color: var(--danger); font-weight: 600; }

dialog { border: 0; padding: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); width: min(480px, calc(100vw - 2rem)); }
dialog::backdrop { background: rgb(15 18 28 / 55%); backdrop-filter: blur(3px); }
dialog[open] { animation: surgir .25s var(--ease); }
.dlg { padding: var(--s-5); display: grid; gap: var(--s-4); } .dlg-acoes { display: flex; gap: var(--s-2); justify-content: flex-end; flex-wrap: wrap; }
@keyframes surgir { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
/* base:end */
/* Acréscimos da plataforma: o selo do admin no topo de todas as telas. */
.selo-admin { font-size: var(--t-xs); font-weight: 700; background: var(--ink); color: var(--bg); padding: .1rem .55rem; border-radius: 999px; }
/* Os atalhos do board e do código do time (o cartão em Meus times e a faixa do detalhe), numa aba nova. */
:root { --ado: #0078d4; }
.atalho { position: relative; z-index: 1; /* acima do link que cobre o cartão inteiro */
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: 100%; padding: .1rem .6rem .1rem .5rem;
  border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--ink-2); font-size: var(--t-xs); font-weight: 650; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s; }
.atalho .marca { width: 14px; height: 14px; flex: none; } .atalho .marca.ado { color: var(--ado); }
.atalho span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atalho .fora { width: 9px; height: 9px; flex: none; opacity: .6; }
.atalho:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); } .atalho:hover .fora { opacity: 1; }
@media (max-width: 700px) { .atalho { min-height: 34px; padding-inline: .65rem .75rem; } }

/* A cobrança no topo de toda página: o saldo e a faixa de créditos zerados. */
:root { --warn-fill: #d98a00; }
.faixa-zero { background: var(--danger); color: #fff; }
.faixa-zero > div { max-width: 1180px; margin: 0 auto; padding: var(--s-2) var(--s-4) var(--s-2) var(--s-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); font-weight: 650; font-size: var(--t-sm); }
.faixa-zero p { flex: 1 1 280px; } .faixa-zero .btn { background: var(--surface); border-color: var(--surface); color: var(--danger); }
.saldo-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .8rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 700; font-size: var(--t-sm); font-variant-numeric: tabular-nums; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.saldo-chip:hover { border-color: var(--accent); } .saldo-chip:focus-visible { border-radius: var(--r-pill); }
.saldo-chip svg { width: 15px; height: 15px; flex: none; color: var(--ink-2); }
.saldo-chip[data-n="ambar"] { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.saldo-chip[data-n="vermelho"] { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.saldo-chip[data-n] svg { color: currentColor; }
.saldo-chip.pulso { animation: pulso .9s var(--ease); }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 70%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@media (max-width: 700px) { .saldo-chip { min-height: 44px; } .faixa-zero .btn { flex: 1 1 100%; } }
