/* ProFeedback: sistema de design do produto (painel app., telas de login e paginas de apoio).
   CSS proprio, sem framework nem CDN. Tema escuro fixo da casa: fundo #050A14, superficie
   #0A1128, menta #1BC495, acentos #22D3EE e #F87171, Inter auto-hospedada.
   Texto sobre a menta sempre na tinta escura (contraste AA). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 800;
  font-display:optional;
  src: url("../fonts/inter-var.260c81a4759b.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.12%;
  ascent-override: 90.49%;
  descent-override: 22.56%;
  line-gap-override: 0%;
}

:root {
  color-scheme: dark;
  --bg: #050A14;
  --surface: #0A1128;
  --surface-2: rgba(248, 249, 250, 0.035);
  --surface-3: rgba(248, 249, 250, 0.07);
  --line: rgba(248, 249, 250, 0.08);
  --line-2: rgba(248, 249, 250, 0.16);
  --text: #F8F9FA;
  --text-2: rgba(248, 249, 250, 0.74);
  --text-3: rgba(248, 249, 250, 0.58);
  --brand: #1BC495;
  --brand-2: #2EE3B1;
  --brand-soft: rgba(27, 196, 149, 0.14);
  --cyan: #22D3EE;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --red: #F87171;
  --red-soft: rgba(248, 113, 113, 0.14);
  --amber: #FBBF24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --ink: #04140F;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 3px rgba(27, 196, 149, 0.35);
  --font: "Inter", "Inter Fallback", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(70rem 32rem at 10% -12%, rgba(27, 196, 149, 0.12), transparent 60%),
    radial-gradient(50rem 26rem at 100% 0%, rgba(34, 211, 238, 0.07), transparent 60%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible { outline: 2px solid transparent; box-shadow: var(--ring); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.1rem; font-weight: 650; }
h3 { font-size: 0.95rem; font-weight: 600; }
p { margin: 0 0 0.75rem; }
code, pre, .mono { font-family: var(--mono); font-size: 0.88em; }
code { color: var(--text); background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
pre { margin: 0; padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: #030710; border: 1px solid var(--line); overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; font-size: 0.82rem; color: rgba(248, 249, 250, 0.9); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
svg { display: inline-block; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- texto ---------- */
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.78rem; }
.strong { font-weight: 600; color: var(--text); }
.eyebrow { display: inline-block; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.eyebrow.brand { color: var(--brand); }
.break { overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.c-brand { color: var(--brand); }
.c-cyan { color: var(--cyan); }
.c-red { color: var(--red); }
.c-amber { color: var(--amber); }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 44rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.6rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.row-end { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 1rem; }
.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)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: auto; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- cabecalho de pagina ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head .crumb { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--text-3); margin-bottom: 0.35rem; }
.page-head .crumb:hover { color: var(--text); }
.page-head .sub { margin-top: 0.3rem; color: var(--text-3); font-size: 0.86rem; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lead { font-size: 1.02rem; color: var(--text-2); max-width: 46rem; }

/* ---------- botoes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.6rem 1rem; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 0.9rem; font-weight: 600; line-height: 1.2; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand); color: var(--ink); box-shadow: 0 8px 24px -10px rgba(27, 196, 149, 0.7); }
.btn-primary:hover { background: var(--brand-2); color: var(--ink); }
.btn-outline { background: transparent; color: var(--brand); border-color: rgba(27, 196, 149, 0.5); }
.btn-outline:hover { background: var(--brand-soft); color: var(--brand-2); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: rgba(248, 113, 113, 0.3); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.22); color: var(--red); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { padding: 0.8rem 1.3rem; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn svg { width: 1em; height: 1em; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--brand); cursor: pointer; }
.link-btn:hover { color: var(--brand-2); }
.link-btn.danger { color: var(--red); }
.link-btn.cyan { color: var(--cyan); }
.link-btn.quiet { color: var(--text-2); font-weight: 500; }
.link-btn.quiet:hover { color: var(--text); }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field > span, .field > label, label.lbl { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.input, .select, .textarea, input:not([type]), input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; padding: 0.6rem 0.8rem; border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(5, 10, 20, 0.65); color: var(--text); font: inherit; font-size: 0.92rem; line-height: 1.3;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: rgba(248, 249, 250, 0.38); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: var(--ring); outline: 2px solid transparent; }
input[type="checkbox"], input[type="radio"] { width: 1rem; height: 1rem; accent-color: var(--brand); margin: 0; }
input[type="file"] { padding: 0.45rem; color: var(--text-2); }
input[type="file"]::file-selector-button { font: inherit; font-size: 0.82rem; font-weight: 600; margin-right: 0.75rem; padding: 0.35rem 0.7rem; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23A3A8B3' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.6rem center; padding-right: 2rem; }
select option { background: var(--surface); color: var(--text); }
textarea { resize: vertical; min-height: 6rem; }
.check { display: flex; align-items: flex-start; gap: 0.55rem; font-size: 0.9rem; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 0.2rem; }
.help { font-size: 0.8rem; color: var(--text-3); }
.code-input { font-family: var(--mono); letter-spacing: 0.5em; text-align: center; font-size: 1.25rem; }
.input-mono { font-family: var(--mono); font-size: 0.82rem; }
.pw-wrap { position: relative; display: block; }
.pw-eye { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); width: auto; margin: 0; padding: 0.3rem; background: none; border: 0; cursor: pointer; color: var(--text-3); display: flex; border-radius: 6px; }
.pw-eye:hover { color: var(--text); }
.form-errors ul { margin: 0; padding-left: 1.1rem; }
.errorlist { margin: 0.25rem 0 0; padding-left: 1.1rem; font-size: 0.82rem; color: var(--red); }
.helptext { display: block; font-size: 0.78rem; color: var(--text-3); margin-top: 0.3rem; }
form p { margin: 0 0 0.9rem; }
form p label { display: block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 0.35rem; }

/* ---------- cartoes ---------- */
.card { background: rgba(10, 17, 40, 0.72); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(10px); }
.card-pad { padding: 1.1rem 1.25rem; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); }
.card-foot { padding: 0.7rem 1.25rem; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--text-3); }
.card.ok { border-color: rgba(27, 196, 149, 0.4); background: rgba(27, 196, 149, 0.06); }
.card.warn { border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.05); }
.card.bad { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.06); }
.kpi { padding: 1rem 1.15rem; }
.kpi .label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.kpi .value { margin-top: 0.3rem; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .value.sm { font-size: 1.3rem; }
.kpi .hint { margin-top: 0.3rem; font-size: 0.8rem; color: var(--text-3); }
.chart { height: 16rem; }
.chart-tall { height: 18rem; }
.secret { display: block; padding: 0.8rem 1rem; border-radius: 10px; background: #030710; border: 1px solid rgba(27, 196, 149, 0.35); color: var(--brand); font-family: var(--mono); font-size: 0.88rem; overflow-wrap: anywhere; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tbl th { text-align: left; padding: 0.7rem 1rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 0.7rem 1rem; border-top: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.tbl tr:first-child td { border-top: 0; }
.tbl tbody tr:hover td { background: rgba(248, 249, 250, 0.025); }
.tbl td.strong, .tbl td a.strong { color: var(--text); font-weight: 600; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .actions { display: flex; justify-content: flex-end; gap: 0.9rem; align-items: center; }
.tbl form { display: inline; margin: 0; }

/* ---------- etiquetas, alertas, vazio ---------- */
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--brand-soft); color: var(--brand); border-color: rgba(27, 196, 149, 0.3); }
.badge.info { background: var(--cyan-soft); color: var(--cyan); border-color: rgba(34, 211, 238, 0.3); }
.badge.warn { background: var(--amber-soft); color: var(--amber); border-color: rgba(251, 191, 36, 0.3); }
.badge.bad { background: var(--red-soft); color: var(--red); border-color: rgba(248, 113, 113, 0.3); }
.badge.muted { background: var(--surface-3); color: var(--text-2); border-color: var(--line-2); }
.badge.plain::before { display: none; }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; height: 2.1rem; padding: 0 0.4rem; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score.pro { background: var(--brand-soft); color: var(--brand); }
.score.neu { background: var(--amber-soft); color: var(--amber); }
.score.det { background: var(--red-soft); color: var(--red); }
.alert { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.8rem 1rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 0.9rem; color: var(--text-2); }
.alert svg { width: 1.1rem; height: 1.1rem; flex: none; margin-top: 0.1rem; }
.alert.ok { border-color: rgba(27, 196, 149, 0.4); background: rgba(27, 196, 149, 0.08); color: var(--brand); }
.alert.err { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.09); color: var(--red); }
.alert.warn { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); color: #FDE68A; }
.alert.info { border-color: rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.08); color: var(--cyan); }
.alert a { color: inherit; text-decoration: underline; }
.alert .row { width: 100%; }
.empty { padding: 2.5rem 1.5rem; text-align: center; color: var(--text-3); }
.empty .icon { width: 3rem; height: 3rem; margin: 0 auto 0.8rem; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--brand); }
.empty .icon svg { width: 1.4rem; height: 1.4rem; }
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 0.25rem; }
.empty p { margin: 0; font-size: 0.88rem; }
.progress { height: 0.5rem; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.progress i.hot { background: var(--red); }

/* ---------- toasts (mensagens do Django) ---------- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: flex; flex-direction: column; gap: 0.5rem; max-width: min(26rem, calc(100vw - 2rem)); }
.toast { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.75rem 0.9rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 0.88rem; color: var(--text); animation: toast-in 0.25s ease-out; }
.toast.success { border-color: rgba(27, 196, 149, 0.5); }
.toast.error { border-color: rgba(248, 113, 113, 0.5); }
.toast.warning { border-color: rgba(251, 191, 36, 0.5); }
.toast .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-top: 0.45rem; flex: none; background: var(--cyan); }
.toast.success .dot { background: var(--brand); }
.toast.error .dot { background: var(--red); }
.toast.warning .dot { background: var(--amber); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--text-3); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.1rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- barra do painel ---------- */
.topbar { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); background: rgba(10, 17, 40, 0.78); backdrop-filter: blur(12px); }
.topbar .container { display: flex; align-items: center; gap: 1rem; height: 3.9rem; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { height: 1.45rem; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 0.15rem; }
.nav a { padding: 0.45rem 0.75rem; border-radius: 9px; font-size: 0.88rem; font-weight: 500; color: var(--text-2); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }
.nav-toggle { display: none; margin-left: auto; width: 2.4rem; height: 2.4rem; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; place-items: center; }
.nav-toggle svg { width: 1.2rem; height: 1.2rem; }
.menu { position: relative; margin-left: auto; }
.menu-btn { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.25rem 0.7rem 0.25rem 0.25rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; max-width: 18rem; }
.menu-btn:hover { background: var(--surface-3); }
.avatar { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; flex: none; }
.menu-btn .who { font-size: 0.85rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn svg { width: 0.9rem; height: 0.9rem; color: var(--text-3); flex: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 0.5rem); width: 18rem; max-width: calc(100vw - 2rem); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; font-size: 0.88rem; }
.menu-panel[hidden] { display: none; }
.menu-panel .head { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.menu-panel .head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-panel .head span { display: block; font-size: 0.78rem; color: var(--text-3); margin-top: 0.1rem; }
.menu-panel .group { padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.menu-panel .group:last-child { border-bottom: 0; }
.menu-panel .group .eyebrow { display: block; padding: 0.35rem 1rem 0.2rem; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 0.5rem 1rem; color: var(--text-2); background: none; border: 0; font: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); color: var(--text); }
.menu-panel button.danger { color: var(--red); }
.menu-panel button.danger:hover { background: var(--red-soft); }
.banner-impersonate { background: var(--amber); color: var(--ink); font-size: 0.86rem; font-weight: 600; text-align: center; padding: 0.5rem 1rem; }
.banner-impersonate a { color: inherit; text-decoration: underline; margin-left: 0.5rem; }
.app-main { padding: 2rem 0 3rem; }
.app-foot { padding: 1.25rem 0 2rem; }
.app-foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; border-top: 1px solid var(--line); padding-top: 1.1rem; font-size: 0.84rem; }
.app-foot a { color: var(--text-3); }
.app-foot a:hover { color: var(--text); }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; padding: 0.5rem; gap: 0.1rem; background: var(--surface); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-toggle { display: grid; }
  .menu { margin-left: 0; }
  .menu-btn .who { display: none; }
  .page-head { margin-bottom: 1.25rem; }
  .app-main { padding: 1.4rem 0 2.5rem; }
}

/* ---------- escala de notas (lancar nota) ---------- */
.scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 0.4rem; }
.scale label { position: relative; display: block; cursor: pointer; }
.scale input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.scale span { display: flex; align-items: center; justify-content: center; min-height: 2.7rem; border-radius: 9px; font-weight: 700; border: 1px solid var(--line-2); background: var(--surface-2); transition: background 0.12s, border-color 0.12s, color 0.12s; }
.scale label:hover span { border-color: rgba(248, 249, 250, 0.4); }
.scale input:focus-visible + span { box-shadow: var(--ring); }
.scale .det input:checked + span { background: var(--red); border-color: var(--red); color: var(--ink); }
.scale .neu input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.scale .pro input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.scale-legend { display: flex; justify-content: space-between; margin-top: 0.4rem; font-size: 0.76rem; color: var(--text-3); }
@media (max-width: 560px) { .scale { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- passos (completar cadastro) ---------- */
.step { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.15rem; }
.step .n { width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--text-3); border: 2px solid var(--line-2); }
.step .n.done { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.step .n.todo { color: var(--amber); border-color: rgba(251, 191, 36, 0.5); }
.step .n svg { width: 1.1rem; height: 1.1rem; }
.step .body { flex: 1; min-width: 0; }
.step .body b { display: block; font-weight: 600; }
.step .body .small { color: var(--text-3); margin-top: 0.15rem; }
.step .end { flex: none; align-self: center; }
@media (max-width: 560px) { .step { flex-wrap: wrap; } .step .end { width: 100%; } }

/* ---------- anel de trial ---------- */
.ring { position: relative; width: 4rem; height: 4rem; flex: none; }
.ring svg { width: 4rem; height: 4rem; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: var(--surface-3); }
.ring .arc { stroke: var(--brand); stroke-linecap: round; }
.ring .arc.hot { stroke: var(--red); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.1rem; }

/* ---------- barras simples (consumo) ---------- */
.bars { display: flex; flex-direction: column; gap: 0.4rem; }
.bars .bar { display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; }
.bars .bar .k { width: 4.5rem; flex: none; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bars .bar .v { width: 3rem; flex: none; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bars .bar .progress { flex: 1; height: 0.9rem; border-radius: 6px; }
.bars .bar .progress i { border-radius: 6px; }

/* ---------- telas de autenticacao ---------- */
.auth-body { display: flex; flex-direction: column; min-height: 100vh; }
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-box { width: 100%; max-width: 26rem; padding: 2rem 2rem 1.75rem; }
.auth-box .logo { margin-bottom: 0.4rem; }
.auth-box .logo img { height: 1.6rem; }
.auth-box .sub { font-size: 0.82rem; color: var(--text-3); margin-bottom: 1.5rem; }
.auth-box h1 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.auth-box p { font-size: 0.88rem; color: var(--text-2); }
.auth-box form { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 0.4rem; }
.auth-box form .btn { margin-top: 0.4rem; }
.auth-box .msg { margin-bottom: 1rem; }
.prov { display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; padding: 0.65rem 0.9rem; margin-top: 0.55rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 0.88rem; cursor: pointer; }
.prov:hover { background: var(--surface-3); color: var(--text); }
.prov[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.prov svg { flex: none; }
.divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.2rem 0 0.4rem; color: var(--text-3); font-size: 0.74rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.links { margin-top: 1.1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; font-size: 0.84rem; }
.quem { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin: -0.8rem 0 1.2rem; padding: 0.6rem 0.8rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.82rem; color: var(--text-2); }
.quem b { color: var(--text); overflow-wrap: anywhere; }
.quem button { background: none; border: 0; padding: 0; margin: 0 0 0 auto; color: var(--brand); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.auth-foot { padding: 1rem; text-align: center; font-size: 0.8rem; color: var(--text-3); }
.auth-foot a { color: var(--text-3); margin: 0 0.5rem; }
.auth-foot a:hover { color: var(--text); }
