@import url("/tokens.css");
:root {
  color-scheme: dark;
  
  --brand: var(--flame-500);
  --brand-deep: var(--flame-700);
  --brand-ink: var(--on-flame);
  --panel: rgba(35, 29, 25, 0.82);
  --panel-strong: var(--card);
  --text: var(--ink);
  --muted: var(--sub);
  --text-soft: rgba(241, 238, 235, 0.8);
  --accent: var(--brand);
  --hot: var(--error);
  --violet: var(--info);
  --amber: var(--warn);
  --radius: 8px;
  
  --radius-card: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --brand-color: var(--flame-500);
}

@media (max-width: 640px) { .brand-grid { grid-template-columns: 1fr; } }



* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    repeating-linear-gradient(135deg, rgba(241, 238, 235, .025) 0 1px, transparent 1px 11px),
    radial-gradient(circle at 15% 15%, rgba(255,84,61,.14), transparent 32rem),
    radial-gradient(circle at 85% 0%, rgba(215,53,42,.10), transparent 30rem),
    var(--bg);
  color: var(--text);
  font: var(--text-small)/1.45 Onest, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea, select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--brand-ink);
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s var(--ease), filter .2s var(--ease);
}


button:hover { transform: translateY(-1px); filter: brightness(.88); }
button:active { transform: translateY(1px); filter: brightness(.78); }
button:disabled { cursor: wait; opacity: .68; transform: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(241, 238, 235, .055);
  color: var(--text);
  padding: 12px 13px;
}

textarea { min-height: 92px; resize: vertical; }
select option { color: var(--on-flame); background: var(--surface); }

.hidden { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 10; background: var(--text); color: var(--bg); padding: 10px; border-radius: 8px; }

.mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(241, 238, 235, .025) 1px, transparent 1px) 0 0/48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.app-shell { min-height: 100vh; position: relative; }

.legal-page {
  width: min(860px, calc(100% - 32px));
  margin: 32px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: clamp(22px, 4vw, 42px);
  box-shadow: 0 24px 80px rgba(0,0,0,.34);
}

.legal-page h1, .legal-page h2, .brand-panel h1, .login-card h2, .topline h2, .section-head h3, .card h4, .boot-splash__error h1 {
  font-family: 'Funnel Display', system-ui, sans-serif;
}

.legal-page h1 {
  margin-top: 0;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1;
}

.legal-page h2 {
  margin-top: 28px;
  font-size: var(--text-2xl);
}

.legal-page p {
  color: var(--text-soft);
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 24px;
  padding: clamp(20px, 5vw, 72px);
  align-items: center;
}


.boot-splash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.boot-splash__loading {
  display: grid;
  justify-items: center;
  gap: var(--space-5);
  color: var(--text-soft);
}
.boot-splash__loading p { margin: 0; }
.boot-splash__error {
  width: min(440px, calc(100vw - (2 * var(--space-5))));
  text-align: center;
}
.boot-splash__error h1 { margin: 0; font-size: var(--text-xl); }
.boot-splash__error button { padding-inline: var(--space-5); }
.boot-splash__mark {
  width: clamp(180px, 42vw, 300px);
  height: auto;
}
.boot-splash__spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--flame-300, #fd8d79);
  animation: boot-spin 0.8s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .boot-splash__spinner { animation: none; opacity: 0.6; }
}


@media print {
  body.legal-document {
    min-height: 0;
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  body.legal-document .mesh { display: none !important; }

  body.legal-document main,
  body.legal-document section,
  body.legal-document article,
  body.legal-document nav,
  body.legal-document .legal-page {
    background: #fff !important;
    box-shadow: none !important;
    color: #000 !important;
  }

  body.legal-document .legal-page {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  body.legal-document h1,
  body.legal-document h2,
  body.legal-document h3 {
    color: #000 !important;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  body.legal-document p,
  body.legal-document li {
    color: #000 !important;
    orphans: 3;
    widows: 3;
  }

  body.legal-document a { color: #000 !important; text-decoration: underline; }
  body.legal-document a[href^="http"]::after,
  body.legal-document a[href^="/"]::after {
    content: " (" attr(href) ")";
    font-size: .85em;
    overflow-wrap: anywhere;
  }

  body.legal-document .legal-nav {
    display: block !important;
    margin-top: 24pt;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.brand-panel, .login-card, .card, .sidebar, .topline {
  border: 1px solid var(--line);
  
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.34);
}

.brand-panel {
  min-height: min(680px, 78vh);
  padding: clamp(28px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.brand-panel:before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,84,61,.25);
  pointer-events: none;
}

.brand-panel h1 {
  margin: 10px 0 14px;
  font-size: clamp(54px, 10vw, 132px);
  line-height: .85;
  letter-spacing: 0;
}


.brand-wordmark {
  display: block;
  width: clamp(260px, 36vw, 520px);
  max-width: 100%;
  height: auto;
}


.brand-panel p {
  max-width: 720px;
  color: var(--text-soft);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: var(--text-label);
  font-weight: 600;
}

.brand-lead {
  margin: 0;
}


.proof-list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.proof-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text-soft);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 600;
  line-height: 1.35;
}

.proof-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: var(--text-base);
  font-weight: 900;
  line-height: 1;
}

.brand-panel .brand-fineprint {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.4;
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(241, 238, 235, .045);
}

.metric b {
  display: block;
  font: 700 var(--text-title)/1 var(--font-num);
  font-variant-numeric: tabular-nums;
}

.metric span { color: var(--muted); font-size: var(--text-base); }

.login-card {
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.login-card h2, .topline h2, .section-head h3 {
  margin: 6px 0 0;
  letter-spacing: 0;
}


.login-view {
  background: radial-gradient(120% 120% at 30% 10%, var(--card-2) 0%, var(--surface) 55%, var(--bg) 100%);
}

.login-view .brand-panel,
.login-view .login-card {
  border: 1px solid rgba(241, 238, 235, 0.14);
  
  border-radius: var(--radius-card);
  background:
    linear-gradient(rgba(17, 13, 11, 0.42), rgba(17, 13, 11, 0.42)),
    rgba(241, 238, 235, 0.06);
  
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
}


.login-view .brand-panel {
  background:
    radial-gradient(120% 90% at 88% -8%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, var(--brand-deep) 22%, transparent), transparent 45%),
    linear-gradient(rgba(17,13,11,.42), rgba(17,13,11,.42)),
    rgba(241,238,235,.06);
}

.login-view .brand-panel:before {
  border-color: rgba(255, 84, 61, 0.32);
  border-radius: 14px;
}

.login-view .eyebrow {
  color: var(--brand);
}


.login-view .brand-panel h1 {
  font-size: clamp(36px, 6.6vw, 88px);
}


.login-card button[type="submit"],
.login-card > button {
  border-radius: 14px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(255, 84, 61, 0.24);
}

.login-card button[type="submit"]:focus-visible,
.login-card > button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}


@media (max-width: 1100px) {
  .login-view .brand-fineprint {
    display: none;
  }
}

label { display: grid; gap: 7px; color: var(--text-soft); font-weight: 700; }
.status { min-height: 20px; margin: 0; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.error { color: var(--hot); }

.mfa-qr {
  width: min(100%, 240px);
  margin-inline: auto;
  padding: var(--space-2);
  border-radius: var(--radius-card);
  background: var(--text);
}

.mfa-qr svg { display: block; width: 100%; height: auto; }

.mfa-secret-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: stretch;
}

.mfa-secret {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: var(--space-2);
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  font-family: var(--font-mono);
}

.mfa-copy { white-space: nowrap; }

@media (max-width: 480px) {
  .mfa-secret-row { grid-template-columns: 1fr; }
  .mfa-copy { width: 100%; }
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(255,84,61,.36);
  border-radius: var(--radius);
  background: rgba(27, 22, 19, .96);
  color: var(--text);
  box-shadow: 0 18px 60px rgba(0,0,0,.42);
  padding: 13px 15px;
  font-weight: 600;
}

.toast.error {
  border-color: rgba(246,91,111,.52);
}

.inline-error {
  border: 1px solid rgba(216,44,79,.5);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(216,44,79,.08);
  display: grid;
  gap: 9px;
}

.inline-error span {
  color: var(--error);
}

.inline-error button {
  justify-self: start;
  min-height: 36px;
  padding: 0 12px;
  background: rgba(216,44,79,.16);
  color: var(--text);
  border: 1px solid rgba(216,44,79,.42);
}

.skeleton {
  min-height: 70px;
  overflow: hidden;
  position: relative;
}

.skeleton:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(241, 238, 235, .08), transparent);
  animation: shimmer 1.2s infinite;
}

.skeleton b,
.skeleton span {
  min-height: 14px;
  border-radius: 999px;
  background: rgba(241, 238, 235, .08);
}

.skeleton b { width: 44%; }
.skeleton span { display: block; width: 70%; margin-top: 10px; }

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.demo-access {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.demo-access[hidden] { display: none; }
.demo-access__title {
  margin: 0;
  color: var(--text);
  font: 600 var(--text-label)/1.4 Onest, system-ui, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.demo-access__copy {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-small);
}
.demo-access__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.demo-access__link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: var(--flame-500);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: var(--space-1);
}
.demo-access__link:hover {
  color: var(--flame-500);
  text-decoration-thickness: 2px;
}
.demo-access__link:active {
  color: var(--flame-500);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
.demo-access__link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.ghost, .nav-btn {
  background: rgba(241, 238, 235, .06);
  color: var(--text);
  border: 1px solid var(--line);
}


nav { display: grid; gap: 8px; }
.metric .ok { color: var(--ok); }
.metric .warn { color: var(--amber); }
.metric .hot { color: var(--hot); }


.card {
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.card h4 {
  margin: 0 0 12px;
  font-size: var(--text-xl);
}

.muted { color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: var(--text-base); }


.pill, .badge {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--text-soft);
  font-size: var(--text-base);
}
.badge.ok { color: var(--ok); border-color: rgba(113,199,145,.35); }
.badge.warn { color: var(--amber); border-color: rgba(227,183,86,.35); }
.badge.hot { color: var(--hot); border-color: rgba(246,91,111,.35); }


.integration-card,
.template-card,
.automation-card,
.notice,
.legal-grid a,
.funnel div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(241, 238, 235, .045);
  display: grid;
  gap: 4px;
  color: var(--text);
  text-decoration: none;
}

.integration-card span,
.template-card span,
.automation-card span,
.notice span,
.funnel span {
  color: var(--muted);
  font-size: var(--text-base);
}

.integration-card small,

.notice.compact { padding: 9px 10px; }

.mini-alert.ok { border-color: rgba(113,199,145,.36); }




@media (max-width: 980px) {
  .measure-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-compare { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .login-view, .product-view, .two-col, .coach-layout, .admin-grid, .coach-actions { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; }
  nav { display: flex; }
  .sidebar .ghost { margin-top: 0; margin-left: auto; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alert-grid, .alert-strip, .coach-command-grid, .integration-grid, .template-list, .automation-grid, .analytics-grid, .inline-form, .funnel { grid-template-columns: 1fr; }
  .dashboard-frame-shell { height: calc(100vh - 220px); min-height: 620px; }
}

@media (max-width: 620px) {
  .login-view { padding: 16px; }
  .brand-panel { min-height: auto; }
  .metric-grid { grid-template-columns: 1fr; }
  .topline { align-items: start; flex-direction: column; }
  .sidebar { flex-wrap: wrap; }
}

@media (pointer: coarse) {
  .demo-access__link { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}



@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-threads { max-height: 260px; }
}


.meu-dia-item.message { border-left: 3px solid var(--amber); }
.board-score.none { background: rgba(241, 238, 235, 0.05); color: var(--muted); }
.score-cell.none { background: rgba(241, 238, 235, 0.06); }


@media (max-width: 720px) {
  .meu-dia-grid { grid-template-columns: 1fr; }
  .board-grid { grid-template-columns: 1fr; }
}


.copilot-badge.brand { color: var(--brand-color); border-color: var(--brand-color); }
.metric-grid.compact .metric { padding: 8px; }


@media (max-width: 720px) {
  .metric-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-days { grid-template-columns: 1fr; }
  .parq-q { flex-direction: column; gap: 6px; }
}




.eyebrow,
.brand-panel p.eyebrow,
.demo-access__title {
  font-size: var(--text-label);
  font-weight: 600;
}


.brand-panel p.brand-lead {
  font-size: var(--text-body);
  font-weight: 400;
}


.login-card h2 {
  font-size: var(--text-heading);
  font-weight: 600;
}


.login-card button[type="submit"],
.login-card > button,
.demo-access__link {
  font-size: var(--text-small);
  font-weight: 600;
}


label {
  font-weight: 600;
}
