/* Design tokens — shadcn/ui New York / zinc (HSL) */
:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.5rem;
  --sidebar: 240 5.9% 10%;
  --sidebar-foreground: 240 4.8% 95.9%;
  --sidebar-accent: 240 3.7% 15.9%;
  --sidebar-border: 240 3.7% 15.9%;
  --sidebar-ring: 217.2 91.2% 59.8%;
  --brand: 32 95% 55%;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --navy: hsl(var(--sidebar));
  --blue: hsl(var(--primary));
  --cyan: hsl(var(--muted));
  --mint: 142 40% 94%;
  --orange: hsl(var(--brand));
  --ink: hsl(var(--foreground));
  --line: hsl(var(--border));
  --bg: hsl(240 4.8% 95.9%);
  --white: hsl(var(--card));
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; max-width: 100%; overflow-x: hidden; }
img, video, iframe, svg { max-width: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: hsl(var(--foreground));
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }

.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 0;
  width: 100%;
}
.side {
  background: hsl(var(--sidebar));
  color: hsl(var(--sidebar-foreground));
  padding: var(--space-6) var(--space-4);
  border-right: 1px solid hsl(var(--sidebar-border));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 var(--space-6);
}
.logo span { color: hsl(var(--brand)); }
.profile-mini {
  background: hsl(var(--sidebar-accent));
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: 0 0 var(--space-6);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: hsl(var(--brand));
  font-weight: 600;
  font-size: 12px;
  color: hsl(var(--sidebar));
  margin-bottom: var(--space-3);
  background-size: cover;
  background-position: center;
  border: 0;
  padding: 0;
  cursor: default;
}
.app.pro .avatar { cursor: pointer; }
.photo-actions input[type=file] { display: block; margin-top: var(--space-2); max-width: 100%; }
.profile-mini strong { display: block; font-size: 14px; font-weight: 600; }
.profile-mini small { color: hsl(var(--muted-foreground)); display: block; font-size: 12px; }
#miniMeta { margin-top: var(--space-2); font-size: 11px; line-height: 1.4; }

.nav { display: grid; gap: 2px; }
.nav button {
  border: 0;
  background: none;
  color: hsl(240 5% 64.9%);
  text-align: left;
  padding: 8px 12px;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
}
.nav button.active,
.nav button:hover {
  background: hsl(var(--sidebar-accent));
  color: hsl(var(--sidebar-foreground));
}

.main {
  padding: var(--space-6) var(--space-8);
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.top-title { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.header-actions { margin: 0; align-items: center; }
.eyebrow {
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.top h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 0; }
.status {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.icon-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: calc(var(--radius) - 2px);
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  margin-top: 4px;
}
.icon-btn span {
  display: block;
  height: 1.5px;
  background: hsl(var(--foreground));
  border-radius: 99px;
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: hsl(240 10% 3.9% / 0.4);
  z-index: 30;
}

.grid { display: grid; grid-template-columns: 1.35fr 0.8fr; gap: var(--space-6); }
.card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}
.card h2 { font-size: 16px; font-weight: 600; margin: 0 0 var(--space-4); letter-spacing: -0.01em; }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
  flex-wrap: wrap;
}
.badge {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.field.full { grid-column: 1 / -1; }
.field label,
.field .lbl {
  display: block;
  color: hsl(var(--foreground));
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 var(--space-2);
}
.field input,
.field select,
.field textarea,
.routine-row input[type=time],
input[type=date],
input[type=number],
input[type=text],
input[type=email],
input[type=password],
textarea,
select {
  width: 100%;
  height: 36px;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--background));
  padding: 8px 12px;
  color: hsl(var(--foreground));
  outline: none;
}
.field textarea,
textarea { height: auto; min-height: 80px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring) / 0.25);
}

.checks { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.checks label {
  border: 1px solid hsl(var(--border));
  padding: 6px 12px;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  background: hsl(var(--background));
  font-size: 13px;
}
.checks label:has(input:checked) {
  border-color: hsl(var(--foreground));
  color: hsl(var(--foreground));
  background: hsl(var(--secondary));
}
.checks input { accent-color: hsl(var(--foreground)); width: auto; height: auto; box-shadow: none; }

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  height: 36px;
  padding: 0 16px;
  border-radius: calc(var(--radius) - 2px);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.action:hover { opacity: 0.92; }
.action.secondary {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}
.action.secondary:hover { background: hsl(var(--accent)); }
.actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.metric {
  background: hsl(var(--sidebar));
  color: hsl(var(--sidebar-foreground));
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-3);
  border: 1px solid hsl(var(--sidebar-border));
}
.metric small { color: hsl(240 5% 64.9%); font-size: 12px; }
.metric strong { display: block; font-size: 24px; font-weight: 600; margin-top: 4px; letter-spacing: -0.02em; }
.metric em { font-size: 12px; color: hsl(240 5% 64.9%); font-style: normal; }

.list { display: grid; gap: var(--space-2); }
.item {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: flex-start;
  background: hsl(var(--card));
}
.item strong { display: block; font-weight: 600; }
.item small { color: hsl(var(--muted-foreground)); }

.tabs,
.subtabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  margin-bottom: var(--space-6);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  padding: 4px;
  border-radius: var(--radius);
  width: fit-content;
  max-width: 100%;
}
.tabs button,
.subtabs button {
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  padding: 6px 12px;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  font-size: 13px;
}
.tabs button.active,
.subtabs button.active {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px hsl(240 10% 3.9% / 0.06);
}

.panel, .seg { display: none; }
.panel.active, .seg.active { display: block; }

.notice {
  padding: var(--space-3) var(--space-4);
  background: hsl(48 96% 89%);
  color: hsl(32 81% 28%);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.45;
  margin: var(--space-3) 0;
  border: 1px solid hsl(48 96% 77%);
}
.notice.ok {
  background: hsl(var(--mint));
  color: hsl(142 64% 24%);
  border-color: hsl(142 40% 80%);
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-8) var(--space-4);
  background: var(--bg);
}
.auth-gate .logo { margin: 0 0 var(--space-3); color: hsl(var(--foreground)); font-size: 22px; }
.auth-card {
  width: min(440px, 100%);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-8) var(--space-6);
}
.auth-lead { color: hsl(var(--muted-foreground)); line-height: 1.5; margin: 0 0 var(--space-6); }
.auth-gate .subtabs { margin-bottom: var(--space-4); }
.auth-gate h2 { font-size: 16px; font-weight: 600; margin: var(--space-2) 0 var(--space-3); }
body.authed .auth-gate { display: none; }
body.authed .app { display: grid; }
.app[hidden] { display: none !important; }
.auth-gate [hidden],
.actions[hidden],
form[hidden] { display: none !important; }

.photo-box { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 18px;
  background-size: cover;
  background-position: center;
  border: 1px solid hsl(var(--border));
  flex-shrink: 0;
}
.photo-actions { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.photo-actions small { color: hsl(var(--muted-foreground)); }

.readonly { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.readonly .kv {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  background: hsl(var(--background));
}
.readonly .kv.full { grid-column: 1 / -1; }
.readonly dt { color: hsl(var(--muted-foreground)); font-size: 12px; margin: 0 0 4px; }
.readonly dd { margin: 0; font-weight: 600; }
.empty-view { color: hsl(var(--muted-foreground)); grid-column: 1 / -1; }

.home-hero {
  background: hsl(var(--sidebar));
  color: hsl(var(--sidebar-foreground));
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-5);
  flex-wrap: wrap;
  border: 1px solid hsl(var(--sidebar-border));
}
.home-hero h2 { margin: 8px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.home-hero p { margin: 8px 0 0; color: hsl(240 5% 64.9%); max-width: 640px; line-height: 1.5; }
.home-hero .eyebrow { color: hsl(240 5% 64.9%); }
.home-hero .action {
  background: hsl(var(--sidebar-foreground));
  color: hsl(var(--sidebar));
  border-color: transparent;
}
.home-hero .action.secondary {
  background: transparent;
  color: hsl(var(--sidebar-foreground));
  border-color: hsl(var(--sidebar-border));
}

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
.stat {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-4);
}
.stat small { color: hsl(var(--muted-foreground)); display: block; font-size: 12px; }
.stat strong { display: block; font-size: 22px; font-weight: 600; margin: 6px 0 4px; letter-spacing: -0.02em; }
.stat em { font-style: normal; font-size: 12px; color: hsl(var(--muted-foreground)); }
.bar { height: 6px; background: hsl(var(--muted)); border-radius: 99px; overflow: hidden; margin-top: var(--space-3); }
.bar span { display: block; height: 100%; background: hsl(var(--primary)); border-radius: 99px; max-width: 100%; }
.bar.over span { background: hsl(var(--brand)); }
.home-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--space-6); }

.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slots button {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: calc(var(--radius) - 4px);
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  height: auto;
}
.slots button.on {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.day-grid { display: grid; gap: var(--space-3); }
.routine-row {
  display: grid;
  grid-template-columns: 160px repeat(2, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}
.routine-head { color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 600; }
.lgpd { font-size: 13px; color: hsl(var(--muted-foreground)); line-height: 1.55; margin: var(--space-2) 0 var(--space-4); }

.alert-alto { background: hsl(0 86% 97%); color: hsl(0 74% 32%); }
.alert-medio { background: hsl(48 96% 89%); color: hsl(32 81% 28%); }

.insight-panel h2 { margin: 0; }
.insight-list { display: grid; gap: var(--space-3); }
.insight {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-4);
  background: hsl(var(--background));
}
.insight.previsao { border-color: hsl(var(--border)); }
.insight.alerta { border-color: hsl(0 84% 80%); background: hsl(0 86% 97%); }
.insight-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin-bottom: 6px;
}
.insight.alerta .insight-kicker { color: hsl(0 74% 42%); }
.insight p { margin: 8px 0; line-height: 1.5; }
.insight cite { display: block; font-size: 11px; color: hsl(var(--muted-foreground)); font-style: normal; line-height: 1.4; }

.pro-gate { max-width: 520px; }
.code-pill {
  font-family: ui-monospace, Consolas, monospace;
  background: hsl(var(--muted));
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  font-size: 12px;
}
.dir-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: hsl(var(--muted)) center / cover no-repeat;
  flex-shrink: 0;
  border: 1px solid hsl(var(--border));
}
.body-map {
  width: 100%;
  max-width: 520px;
  display: block;
  margin: 8px 0 12px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: #fff;
}
.map-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.map-chips label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  background: hsl(var(--muted));
  padding: 6px 10px;
  border-radius: 999px;
}
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.before-after figure {
  margin: 0;
}
.before-after img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: #fff;
}
.before-after figcaption {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 6px;
}
@media (max-width: 640px) {
  .before-after { grid-template-columns: 1fr; }
}

.app.pro .student-nav,
.app.pro .student-panel { display: none !important; }
.app.aluno .pro-nav,
.app.aluno .pro-panel { display: none !important; }
.app.pro .pro-nav { display: grid; }

.donut-wrap { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; margin-bottom: var(--space-4); }
.donut { width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0; }
.donut-legend { display: grid; gap: 6px; font-size: 13px; color: hsl(var(--muted-foreground)); }
.hbar { margin-bottom: var(--space-3); }
.hbar-track { height: 6px; background: hsl(var(--muted)); border-radius: 99px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; border-radius: 99px; }
.hbar em { display: block; font-style: normal; font-size: 12px; color: hsl(var(--muted-foreground)); margin-top: 4px; }
.ex-video-wrap { margin-top: var(--space-3); max-width: 480px; }
.ex-video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: hsl(var(--sidebar)); display: block; }

.eval-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.chart { min-height: 220px; overflow: hidden; }
.chart svg { max-width: 100%; height: auto; display: block; }
.chart .leg { display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 10px 0; font-size: 12px; color: hsl(var(--muted-foreground)); }
.chart .leg i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.table-wrap { overflow: auto; }
.eval-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.eval-table th,
.eval-table td { border: 1px solid hsl(var(--border)); padding: 8px; text-align: center; white-space: nowrap; }
.eval-table th { background: hsl(var(--sidebar)); color: hsl(var(--sidebar-foreground)); font-weight: 600; }
.eval-table tr:nth-child(even) td { background: hsl(var(--muted) / 0.5); }
.eval-table td.label { text-align: left; font-weight: 600; background: hsl(var(--muted)); }

.stars { color: hsl(var(--brand)); letter-spacing: 2px; font-size: 16px; }
.star-pick { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.star-pick label { cursor: pointer; border: 1px solid hsl(var(--border)); padding: 8px 10px; border-radius: calc(var(--radius) - 2px); }
.star-pick label:has(input:checked) { border-color: hsl(var(--foreground)); background: hsl(var(--secondary)); }
.star-pick input { width: auto; height: auto; box-shadow: none; }

.roster-card { padding-bottom: var(--space-4); }
.roster-scroll {
  max-height: 420px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}
.roster-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 12px auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
}
.roster-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.roster-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: hsl(var(--muted)) center / cover no-repeat;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.roster-who { min-width: 0; }
.roster-who strong { display: block; font-size: 14px; line-height: 1.3; word-break: break-word; }
.roster-code { color: hsl(var(--muted-foreground)); font-size: 11px; letter-spacing: 0.06em; }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: hsl(142 70% 45%);
}
.status-dot.expirado { background: hsl(48 96% 53%); }
.status-dot.bloqueado { background: hsl(0 72% 51%); }
.pill-btn {
  border: 0;
  background: hsl(240 4% 26%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.icon-link {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.icon-link.wa { color: #128c7e; }
.icon-link.wa.off { opacity: 0.35; cursor: default; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank-table th, .rank-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid hsl(var(--border)); }
.rank-table th { color: hsl(var(--muted-foreground)); font-weight: 500; font-size: 12px; }

.stats-cockpit { grid-template-columns: repeat(5, 1fr); }
.stat.warn strong { color: hsl(0 74% 42%); }
.stats-mini { grid-template-columns: repeat(2, 1fr); margin: 0 0 var(--space-3); }
.stats-mini .stat { padding: var(--space-3); }
.stats-mini .stat strong { font-size: 18px; margin: 4px 0; }
.table-scroll { overflow-x: auto; }
.cockpit-mini h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}
.cockpit-mini h3:first-child { margin-top: var(--space-4); }
.evo-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.evo-kpis .metric {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  background: hsl(var(--background));
}
.evo-kpis small { color: hsl(var(--muted-foreground)); font-size: 12px; }
.evo-kpis strong { display: block; font-size: 20px; margin: 4px 0; letter-spacing: -0.02em; }
.evo-kpis em { font-style: normal; font-size: 12px; color: hsl(var(--muted-foreground)); }
.evo-kpis .up strong { color: hsl(142 45% 28%); }
.evo-kpis .down strong { color: hsl(0 74% 42%); }
.clinic-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.clinic-gallery figure {
  margin: 0;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  background: hsl(var(--background));
}
.clinic-gallery img { width: 100%; height: 90px; object-fit: cover; display: block; }
.clinic-gallery figcaption { padding: 6px 8px; font-size: 12px; color: hsl(var(--muted-foreground)); }
.cockpit-charts {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-6);
}
.cockpit-charts h3 { margin: 0 0 var(--space-3); font-size: 13px; font-weight: 600; }
.spark {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
}
.spark .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.spark .col span {
  display: block;
  width: 100%;
  max-width: 28px;
  border-radius: 4px 4px 0 0;
  background: hsl(var(--primary));
  min-height: 4px;
}
.spark .col em { font-style: normal; font-size: 11px; color: hsl(var(--muted-foreground)); }
.risk-act { white-space: nowrap; }

.trophy { font-size: 18px; filter: grayscale(0); }
.trophy.silver { filter: grayscale(0.4) brightness(1.2); }
.trophy.bronze { filter: sepia(0.8) saturate(2) hue-rotate(-20deg); }
.rank-n { color: hsl(var(--muted-foreground)); font-weight: 600; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.rank-board {
  background: linear-gradient(180deg, #0b3b4e 0%, #123544 28%, #152836 100%);
  color: #e8eef3;
  border-radius: 22px;
  padding: 20px 16px 12px;
  box-shadow: 0 12px 32px rgba(8, 20, 28, 0.28);
}
.rank-board h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.rank-sub {
  margin: 4px 0 0;
  color: rgba(232, 238, 243, 0.55);
  font-size: 13px;
}
.rank-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
}
.rank-chip {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: #2aa4e0 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='white' d='M1 1l5 5 5-5'/></svg>") no-repeat right 12px center;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 28px 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 40px;
  max-width: calc(50% - 6px);
  min-width: 0;
}
.rank-chip:focus {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}
.rank-list {
  background: #1c2733;
  border-radius: 16px;
  overflow: hidden;
}
.rank-head,
.rank-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}
.rank-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 238, 243, 0.45);
}
.rank-head span:last-child,
.rank-pts { text-align: right; }
.rank-row + .rank-row { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.rank-rank {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #fff;
}
.rank-pos { min-width: 1.2em; }
.rank-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 500;
  color: #fff;
}
.rank-user span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-av {
  width: 36px;
  height: 36px;
  background-color: #3a4a58;
  color: #d7e2ea;
}
.rank-pts { font-weight: 600; color: #fff; }
.rank-row.me { background: rgba(42, 164, 224, 0.12); }
.hub {
  background: linear-gradient(180deg, #0b3b4e 0%, #123544 22%, #152836 100%);
  color: #e8eef3;
  border-radius: 22px;
  padding: 20px 16px 16px;
  margin-bottom: var(--space-6);
  display: grid;
  gap: 14px;
}
.hub-head { display: flex; align-items: center; gap: 12px; }
.hub-photo { width: 56px; height: 56px; background-color: #3a4a58; color: #d7e2ea; font-size: 16px; }
.hub-who strong { display: block; font-size: 16px; color: #fff; }
.hub-who small { color: rgba(232, 238, 243, 0.65); }
.hub-plan {
  background: #1c2733;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hub-plan .ok { color: #3ddc84; font-weight: 700; }
.hub-plan .bad { color: #f0b429; font-weight: 700; }
.hub-week {
  background: #1c2733;
  border-radius: 16px;
  padding: 14px 12px 16px;
}
.hub-week-top {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.hub-week-label { text-align: center; }
.hub-week-label strong { display: block; color: #fff; }
.hub-week-label span { font-size: 13px; color: rgba(232, 238, 243, 0.7); }
.hub-week-nav {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  height: 36px;
}
.hub-week-act {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 12px;
  color: rgba(232, 238, 243, 0.8);
}
.hub-flake { background: #2a3542; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.hub-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}
.hub-day { display: grid; gap: 6px; justify-items: center; font-size: 11px; color: rgba(232, 238, 243, 0.55); }
.hub-day.on { color: #3ddc84; font-weight: 700; }
.hub-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.28);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.hub-mark.miss { border-color: transparent; }
.hub-mark.done { background: #2aa4e0; border-color: #2aa4e0; color: #fff; }
.hub-h { margin: 4px 0 0; font-size: 16px; color: rgba(232, 238, 243, 0.8); font-weight: 600; }
.hub-xp { background: #1c2733; border-radius: 14px; padding: 12px 14px; }
.hub-xp-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: #fff; }
.hub-xp-bar { background: #2a3542; height: 8px; border-radius: 999px; overflow: hidden; }
.hub-xp-bar span { display: block; height: 100%; background: #3ddc84; width: 0; }
.hub-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hub-kpi {
  background: #1c2733;
  border-radius: 14px;
  padding: 14px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: center;
}
.hub-kpi strong { font-size: 22px; color: #fff; grid-column: 1; }
.hub-kpi small { grid-column: 1; text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; color: rgba(232, 238, 243, 0.55); line-height: 1.3; }
.hub-ico { grid-row: 1 / span 2; grid-column: 2; font-size: 18px; }
.hub-rank {
  width: 100%;
  background: #1c2733;
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.hub-rank::after { content: '›'; float: right; font-weight: 400; font-size: 22px; line-height: 1; }
.play-feedback { margin-top: 16px; display: grid; gap: 8px; }
.play-feedback textarea {
  min-height: 88px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  padding: 10px;
}
.recado-line { display: block; margin-top: 6px; color: hsl(var(--foreground)); }

.table-scroll { max-height: 420px; overflow: auto; }
.workout-block { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 12px; margin-top: 12px; display: grid; gap: 10px; }
.wo-board { display: grid; gap: 12px; }
.wo-stage {
  background: hsl(var(--sidebar));
  color: hsl(var(--sidebar-foreground));
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}
.wo-stage h2 { margin: 0 0 12px; font-size: 22px; font-weight: 600; }
.wo-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
.wo-tabs-3 { grid-template-columns: 1fr 1fr 1fr; }
.agenda-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: center;
  margin: 0 0 16px;
}
.agenda-kpis strong { display: block; font-size: 28px; color: #fff; }
.agenda-kpis span { color: rgba(232, 238, 243, 0.55); font-size: 13px; }
.agenda-acc {
  background: #1c2733;
  border-radius: 14px;
  overflow: hidden;
}
.agenda-acc-btn {
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  cursor: pointer;
}
.agenda-acc-btn::after { content: '▾'; float: right; }
.agenda-acc.closed .agenda-acc-btn::after { content: '▸'; }
.agenda-acc.closed .agenda-lines { display: none; }
.agenda-line {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 10px;
  padding: 8px 16px;
  color: rgba(232, 238, 243, 0.85);
  font-size: 14px;
}
.agenda-line em { font-style: normal; color: rgba(232, 238, 243, 0.55); }
.wo-reg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.wo-reg input[type=date] {
  flex: 1;
  min-width: 140px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid hsl(240 4% 28%);
  background: hsl(240 4% 12%);
  color: #fff;
  padding: 0 8px;
}
.play-reg { margin-top: 16px; display: grid; gap: 8px; }
.wo-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: hsl(240 5% 64.9%);
  padding: 10px 8px;
  font-weight: 500;
  cursor: pointer;
}
.wo-tabs button.on { color: #fff; font-weight: 700; border-bottom-color: #fff; }
.wo-msg { color: hsl(240 5% 70%); margin: 0 0 16px; line-height: 1.45; }
.wo-facts-block { margin-bottom: 16px; }
.wo-facts-box {
  background: hsl(240 4% 16%);
  border-radius: 12px;
  padding: 4px 16px;
}
.wo-fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid hsl(240 4% 22%);
  font-size: 14px;
}
.wo-fact:last-child { border-bottom: 0; }
.wo-fact span { color: hsl(240 5% 70%); }
.wo-diff { color: #4ade80; font-weight: 600; }
.wo-card {
  background: hsl(240 4% 16%);
  color: hsl(var(--sidebar-foreground));
  border-radius: 16px;
  padding: 16px 16px 14px;
}
.wo-card h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.wo-desc { margin: 6px 0 16px; min-height: 1.2em; color: hsl(240 5% 64.9%); font-size: 13px; }
.wo-card-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wo-hist {
  border: 1px solid hsl(240 4% 28%);
  background: hsl(240 4% 16%);
  color: hsl(var(--sidebar-foreground));
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.wo-view {
  border: 0;
  background: hsl(199 89% 48%);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
#workoutDetail:has(.play-screen) {
  background: transparent;
  border: 0;
  padding: 0;
}
.play-screen {
  background: hsl(var(--sidebar));
  color: hsl(var(--sidebar-foreground));
  border-radius: 16px;
  padding: 16px 16px 24px;
}
.play-back {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0 0 12px;
  cursor: pointer;
}
.play-screen h2 { font-size: 22px; font-weight: 600; margin: 0 0 16px; line-height: 1.25; }
.play-start { text-align: center; margin-bottom: 20px; }
.play-start-btn {
  width: 100%;
  border: 0;
  background: #fff;
  color: hsl(var(--sidebar));
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.play-start p { color: hsl(240 5% 70%); margin: 10px 0 0; font-size: 13px; }
.play-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid hsl(199 89% 48% / 0.55);
  background: hsl(199 80% 18%);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.play-banner p { margin: 4px 0 0; font-size: 13px; color: hsl(240 5% 75%); }
.play-banner-side { text-align: right; }
.play-cancel {
  display: block;
  margin-left: auto;
  margin-bottom: 6px;
  border: 0;
  background: hsl(199 89% 48%);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
#woClock { color: hsl(199 89% 70%); font-variant-numeric: tabular-nums; }
.play-ex { margin-bottom: 22px; }
.play-ex-top { display: flex; align-items: center; gap: 8px; }
.play-ex h3 { margin: 0; font-size: 16px; flex: 1; }
.play-num { font-weight: 700; }
.play-check {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid hsl(240 5% 46%);
  background: transparent;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.play-check.on { background: hsl(199 89% 48%); border-color: hsl(199 89% 48%); }
.play-undo { background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; }
.play-serie { color: hsl(199 89% 65%); margin: 8px 0 4px; font-weight: 600; font-size: 14px; }
.play-meta { margin: 2px 0; color: hsl(240 5% 75%); font-size: 13px; }
.play-video { margin: 12px 0; border-radius: 12px; overflow: hidden; background: #000; }
.play-video .ex-video { width: 100%; aspect-ratio: 16/9; display: block; border: 0; }
.play-video-empty { aspect-ratio: 16/9; display: grid; place-items: center; color: hsl(240 5% 64.9%); }
.play-details-toggle {
  background: none;
  border: 0;
  color: inherit;
  padding: 8px 0;
  cursor: pointer;
  font: inherit;
}
.play-notes textarea {
  width: 100%;
  min-height: 88px;
  border-radius: 12px;
  border: 0;
  background: hsl(240 4% 16%);
  color: inherit;
  padding: 12px;
  font: inherit;
}
.play-note-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 8px; }
.play-save {
  border: 0;
  background: hsl(199 89% 48%);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}
.play-clear { background: none; border: 0; color: inherit; cursor: pointer; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cat-tile {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
}
.cat-tile.on { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: transparent; }
.lib-ex-list { display: grid; gap: 8px; margin-top: 8px; }
.lib-ex {
  display: grid;
  gap: 2px;
  text-align: left;
  width: 100%;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
}
.lib-ex small { color: hsl(var(--muted-foreground)); }
.ex-mini { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid hsl(var(--border)); }
.sheet {
  position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.55);
  display: grid; place-items: center; padding: 12px;
}
.sheet[hidden] { display: none; }
.sheet-card {
  width: min(640px, 100%); max-height: 92vh; overflow: auto;
  background: hsl(var(--card)); color: hsl(var(--foreground));
  border-radius: 16px; padding: 16px; display: grid; gap: 12px;
}
.sheet-art {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
}
.didactic-tabs { display: flex; flex-wrap: wrap; gap: 6px; position: sticky; top: 0; background: hsl(var(--card)); z-index: 1; padding: 8px 0; }
.didactic-tabs button { border: 1px solid hsl(var(--border)); background: hsl(var(--background)); border-radius: 999px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.didactic-tabs button.on { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: transparent; }
.learn-list { display: grid; gap: 8px; }
.learn-list button { width: 100%; text-align: left; }
.warn-box { font-size: 13px; border: 1px solid hsl(48 96% 45% / .4); background: hsl(48 96% 53% / .12); border-radius: 8px; padding: 10px; }
.check-block h3 { font-size: 13px; margin: 12px 0 6px; }
.check-block label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 4px 0; }
.card-grid { display: grid; gap: 8px; }
.d-card { border: 1px solid hsl(var(--border)); border-radius: 12px; padding: 12px; }
.linkish { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }

.toast {
  display: none;
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 50;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  max-width: min(360px, calc(100% - 32px));
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    min-height: 100%;
    min-height: 100dvh;
    overflow: auto;
    padding-top: max(var(--space-6), env(safe-area-inset-top, 0px));
    padding-bottom: max(var(--space-6), env(safe-area-inset-bottom, 0px));
  }
  body.nav-open .side { transform: translateX(0); }
  body.nav-open .sidebar-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  .icon-btn.menu-toggle { display: flex; }
  .main {
    padding: var(--space-4);
    padding-bottom: max(var(--space-8), env(safe-area-inset-bottom, 0px));
    max-width: 100%;
  }
  .top {
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
  }
  .top h1 { font-size: 20px; }
  .header-actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0;
  }
  .status { display: none; }
  .card { padding: var(--space-4); }
  .grid,
  .home-grid,
  .fields,
  .readonly,
  .chart-grid,
  .eval-kpis,
  .cockpit-charts { grid-template-columns: 1fr; }
  .field.full,
  .readonly .kv.full { grid-column: auto; }
  .stats,
  .stats-cockpit { grid-template-columns: 1fr 1fr; }
  .evo-kpis,
  .stats-mini { grid-template-columns: 1fr 1fr; }
  .routine-row { grid-template-columns: 1fr; }
  .roster-row { grid-template-columns: 40px minmax(0, 1fr) 12px; }
  .roster-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .home-hero {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-4);
  }
  .home-hero h2 { font-size: 20px; }
  .home-hero .action { width: 100%; }
  .photo-box { flex-direction: column; align-items: flex-start; }
  .auth-gate {
    min-height: 100dvh;
    padding: max(var(--space-4), env(safe-area-inset-top, 0px)) var(--space-4) max(var(--space-6), env(safe-area-inset-bottom, 0px));
    align-items: start;
  }
  .auth-card { padding: var(--space-5) var(--space-4); }
  .auth-gate .subtabs { width: 100%; }
  .auth-gate .subtabs button { flex: 1; }
  .subtabs { width: 100%; }
  .sheet {
    padding: 0;
    place-items: end center;
  }
  .sheet-card {
    width: 100%;
    max-height: 94dvh;
    border-radius: 16px 16px 0 0;
    padding: 16px 16px max(16px, env(safe-area-inset-bottom, 0px));
  }
  .table-wrap,
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .rank-chip { font-size: 16px; min-height: 44px; }
  .item { flex-wrap: wrap; }
  .ex-mini { flex-wrap: wrap; }
  .tabs { width: 100%; }
  .actions .action { min-height: 40px; }
  .nav button { padding: 12px; min-height: 44px; }
  .didactic-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ex-video-wrap { max-width: 100%; }
  .toast { right: var(--space-4); left: var(--space-4); max-width: none; bottom: max(var(--space-4), env(safe-area-inset-bottom, 0px)); }
  input, select, textarea {
    font-size: 16px;
    max-width: 100%;
  }
  .field input,
  .field select,
  .field textarea,
  .routine-row input[type=time] { height: 44px; }
  .field textarea, textarea { min-height: 88px; height: auto; }
}

@media (max-width: 480px) {
  .stats,
  .stats-cockpit,
  .evo-kpis,
  .stats-mini { grid-template-columns: 1fr; }
  .stat strong,
  .metric strong { font-size: 20px; }
}

.welcome-page { max-width: 760px; }
.welcome-kicker {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin: 0 0 8px;
}
.welcome-page h2 { font-size: 28px; letter-spacing: -0.03em; margin: 0 0 8px; }
.welcome-page .welcome-sub { font-size: 16px; color: hsl(var(--muted-foreground)); margin: 0 0 24px; }
.welcome-page p { line-height: 1.6; margin: 0 0 14px; }
.welcome-page h3 { font-size: 18px; margin: 28px 0 12px; }
.welcome-hero {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  object-position: center;
  background: hsl(var(--muted) / 0.35);
  border-radius: var(--radius);
  margin: 0 0 24px;
  display: block;
}
.welcome-founders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin: 16px 0 8px;
}
.welcome-founder {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  background: hsl(var(--card));
}
.welcome-founder img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.welcome-founder.andrea img { object-position: 50% 88%; }
.welcome-founder.gustavo img { object-position: 50% 18%; }
.welcome-founder div { padding: 12px 14px 16px; }
.welcome-founder strong { display: block; }
.welcome-founder small { color: hsl(var(--muted-foreground)); }
.welcome-list { margin: 0 0 16px; padding-left: 1.2em; line-height: 1.7; }
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: 12px 0 20px;
}
.welcome-grid article {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-4);
  background: hsl(var(--card));
}
.welcome-grid h4 { margin: 0 0 6px; font-size: 15px; }
.welcome-grid p { margin: 0; font-size: 14px; color: hsl(var(--muted-foreground)); }
.welcome-sign { margin-top: 24px; }
.welcome-sign p { margin: 0 0 4px; }
.welcome-url { margin-top: 16px; }
@media (max-width: 720px) {
  .welcome-founders,
  .welcome-grid { grid-template-columns: 1fr; }
}
}
