/* ALVS STUDIO — paleta do canal (briefing 03/2026): 60 preto / 30 off-white em texto+superfície / 10 vermelho cirúrgico */
:root {
  --bg: #111111;          /* 60 — fundo */
  --surface: #1E1E1E;     /* superfície */
  --surface-2: #262626;
  --text: #F0EDE9;        /* 30 — texto */
  --muted: #9b968f;
  --line: #3A3A3A;        /* neutro estrutura */
  --red: #C0392B;         /* 10 — acento, MUITO POUCO */
  --ok: #6fae7c;
  --font-display: 'Anton', sans-serif;
  --font-body: 'Sora', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .6rem .7rem; font-size: .92rem; width: 100%; }
input:focus, textarea:focus, select:focus { outline: 1px solid var(--red); border-color: var(--red); }
textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.hidden { display: none !important; }

/* marca */
.brand { font-family: var(--font-display); font-size: 2.6rem; letter-spacing: .02em; color: var(--text); font-weight: 400; }
.brand span { color: var(--red); margin-left: .3rem; }
.brand.sm { font-size: 1.25rem; }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: .9rem; }
.login-sub { color: var(--muted); font-size: .85rem; margin-top: -0.4rem; }
.login-err { color: var(--red); font-size: .85rem; }

/* topo */
.topbar { display: flex; align-items: center; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 20; flex-wrap: wrap; }
.tabs { display: flex; gap: .25rem; flex: 1; overflow-x: auto; }
.tab { background: none; border: none; color: var(--muted); padding: .45rem .7rem; font-size: .88rem; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--text); border-bottom-color: var(--red); }
.sync { font-size: .8rem; color: var(--ok); }
.sync.dirty { color: var(--red); }

main { padding: 1rem; max-width: 1100px; margin: 0 auto; }

/* botões */
.btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 6px; padding: .55rem .9rem; font-size: .88rem; font-weight: 600; }
.btn:hover { border-color: var(--muted); }
.btn-red { background: var(--red); border-color: var(--red); color: var(--text); }
.btn-red:hover { filter: brightness(1.1); }
.btn-ghost { background: none; border: none; color: var(--muted); padding: .3rem .5rem; font-size: .82rem; }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: .3rem .6rem; font-size: .8rem; }

/* seções */
.view-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: .6rem 0 1.1rem; flex-wrap: wrap; }
.view-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; letter-spacing: .02em; }
.view-head .hint { color: var(--muted); font-size: .82rem; max-width: 46ch; }

/* ideias */
.idea-form { display: flex; flex-direction: column; gap: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: 1.2rem; }
.idea-form .row { display: flex; gap: .6rem; flex-wrap: wrap; }
.idea-form .row > * { flex: 1; min-width: 200px; }
.idea-list { display: flex; flex-direction: column; gap: .6rem; }
.idea { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .85rem 1rem; display: flex; gap: .9rem; align-items: flex-start; }
.idea.dim { opacity: .45; }
.idea .score-badge { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 500; min-width: 3.2rem; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .2rem; }
.idea .score-badge.go { border-color: var(--red); color: var(--red); }
.idea .score-badge.na { color: var(--muted); font-size: .8rem; }
.idea-body { flex: 1; }
.idea-body h3 { font-size: 1rem; font-weight: 700; }
.idea-body p { color: var(--muted); font-size: .86rem; }
.idea-actions { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }

/* score modal-inline */
.score-panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-top: .7rem; }
.score-item { display: grid; grid-template-columns: 1fr auto; gap: .3rem .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.score-item:last-of-type { border-bottom: none; }
.score-item .q { font-size: .84rem; color: var(--muted); grid-column: 1 / -1; }
.score-item .nome { font-weight: 600; font-size: .9rem; }
.score-item .nome em { color: var(--muted); font-style: normal; font-family: var(--font-mono); font-size: .75rem; margin-left: .4rem; }
.seg { display: flex; gap: .15rem; }
.seg button { width: 1.85rem; height: 1.85rem; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 5px; font-family: var(--font-mono); font-size: .8rem; }
.seg button.on { background: var(--red); border-color: var(--red); color: var(--text); }
.score-total { font-family: var(--font-mono); text-align: right; margin-top: .7rem; font-size: 1rem; }
.score-total b { color: var(--red); font-size: 1.3rem; }

/* pipeline */
.board { display: flex; gap: .7rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.col { min-width: 240px; max-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; flex-shrink: 0; }
.col-head { padding: .6rem .8rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.col-head h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.col-head .n { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }
.col-body { padding: .5rem; display: flex; flex-direction: column; gap: .5rem; min-height: 40px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; }
.card h4 { font-size: .88rem; font-weight: 700; line-height: 1.3; }
.card .meta { display: flex; gap: .5rem; margin-top: .35rem; font-family: var(--font-mono); font-size: .7rem; color: var(--muted); flex-wrap: wrap; }
.card .meta .esq { color: var(--red); }
.card-actions { display: flex; gap: .3rem; margin-top: .5rem; }
.gate { font-size: .72rem; color: var(--muted); border-top: 1px dashed var(--line); margin-top: .45rem; padding-top: .4rem; }

/* projeto (drill-in) */
.proj-head { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.proj-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.55rem; }
.proj-head .stage-pill { font-family: var(--font-mono); font-size: .72rem; border: 1px solid var(--red); color: var(--red); border-radius: 99px; padding: .15rem .6rem; text-transform: uppercase; letter-spacing: .06em; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: .9rem; overflow: hidden; }
.section > summary { list-style: none; padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.section > summary::-webkit-details-marker { display: none; }
.section > summary h3 { font-size: .95rem; font-weight: 700; }
.section > summary .state { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); }
.section > summary .state.ok { color: var(--ok); }
.section-body { padding: 0 1rem 1rem; border-top: 1px solid var(--line); }
.field { margin-top: .8rem; }
.field label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .35rem; font-weight: 700; }
.helper { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.pill-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.pill { border: 1px solid var(--line); border-radius: 99px; padding: .25rem .7rem; font-size: .78rem; background: var(--surface-2); color: var(--muted); }
.pill.on { border-color: var(--red); color: var(--text); }
.titulo-item { display: flex; gap: .5rem; align-items: center; margin-top: .45rem; }
.titulo-item input[type=radio] { width: auto; }
.titulo-item .len { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); min-width: 2.4rem; text-align: right; }
.titulo-item .len.over { color: var(--red); }
.check-row { display: flex; align-items: flex-start; gap: .55rem; padding: .4rem 0; font-size: .88rem; }
.check-row input { width: auto; margin-top: .25rem; }
.check-row .d { color: var(--muted); font-size: .78rem; }
.fato { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: start; padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.fato .fonte { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); word-break: break-all; }
.fato .no-fonte { color: var(--red); font-family: var(--font-mono); font-size: .72rem; }

/* beats */
.beat { border: 1px solid var(--line); border-radius: 10px; margin-top: .8rem; background: var(--bg); overflow: hidden; }
.beat-head { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.beat-head .n { font-family: var(--font-mono); color: var(--red); font-size: .78rem; min-width: 1.4rem; }
.beat-head h4 { font-size: .85rem; letter-spacing: .05em; flex: 1; }
.beat-head .timing { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.beat-job { padding: .5rem .8rem; font-size: .8rem; color: var(--muted); border-bottom: 1px dashed var(--line); }
.beat-job b { color: var(--text); font-weight: 600; }
.beat-cols { display: grid; grid-template-columns: 1fr; gap: .6rem; padding: .7rem .8rem; }
.beat-cols textarea { min-height: 88px; }
.beat-cols .col-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .25rem; font-weight: 700; }
.beat-foot { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem .7rem; }
.beat.done { border-color: var(--ok); }
.beat.done .beat-head .n { color: var(--ok); }
@media (min-width: 760px) { .beat-cols { grid-template-columns: 3fr 2fr; } }

/* aprendizado */
.table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: .8rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.table td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .8rem; }
.table td:first-child { font-family: var(--font-body); font-size: .85rem; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin-top: .6rem; }
.metric-grid .field { margin-top: 0; }

/* biblioteca */
.lib-esq { margin-bottom: 1rem; }
.lib-esq .tagline { color: var(--muted); font-size: .84rem; }
.lib-beat-line { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .85rem; }
.lib-beat-line .t { font-family: var(--font-mono); font-size: .72rem; color: var(--red); white-space: nowrap; }
.lib-beat-line .j { color: var(--muted); font-size: .8rem; grid-column: 2; }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .6rem 1.1rem; font-size: .85rem; z-index: 99; max-width: 90vw; }
.toast.err { border-color: var(--red); }

.empty { color: var(--muted); font-size: .86rem; padding: 1.2rem; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
