/* =============================================================
   Área do Aluno — design system
   Base grafite para uso na academia (tela escura, pouca luz),
   acento = cor do personal (definida em runtime por brand.js).
   Antes do subtenant (login, marca neutra), o app veste a paleta
   Performan: html[data-brand='neutral'], mais abaixo.
   ============================================================= */

:root {
  color-scheme: dark;

  --bg: #0f1012;
  --bg-sunk: #0a0b0c;
  --raise: #16181b;
  --raise-2: #1d2024;
  --field: #121417;
  --line: #25282d;
  --line-strong: #353940;

  --text: #f2f3ef;
  --text-2: #aab0b7;
  --text-3: #80868e;

  /* Sobrescritos por brand.js a partir da cor do personal */
  --accent: #0c4df0;
  --accent-text: #6f93f6;
  --on-accent: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 38%, transparent);
  /* Secundária do personal; sem ela, herda a primária */
  --secondary: var(--accent);
  --secondary-text: var(--accent-text);
  --on-secondary: var(--on-accent);
  --secondary-soft: color-mix(in srgb, var(--secondary) 14%, transparent);
  --secondary-line: color-mix(in srgb, var(--secondary) 38%, transparent);

  --success: #5ee08f;
  --success-soft: color-mix(in srgb, var(--success) 14%, transparent);
  --warning: #f6bd4f;
  --warning-soft: color-mix(in srgb, var(--warning) 14%, transparent);
  --danger: #ff7666;
  --danger-soft: color-mix(in srgb, var(--danger) 14%, transparent);
  --info: #8bbcff;
  --info-soft: color-mix(in srgb, var(--info) 14%, transparent);

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wide: 112;
  --narrow: 78;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;

  --sidebar: 264px;
  --topbar: 58px;
  --tabbar: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Marca Performan (antes do subtenant): Deep Navy + azul/ciano/violeta */
:root[data-brand='neutral'] {
  --bg: #030830;
  --bg-sunk: #020624;
  --raise: #08104a;
  --raise-2: #0d1759;
  --field: #050c3c;
  --line: #17226b;
  --line-strong: #25317f;

  --text: #f8f8fa;
  --text-2: #b3bbe0;
  --text-3: #8891c4;

  /* Degradê do símbolo: ciano → azul → violeta → magenta */
  --brand-gradient: linear-gradient(90deg, #10d9fc, #0e8ff9 22%, #0c4df0 45%, #8b13f9 78%, #d000f9);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-strong) transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-track {
  background: transparent;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
  font-variation-settings: 'wdth' var(--narrow);
  letter-spacing: -0.01em;
  line-height: 1.12;
}

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.num {
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' var(--narrow);
}

[hidden] {
  display: none !important;
}

#view:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.ph,
.ph-fill,
.ph-bold {
  font-size: 1.15em;
  line-height: 1;
  flex-shrink: 0;
}

/* ---------- Boot ---------- */

.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  z-index: 50;
  transition: opacity 0.3s var(--ease);
}
.boot.done {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Shell ---------- */

.shell {
  min-height: 100dvh;
}
.shell:not([data-bare]) {
  background:
    radial-gradient(90% 420px at 70% -120px, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%) no-repeat,
    radial-gradient(50% 320px at 100% -80px, color-mix(in srgb, var(--secondary) 9%, transparent), transparent 70%) no-repeat;
}
/* Faixa da marca: primária puxando para a secundária no fim */
.topbar::before,
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient, linear-gradient(90deg, var(--accent) 55%, var(--secondary)));
  pointer-events: none;
}

.shell[data-bare] .sidebar,
.shell[data-bare] .topbar,
.shell[data-bare] .tabbar {
  display: none;
}

.sidebar {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(var(--topbar) + var(--safe-t));
  padding: var(--safe-t) 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar .brand-lockup {
  flex: 1;
  min-width: 0;
}

.main {
  padding: 20px 16px calc(var(--tabbar) + var(--safe-b) + 28px);
  max-width: 920px;
  margin: 0 auto;
}

.shell[data-bare] .main {
  max-width: none;
  padding: 0;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  height: calc(var(--tabbar) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--bg-sunk) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.tab .ph,
.tab .ph-fill {
  font-size: 23px;
}
.tab[aria-current='page'] {
  color: var(--accent-text);
}
.tab[aria-current='page']::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 26%;
  right: 26%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
}
.tab .count {
  position: absolute;
  top: 8px;
  left: calc(50% + 6px);
}

@media (min-width: 960px) {
  .shell:not([data-bare]) {
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
  }
  .topbar,
  .tabbar {
    display: none;
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 22px 14px 18px;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 260px),
      var(--bg-sunk);
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .main {
    padding: 40px 48px 64px;
    width: 100%;
  }
}

/* Marca do personal */

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 14px;
  font-variation-settings: 'wdth' 70;
  letter-spacing: 0.02em;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--raise-2);
}
.brand-mark.lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 21px;
}

.brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-size: 15px;
  font-weight: 700;
  font-variation-settings: 'wdth' var(--narrow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text span {
  font-size: 12px;
  color: var(--text-3);
}

/* Navegação lateral */

.side-nav {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  padding: 0 12px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover {
  background: var(--raise);
  color: var(--text);
}
.nav-link[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.nav-link[aria-current='page']::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav-link[aria-current='page'] .ph,
.nav-link[aria-current='page'] .ph-fill {
  color: var(--accent-text);
}
.nav-link .count {
  margin-left: auto;
}

.side-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--secondary);
  color: var(--on-secondary);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--raise-2);
  border: 1.5px solid var(--accent-line);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.who {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.who strong {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who span {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Page ---------- */

.page {
  animation: page-in 0.42s var(--ease) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page,
  .sheet,
  .toast {
    animation: none !important;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-head h1 {
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 750;
}

.page-head p {
  margin-top: 6px;
  color: var(--text-2);
  max-width: 60ch;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px 10px 6px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.back:hover {
  color: var(--text);
  background: var(--raise);
}

.section {
  margin-top: 36px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 700;
}
.section-head h2::before {
  content: '';
  width: 4px;
  height: 0.9em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--secondary));
}
.section-head .muted {
  font-size: 13.5px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wrap {
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

/* ---------- Panels ---------- */

.panel {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.panel-pad {
  padding: 20px;
}
@media (min-width: 640px) {
  .panel-pad {
    padding: 24px;
  }
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2,
.panel-head h3 {
  font-size: 17px;
  font-weight: 700;
}

/* Linhas de lista com divisórias (evita cartões empilhados) */
.list {
  display: flex;
  flex-direction: column;
}
.list > .item + .item {
  border-top: 1px solid var(--line);
}
.item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
}
a.item:hover,
button.item:hover {
  background: color-mix(in srgb, var(--raise-2) 70%, transparent);
}
.item-main {
  flex: 1;
  min-width: 0;
}
.item-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}
.item-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
}
.item-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--raise-2);
  color: var(--text-2);
  font-size: 18px;
}
.item-icon.accent {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.item .chev {
  color: var(--text-3);
}

/* Pares rótulo/valor */
.kv {
  display: grid;
  gap: 0;
}
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  font-size: 14.5px;
}
.kv > div + div {
  border-top: 1px solid var(--line);
}
.kv dt,
.kv .k {
  color: var(--text-2);
}
.kv dd,
.kv .v {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

/* ---------- Pills / status ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--raise-2);
  color: var(--text-2);
}
.pill .ph,
.pill .ph-fill {
  font-size: 13px;
}
.pill-accent {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.pill-success {
  background: var(--success-soft);
  color: var(--success);
}
.pill-warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.pill-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.pill-info {
  background: var(--info-soft);
  color: var(--info);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s var(--ease), background 0.15s, border-color 0.15s, filter 0.15s;
  user-select: none;
}
.btn:active:not(:disabled) {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}
[data-brand='neutral'] .btn-primary {
  background: linear-gradient(120deg, #0c4df0, #3606c0 70%, #8b13f9);
  color: #f8f8fa;
  box-shadow: 0 10px 28px -12px rgba(12, 77, 240, 0.8);
}
.btn-ghost {
  background: var(--raise-2);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--text-3);
}
.btn-quiet {
  background: none;
  color: var(--text-2);
}
.btn-quiet:hover:not(:disabled) {
  color: var(--text);
  background: var(--raise);
}
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-sm {
  height: 36px;
  padding: 0 13px;
  font-size: 14px;
  border-radius: 9px;
}
.btn-lg {
  height: 54px;
  padding: 0 22px;
  font-size: 16px;
  border-radius: 13px;
}
.btn-block {
  width: 100%;
}
.btn-whatsapp {
  background: #25d366;
  color: #062b14;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text-2);
  font-size: 20px;
}
.icon-btn:hover {
  background: var(--raise-2);
  color: var(--text);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Segmented filters ---------- */

.segments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
}
.seg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.seg:hover {
  color: var(--text);
}
.seg[aria-pressed='true'] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.seg .n {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

/* ---------- Forms ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field > label,
.field .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.field .req {
  color: var(--accent-text);
  margin-left: 2px;
}
.field .opt {
  color: var(--text-3);
  font-weight: 400;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--text);
  font-size: 16px; /* evita zoom no iOS */
  caret-color: var(--accent);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.5;
}
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%23aab0b7' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
.select option {
  background: var(--raise-2);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--text-3);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input[type='date'],
.input[type='time'] {
  color-scheme: dark;
}
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--danger);
}
.field-hint {
  font-size: 13px;
  color: var(--text-3);
}
.field-error {
  font-size: 13px;
  color: var(--danger);
}
.field-error:empty {
  display: none;
}

.grid-2 {
  display: grid;
  gap: 18px;
}
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 1fr 1fr;
  }
  .span-2 {
    grid-column: span 2;
  }
}
.grid-3 {
  display: grid;
  gap: 18px;
}

.input-wrap {
  position: relative;
}
.input-wrap .input {
  padding-right: 48px;
}
.input-wrap .icon-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}
.input-icon {
  position: relative;
}
.input-icon > .ph {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.input-icon .input {
  padding-left: 42px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Escolha em botões (substitui <select> curtos) */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice {
  position: relative;
}
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.choice input:hover + span {
  border-color: var(--text-3);
}
.choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
.choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Upload */
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 26px 18px;
  border-radius: var(--r-lg);
  border: 1.5px dashed var(--line-strong);
  background: var(--field);
  color: var(--text-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover,
.drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.drop .ph {
  font-size: 30px;
  color: var(--accent-text);
}
.drop strong {
  color: var(--text);
  font-size: 15px;
}
.drop small {
  font-size: 13px;
  color: var(--text-3);
}
.drop input {
  display: none;
}

.files {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 8px 10px 13px;
  border-radius: 11px;
  background: var(--raise-2);
  font-size: 14px;
}
.file-chip .ph {
  font-size: 20px;
  color: var(--accent-text);
}
.file-chip .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-chip small {
  color: var(--text-3);
}
.file-chip.error .ph {
  color: var(--danger);
}

.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.photo {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--raise-2);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo .icon-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  background: rgba(10, 11, 12, 0.72);
  color: #fff;
}
.photo .photo-state {
  position: absolute;
  inset: auto 0 0 0;
  padding: 6px 8px;
  font-size: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Callouts ---------- */

.note {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--raise-2);
  font-size: 14px;
  color: var(--text-2);
}
.note > .ph,
.note > .ph-fill {
  font-size: 20px;
  margin-top: 1px;
}
.note strong {
  color: var(--text);
}
.note-warning {
  background: var(--warning-soft);
}
.note-warning > .ph,
.note-warning > .ph-fill {
  color: var(--warning);
}
.note-danger {
  background: var(--danger-soft);
}
.note-danger > .ph,
.note-danger > .ph-fill {
  color: var(--danger);
}
.note-success {
  background: var(--success-soft);
}
.note-success > .ph,
.note-success > .ph-fill {
  color: var(--success);
}
.note-info > .ph,
.note-info > .ph-fill {
  color: var(--info);
}
.note ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* ---------- Meters ---------- */

.meter {
  height: 6px;
  border-radius: 999px;
  background: var(--raise-2);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.meter.info > span {
  background: var(--info);
}
.meter.warning > span {
  background: var(--warning);
}
.meter.danger > span {
  background: var(--danger);
}
.meter.success > span {
  background: var(--success);
}

/* ---------- States ---------- */

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 44px 20px;
  color: var(--text-2);
}
.state h3 {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}
.state p {
  max-width: 42ch;
  font-size: 14.5px;
}
.state .btn {
  margin-top: 10px;
}
.state-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--raise-2);
  font-size: 24px;
  color: var(--text-2);
  margin-bottom: 4px;
}
.state-loading {
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--raise) 0%, var(--raise-2) 50%, var(--raise) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- Toast ---------- */

.toasts {
  position: fixed;
  z-index: 100;
  left: 16px;
  right: 16px;
  bottom: calc(var(--tabbar) + var(--safe-b) + 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 960px) {
  .toasts {
    left: auto;
    right: 24px;
    bottom: 24px;
    align-items: flex-end;
  }
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 440px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--raise-2);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 14.5px;
  font-weight: 500;
  animation: toast-in 0.34s var(--ease);
}
.toast.leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s;
}
.toast-success .ph-fill {
  color: var(--success);
}
.toast-error .ph-fill {
  color: var(--danger);
}
.toast-warning .ph-fill {
  color: var(--warning);
}
.toast-info .ph-fill {
  color: var(--info);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

/* ---------- Sheet ---------- */

.sheet {
  padding: 0;
  border: 0;
  margin: auto auto 0;
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  border-radius: 20px 20px 0 0;
  background: var(--raise);
  color: var(--text);
  box-shadow: var(--shadow);
  animation: sheet-up 0.38s var(--ease);
  overflow: hidden;
}
.sheet::backdrop {
  background: rgba(4, 5, 6, 0.66);
  backdrop-filter: blur(3px);
  animation: fade 0.3s;
}
.sheet.closing {
  animation: sheet-down 0.2s ease-in forwards;
}
.sheet-inner {
  display: flex;
  flex-direction: column;
  max-height: 92dvh;
}
.sheet-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 12px 8px 20px;
}
.sheet-grip {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 38px;
  height: 4px;
  margin-left: -19px;
  border-radius: 99px;
  background: var(--line-strong);
}
.sheet-title {
  flex: 1;
  font-size: 21px;
  font-weight: 700;
}
.sheet-body {
  padding: 8px 20px 20px;
  overflow-y: auto;
}
.sheet-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px calc(14px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--raise);
}
.sheet-foot .btn {
  flex: 1;
}

@media (min-width: 640px) {
  .sheet {
    margin: auto;
    width: calc(100% - 48px);
    max-width: 560px;
    border-radius: 20px;
    animation: pop 0.3s var(--ease);
  }
  .sheet-sm {
    max-width: 440px;
  }
  .sheet-lg {
    max-width: 720px;
  }
  .sheet-grip {
    display: none;
  }
  .sheet-head {
    padding-top: 18px;
  }
  .sheet-foot .btn {
    flex: 0 0 auto;
  }
  .sheet.closing {
    animation: fade 0.18s reverse forwards;
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}
@keyframes sheet-down {
  to {
    transform: translateY(100%);
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* =============================================================
   Telas
   ============================================================= */

/* ---------- Auth (login, redefinir senha, termo) ---------- */

.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: calc(28px + var(--safe-t)) 20px calc(20px + var(--safe-b));
  background:
    radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(80% 50% at 100% 110%, color-mix(in srgb, var(--secondary) 10%, transparent), transparent 60%),
    var(--bg);
}
[data-brand='neutral'] .auth {
  background:
    radial-gradient(90% 55% at 50% -12%, rgba(12, 77, 240, 0.38), transparent 62%),
    radial-gradient(60% 45% at 0% 105%, rgba(54, 6, 192, 0.4), transparent 65%),
    radial-gradient(55% 40% at 100% 100%, rgba(208, 0, 249, 0.16), transparent 65%),
    var(--bg);
}
.auth-logo {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 0 18px -10px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  margin: auto;
}
.auth-card .brand-mark {
  margin-bottom: 26px;
}
.auth-card h1 {
  font-size: clamp(34px, 9vw, 44px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.auth-card .lede {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 15.5px;
}
.auth-card .form {
  margin-top: 30px;
}
.auth-foot {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
  padding-top: 24px;
}
.linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent-text);
  font-weight: 600;
  font-size: 14px;
}
.linkish:hover {
  text-decoration: underline;
}

.strength {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 4px;
}
.strength span {
  height: 4px;
  border-radius: 9px;
  background: var(--raise-2);
  transition: background 0.2s;
}
.strength[data-level='1'] span:nth-child(1) {
  background: var(--danger);
}
.strength[data-level='2'] span:nth-child(-n + 2) {
  background: var(--warning);
}
.strength[data-level='3'] span {
  background: var(--success);
}

.terms {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(28px + var(--safe-t)) 20px calc(28px + var(--safe-b));
}
.terms-doc {
  margin-top: 24px;
  max-height: 52dvh;
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--raise);
  border: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.terms-doc h3 {
  margin: 20px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variation-settings: 'wdth' 100;
  letter-spacing: 0.02em;
}
.terms-doc h3:first-child {
  margin-top: 0;
}
.terms-doc p {
  margin: 0 0 8px;
}
.code-input {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' var(--narrow);
  min-height: 60px;
}

/* ---------- Início ---------- */

.hello h1 {
  font-size: clamp(32px, 8vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.hello h1 .name {
  color: var(--accent-text);
}
.hello p b {
  font-weight: 600;
  color: var(--secondary-text);
}
.hello p {
  margin-top: 8px;
  color: var(--text-2);
}

.announce {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--accent);
  color: var(--on-accent);
  margin-bottom: 18px;
}
.announce > .ph-fill {
  font-size: 24px;
}
.announce h2 {
  font-size: 17px;
  font-weight: 750;
  font-variation-settings: 'wdth' 100;
}
.announce p {
  margin-top: 4px;
  font-size: 14.5px;
  opacity: 0.86;
}
.announce a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: inherit;
  font-weight: 700;
  font-size: 14px;
}

/* Jornada do protocolo */
#journey {
  overflow: hidden;
  border-top: 3px solid var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), transparent 160px), var(--raise);
}
.journey {
  padding: 22px 20px 20px;
}
.journey-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.journey-head h2 {
  font-size: 22px;
  font-weight: 750;
}
.journey-head p {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-2);
}
.track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--steps, 5), 1fr);
  margin: 28px 0 6px;
}
.track::before,
.track::after {
  content: '';
  position: absolute;
  top: 17px;
  left: calc(50% / var(--steps, 5));
  height: 2px;
  border-radius: 2px;
}
.track::before {
  right: calc(50% / var(--steps, 5));
  background: var(--line-strong);
}
.track::after {
  width: calc(100% - 100% / var(--steps, 5));
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transition: transform 1s var(--ease) 0.2s;
}
.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
}
.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--raise);
  border: 2px solid var(--line-strong);
  color: var(--text-3);
  font-size: 16px;
}
.step.done .step-dot {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--on-secondary);
}
.step.current .step-dot {
  border-color: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.step-label {
  padding: 0 3px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--text-3);
  max-width: 11ch;
}
.step.done .step-label,
.step.current .step-label {
  color: var(--text);
}
@media (max-width: 420px) {
  .step-label {
    font-size: 11px;
  }
}

.next-up {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--raise-2);
  box-shadow: inset 3px 0 0 var(--secondary);
}
.next-up .item-main p {
  font-size: 13.5px;
  color: var(--text-2);
}

.plan-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.plan-strip > div {
  padding: 14px 16px;
  min-width: 0;
}
.plan-strip > div + div {
  border-left: 1px solid var(--line);
}
.plan-strip dt {
  font-size: 12px;
  color: var(--text-3);
}
.plan-strip dd {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .plan-strip {
    grid-template-columns: 1fr 1fr;
  }
  .plan-strip > div:first-child {
    grid-column: span 2;
    border-bottom: 1px solid var(--line);
  }
  .plan-strip > div:nth-child(2) {
    border-left: 0;
  }
}

.feed {
  display: flex;
  flex-direction: column;
}
.post {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 18px 0;
}
.post + .post {
  border-top: 1px solid var(--line);
}
.post .item-icon {
  width: 40px;
  height: 40px;
}
.post-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.post-head strong {
  font-size: 15.5px;
  font-weight: 650;
}
.post-head time {
  font-size: 12.5px;
  color: var(--text-3);
  white-space: nowrap;
}
.post-body {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

/* Atalhos */
.quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 720px) {
  .quick {
    grid-template-columns: repeat(4, 1fr);
  }
}
.quick a {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--raise);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  transition: border-color 0.15s, transform 0.15s var(--ease);
}
.quick a:hover {
  border-color: var(--accent-line);
  transform: translateY(-1px);
}
.quick a .ph {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 22px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.quick a:hover small {
  color: var(--secondary-text);
}
.quick small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  color: var(--text-3);
  font-size: 12.5px;
}

/* ---------- Treino ---------- */

.hero-plan {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  text-align: left;
  padding: 22px 20px 20px;
  border-radius: 20px;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
}
.hero-plan h2 {
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-plan .period {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.78;
}
.hero-plan .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 26px;
  border-top: 1.5px solid color-mix(in srgb, var(--on-accent) 22%, transparent);
  padding-top: 14px;
}
.hero-plan .stat b {
  display: block;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 70;
}
.hero-plan .stat span {
  font-size: 12.5px;
  opacity: 0.75;
}
.hero-plan .go {
  position: absolute;
  top: 20px;
  right: 18px;
  font-size: 22px;
}
.hero-plan::after {
  /* Anilha estilizada: forma geométrica do universo do treino */
  content: '';
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 34px solid color-mix(in srgb, var(--on-accent) 8%, transparent);
  pointer-events: none;
}

.letter {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--raise-2);
  font-size: 22px;
  font-weight: 800;
  font-variation-settings: 'wdth' 70;
  color: var(--text);
}
.item.is-next .letter {
  background: var(--accent);
  color: var(--on-accent);
}

.exercise {
  padding: 16px 20px;
}
.exercise + .exercise {
  border-top: 1px solid var(--line);
}
.exercise-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.exercise-head h3 {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  font-variation-settings: 'wdth' 100;
  letter-spacing: 0;
}
.exercise-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
}
.exercise-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.exercise-meta b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.exercise-note {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-2);
  display: flex;
  gap: 8px;
}
.subsets {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}
.subsets .exercise {
  padding: 10px 0;
}

.video-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 16px;
}

.dock {
  position: sticky;
  bottom: calc(var(--tabbar) + var(--safe-b) + 10px);
  margin-top: 20px;
  z-index: 5;
}
@media (min-width: 960px) {
  .dock {
    bottom: 20px;
  }
}
.dock .btn {
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8);
}

/* Sessão ativa */
.session {
  max-width: 560px;
  margin: 0 auto;
}
.session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--raise-2);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 75;
}
.clock .live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.session-progress {
  display: flex;
  gap: 4px;
  margin: 18px 0 22px;
}
.session-progress span {
  flex: 1;
  height: 4px;
  border-radius: 9px;
  background: var(--raise-2);
}
.session-progress span.done {
  background: var(--secondary);
}
.session-progress span.current {
  background: var(--secondary-line);
}

.set-card {
  padding: 22px 20px;
}
.set-card .kind {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--secondary-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.set-card h2 {
  margin-top: 6px;
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.set-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
}
.set-count b {
  font-size: 64px;
  line-height: 0.9;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 62;
  color: var(--accent-text);
}
.set-count span {
  font-size: 15px;
  color: var(--text-2);
}
.target {
  margin-top: 4px;
  font-size: 15px;
  color: var(--text-2);
}
.target b {
  color: var(--text);
}

.set-dots {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}
.set-dots span {
  width: 26px;
  height: 6px;
  border-radius: 9px;
  background: var(--raise-2);
}
.set-dots span.done {
  background: var(--secondary);
}
.set-dots span.current {
  background: var(--text-2);
}

.big-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.big-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.big-input label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: 64px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--field);
}
.stepper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.stepper button {
  height: 100%;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 20px;
}
.stepper button:hover {
  color: var(--text);
}
.stepper input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 70;
  caret-color: var(--accent);
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stepper input:focus {
  outline: none;
}

.rest {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--raise-2);
}
.rest-fill {
  position: absolute;
  inset: 0;
  background: var(--secondary-soft);
  transform-origin: left;
  transform: scaleX(var(--left, 1));
  transition: transform 1s linear;
}
.rest > * {
  position: relative;
}
.rest b {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 70;
  color: var(--accent-text);
}
.rest .spacer + button {
  font-size: 13px;
}

.up-next {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-2);
}
.up-next b {
  color: var(--text);
}

.summary-hero {
  text-align: center;
  padding: 34px 20px 26px;
}
.summary-hero .badge-done {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 36px;
  animation: pop 0.5s var(--ease);
}
.summary-hero h1 {
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 850;
}
.summary-hero p {
  margin-top: 6px;
  color: var(--text-2);
}
.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.summary-stats > div {
  padding: 16px 12px;
  text-align: center;
}
.summary-stats > div + div {
  border-left: 1px solid var(--line);
}
.summary-stats b {
  display: block;
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 70;
}
.summary-stats span {
  font-size: 12.5px;
  color: var(--text-3);
}

.video-sheet video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  max-height: 70dvh;
}

/* ---------- Dúvidas ---------- */

.question {
  padding: 18px 20px;
}
.question + .question {
  border-top: 1px solid var(--line);
}
.question-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.question-head h3 {
  flex: 1;
  font-size: 16.5px;
  font-weight: 700;
  font-variation-settings: 'wdth' 100;
  letter-spacing: 0;
  line-height: 1.3;
}
.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-3);
}
.question-body {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.answer {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--raise-2);
  font-size: 14.5px;
  overflow-wrap: anywhere;
}
.answer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent-text);
}
.answer.waiting {
  background: none;
  border: 1px dashed var(--line-strong);
  color: var(--text-2);
}
.answer.waiting .answer-head {
  color: var(--text-2);
}
.sla {
  margin-top: 14px;
}
.sla-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--text-3);
}
.sla-row b {
  font-weight: 650;
}
.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ---------- FAQ ---------- */

.faq details {
  border-top: 1px solid var(--line);
}
.faq details:first-child {
  border-top: 0;
}
.faq summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 15.5px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .ph {
  margin-left: auto;
  color: var(--text-3);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary .ph {
  transform: rotate(45deg);
  color: var(--accent-text);
}
.faq details p {
  padding: 0 20px 18px;
  color: var(--text-2);
  font-size: 14.5px;
  max-width: 70ch;
}

/* ---------- Ajuda / contato ---------- */

.contact {
  padding: 24px 20px;
}
.contact h2 {
  font-size: 22px;
  font-weight: 750;
}
.contact .phone {
  margin: 10px 0 18px;
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 72;
}

/* ---------- Conta ---------- */

.profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile .avatar {
  width: 64px;
  height: 64px;
  font-size: 24px;
  font-weight: 800;
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  font-variation-settings: 'wdth' 70;
}
.profile h1 {
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 800;
}
.profile p {
  color: var(--text-2);
  font-size: 14px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.credit {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.credit b {
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 70;
}

/* ---------- Anamnese (formulário em etapas) ---------- */

.wizard-top {
  position: sticky;
  top: calc(var(--topbar) + var(--safe-t));
  z-index: 6;
  margin: -20px -16px 22px;
  padding: 14px 16px 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 960px) {
  .wizard-top {
    top: 0;
    margin: -40px -48px 26px;
    padding: 18px 48px 14px;
  }
}
.wizard-top .row {
  font-size: 13px;
  color: var(--text-2);
}
.wizard-top .row b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.draft-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.draft-indicator::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.draft-indicator.saving::before {
  animation: draft-pulse 1s ease-in-out infinite;
}
.draft-indicator.saved {
  color: var(--success);
}
.draft-indicator.saved::before {
  background: var(--success);
}
@keyframes draft-pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}
.wizard-top .meter {
  margin-top: 10px;
  height: 4px;
}
.wizard-step h2 {
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 800;
}
.wizard-step > p {
  margin-top: 6px;
  margin-bottom: 22px;
  color: var(--text-2);
}
.reveal[hidden] {
  display: none;
}
.reveal {
  animation: page-in 0.3s var(--ease);
}
.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}
.wizard-nav .btn-primary {
  flex: 1;
}
@media (min-width: 640px) {
  .wizard-nav .btn-primary {
    flex: 0 0 auto;
    min-width: 200px;
    margin-left: auto;
  }
}

/* ---------- Pendências ---------- */

.todo {
  display: flex;
  gap: 14px;
  padding: 17px 20px;
}
.todo + .todo {
  border-top: 1px solid var(--line);
}
.todo .item-icon.urgent {
  background: var(--danger-soft);
  color: var(--danger);
}
.todo .item-icon.normal {
  background: var(--warning-soft);
  color: var(--warning);
}
.todo-actions {
  margin-top: 12px;
}

.tally {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.tally > div {
  padding: 16px 18px;
}
.tally > div + div {
  border-left: 1px solid var(--line);
}
.tally b {
  display: block;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 70;
}
.tally span {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------- Mais (menu mobile) ---------- */

.more-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
}

/* ---------- Tabelas simples (indicações) ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.table th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-3);
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.table tr:last-child td {
  border-bottom: 0;
}

.search {
  margin-bottom: 14px;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 16px;
}

.demo-flag {
  position: fixed;
  z-index: 60;
  bottom: calc(var(--tabbar) + var(--safe-b) + 8px);
  left: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--warning);
  color: #1b1405;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}
@media (min-width: 960px) {
  .demo-flag {
    bottom: 16px;
  }
}

@media (max-width: 520px) {
  .hide-sm {
    display: none;
  }
}

.brand-mark .ph-bold {
  font-size: 1.5em;
}
