:root {
  --bg: #1C1C1E;
  --surface: #242426;
  --surface-raised: #2E2E31;
  --steel: #3A3A3D;
  --steel-line: #47474B;
  --chalk: #F2F1EA;
  --chalk-dim: #A8A7A2;
  --accent: #FF5A1F;
  --accent-dim: #C74A1C;
  --green: #4ADE80;
  --red: #F45B69;
  --yellow: #F5C15A;
  --blue: #60A5FA;
  --mono: 'SF Mono', 'Courier New', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--chalk);
  font-family: var(--sans); min-height: 100vh; padding-bottom: 48px;
}
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 0; }
.wrap-wide { max-width: 960px; margin: 0 auto; padding: 20px 16px 0; }

/* Header */
header {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 8px 0 18px; border-bottom: 2px solid var(--steel-line); margin-bottom: 18px;
}
.brand {
  font-weight: 900; font-size: 22px; letter-spacing: -0.5px;
  text-transform: uppercase; cursor: pointer; color: var(--chalk);
}
/* only // uses accent — see .brand-slash */
.clock {
  font-family: var(--mono); font-size: 12px; color: var(--chalk-dim); text-align: right;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.clock b { display: block; color: var(--chalk); font-size: 15px; font-weight: 700; }

/* Nav */
.subnav {
  display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.subnav a, .subnav button {
  background: transparent; color: var(--chalk-dim); border: 1px solid var(--steel-line);
  padding: 8px 12px; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.3px; border-radius: 16px; cursor: pointer; font-family: var(--sans);
  white-space: nowrap; flex-shrink: 0; text-decoration: none; display: inline-block;
}
.subnav a.active, .subnav button.active {
  background: var(--chalk); color: #1C1C1E; border-color: var(--chalk);
}

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--steel-line); border-radius: 10px;
  padding: 16px; margin-bottom: 14px;
}
h1 { font-size: 20px; margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.3px; }
h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--chalk-dim); margin: 0 0 12px; font-weight: 700;
}
h3 { font-size: 15px; margin: 0 0 8px; font-weight: 700; }

/* Forms */
select, input, textarea {
  width: 100%; background: var(--steel); border: 1px solid var(--steel-line);
  color: var(--chalk); padding: 11px 12px; border-radius: 7px; font-size: 15px;
  font-family: var(--sans);
}
textarea {
  resize: vertical; min-height: 100px; font-family: var(--mono);
  font-size: 13.5px; line-height: 1.5;
}
input::placeholder, textarea::placeholder { color: var(--chalk-dim); }
label {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--chalk-dim); display: block; margin: 10px 0 5px;
}
label:first-child, .card > label:first-of-type { margin-top: 0; }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }

/* Buttons */
.btn {
  background: var(--accent); color: #1C1C1E; border: none; padding: 12px 16px;
  border-radius: 7px; font-weight: 800; font-size: 14px; text-transform: uppercase;
  letter-spacing: 0.4px; cursor: pointer; font-family: var(--sans); width: 100%;
  margin-top: 12px; display: inline-block; text-align: center;
}
.btn.secondary { background: var(--steel); color: var(--chalk); border: 1px solid var(--steel-line); }
.btn.ghost { background: transparent; color: var(--chalk-dim); border: 1px solid var(--steel-line); }
.btn.small { width: auto; padding: 8px 12px; font-size: 11.5px; margin-top: 0; }
.btn.danger { background: var(--red); color: #1C1C1E; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; margin-top: 12px; }
.btn-row .btn { margin-top: 0; flex: 1; }

/* Lists */
.list-item {
  padding: 12px 4px; border-bottom: 1px solid var(--steel-line);
}
.list-item:last-child { border-bottom: none; }
.list-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.list-item .name { font-weight: 600; font-size: 15px; }
.list-item .sub { font-size: 12px; color: var(--chalk-dim); margin-top: 3px; line-height: 1.5; }
.list-item .actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.empty { color: var(--chalk-dim); font-size: 13.5px; text-align: center; padding: 28px 0; }
.del {
  color: var(--chalk-dim); font-size: 11px; text-decoration: underline; cursor: pointer;
  background: none; border: none; font-family: var(--sans); padding: 0;
}
.del:hover { color: var(--red); }

/* Tags & badges */
.tag {
  display: inline-block; background: var(--steel); border: 1px solid var(--steel-line);
  padding: 3px 8px; border-radius: 4px; font-size: 10.5px; margin: 3px 5px 0 0;
  color: var(--chalk-dim); cursor: pointer; user-select: none;
}
.tag.on { background: var(--accent); color: #1C1C1E; border-color: var(--accent); }
.badge {
  padding: 3px 9px; border-radius: 12px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.3px; display: inline-block; white-space: nowrap;
}
.badge.atrasado { background: #4a1f22; color: var(--red); }
.badge.atencao { background: #4a3a1f; color: var(--yellow); }
.badge.ok { background: #1f3d2c; color: var(--green); }
.badge.muted { background: var(--steel); color: var(--chalk-dim); }
.badge.blue { background: #1e3a5f; color: var(--blue); }

/* Days picker */
.days { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.day-btn {
  background: var(--steel); border: 1px solid var(--steel-line); color: var(--chalk-dim);
  padding: 7px 0; border-radius: 6px; font-size: 11.5px; font-weight: 700;
  cursor: pointer; flex: 1; text-align: center; font-family: var(--sans); min-width: 36px;
}
.day-btn.on { background: var(--accent); color: #1C1C1E; border-color: var(--accent); }

/* Athlete check row */
.athlete {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 4px; border-bottom: 1px solid var(--steel-line); cursor: pointer;
}
.athlete:last-child { border-bottom: none; }
.athlete .name { font-size: 15px; font-weight: 600; }
.athlete .sub { font-size: 11.5px; color: var(--chalk-dim); margin-top: 2px; }
.check-box {
  width: 26px; height: 26px; border-radius: 6px; border: 2px solid var(--steel-line);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  margin-left: 12px; font-family: var(--mono); font-size: 14px; color: transparent;
}
.athlete.checked .check-box { background: var(--green); border-color: var(--green); color: #132318; }
.athlete.checked .name { color: var(--green); }

/* Stats */
.stat-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 100px; background: var(--surface); border: 1px solid var(--steel-line);
  border-radius: 10px; padding: 14px; text-align: center;
}
.stat-card .big {
  font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--accent); line-height: 1;
}
.stat-card .big.full { color: var(--red); }
.stat-card .big.ok { color: var(--green); }
.stat-card .lbl {
  font-size: 10px; color: var(--chalk-dim); text-transform: uppercase;
  margin-top: 6px; letter-spacing: 0.3px;
}

/* Hero tiles (home) */
.hero-tile {
  background: var(--surface); border: 1px solid var(--steel-line); border-radius: 12px;
  padding: 20px; margin-bottom: 12px; cursor: pointer; display: flex; align-items: center; gap: 14px;
  transition: background 0.15s;
}
.hero-tile:active, .hero-tile:hover { background: var(--surface-raised); }
.hero-tile .ic {
  width: 44px; height: 44px; border-radius: 9px; background: var(--accent); color: #1C1C1E;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; flex-shrink: 0;
}
.hero-tile .t { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; }
.hero-tile .d { font-size: 12.5px; color: var(--chalk-dim); margin-top: 2px; }

/* WOD box */
.wod-box {
  background: var(--surface); border: 1px solid var(--steel-line); border-radius: 10px;
  padding: 16px; margin-bottom: 14px; border-left: 3px solid var(--accent);
}
.wod-box .wod-title {
  font-weight: 800; font-size: 15px; text-transform: uppercase;
  letter-spacing: 0.3px; margin-bottom: 8px; color: var(--accent);
}
.wod-box .wod-content {
  white-space: pre-wrap; font-family: var(--mono); font-size: 13.5px;
  line-height: 1.6; color: var(--chalk);
}
.wod-section { margin-bottom: 12px; }
.wod-section:last-child { margin-bottom: 0; }
.wod-section-name {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--accent); font-weight: 700; margin-bottom: 4px;
}

/* Leaderboard */
.lb-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 4px;
  border-bottom: 1px solid var(--steel-line);
}
.lb-row:last-child { border-bottom: none; }
.lb-pos {
  font-family: var(--mono); font-weight: 700; font-size: 16px;
  color: var(--chalk-dim); width: 28px; text-align: center;
}
.lb-pos.top { color: var(--accent); }
.lb-score { font-family: var(--mono); font-weight: 700; margin-left: auto; color: var(--green); }

/* Edit panel */
.edit-panel {
  background: var(--surface-raised); border: 1px solid var(--steel-line);
  border-radius: 8px; padding: 12px; margin-top: 10px;
}

/* Toast */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--surface-raised); border: 1px solid var(--steel-line); color: var(--chalk);
  padding: 10px 18px; border-radius: 8px; font-size: 13px; opacity: 0;
  pointer-events: none; transition: opacity 0.2s; z-index: 50;
  max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; }

/* Login */
.login-wrap { max-width: 380px; margin: 8vh auto 0; padding: 0 16px; }
.login-wrap h1 { text-align: center; }

/* Badge turma row */
.badge-turma {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 4px; border-bottom: 1px solid var(--steel-line); gap: 10px;
}
.badge-turma:last-child { border-bottom: none; }

/* Sala fullscreen */
.sala-screen {
  position: fixed; inset: 0; background: #141416; color: var(--chalk); z-index: 100;
  display: flex; flex-direction: column;
  padding: 5vh 6vw;
  padding-right: max(6vw, 360px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.sala-close {
  position: absolute; top: 24px; right: 28px; background: var(--steel);
  border: 1px solid var(--steel-line); color: var(--chalk); width: 40px; height: 40px;
  border-radius: 8px; font-size: 18px; cursor: pointer;
}
.sala-date {
  font-family: var(--mono); color: var(--chalk-dim); font-size: 15px;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.sala-title {
  font-size: clamp(28px, 6vw, 56px); font-weight: 900; text-transform: uppercase;
  letter-spacing: -1px; color: var(--accent); margin: 0 0 26px;
}
.sala-content {
  white-space: pre-wrap; font-family: var(--mono);
  font-size: clamp(16px, 2.6vw, 26px); line-height: 1.7; flex: 1;
}
.sala-empty { color: var(--chalk-dim); font-size: clamp(18px, 3vw, 28px); }

/* Tabs internal */
.tabs { display: flex; gap: 0; margin-bottom: 14px; border-bottom: 1px solid var(--steel-line); }
.tabs button {
  background: none; border: none; color: var(--chalk-dim); padding: 10px 14px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; cursor: pointer;
  font-family: var(--sans); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Score form */
.score-tipo-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.score-tipo-btns .tag { margin: 0; }

/* Table simple */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
table.data th {
  text-align: left; color: var(--chalk-dim); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.4px; padding: 8px 6px; border-bottom: 1px solid var(--steel-line);
}
table.data td {
  padding: 10px 6px; border-bottom: 1px solid var(--steel-line); vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }

/* Footer nav aluno */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface);
  border-top: 1px solid var(--steel-line); display: flex; z-index: 40;
  padding: 6px 0 env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; text-align: center; padding: 8px 4px; color: var(--chalk-dim);
  font-size: 10px; font-weight: 700; text-transform: uppercase; text-decoration: none;
}
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a .ico { display: block; font-size: 18px; margin-bottom: 2px; }

/* Utility */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
.text-dim { color: var(--chalk-dim); }
.text-sm { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Calendar date picker row */
.date-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 8px;
}
.date-nav .date-label {
  font-family: var(--mono); font-size: 14px; font-weight: 700; text-align: center; flex: 1;
}
.date-nav .btn.small { min-width: 40px; }

/* PR grid */
.pr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pr-card {
  background: var(--surface-raised); border: 1px solid var(--steel-line);
  border-radius: 8px; padding: 12px;
}
.pr-card .mov { font-size: 11px; color: var(--chalk-dim); text-transform: uppercase; }
.pr-card .val { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--accent); margin-top: 4px; }
.pr-card .when { font-size: 11px; color: var(--chalk-dim); margin-top: 4px; }

@media (max-width: 480px) {
  .pr-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
}

/* v2 extras */
.avatar-row { display:flex; align-items:center; gap:12px; }
.photo-upload {
  width:72px; height:72px; border-radius:50%; border:2px dashed var(--steel-line);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  overflow:hidden; background:var(--steel); flex-shrink:0;
}
.photo-upload img { width:100%; height:100%; object-fit:cover; }
.photo-upload span { font-size:11px; color:var(--chalk-dim); text-align:center; padding:4px; }
.pct-table { width:100%; border-collapse:collapse; margin-top:8px; }
.pct-table td { padding:6px 8px; border-bottom:1px solid var(--steel-line); font-family:var(--mono); font-size:13px; }
.pct-table td:first-child { color:var(--chalk-dim); width:50px; }
.pct-table tr:last-child td { border-bottom:none; }
.loading-screen {
  position:fixed; inset:0; background:var(--bg); display:flex; align-items:center;
  justify-content:center; z-index:200; flex-direction:column; gap:12px;
}
.loading-screen .spin {
  width:36px; height:36px; border:3px solid var(--steel-line); border-top-color:var(--accent);
  border-radius:50%; animation:spin 0.7s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }
.sala-lb {
  margin-top:32px; border-top:1px solid var(--steel-line); padding-top:24px;
}
.sala-lb h3 {
  font-size:clamp(14px,2vw,20px); text-transform:uppercase; letter-spacing:2px;
  color:var(--chalk-dim); margin:0 0 16px;
}
.sala-lb-row {
  display:flex; align-items:center; gap:16px; padding:10px 0;
  font-size:clamp(16px,2.4vw,24px); border-bottom:1px solid var(--steel-line);
}
.sala-lb-row .pos { font-family:var(--mono); font-weight:900; color:var(--accent); width:2em; }
.sala-lb-row .sc { font-family:var(--mono); font-weight:700; margin-left:auto; color:var(--green); }
.role-badge {
  font-size:10px; padding:2px 8px; border-radius:10px; background:var(--steel);
  color:var(--chalk-dim); text-transform:uppercase; font-weight:700;
}

/* Floating leaderboard (sala) */
.sala-float-lb {
  /* default; sobrescrito dentro de .sala-right-rail */
  background: rgba(20,20,22,0.92);
  border: 1px solid var(--steel-line);
  border-radius: 12px;
  padding: 14px 16px;
}
.sala-float-lb h3 {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--chalk-dim);
}
.sala-float-lb .lb-row { font-size: 14px; padding: 8px 0; }
@media (max-width: 900px) {
  .sala-float-lb {
    position: relative;
    top: auto; right: auto;
    width: 100%;
    max-height: none;
    margin-top: 24px;
  }
  .sala-screen { padding-bottom: 40px; }
}

/* Brand fixed: only // uses accent */
.brand-slash { color: var(--accent); }
.brand-name-fixed { color: var(--chalk); font-weight: 900; }

/* Light theme */
html[data-theme="claro"] {
  --bg: #F4F3EE;
  --surface: #FFFFFF;
  --surface-raised: #F0EFEA;
  --steel: #E8E6DF;
  --steel-line: #D4D2C8;
  --chalk: #1C1C1E;
  --chalk-dim: #6B6A65;
}
html[data-theme="claro"] body { background: var(--bg); color: var(--chalk); }
html[data-theme="claro"] .subnav a.active,
html[data-theme="claro"] .subnav button.active { background: var(--chalk); color: #fff; }
html[data-theme="claro"] .btn { color: #fff; }
html[data-theme="claro"] .hero-tile .ic { color: #fff; }
html[data-theme="claro"] .sala-screen { background: #EEEDE8; }
html[data-theme="claro"] .sala-float-lb { background: rgba(255,255,255,0.95); }

.wa-btn {
  display: inline-block; background: #25D366; color: #fff !important; border: none;
  padding: 6px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
  text-decoration: none; cursor: pointer; margin-top: 6px;
}
.contract-box {
  background: var(--surface-raised); padding: 16px;
  border-radius: 8px; border: 1px solid var(--steel-line); max-height: 70vh; overflow-y: auto;
  font-size: 13px; line-height: 1.5;
}
.contract-box.plain { white-space: pre-wrap; font-family: var(--mono); }

/* Documento de contrato estruturado */
.contrato-doc { color: var(--chalk); }
.cd-header { text-align: center; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--accent); }
.cd-title { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.cd-sub { font-size: 11px; color: var(--chalk-dim); margin-top: 4px; }
.cd-section { margin-bottom: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--steel-line); border-radius: 8px; }
.cd-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 10px; }
.cd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.cd-field { display: flex; flex-direction: column; gap: 2px; }
.cd-field.cd-full { grid-column: 1 / -1; }
.cd-label { font-size: 10px; color: var(--chalk-dim); text-transform: uppercase; letter-spacing: 0.4px; }
.cd-value { font-size: 13px; font-weight: 600; word-break: break-word; }
.cd-body { font-size: 13px; line-height: 1.6; color: var(--chalk); }
.cd-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.cd-sign { padding: 12px; border-radius: 8px; border: 1px dashed var(--steel-line); background: var(--surface); }
.cd-sign.signed { border-style: solid; border-color: #3D9A5F; }
.cd-sign.pending { opacity: 0.85; }
.cd-sign-title { font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; color: var(--chalk-dim); }
.cd-sign-line { font-size: 12px; margin-bottom: 4px; }
.cd-sign-ok { margin-top: 8px; font-size: 12px; font-weight: 700; color: #3D9A5F; }
.cd-verify { margin-top: 14px; padding: 12px; text-align: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--accent); }
.cd-verify-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--chalk-dim); }
.cd-verify-code { font-family: var(--mono); font-size: 20px; font-weight: 800; letter-spacing: 2px; color: var(--accent); margin: 6px 0; }
.cd-verify-hint { font-size: 11px; color: var(--chalk-dim); }
@media (max-width: 600px) {
  .cd-grid, .cd-signs { grid-template-columns: 1fr; }
}

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.aluno-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }



/* Brand: only // is accent */
.brand { color: var(--chalk) !important; }
.brand-name-fixed { color: var(--chalk) !important; }
.brand-slash { color: var(--accent) !important; }

/* Light theme — full inversion */
html[data-theme="claro"] {
  --bg: #F4F3EE;
  --surface: #FFFFFF;
  --surface-raised: #F0EFEA;
  --steel: #E8E6DF;
  --steel-line: #D4D2C8;
  --chalk: #1C1C1E;
  --chalk-dim: #6B6A65;
}
html[data-theme="claro"] body { background: var(--bg) !important; color: var(--chalk) !important; }
html[data-theme="claro"] .card,
html[data-theme="claro"] .stat-card,
html[data-theme="claro"] .hero-tile,
html[data-theme="claro"] .login-wrap .card { background: var(--surface); border-color: var(--steel-line); }
html[data-theme="claro"] input,
html[data-theme="claro"] select,
html[data-theme="claro"] textarea { background: #fff; color: var(--chalk); border-color: var(--steel-line); }
html[data-theme="claro"] .subnav button.active { background: var(--chalk); color: #fff; }
html[data-theme="claro"] .bottom-nav { background: #fff; border-color: var(--steel-line); }
html[data-theme="claro"] .sala-screen { background: #EEEDE8; color: var(--chalk); }
html[data-theme="claro"] .sala-float-lb { background: rgba(255,255,255,0.97); }

/* Compact action buttons */
.btn-xs {
  display: inline-block; border: none; border-radius: 6px; padding: 6px 12px;
  font-size: 11px; font-weight: 700; cursor: pointer; text-decoration: none;
  font-family: var(--sans); margin: 2px 4px 2px 0;
}
.btn-xs.primary { background: var(--accent); color: #fff; }
.btn-xs.secondary { background: var(--steel); color: var(--chalk); }
.btn-xs.danger { background: var(--red); color: #fff; }
.btn-xs.ghost { background: transparent; color: var(--chalk-dim); border: 1px solid var(--steel-line); }
.btn-xs.wa { background: #25D366; color: #fff; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.filter-row input[type="search"] { flex: 1; min-width: 160px; }
.filter-chip {
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--steel-line);
  background: var(--surface-raised); font-size: 12px; cursor: pointer; color: var(--chalk-dim);
}
.filter-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.aviso-card {
  background: var(--surface); border: 1px solid var(--steel-line); border-radius: 12px;
  padding: 14px; margin-bottom: 14px;
}
.aviso-card .aviso-meta { font-size: 11px; color: var(--chalk-dim); margin-bottom: 8px; }
.aviso-card .aviso-body { white-space: pre-wrap; line-height: 1.5; }
.aviso-card img.aviso-img { max-width: 100%; border-radius: 8px; margin-top: 10px; }
.kb-react {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  background: var(--surface-raised); border: 1px solid var(--steel-line);
  border-radius: 20px; padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.kb-react.on { border-color: var(--accent); color: var(--accent); }

.scale-section { margin-bottom: 14px; }
.scale-section h4 {
  margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--chalk-dim); border-bottom: 1px solid var(--steel-line); padding-bottom: 4px;
}

.timer-panel {
  position: fixed; left: 2vw; bottom: 4vh; z-index: 120;
  background: rgba(28,28,30,0.95); border: 1px solid var(--steel-line);
  border-radius: 12px; padding: 16px 20px; min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
html[data-theme="claro"] .timer-panel { background: rgba(255,255,255,0.97); }
.timer-panel .t-time {
  font-family: var(--mono); font-size: 42px; font-weight: 900; color: var(--accent);
  text-align: center; letter-spacing: 1px;
}
.timer-panel .t-btns { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.receipt {
  border: 1px dashed var(--steel-line); border-radius: 8px; padding: 12px; margin: 8px 0;
  font-size: 13px; background: var(--surface-raised);
}
.badge.assinado { background: rgba(74,222,128,0.15); color: var(--green); }
.badge.pendente { background: rgba(245,193,90,0.15); color: var(--yellow); }


/* ghost buttons readable on light theme */
html[data-theme="claro"] .btn.ghost,
html[data-theme="claro"] .btn-xs.ghost {
  background: #fff !important;
  color: #1C1C1E !important;
  border: 1px solid #C8C6BC !important;
}
html[data-theme="claro"] .btn.secondary,
html[data-theme="claro"] .btn-xs.secondary {
  background: #E8E6DF !important;
  color: #1C1C1E !important;
}

/* CrossHero-like timer */
.xh-timer {
  position: fixed; inset: 0; z-index: 200;
  background: #0a0a0a; color: #fff;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--mono);
}
.xh-timer.show { display: flex; }
.xh-timer .xh-mode { font-size: 18px; letter-spacing: 4px; text-transform: uppercase; color: #888; margin-bottom: 12px; }
.xh-timer .xh-clock {
  font-size: min(22vw, 160px); font-weight: 900; line-height: 1;
  color: #fff; letter-spacing: 2px;
}
.xh-timer .xh-clock.warn { color: #F5C15A; }
.xh-timer .xh-clock.go { color: #4ADE80; }
.xh-timer .xh-clock.rest { color: #60A5FA; }
.xh-timer .xh-sub { font-size: 20px; color: #aaa; margin-top: 12px; }
.xh-timer .xh-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; justify-content: center; }
.xh-timer .xh-setup {
  position: absolute; top: 16px; left: 16px; right: 16px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.xh-timer select, .xh-timer input {
  background: #1a1a1a; color: #fff; border: 1px solid #333;
  border-radius: 8px; padding: 8px 12px; font-size: 14px;
}



/* ===== Sala: coluna direita (toolbar + timer + classificação) ===== */
.sala-right-rail {
  position: fixed;
  top: 16px;
  /* afasta da borda e da scrollbar do navegador */
  right: max(24px, 18px + 12px);
  bottom: 16px;
  width: min(300px, 28vw);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  /* margem extra se scrollbar aparecer */
  margin-right: 8px;
}
.sala-right-rail > * { pointer-events: auto; }

.sala-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.sala-toolbar select {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--chalk);
  border: 1px solid var(--steel-line);
  max-width: 140px;
  flex: 1;
  min-width: 0;
}
.sala-toolbar .sala-btn {
  background: var(--steel);
  border: 1px solid var(--steel-line);
  color: var(--chalk);
  height: 40px;
  min-width: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  flex-shrink: 0;
}
.sala-toolbar .sala-btn:hover { border-color: var(--accent); color: var(--accent); }
.sala-toolbar .sala-close {
  position: static !important;
  top: auto !important;
  right: auto !important;
  flex-shrink: 0;
}

/* Timer e ranking compartilham a mesma largura da coluna */
.sala-timer-float {
  display: none;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  background: rgba(12,12,14,0.98);
  border: 1px solid var(--steel-line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.sala-timer-float.show { display: block; }
.sala-timer-float.phase-work { border-color: #4ADE80; }
.sala-timer-float.phase-rest { border-color: #60A5FA; }
.sala-timer-float.phase-cd { border-color: #F5C15A; }
.st-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 8px;
}
.st-modes button {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  padding: 7px 4px; border-radius: 6px; cursor: pointer;
  background: #1a1a1c; color: #888; border: 1px solid #2a2a2e;
}
.st-modes button.on {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.sala-timer-float .st-clock {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.1;
  margin: 4px 0 4px;
}
.sala-timer-float .st-clock.warn { color: #F5C15A; }
.sala-timer-float .st-clock.work { color: #4ADE80; }
.sala-timer-float .st-clock.rest { color: #60A5FA; }
.st-label {
  text-align: center; font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: #888;
  margin-bottom: 2px;
}
.st-sub {
  text-align: center; font-size: 12px; color: #aaa; margin-bottom: 8px;
  font-family: var(--mono);
}
.sala-timer-float .st-controls {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
.sala-timer-float .st-controls button { font-size: 12px; padding: 6px 10px; }
.sala-timer-float .st-setup {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.sala-timer-float .st-setup label {
  font-size: 10px;
  color: #888;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 52px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.sala-timer-float .st-setup input {
  width: 52px;
  height: 32px;
  text-align: center;
  padding: 4px;
  font-size: 14px;
  font-family: var(--mono);
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  box-sizing: border-box;
}


.sala-right-rail .sala-float-lb {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-height: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(20,20,22,0.92);
  border: 1px solid var(--steel-line);
  border-radius: 12px;
  padding: 14px 16px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .sala-right-rail {
    width: auto;
    left: 12px;
    right: 20px;
    bottom: 12px;
    top: auto;
    max-height: 48vh;
    margin-right: 0;
  }
  .sala-screen {
    padding-right: 6vw;
    padding-bottom: 52vh;
  }
}

html[data-theme="claro"] .sala-right-rail .sala-float-lb,
html[data-theme="claro"] .sala-timer-float {
  background: rgba(255,255,255,0.97);
}


/* Timer legível no tema claro */
html[data-theme="claro"] .sala-timer-float {
  background: rgba(255,255,255,0.98) !important;
  border-color: #C8C6BC;
  color: #1C1C1E;
}
html[data-theme="claro"] .sala-timer-float .st-clock {
  color: #1C1C1E !important;
}
html[data-theme="claro"] .sala-timer-float .st-clock.warn { color: #B8860B !important; }
html[data-theme="claro"] .sala-timer-float .st-clock.work { color: #15803D !important; }
html[data-theme="claro"] .sala-timer-float .st-clock.rest { color: #1D4ED8 !important; }
html[data-theme="claro"] .st-label,
html[data-theme="claro"] .st-sub {
  color: #555 !important;
}
html[data-theme="claro"] .st-modes button {
  background: #F0EEE8;
  color: #555;
  border-color: #C8C6BC;
}
html[data-theme="claro"] .st-modes button.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
html[data-theme="claro"] .sala-timer-float .st-setup input {
  background: #F5F4F0;
  color: #1C1C1E;
  border-color: #C8C6BC;
}
html[data-theme="claro"] .sala-timer-float .st-setup label {
  color: #666;
}
html[data-theme="claro"] .sala-toolbar select,
html[data-theme="claro"] .sala-toolbar .sala-btn,
html[data-theme="claro"] .sala-toolbar .sala-close {
  background: #fff !important;
  color: #1C1C1E !important;
  border-color: #C8C6BC !important;
}
html[data-theme="claro"] .sala-right-rail .sala-float-lb {
  background: rgba(255,255,255,0.97) !important;
  color: #1C1C1E;
}
html[data-theme="claro"] .sala-float-lb h3 {
  color: #1C1C1E;
}


/* Contrato — ações alinhadas */
.ctr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.ctr-actions .btn,
.ctr-actions .btn-xs {
  margin: 0;
  width: auto;
}
.ctr-hist-card {
  background: var(--surface-raised);
  border: 1px solid var(--steel-line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.ctr-hist-card .ctr-hist-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.ctr-hist-card .ctr-hist-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--chalk);
}
.ctr-hist-card .ctr-hist-row {
  font-size: 12px;
  color: var(--chalk-dim);
  margin-top: 3px;
}
.ctr-hist-card .ctr-hist-row b { color: var(--chalk); font-weight: 600; }




/* ===== Home estilo academia (SkyFit-inspired) ===== */
.home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0B0F1A;
  color: #fff;
}
.home-page .brand-name-fixed { color: #fff !important; }

.sf-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(8, 12, 24, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sf-nav-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sf-nav-links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sf-nav-links a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: .15s ease;
}
.sf-nav-links a:hover,
.sf-nav-links a.on {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.sf-nav-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sf-nav-right .ghost-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
}
.sf-btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.sf-btn-pill:hover { transform: translateY(-1px); }
.sf-btn-primary {
  background: var(--accent, #E11D2E);
  color: #fff !important;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent, #E11D2E) 35%, transparent);
}
.sf-btn-outline {
  background: transparent;
  color: #fff !important;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.sf-btn-outline:hover { border-color: #fff; }

.sf-hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  padding: 48px 28px 64px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(30,60,140,0.35), transparent 60%),
    linear-gradient(120deg, rgba(8,12,24,0.92) 0%, rgba(8,12,24,0.55) 45%, rgba(8,12,24,0.75) 100%),
    #0B0F1A;
}
.sf-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: 0.5;
}
.sf-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  filter: none;
  z-index: 0;
}
.sf-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.sf-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 22px;
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.sf-badges span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 8px 14px;
}
.sf-badges .b1 { background: #12182a; color: #fff; }
.sf-badges .b2 { background: #fff; color: #12182a; }
.sf-badges .b3 { background: var(--accent, #E11D2E); color: #fff; }

.sf-hero h1 {
  font-size: clamp(36px, 7vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -1.5px;
  margin: 0 0 14px;
  max-width: 14ch;
  color: #fff;
}
.sf-hero h1 .accent { color: var(--accent, #E11D2E); }
.sf-hero .lead {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,0.78);
  max-width: 42ch;
  line-height: 1.55;
  margin: 0 0 28px;
}
.sf-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.sf-section {
  padding: 56px 28px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.sf-section-head {
  margin-bottom: 28px;
}
.sf-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent, #E11D2E);
  margin: 0 0 8px;
}
.sf-section-head h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
}
.sf-section-head p {
  margin: 10px 0 0;
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  max-width: 52ch;
}

.sf-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sf-car-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  min-width: 0;
  padding: 4px 2px 8px;
}
.sf-car-track::-webkit-scrollbar { display: none; }
.sf-car-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(20,24,36,0.92);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.sf-car-btn:disabled { opacity: 0.28; cursor: default; }
.sf-carousel.no-arrows .sf-car-btn { display: none; }
.sf-plans,
.sf-shop {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: stretch;
}
.sf-plans .sf-plan,
.sf-shop .sf-shop-card {
  flex: 0 0 260px;
  width: 260px;
  max-width: 280px;
  scroll-snap-align: start;
}
@media (max-width: 700px) {
  .sf-car-btn { width: 36px; height: 36px; font-size: 22px; }
  .sf-plans .sf-plan,
  .sf-shop .sf-shop-card {
    flex: 0 0 min(78vw, 280px);
    width: min(78vw, 280px);
  }
}
.sf-plan {
  background: linear-gradient(180deg, #151b2e 0%, #101626 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s ease, transform .2s ease;
  min-height: 100%;
  box-sizing: border-box;
}
.sf-plan:hover {
  border-color: color-mix(in srgb, var(--accent, #E11D2E) 55%, transparent);
  transform: translateY(-3px);
}
.sf-plan .name { font-size: 17px; font-weight: 800; color: #fff; line-height: 1.25; }
.sf-plan .price {
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 900;
  color: var(--accent, #E11D2E);
  letter-spacing: -1px;
  margin: 4px 0;
}
.sf-plan .price small { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.5); }
.sf-plan .meta { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.5; flex: 1; }
.sf-plan .sf-btn-pill { margin-top: auto; width: 100%; box-sizing: border-box; text-align: center; }

.sf-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.sf-info {
  background: #12182a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 24px;
}
.sf-info h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.sf-info .row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}
.sf-info .row .ic {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 13px;
}
.sf-info a { color: var(--accent, #E11D2E); text-decoration: none; font-weight: 700; }

.sf-band {
  margin: 12px 0 0;
  padding: 48px 28px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent, #E11D2E) 18%, #0B0F1A), #0B0F1A 60%);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sf-band-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.sf-band h2 {
  margin: 0;
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 900;
  color: #fff;
  max-width: 18ch;
}
.sf-band p { margin: 8px 0 0; color: rgba(255,255,255,0.65); font-size: 14px; }

.sf-footer {
  margin-top: auto;
  padding: 28px;
  background: #080c18;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sf-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.sf-footer .muted { font-size: 12px; color: rgba(255,255,255,0.45); }
.sf-footer-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sf-footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}
.sf-footer-links a:hover { color: #fff; }
.sf-footer-links a.admin {
  border: 1px solid rgba(255,255,255,0.15);
}

@media (max-width: 720px) {
  .sf-nav { padding: 10px 14px; }
  .sf-nav-links { display: none; }
  .sf-hero { padding: 36px 16px 48px; min-height: 70vh; }
  .sf-section { padding: 40px 16px; }
}


.sf-brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sf-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.sf-logo-img.has-img { background-color: transparent; }
.sf-box-name {
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.2px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.mudar-plano-panel {
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--surface-raised);
  border: 1px solid var(--steel-line);
  border-radius: 12px;
  max-width: 420px;
}
.mudar-plano-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--chalk);
}
.mudar-plano-panel label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--chalk-dim);
}
.mudar-plano-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--steel-line);
  background: var(--surface);
  color: var(--chalk);
  font-size: 14px;
  margin-bottom: 12px;
}
.mudar-plano-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}


/* Social / Galeria / Chat */
.social-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.social-tab {
  border: 1px solid var(--steel-line);
  background: var(--surface);
  color: var(--chalk-dim);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.social-tab.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.gal-item {
  background: var(--surface-raised);
  border: 1px solid var(--steel-line);
  border-radius: 12px;
  overflow: hidden;
}
.gal-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #111;
}
.gal-meta {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--chalk-dim);
}
.gal-meta b { color: var(--chalk); font-size: 12px; }
.chat-card { display: flex; flex-direction: column; min-height: 420px; }
.chat-log {
  flex: 1;
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px 0;
  margin-bottom: 10px;
  border: 1px solid var(--steel-line);
  border-radius: 10px;
  background: var(--surface-raised);
  padding: 10px;
}
.chat-msg {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  max-width: 92%;
}
.chat-msg.mine {
  margin-left: auto;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.chat-name { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.chat-text { font-size: 14px; color: var(--chalk); word-break: break-word; }
.chat-time { font-size: 10px; color: var(--chalk-dim); margin-top: 4px; }
.chat-compose {
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-compose input { flex: 1; margin: 0; }


.gal-dl { margin-top: 6px; display: inline-block; width: auto; text-align: center; text-decoration: none; }

/* Chat estilo WhatsApp */
.wa-chat {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 72px; /* bottom-nav */
  display: flex;
  flex-direction: column;
  background: #0E1621;
  z-index: 200;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}
html[data-theme="claro"] .wa-chat { background: #E8E6DF; }
.wa-chat-head {
  flex-shrink: 0;
  padding: 10px 12px 10px 14px;
  background: #17212B;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wa-chat-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.wa-chat-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #242F3D;
  border: 1px solid rgba(255,255,255,0.1);
}
.wa-chat-logo-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--accent);
  font-size: 16px;
}
.wa-chat-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.wa-chat.kb-open {
  bottom: 0 !important;
}
.wa-chat.kb-open .wa-chat-compose {
  padding-bottom: 10px;
}
body:has(.wa-chat.kb-open) .bottom-nav {
  opacity: 0;
  pointer-events: none;
}
html[data-theme="claro"] .wa-chat-close {
  background: rgba(0,0,0,0.06);
  color: #1C1C1E;
}

html[data-theme="claro"] .wa-chat-head { background: #fff; border-bottom-color: #ddd; }
.wa-chat-title { font-weight: 800; font-size: 16px; color: #fff; }
html[data-theme="claro"] .wa-chat-title { color: #1C1C1E; }
.wa-chat-sub { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 2px; }
html[data-theme="claro"] .wa-chat-sub { color: #666; }
.wa-chat-log {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 14px 16px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
}
.wa-bubble-row {
  display: flex;
  margin-bottom: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 2px;
}
.wa-bubble-row.mine { justify-content: flex-end; }
.wa-bubble {
  max-width: calc(100% - 28px);
  width: fit-content;
  padding: 6px 10px 4px;
  border-radius: 10px 10px 10px 4px;
  background: #182533;
  color: #E8ECF0;
  box-shadow: 0 1px 1px rgba(0,0,0,0.15);
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.wa-bubble.mine {
  background: color-mix(in srgb, var(--accent) 75%, #1a3a2a);
  border-radius: 10px 10px 4px 10px;
  color: #fff;
}
html[data-theme="claro"] .wa-bubble { background: #fff; color: #1C1C1E; }
html[data-theme="claro"] .wa-bubble.mine {
  background: color-mix(in srgb, var(--accent) 55%, #fff);
  color: #111;
}
.wa-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}
.wa-text {
  font-size: 14.5px;
  line-height: 1.35;
  word-break: break-word;
  white-space: pre-wrap;
}
.wa-time {
  text-align: right;
  font-size: 10px;
  opacity: 0.65;
  margin-top: 2px;
}
.wa-chat-compose {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #17212B;
  border-top: 1px solid rgba(255,255,255,0.06);
  width: 100%;
  box-sizing: border-box;
  max-width: 100vw;
}
html[data-theme="claro"] .wa-chat-compose { background: #fff; border-top-color: #ddd; }
.wa-chat-compose input {
  flex: 1;
  min-width: 0; /* evita estourar a largura no flex */
  margin: 0;
  border-radius: 22px;
  padding: 10px 14px;
  border: none;
  background: #242F3D;
  color: #fff;
  box-sizing: border-box;
font-size: 16px;
  line-height: 1.25;
  }
html[data-theme="claro"] .wa-chat-compose input {
  background: #F0EEE8;
  color: #1C1C1E;
}
.wa-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
/* quando chat aberto, esconde header do wrap para maximizar espaço */
body:has(.wa-chat) .wrap > header { display: none; }
body:has(.wa-chat) .wrap { padding: 0; max-width: none; }
body:has(.wa-chat) #screen { padding: 0; }

body:has(.wa-chat) .social-tabs { display: none; }
.wa-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* iOS: evita zoom no input e corte lateral ao focar */
body:has(.wa-chat) {
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
}
body:has(.wa-chat) .wrap,
body:has(.wa-chat) #screen {
  overflow-x: hidden;
  max-width: 100vw;
}
.wa-chat, .wa-chat * {
  max-width: 100%;
}
.wa-chat-compose input {
  font-size: 16px !important; /* <16px no iOS causa zoom e corta a tela */
  transform: translateZ(0);
}

/* Chat: campo de mensagem sempre visível no mobile */
.wa-chat {
  z-index: 200 !important;
}
body.chat-kb-open .bottom-nav {
  display: none !important;
}
body.chat-kb-open .wa-chat {
  top: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  height: 100dvh !important;
}
.wa-chat-compose {
  position: relative;
  z-index: 5;
  background: #17212B !important;
}
.wa-chat-compose input {
  font-size: 16px !important;
}


/* Feed estilo Instagram */
.ig-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 520px;
  margin: 0 auto;
}
.ig-post {
  background: var(--surface);
  border: 1px solid var(--steel-line);
  border-radius: 14px;
  overflow: hidden;
}
.ig-post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.ig-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-raised);
}
.ig-avatar-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: var(--accent);
  color: #111;
  font-size: 14px;
}
.ig-user { flex: 1; min-width: 0; }
.ig-name { font-weight: 800; font-size: 13px; color: var(--chalk); }
.ig-time { font-size: 11px; color: var(--chalk-dim); }
.ig-media {
  width: 100%;
  background: #0a0a0c;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ig-media img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  vertical-align: middle;
}
.ig-media-empty {
  padding: 40px;
  color: var(--chalk-dim);
  font-size: 13px;
}
.ig-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 4px;
  justify-content: flex-start;
}
.ig-btn {
  border: none;
  background: transparent;
  color: var(--chalk);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.ig-btn.kb-react.on {
  color: var(--accent);
}
.ig-caption {
  padding: 2px 14px 12px;
  font-size: 13px;
  color: var(--chalk);
  line-height: 1.4;
}
.ig-caption b { margin-right: 6px; }
.ig-comments {
  border-top: 1px solid var(--steel-line);
  padding: 10px 12px 12px;
  background: var(--surface-raised);
}
.ig-cmt {
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--chalk);
  line-height: 1.35;
}
.ig-cmt-time {
  display: block;
  font-size: 10px;
  color: var(--chalk-dim);
  margin-top: 2px;
}
.ig-cmt-compose {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.ig-cmt-compose input {
  flex: 1;
  margin: 0;
  font-size: 16px;
}


/* Home desktop polish */
.sf-section {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
  box-sizing: border-box;
}
.sf-section-head {
  text-align: left;
  max-width: 640px;
  margin-bottom: 28px;
}
.sf-section-head.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.sf-section-head.center p {
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 900px) {
  .sf-section-head { margin-bottom: 36px; }
  .sf-info-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}
.sf-info {
  min-height: 100%;
  box-sizing: border-box;
}
.sf-band-inner {
  max-width: 1120px;
}
.sf-hero-inner {
  max-width: 1120px;
}
.sf-nav {
  padding-left: 28px;
  padding-right: 28px;
}
.sf-footer-inner {
  max-width: 1120px;
}

/* Experimental form — desktop alinhado */
.exp-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.exp-form-card {
  background: linear-gradient(180deg, #151b2e 0%, #101626 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.exp-form-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.exp-form-card input,
.exp-form-card select {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(11,15,26,0.85);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease;
}
.exp-form-card input:focus,
.exp-form-card select:focus {
  border-color: var(--accent, #E11D2E);
}
.exp-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
.exp-form-grid .full { grid-column: 1 / -1; }
.exp-form-card .sf-btn-pill {
  margin-top: 8px;
  padding: 14px 20px;
  font-size: 14px;
}
@media (max-width: 600px) {
  .exp-form-grid { grid-template-columns: 1fr; }
  .exp-form-card { padding: 20px 16px; }
  .sf-section { padding-left: 16px; padding-right: 16px; }
  .sf-nav { padding-left: 14px; padding-right: 14px; }
}


/* Footer mobile center */
@media (max-width: 640px) {
  .sf-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
  .sf-footer-links {
    justify-content: center;
    width: 100%;
  }
}


/* ===== LOJA / CARRINHO ===== */
.sf-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sf-cart-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.sf-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent, #E11D2E);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.sf-shop {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: stretch;
}
.sf-shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255,255,255,0.5);
  padding: 32px;
}
.sf-shop-card {
  background: linear-gradient(180deg, #151b2e 0%, #101626 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sf-shop-img {
  aspect-ratio: 1;
  background: #0a0c12;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sf-shop-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sf-shop-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.sf-shop-body .cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.45);
  font-weight: 700;
}
.sf-shop-body h3 {
  margin: 0;
  font-size: 16px;
  color: #fff;
}
.sf-shop-body p {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  flex: 1;
}
.sf-shop-body .price {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent, #E11D2E);
}
.sf-shop-size {
  width: 100%;
  margin: 4px 0;
  box-sizing: border-box;
}
.sf-shop-buy {
  width: 100%;
  margin-top: 6px;
  border: none;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
}

.sf-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 900;
}
.sf-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  background: #0E1422;
  z-index: 901;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,0.4);
}
.sf-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sf-cart-head h3 { margin: 0; color: #fff; font-size: 18px; }
.sf-cart-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.08); color: #fff;
  font-size: 22px; cursor: pointer;
}
.sf-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}
.sf-cart-empty { color: rgba(255,255,255,0.5); text-align: center; padding: 40px 10px; }
.sf-cart-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sf-cart-item img, .sf-cart-ph {
  width: 64px; height: 64px; border-radius: 10px; object-fit: cover;
  background: #1a2030; flex-shrink: 0;
}
.sf-cart-info { flex: 1; min-width: 0; }
.sf-cart-info .n { color: #fff; font-weight: 700; font-size: 14px; }
.sf-cart-info .m { color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 2px; }
.sf-cart-info .q {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.sf-cart-info .q button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
  background: transparent; color: #fff; cursor: pointer; font-size: 16px;
}
.sf-cart-foot {
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sf-cart-total { color: #fff; font-size: 16px; margin-bottom: 8px; }
.sf-cart-note { font-size: 12px; color: rgba(255,255,255,0.45); margin: 0 0 12px; line-height: 1.4; }
