﻿:root {
  --brand: #F59E0B;
  --brand-strong: #E7A83E;
  --brand-soft: rgba(245,181,27,0.1);
  --ink: #1A1206;
  --muted: #66736f;
  --line: #d9e1dd;
  --surface: #ffffff;
  --canvas: #f6f7f2;
  --accent: #e7a83e;
  --accent-soft: #fff2d6;
  --danger: #c44949;
  --danger-soft: #fde9e9;
  --success: #2d9d78;
  --success-soft: #ddf4ec;
  --info: #2e6d9e;
  --info-soft: #e2f0fa;
  --shadow: 0 18px 48px rgba(12, 47, 41, 0.14);
  --radius: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Financeiro - controle premium de mensalidades */
.finance-workspace {
  gap: 1rem;
}

.finance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 0.35rem 0 0.1rem;
}

.finance-hero h3 {
  margin-top: 0.15rem;
  color: var(--ink);
  font-size: var(--t-h1);
  font-weight: var(--t-h1-w);
  line-height: 1;
}

.finance-hero p {
  margin-top: 0.42rem;
  max-width: 44rem;
  color: var(--muted);
  font-size: var(--t-sub);
  line-height: var(--t-sub-lh);
}

.finance-hero .primary-action {
  min-height: 3.1rem;
  padding-inline: 1.25rem;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.finance-hero .primary-action svg {
  width: 1.18rem;
  height: 1.18rem;
  stroke-width: 2.3;
}

.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.finance-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 0.16rem 0.64rem;
  min-height: 8rem;
  padding: 0.86rem;
  overflow: hidden;
  border: 1px solid var(--borda);
  border-radius: 1rem;
  background: var(--card);
}

.finance-summary-icon {
  grid-row: span 3;
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  color: var(--brand-strong);
}

.finance-summary-icon svg {
  width: 1.65rem;
  height: 1.65rem;
  stroke: currentColor;
}

.finance-summary-card > span:not(.finance-summary-icon) {
  min-width: 0;
  color: rgba(247, 244, 235, 0.78);
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.18;
}

.finance-summary-card strong {
  color: var(--ink);
  font-size: var(--t-num-md);
  font-weight: var(--t-num-w);
  line-height: 1;
}

.finance-summary-card small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.22;
}

.finance-summary-card.is-success .finance-summary-icon,
.finance-summary-card.is-success small {
  color: var(--success);
}

.finance-summary-card.is-warning .finance-summary-icon,
.finance-summary-card.is-warning small {
  color: var(--brand-strong);
}

.finance-summary-card.is-danger .finance-summary-icon,
.finance-summary-card.is-danger small {
  color: var(--danger);
}

.finance-toolbar,
.finance-month-panel,
.finance-list-panel,
.finance-insights-panel {
  display: grid;
  gap: 0.78rem;
  padding: 0.82rem;
  border: 1px solid var(--borda);
  border-radius: 1rem;
  background: var(--card);
}

.finance-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.26fr);
  align-items: stretch;
}

.finance-search-field,
.finance-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 3.65rem;
  gap: 0.1rem 0.62rem;
  padding: 0.62rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 0.82rem;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, background 160ms ease;
}

.finance-search-field:focus-within,
.finance-filter:focus-within,
.finance-month-controls input:focus {
  border-color: rgb(from var(--brand-soft) r g b / 0.64);
  background: rgb(from var(--brand-soft) r g b / 0.07);
}

.finance-search-field svg,
.finance-filter-icon,
.finance-month-controls .icon-button,
.finance-record-amount span,
.finance-record-date span {
  color: var(--brand-strong);
}

.finance-search-field svg,
.finance-filter-icon svg,
.finance-record-amount svg,
.finance-record-date svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke: currentColor;
}

.finance-search-field input,
.finance-filter select,
.finance-month-controls input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 720;
}

.finance-search-field input::placeholder {
  color: rgba(247, 244, 235, 0.46);
}

.finance-filter-label {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.1;
}

.finance-filter select option {
  background: #101010;
  color: var(--ink);
}

.finance-month-panel .section-title {
  align-items: center;
}

.finance-month-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.finance-month-controls input {
  min-height: 2.55rem;
  padding: 0 0.82rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.045);
}

.finance-month-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.34fr);
  gap: 0.85rem;
  align-items: stretch;
}

.finance-chart {
  min-height: 15rem;
  padding: 0.6rem 0.45rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0.82rem;
  background: rgba(0, 0, 0, 0.18);
}

.finance-chart svg {
  width: 100%;
  height: 12rem;
  overflow: visible;
}

.finance-chart-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.finance-chart-area {
  fill: rgb(from var(--brand-soft) r g b / 0.14);
  stroke: none;
}

.finance-chart-line {
  fill: none;
  stroke: var(--brand-strong);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0.38rem 0.8rem rgb(from var(--brand-soft) r g b / 0.22));
}

.finance-chart-dot {
  fill: var(--brand-strong);
  stroke: rgba(0, 0, 0, 0.7);
  stroke-width: 2;
}

.finance-chart-dot.is-active {
  r: 6;
  fill: #ffd66d;
}

.finance-chart-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  text-align: center;
}

.finance-chart-labels .is-active {
  color: var(--brand-strong);
}

.finance-record-list {
  display: grid;
  gap: 0.58rem;
}

.finance-record-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1.1fr) minmax(8rem, 0.65fr) minmax(8.5rem, 0.65fr) minmax(12rem, auto);
  align-items: center;
  gap: 0.75rem;
  padding: 0.76rem;
  border: 1px solid var(--borda);
  border-radius: 1rem;
  background: var(--card);
}

.finance-record-card.is-paid {
  border-color: rgba(72, 215, 100, 0.24);
}

.finance-record-card.is-overdue {
  border-color: rgba(255, 90, 79, 0.28);
}

.finance-record-card .entity-avatar {
  width: 3.35rem;
  height: 3.35rem;
  border-color: rgb(from var(--brand-soft) r g b / 0.3);
}

.finance-record-student,
.finance-record-amount,
.finance-record-date,
.finance-record-actions {
  min-width: 0;
}

.finance-record-student {
  display: grid;
  gap: 0.12rem;
}

.finance-record-student strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.12;
}

.finance-record-student span,
.finance-record-student small,
.finance-record-amount small,
.finance-record-date small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.18;
}

.finance-record-amount,
.finance-record-date {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.08rem 0.48rem;
  align-items: center;
}

.finance-record-amount span,
.finance-record-date span {
  grid-row: span 2;
}

.finance-record-amount strong,
.finance-record-date strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.16;
}

.finance-record-actions {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 0.42rem;
  align-items: center;
  justify-content: end;
}

.finance-primary-action,
.finance-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.35rem;
  padding: 0 0.75rem;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.56);
  border-radius: 0.66rem;
  background: rgb(from var(--brand-soft) r g b / 0.07);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 820;
}

.finance-primary-action {
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.finance-primary-action svg,
.finance-secondary-action svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
}

.finance-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.finance-insight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.78rem;
  border: 1px solid var(--borda);
  border-radius: 1rem;
  background: var(--card);
}

.finance-insight-card > span {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.28);
  color: var(--brand-strong);
  background: rgb(from var(--brand-soft) r g b / 0.07);
}

.finance-insight-card svg {
  width: 1.18rem;
  height: 1.18rem;
  stroke: currentColor;
  color: var(--brand-strong);
}

.finance-insight-card strong,
.finance-insight-card small,
.finance-insight-card em {
  display: block;
  line-height: 1.18;
}

.finance-insight-card strong {
  color: var(--ink);
}

.finance-insight-card small {
  color: var(--muted);
}

.finance-insight-card em {
  color: var(--brand-strong);
  font-style: normal;
  font-size: 0.78rem;
}

.finance-detail,
.finance-receipt {
  display: grid;
  gap: 0.9rem;
}

.finance-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.finance-detail-hero h3,
.finance-receipt-card h3 {
  margin: 0.1rem 0;
  color: var(--ink);
  font-size: 1.5rem;
}

.finance-detail-hero p {
  margin: 0;
  color: var(--muted);
}

.finance-receipt-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--borda);
  border-radius: 1rem;
  background: var(--card);
}

.finance-receipt-grid {
  display: grid;
  grid-template-columns: minmax(7rem, auto) minmax(0, 1fr);
  gap: 0.42rem 0.75rem;
}

.finance-receipt-grid span {
  color: var(--muted);
}

.finance-receipt-grid strong {
  color: var(--ink);
}

.finance-receipt-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

@media (max-width: 68rem) {
  .finance-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-month-body {
    grid-template-columns: 1fr;
  }

  .finance-record-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .finance-record-amount,
  .finance-record-date,
  .finance-record-actions {
    grid-column: 2 / -1;
  }

  .finance-record-actions {
    justify-content: start;
  }
}

@media (max-width: 57.99rem) {
  .finance-hero,
  .finance-toolbar {
    grid-template-columns: 1fr;
  }

  .finance-hero .primary-action {
    width: 100%;
  }

  .finance-summary-grid {
    gap: 0.52rem;
  }

  .finance-summary-card {
    min-height: 7.2rem;
    padding: 0.7rem;
  }

  .finance-summary-icon {
    width: 1.85rem;
    height: 1.85rem;
  }

  .finance-summary-icon svg {
    width: 1.42rem;
    height: 1.42rem;
  }

  .finance-summary-card > span:not(.finance-summary-icon) {
    font-size: 0.7rem;
  }

  .finance-summary-card small {
    font-size: 0.67rem;
  }

  .finance-month-panel .section-title {
    align-items: start;
  }

  .finance-month-controls {
    width: 100%;
  }

  .finance-month-controls label {
    flex: 1;
  }

  .finance-insights-grid {
    grid-template-columns: 1fr;
  }

  .finance-record-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .finance-record-amount,
  .finance-record-date,
  .finance-record-actions {
    grid-column: 1 / -1;
  }

  .finance-record-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .finance-primary-action,
  .finance-secondary-action {
    width: 100%;
  }

  .finance-detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .finance-detail-hero .badge {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 28rem) {
  .finance-summary-grid {
    grid-template-columns: 1fr;
  }

  .finance-chart {
    min-height: 12.5rem;
  }

  .finance-chart svg {
    height: 9.5rem;
  }
}

* {
  box-sizing: border-box;
  touch-action: manipulation;
}

/* RODADA 2R3 (S1a): arrastar nao e gesto do app — <img> e nativamente
   arrastavel e, no Chrome/Android, o arrasto de 1 dedo sobre a imagem pode
   virar drag nativo e engolir a rolagem (com 2 dedos o drag nem inicia). */
img {
  -webkit-user-drag: none;
}

/* RODADA 2R9 (R2) — `clip` NO LUGAR DE `hidden`: era a RAIZ da rolagem morta
   no Android. Medido no proprio motor:
     site comum ............ html[x=visible y=visible]  <- rolagem do viewport
     nos, com hidden ....... html[x=hidden  y=auto   ]  <- o html vira CAIXA
     nos, com clip ......... html[x=clip    y=visible]  <- igual a site comum
   `overflow-x: hidden` PROPAGA e obriga o overflow-y a virar `auto`: o
   documento deixa de rolar como viewport e vira um scroller interno — e
   naquele Chrome/Android o toque de 1 dedo nao era roteado para essa caixa
   (a sonda da 2R6 rolava por CODIGO e o dedo nao chegava; a contraprova do
   aparelho na 2R8 curou desligando exatamente esta regra). `clip` contem o
   vazamento lateral IGUAL, sem criar caixa de rolagem e sem tocar no eixo Y.
   NAO mexer no touch-action: ele foi inocentado no aparelho real. */
html {
  min-height: 100%;
  overflow-x: clip;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(11, 107, 87, 0.09), rgba(246, 247, 242, 0) 30rem),
    var(--canvas);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

input,
select,
textarea {
  font-size: max(16px, 1em);
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

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

.startup-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  background: #F59E0B; /* fallback direto para não depender de var() no primeiro paint */
  background: var(--brand);
  color: var(--brand-ink);
  transition: opacity 260ms ease, visibility 260ms ease;
}

.startup-splash img {
  width: min(42vw, 8.5rem);
  height: min(42vw, 8.5rem);
  border-radius: 24%;
  object-fit: contain;
  background: #fff;
  padding: 0.75rem;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

.startup-splash strong {
  font-size: 1rem;
  font-weight: 800;
}

/* Simbolo central da splash: zera o legado `.startup-splash img` (fundo branco,
   padding 0.75rem, sombra e pulso) que encolhia o simbolo p/ ~80px e o cercava
   de navy. Mantem o tile navy arredondado de 104px, centralizado e visivel. */
.startup-splash .splash-mark {
  width: 104px;
  height: 104px;
  border-radius: 22%;
  object-fit: cover;
  background: #021837;
  overflow: hidden;
  padding: 0;
  box-shadow: none;
  animation: none;
  display: block;
}

body.app-ready .startup-splash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.view {
  min-height: 100vh;
}

.view[hidden],
[hidden] {
  display: none !important;
}

.login-view {
  display: grid;
  min-height: 100vh;
  padding: max(1.25rem, env(safe-area-inset-top, 0px)) 1rem max(1.25rem, var(--safe-bottom));
  place-items: center;
}

.login-card {
  display: grid;
  gap: 1rem;
  width: min(100%, 29rem);
  padding: 1rem;
  border: 1px solid rgba(217, 225, 221, 0.88);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-install-row,
.workspace-header,
.header-actions,
.brand-inline,
.modal-head,
.section-title,
.toolbar,
.entity-row,
.agenda-item,
.workout-row,
.quick-row {
  display: flex;
  align-items: center;
}

.login-install-row,
.workspace-header,
.modal-head,
.section-title,
.toolbar {
  justify-content: space-between;
}

.login-install-row {
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.brand-block {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0 0.25rem;
  text-align: center;
}

.brand-logo {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 22%;
  object-fit: contain;
  background: #fff;
}

.brand-logo-large {
  width: 6.75rem;
  height: 6.75rem;
  border: 0;
  padding: 0;
  box-shadow: none;
}

/* Selo "Desenvolvido por Corefy" no rodape do login: icone minimo + texto,
   pequeno e centralizado, sem moldura. */
/* [43.8] A linha que diz por onde vem o link, para cada um dos dois papéis.
   Ela é FIXA: vale para todo mundo e não revela quem existe — a busca do
   servidor continua anti-enumeração. Fica quieta (tamanho pequeno, cor
   apagada) porque é uma nota, não um aviso. */
.login-nota-senha {
  margin: 0.55rem 0 0;
  color: #6B7280;
  font-size: 0.74rem;
  line-height: 1.4;
  text-align: center;
}

.login-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #6B7280;
}

.login-credit strong {
  font-weight: 700;
  color: #CBD5E1;
}

.login-credit img {
  width: 14px;
  height: 14px;
  border-radius: 24%;
  object-fit: contain;
  background: transparent;
}

/* Selo de versao (login e menu lateral): ferramenta de validacao no device.
   Fica um degrau ABAIXO do credito "Desenvolvido por Corefy" — menor, sem
   icone, sem negrito e mais apagado —, mas nao abaixo do limite de leitura:
   se o numero nao der pra ler no iPhone, o selo nao serve pra nada. Por isso
   a hierarquia vem de tamanho + cor fixa, e nao de opacity: 0.75 sobre um
   cinza ja fraco derrubava o contraste pra ~2.6:1 sobre o fundo #0F1318.
   Selecionavel de proposito (o numero precisa ser copiado e mandado no chat).
   Fica vazio ate o JS escrever a versao lida em runtime. */
.app-version-badge {
  margin: 0.3rem 0 0;
  padding: 0.15rem 0.5rem;
  text-align: center;
  font-size: 0.66rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: #646B75;
  font-variant-numeric: tabular-nums;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  /* iOS: garante o balao "Copiar" no toque longo dentro do PWA standalone. */
  -webkit-touch-callout: default;
}

/* Sem isso o realce da selecao no fundo escuro fica quase invisivel. */
.app-version-badge::selection {
  background: rgba(203, 213, 225, 0.3);
  color: #E8ECF2;
}

.app-version-badge::-moz-selection {
  background: rgba(203, 213, 225, 0.3);
  color: #E8ECF2;
}

.app-version-badge:empty {
  display: none;
}

.brand-block p {
  color: var(--brand);
  font-size: 0.79rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-block h1 {
  font-size: var(--t-h1);
  font-weight: var(--t-h1-w);
  line-height: 1.05;
}

.demo-credentials {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem;
  border: 1px solid rgb(from var(--brand-strong) r g b / 0.42);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

body.demo-mode .demo-credentials {
  display: flex;
}

.demo-only {
  display: none;
}

body.demo-mode .demo-only {
  display: grid;
}

.demo-credentials span,
.demo-credentials small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.demo-credentials strong {
  display: block;
  margin: 0.12rem 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.9rem;
}

.login-form,
.form-grid,
.content-stack,
.card-grid,
.entity-list,
.agenda-list,
.workout-list,
.metric-grid,
.timeline,
.profile-grid {
  display: grid;
}

.login-form {
  gap: 0.85rem;
}

.login-field-error {
  display: none;
  color: #c44949;
  font-size: 0.8rem;
  font-weight: 600;
  padding-top: 0.1rem;
}

.login-field-error:not(:empty) {
  display: block;
}

.field--error input {
  border-color: #c44949;
  box-shadow: 0 0 0 3px rgba(196, 73, 73, 0.13);
}

.login-form-error {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid rgba(196, 73, 73, 0.3);
  background: rgba(196, 73, 73, 0.07);
  color: #b83535;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
}

.login-btn--loading {
  opacity: 0.72;
  pointer-events: none;
}

.remember-control {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgb(from var(--brand-strong) r g b / 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.remember-control:focus-within,
.remember-control:hover {
  border-color: rgb(from var(--brand-strong) r g b / 0.55);
  background: rgb(from var(--brand-strong) r g b / 0.08);
  box-shadow: none;
}

.remember-control input {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.remember-control span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.2;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  /* RODADA 2R7 (F2): fonte EXPLICITA >= 16px — sem ela o controle herdava
     (font:inherit) os 0.88rem da legenda quando embrulhado num span dentro
     de .field (ex.: .ns-input-wrap do CPF), e fonte < 16px dispara o zoom
     automatico de foco do Chrome/Android agora que o zoom e permitido (F1). */
  font-size: 1rem;
  padding: 0 0.9rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field textarea {
  min-height: 6rem;
  padding: 0.85rem 0.9rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(11, 107, 87, 0.13);
}

/* Campo de senha com botão de olho (revelar/ocultar) — usado na chave do Asaas */
.password-field {
  position: relative;
}

/* Especificidade reforçada (.field .password-field input) porque base.css carrega
   depois e redefine `.field input { padding: 0 0.9rem }`, que apagaria o espaço do
   botão de olho com igual especificidade. */
.field .password-field input {
  padding-right: 3.2rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.password-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  color: var(--brand);
  background: rgba(11, 107, 87, 0.1);
}

/* Linha "Ambiente" + badge derivado da chave (sandbox/produção) */
.asaas-env-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Painel Recebimentos no estado CONECTADO: status + ações + resultado do teste. */
.asaas-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.asaas-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.asaas-test-result {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.checkbox-grid,
.muscle-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.check-chip,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
}

.check-chip {
  min-height: 2.45rem;
  padding: 0 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.check-chip input,
.inline-check input {
  width: auto;
  height: auto;
  min-height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.media-note {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf8;
}

.primary-action,
.secondary-action,
.danger-action,
.ghost-button,
.pill-button,
.icon-button,
.mini-button,
.nav-button,
.demo-credentials button {
  border-radius: var(--radius);
  font-weight: 800;
}

.primary-action,
.secondary-action,
.danger-action {
  width: 100%;
  min-height: 3.2rem;
}

.primary-action {
  border: 0;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 12px 24px rgba(11, 107, 87, 0.22);
}

.secondary-action {
  border: 1px solid rgba(11, 107, 87, 0.28);
  background: #fff;
  color: var(--brand-strong);
}

.danger-action {
  border: 1px solid rgba(196, 73, 73, 0.28);
  background: var(--danger-soft);
  color: var(--danger);
}

.text-action {
  min-height: 2.5rem;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 750;
}

.pill-button {
  min-height: 2.35rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(11, 107, 87, 0.22);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.88rem;
  white-space: nowrap;
}

.ghost-button,
.mini-button,
.demo-credentials button {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
}

.ghost-button {
  padding: 0 0.85rem;
}

.mini-button {
  min-height: 2.15rem;
  padding: 0 0.65rem;
  font-size: 0.82rem;
}

.mini-button.is-danger {
  border-color: rgba(196, 73, 73, 0.26);
  color: var(--danger);
}

.whatsapp-button {
  border-color: rgba(45, 157, 120, 0.3);
  background: var(--success-soft);
  color: var(--success);
}

.icon-button {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
}

svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.workspace {
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(5.8rem + var(--safe-bottom));
}

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 20;
  gap: 0.8rem;
  padding: max(0.9rem, env(safe-area-inset-top, 0px)) 1rem 0.9rem;
  border-bottom: 1px solid rgba(217, 225, 221, 0.78);
  background: rgba(246, 247, 242, 0.94);
}

.brand-inline {
  min-width: 0;
  gap: 0.75rem;
}

.brand-inline div {
  min-width: 0;
}

.brand-inline span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.brand-inline h2 {
  overflow: hidden;
  font-size: 1.28rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  flex: 0 0 auto;
  gap: 0.45rem;
}

.workspace-layout {
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: 1rem;
}

.side-nav {
  display: none;
}

.content-area {
  min-width: 0;
}

.content-stack {
  gap: 1rem;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

.page-head h3 {
  margin-top: 0.2rem;
  font-size: clamp(1.25rem, 4vw, 1.85rem);
  line-height: 1.1;
}

.page-head p {
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.45;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.page-actions .primary-action,
.page-actions .secondary-action,
.page-actions .pill-button {
  width: auto;
}

.hero-panel {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: var(--radius);
  background: var(--brand-strong);
  /* Contraste: fundo dourado exige texto escuro, nunca branco. */
  color: var(--brand-ink);
  box-shadow: var(--shadow);
}

.hero-panel p {
  color: rgb(from var(--brand-ink) r g b / 0.72);
  font-size: 0.84rem;
  font-weight: 800;
}

.hero-panel h3 {
  margin-top: 0.2rem;
  color: var(--brand-ink);
  font-size: clamp(1.35rem, 7vw, 2rem);
  line-height: 1.08;
}

.hero-panel span {
  display: block;
  margin-top: 0.45rem;
  color: rgb(from var(--brand-ink) r g b / 0.78);
  line-height: 1.45;
}

/* Badge interno do hero-panel: escuro sobre o dourado (todas as variantes). */
.hero-panel .badge,
.hero-panel .badge.is-success,
.hero-panel .badge.is-danger,
.hero-panel .badge.is-info,
.hero-panel .badge.is-warning,
.hero-panel .badge.is-muted {
  border-color: rgb(from var(--brand-ink) r g b / 0.24);
  background: rgb(from var(--brand-ink) r g b / 0.12);
  color: var(--brand-ink);
}

/* ── Gate de primeiro acesso: hero escuro com acento dourado ── */
/* [44.9] OS DOIS GRUPOS DO PORTÃO — "Você preenche" e "A administração
   corrige" — precisam ser distinguíveis de relance. O portão não tinha CSS
   nenhum (todas as classes `contract-gate-*` herdavam), e esta é a única
   regra: sem ela as duas listas viram um bloco só de texto corrido e o
   professor não sabe qual metade é dele. */
.contract-gate-group-sub {
  margin: 0.8rem 0 0.25rem;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contract-gate .hero-panel {
  background: #1A1A1A;
  color: #f0ece0;
  border-left: 3px solid var(--brand-strong);
}
.contract-gate .hero-panel p {
  color: rgba(240, 236, 224, 0.5);
}
.contract-gate .hero-panel h3 {
  color: #f0ece0;
}
.contract-gate .hero-panel span {
  color: #9CA3AF;
}
.contract-gate .hero-panel .badge,
.contract-gate .hero-panel .badge.is-success,
.contract-gate .hero-panel .badge.is-danger,
.contract-gate .hero-panel .badge.is-info,
.contract-gate .hero-panel .badge.is-warning,
.contract-gate .hero-panel .badge.is-muted {
  border-color: rgb(from var(--brand) r g b / 0.3);
  background: rgb(from var(--brand) r g b / 0.08);
  color: var(--brand-strong);
}

/* ---- card destaque: próximo treino (tela Início do aluno) ---- */
.next-workout-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-strong) 0%, #0d7a94 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.next-workout-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.next-workout-card__label {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

.next-workout-card__name {
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.next-workout-card__meta {
  font-size: 0.82rem;
  opacity: 0.8;
  margin-top: 0.1rem;
}

.next-workout-card .primary-action {
  flex-shrink: 0;
  min-width: 6.5rem;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  box-shadow: none;
}

.next-workout-card--empty {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--ink);
}

.next-workout-card--empty .next-workout-card__label {
  color: var(--muted);
}

.next-workout-card--empty .next-workout-card__name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.next-workout-card--empty .primary-action {
  background: var(--brand);
  color: var(--brand-ink);
  border: none;
}

/* ---- card histórico: último treino (tela Início do aluno) ---- */
.last-session-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--success-soft);
  border: 1px solid var(--success);
}

.last-session-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.last-session-card__label {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--success);
}

.last-session-card__name {
  font-size: clamp(0.95rem, 3.5vw, 1.15rem);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.last-session-card__meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* Atalho "Treino de hoje" no Início do aluno */
.today-workout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.today-workout-info {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.today-workout-info strong {
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.today-workout-row .primary-action {
  flex-shrink: 0;
}

/* Banner compacto "Treino em andamento" no Início do aluno */














.metric-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.metric-card,
.panel,
.entity-row,
.agenda-item,
.workout-row,
.calendar-board,
.profile-card {
  border: 1px solid var(--borda);
  border-radius: 1rem;
  background: var(--card);
}

.metric-card {
  flex: 1;
  min-width: 100px;
  min-height: unset;
  padding: 12px;
}

.metric-card span,
.muted,
.small-text {
  color: var(--muted);
}

.metric-card span {
  display: block;
  font-size: 0.82rem;
  line-height: 1.25;
}

.metric-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--t-num-lg);
  font-weight: var(--t-num-w);
  line-height: 1;
}

.panel {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
}

.section-title {
  gap: 0.75rem;
}

.section-title h3 {
  font-size: 1.04rem;
}

.section-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.toolbar {
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.toolbar-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.toolbar input,
.toolbar select {
  min-height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 0.65rem;
}

.workout-main {
  display: grid;
  gap: 0.3rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
}

.quick-link {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  min-height: 5.7rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.quick-link strong {
  color: var(--brand-strong);
  font-size: 0.95rem;
}

.quick-link span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.quick-link:hover,
.mini-button:hover,
.ghost-button:hover,
.secondary-action:hover {
  border-color: rgba(11, 107, 87, 0.38);
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3f0;
}

.segmented button {
  min-height: 2.15rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 0 0.65rem;
}

.segmented button.is-active {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 8px 18px rgba(12, 47, 41, 0.1);
}

.entity-list,
.agenda-list,
.workout-list,
.timeline,
.profile-grid {
  gap: 0.65rem;
}

.entity-row,
.agenda-item,
.workout-row,
.quick-row {
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem;
}

.entity-main,
.agenda-main,
.workout-main,
.quick-main {
  min-width: 0;
}

.entity-main strong,
.agenda-main strong,
.workout-main strong,
.quick-main strong {
  display: block;
  overflow-wrap: anywhere;
}

.entity-main span,
.agenda-main span,
.workout-main span,
.quick-main span,
.small-text {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.84rem;
  line-height: 1.35;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: #eef3f0;
  color: var(--brand-strong);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Badge tingido pela cor única do tipo de atividade (--type-color inline,
   derivado do mapa canônico). Usado no detalhe do evento. */
.badge.badge--type {
  background: color-mix(in srgb, var(--type-color) 16%, transparent);
  color: var(--type-color);
  border: 1px solid color-mix(in srgb, var(--type-color) 36%, transparent);
}

.badge.is-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.is-info {
  background: var(--info-soft);
  color: var(--info);
}

.badge.is-warning {
  background: #fff4d8;
  color: #8a5a00;
}

.preview-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.preview-box {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
}

.preview-box span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* === Configurações: modelos de contrato por serviço === */
.contract-model-list {
  display: grid;
  gap: 0.6rem;
}

.contract-model-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.contract-model-info {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.contract-model-info .small-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-model-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.contract-model-textarea {
  min-height: 16rem;
}

/* === Configurações: marca e aparência (logo + tema de cor) === */
.settings-logo-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.settings-logo-preview {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.settings-logo-preview.is-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.03);
}

.settings-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.settings-logo-upload {
  cursor: pointer;
}

/* === Configurações: Personalizador de tema (substitui as pilulas) === */
.section-title--sub {
  margin-top: 1rem;
}

.section-title--sub h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 780;
  color: var(--ink);
}

.theme-customizer {
  display: grid;
  gap: 1.1rem;
  margin-top: 0.85rem;
}

.tc-group {
  display: grid;
  gap: 0.6rem;
}

.tc-group-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.tc-brand-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tc-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tc-dot {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--borda, rgba(255, 255, 255, 0.12));
  background: var(--dot);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.tc-dot:hover {
  transform: scale(1.08);
}

.tc-dot.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--bg, #0d0d0d), 0 0 0 4px var(--dot);
}

.tc-picker {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px dashed var(--borda, rgba(255, 255, 255, 0.18));
  display: inline-flex;
  overflow: hidden;
  cursor: pointer;
}

.tc-picker input[type="color"] {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.tc-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.tc-picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.tc-bg-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.tc-bg {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--borda, rgba(255, 255, 255, 0.1));
  background: var(--card, #1a1a1a);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease;
}

.tc-bg.is-active {
  border-color: var(--brand);
}

.tc-bg-sq {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, var(--card) 0 50%, var(--bg) 50% 100%);
}

.tc-bg-name {
  min-width: 0;
}

.tc-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tc-actions .primary-action {
  flex: 1 1 auto;
}

/* === Configurações: notificações (toggles) === */
.settings-toggles {
  display: grid;
  gap: 0.2rem;
}

.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.settings-toggle:last-child {
  border-bottom: none;
}

.settings-toggle input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--brand);
}

.exercise-video {
  width: 100%;
  max-height: 70vh;
  border-radius: var(--radius);
  background: #000;
}

.agenda-item {
  align-items: stretch;
  border-left: 0.35rem solid var(--brand);
}

.agenda-time {
  flex: 0 0 4.8rem;
  color: var(--brand-strong);
  font-weight: 900;
}

.agenda-item.is-status-done,
.agenda-item.is-status-sent,
.day-event.is-status-done,
.day-event.is-status-sent {
  border-left-color: var(--success);
  background: linear-gradient(90deg, rgba(45, 157, 120, 0.08), #fff);
}

.agenda-item.is-status-pending,
.agenda-item.is-status-contract_pending,
.day-event.is-status-pending,
.day-event.is-status-contract_pending {
  border-left-color: #d99000;
  background: linear-gradient(90deg, rgba(217, 144, 0, 0.1), #fff);
}

.agenda-item.is-status-canceled,
.agenda-item.is-status-missed,
.day-event.is-status-canceled,
.day-event.is-status-missed {
  border-left-color: var(--danger);
  background: linear-gradient(90deg, rgba(191, 75, 75, 0.09), #fff);
}

.calendar-board {
  overflow: hidden;
}

.calendar-head,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-head span {
  padding: 0.65rem 0.45rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.day-cell {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  min-height: 9rem;
  padding: 0.55rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.month-view .day-cell {
  min-height: 7.5rem;
}

.day-cell.is-outside {
  background: #f8faf8;
  color: var(--muted);
}

.day-cell:nth-child(7n) {
  border-right: 0;
}

.day-cell.is-selected {
  background: var(--brand-soft);
}

.day-select {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  min-height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  padding: 0;
}

.day-number {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.day-cell.is-today .day-number {
  background: var(--brand);
  color: var(--brand-ink);
}

.day-events {
  display: grid;
  gap: 0.3rem;
}

.day-event {
  display: block;
  overflow: hidden;
  width: 100%;
  min-height: 1.85rem;
  border: 1px solid rgba(11, 107, 87, 0.16);
  border-left: 0.25rem solid var(--brand);
  border-radius: 6px;
  background: #eef3f0;
  color: var(--brand-strong);
  padding: 0.35rem 0.4rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-event span {
  margin-right: 0.28rem;
  opacity: 0.76;
}

.day-event.is-more {
  border-left-color: transparent;
  background: #f6f8f6;
  color: var(--muted);
}

.agenda-day-title {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.agenda-detail-panel {
  border-left: 0.35rem solid var(--brand);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px;
  gap: 8px;
  color: #9CA3AF;
}

.empty-state .empty-state-icon {
  opacity: 1;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.18);
  border-radius: 50%;
}

.empty-state .empty-state-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.empty-state span {
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 28ch;
}

.empty-state.compact-note {
  display: grid;
  justify-items: start;
  text-align: left;
  padding: 0.9rem 1rem;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state.compact-note strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.empty-state.compact-note span {
  font-size: 0.78rem;
  max-width: none;
}

.compact-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf8;
}

.student-summary-grid,
.profile-overview-grid {
  display: grid;
  gap: 0.75rem;
}

.student-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
}

.profile-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-card strong {
  overflow-wrap: anywhere;
}

.profile-card small {
  color: var(--muted);
  line-height: 1.35;
}

.student-summary-card {
  min-height: 5.4rem;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}

.profile-card-body {
  display: grid;
  gap: 0.12rem;
}

.compact-row {
  align-items: center;
  min-height: 4.8rem;
}

.library-row .video-link,
.library-row [data-open-local-video] {
  margin-top: 0.45rem;
}

.library-row {
  align-items: flex-start;
}

.library-row .entity-main {
  display: grid;
  gap: 0.35rem;
}

.subtle-chip,
.entity-main .subtle-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0 0.58rem;
  border-radius: 999px;
  background: #f4f7f5;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.video-meta,
.entity-main .video-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.video-meta .small-text {
  margin-top: 0;
}

.profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(11, 107, 87, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--brand-soft));
}

.student-profile-hero {
  display: grid;
}

.student-hero-main {
  min-width: 0;
}

.student-hero-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  min-width: 0;
}

.student-hero-details article {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid rgba(11, 107, 87, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.student-hero-details span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.student-hero-details strong {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.profile-hero h3 {
  margin-top: 0.2rem;
  font-size: clamp(1.25rem, 5vw, 1.8rem);
  line-height: 1.1;
}

.profile-hero p,
.profile-hero-aside span {
  color: var(--muted);
  line-height: 1.4;
}

.tab-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3f0;
}

.tab-row button {
  flex: 0 0 auto;
  min-height: 2.35rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  padding: 0 0.7rem;
}

.tab-row button.is-active {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 8px 18px rgba(12, 47, 41, 0.1);
}

.action-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.inline-action {
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
}

.exercise-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.exercise-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.65rem;
  border-radius: var(--radius);
  background: #f4f7f5;
}

.exercise-item.has-check {
  grid-template-columns: auto 1fr;
}

.exercise-item input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: var(--brand);
}

.progress-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 0.55rem;
  height: 9rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(217, 225, 221, 0.38) 1px, transparent 1px) 0 0 / 100% 25%,
    #fff;
}

.progress-bars span {
  min-height: 1rem;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 25;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(4.9rem, 1fr);
  overflow-x: auto;
  gap: 0.25rem;
  padding: 0.55rem 0.55rem calc(0.55rem + var(--safe-bottom));
  border-top: 1px solid rgba(217, 225, 221, 0.8);
  background: rgba(255, 255, 255, 0.95);
}

.nav-button {
  display: grid;
  min-width: 0;
  min-height: 3.15rem;
  place-items: center;
  gap: 0.18rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
}

.nav-button svg {
  width: 1.05rem;
  height: 1.05rem;
}

.nav-button.is-active {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.side-nav .nav-button {
  grid-template-columns: auto 1fr;
  justify-items: start;
  min-height: 2.9rem;
  padding: 0 0.75rem;
  text-align: left;
}

.nav-group {
  margin: 0.55rem 0.65rem 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.side-nav .nav-group:first-child {
  margin-top: 0.15rem;
}

.form-grid {
  gap: 0.85rem;
}

.form-grid.two {
  grid-template-columns: 1fr;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.library-grid {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
}

.library-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem;
  border: 1px solid var(--borda);
  border-radius: 1rem;
  background: var(--card);
}

.library-card strong,
.library-card span {
  overflow-wrap: anywhere;
}

.library-card p {
  color: var(--muted);
  line-height: 1.45;
}

.video-link {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.workout-builder {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf8;
}

#workoutRows {
  display: grid;
  gap: 0.75rem;
}

.workout-builder-row {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}


/* execution progress bar */
.execution-progress {
  display: grid;
  gap: 0.35rem;
}

.execution-progress-track {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.execution-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--brand);
  transition: width 300ms ease;
}

.execution-progress-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

/* focus card — current series */



@keyframes exec-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(45,157,120,0.35); }
  70%  { box-shadow: 0 0 0 10px rgba(45,157,120,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,157,120,0); }
}




/* meta chips row */





/* inputs row when running */






/* meta do treino — resumo da prescricao */



/* registre sua serie — steppers de carga e reps */














/* upcoming queue */
.execution-queue {
  gap: 0.5rem;
}





/* rest screen — anel verde com contador grande, ajustes e pular dourado */

















/* set progress dots */





/* video player inside execution focus card */
.exec-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: #000;
}

.exec-video-el {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border: none;
}

.exec-video-wrap.exec-video-local {
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exec-video-open-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 1.2rem;
  border-radius: var(--radius);
  transition: opacity 150ms ease;
}

.exec-video-open-btn:hover,
.exec-video-open-btn:focus-visible {
  opacity: 0.8;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.exec-video-play-circle {
  width: 3.2rem;
  height: 3.2rem;
}

/* discrete placeholder when exercise has no video */
.exec-video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6rem 0;
  color: var(--muted);
  opacity: 0.4;
}

.exec-video-placeholder-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.set-list {
  display: grid;
  gap: 0.65rem;
}

.set-row {
  display: grid;
  grid-template-columns: 1.4fr minmax(5.5rem, 0.6fr) minmax(5.5rem, 0.6fr) auto;
  gap: 0.65rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.set-row.is-running {
  border-color: rgb(from var(--brand-strong) r g b / 0.7);
  background: var(--accent-soft);
}

.set-row.is-done {
  border-color: rgba(45, 157, 120, 0.4);
  background: var(--success-soft);
}

.set-row label {
  display: grid;
  gap: 0.25rem;
}

.set-row label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.set-row input {
  min-height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0.55rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.set-row input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.set-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(from var(--brand-strong) r g b / 0.2);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--line);
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-actions {
  display: grid;
  gap: 0.65rem;
}

.modal,
.install-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.modal[hidden],
.install-sheet[hidden] {
  display: none;
}

.modal {
  display: grid;
  place-items: end center;
}

.modal-backdrop,
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 22, 0.45);
}

.modal-panel,
.sheet-panel {
  position: relative;
  z-index: 1;
  max-height: min(88vh, 46rem);
  overflow: auto;
  border-radius: 1rem 1rem 0 0;
  background: #fff;
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.16);
}

.modal-panel {
  display: grid;
  gap: 0.9rem;
  width: min(100%, 52rem);
  padding: 1rem;
}

.sheet-panel {
  display: grid;
  gap: 0.9rem;
  width: min(100%, 38rem);
  margin: auto auto 0;
  padding: 0.8rem 1rem calc(1rem + var(--safe-bottom));
}

.sheet-handle {
  width: 2.8rem;
  height: 0.28rem;
  margin: 0 auto 0.35rem;
  border-radius: 999px;
  background: #c9d2ce;
}

.sheet-logo {
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid var(--line);
  border-radius: 22%;
  object-fit: contain;
  padding: 0.45rem;
}

.install-steps {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.25rem;
}

.install-steps li,
.sheet-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.sheet-actions {
  display: grid;
  gap: 0.65rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: calc(5.6rem + var(--safe-bottom));
  z-index: 90;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(15, 15, 15, 0.96);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.35;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.app-installed [data-install-trigger] {
  display: none;
}

@media (min-width: 42rem) {
  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .form-grid.two,
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .student-profile-hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
  }

  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 58rem) {
  .workspace {
    padding-bottom: 1.5rem;
  }

  .workspace-layout {
    display: grid;
    grid-template-columns: 15.5rem 1fr;
    gap: 1rem;
    padding: 1.25rem;
  }

  .side-nav {
    position: sticky;
    top: 5rem;
    display: grid;
    align-self: start;
    gap: 0.35rem;
    padding: 0.55rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
  }

  .bottom-nav {
    display: none;
  }

  .hero-panel {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(20rem, 0.8fr);
  }

  .modal {
    place-items: center;
  }

  .modal-panel,
  .sheet-panel {
    border-radius: 1rem;
  }
}

@media (max-width: 28rem) {
  .demo-credentials,
  .page-head,
  .profile-hero,
  .entity-row,
  .agenda-item,
  .workout-row,
  .toolbar,
  .action-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-grid,
  .library-grid,
  .student-summary-grid,
  .profile-overview-grid,
  .student-hero-details {
    grid-template-columns: 1fr;
  }

  .set-row {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .page-actions,
  .section-actions,
  .row-actions,
  .toolbar-group {
    width: 100%;
  }

  .header-actions > *,
  .page-actions > *,
  .section-actions > *,
  .row-actions > *,
  .toolbar-group > *,
  .demo-credentials button {
    flex: 1 1 auto;
    width: 100%;
  }

  .calendar-head span {
    font-size: 0.68rem;
    padding: 0.45rem 0.15rem;
  }

  .day-cell {
    min-height: 6.8rem;
    padding: 0.35rem;
  }

  .month-view .day-cell {
    min-height: 5.8rem;
  }

  .day-number {
    width: 1.55rem;
    height: 1.55rem;
    font-size: 0.72rem;
  }

  .day-event {
    font-size: 0.66rem;
    min-height: 1.55rem;
    padding: 0.25rem 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Elite AS visual refresh v22 */
:root {
  --brand: #f5b51b;
  --brand-rgb: 245, 181, 27;
  --brand-strong: #ffc447;
  --brand-soft: rgba(var(--brand-rgb), 0.15);
  --ink: #f7f4eb;
  --muted: #aaa59a;
  --line: rgba(255, 255, 255, 0.12);
  --surface: rgba(18, 18, 18, 0.9);
  --canvas: #050505;
  --accent: #f5b51b;
  --accent-soft: rgba(var(--brand-rgb), 0.16);
  --danger: #ff5a4f;
  --danger-soft: rgba(255, 90, 79, 0.14);
  --success: #48d764;
  --success-soft: rgba(72, 215, 100, 0.13);
  --info: #5aa7ff;
  --info-soft: rgba(90, 167, 255, 0.14);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.46);
  --radius: 8px;
}

html,
body {
  background: var(--canvas);
}

body {
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.06) 0 17%, transparent 17% 100%),
    linear-gradient(180deg, #020202, #0a0a0a 34rem, #050505);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34rem);
  background-position: 0 0;
  background-size: 100% 100%;
  mask-image: radial-gradient(circle at right 18rem top 24rem, #000 0 16rem, transparent 24rem);
}

/* Telas de entrada (splash + login): aparencia FIXA da Corefy, NAO seguem o
   tema do personal. Fundo grafite azulado #0F1318. */
.startup-splash,
.login-view {
  background: #0F1318;
}

.startup-splash img,
.brand-logo,
.brand-logo-large {
  background: transparent;
}

.login-card,
.page-head,
.panel,
.metric-card,
.entity-row,
.agenda-item,
.workout-row,
.calendar-board,
.empty-state,
.profile-card,
.toolbar,
.quick-link,
.library-card,
.preview-box,
.workout-builder,
.workout-builder-row,
.media-note,
.day-cell,
.segmented,
.action-panel {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    rgba(12, 12, 12, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.modal-panel,
.sheet-panel {
  border-color: var(--line);
  background:
    rgba(9, 9, 9, 0.96);
}

/* Card do formulario de login: fixo Corefy, #1A1F27 (combina com o fundo
   grafite azulado da tela de entrada). */
.login-card {
  border-color: var(--line);
  background: #1A1F27;
}

.brand-block p,
.eyebrow,
.quick-link strong,
.video-link,
.text-action,
.agenda-time {
  color: var(--brand);
}

.field span,
.field input,
.field select,
.field textarea,
.entity-main strong,
.agenda-main strong,
.workout-main strong,
.quick-main strong,
.section-title h3,
.profile-card strong,
.page-head h3,
.brand-inline h2 {
  color: var(--ink);
}

.field input,
.field select,
.field textarea,
.check-chip,
.icon-button,
.ghost-button,
.mini-button,
.secondary-action,
.demo-credentials button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(247, 244, 235, 0.38);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgb(from var(--brand-soft) r g b / 0.75);
  box-shadow: none;
}

.primary-action {
  border: 1px solid rgba(255, 220, 134, 0.44);
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.secondary-action,
.pill-button,
.mini-button.primary-mini {
  border-color: rgb(from var(--brand-soft) r g b / 0.44);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.danger-action,
.mini-button.is-danger {
  border-color: rgba(255, 90, 79, 0.36);
  background: var(--danger-soft);
  color: var(--danger);
}

.whatsapp-button {
  border-color: rgba(72, 215, 100, 0.32);
  background: var(--success-soft);
  color: var(--success);
}

.badge {
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.28);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.badge.is-success {
  border-color: rgba(72, 215, 100, 0.34);
  background: var(--success-soft);
  color: var(--success);
}

.badge.is-danger {
  border-color: rgba(255, 90, 79, 0.34);
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.is-info {
  border-color: rgba(90, 167, 255, 0.34);
  background: var(--info-soft);
  color: var(--info);
}

.badge.is-warning {
  border-color: rgb(from var(--brand-soft) r g b / 0.4);
  background: rgb(from var(--brand-soft) r g b / 0.14);
  color: var(--brand-strong);
}

.badge.is-muted,
.badge.is-neutral {
  border-color: rgba(154, 160, 166, 0.28);
  background: rgba(154, 160, 166, 0.12);
  color: rgba(247, 244, 235, 0.68);
}

.workspace {
  padding-bottom: calc(5.8rem + var(--safe-bottom));
}

.manager-workspace {
  padding-bottom: 1.25rem;
}

#managerBottomNav {
  display: none !important;
}

.workspace-header {
  min-height: 4.5rem;
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top, 16px));
  border-bottom-color: var(--line);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.065) 0 31%, transparent 31% 100%),
    rgba(2, 2, 2, 0.92);
}

.manager-header,
.student-header {
  display: flex;
  align-items: center;
}

.brand-inline h2 {
  font-size: clamp(1.08rem, 4.8vw, 1.55rem);
  letter-spacing: 0;
}

.brand-inline span {
  color: var(--brand);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.brand-inline span strong {
  color: var(--muted);
  font-weight: 800;
  text-transform: none;
}

.manager-header .brand-logo {
  width: 4.1rem;
  height: 2.35rem;
  border-radius: 0;
  object-fit: contain;
}

.header-actions {
  width: auto;
}

.header-actions > * {
  width: auto;
  flex: 0 0 auto;
}

.avatar-button {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.7);
  border-radius: 999px;
  background: linear-gradient(145deg, rgb(from var(--brand-soft) r g b / 0.22), rgba(255, 255, 255, 0.06));
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.notification-button {
  position: relative;
  border-radius: 999px;
}

.notification-button::after {
  content: "";
  position: absolute;
  top: 0.42rem;
  right: 0.42rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: var(--brand);
}

.menu-trigger {
  border: 0;
  background: transparent;
  color: var(--ink);
}

.workspace-layout {
  width: min(100%, 78rem);
}

.content-stack {
  gap: 0.9rem;
}

.page-head {
  align-items: center;
  padding: 0.35rem 0 0.6rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.page-head h3 {
  margin-top: 0.2rem;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 780;
}

.page-head p {
  color: var(--muted);
  font-size: clamp(0.95rem, 3vw, 1.08rem);
}

.page-actions {
  align-items: center;
}

.page-actions .primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: unset;
  padding: 10px 18px;
  border-radius: 24px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  font-size: 14px;
}

.metric-grid {
  gap: 10px;
}

.metric-card {
  display: block;
  min-height: unset;
  padding: 12px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.metric-card strong {
  color: var(--ink);
  font-size: var(--t-num-lg);
  font-weight: var(--t-num-w);
}

.panel {
  gap: 0.8rem;
  padding: 1rem;
}

.section-title h3 {
  font-size: var(--t-section);
  font-weight: var(--t-section-w);
}

.entity-row,
.workout-row,
.agenda-item {
  border-radius: 1rem;
  padding: 0.85rem;
}

.compact-row {
  align-items: center;
}

.entity-main span,
.agenda-main span,
.workout-main span,
.quick-main span,
.small-text {
  color: var(--muted);
}

.row-actions {
  justify-content: flex-end;
}

.row-actions .mini-button,
.section-actions .mini-button {
  min-height: 2.1rem;
  border-radius: 999px;
  padding: 0 0.72rem;
}

.entity-avatar {
  display: grid;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.35);
  border-radius: 999px;
  background:
    rgba(255, 255, 255, 0.055);
  color: var(--brand-strong);
  font-size: 0.9rem;
  font-weight: 900;
}

.student-row .entity-main,
.update-row .entity-main {
  display: grid;
  gap: 0.12rem;
}

.action-menu {
  position: relative;
}

.action-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.action-menu summary::-webkit-details-marker {
  display: none;
}

.action-menu div {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 18;
  display: grid;
  min-width: 10rem;
  gap: 0.35rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(8, 8, 8, 0.98);
  box-shadow: var(--shadow);
}

.action-menu div .mini-button {
  justify-content: center;
  width: 100%;
}

.toolbar {
  padding: 0.65rem;
}

.toolbar-group {
  gap: 0.55rem;
}

.toolbar input,
.toolbar select {
  min-height: 2.8rem;
}

.quick-link {
  min-height: 4.5rem;
  border-radius: 0.85rem;
}

.quick-link:hover,
.mini-button:hover,
.ghost-button:hover,
.secondary-action:hover {
  border-color: rgb(from var(--brand-soft) r g b / 0.56);
}

.segmented {
  width: 100%;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.035);
}

.segmented button {
  min-height: 2.35rem;
}

.segmented button.is-active {
  background: rgb(from var(--brand-soft) r g b / 0.12);
  color: var(--brand-strong);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.calendar-board {
  border-radius: 1rem;
}

.calendar-head span,
.day-cell {
  border-color: var(--line);
}

.day-cell {
  background: rgba(255, 255, 255, 0.03);
}

.day-cell.is-outside {
  background: rgba(255, 255, 255, 0.018);
}

.day-cell.is-selected {
  background: var(--brand-soft);
}

.day-number {
  color: var(--ink);
}

.day-cell.is-selected .day-number {
  background: var(--brand);
  color: var(--brand-ink);
}

.agenda-item {
  border-left-width: 0.2rem;
}

.agenda-item.is-status-done,
.agenda-item.is-status-sent,
.day-event.is-status-done,
.day-event.is-status-sent {
  background: linear-gradient(90deg, rgba(72, 215, 100, 0.14), rgba(255, 255, 255, 0.03));
}

.agenda-item.is-status-pending,
.agenda-item.is-status-contract_pending,
.day-event.is-status-pending,
.day-event.is-status-contract_pending {
  background: linear-gradient(90deg, rgb(from var(--brand-soft) r g b / 0.16), rgba(255, 255, 255, 0.03));
}

.agenda-item.is-status-canceled,
.agenda-item.is-status-missed,
.day-event.is-status-canceled,
.day-event.is-status-missed {
  background: linear-gradient(90deg, rgba(255, 90, 79, 0.15), rgba(255, 255, 255, 0.03));
}

.day-event {
  border-color: rgb(from var(--brand-soft) r g b / 0.28);
  background: rgb(from var(--brand-soft) r g b / 0.12);
  color: var(--ink);
}

.profile-hero,
.student-profile-hero {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(12, 12, 12, 0.9);
}

.tab-row {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.tab-row button {
  color: var(--muted);
}

.tab-row button.is-active {
  color: var(--brand-strong);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.set-row {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.set-row.is-running {
  border-color: rgb(from var(--brand-soft) r g b / 0.58);
  background: rgb(from var(--brand-soft) r g b / 0.12);
}

.set-row.is-done {
  border-color: rgba(72, 215, 100, 0.4);
  background: rgba(72, 215, 100, 0.11);
}

.set-row input {
  background: #1c1c1c;
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.15);
}

.set-row input:focus {
  border-color: rgb(from var(--brand-soft) r g b / 0.75);
  box-shadow: 0 0 0 3px rgb(from var(--brand-soft) r g b / 0.18);
}

.bottom-nav {
  right: 0.8rem;
  bottom: 0.8rem;
  left: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(6, 6, 6, 0.9);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.nav-button {
  border-radius: 0.85rem;
  color: var(--muted);
}

.nav-button.is-active {
  background: rgb(from var(--brand-soft) r g b / 0.12);
  color: var(--brand-strong);
  box-shadow: none;
}

.side-nav {
  color: var(--ink);
}

.side-nav .nav-button {
  color: var(--muted);
}

.side-nav .nav-button.is-active {
  background: rgb(from var(--brand-soft) r g b / 0.12);
  color: var(--brand-strong);
}

.side-nav .nav-button.is-logout {
  margin-top: 0.35rem;
  color: var(--danger);
}

.nav-group {
  color: rgba(247, 244, 235, 0.46);
  letter-spacing: 0;
}

.nav-group-system {
  margin-top: auto;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: block;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.6);
  transition: opacity 0.28s;
}

.drawer-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 57.99rem) {
  .manager-workspace .workspace-layout {
    padding-top: 0.85rem;
  }

  .manager-workspace .side-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    z-index: 9999;
    display: grid;
    align-content: start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    width: min(82vw, 300px);
    gap: 0.28rem;
    padding-top: env(safe-area-inset-top, 16px);
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    background: #111111;
    box-shadow: none;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
  }

  .manager-workspace .side-nav.open {
    transform: translateX(0);
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.58);
  }

  .manager-workspace .content-area {
    min-width: 0;
  }

  .manager-header .pill-button {
    display: none;
  }

  .page-head {
    gap: 0.75rem;
  }

  .page-head,
  .page-actions {
    align-items: stretch;
  }

  .page-actions .primary-action,
  .page-actions .secondary-action,
  .page-actions .pill-button {
    width: auto;
  }

  .metric-grid {
    flex-wrap: nowrap;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .entity-row,
  .workout-row {
    align-items: stretch;
    flex-direction: column;
  }

  .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .row-actions .primary-action,
  .row-actions .secondary-action,
  .row-actions .mini-button {
    width: 100%;
  }

  .row-actions .action-menu {
    width: 100%;
  }

  .row-actions .action-menu summary {
    width: 100%;
  }

  .row-actions .action-menu div {
    position: static;
    margin-top: 0.35rem;
    width: 100%;
    min-width: 0;
  }

  .workout-row .row-actions .mini-button:nth-child(n + 3),
  .library-row .row-actions .mini-button:nth-child(n + 3) {
    min-height: 1.95rem;
    font-size: 0.75rem;
  }

  .calendar-board {
    overflow-x: auto;
  }

  .week-view .calendar-head,
  .week-view .calendar-grid {
    min-width: 42rem;
  }

  .month-view .calendar-head,
  .month-view .calendar-grid {
    min-width: 36rem;
  }
}

@media (min-width: 58rem) {
  .manager-workspace .workspace-layout {
    grid-template-columns: 17.5rem 1fr;
    gap: 1.2rem;
  }

  .manager-workspace .side-nav {
    top: 5.35rem;
    min-height: calc(100vh - 6.8rem);
    align-content: start;
    border-radius: 1rem;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
      rgba(9, 9, 9, 0.82);
  }

  .menu-trigger {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(22rem, 0.82fr);
  }
}

@media (max-width: 28rem) {
  .manager-header .brand-logo {
    width: 3.2rem;
  }

  .notification-button {
    display: none;
  }

  .metric-card {
    min-height: 5.25rem;
    padding: 0.75rem;
  }

  .page-head h3 {
    font-size: 1.8rem;
  }
}

/* Dashboard gestor - central de comando Elite AS */
.dashboard-home {
  gap: 0.72rem;
}

.manager-header {
  position: sticky;
  top: 0;
  z-index: 24;
  min-height: 3.85rem;
  padding: max(0.52rem, env(safe-area-inset-top, 0px)) 0.85rem 0.52rem;
}

.manager-header .brand-inline {
  gap: 0.58rem;
}

.manager-header .brand-inline .manager-subtitle + span {
  display: none;
}

.manager-header .brand-inline .manager-subtitle {
  display: inline-flex;
  gap: 0.22rem;
  align-items: center;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.manager-header .brand-inline .manager-subtitle strong {
  color: var(--muted);
  font-weight: 800;
  text-transform: none;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.85rem;
  padding: 0.1rem 0 0.05rem;
}

.dashboard-hero h3 {
  margin-top: 0.08rem;
  color: var(--ink);
  font-size: clamp(1.9rem, 7vw, 2.7rem);
  font-weight: 820;
  line-height: 1;
}

.dashboard-hero p {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: clamp(0.88rem, 2.7vw, 1rem);
  line-height: 1.35;
}

/* Card de boas-vindas (aluno): escuro com acento dourado na lateral,
   NAO fundo dourado macico. */
.dashboard-hero.welcome-card {
  position: relative;
  align-items: center;
  padding: 1.05rem 1.15rem 1.05rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    rgba(12, 12, 12, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.dashboard-hero.welcome-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand);
  border-radius: var(--radius) 0 0 var(--radius);
}

.dashboard-hero .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2.72rem;
  width: auto;
  min-width: 11.2rem;
  border-radius: 0.72rem;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.dashboard-hero .primary-action svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
}

.dashboard-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.62rem;
}

.dashboard-metrics .dashboard-metric:nth-child(-n + 3) {
  grid-column: span 2;
}

.dashboard-metrics .dashboard-metric:nth-child(n + 4) {
  grid-column: span 3;
}

.dashboard-metric {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.34rem;
  min-height: 7.15rem;
  padding: 0.78rem 0.82rem;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
}

button.dashboard-metric {
  width: 100%;
  border: 1px solid var(--line);
  cursor: pointer;
}

.dashboard-metric::after {
  content: "";
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  width: 3.8rem;
  height: 3.8rem;
  border-radius: 999px;
  background: rgb(from var(--brand-soft) r g b / 0.055);
  pointer-events: none;
}

.dashboard-metric:hover {
  border-color: rgb(from var(--brand-soft) r g b / 0.5);
  transform: translateY(-1px);
}

.dashboard-metric .metric-icon {
  display: inline-grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  color: var(--brand-strong);
}

.dashboard-metric .metric-icon svg {
  width: 1.42rem;
  height: 1.42rem;
  stroke: currentColor;
}

.dashboard-metric .metric-label {
  max-width: 100%;
  min-height: 1.95rem;
  color: rgba(247, 244, 235, 0.74);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
}

.dashboard-metric strong {
  position: relative;
  z-index: 1;
  margin-top: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 5.2vw, 2.35rem);
  line-height: 0.96;
}

.dashboard-metric small {
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.25;
}

.dashboard-metric.is-success .metric-icon,
.dashboard-metric.is-success small {
  color: var(--success);
}

.dashboard-metric.is-warning .metric-icon,
.dashboard-metric.is-warning small {
  color: var(--brand-strong);
}

/* Card destacado "TREINOS DE HOJE" — anel de progresso + frase real. */
.dashboard-today-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.95rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 0.88rem;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.dashboard-today-card:hover {
  border-color: rgb(from var(--brand-soft) r g b / 0.5);
  transform: translateY(-1px);
}

.dashboard-today-ring {
  position: relative;
  width: 4.6rem;
  height: 4.6rem;
}

.dashboard-today-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dashboard-ring-track {
  fill: none;
  stroke: rgba(247, 244, 235, 0.12);
  stroke-width: 3.4;
}

.dashboard-ring-fill {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3.4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.4s ease;
}

.dashboard-today-ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
}

.dashboard-today-info {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.dashboard-today-eyebrow {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.dashboard-today-headline {
  font-size: clamp(1.25rem, 4.4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--ink);
}

.dashboard-today-sub {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Cards de resumo: numero grande, legenda completa logo abaixo. */
.dashboard-summary {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.22rem;
  min-height: 6.4rem;
  padding: 0.78rem 0.82rem;
  color: var(--ink);
  text-align: left;
}

button.dashboard-summary {
  width: 100%;
  border: 1px solid var(--line);
  cursor: pointer;
}

.dashboard-summary:hover {
  border-color: rgb(from var(--brand-soft) r g b / 0.5);
  transform: translateY(-1px);
}

.dashboard-summary .metric-icon {
  display: inline-grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  color: var(--brand-strong);
}

.dashboard-summary .metric-icon svg {
  width: 1.34rem;
  height: 1.34rem;
  stroke: currentColor;
}

.dashboard-summary-value {
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  font-weight: 820;
  line-height: 0.98;
  color: var(--ink);
}

.dashboard-summary-label {
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.2;
  color: rgba(247, 244, 235, 0.78);
}

.dashboard-summary.is-warning .metric-icon {
  color: var(--brand-strong);
}

.dashboard-panel {
  border-radius: 0.88rem;
  padding: 0.76rem;
  gap: 0.62rem;
}

.dashboard-panel .section-title {
  align-items: start;
}

.dashboard-panel .section-title > div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.dashboard-pending-list {
  gap: 0.42rem;
}

.dashboard-pending-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.38rem;
  padding: 0.56rem 0.62rem;
}

.dashboard-pending-item .entity-main {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.dashboard-pending-item .entity-main small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.dashboard-pending-item .entity-main strong,
.dashboard-pending-item .entity-main span,
.dashboard-pending-item .entity-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-pending-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.38rem;
  min-width: max-content;
}

.dashboard-pending-actions .badge {
  white-space: nowrap;
}

.status-dot {
  display: block;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: var(--info);
  box-shadow: 0 0 0 0.28rem rgba(90, 167, 255, 0.12);
}

.status-dot.is-danger {
  background: var(--danger);
  box-shadow: 0 0 0 0.28rem rgba(255, 90, 79, 0.12);
}

.status-dot.is-warning {
  background: var(--brand);
  box-shadow: none;
}

.dashboard-agenda-list {
  gap: 0.42rem;
}

.dashboard-agenda-item {
  display: grid;
  grid-template-columns: 3.35rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.48rem;
  min-height: 3.45rem;
  padding: 0.52rem;
  border: 1px solid var(--line);
  border-left-width: 0.22rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-agenda-time {
  color: var(--brand-strong);
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-agenda-main {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.dashboard-agenda-main strong,
.dashboard-agenda-main span,
.dashboard-agenda-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-agenda-main strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.dashboard-agenda-main span,
.dashboard-agenda-main small {
  color: var(--muted);
  font-size: 0.7rem;
}

.dashboard-agenda-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.weekly-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  min-height: 5.75rem;
  gap: 0.45rem;
  padding-top: 0.38rem;
}

.weekly-bar {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 0.32rem;
  min-width: 0;
  height: 5rem;
}

.weekly-bar i {
  display: block;
  width: min(100%, 1.4rem);
  height: var(--bar-height);
  min-height: 0.85rem;
  border-radius: 999px 999px 0.35rem 0.35rem;
  background: linear-gradient(180deg, #ffd66f, rgb(from var(--brand-soft) r g b / 0.34));
  box-shadow: none;
}

.weekly-bar small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.weekly-bar.is-today small {
  color: var(--brand-strong);
}

@media (max-width: 57.99rem) {
  .manager-workspace .workspace-layout {
    padding: 0.7rem 0.78rem 1rem;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.58rem;
  }

  .dashboard-hero .primary-action {
    width: 100%;
    min-width: 0;
    min-height: 2.55rem;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.52rem;
  }

  .dashboard-metrics .dashboard-metric:nth-child(n) {
    grid-column: auto;
  }

  .dashboard-metric {
    min-height: 6.55rem;
    padding: 0.68rem;
  }

  .dashboard-metric .metric-label {
    min-height: 1.8rem;
    font-size: 0.72rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-agenda-item {
    grid-template-columns: 3.12rem minmax(0, 1fr) auto auto;
    gap: 0.36rem;
  }

  .dashboard-agenda-status {
    justify-self: end;
  }

  .dashboard-agenda-actions {
    grid-column: auto;
    justify-content: flex-end;
  }

  .dashboard-agenda-actions .mini-button,
  .dashboard-agenda-actions .whatsapp-button {
    flex: 0 0 auto;
    min-height: 1.95rem;
  }

}

@media (min-width: 58rem) {
  .dashboard-home .dashboard-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(21rem, 0.92fr);
  }

}

@media (max-width: 24.5rem) {
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-metric {
    min-height: 5.8rem;
  }

  .dashboard-metric .metric-label {
    min-height: auto;
  }

  .dashboard-pending-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-pending-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

.dashboard-home {
  gap: 0.56rem;
}

.manager-header {
  min-height: 3.45rem;
  padding: max(0.45rem, env(safe-area-inset-top, 0px)) 0.74rem 0.45rem;
}

.manager-header .brand-inline {
  gap: 0.5rem;
}

.manager-header .brand-logo {
  width: 3.45rem;
  height: 2.05rem;
}

.manager-header .brand-inline h2 {
  font-size: clamp(1.06rem, 4.1vw, 1.34rem);
  line-height: 1;
}

.manager-header .brand-inline .manager-subtitle {
  font-size: 0.66rem;
  line-height: 1.05;
}

.manager-header .avatar-button {
  width: 2.2rem;
  height: 2.2rem;
}

.dashboard-hero {
  gap: 0.68rem;
  padding: 0 0 0.04rem;
}

.dashboard-hero h3 {
  font-size: clamp(1.55rem, 5.5vw, 2.25rem);
}

.dashboard-hero p {
  margin-top: 0.2rem;
  font-size: clamp(0.8rem, 2.35vw, 0.94rem);
}

.dashboard-hero .primary-action {
  min-height: 2.42rem;
  min-width: 10rem;
  padding-inline: 0.95rem;
  border-radius: 0.68rem;
  box-shadow: none;
}

.dashboard-hero .primary-action svg {
  width: 1.06rem;
  height: 1.06rem;
}

.dashboard-metrics {
  gap: 0.5rem;
}

.dashboard-metric {
  min-height: 5.55rem;
  gap: 0.22rem;
  padding: 0.58rem 0.64rem;
  border-radius: 1rem;
}

.dashboard-metric::after {
  right: 0.45rem;
  bottom: 0.45rem;
  width: 2.95rem;
  height: 2.95rem;
}

.dashboard-metric .metric-icon {
  width: 1.34rem;
  height: 1.34rem;
}

.dashboard-metric .metric-icon svg {
  width: 1.16rem;
  height: 1.16rem;
}

.dashboard-metric .metric-label {
  min-height: auto;
  font-size: 0.68rem;
  line-height: 1.14;
}

.dashboard-metric strong {
  font-size: clamp(1.42rem, 4.1vw, 2.02rem);
}

.dashboard-metric small {
  font-size: 0.64rem;
  line-height: 1.16;
}

.dashboard-panel {
  border-radius: 0.82rem;
  padding: 0.62rem;
  gap: 0.48rem;
}

.dashboard-panel .section-title h3 {
  font-size: clamp(1rem, 3.2vw, 1.18rem);
  line-height: 1.08;
}

.dashboard-panel .section-title .small-text {
  font-size: 0.68rem;
  line-height: 1.22;
}

.dashboard-pending-list,
.dashboard-agenda-list {
  gap: 0.34rem;
}

.dashboard-pending-item {
  min-height: 3.05rem;
  gap: 0.48rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.78rem;
}

.dashboard-pending-item .entity-main strong {
  font-size: 0.82rem;
  line-height: 1.12;
}

.dashboard-pending-item .entity-main span,
.dashboard-pending-item .entity-main small {
  font-size: 0.66rem;
}

.dashboard-pending-actions .badge {
  min-height: 1.65rem;
  padding: 0.28rem 0.46rem;
  font-size: 0.62rem;
}

.dashboard-pending-actions .mini-button {
  min-height: 1.75rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.66rem;
}

.dashboard-agenda-item {
  min-height: 3.05rem;
  padding: 0.44rem 0.48rem;
  border-radius: 0.78rem;
}

.dashboard-agenda-main strong {
  font-size: 0.78rem;
}

.dashboard-agenda-main span,
.dashboard-agenda-main small {
  font-size: 0.64rem;
}

.weekly-bars {
  min-height: 4.15rem;
  gap: 0.32rem;
}

.weekly-bar {
  height: 3.55rem;
  gap: 0.22rem;
}

.weekly-bar i {
  width: min(100%, 1.18rem);
  min-height: 0.72rem;
}

.weekly-bar small {
  font-size: 0.58rem;
}

@media (max-width: 57.99rem) {
  .manager-workspace {
    padding-bottom: calc(5.75rem + var(--safe-bottom));
  }

  #managerBottomNav {
    display: grid !important;
  }

  .manager-workspace .workspace-layout {
    padding: 0.58rem 0.62rem 0.82rem;
  }

  .dashboard-hero {
    gap: 0.42rem;
  }

  .dashboard-hero .primary-action {
    min-height: 2.34rem;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .dashboard-metrics .dashboard-metric:nth-child(n) {
    grid-column: auto;
  }

  .dashboard-metric {
    min-height: 5.05rem;
    padding: 0.5rem 0.52rem;
  }

  .dashboard-metric .metric-label {
    font-size: 0.63rem;
  }

  .dashboard-metric strong {
    font-size: clamp(1.28rem, 7vw, 1.62rem);
  }

  .dashboard-panel {
    padding: 0.56rem;
  }

  .dashboard-pending-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-pending-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .dashboard-agenda-status {
    display: none;
  }

  .dashboard-agenda-item {
    grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  }

}

@media (max-width: 24.5rem) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-metric {
    min-height: 4.9rem;
  }

  .dashboard-metric small {
    font-size: 0.58rem;
  }

}

@media (max-width: 20rem) {
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }
}

/* Dashboard gestor - refinamento visual v36 */
.dashboard-home {
  gap: 0.5rem;
}

.dashboard-home .empty-state {
  padding: 0.66rem 0.72rem;
  gap: 0.22rem;
  border-radius: 0.78rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

.dashboard-home .empty-state .empty-state-icon {
  display: none;
}

.dashboard-home .empty-state strong {
  font-size: 0.86rem;
  line-height: 1.16;
}

.dashboard-home .empty-state span {
  font-size: 0.7rem;
  line-height: 1.25;
  max-width: none;
}

.dashboard-metric {
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  min-height: 5.15rem;
  gap: 0.05rem 0.48rem;
  padding: 0.56rem 0.6rem;
  background: var(--card);
}

.dashboard-metric .metric-icon {
  grid-row: 1 / span 3;
  align-self: start;
  margin-top: 0.08rem;
  border-radius: 0.58rem;
  background: rgb(from var(--brand-soft) r g b / 0.08);
}

.dashboard-metric .metric-label,
.dashboard-metric strong,
.dashboard-metric small {
  grid-column: 2;
}

.dashboard-metric .metric-label {
  color: rgba(247, 244, 235, 0.72);
  font-size: 0.64rem;
}

.dashboard-metric strong {
  margin-top: 0.06rem;
  font-size: clamp(1.28rem, 3.8vw, 1.9rem);
}

.dashboard-metric small {
  max-width: 100%;
  color: rgba(247, 244, 235, 0.62);
}

.dashboard-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 44px rgba(0, 0, 0, 0.2);
}

/* [40.3 A] O QUADRADINHO DO AVISO E NEUTRO, e o styles.css tinha a SEGUNDA
   copia desta regra — a guarda do [40.13] achou esta aqui depois de a do
   base.css ja estar limpa. As quatro cores por tom (is-danger / is-info /
   is-gold / is-petroleo) sairam das duas: o `tone` que as escolhia era
   inventado pelo Dashboard, e saiu com o selo de prioridade. */
.dashboard-pending-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--borda);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: #8A8378;
}

.dashboard-pending-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.dashboard-pending-item {
  min-height: 2.92rem;
}

.dashboard-pending-actions {
  gap: 0.28rem;
}

/* ── Tela de Pendências dedicada (premium, fiel ao protótipo) ── */
.pending-page {
  gap: 1.05rem;
  padding-top: 0.35rem;
}

.pending-topbar {
  margin-bottom: -0.2rem;
}

/* Cabeçalho: respiro no topo, título + total */
.pend-head {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.pend-head-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pend-head-row h3 {
  margin: 0;
  font-size: 1.45rem;
}

.pend-total {
  display: grid;
  place-items: center;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: rgb(from var(--accent) r g b / 0.14);
  border: 1px solid rgb(from var(--accent) r g b / 0.3);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
}

.pend-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Grupo por tipo: rótulo MAIÚSCULO + card de cantos 14px */
.pend-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* [40.1 A] `.pend-group-label` SAIU: os quatro rótulos de tipo que ele pintava
   ("Atualizações a avaliar", "Alunos sem treino"…) foram embora com as quatro
   origens próprias desta tela. A fonte única agrupa por AÇÃO, e esta tela é
   inteira de um grupo só. */

.pend-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--borda);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

/* Item clicável: avatar + texto + ícone do tipo à direita */
.pend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 0.85rem;
  background: transparent;
  border: none;
  border-top: 1px solid var(--borda);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, transform 0.06s;
}

.pend-item:first-child {
  border-top: none;
}

.pend-item:active {
  transform: scale(0.995);
  background: rgba(255, 255, 255, 0.05);
}

.pend-item:focus-visible {
  outline: none;
  background: rgb(from var(--brand-strong) r g b / 0.1);
}

.pend-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pend-item-main strong {
  font-size: 0.9rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pend-item-main span {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* [40.3 A] Ícone quadrado NEUTRO — 34px, fundo de superfície, borda, ícone em
   #8A8378, igual ao do sino. As quatro cores por tipo (is-gold / is-petroleo /
   is-danger / is-green) saíram: eram a mesma paleta chumbada do sino, com o
   mesmo defeito — contrato saía VERDE quando a cor declarada de contrato é
   ÂMBAR. Agora a cor mora no FATO ([40.3 B]). */
.pend-type-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--borda);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: #8A8378;
}

.pend-type-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-agenda-time {
  font-size: 0.78rem;
}

.weekly-bar i {
  transition: height 160ms ease, opacity 160ms ease;
}

.weekly-bar.is-empty i {
  height: 0.14rem;
  min-height: 0.14rem;
  border-radius: 999px;
  opacity: 0.44;
  background: rgb(from var(--brand-soft) r g b / 0.38);
  box-shadow: none;
}

@media (max-width: 57.99rem) {
  .dashboard-home {
    gap: 0.46rem;
  }

  .dashboard-hero h3 {
    font-size: clamp(1.42rem, 8vw, 1.82rem);
  }

  .dashboard-hero p {
    font-size: 0.75rem;
  }

  .dashboard-hero .primary-action {
    min-height: 2.18rem;
    font-size: 0.78rem;
  }

  .dashboard-metrics {
    gap: 0.36rem;
  }

  .dashboard-metric {
    min-height: 4.72rem;
    padding: 0.44rem 0.48rem;
    gap: 0.02rem 0.38rem;
  }

  .dashboard-metric .metric-icon {
    width: 1.14rem;
    height: 1.14rem;
    border-radius: 0.44rem;
  }

  .dashboard-metric .metric-icon svg {
    width: 0.92rem;
    height: 0.92rem;
  }

  .dashboard-metric .metric-label {
    font-size: 0.58rem;
  }

  .dashboard-metric strong {
    font-size: clamp(1.2rem, 7.8vw, 1.48rem);
  }

  .dashboard-metric small {
    font-size: 0.55rem;
  }

  .dashboard-panel {
    padding: 0.48rem;
    gap: 0.38rem;
  }

  .dashboard-panel .section-title h3 {
    font-size: 0.94rem;
  }

  .dashboard-panel .section-title .small-text {
    font-size: 0.62rem;
  }

  /* [40.3 A] 34px tambem aqui: o tamanho do quadradinho do aviso e um so. */
  .dashboard-pending-icon {
    width: 34px;
    height: 34px;
  }

  .dashboard-pending-icon svg {
    width: 16px;
    height: 16px;
  }

  .dashboard-pending-item {
    min-height: 2.72rem;
    padding: 0.38rem 0.42rem;
  }

  .dashboard-pending-item .entity-main strong {
    font-size: 0.75rem;
  }

  .dashboard-pending-item .entity-main span,
  .dashboard-pending-item .entity-main small {
    font-size: 0.6rem;
  }

  .dashboard-pending-actions .badge {
    min-height: 1.45rem;
    padding: 0.22rem 0.36rem;
    font-size: 0.56rem;
  }

  .dashboard-pending-actions .mini-button {
    min-height: 1.52rem;
    padding: 0.24rem 0.38rem;
    font-size: 0.58rem;
  }

  .dashboard-agenda-item {
    min-height: 2.72rem;
    padding: 0.38rem 0.42rem;
  }

  .weekly-bars {
    min-height: 3.45rem;
  }

  .weekly-bar {
    height: 2.92rem;
  }
}

/* Agenda gestor - calendário operacional Elite AS */
.agenda-workspace {
  gap: 0.85rem;
}

.agenda-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 0.18rem 0 0.05rem;
}

.agenda-hero h3 {
  margin-top: 0.12rem;
  color: var(--ink);
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 850;
  line-height: 1;
}

.agenda-hero p {
  margin-top: 0.34rem;
  color: var(--muted);
  font-size: clamp(0.9rem, 2.8vw, 1.04rem);
  line-height: 1.35;
}

.agenda-hero .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.58rem;
  width: auto;
  min-width: 12.2rem;
  min-height: 2.95rem;
  border-radius: 0.82rem;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.agenda-hero .primary-action svg {
  width: 1.18rem;
  height: 1.18rem;
  stroke: currentColor;
}

.agenda-control-panel {
  display: grid;
  gap: 0.7rem;
}

.agenda-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.82rem;
  background: rgba(255, 255, 255, 0.035);
}

.agenda-view-tabs button {
  min-height: 2.65rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 820;
}

.agenda-view-tabs button:last-child {
  border-right: 0;
}

.agenda-view-tabs button.is-active {
  color: var(--brand-strong);
  background: linear-gradient(180deg, rgb(from var(--brand-soft) r g b / 0.16), rgb(from var(--brand-soft) r g b / 0.035));
  box-shadow: inset 0 -2px 0 var(--brand);
}

.agenda-period-nav {
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr) 2.7rem auto;
  align-items: center;
  gap: 0.5rem;
}

.agenda-period-nav .icon-button {
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--brand-strong);
}

.agenda-period-nav .icon-button svg {
  width: 1.18rem;
  height: 1.18rem;
  stroke: currentColor;
}

.agenda-period-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2.55rem;
  min-width: 0;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  text-align: center;
}

.agenda-period-label svg {
  width: 1.08rem;
  height: 1.08rem;
  flex: 0 0 auto;
  stroke: currentColor;
}

.agenda-period-label strong {
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(0.86rem, 3vw, 1rem);
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-today-button {
  min-height: 2.55rem;
  border-radius: 0.72rem;
  white-space: nowrap;
}

.agenda-calendar-panel,
.agenda-day-panel {
  border-radius: 0.95rem;
  padding: 0.85rem;
  background:
    rgba(255, 255, 255, 0.035);
}

.agenda-calendar-panel .section-title,
.agenda-day-panel .section-title {
  align-items: start;
}

.agenda-calendar-panel .section-title > div,
.agenda-day-panel .section-title > div {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.calendar-board {
  border: 1px solid var(--line);
  border-radius: 0.92rem;
  background: rgba(0, 0, 0, 0.18);
}

.agenda-week-board {
  overflow-x: auto;
  overflow-y: hidden;
}

.agenda-week-grid {
  display: grid;
  grid-template-columns: 3.9rem repeat(7, minmax(6.3rem, 1fr));
  min-width: 50rem;
}

.agenda-week-head {
  border-bottom: 1px solid var(--line);
}

.agenda-time-head {
  border-right: 1px solid var(--line);
}

.agenda-week-day {
  display: grid;
  place-items: center;
  gap: 0.12rem;
  min-height: 3.25rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.agenda-week-day:last-child {
  border-right: 0;
}

.agenda-week-day strong {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1;
}

.agenda-week-day span {
  font-size: 0.72rem;
  line-height: 1;
}

.agenda-week-day.is-selected strong,
.agenda-week-day.is-selected span {
  color: var(--brand-strong);
}

.agenda-hour-label,
.agenda-week-slot {
  min-height: 3.35rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.agenda-hour-label {
  display: grid;
  place-items: start center;
  padding-top: 0.42rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 780;
}

.agenda-week-slot {
  display: grid;
  align-content: start;
  gap: 0.24rem;
  padding: 0.28rem;
  min-width: 0;
}

.agenda-week-slot.is-selected-day {
  background: rgb(from var(--brand-soft) r g b / 0.045);
}

.day-event {
  display: grid;
  gap: 0.08rem;
  min-height: 2.34rem;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.22);
  border-left: 0.24rem solid var(--brand);
  border-radius: 0.42rem;
  background: var(--brand-soft);
  color: var(--ink);
  padding: 0.26rem 0.32rem;
  text-align: left;
  white-space: normal;
}

.day-event strong {
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-event span {
  overflow: hidden;
  margin: 0;
  color: rgba(247, 244, 235, 0.78);
  font-size: 0.62rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-event.is-more {
  min-height: 1.6rem;
  border-left-color: transparent;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.month-view .calendar-head span {
  padding: 0.55rem 0.3rem;
  border-bottom: 1px solid var(--line);
}

.month-view .day-cell {
  min-height: 6.15rem;
  background: rgba(255, 255, 255, 0.026);
}

.month-view .day-cell.is-selected {
  background: rgb(from var(--brand-soft) r g b / 0.095);
}

.month-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  min-height: 0.8rem;
}

.agenda-dot,
.agenda-type-dot {
  display: inline-block;
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  background: var(--brand);
}

.month-count {
  width: fit-content;
  min-height: 1.65rem;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.24);
  border-radius: 999px;
  background: rgb(from var(--brand-soft) r g b / 0.08);
  color: var(--brand-strong);
  padding: 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 780;
}

.agenda-list {
  display: grid;
  gap: 0.48rem;
}

.agenda-item {
  display: grid;
  grid-template-columns: 2.35rem auto 3.35rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.58rem;
  min-height: 4.05rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-left-width: 0.22rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.035);
}

.agenda-avatar {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
}

.agenda-type-dot {
  flex: 0 0 auto;
}

.agenda-time {
  color: var(--brand-strong);
  font-size: 0.96rem;
  font-weight: 850;
  white-space: nowrap;
}

.agenda-main {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.agenda-main strong,
.agenda-main span,
.agenda-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-main strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.agenda-main span,
.agenda-main small {
  color: var(--muted);
  font-size: 0.76rem;
}

.agenda-status {
  display: flex;
  justify-content: flex-end;
}

.agenda-status .badge {
  white-space: nowrap;
}

.agenda-item .row-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.36rem;
}

.agenda-item .row-actions .mini-button,
.agenda-item .row-actions .whatsapp-button {
  width: auto;
  min-height: 2.05rem;
  white-space: nowrap;
}

.agenda-item .whatsapp-button {
  min-width: 2.1rem;
  padding-inline: 0.45rem;
}

.agenda-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.agenda-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

/* COR ÚNICA POR TIPO — fonte única: o --type-color injetado inline a partir do
   mapa canônico AG_TYPE_META (Treino verde, Avaliação roxo, Retorno laranja,
   Reavaliação rosa, Atualização azul, Outro dourado). Os valores por classe
   abaixo são apenas FALLBACK para markup antigo sem a variável; nenhum tipo
   repete a cor de outro. */
.agenda-item[style*="--type-color"],
.agenda-type-dot[style*="--type-color"],
.agenda-dot[style*="--type-color"] {
  border-left-color: var(--type-color);
  background-color: var(--type-color);
}
.agenda-item[style*="--type-color"] {
  background-color: rgba(255, 255, 255, 0.035);
}
.day-event[style*="--type-color"] {
  background: color-mix(in srgb, var(--type-color) 20%, transparent);
  border-color: color-mix(in srgb, var(--type-color) 55%, transparent);
  border-left-color: var(--type-color);
}

/* Fallbacks por tipo (sem --type-color inline) — espelham o mapa canônico. */
.agenda-item.is-type-workout,
.agenda-type-dot.is-type-workout,
.agenda-dot.is-type-workout { border-left-color: #10B981; background-color: #10B981; }
.agenda-item.is-type-assessment,
.agenda-type-dot.is-type-assessment,
.agenda-dot.is-type-assessment { border-left-color: #0E9CA8; background-color: #0E9CA8; }
.agenda-item.is-type-return,
.agenda-type-dot.is-type-return,
.agenda-dot.is-type-return { border-left-color: #F97316; background-color: #F97316; }
.agenda-item.is-type-reassessment,
.agenda-type-dot.is-type-reassessment,
.agenda-dot.is-type-reassessment { border-left-color: #EC4899; background-color: #EC4899; }
.agenda-item.is-type-update,
.agenda-type-dot.is-type-update,
.agenda-dot.is-type-update { border-left-color: #3B82F6; background-color: #3B82F6; }
.agenda-item.is-type-other,
.agenda-type-dot.is-type-other,
.agenda-dot.is-type-other { border-left-color: #F59E0B; background-color: #F59E0B; }
.agenda-item.is-type-contract,
.agenda-type-dot.is-type-contract,
.agenda-dot.is-type-contract { border-left-color: #F59E0B; background-color: #F59E0B; }

.agenda-item.is-type-workout,
.agenda-item.is-type-assessment,
.agenda-item.is-type-return,
.agenda-item.is-type-reassessment,
.agenda-item.is-type-update,
.agenda-item.is-type-other,
.agenda-item.is-type-contract {
  background-color: rgba(255, 255, 255, 0.035);
}

/* Agenda do aluno — linhas limpas dentro de Mais */
.student-agenda-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-left-width: 0.22rem;
  border-left-color: var(--brand);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.035);
}

.student-agenda-row .agenda-item-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* Cor da borda gerada pelo tipo via --type-color (mapa canônico); fallbacks por
   classe espelham as 6 cores únicas — Reavaliação rosa e Outro dourado próprios. */
/* [56.1] Os seis "fallbacks por classe" que viviam aqui embaixo (#10B981,
   #0E9CA8, #F97316, #EC4899, #3B82F6, #F59E0B) tinham a MESMA especificidade
   desta regra e vinham depois: venciam, e a faixa pintava a paleta velha —
   Treino em #10B981, não em --treino. O inline --type-color é sempre
   escrito (app.js, renderização da linha), então não há fallback a cobrir. */
.student-agenda-row[style*="--type-color"] { border-left-color: var(--type-color); }

.student-agenda-row__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.6rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--brand);
}

.student-agenda-row__icon svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
}

/* Ícone tingido pela cor única do tipo (herda --type-color da linha; fallback por
   classe espelha o mapa canônico). Reavaliação rosa e Outro dourado próprios. */
.student-agenda-row[style*="--type-color"] .student-agenda-row__icon {
  color: var(--type-color);
  background: color-mix(in srgb, var(--type-color) 14%, transparent);
}
.student-agenda-row__icon.is-type-workout      { color: #10B981; background: rgba(16, 185, 129, 0.14); }
.student-agenda-row__icon.is-type-assessment   { color: #0E9CA8; background: rgba(14, 156, 168, 0.14); }
.student-agenda-row__icon.is-type-return       { color: #F97316; background: rgba(249, 115, 22, 0.14); }
.student-agenda-row__icon.is-type-reassessment { color: #EC4899; background: rgba(236, 72, 153, 0.14); }
.student-agenda-row__icon.is-type-update       { color: #3B82F6; background: rgba(59, 130, 246, 0.14); }
.student-agenda-row__icon.is-type-other        { color: #F59E0B; background: rgba(245, 158, 11, 0.14); }

.student-agenda-row__info {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.student-agenda-row__info strong {
  color: var(--ink);
  font-size: 0.93rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-agenda-row__info span {
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 850;
}

.student-agenda-row__badge {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.36rem;
  flex-shrink: 0;
}

.student-agenda-row__badge .badge {
  white-space: nowrap;
}

.student-agenda-row__badge .mini-button {
  white-space: nowrap;
}

/* CONFIRMACAO DO ALUNO — linha pendente ganha borda tracejada + fundo hachurado
   sutil (espelha a marca "aguardando" do lado professor) e uma barra de acoes. */
.student-agenda-row.is-confirm-pending {
  border-left-style: dashed;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(245, 184, 30, 0.07) 0,
    rgba(245, 184, 30, 0.07) 5px,
    transparent 5px,
    transparent 11px
  );
}

.student-agenda-confirm {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.15rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.agenda-confirm-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.6rem;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
}

.agenda-confirm-action svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.agenda-confirm-action.is-confirm {
  color: #052e1c;
  background: #10B981;
  border-color: #10B981;
}

.agenda-confirm-action.is-decline {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
}

/* ABA AGENDA do perfil — timeline das proximas atividades agrupadas por dia.
   Cada dia tem um cabecalho relativo (Hoje/Amanha/dia da semana) e a lista de
   linhas reusa .student-agenda-row (faixa lateral pela cor do tipo + marca de
   confirmacao solida/hachurada). */
.profile-agenda-timeline {
  display: grid;
  gap: 1.15rem;
}

.profile-agenda-day {
  position: relative;
  display: grid;
  gap: 0.55rem;
  padding-left: 1rem;
}

/* Trilho vertical sutil da timeline. */
.profile-agenda-day::before {
  content: "";
  position: absolute;
  left: 0.27rem;
  top: 0.45rem;
  bottom: 0.1rem;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.profile-agenda-day__head {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

/* Marcador do dia sobre o trilho. */
.profile-agenda-day__head::before {
  content: "";
  position: absolute;
  left: -0.97rem;
  top: 0.32rem;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--surface, #1A1A1A);
}

.profile-agenda-day__rel {
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.profile-agenda-day__date {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--muted);
}

.profile-agenda-add {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.profile-agenda-add__plus {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

/* ABA CONTRATO do perfil — card do contrato ativo (plano, badge, valor,
   vigencia, abrir) + lista de mensalidades (financeiro do aluno). */
.profile-contract {
  display: grid;
  gap: 0.85rem;
}

.pc-contract-card {
  position: relative;
  display: grid;
  gap: 0.9rem;
  padding: 1.05rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
    rgba(12, 12, 12, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 26px -18px rgba(0, 0, 0, 0.85);
}

.pc-contract-card::after {
  content: "";
  position: absolute;
  right: -1.6rem;
  top: -1.6rem;
  width: 6rem;
  height: 6rem;
  border-radius: 999px;
  background: rgb(from var(--brand-soft) r g b / 0.07);
  pointer-events: none;
}

.pc-contract-card.is-expired { border-left-color: var(--danger); }
.pc-contract-card.is-upcoming { border-left-color: var(--brand); }
.pc-contract-card.is-draft { border-left-color: var(--muted); }
.pc-contract-card.is-expired::after { background: rgb(from var(--danger) r g b / 0.08); }

.pc-contract-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pc-contract-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  flex-shrink: 0;
  border-radius: 0.8rem;
  color: var(--brand);
  background:
    linear-gradient(145deg, rgb(from var(--brand-soft) r g b / 0.26), rgba(255, 255, 255, 0.04)),
    rgba(212, 175, 55, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pc-contract-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.pc-contract-id {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}

.pc-contract-id small {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pc-contract-id strong {
  font-size: clamp(1.05rem, 4.6vw, 1.32rem);
  font-weight: 850;
  line-height: 1.08;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-contract-head .badge {
  flex-shrink: 0;
  align-self: flex-start;
}

.pc-contract-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.pc-contract-field {
  display: grid;
  grid-template-columns: 1.1rem auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.05rem 0.45rem;
  padding: 0.62rem 0.72rem;
  border-radius: 0.8rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--line);
}

.pc-contract-field span {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  color: var(--brand);
}

.pc-contract-field span svg {
  width: 1rem;
  height: 1rem;
}

.pc-contract-field small {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.pc-contract-field strong {
  font-size: 0.9rem;
  font-weight: 820;
  color: var(--ink);
}

.pc-contract-open {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.78rem 0.9rem;
  border-radius: 0.8rem;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  color: #1a1206;
  background: linear-gradient(180deg, #ffd66f, var(--brand));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px -10px rgba(212, 175, 55, 0.6);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.pc-contract-open:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 22px -10px rgba(212, 175, 55, 0.7);
}

.pc-contract-open:active {
  transform: translateY(1px);
}

.pc-contract-open svg {
  width: 1.05rem;
  height: 1.05rem;
}

.pc-finance .section-title {
  margin-bottom: 0.65rem;
}

.pc-finance-list {
  display: grid;
  gap: 0.55rem;
}

/* [F1.4] A linha da mensalidade virou BOTÃO: a linha inteira abre o sheet de
   ações (cobrar, registrar pagamento manual, ver/editar, cancelar). Por isso o
   reset de botão aqui — texto à esquerda, cor herdada, sem realce de toque. */
.pc-fin-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: var(--surface, #1A1A1A);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pc-fin-row:active {
  transform: scale(0.995);
}

/* [56.1] a faixa da linha de cobrança na ficha usa as tintas de estado da lei. */
.pc-fin-row.is-paid { border-left-color: var(--estado-ok); }
.pc-fin-row.is-pending { border-left-color: var(--estado-espera); }
.pc-fin-row.is-awaiting { border-left-color: var(--estado-espera); }
.pc-fin-row.is-overdue { border-left-color: var(--estado-atraso); }

.pc-fin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 10px;
  color: var(--brand);
  background: rgba(212, 175, 55, 0.12);
}

.pc-fin-icon svg {
  width: 1rem;
  height: 1rem;
}

.pc-fin-main {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}

.pc-fin-main strong {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}

.pc-fin-main span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.pc-fin-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* [F1.4] .pc-fin-charge (o botão "Cobrar" dentro da linha) não existe mais:
   a linha inteira abre o sheet de ações da cobrança. */

@media (max-width: 23rem) {
  .pc-contract-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 57.99rem) {
  .agenda-hero {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .agenda-hero .primary-action {
    width: 100%;
    min-width: 0;
  }

  .agenda-period-nav {
    grid-template-columns: 2.55rem minmax(0, 1fr) 2.55rem;
  }

  .agenda-today-button {
    grid-column: 1 / -1;
  }

  .agenda-calendar-panel,
  .agenda-day-panel {
    padding: 0.72rem;
  }

  .agenda-item {
    grid-template-columns: 2.2rem auto 3.1rem minmax(0, 1fr);
    gap: 0.42rem;
  }

  .agenda-status {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .agenda-item .row-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agenda-item .row-actions .mini-button,
  .agenda-item .row-actions .whatsapp-button {
    width: 100%;
  }

  .agenda-main small,
  .agenda-main span {
    white-space: normal;
  }
}

@media (max-width: 24.5rem) {
  .agenda-period-label strong {
    font-size: 0.78rem;
  }

  .agenda-item {
    grid-template-columns: 2.1rem 0.55rem 3rem minmax(0, 1fr);
  }
}

/* Padrões de treino - biblioteca premium Elite AS */
.patterns-workspace {
  gap: 1rem;
}

.patterns-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 0.35rem 0 0.1rem;
}

.patterns-hero h3 {
  margin-top: 0.15rem;
  color: var(--ink);
  font-size: clamp(2rem, 7vw, 3.1rem);
  font-weight: 850;
  line-height: 1;
}

.patterns-hero p {
  margin-top: 0.42rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(0.94rem, 2.8vw, 1.08rem);
  line-height: 1.35;
}

.patterns-hero .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.58rem;
  width: auto;
  min-width: 11rem;
  min-height: 3.15rem;
  border-radius: 0.86rem;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.patterns-hero .primary-action svg {
  width: 1.16rem;
  height: 1.16rem;
  stroke: currentColor;
}

.patterns-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.pattern-summary-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.32rem;
  min-height: 7.6rem;
  padding: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--borda);
  border-radius: 1rem;
  background: var(--card);
}

.pattern-summary-card::after {
  content: "";
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  background: rgb(from var(--brand-soft) r g b / 0.055);
  pointer-events: none;
}

.pattern-summary-icon {
  display: inline-grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  color: var(--brand-strong);
}

.pattern-summary-icon svg {
  width: 1.42rem;
  height: 1.42rem;
  stroke: currentColor;
}

.pattern-summary-card span:not(.pattern-summary-icon) {
  color: rgba(247, 244, 235, 0.74);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.2;
}

.pattern-summary-card strong {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: clamp(1.75rem, 4.8vw, 2.35rem);
  line-height: 0.96;
}

.pattern-summary-card small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.24;
}

.patterns-toolbar {
  display: grid;
  grid-template-columns: minmax(16rem, 1.05fr) minmax(0, 1.45fr);
  gap: 0.7rem;
  padding: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(10, 10, 10, 0.9);
}

.pattern-search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  min-height: 3.25rem;
  padding: 0 0.86rem;
  border: 1px solid var(--line);
  border-radius: 0.86rem;
  background: rgba(255, 255, 255, 0.04);
}

.pattern-search-field svg {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--muted);
  stroke: currentColor;
}

.pattern-search-field:focus-within {
  border-color: rgb(from var(--brand-soft) r g b / 0.62);
  box-shadow: none;
}

.pattern-search-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 760;
  outline: none;
  box-shadow: none;
}

.pattern-search-field input::placeholder {
  color: rgba(247, 244, 235, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
}

.pattern-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.pattern-filter {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.16rem 0.58rem;
  min-height: 3.25rem;
  padding: 0.62rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 0.86rem;
  background: rgba(255, 255, 255, 0.04);
}

.pattern-filter-icon {
  grid-row: span 2;
  display: inline-grid;
  width: 1.24rem;
  height: 1.24rem;
  place-items: center;
  color: var(--brand-strong);
}

.pattern-filter-icon svg {
  width: 1.18rem;
  height: 1.18rem;
  stroke: currentColor;
}

.pattern-filter-label {
  color: rgba(247, 244, 235, 0.7);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
}

.pattern-filter select {
  width: 100%;
  min-height: 1.72rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 820;
  outline: none;
  box-shadow: none;
}

.pattern-filter select option {
  background: #0b0b0b;
  color: var(--ink);
}

.patterns-list-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.024)),
    rgba(9, 9, 9, 0.9);
}

.patterns-list-panel .section-title {
  align-items: start;
}

.patterns-list-panel .section-title > div {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.pattern-title-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.82rem;
  min-width: 0;
}

.pattern-title-block h3 {
  color: var(--ink);
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  line-height: 1.1;
}

.pattern-title-block p {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.pattern-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.pattern-meta-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.2rem;
}

.pattern-exercise-preview {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.pattern-preview {
  display: grid;
  gap: 0.42rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pattern-preview span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.3rem;
  padding: 0.48rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0.68rem;
  background: rgba(255, 255, 255, 0.032);
}

.pattern-preview b {
  min-width: 0;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pattern-preview small {
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 780;
  line-height: 1.15;
  white-space: nowrap;
}

.pattern-preview .pattern-preview-extra,
.pattern-preview.is-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  width: fit-content;
  min-height: 2rem;
  color: var(--muted);
}

.pattern-preview.is-empty {
  display: grid;
  justify-content: start;
  width: 100%;
}

.pattern-preview.is-empty strong {
  color: var(--ink);
}

@media (max-width: 68rem) {
  .patterns-toolbar {
    grid-template-columns: 1fr;
  }

  .patterns-summary-grid,
  .pattern-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 57.99rem) {
  .patterns-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .patterns-hero .primary-action {
    width: 100%;
  }

  .pattern-filter-grid {
    grid-template-columns: 1fr;
  }

  .pattern-preview span {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .pattern-preview b,
  .pattern-preview small {
    white-space: normal;
  }

}

@media (max-width: 24.5rem) {
  .patterns-summary-grid,
  .pattern-meta-grid,
  .pattern-card-actions {
    grid-template-columns: 1fr;
  }

}

/* Atualizações - central premium de acompanhamento físico */
.updates-workspace {
  gap: 1rem;
}

.updates-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 0.35rem 0 0.1rem;
}

.updates-hero h3 {
  margin-top: 0.15rem;
  color: var(--ink);
  font-size: clamp(2rem, 7vw, 3.1rem);
  font-weight: 850;
  line-height: 1;
}

.updates-hero p {
  margin-top: 0.42rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(0.94rem, 2.8vw, 1.08rem);
  line-height: 1.35;
}

.updates-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.update-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 0.16rem 0.68rem;
  min-height: 8rem;
  padding: 0.88rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.88rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
    rgba(12, 12, 12, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.update-summary-card::after {
  content: "";
  position: absolute;
  right: -1.35rem;
  bottom: -1.35rem;
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 999px;
  background: rgb(from var(--brand-soft) r g b / 0.055);
  pointer-events: none;
}

.update-summary-icon {
  grid-row: span 3;
  display: inline-grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  color: var(--brand-strong);
}

.update-summary-icon svg {
  width: 1.82rem;
  height: 1.82rem;
  stroke: currentColor;
}

.update-summary-card > span:not(.update-summary-icon) {
  min-width: 0;
  color: rgba(247, 244, 235, 0.78);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.18;
}

.update-summary-card strong {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: clamp(2rem, 6vw, 2.65rem);
  line-height: 0.98;
}

.update-summary-card small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.22;
}

.update-summary-card.is-success .update-summary-icon,
.update-summary-card.is-success small {
  color: var(--success);
}

.update-summary-card.is-warning .update-summary-icon,
.update-summary-card.is-warning small {
  color: var(--brand-strong);
}

.update-summary-card.is-danger .update-summary-icon,
.update-summary-card.is-danger small {
  color: var(--danger);
}

.updates-filter-panel,
.updates-list-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.024)),
    rgba(12, 12, 12, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.update-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.08rem 0.6rem;
  min-height: 4.15rem;
  padding: 0.64rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, background 160ms ease;
}

.update-filter:focus-within {
  border-color: rgb(from var(--brand-soft) r g b / 0.64);
  background: rgb(from var(--brand-soft) r g b / 0.07);
}

.update-filter-icon {
  grid-row: span 2;
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  color: var(--brand-strong);
}

.update-filter-icon svg {
  width: 1.28rem;
  height: 1.28rem;
  stroke: currentColor;
}

.update-filter-label {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.1;
}

.update-filter select,
.update-filter input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 720;
}

.update-filter select option {
  background: #101010;
  color: var(--ink);
}

/* [C4] A "Data exata" de Atualizações mora fora do painel (um <input type=date>
   não cabe num <select>) e só aparece quando o Período é "Data exata". Ela
   respira do resto como o painel respira da barra. */
.update-date-filter {
  margin-top: 0.5rem;
}

.update-card-list {
  display: grid;
  gap: 0.75rem;
}

.update-card {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022)),
    rgba(12, 12, 12, 0.9);
}

.update-card.is-received {
  border-color: rgba(72, 215, 100, 0.22);
}

.update-card.is-pending {
  border-color: rgb(from var(--brand-soft) r g b / 0.24);
}

.update-card.is-late {
  border-color: rgba(255, 90, 79, 0.28);
}

.update-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.78rem;
}

.update-card-head .entity-avatar {
  width: 4rem;
  height: 4rem;
  border-color: rgb(from var(--brand-soft) r g b / 0.32);
}

.update-title-block {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.update-title-block strong {
  min-width: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-title-block span {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.update-title-block i {
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 999px;
  background: var(--brand-strong);
}

.update-title-block i.is-success {
  background: var(--success);
}

.update-title-block i.is-warning {
  background: var(--brand-strong);
}

.update-title-block i.is-danger {
  background: var(--danger);
}

.update-title-block em {
  color: rgba(247, 244, 235, 0.34);
  font-style: normal;
}

.update-card-body {
  display: grid;
  grid-template-columns: minmax(10rem, 0.55fr) minmax(0, 1.45fr);
  gap: 0.95rem;
  padding-top: 0.78rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.update-weight-panel {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  min-width: 0;
  padding-right: 0.85rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.update-weight-panel span {
  color: var(--muted);
  font-size: 0.84rem;
}

.update-weight-panel strong {
  color: var(--brand-strong);
  font-size: clamp(1.45rem, 5.8vw, 2.1rem);
  line-height: 1.05;
}

.update-weight-panel strong.is-down {
  color: var(--success);
}

.update-weight-panel strong.is-up {
  color: var(--danger);
}

.update-weight-panel strong.is-neutral {
  color: var(--ink);
}

.update-weight-panel strong.is-pending {
  color: var(--brand-strong);
}

.update-weight-panel small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.32;
}

.update-photo-strip,
.update-photo-grid-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.66rem;
  min-width: 0;
}

.update-photo-frame {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: center;
}

.update-photo-frame img,
.update-photo-placeholder {
  width: 100%;
  aspect-ratio: 1.22 / 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.76rem;
  background: rgba(255, 255, 255, 0.04);
  object-fit: cover;
}

.update-photo-frame.has-photo img {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.update-photo-placeholder {
  display: grid;
  place-items: center;
  border-style: dashed;
  color: var(--brand-strong);
}

.update-photo-placeholder svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.update-photo-frame small {
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.1;
}

.update-card-note {
  margin: 0;
  padding: 0.68rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.38;
}

.update-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.86rem;
  width: 100%;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.55);
  border-radius: 0.78rem;
  background: rgb(from var(--brand-soft) r g b / 0.055);
  color: var(--brand-strong);
  font-weight: 850;
}

.update-primary-action svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.update-detail {
  display: grid;
  gap: 0.85rem;
}

.update-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.78rem;
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.045);
}

.update-detail-hero .entity-avatar {
  width: 4.2rem;
  height: 4.2rem;
}

.update-detail-title {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}

.update-detail-title strong {
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.12;
}

.update-detail-title span {
  color: var(--muted);
  font-size: 0.86rem;
}

.update-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.update-detail-grid article,
.update-detail-note {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.78rem;
  background: rgba(255, 255, 255, 0.038);
}

.update-detail-grid span,
.update-detail-note span {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.15;
}

.update-detail-grid strong,
.update-detail-note strong {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.25;
}

.update-detail-grid strong.is-down {
  color: var(--success);
}

.update-detail-grid strong.is-up {
  color: var(--danger);
}

.update-detail-section {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.032);
}

.update-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.update-evaluation-form textarea {
  min-height: 7rem;
}

.update-detail .form-actions.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-note {
  padding: 0.78rem;
}

@media (max-width: 68rem) {
  .update-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .update-card-body {
    grid-template-columns: 1fr;
  }

  .update-weight-panel {
    padding-right: 0;
    padding-bottom: 0.7rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .update-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 57.99rem) {
  .updates-hero {
    grid-template-columns: 1fr;
  }

  .updates-summary-grid {
    gap: 0.52rem;
  }

  .update-summary-card {
    min-height: 7.25rem;
    padding: 0.72rem;
  }

  .update-summary-icon {
    width: 1.9rem;
    height: 1.9rem;
  }

  .update-summary-icon svg {
    width: 1.46rem;
    height: 1.46rem;
  }

  .update-summary-card > span:not(.update-summary-icon) {
    font-size: 0.72rem;
  }

  .update-summary-card small {
    font-size: 0.68rem;
  }

  .update-card-head,
  .update-detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .update-detail-hero > .badge {
    grid-column: 2;
    justify-self: start;
  }

  .update-notes-grid {
    grid-template-columns: 1fr;
  }

  .update-detail .form-actions.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 28rem) {
  .updates-summary-grid,
  .update-filter-grid,
  .update-detail-grid {
    grid-template-columns: 1fr;
  }

  .update-photo-strip,
  .update-photo-grid-detail {
    gap: 0.44rem;
  }

  .update-photo-frame img,
  .update-photo-placeholder {
    border-radius: 0.62rem;
  }

  .update-card {
    padding: 0.76rem;
  }
}

/* Avaliar check-in - tela de avaliação do personal */
.evaluate-page {
  padding-bottom: 0;
}

.evaluate-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
}

.evaluate-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.5rem 0.75rem 0.5rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s;
}

.evaluate-back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.evaluate-back-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.evaluate-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016)),
    rgba(12, 12, 12, 0.88);
}

.evaluate-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.evaluate-student-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem;
}

.evaluate-student-card .entity-avatar {
  width: 3.8rem;
  height: 3.8rem;
  border-color: rgb(from var(--brand-soft) r g b / 0.32);
}

.evaluate-student-info {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.evaluate-student-info strong {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evaluate-student-info span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.25;
}

.evaluate-student-info small {
  color: var(--muted);
  font-size: 0.76rem;
  opacity: 0.75;
}

.evaluate-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.evaluate-card-head > div {
  display: grid;
  gap: 0.18rem;
}

.evaluate-card-head .small-text {
  color: var(--muted);
  font-size: 0.8rem;
}

.evaluate-compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex-shrink: 0;
  padding: 0.44rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.evaluate-compare-btn:hover,
.evaluate-compare-btn.is-active {
  background: var(--brand-soft);
  border-color: rgb(from var(--brand-soft) r g b / 0.35);
  color: var(--brand-strong);
}

.evaluate-compare-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.evaluate-photos-wrap {
  display: grid;
  gap: 0.85rem;
}

.evaluate-photo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.evaluate-photo-col {
  display: grid;
  gap: 0.35rem;
}

.evaluate-photo-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
}

.evaluate-compare-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  grid-column: 1 / -1;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.evaluate-compare-label svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.evaluate-weight-card {
  gap: 0.85rem;
}

.evaluate-weight-main {
  text-align: center;
  padding: 0.5rem 0;
}

.evaluate-weight-delta {
  display: block;
  font-size: clamp(2.6rem, 11vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.evaluate-weight-delta.is-down {
  color: var(--success);
}

.evaluate-weight-delta.is-up {
  color: var(--danger);
}

.evaluate-weight-delta.is-neutral {
  color: var(--muted);
}

.evaluate-weight-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.028);
}

.evaluate-weight-col {
  display: grid;
  gap: 0.2rem;
  flex: 1;
  text-align: center;
  min-width: 0;
}

.evaluate-weight-col span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.15;
}

.evaluate-weight-col strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.evaluate-weight-divider {
  width: 1px;
  height: 2.2rem;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  margin: 0 0.25rem;
}

.evaluate-notes-section {
  display: grid;
  gap: 0.55rem;
}

.evaluate-note-item {
  display: grid;
  gap: 0.28rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.78rem;
  background: rgba(255, 255, 255, 0.025);
}

.evaluate-note-item span {
  color: var(--brand-strong);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.evaluate-note-item p {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.45;
}

.evaluate-feedback-card {
  gap: 0.9rem;
}

.evaluate-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.evaluate-chip {
  padding: 0.44rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.evaluate-chip:hover {
  background: var(--brand-soft);
  border-color: rgb(from var(--brand-soft) r g b / 0.32);
  color: var(--brand-strong);
}

.evaluate-rating-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.evaluate-rating-row > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  flex-shrink: 0;
}

.evaluate-stars {
  display: flex;
  gap: 0.3rem;
}

.evaluate-star {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.2);
  transition: color 0.15s, transform 0.12s;
}

.evaluate-star:hover,
.evaluate-star.is-active {
  color: var(--brand-strong);
}

.evaluate-star:active {
  transform: scale(0.88);
}

.evaluate-star svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: currentColor;
  stroke: none;
}

.evaluate-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.evaluate-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.038);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.evaluate-quick-btn:hover {
  background: rgba(14, 156, 168, 0.1);
  border-color: rgba(14, 156, 168, 0.32);
  color: #5BC9D2;
}

.evaluate-quick-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  flex-shrink: 0;
}

.evaluate-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  padding: 0.85rem 1rem calc(0.85rem + var(--safe-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(to top, rgba(5, 5, 5, 0.98) 60%, transparent),
    rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin: 0 -1rem -1rem;
}

.evaluate-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 3rem;
  white-space: nowrap;
}

.evaluate-footer-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.evaluate-footer-spacer {
  height: 5.5rem;
}

@media (max-width: 28rem) {
  .evaluate-photo-row {
    gap: 0.42rem;
  }

  .evaluate-weight-delta {
    font-size: clamp(2.2rem, 13vw, 3rem);
  }

  .evaluate-chips {
    gap: 0.35rem;
  }

  .evaluate-chip {
    font-size: 0.76rem;
    padding: 0.4rem 0.65rem;
  }

  .evaluate-quick-actions {
    grid-template-columns: 1fr;
  }

  .evaluate-footer {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 58rem) {
  .evaluate-footer {
    margin: 0 -1.25rem -1.25rem;
    border-radius: 0 0 0 0;
  }
}

/* Contratos - central premium de aceites e planos */
.contracts-workspace {
  gap: 1rem;
}

.contracts-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 0.35rem 0 0.1rem;
}

.contracts-hero h3 {
  margin-top: 0.15rem;
  color: var(--ink);
  font-size: clamp(2rem, 7vw, 3.1rem);
  font-weight: 850;
  line-height: 1;
}

.contracts-hero p {
  margin-top: 0.42rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(0.94rem, 2.8vw, 1.08rem);
  line-height: 1.35;
}

.contracts-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.contract-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 0.16rem 0.68rem;
  min-height: 8rem;
  padding: 0.88rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.88rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
    rgba(12, 12, 12, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.contract-summary-card::after {
  content: "";
  position: absolute;
  right: -1.35rem;
  bottom: -1.35rem;
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 999px;
  background: rgb(from var(--brand-soft) r g b / 0.055);
  pointer-events: none;
}

.contract-summary-icon {
  grid-row: span 3;
  display: inline-grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  color: var(--brand-strong);
}

.contract-summary-icon svg {
  width: 1.82rem;
  height: 1.82rem;
  stroke: currentColor;
}

.contract-summary-card > span:not(.contract-summary-icon) {
  min-width: 0;
  color: rgba(247, 244, 235, 0.78);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.18;
}

.contract-summary-card strong {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: clamp(2rem, 6vw, 2.65rem);
  line-height: 0.98;
}

.contract-summary-card small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.22;
}

.contract-summary-card.is-success .contract-summary-icon,
.contract-summary-card.is-success small {
  color: var(--success);
}

.contract-summary-card.is-warning .contract-summary-icon,
.contract-summary-card.is-warning small {
  color: var(--brand-strong);
}

.contract-summary-card.is-danger .contract-summary-icon,
.contract-summary-card.is-danger small {
  color: var(--danger);
}

.contracts-list-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.024)),
    rgba(12, 12, 12, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.contract-card-list {
  display: grid;
  gap: 0.58rem;
}

.contract-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.92rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.022)),
    rgba(12, 12, 12, 0.9);
}

.contract-card.is-signed {
  border-color: rgba(72, 215, 100, 0.22);
}

.contract-card.is-pending,
.contract-card.is-upcoming {
  border-color: rgb(from var(--brand-soft) r g b / 0.24);
}

.contract-card.is-expired,
.contract-card.is-canceled {
  border-color: rgba(255, 90, 79, 0.28);
}

.contract-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1.2fr) minmax(8rem, 0.72fr) minmax(10rem, auto) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem;
}

.contract-card-main .entity-avatar {
  width: 3.9rem;
  height: 3.9rem;
  border-color: rgb(from var(--brand-soft) r g b / 0.32);
}

.contract-student-info,
.contract-validity,
.contract-card-actions {
  min-width: 0;
}

.contract-student-info {
  display: grid;
  gap: 0.14rem;
}

.contract-student-info strong {
  color: var(--ink);
  font-size: clamp(1rem, 3.6vw, 1.26rem);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-student-info span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.22;
}

.contract-student-info b {
  color: var(--brand-strong);
  font-size: 0.86rem;
  font-weight: 820;
  line-height: 1.22;
}

.contract-validity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.1rem 0.5rem;
  align-items: center;
}

.contract-validity > span {
  grid-row: span 2;
  color: var(--brand-strong);
}

.contract-validity svg {
  width: 1.18rem;
  height: 1.18rem;
  stroke: currentColor;
}

.contract-validity small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.1;
}

.contract-validity strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.2;
}

.contract-card-actions {
  display: grid;
  justify-items: end;
  gap: 0.5rem;
}

.contract-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.42rem;
  padding: 0 0.86rem;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.5);
  border-radius: 0.72rem;
  background: rgb(from var(--brand-soft) r g b / 0.065);
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.contract-primary-action svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
}

.contract-action-menu summary {
  display: inline-grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border-radius: 0.72rem;
}

.contract-action-menu summary svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
}

.new-contract-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 5.4rem;
  padding: 0.86rem 1rem;
  border: 1px dashed rgb(from var(--brand-soft) r g b / 0.55);
  border-radius: 0.92rem;
  background: rgb(from var(--brand-soft) r g b / 0.035);
  color: var(--brand-strong);
  text-align: left;
}

.new-contract-card:hover {
  border-color: rgb(from var(--brand-soft) r g b / 0.82);
  background: rgb(from var(--brand-soft) r g b / 0.075);
}

.new-contract-icon {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.72);
  border-radius: 999px;
  color: var(--brand-strong);
}

.new-contract-card svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
}

.new-contract-card strong {
  display: block;
  color: var(--brand-strong);
  font-size: 1.04rem;
  line-height: 1.1;
}

.new-contract-card small {
  display: block;
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.contract-detail {
  display: grid;
  gap: 0.85rem;
}

.contract-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.78rem;
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.045);
}

.contract-detail-hero .entity-avatar {
  width: 4.2rem;
  height: 4.2rem;
}

.contract-detail-title {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}

.contract-detail-title strong {
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.12;
}

.contract-detail-title span {
  color: var(--muted);
  font-size: 0.86rem;
}

.contract-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.contract-detail-grid article {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.78rem;
  background: rgba(255, 255, 255, 0.038);
}

.contract-detail-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.15;
}

.contract-detail-grid strong {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.25;
}

.contract-detail-section {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.032);
}

.contract-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

/* ── contract action button (inline card) ── */
.contract-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.46rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.68rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.contract-action-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.contract-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--ink);
}

.contract-action-btn.is-brand {
  border-color: rgba(var(--brand-rgb), 0.4);
  background: rgba(var(--brand-rgb), 0.07);
  color: var(--brand-strong);
}

.contract-action-btn.is-brand:hover {
  background: rgba(var(--brand-rgb), 0.14);
  border-color: rgba(var(--brand-rgb), 0.65);
}

/* ── contract view sheet ── */
.contract-view-content {
  display: grid;
  gap: 0;
}

.contract-view-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.78rem;
}

.contract-view-hero-info {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.contract-view-hero-info strong {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.2;
}

.contract-view-hero-info span {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── contract timeline ── */
.contract-timeline {
  display: grid;
  gap: 0;
  padding-left: 0.5rem;
}

.contract-tl-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 0.9rem;
  padding-bottom: 1.1rem;
  position: relative;
}

.contract-tl-item:last-child {
  padding-bottom: 0;
}

.contract-tl-item::before {
  content: "";
  position: absolute;
  left: 0.36rem;
  top: 1.1rem;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.contract-tl-item:last-child::before {
  display: none;
}

.contract-tl-dot {
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.22rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.contract-tl-item.is-done .contract-tl-dot {
  border-color: var(--ok);
  background: var(--ok);
}

.contract-tl-text {
  display: grid;
  gap: 0.1rem;
}

.contract-tl-text span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.contract-tl-text strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.25;
}

.contract-tl-item.is-done .contract-tl-text span {
  color: var(--ok);
}

/* ── contract document body ── */
.contract-doc-body {
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 24rem;
  overflow-y: auto;
}

/* ── contract form student picker ── */
.cfs-student-field {
  position: relative;
}

.cfs-student-search {
  width: 100%;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 0.9rem;
}

.cfs-student-search:focus {
  outline: none;
  border-color: var(--brand);
}

.cfs-student-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 50;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.78rem;
  background: var(--surface-raised, #1a1a1a);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.cfs-student-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.62rem 0.9rem;
  text-align: left;
  color: var(--ink);
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cfs-student-result:last-child {
  border-bottom: none;
}

.cfs-student-result:hover {
  background: rgba(255, 255, 255, 0.055);
}

.cfs-result-avatar {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), 0.15);
  color: var(--brand-strong);
  font-size: 0.7rem;
  font-weight: 700;
}

.cfs-no-results {
  padding: 0.75rem 0.9rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.cfs-selected-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.65rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(var(--brand-rgb), 0.25);
  border-radius: 0.72rem;
  background: rgba(var(--brand-rgb), 0.05);
}

.cfs-preview-info {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.cfs-preview-info strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.2;
}

.cfs-preview-info span {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 68rem) {
  .contract-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contract-card-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .contract-validity,
  .contract-card-actions {
    grid-column: 2 / -1;
    justify-items: start;
  }

  .contract-card-actions {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-content: start;
  }

  .contract-action-menu {
    grid-row: 1;
    grid-column: 3;
  }
}

@media (max-width: 57.99rem) {
  .contracts-hero {
    grid-template-columns: 1fr;
  }

  .contracts-summary-grid {
    gap: 0.52rem;
  }

  .contract-summary-card {
    min-height: 7.25rem;
    padding: 0.72rem;
  }

  .contract-summary-icon {
    width: 1.9rem;
    height: 1.9rem;
  }

  .contract-summary-icon svg {
    width: 1.46rem;
    height: 1.46rem;
  }

  .contract-summary-card > span:not(.contract-summary-icon) {
    font-size: 0.72rem;
  }

  .contract-summary-card small {
    font-size: 0.68rem;
  }

  .contract-card-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .contract-validity,
  .contract-card-actions,
  .contract-action-menu {
    grid-column: 1 / -1;
  }

  .contract-card-actions {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .contract-primary-action {
    width: 100%;
  }

  .contract-action-menu,
  .contract-action-menu summary {
    width: 100%;
  }

  .contract-detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .contract-detail-hero > .badge {
    grid-column: 2;
    justify-self: start;
  }

  .contract-detail-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 28rem) {
  .contracts-summary-grid,
  .contract-detail-grid {
    grid-template-columns: 1fr;
  }

  .contract-card-main {
    gap: 0.58rem;
    padding: 0.72rem;
  }

  .new-contract-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .new-contract-card > svg {
    display: none;
  }
}

/* Alunos e perfil do aluno - visual Elite AS */
.students-workspace,
.student-page {
  gap: 1rem;
}

.students-hero,
.student-profile-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 0.35rem 0 0.15rem;
}

.students-hero h3,
.student-profile-topbar h3 {
  margin-top: 0.15rem;
  color: var(--ink);
  font-size: clamp(2rem, 7vw, 3.1rem);
  font-weight: 850;
  line-height: 1;
}

.students-hero p,
.student-profile-topbar p {
  margin-top: 0.42rem;
  color: var(--muted);
  font-size: clamp(0.94rem, 2.8vw, 1.08rem);
  line-height: 1.35;
}

.students-hero .primary-action,
.student-profile-top-actions .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.58rem;
  width: auto;
  min-width: 10.7rem;
  min-height: 3.15rem;
  border-radius: 0.85rem;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.students-hero .primary-action svg,
.student-profile-top-actions .primary-action svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
}

.student-search-panel {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.student-search-panel .student-search-field {
  flex: 1;
  min-width: 180px;
}

.student-search-panel .student-filter-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.student-search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  min-height: 3.65rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(10, 10, 10, 0.88);
}

.student-search-field svg {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--muted);
  stroke: currentColor;
}

.student-search-field:focus-within {
  border-color: rgb(from var(--brand-soft) r g b / 0.62);
  box-shadow: none;
}

.student-search-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.98rem;
  box-shadow: none;
}

.student-search-field input::placeholder {
  color: rgba(247, 244, 235, 0.45);
}

.student-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.student-filter {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.25rem 0.62rem;
  min-height: 3.8rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
}

.student-filter-icon {
  grid-row: span 2;
  display: inline-grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  color: var(--brand-strong);
}

.student-filter-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke: currentColor;
}

.student-filter-label {
  color: rgba(247, 244, 235, 0.74);
  font-size: 0.72rem;
  font-weight: 850;
}

.student-filter select {
  width: 100%;
  min-height: 1.7rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  /* RODADA 2R7 (F2): >= 16px — mesmo invisivel (opacity 0 na versao chip),
     o zoom de foco do Android olha a fonte do select focado. */
  font-size: 1rem;
  font-weight: 800;
  box-shadow: none;
}

.student-filter select option {
  background: #0b0b0b;
  color: var(--ink);
}

.students-list-panel {
  padding: 1rem;
}

.student-card-list {
  display: grid;
  gap: 0.85rem;
}

.student-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(10, 10, 10, 0.9);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.student-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
}

.student-card .entity-avatar,
.student-profile-hero .entity-avatar {
  width: 4.35rem;
  height: 4.35rem;
  flex-basis: 4.35rem;
  font-size: 1.25rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(20, 20, 20, 0.95);
}

.student-card-main {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.student-card-main > strong {
  color: var(--ink);
  font-size: clamp(1.14rem, 4.2vw, 1.45rem);
  line-height: 1.1;
}

.student-goal {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.student-goal svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  color: var(--brand-strong);
  stroke: currentColor;
}

.student-card-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  padding-top: 0.2rem;
}

.student-info-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.15rem 0.45rem;
  min-width: 0;
  padding: 0.7rem 0.72rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.student-info-block:first-child {
  border-left: 0;
}

.student-info-icon {
  grid-row: span 2;
  display: inline-grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  color: var(--brand-strong);
}

.student-info-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
}

.student-info-block span:not(.student-info-icon) {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.student-info-block strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.student-card-actions .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  border-radius: 0.72rem;
  border-color: rgb(from var(--brand-soft) r g b / 0.38);
  background: rgb(from var(--brand-soft) r g b / 0.045);
  color: var(--ink);
}

.student-card-actions .secondary-action svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--brand-strong);
  stroke: currentColor;
}

.student-card-actions .student-primary-link {
  color: var(--brand-strong);
}

.student-card-menu summary {
  width: 2.85rem;
  min-height: 2.85rem;
  padding: 0;
  border-radius: 0.72rem;
}

.student-card-menu summary svg,
.student-hero-menu-btn svg {
  width: 1.4rem;
  height: 1.4rem;
  stroke: currentColor;
}

.student-profile-topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.student-profile-topbar .back-button {
  color: var(--brand-strong);
}

.student-profile-top-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.student-profile-top-actions .secondary-action {
  width: auto;
  min-height: 2.75rem;
  border-radius: 0.8rem;
  border-color: rgb(from var(--brand-soft) r g b / 0.35);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

.student-profile-hero {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 1rem;
}

.student-profile-hero .student-hero-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
}

.student-hero-identity {
  display: grid;
  min-width: 0;
  gap: 0.34rem;
}

.student-hero-identity h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 6vw, 2.35rem);
  line-height: 1.05;
}

.student-hero-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.student-hero-menu-btn {
  width: 2.65rem;
  min-height: 2.65rem;
  padding: 0;
  border-radius: 0.75rem;
}

.student-profile-hero .student-hero-details {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.student-profile-hero .student-hero-details article {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.16rem 0.45rem;
  min-height: 4.1rem;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.student-profile-hero .student-hero-details article svg {
  grid-row: span 2;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--brand-strong);
  stroke: currentColor;
}

.student-profile-hero .student-hero-details span {
  color: var(--muted);
}

.student-profile-hero .student-hero-details strong {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.student-summary-card {
  min-height: 7.2rem;
  align-content: start;
  border-radius: 1rem;
  background: var(--card);
}

.profile-card-icon {
  display: inline-grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  color: var(--brand-strong);
}

.profile-card-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  stroke: currentColor;
}

.student-summary-card strong {
  font-size: clamp(1.05rem, 3.8vw, 1.55rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.student-summary-card.is-success .profile-card-icon,
.student-summary-card.is-success small {
  color: var(--success);
}

.student-summary-card.is-warning .profile-card-icon,
.student-summary-card.is-warning small {
  color: var(--brand-strong);
}

.student-summary-card.is-danger .profile-card-icon,
.student-summary-card.is-danger small {
  color: var(--danger);
}

.student-profile-tabs {
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.25rem;
  border-radius: 0.9rem;
}

.student-profile-tabs::-webkit-scrollbar {
  display: none;
}

.student-profile-tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.profile-tab-panel {
  border-radius: 1rem;
}

.student-profile-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 64rem) {
  .student-profile-hero .student-hero-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 57.99rem) {
  .students-hero,
  .student-profile-topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .students-hero .primary-action,
  .student-profile-top-actions,
  .student-profile-top-actions .primary-action,
  .student-profile-top-actions .secondary-action {
    width: 100%;
  }

  .student-profile-topbar .back-button {
    width: 2.65rem;
  }

  .student-profile-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .student-filter-grid {
    grid-template-columns: 1fr;
  }

  .student-card-top {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .student-card-top > .badge {
    grid-column: 2;
    justify-self: start;
  }

  .student-card-info {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .student-info-block {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .student-info-block:first-child {
    border-top: 0;
  }

  .student-card-actions {
    grid-template-columns: 1fr 1fr auto;
  }

  .student-profile-hero .student-hero-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .student-hero-menu-btn {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 24.5rem) {
  .student-card-actions,
  .student-profile-top-actions,
  .student-profile-actions {
    grid-template-columns: 1fr;
  }

  .student-card-menu {
    justify-self: stretch;
  }

  .student-card-menu summary {
    width: 100%;
  }

  .student-profile-hero .student-hero-details,
  .student-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Dieta - planos alimentares no padrão Elite AS */
.diet-workspace {
  gap: 0.95rem;
}

.diet-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding-top: 0.2rem;
}

.diet-hero h3 {
  margin: 0.14rem 0 0;
  color: var(--ink);
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
}

.diet-hero p {
  margin: 0.42rem 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.5vw, 1.08rem);
}

.diet-hero .primary-action {
  min-height: 3rem;
  padding-inline: 1.2rem;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.diet-hero .primary-action svg {
  width: 1.18rem;
  height: 1.18rem;
}

.diet-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
}

.diet-summary-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.18rem 0.68rem;
  min-height: 7.8rem;
  padding: 0.86rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(12, 12, 12, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.diet-summary-icon {
  grid-row: span 3;
  display: inline-grid;
  width: 2.18rem;
  height: 2.18rem;
  place-items: center;
  color: var(--brand-strong);
}

.diet-summary-icon svg {
  width: 1.55rem;
  height: 1.55rem;
  stroke: currentColor;
}

.diet-summary-card > span:not(.diet-summary-icon) {
  min-width: 0;
  color: rgba(247, 244, 235, 0.8);
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.16;
}

.diet-summary-card strong {
  color: var(--ink);
  font-size: clamp(1.55rem, 4.8vw, 2.25rem);
  line-height: 1;
}

.diet-summary-card small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
}

.diet-summary-card.is-success .diet-summary-icon,
.diet-summary-card.is-success small {
  color: var(--success);
}

.diet-summary-card.is-warning .diet-summary-icon,
.diet-summary-card.is-warning small {
  color: var(--brand-strong);
}

.diet-summary-card.is-danger .diet-summary-icon,
.diet-summary-card.is-danger small {
  color: var(--danger);
}

.diet-toolbar,
.diet-list-panel,
.diet-insights-panel {
  display: grid;
  gap: 0.78rem;
  padding: 0.82rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.024)),
    rgba(12, 12, 12, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.diet-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(10.5rem, 0.32fr) minmax(11rem, 0.32fr);
  align-items: stretch;
}

.diet-search-field,
.diet-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 3.35rem;
  gap: 0.08rem 0.62rem;
  padding: 0.55rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, background 160ms ease;
}

.diet-search-field:focus-within,
.diet-filter:focus-within {
  border-color: rgb(from var(--brand-soft) r g b / 0.64);
  background: rgb(from var(--brand-soft) r g b / 0.07);
}

.diet-search-field svg,
.diet-filter-icon {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--brand-strong);
}

.diet-search-field input,
.diet-filter select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 720;
}

.diet-search-field input::placeholder {
  color: rgba(247, 244, 235, 0.46);
}

.diet-filter-label {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.diet-filter select {
  grid-column: 2;
}

.diet-filter select option {
  background: #101010;
  color: var(--ink);
}

.diet-plan-list {
  display: grid;
  gap: 0.72rem;
}

.diet-plan-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    rgba(255, 255, 255, 0.032);
}

.diet-plan-card.is-active {
  border-color: rgba(72, 215, 100, 0.22);
}

.diet-plan-card.is-review,
.diet-plan-card.is-draft {
  border-color: rgb(from var(--brand-soft) r g b / 0.28);
}

.diet-plan-card.is-expired {
  border-color: rgba(255, 90, 79, 0.3);
}

.diet-plan-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.72rem;
  align-items: center;
}

.diet-plan-head .entity-avatar {
  width: 3.4rem;
  height: 3.4rem;
  border-color: rgb(from var(--brand-soft) r g b / 0.32);
}

.diet-plan-title {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.diet-plan-title strong {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.12;
}

.diet-plan-title span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.diet-plan-title svg {
  width: 1rem;
  height: 1rem;
  color: var(--brand-strong);
  stroke: currentColor;
}

.diet-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  padding-top: 0.72rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.diet-plan-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.08rem 0.48rem;
  align-items: center;
  min-width: 0;
}

.diet-plan-grid svg {
  grid-row: span 2;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--brand-strong);
  stroke: currentColor;
}

.diet-plan-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.16;
}

.diet-plan-grid strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.18;
}

.diet-plan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.diet-primary-action,
.diet-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  padding: 0 0.78rem;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.58);
  border-radius: var(--radius);
  color: var(--brand-strong);
  background: rgb(from var(--brand-soft) r g b / 0.07);
  font-size: 0.82rem;
  font-weight: 820;
}

.diet-primary-action {
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.diet-primary-action svg,
.diet-secondary-action svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
}

.diet-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.diet-insight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.diet-insight-card > span {
  display: inline-grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 1px solid rgb(from var(--brand-soft) r g b / 0.28);
  border-radius: 999px;
  color: var(--brand-strong);
  background: rgb(from var(--brand-soft) r g b / 0.07);
}

.diet-insight-card svg {
  width: 1.16rem;
  height: 1.16rem;
  stroke: currentColor;
}

.diet-insight-card strong,
.diet-insight-card small,
.diet-insight-card em {
  display: block;
  line-height: 1.18;
}

.diet-insight-card strong {
  color: var(--ink);
}

.diet-insight-card small {
  color: var(--muted);
}

.diet-insight-card em {
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-style: normal;
}

.diet-detail,
.student-diet-card {
  display: grid;
  gap: 0.85rem;
}

.diet-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.diet-detail-hero h3 {
  margin: 0.1rem 0;
  color: var(--ink);
  font-size: 1.42rem;
}

.diet-detail-hero p {
  margin: 0;
  color: var(--muted);
}

.diet-meal-list {
  display: grid;
  gap: 0.55rem;
}

.diet-meal-item {
  display: grid;
  gap: 0.18rem;
  padding: 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.diet-meal-item strong {
  color: var(--ink);
}

.diet-meal-item span,
.diet-meal-item small {
  color: var(--muted);
  line-height: 1.25;
}


@media (max-width: 68rem) {
  .diet-summary-grid,
  .diet-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 57.99rem) {
  .diet-hero,
  .diet-toolbar {
    grid-template-columns: 1fr;
  }

  .diet-hero .primary-action {
    width: 100%;
  }

  .diet-summary-grid {
    gap: 0.52rem;
  }

  .diet-summary-card {
    min-height: 7rem;
    padding: 0.7rem;
  }

  .diet-summary-icon {
    width: 1.85rem;
    height: 1.85rem;
  }

  .diet-summary-icon svg {
    width: 1.38rem;
    height: 1.38rem;
  }

  .diet-summary-card > span:not(.diet-summary-icon) {
    font-size: 0.7rem;
  }

  .diet-summary-card small {
    font-size: 0.67rem;
  }

  .diet-plan-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .diet-plan-head > .badge,
  .diet-plan-head > .action-menu {
    grid-column: 2;
    justify-self: start;
  }

  .diet-insights-grid {
    grid-template-columns: 1fr;
  }

  .diet-detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .diet-detail-hero .badge {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 28rem) {
  .diet-summary-grid,
  .diet-plan-grid,
  .diet-plan-actions {
    grid-template-columns: 1fr;
  }
}

/* Revisão visual global v39 - compactação premium Elite AS */
.content-stack,
.students-workspace,
.student-page,
.agenda-workspace,
.patterns-workspace,
.updates-workspace,
.contracts-workspace,
.finance-workspace,
.diet-workspace {
  gap: 0.72rem !important;
  max-width: 55.5rem;
  margin-inline: auto;
}

.manager-workspace,
.student-workspace {
  padding-bottom: calc(6.7rem + var(--safe-bottom)) !important;
}

.manager-workspace .workspace-layout,
.student-workspace .workspace-layout {
  padding-bottom: calc(1.1rem + var(--safe-bottom));
}

.manager-header,
.student-header {
  min-height: 4.4rem;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.055) 0 31%, transparent 31%),
    rgba(3, 3, 3, 0.94);
}

.manager-header .brand-logo,
.student-header .brand-logo {
  width: 4.15rem;
  height: 2.35rem;
  border-radius: 0.85rem;
}

.manager-header .brand-inline h2,
.student-header .brand-inline h2 {
  font-size: clamp(1.14rem, 4.3vw, 1.62rem);
  letter-spacing: 0;
}

.manager-header .brand-inline .manager-subtitle,
.student-header .brand-inline .manager-subtitle {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.manager-header .avatar-button,
.student-header .avatar-button {
  width: 2.52rem;
  height: 2.52rem;
  border-color: rgb(from var(--brand-soft) r g b / 0.72);
  box-shadow: none;
}

.panel,
.contracts-list-panel,
.updates-filter-panel,
.updates-list-panel,
.patterns-toolbar,
.patterns-list-panel,
.diet-toolbar,
.diet-list-panel,
.diet-insights-panel,
.finance-toolbar,
.finance-month-panel,
.finance-list-panel,
.finance-insights-panel,
.student-search-panel,
.students-list-panel,
.agenda-control-panel,
.agenda-calendar-panel,
.agenda-day-panel {
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 0.9rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(10, 10, 10, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 1rem 2.2rem rgba(0, 0, 0, 0.18);
}

.panel,
.contracts-list-panel,
.updates-filter-panel,
.updates-list-panel,
.patterns-toolbar,
.patterns-list-panel,
.diet-toolbar,
.diet-list-panel,
.diet-insights-panel,
.finance-toolbar,
.finance-month-panel,
.finance-list-panel,
.finance-insights-panel,
.students-list-panel,
.agenda-control-panel,
.agenda-calendar-panel,
.agenda-day-panel {
  padding: 0.72rem;
}

.page-head,
.dashboard-hero,
.students-hero,
.student-profile-topbar,
.agenda-hero,
.patterns-hero,
.updates-hero,
.contracts-hero,
.finance-hero,
.diet-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.78rem;
  padding: 0.12rem 0 0;
}

.page-head h3,
.dashboard-hero h3,
.students-hero h3,
.student-profile-topbar h3,
.agenda-hero h3,
.patterns-hero h3,
.updates-hero h3,
.contracts-hero h3,
.finance-hero h3,
.diet-hero h3 {
  margin: 0.12rem 0 0;
  font-size: clamp(1.62rem, 5.5vw, 2.45rem);
  font-weight: 840;
  line-height: 0.98;
  letter-spacing: 0;
}

.page-head p,
.dashboard-hero p,
.students-hero p,
.student-profile-topbar p,
.agenda-hero p,
.patterns-hero p,
.updates-hero p,
.contracts-hero p,
.finance-hero p,
.diet-hero p {
  margin: 0.28rem 0 0;
  color: rgba(247, 244, 235, 0.64);
  font-size: clamp(0.82rem, 2.5vw, 0.98rem);
  line-height: 1.32;
}

.primary-action,
.secondary-action,
.danger-action,
.mini-button,
.diet-primary-action,
.diet-secondary-action,
.finance-primary-action,
.finance-secondary-action,
.contract-primary-action,
.contract-secondary-action {
  border-radius: 0.78rem;
  letter-spacing: 0;
}

.primary-action,
.dashboard-hero .primary-action,
.students-hero .primary-action,
.agenda-hero .primary-action,
.patterns-hero .primary-action,
.finance-hero .primary-action,
.diet-hero .primary-action {
  min-height: 2.58rem;
  padding-inline: 0.95rem;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: none;
}

.mini-button {
  min-height: 2rem;
  padding: 0.34rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.section-title {
  gap: 0.55rem;
  align-items: center;
}

.section-title h3 {
  font-size: clamp(1rem, 3.1vw, 1.18rem);
  line-height: 1.08;
}

.section-title .small-text {
  font-size: 0.7rem;
  line-height: 1.25;
}

.badge {
  min-height: 1.58rem;
  padding: 0.24rem 0.48rem;
  font-size: 0.66rem;
  font-weight: 780;
  line-height: 1;
}

.metric-grid,
.dashboard-metrics,
.patterns-summary-grid,
.updates-summary-grid,
.contracts-summary-grid,
.finance-summary-grid,
.diet-summary-grid,
.student-summary-grid {
  gap: 0.55rem;
}

.dashboard-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-metrics .dashboard-metric:nth-child(-n + 3) {
  grid-column: span 2;
}

.dashboard-metrics .dashboard-metric:nth-child(n + 4) {
  grid-column: span 3;
}

.dashboard-metric,
.pattern-summary-card,
.update-summary-card,
.contract-summary-card,
.finance-summary-card,
.diet-summary-card,
.student-summary-card,
.profile-card {
  min-height: 5.45rem;
  padding: 0.62rem;
  border-radius: 1rem;
}

.pattern-summary-card,
.update-summary-card,
.contract-summary-card,
.finance-summary-card,
.diet-summary-card,
.student-summary-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  gap: 0.05rem 0.55rem;
}

.pattern-summary-icon,
.update-summary-icon,
.contract-summary-icon,
.finance-summary-icon,
.diet-summary-icon,
.profile-card-icon {
  width: 1.72rem;
  height: 1.72rem;
}

.pattern-summary-icon svg,
.update-summary-icon svg,
.contract-summary-icon svg,
.finance-summary-icon svg,
.diet-summary-icon svg,
.profile-card-icon svg {
  width: 1.22rem;
  height: 1.22rem;
}

.dashboard-metric .metric-label,
.pattern-summary-card > span:not(.pattern-summary-icon),
.update-summary-card > span:not(.update-summary-icon),
.contract-summary-card > span:not(.contract-summary-icon),
.finance-summary-card > span:not(.finance-summary-icon),
.diet-summary-card > span:not(.diet-summary-icon),
.profile-card span {
  color: rgba(247, 244, 235, 0.7);
  font-size: 0.68rem;
  line-height: 1.16;
}

.dashboard-metric strong,
.pattern-summary-card strong,
.update-summary-card strong,
.contract-summary-card strong,
.finance-summary-card strong,
.diet-summary-card strong,
.profile-card strong {
  font-size: clamp(1.35rem, 4.2vw, 2rem);
  line-height: 0.98;
}

.dashboard-metric small,
.pattern-summary-card small,
.update-summary-card small,
.contract-summary-card small,
.finance-summary-card small,
.diet-summary-card small,
.profile-card small {
  font-size: 0.64rem;
  line-height: 1.2;
}

.toolbar input,
.toolbar select,
.student-search-field,
.student-filter,
.pattern-search-field,
.pattern-filter,
.update-filter,
.finance-search-field,
.finance-filter,
.diet-search-field,
.diet-filter {
  min-height: 3.05rem;
  border-color: rgba(255, 255, 255, 0.105);
  border-radius: 0.82rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(8, 8, 8, 0.9);
}

.toolbar input,
.toolbar select,
.pattern-search-field input,
.update-filter input,
.finance-search-field input,
.diet-search-field input,
.student-search-field input,
.pattern-filter select,
.update-filter select,
.finance-filter select,
.diet-filter select,
.student-filter select {
  color: var(--ink);
  background: transparent;
}

.student-filter-grid,
.pattern-filter-grid,
.update-filter-grid {
  gap: 0.52rem;
}

.students-list-panel,
.patterns-list-panel,
.updates-list-panel,
.contracts-list-panel,
.finance-list-panel,
.diet-list-panel {
  gap: 0.62rem;
}

.student-card-list,
.pattern-card-list,
.update-card-list,
.contract-list,
.diet-plan-list,
.entity-list {
  gap: 0.55rem;
}

.student-card,
.pattern-card,
.update-card,
.contract-card,
.finance-record-card,
.diet-plan-card,
.library-row {
  border-radius: 0.88rem;
}

.student-card,
.pattern-card,
.update-card,
.contract-card,
.finance-record-card,
.diet-plan-card,
.library-row {
  padding: 0.68rem;
}

.student-card .entity-avatar,
.student-profile-hero .entity-avatar,
.contract-card .entity-avatar,
.finance-record-card .entity-avatar,
.diet-plan-head .entity-avatar,
.update-card .entity-avatar {
  width: 3.55rem;
  height: 3.55rem;
  font-size: 1rem;
}

.student-card-main > strong,
.pattern-card-title strong,
.contract-card-main strong,
.diet-plan-title strong,
.update-card-head strong {
  font-size: clamp(1rem, 3.6vw, 1.22rem);
  line-height: 1.08;
}

.student-card-info,
.pattern-info-grid,
.diet-plan-grid,
.student-profile-hero .student-hero-details {
  gap: 0.5rem;
}

.student-card-info article,
.pattern-info-grid article,
.diet-plan-grid article,
.student-profile-hero .student-hero-details article {
  min-width: 0;
}

.student-card-actions,
.pattern-card-actions,
.diet-plan-actions,
.contract-card-actions,
.finance-record-actions {
  gap: 0.5rem;
}

.student-card-actions .secondary-action,
.pattern-card-actions .secondary-action,
.pattern-card-actions .primary-action,
.diet-primary-action,
.diet-secondary-action,
.contract-primary-action,
.finance-primary-action,
.finance-secondary-action {
  min-height: 2.28rem;
  font-size: 0.76rem;
}

.student-profile-hero {
  padding: 0.78rem;
  border-radius: 0.92rem;
}

.student-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-profile-tabs {
  min-height: 2.65rem;
  padding: 0.24rem;
  border-radius: 0.78rem;
}

.student-profile-tabs button {
  min-height: 2.1rem;
  padding-inline: 0.6rem;
  font-size: 0.74rem;
}

.profile-tab-panel {
  gap: 0.65rem;
}

.agenda-view-tabs {
  min-height: 2.7rem;
}

.agenda-view-tabs button {
  min-height: 2.45rem;
  font-size: 0.86rem;
}

.agenda-period-nav {
  min-height: 2.85rem;
  border-radius: 0.78rem;
}

.agenda-week-board {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.agenda-week-grid {
  min-width: 46rem;
}

.agenda-week-day,
.agenda-hour-label,
.agenda-week-slot {
  min-height: 2.7rem;
}

.agenda-event {
  padding: 0.28rem;
  border-radius: 0.42rem;
  font-size: 0.66rem;
  line-height: 1.12;
}

.agenda-list .agenda-item,
.agenda-item {
  min-height: 3.35rem;
  padding: 0.48rem 0.55rem;
}

.update-card {
  gap: 0.62rem;
}

.update-photo-grid {
  gap: 0.5rem;
}

.update-photo-frame {
  min-height: 5.4rem;
  border-radius: 0.72rem;
}

.finance-month-panel {
  gap: 0.62rem;
}

.finance-record-card {
  min-height: 3.7rem;
}

#managerBottomNav,
#studentBottomNav,
.bottom-nav {
  left: max(0.72rem, env(safe-area-inset-left, 0px));
  right: max(0.72rem, env(safe-area-inset-right, 0px));
  bottom: calc(0.58rem + var(--safe-bottom));
  height: 4.8rem;
  max-width: 55rem;
  margin-inline: auto;
  padding: 0.3rem;
  border-radius: 1rem;
  grid-auto-flow: initial;
  grid-auto-columns: initial;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

.nav-button {
  min-width: 0;
  min-height: 4.05rem;
  padding: 0.28rem 0.2rem;
  border-radius: 0.85rem;
  font-size: 0.7rem;
  gap: 0.22rem;
}

.nav-button svg {
  width: 1.42rem;
  height: 1.42rem;
}

.nav-button.is-active {
  box-shadow: none;
}

@media (min-width: 58rem) {
  .dashboard-main-grid,
  .profile-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-month-panel {
    grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.65fr);
  }
}

@media (max-width: 57.99rem) {
  .content-stack,
  .students-workspace,
  .student-page,
  .agenda-workspace,
  .patterns-workspace,
  .updates-workspace,
  .contracts-workspace,
  .finance-workspace,
  .diet-workspace {
    gap: 0.58rem !important;
  }

  .manager-workspace .workspace-layout,
  .student-workspace .workspace-layout {
    padding: 0.62rem 0.62rem calc(0.9rem + var(--safe-bottom));
  }

  .manager-header,
  .student-header {
    min-height: 4.1rem;
    padding-inline: 0.68rem;
  }

  .manager-header .brand-logo,
  .student-header .brand-logo {
    width: 3.55rem;
    height: 2.15rem;
  }

  .manager-header .brand-inline h2,
  .student-header .brand-inline h2 {
    font-size: clamp(1.05rem, 5.2vw, 1.34rem);
  }

  .manager-header .avatar-button,
  .student-header .avatar-button {
    width: 2.22rem;
    height: 2.22rem;
  }

  .page-head,
  .dashboard-hero,
  .students-hero,
  .student-profile-topbar,
  .agenda-hero,
  .patterns-hero,
  .updates-hero,
  .contracts-hero,
  .finance-hero,
  .diet-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.48rem;
  }

  .page-actions,
  .page-head .page-actions,
  .dashboard-hero .primary-action,
  .students-hero .primary-action,
  .student-profile-top-actions,
  .agenda-hero .primary-action,
  .patterns-hero .primary-action,
  .finance-hero .primary-action,
  .diet-hero .primary-action {
    width: 100%;
  }

  .page-head h3,
  .dashboard-hero h3,
  .students-hero h3,
  .student-profile-topbar h3,
  .agenda-hero h3,
  .patterns-hero h3,
  .updates-hero h3,
  .contracts-hero h3,
  .finance-hero h3,
  .diet-hero h3 {
    font-size: clamp(1.44rem, 7.6vw, 1.95rem);
  }

  .dashboard-metrics,
  .patterns-summary-grid,
  .updates-summary-grid,
  .contracts-summary-grid,
  .finance-summary-grid,
  .diet-summary-grid,
  .student-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.42rem;
  }

  .dashboard-metrics .dashboard-metric:nth-child(n) {
    grid-column: auto;
  }

  .dashboard-metric,
  .pattern-summary-card,
  .update-summary-card,
  .contract-summary-card,
  .finance-summary-card,
  .diet-summary-card,
  .student-summary-card,
  .profile-card {
    min-height: 4.72rem;
    padding: 0.5rem;
  }

  .dashboard-metric .metric-icon,
  .pattern-summary-icon,
  .update-summary-icon,
  .contract-summary-icon,
  .finance-summary-icon,
  .diet-summary-icon,
  .profile-card-icon {
    width: 1.36rem;
    height: 1.36rem;
  }

  .dashboard-metric .metric-icon svg,
  .pattern-summary-icon svg,
  .update-summary-icon svg,
  .contract-summary-icon svg,
  .finance-summary-icon svg,
  .diet-summary-icon svg,
  .profile-card-icon svg {
    width: 1rem;
    height: 1rem;
  }

  .dashboard-metric strong,
  .pattern-summary-card strong,
  .update-summary-card strong,
  .contract-summary-card strong,
  .finance-summary-card strong,
  .diet-summary-card strong,
  .profile-card strong {
    font-size: clamp(1.18rem, 6.6vw, 1.58rem);
  }

  .dashboard-metric small,
  .pattern-summary-card small,
  .update-summary-card small,
  .contract-summary-card small,
  .finance-summary-card small,
  .diet-summary-card small,
  .profile-card small {
    font-size: 0.58rem;
  }

  .student-filter-grid,
  .pattern-filter-grid,
  .update-filter-grid,
  .diet-plan-grid,
  .student-card-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-toolbar,
  .diet-toolbar,
  .patterns-toolbar {
    grid-template-columns: 1fr;
  }

  .student-card,
  .pattern-card,
  .update-card,
  .contract-card,
  .finance-record-card,
  .diet-plan-card,
  .library-row {
    padding: 0.58rem;
  }

  .student-card .entity-avatar,
  .student-profile-hero .entity-avatar,
  .contract-card .entity-avatar,
  .finance-record-card .entity-avatar,
  .diet-plan-head .entity-avatar,
  .update-card .entity-avatar {
    width: 3rem;
    height: 3rem;
  }

  .student-card-actions,
  .pattern-card-actions,
  .diet-plan-actions,
  .contract-card-actions,
  .finance-record-actions {
    grid-template-columns: 1fr 1fr;
  }

  .weekly-bars {
    min-height: 3.35rem;
  }

  .weekly-bar {
    height: 2.9rem;
  }
}

@media (max-width: 28rem) {
  .manager-workspace .workspace-layout,
  .student-workspace .workspace-layout {
    padding-inline: 0.5rem;
  }

  .student-filter-grid,
  .pattern-filter-grid,
  .update-filter-grid,
  .diet-plan-grid,
  .student-card-info,
  .diet-plan-actions,
  .student-card-actions,
  .pattern-card-actions,
  .contract-card-actions,
  .finance-record-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics,
  .patterns-summary-grid,
  .updates-summary-grid,
  .contracts-summary-grid,
  .finance-summary-grid,
  .diet-summary-grid,
  .student-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .nav-button {
    font-size: 0.62rem;
  }

  .nav-button svg {
    width: 1.22rem;
    height: 1.22rem;
  }
}

/* Dashboard premium refactor v41 */
:root {
  --elite-bg: #050505;
  --elite-surface: rgba(255, 255, 255, 0.055);
  --elite-border: rgba(255, 255, 255, 0.105);
  --elite-gold: #f5b82e;
  --elite-gold-2: #dfa72b;
  --elite-gold-3: #ffc84b;
  --elite-ink: #f4f1ea;
  --elite-muted: #aaa49a;
  --bottom-nav-height: 4.55rem;
}

.manager-workspace {
  /* Fundo sólido, sem a faixa/vinco diagonal no canto superior esquerdo. */
  background: var(--elite-bg) !important;
}

.manager-header {
  min-height: 5.85rem !important;
  padding: 1.05rem clamp(1rem, 4vw, 2rem) 0.95rem !important;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.07) 0 30%, transparent 30%),
    rgba(2, 2, 2, 0.96) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
}

.manager-header .menu-trigger {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  color: var(--elite-ink);
}

.manager-header .brand-inline {
  gap: 0.72rem;
  min-width: 0;
}

.manager-header .brand-logo-wordmark {
  width: clamp(4.9rem, 19vw, 6.8rem) !important;
  height: clamp(2.4rem, 9vw, 3.1rem) !important;
  object-fit: contain;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.manager-header .brand-inline h2 {
  color: #f7f4ed;
  font-size: clamp(1.35rem, 5vw, 1.85rem) !important;
  font-weight: 780;
  line-height: 1;
}

.manager-header .manager-subtitle {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
  margin-top: 0.18rem;
  color: var(--elite-gold) !important;
  font-size: 0.72rem !important;
  font-weight: 850;
  letter-spacing: 0.12em !important;
}

.manager-header .manager-subtitle strong {
  color: rgba(247, 244, 237, 0.72);
  font-weight: 760;
  letter-spacing: 0.02em;
}

.manager-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), 0.18);
  border: 1px solid rgba(var(--brand-rgb), 0.45);
  color: var(--brand);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  margin-top: 0.15rem;
}

.student-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), 0.18);
  border: 1px solid rgba(var(--brand-rgb), 0.45);
  color: var(--brand);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  margin-top: 0.15rem;
}

.manager-header .header-actions {
  gap: 0.52rem;
}

.manager-header .header-actions .pill-button {
  display: none !important;
}

.manager-header .notification-button {
  position: relative;
  width: 2.45rem;
  height: 2.45rem;
  color: #f7f4ed;
}

.manager-header .notification-button::after {
  content: "";
  position: absolute;
  top: 0.54rem;
  right: 0.54rem;
  width: 0.54rem;
  height: 0.54rem;
  border-radius: 999px;
  background: var(--elite-gold);
  box-shadow: none;
}

.manager-header .avatar-button {
  width: 2.85rem !important;
  height: 2.85rem !important;
  border: 1px solid rgba(var(--brand-rgb), 0.72) !important;
  color: #ffd567;
  font-weight: 860;
}

.dashboard-home {
  max-width: 54.5rem !important;
  gap: 0.78rem !important;
  padding-bottom: calc(var(--bottom-nav-height) + 1.65rem + var(--safe-bottom));
}

.dashboard-hero {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 0.8rem !important;
  padding-top: 0.2rem !important;
}

/* Topo do Dashboard (gestor).
   [A3] AS REGRAS DE GRADE SAIRAM DAQUI. Elas descreviam o cabecalho ANTIGO,
   em que h3, botao e data eram tres filhos soltos de um grid de duas
   colunas: o h3 na celula 1x1, o botao na 2x1 e a data atravessando as
   duas na linha 2. O [8.2] embrulhou titulo e data num bloco de texto e o
   [A3] poe o botao embaixo no celular — e as coordenadas velhas, ja sem
   sentido, continuavam mandando: o `align-self: center` do botao era o que
   o deixava centrado em vez de largura total, e o `align-items` empurrava o
   bloco de texto para a direita, que e o deslocamento que voce viu. */
.dashboard-hero--top {
  column-gap: 0.7rem !important;
  row-gap: 0.22rem !important;
}

/* A data NAO E CORTADA. A regra antiga a mantinha em uma linha com
   reticencias — e era assim que "Sabado, 12 de setembro de 2026" perdia o
   fim em nomes de mes longos. Se nao couber, quebra. */
.dashboard-hero--top p {
  max-width: none !important;
}

.dashboard-hero .eyebrow {
  color: var(--elite-gold);
  font-size: 0.72rem;
  font-weight: 880;
  letter-spacing: 0.13em;
}

.dashboard-hero h3 {
  margin-top: 0.34rem !important;
  color: var(--elite-ink);
  font-size: clamp(1.95rem, 8vw, 2.72rem) !important;
  font-weight: 820 !important;
  line-height: 0.98 !important;
}

.dashboard-hero p {
  max-width: 30rem;
  color: rgba(244, 241, 234, 0.68) !important;
  font-size: clamp(0.86rem, 3vw, 1rem) !important;
}

.dashboard-hero .primary-action {
  min-height: 3rem !important;
  padding: 0.66rem 1.05rem !important;
  border-radius: 0.84rem !important;
  font-size: 0.9rem !important;
  font-weight: 830;
  white-space: nowrap;
  background: var(--brand) !important;
  box-shadow: none !important;
}

.dashboard-hero .primary-action svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.25;
}

.dashboard-metrics {
  gap: 0.62rem !important;
}

.dashboard-metric {
  position: relative;
  isolation: isolate;
  min-height: 6.1rem !important;
  padding: 0.7rem 0.72rem 0.68rem !important;
  border: 1px solid var(--borda) !important;
  border-radius: 1rem !important;
  background: var(--card) !important;
}

.dashboard-metric::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), 0.055);
}

.dashboard-metric .metric-icon {
  width: 1.45rem !important;
  height: 1.45rem !important;
  margin-bottom: 0.28rem;
  color: var(--elite-gold);
}

.dashboard-metric .metric-icon svg {
  width: 1.12rem !important;
  height: 1.12rem !important;
}

.dashboard-metric .metric-label {
  color: rgba(244, 241, 234, 0.73) !important;
  font-size: 0.72rem !important;
  font-weight: 770 !important;
  line-height: 1.15 !important;
}

.dashboard-metric strong {
  margin-top: 0.18rem;
  color: #fffaf1;
  font-size: clamp(1.62rem, 7vw, 2.05rem) !important;
  font-weight: 840;
  line-height: 0.95 !important;
}

.dashboard-metric small {
  margin-top: 0.2rem;
  color: rgba(244, 241, 234, 0.58) !important;
  font-size: 0.66rem !important;
  line-height: 1.16 !important;
}

.dashboard-metric.is-success .metric-icon,
.dashboard-metric.is-success small {
  color: #45d66b !important;
}

.dashboard-metric.is-warning small {
  color: #ffbf3f !important;
}

.dashboard-panel {
  padding: 0.72rem !important;
  border-radius: 0.92rem !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.018)),
    rgba(9, 9, 9, 0.92) !important;
}

.dashboard-panel .section-title {
  margin-bottom: 0.54rem;
}

.dashboard-panel .section-title h3 {
  font-size: clamp(1.02rem, 4vw, 1.28rem) !important;
  font-weight: 760 !important;
}

.dashboard-panel .section-title .small-text {
  font-size: 0.68rem !important;
}

.dashboard-pending-list,
.dashboard-agenda-list {
  gap: 0.44rem !important;
}

.dashboard-pending-item {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.54rem !important;
  align-items: center !important;
  min-height: 3.75rem !important;
  padding: 0.52rem !important;
  border-radius: 0.76rem !important;
}

/* [40.3 A] 34px tambem aqui. */
.dashboard-pending-icon {
  width: 34px !important;
  height: 34px !important;
}

.dashboard-pending-icon svg {
  width: 16px !important;
  height: 16px !important;
}

.dashboard-pending-item .entity-main strong {
  font-size: 0.82rem !important;
  line-height: 1.15 !important;
}

.dashboard-pending-item .entity-main span,
.dashboard-pending-item .entity-main small {
  font-size: 0.68rem !important;
  line-height: 1.18 !important;
}

.dashboard-pending-actions {
  display: flex;
  gap: 0.34rem !important;
  align-items: center;
}

.dashboard-pending-actions .mini-button,
.dashboard-pending-actions .badge {
  min-height: 1.7rem !important;
  padding: 0.25rem 0.46rem !important;
  font-size: 0.62rem !important;
}

.dashboard-main-grid {
  gap: 0.7rem !important;
}

.dashboard-agenda-item {
  grid-template-columns: 3.1rem minmax(0, 1fr) auto !important;
  min-height: 3.2rem !important;
  padding: 0.48rem 0.52rem !important;
  gap: 0.48rem !important;
}

.dashboard-agenda-time {
  color: var(--elite-gold) !important;
  font-size: 0.8rem !important;
  font-weight: 820 !important;
}

.dashboard-agenda-main strong {
  font-size: 0.8rem !important;
  line-height: 1.14 !important;
}

.dashboard-agenda-main span,
.dashboard-agenda-main small {
  font-size: 0.66rem !important;
  line-height: 1.16 !important;
}

.dashboard-agenda-main small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.dashboard-agenda-status {
  display: none !important;
}

#managerBottomNav,
#studentBottomNav,
.bottom-nav {
  bottom: calc(0.6rem + var(--safe-bottom)) !important;
  height: var(--bottom-nav-height) !important;
  padding: 0.26rem !important;
  border-radius: 1rem !important;
}

.nav-button {
  min-height: 3.72rem !important;
  border-radius: 0.84rem !important;
  font-size: 0.67rem !important;
}

.nav-button svg {
  width: 1.28rem !important;
  height: 1.28rem !important;
}

.nav-button.is-active {
  background:
    rgba(var(--brand-rgb), 0.075) !important;
}

@media (max-width: 32.5rem) {
  .manager-workspace .workspace-layout {
    padding: 0.62rem 0.64rem calc(var(--bottom-nav-height) + 1.15rem + var(--safe-bottom)) !important;
  }

  .manager-header {
    min-height: 5.15rem !important;
    padding: 0.78rem 0.72rem 0.72rem !important;
  }

  .manager-header .menu-trigger,
  .manager-header .notification-button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .manager-header .brand-inline {
    gap: 0.5rem;
  }

  .manager-header .brand-logo-wordmark {
    width: clamp(4.3rem, 20vw, 5.4rem) !important;
    height: 2.3rem !important;
  }

  .manager-header .brand-inline h2 {
    font-size: clamp(1.12rem, 5vw, 1.42rem) !important;
  }

  .manager-header .manager-subtitle {
    font-size: 0.61rem !important;
    letter-spacing: 0.1em !important;
  }

  .manager-header .avatar-button {
    width: 2.28rem !important;
    height: 2.28rem !important;
    font-size: 0.78rem;
  }

  .dashboard-hero {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
  }

  /* [A3] NO CELULAR O BOTAO DESCE. A regra anterior dizia o contrario —
     "mantem saudacao + botao na mesma linha" — e forcava `width: auto` com
     `!important`, o que impedia a largura total que o [8.2] mandava. A
     decisao mudou: saudacao e data em cima, botao inteiro embaixo. */
  .dashboard-hero--top {
    column-gap: 0.6rem !important;
    row-gap: 0.2rem !important;
  }

  .dashboard-hero--top h3 {
    font-size: clamp(1.55rem, 8vw, 2.1rem) !important;
  }

  .dashboard-hero--top .btn-action-header {
    min-height: 2.6rem;
    padding: 0 0.85rem;
    font-size: 0.82rem;
  }

  .dashboard-hero--top p {
    font-size: clamp(0.78rem, 3.4vw, 0.92rem) !important;
  }

  .dashboard-hero h3 {
    font-size: clamp(1.92rem, 10vw, 2.38rem) !important;
  }

  .dashboard-hero .primary-action {
    width: 100%;
    min-height: 2.92rem !important;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-metric {
    min-height: 5.9rem !important;
    padding: 0.66rem !important;
  }

  .dashboard-metric:nth-child(n) {
    grid-column: auto !important;
  }

  .dashboard-pending-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-pending-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .dashboard-agenda-item {
    grid-template-columns: 3rem minmax(0, 1fr) auto !important;
  }

  .dashboard-agenda-actions .mini-button {
    min-width: 0;
    padding-inline: 0.46rem !important;
  }

  #managerBottomNav,
  #studentBottomNav,
  .bottom-nav {
    right: max(0.74rem, env(safe-area-inset-right, 0px)) !important;
    left: max(0.74rem, env(safe-area-inset-left, 0px)) !important;
    height: 4.42rem !important;
  }

  .nav-button {
    min-height: 3.58rem !important;
    font-size: 0.62rem !important;
  }
}

@media (min-width: 58rem) {
  .dashboard-home {
    padding-top: 0.35rem;
  }

  .dashboard-hero {
    padding-top: 0.35rem !important;
  }

  .dashboard-metric {
    min-height: 6.65rem !important;
  }

  .dashboard-main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Dashboard density tune v42 */
:root {
  --bottom-nav-height: 4.22rem;
}

.dashboard-home {
  gap: 0.62rem !important;
  padding-bottom: calc(var(--bottom-nav-height) + 1.05rem + var(--safe-bottom)) !important;
}

.dashboard-hero {
  gap: 0.68rem !important;
}

.dashboard-hero .eyebrow {
  text-transform: uppercase;
}

.dashboard-hero h3 {
  margin-top: 0.22rem !important;
  font-size: clamp(1.82rem, 7.3vw, 2.42rem) !important;
}

.dashboard-hero p {
  margin-top: 0.28rem !important;
  font-size: clamp(0.78rem, 2.7vw, 0.95rem) !important;
  line-height: 1.25 !important;
}

.dashboard-hero .primary-action {
  min-height: 2.62rem !important;
  padding: 0.55rem 0.88rem !important;
  border-radius: 0.78rem !important;
  font-size: 0.8rem !important;
}

.dashboard-metrics {
  gap: 0.5rem !important;
}

.dashboard-metric {
  min-height: 5.12rem !important;
  padding: 0.5rem 0.54rem 0.48rem !important;
  border-radius: 0.76rem !important;
}

.dashboard-metric::after {
  width: 2.25rem;
  height: 2.25rem;
}

.dashboard-metric .metric-icon {
  width: 1.16rem !important;
  height: 1.16rem !important;
  margin-bottom: 0.16rem !important;
}

.dashboard-metric .metric-icon svg {
  width: 0.94rem !important;
  height: 0.94rem !important;
}

.dashboard-metric .metric-label {
  font-size: 0.63rem !important;
  line-height: 1.1 !important;
}

.dashboard-metric strong {
  margin-top: 0.12rem !important;
  font-size: clamp(1.34rem, 6.1vw, 1.82rem) !important;
}

.dashboard-metric small {
  margin-top: 0.14rem !important;
  font-size: 0.58rem !important;
  line-height: 1.1 !important;
}

.dashboard-panel {
  padding: 0.56rem !important;
  border-radius: 0.82rem !important;
}

.dashboard-panel .section-title {
  margin-bottom: 0.36rem !important;
  gap: 0.5rem !important;
}

.dashboard-panel .section-title h3 {
  font-size: clamp(0.94rem, 3.6vw, 1.14rem) !important;
  line-height: 1.1 !important;
}

.dashboard-panel .section-title .small-text {
  font-size: 0.6rem !important;
  line-height: 1.14 !important;
}

.dashboard-pending-list,
.dashboard-agenda-list {
  gap: 0.32rem !important;
}

.dashboard-pending-item {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  min-height: 3.02rem !important;
  padding: 0.36rem !important;
  gap: 0.42rem !important;
  border-radius: 0.66rem !important;
}

/* [40.3 A] 34px tambem aqui. */
.dashboard-pending-icon {
  width: 34px !important;
  height: 34px !important;
}

.dashboard-pending-icon svg {
  width: 16px !important;
  height: 16px !important;
}

.dashboard-pending-item .entity-main {
  min-width: 0;
}

.dashboard-pending-item .entity-main strong {
  font-size: 0.72rem !important;
  line-height: 1.08 !important;
}

.dashboard-pending-item .entity-main span,
.dashboard-pending-item .entity-main small {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.59rem !important;
  line-height: 1.08 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.dashboard-pending-actions {
  grid-column: auto !important;
  justify-content: flex-end !important;
  align-self: center;
  flex-wrap: nowrap;
}

.dashboard-pending-actions .mini-button {
  min-height: 1.42rem !important;
  max-width: 5.9rem;
  padding: 0.18rem 0.36rem !important;
  overflow: hidden;
  font-size: 0.55rem !important;
  line-height: 1 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* [21.4] O selo de prioridade sem teto de largura — ver base.css. */
.dashboard-pending-actions .badge {
  min-height: 1.42rem !important;
  padding: 0.18rem 0.36rem !important;
  font-size: 0.55rem !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.dashboard-main-grid {
  gap: 0.56rem !important;
}

.dashboard-agenda-item {
  min-height: 2.78rem !important;
  padding: 0.36rem 0.42rem !important;
  border-radius: 0.64rem !important;
  grid-template-columns: 2.78rem minmax(0, 1fr) auto !important;
}

.dashboard-agenda-time {
  font-size: 0.72rem !important;
}

.dashboard-agenda-main strong {
  font-size: 0.72rem !important;
}

.dashboard-agenda-main span,
.dashboard-agenda-main small {
  font-size: 0.58rem !important;
}

.dashboard-agenda-actions .mini-button {
  min-height: 1.86rem !important;
  padding: 0.25rem 0.48rem !important;
  font-size: 0.62rem !important;
}

#managerBottomNav,
#studentBottomNav,
.bottom-nav {
  height: var(--bottom-nav-height) !important;
  border-radius: 0.86rem !important;
}

.nav-button {
  min-height: 3.24rem !important;
  border-radius: 0.72rem !important;
  font-size: 0.58rem !important;
}

.nav-button svg {
  width: 1.08rem !important;
  height: 1.08rem !important;
}

@media (max-width: 32.5rem) {
  .manager-workspace .workspace-layout {
    padding: 0.54rem 0.55rem calc(var(--bottom-nav-height) + 0.82rem + var(--safe-bottom)) !important;
  }

  .manager-header {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    min-height: 4.92rem !important;
  }

  .manager-header .header-actions {
    display: flex !important;
    gap: 0.32rem !important;
  }

  .manager-header .notification-button {
    display: grid !important;
    width: 2.12rem !important;
    height: 2.12rem !important;
  }

  .manager-header .notification-button::after {
    top: 0.38rem !important;
    right: 0.38rem !important;
    width: 0.42rem !important;
    height: 0.42rem !important;
  }

  .manager-header .avatar-button {
    width: 2.22rem !important;
    height: 2.22rem !important;
  }

  .manager-header .brand-logo-wordmark {
    width: clamp(4.35rem, 18vw, 5rem) !important;
  }

  .dashboard-hero {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: end !important;
    gap: 0.5rem !important;
  }

  .dashboard-hero .primary-action {
    width: auto !important;
    min-width: 9.2rem;
    min-height: 2.48rem !important;
    padding-inline: 0.68rem !important;
  }

  .dashboard-hero .primary-action span {
    display: inline;
  }

  .dashboard-pending-actions {
    grid-column: auto !important;
  }

  #managerBottomNav,
  #studentBottomNav,
  .bottom-nav {
    height: 4.08rem !important;
    bottom: calc(0.46rem + var(--safe-bottom)) !important;
  }

  .nav-button {
    min-height: 3.12rem !important;
    font-size: 0.56rem !important;
  }
}

@media (max-width: 23rem) {
  .dashboard-hero {
    grid-template-columns: 1fr !important;
  }

  .dashboard-hero .primary-action {
    width: 100% !important;
  }
}

@media (min-width: 46rem) {
  .dashboard-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .dashboard-metrics .dashboard-metric:nth-child(-n + 3) {
    grid-column: span 2 !important;
  }

  .dashboard-metrics .dashboard-metric:nth-child(n + 4) {
    grid-column: span 3 !important;
  }

  .dashboard-main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .dashboard-home {
    gap: 0.7rem !important;
  }
}

/* Agenda premium refactor v45 */
.agenda-workspace {
  width: 100%;
  max-width: 55.5rem;
  gap: 0.64rem !important;
  padding-bottom: calc(var(--bottom-nav-height) + 2rem + var(--safe-bottom)) !important;
  overflow-x: clip;
}

.agenda-hero {
  align-items: end !important;
  gap: 0.72rem !important;
}

.agenda-hero h3 {
  font-size: clamp(1.84rem, 7.2vw, 2.55rem) !important;
  font-weight: 820 !important;
}

.agenda-hero p {
  font-size: clamp(0.84rem, 2.7vw, 1rem) !important;
}

.agenda-hero .primary-action {
  min-height: 2.84rem !important;
  min-width: 11.1rem !important;
  padding: 0.58rem 0.9rem !important;
  border-radius: 0.86rem !important;
  font-size: 0.88rem !important;
  box-shadow: none !important;
}

.agenda-control-panel {
  gap: 0.52rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.agenda-view-tabs {
  min-height: 2.64rem !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.78rem !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.018)),
    rgba(8, 8, 8, 0.78) !important;
}

.agenda-view-tabs button {
  min-height: 2.58rem !important;
  color: rgba(247, 244, 235, 0.58) !important;
  font-size: 0.88rem !important;
  font-weight: 780 !important;
}

.agenda-view-tabs button.is-active {
  color: var(--elite-gold-3, #ffc84b) !important;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.13), rgba(var(--brand-rgb), 0.025)) !important;
  box-shadow: inset 0 -2px 0 var(--elite-gold, #f5b82e) !important;
}

.agenda-period-nav {
  display: grid !important;
  grid-template-columns: 2.48rem minmax(0, 1fr) 2.48rem auto !important;
  gap: 0.42rem !important;
  min-height: 2.62rem !important;
}

.agenda-period-nav .icon-button,
.agenda-period-label,
.agenda-today-button {
  min-height: 2.42rem !important;
  border-radius: 0.72rem !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(8, 8, 8, 0.78) !important;
}

.agenda-period-nav .icon-button {
  width: 2.48rem !important;
  padding: 0 !important;
}

.agenda-period-label {
  gap: 0.42rem !important;
  padding-inline: 0.54rem !important;
}

.agenda-period-label strong {
  color: rgba(247, 244, 235, 0.74) !important;
  font-size: clamp(0.76rem, 2.55vw, 0.95rem) !important;
  font-weight: 730 !important;
}

.agenda-today-button {
  padding-inline: 0.62rem !important;
  color: var(--elite-gold, #f5b82e) !important;
}

.agenda-calendar-panel,
.agenda-day-panel {
  padding: 0.62rem !important;
  border-radius: 0.92rem !important;
}

.agenda-calendar-panel > .section-title {
  display: none !important;
}

.calendar-board,
.agenda-week-board,
.agenda-month-board {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  border-color: rgba(255, 255, 255, 0.095) !important;
  background: rgba(0, 0, 0, 0.22) !important;
}

.agenda-week-grid {
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: clamp(2.15rem, 8vw, 3rem) repeat(7, minmax(0, 1fr)) !important;
}

/* ─── ELITE HEADER v3 ──────────────────────────────────── */

.manager-header,
.student-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.75rem !important;
  position: relative !important;
  min-height: calc(5rem + env(safe-area-inset-top, 0px)) !important;
  padding: max(0.75rem, env(safe-area-inset-top, 0px)) clamp(0.85rem, 3.5vw, 1.75rem) 0.72rem !important;
  overflow: visible !important;
  /* Superficie PLANA: fundo solido (segue o tom escolhido), sem vidro/saturacao
     que amplificava o amarelo do conteudo por baixo. */
  background: var(--bg, #0D0D0D) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 10px 42px rgba(0, 0, 0, 0.72) !important;
}

/* Remove linha dourada do topo */
.manager-header::before,
.student-header::before {
  content: none !important;
}

/* Remove brilho interno */
.manager-header::after,
.student-header::after {
  content: none !important;
}

/* Logo */
.manager-header .brand-logo,
.student-header .brand-logo {
  width: 3.3rem !important;
  height: 3.3rem !important;
  border-radius: 0.65rem !important;
  /* Sem anel dourado fixo: tom da marca vem de --brand-soft (segue o tema). */
  box-shadow:
    0 0 0 1px var(--brand-soft),
    0 3px 12px rgba(0, 0, 0, 0.5) !important;
  flex-shrink: 0;
}

.manager-header .brand-inline,
.student-header .brand-inline {
  gap: 0.72rem !important;
  flex-shrink: 0 !important;
}

.manager-header .brand-inline h2,
.student-header .brand-inline h2 {
  color: #f4f1ea !important;
  font-size: clamp(1.1rem, 4vw, 1.55rem) !important;
  font-weight: 840 !important;
  letter-spacing: -0.025em !important;
  line-height: 1 !important;
}

/* Título movido para o corpo — oculto no header. (#studentTitle saiu do
   index no [48.5 f]: era escrito em cinco lugares e lido em nenhum.) */
#managerTitle {
  display: none !important;
}

/* Header-actions empurrado para a direita */
.manager-header .header-actions,
.student-header .header-actions {
  margin-left: auto !important;
  flex: 0 0 auto !important;
  width: auto !important;
}

/* Badges de role */
.manager-badge,
.student-badge {
  padding: 0.18rem 0.56rem !important;
  border-radius: 999px !important;
  /* Tom da marca sempre via --brand-soft (segue o tema), sem glow dourado fixo. */
  background: var(--brand-soft) !important;
  border: 1px solid var(--brand-soft) !important;
  color: var(--brand) !important;
  font-size: 0.57rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  box-shadow: none !important;
  margin-top: 0.18rem !important;
}

/* Avatar / foto de perfil — superficie PLANA (sem vidro nem anel dourado fixo).
   Fundo de card plano + borda sutil branca; a inicial usa --brand (segue o tema). */
.manager-header .avatar-button,
.student-header .avatar-button {
  width: 2.68rem !important;
  height: 2.68rem !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--brand) !important;
  font-weight: 870 !important;
  font-size: 0.8rem !important;
  background: var(--card, #1A1A1A) !important;
  box-shadow: none !important;
  transition: border-color 0.22s, background 0.22s !important;
  flex-shrink: 0 !important;
}

.manager-header .avatar-button:hover,
.student-header .avatar-button:hover {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: var(--brand-soft) !important;
  box-shadow: none !important;
}

.manager-header .avatar-button.has-photo,
.student-header .avatar-button.has-photo {
  padding: 0 !important;
  overflow: hidden !important;
}

.manager-header .avatar-button.has-photo img,
.student-header .avatar-button.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* Icon buttons */
.manager-header .icon-button,
.student-header .icon-button {
  color: rgba(244, 241, 234, 0.68) !important;
  transition: color 0.18s, background 0.18s !important;
}

.manager-header .icon-button:hover,
.student-header .icon-button:hover {
  color: #f4f1ea !important;
  background: var(--brand-soft) !important;
}

.manager-header .header-actions,
.student-header .header-actions {
  gap: 0.46rem !important;
  flex-shrink: 0 !important;
}

.manager-header .notification-button,
.student-header .notification-button {
  width: 2.4rem !important;
  height: 2.4rem !important;
}

/* Mobile: mantem nome Elite AS + badge ALUNO visiveis numa unica linha
   (fiel ao prototipo). Reduz gaps e tamanhos para tudo caber sem quebrar. */
@media (max-width: 479px) {
  .manager-header,
  .student-header {
    gap: 0.5rem !important;
    padding-left: clamp(0.7rem, 3vw, 1rem) !important;
    padding-right: clamp(0.7rem, 3vw, 1rem) !important;
  }
  .manager-header .brand-inline div,
  .student-header .brand-inline div {
    display: block !important;
  }
  .manager-header .brand-inline h2,
  .student-header .brand-inline h2 {
    font-size: 1rem !important;
  }
  .manager-header .brand-logo,
  .student-header .brand-logo {
    width: 2.8rem !important;
    height: 2.8rem !important;
  }
  .manager-header .header-actions,
  .student-header .header-actions {
    gap: 0.32rem !important;
  }
  .manager-header .avatar-button,
  .student-header .avatar-button {
    width: 2.3rem !important;
    height: 2.3rem !important;
  }
  .manager-header .notification-button,
  .student-header .notification-button,
  .manager-header .icon-button,
  .student-header .icon-button {
    width: 2.15rem !important;
    height: 2.15rem !important;
  }
}

.agenda-week-day {
  min-width: 0 !important;
  min-height: 2.62rem !important;
  padding: 0.22rem 0.08rem !important;
}

.agenda-week-day strong {
  font-size: clamp(0.58rem, 2.1vw, 0.78rem) !important;
  letter-spacing: 0 !important;
}

.agenda-week-day span {
  color: rgba(247, 244, 235, 0.58) !important;
  font-size: clamp(0.54rem, 1.9vw, 0.68rem) !important;
}

.agenda-week-day.is-selected {
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.12), rgba(var(--brand-rgb), 0.02)) !important;
}

.agenda-hour-label,
.agenda-week-slot {
  min-height: clamp(2.54rem, 10.2vw, 3.35rem) !important;
}

.agenda-hour-label {
  padding-top: 0.3rem !important;
  font-size: clamp(0.52rem, 1.95vw, 0.68rem) !important;
  font-weight: 700 !important;
}

.agenda-week-slot {
  gap: 0.16rem !important;
  padding: 0.18rem !important;
  min-width: 0 !important;
}

.day-event {
  min-width: 0 !important;
  min-height: 1.78rem !important;
  gap: 0.04rem !important;
  padding: 0.18rem 0.18rem 0.18rem 0.24rem !important;
  border-left-width: 0.16rem !important;
  border-radius: 0.34rem !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11) !important;
}

.day-event strong,
.day-event span {
  display: block;
  min-width: 0;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.day-event strong {
  font-size: clamp(0.48rem, 1.78vw, 0.64rem) !important;
  line-height: 1.02 !important;
  font-weight: 830 !important;
}

.day-event span {
  font-size: clamp(0.45rem, 1.65vw, 0.58rem) !important;
  line-height: 1.02 !important;
}

.day-event.is-more {
  min-height: 1.25rem !important;
  padding: 0.12rem 0.16rem !important;
  font-size: 0.5rem !important;
}

.month-view .calendar-head span {
  padding: 0.42rem 0.08rem !important;
  font-size: clamp(0.56rem, 2vw, 0.72rem) !important;
}

.month-view .calendar-head,
.month-view .calendar-grid {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.month-view .calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

.month-view .day-cell {
  min-height: clamp(3.35rem, 13vw, 5.4rem) !important;
  gap: 0.18rem !important;
  padding: 0.32rem 0.18rem !important;
  min-width: 0 !important;
  background: rgba(255, 255, 255, 0.022) !important;
}

.month-view .day-cell.is-outside {
  opacity: 0.42;
}

.month-view .day-cell.is-selected {
  background: rgba(var(--brand-rgb), 0.1) !important;
  box-shadow: none;
}

.day-select {
  min-height: 1.3rem !important;
  justify-self: center !important;
  font-size: 0.66rem !important;
}

.month-dots {
  justify-content: center;
  gap: 0.14rem !important;
}

.agenda-dot,
.agenda-type-dot {
  width: 0.42rem !important;
  height: 0.42rem !important;
}

.month-count {
  max-width: 100%;
  min-height: 1.18rem !important;
  padding-inline: 0.22rem !important;
  justify-self: center;
  font-size: 0.48rem !important;
  line-height: 1 !important;
}

.agenda-legend {
  margin-top: 0.48rem;
  gap: 0.34rem 0.58rem !important;
  font-size: 0.64rem !important;
}

.agenda-day-panel .section-title {
  margin-bottom: 0.5rem;
}

.agenda-day-panel .section-title h3 {
  font-size: clamp(1.05rem, 3.4vw, 1.32rem) !important;
}

.agenda-list {
  gap: 0.38rem !important;
}

.agenda-list .agenda-item,
.agenda-item {
  grid-template-columns: 2rem 0.42rem 2.72rem minmax(0, 1fr) auto auto !important;
  min-height: 3.08rem !important;
  gap: 0.38rem !important;
  padding: 0.4rem 0.44rem !important;
  border-radius: 0.76rem !important;
}

.agenda-avatar {
  width: 2rem !important;
  height: 2rem !important;
  font-size: 0.68rem !important;
}

.agenda-time {
  font-size: 0.82rem !important;
}

.agenda-main {
  gap: 0.02rem !important;
}

.agenda-main strong {
  font-size: 0.84rem !important;
  line-height: 1.1 !important;
}

.agenda-main span,
.agenda-main small,
.agenda-main .agenda-note {
  color: rgba(247, 244, 235, 0.62) !important;
  font-size: 0.66rem !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

.agenda-main .agenda-note {
  display: block;
}

.agenda-status .badge {
  min-height: 1.36rem !important;
  padding: 0.18rem 0.4rem !important;
  font-size: 0.58rem !important;
}

.agenda-item .row-actions {
  gap: 0.24rem !important;
}

.agenda-item .row-actions .mini-button,
.agenda-item .row-actions .whatsapp-button {
  min-height: 1.72rem !important;
  padding: 0.22rem 0.42rem !important;
  border-radius: 0.55rem !important;
  font-size: 0.58rem !important;
}

.agenda-item .whatsapp-button {
  min-width: 1.72rem !important;
}

/* RODADA 2R9 (R2) — A REGRA QUE FECHAVA O CASO: `hidden` aqui vale SO com o
   professor logado, e e por isso que a pagina crua do laboratorio (2R8)
   rolava e o app nao. Como todo `overflow-x: hidden`, ela propagava e virava
   overflow-y: auto — o body deixava de rolar como viewport e virava caixa de
   rolagem. `clip` contem igual, sem criar caixa. */
body.is-manager-view {
  overflow-x: clip;
}

@media (max-width: 57.99rem) {
  .agenda-hero {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: end !important;
  }

  .agenda-hero .primary-action {
    width: auto !important;
    min-width: 9.7rem !important;
    min-height: 2.5rem !important;
    padding-inline: 0.64rem !important;
  }

  .agenda-period-nav {
    grid-template-columns: 2.36rem minmax(0, 1fr) 2.36rem auto !important;
  }

  .agenda-today-button {
    grid-column: auto !important;
  }

  .agenda-list .agenda-item,
  .agenda-item {
    grid-template-columns: 1.9rem 0.38rem 2.54rem minmax(0, 1fr) auto !important;
  }

  .agenda-status {
    grid-column: auto !important;
    justify-content: flex-end !important;
  }

  .agenda-item .row-actions {
    grid-column: auto !important;
    display: flex !important;
  }

  .agenda-item .row-actions .mini-button {
    display: none;
  }

  .agenda-item .row-actions .whatsapp-button {
    display: inline-grid !important;
    width: 1.74rem !important;
    padding-inline: 0 !important;
  }
}

@media (max-width: 32.5rem) {
  .agenda-workspace {
    gap: 0.54rem !important;
    padding-bottom: calc(var(--bottom-nav-height) + 2.1rem + var(--safe-bottom)) !important;
  }

  .agenda-hero h3 {
    font-size: clamp(1.58rem, 7.3vw, 1.9rem) !important;
  }

  .agenda-hero p {
    font-size: 0.78rem !important;
  }

  .agenda-hero .primary-action {
    min-width: 8.8rem !important;
    font-size: 0.74rem !important;
  }

  .agenda-hero .primary-action svg {
    width: 0.92rem !important;
    height: 0.92rem !important;
  }

  .agenda-view-tabs {
    min-height: 2.42rem !important;
  }

  .agenda-view-tabs button {
    min-height: 2.34rem !important;
    font-size: 0.78rem !important;
  }

  .agenda-period-nav {
    grid-template-columns: 2.18rem minmax(0, 1fr) 2.18rem auto !important;
    gap: 0.3rem !important;
  }

  .agenda-period-nav .icon-button {
    width: 2.18rem !important;
  }

  .agenda-period-label,
  .agenda-period-nav .icon-button,
  .agenda-today-button {
    min-height: 2.18rem !important;
  }

  .agenda-period-label svg {
    width: 0.82rem !important;
    height: 0.82rem !important;
  }

  .agenda-period-label strong {
    font-size: 0.66rem !important;
  }

  .agenda-today-button {
    padding-inline: 0.44rem !important;
    font-size: 0.58rem !important;
  }

  .agenda-calendar-panel,
  .agenda-day-panel {
    padding: 0.48rem !important;
  }

  .agenda-week-grid {
    grid-template-columns: 1.92rem repeat(7, minmax(0, 1fr)) !important;
  }

  .agenda-week-day {
    min-height: 2.26rem !important;
  }

  .agenda-hour-label,
  .agenda-week-slot {
    min-height: 2.34rem !important;
  }

  .agenda-week-slot {
    padding: 0.12rem !important;
  }

  .day-event {
    min-height: 1.48rem !important;
    padding: 0.14rem 0.12rem 0.14rem 0.18rem !important;
  }

  .day-event strong {
    font-size: 0.43rem !important;
  }

  .day-event span {
    font-size: 0.4rem !important;
  }

  .agenda-list .agenda-item,
  .agenda-item {
    grid-template-columns: 1.74rem 0.34rem 2.26rem minmax(0, 1fr) auto !important;
    min-height: 2.82rem !important;
    gap: 0.3rem !important;
    padding: 0.34rem !important;
  }

  .agenda-avatar {
    width: 1.74rem !important;
    height: 1.74rem !important;
    font-size: 0.6rem !important;
  }

  .agenda-time {
    font-size: 0.72rem !important;
  }

  .agenda-main strong {
    font-size: 0.74rem !important;
  }

  .agenda-main span,
  .agenda-main small,
  .agenda-main .agenda-note {
    font-size: 0.58rem !important;
  }

  .agenda-status .badge {
    max-width: 4.8rem;
    font-size: 0.5rem !important;
  }
}

@media (min-width: 58rem) {
  .agenda-hero .primary-action {
    width: auto !important;
  }

  .agenda-period-nav {
    grid-template-columns: 3rem minmax(0, 1fr) 3rem auto !important;
  }

  .agenda-week-grid {
    grid-template-columns: 3rem repeat(7, minmax(0, 1fr)) !important;
  }

  .agenda-hour-label,
  .agenda-week-slot {
    min-height: 3.35rem !important;
  }
}

@media (max-width: 57.99rem) {
  .agenda-item .row-actions {
    grid-column: 4 / -1 !important;
    justify-content: flex-start !important;
    margin-top: 0.12rem !important;
  }

  .agenda-item .row-actions .mini-button {
    display: inline-flex !important;
    min-height: 2.1rem !important;
    padding: 0.42rem 0.68rem !important;
    font-size: 0.74rem !important;
    line-height: 1 !important;
  }
}

/* Alunos premium refactor v46 */
.students-workspace {
  max-width: 54.5rem !important;
  margin-inline: auto !important;
  gap: 0.78rem !important;
  padding-bottom: calc(var(--bottom-nav-height) + 2.25rem + var(--safe-bottom)) !important;
  overflow-x: hidden !important;
}

.students-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: clamp(0.72rem, 3.2vw, 1.35rem) !important;
  padding-block: 0.22rem 0.18rem !important;
}

.students-hero .eyebrow {
  color: var(--brand-strong) !important;
  font-size: 0.66rem !important;
  letter-spacing: 0.11em !important;
  text-transform: uppercase !important;
}

.students-hero h3 {
  margin: 0.16rem 0 0 !important;
  color: var(--ink) !important;
  font-size: clamp(1.85rem, 7.1vw, 2.45rem) !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
}

.students-hero p {
  margin: 0.42rem 0 0 !important;
  color: rgba(247, 244, 235, 0.7) !important;
  font-size: clamp(0.82rem, 3.2vw, 0.98rem) !important;
  line-height: 1.25 !important;
}

.students-hero .primary-action {
  width: auto !important;
  min-width: 9.5rem !important;
  min-height: 2.78rem !important;
  padding: 0.64rem 1.05rem !important;
  border-radius: 0.9rem !important;
  font-size: 0.86rem !important;
  box-shadow: none !important;
}

.students-hero .primary-action svg {
  width: 1rem !important;
  height: 1rem !important;
}

.student-search-panel {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 0.62rem !important;
}

.student-search-field {
  min-height: 3.1rem !important;
  padding-inline: 0.9rem !important;
  border-radius: 0.9rem !important;
  border-color: rgba(255, 255, 255, 0.11) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 0.9rem 2rem rgba(0, 0, 0, 0.18) !important;
}

.student-search-field:focus-within {
  border-color: rgba(var(--brand-rgb), 0.54) !important;
  box-shadow: none !important;
}

.student-search-field svg {
  width: 1.12rem !important;
  height: 1.12rem !important;
}

.student-search-field input {
  /* RODADA 2R7 (F2): >= 16px — abaixo disso o Chrome/Android da zoom
     automatico ao focar (agora que o zoom e permitido, F1). */
  font-size: 1rem !important;
}

.student-filter-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.student-filter {
  position: relative !important;
  min-width: 0 !important;
  min-height: 3rem !important;
  padding: 0.58rem 0.54rem !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0.42rem !important;
  border-radius: 0.86rem !important;
  border-color: rgba(255, 255, 255, 0.11) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

.student-filter::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid var(--brand-strong);
  border-bottom: 2px solid var(--brand-strong);
  transform: rotate(45deg) translateY(-0.1rem);
  opacity: 0.95;
}

.student-filter-icon {
  width: 1.14rem !important;
  height: 1.14rem !important;
  color: var(--brand-strong) !important;
}

.student-filter-icon svg {
  width: 1.14rem !important;
  height: 1.14rem !important;
}

.student-filter-label {
  min-width: 0 !important;
  color: rgba(247, 244, 235, 0.88) !important;
  font-size: clamp(0.66rem, 2.55vw, 0.84rem) !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.student-filter select {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.students-list-panel {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.students-list-panel .section-title {
  margin-bottom: 0.62rem !important;
  align-items: end !important;
}

.students-list-panel .section-title h3 {
  font-size: clamp(1.05rem, 4vw, 1.28rem) !important;
  line-height: 1.12 !important;
}

.students-list-panel .small-text {
  color: rgba(247, 244, 235, 0.58) !important;
  font-size: 0.72rem !important;
}

.student-card-list {
  gap: 0.68rem !important;
}

.student-card {
  position: relative !important;
  gap: 0.6rem !important;
  padding: clamp(0.72rem, 2.7vw, 0.92rem) !important;
  border-radius: 1rem !important;
  border: 1px solid var(--borda) !important;
  background: var(--card) !important;
  overflow: visible !important;
}

.student-card-top {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0.68rem !important;
}

.student-card .entity-avatar {
  width: clamp(3.25rem, 14vw, 4.15rem) !important;
  height: clamp(3.25rem, 14vw, 4.15rem) !important;
  min-width: clamp(3.25rem, 14vw, 4.15rem) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  box-shadow: none !important;
}

.student-card-main {
  min-width: 0 !important;
  gap: 0.18rem !important;
}

.student-card-main > strong {
  color: var(--ink) !important;
  font-size: clamp(1.02rem, 4.45vw, 1.24rem) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.student-goal {
  color: rgba(247, 244, 235, 0.74) !important;
  font-size: clamp(0.76rem, 3.15vw, 0.9rem) !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.student-goal svg {
  width: 0.96rem !important;
  height: 0.96rem !important;
  color: var(--brand-strong) !important;
}

.student-card-side {
  display: grid !important;
  grid-template-columns: auto auto !important;
  justify-content: end !important;
  align-items: center !important;
  gap: 0.32rem !important;
}

.student-card-side .badge {
  min-height: 1.58rem !important;
  padding: 0.22rem 0.58rem !important;
  border-radius: 999px !important;
  font-size: clamp(0.58rem, 2.25vw, 0.72rem) !important;
  white-space: nowrap !important;
}

.student-card-menu {
  position: relative !important;
  justify-self: end !important;
}

.student-card-menu summary {
  width: 1.86rem !important;
  height: 1.86rem !important;
  min-height: 1.86rem !important;
  padding: 0 !important;
  border-radius: 0.62rem !important;
  color: var(--brand-strong) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.student-card-menu summary svg {
  width: 1rem !important;
  height: 1rem !important;
}

.student-card-menu > div {
  right: 0 !important;
  left: auto !important;
  min-width: 11.5rem !important;
}

.student-card-info {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  padding-top: 0.54rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.075) !important;
}

.student-info-block {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  grid-template-areas:
    "icon label"
    "icon value" !important;
  align-items: center !important;
  column-gap: 0.3rem !important;
  row-gap: 0.03rem !important;
  padding: 0.08rem 0.38rem !important;
  border-left: 1px solid rgba(255, 255, 255, 0.075) !important;
  background: transparent !important;
}

.student-info-block:first-child {
  border-left: 0 !important;
  padding-left: 0 !important;
}

.student-info-icon {
  grid-area: icon !important;
  width: 0.92rem !important;
  height: 0.92rem !important;
  color: var(--brand-strong) !important;
}

.student-info-icon svg {
  width: 0.92rem !important;
  height: 0.92rem !important;
}

.student-info-block > span:not(.student-info-icon) {
  grid-area: label !important;
  min-width: 0 !important;
  color: rgba(247, 244, 235, 0.56) !important;
  font-size: clamp(0.52rem, 2.05vw, 0.66rem) !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.student-info-block > strong {
  grid-area: value !important;
  min-width: 0 !important;
  color: rgba(247, 244, 235, 0.9) !important;
  font-size: clamp(0.66rem, 2.65vw, 0.82rem) !important;
  font-weight: 650 !important;
  line-height: 1.12 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.student-card-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.5rem !important;
  align-items: center !important;
}

.student-card-actions .secondary-action {
  min-height: 2.32rem !important;
  padding: 0.5rem 0.62rem !important;
  border-radius: 0.68rem !important;
  font-size: clamp(0.72rem, 2.75vw, 0.84rem) !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  color: rgba(247, 244, 235, 0.88) !important;
  border-color: rgba(var(--brand-rgb), 0.54) !important;
  background: rgba(5, 5, 5, 0.2) !important;
}

.student-card-actions .secondary-action svg {
  width: 0.94rem !important;
  height: 0.94rem !important;
  color: var(--brand-strong) !important;
}

.student-card-actions .student-primary-link {
  color: rgba(247, 244, 235, 0.92) !important;
}

@media (max-width: 32.5rem) {
  .students-workspace {
    gap: 0.64rem !important;
    padding-bottom: calc(var(--bottom-nav-height) + 2.4rem + var(--safe-bottom)) !important;
  }

  .students-hero .primary-action {
    min-width: 8.75rem !important;
    min-height: 2.58rem !important;
    padding-inline: 0.76rem !important;
    font-size: 0.78rem !important;
  }

  .student-search-field {
    min-height: 2.92rem !important;
  }

  .student-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.42rem !important;
  }

  .student-filter {
    min-height: 2.78rem !important;
    padding: 0.48rem 0.44rem !important;
    gap: 0.32rem !important;
  }

  .student-filter-icon,
  .student-filter-icon svg {
    width: 1rem !important;
    height: 1rem !important;
  }

  .student-card {
    gap: 0.54rem !important;
    padding: 0.68rem !important;
  }

  .student-card-top {
    gap: 0.55rem !important;
  }

  .student-card-side {
    gap: 0.22rem !important;
  }

  .student-card-menu summary {
    width: 1.68rem !important;
    height: 1.68rem !important;
    min-height: 1.68rem !important;
  }

  .student-card-info {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .student-info-block {
    padding-inline: 0.25rem !important;
    column-gap: 0.22rem !important;
  }

  .student-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.42rem !important;
  }

  .student-card-actions .secondary-action {
    min-height: 2.22rem !important;
    padding-inline: 0.44rem !important;
  }
}

@media (max-width: 23rem) {
  .students-hero {
    grid-template-columns: 1fr !important;
  }

  .students-hero .primary-action {
    width: 100% !important;
  }

  .student-card-top {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  .student-card-side {
    grid-column: 1 / -1 !important;
    grid-template-columns: auto auto !important;
    justify-content: space-between !important;
  }
}

/* Perfil do aluno premium refactor v48 */
.student-page {
  max-width: 55rem !important;
  margin-inline: auto !important;
  gap: 0.72rem !important;
  padding-bottom: calc(var(--bottom-nav-height) + 2.75rem + var(--safe-bottom)) !important;
  overflow-x: hidden !important;
}

.student-profile-topbar {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0.62rem !important;
  padding: 0.06rem 0 0.12rem !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.student-profile-topbar .eyebrow,
.student-profile-topbar p,
.student-profile-top-actions {
  display: none !important;
}

.student-profile-topbar h3 {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: clamp(1.45rem, 6.2vw, 2rem) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  line-height: 1.05 !important;
}

.student-profile-topbar .back-button {
  width: 2.25rem !important;
  height: 2.25rem !important;
  min-height: 2.25rem !important;
  color: var(--brand-strong) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.student-profile-topbar .back-button svg {
  width: 1.35rem !important;
  height: 1.35rem !important;
}

.student-profile-hero {
  position: relative !important;
  padding: clamp(0.82rem, 3.2vw, 1.1rem) !important;
  border-radius: 1rem !important;
  background: var(--card) !important;
  border: 1px solid var(--borda) !important;
  overflow: visible !important;
}

.student-profile-hero .student-hero-main {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: clamp(0.78rem, 4vw, 1.6rem) !important;
  min-width: 0 !important;
}

.student-profile-hero .entity-avatar {
  width: clamp(4.55rem, 19vw, 6.6rem) !important;
  height: clamp(4.55rem, 19vw, 6.6rem) !important;
  min-width: clamp(4.55rem, 19vw, 6.6rem) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: none !important;
}

.student-profile-hero .student-hero-identity {
  min-width: 0 !important;
  gap: 0.36rem !important;
}

.student-profile-hero .student-hero-identity h3 {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: clamp(1.38rem, 5.75vw, 2rem) !important;
  font-weight: 600 !important;
  line-height: 1.06 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.student-profile-hero .student-hero-identity p {
  margin: 0 !important;
  color: rgba(247, 244, 235, 0.72) !important;
  font-size: clamp(0.8rem, 3.2vw, 0.95rem) !important;
  line-height: 1.2 !important;
}

.student-profile-hero .badge-row {
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  margin-top: 0.08rem !important;
}

.student-profile-hero .badge-row .badge:not(:first-child),
.student-profile-hero .student-hero-details {
  display: none !important;
}

.student-profile-hero .badge {
  min-height: 1.62rem !important;
  padding: 0.22rem 0.62rem !important;
  border-radius: 999px !important;
  font-size: 0.72rem !important;
  font-weight: 650 !important;
}

.student-hero-menu-btn {
  align-self: start !important;
  width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: var(--brand-strong) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.student-hero-menu-btn svg {
  width: 1.12rem !important;
  height: 1.12rem !important;
}

.hero-menu-float {
  position: fixed;
  z-index: 9999;
  display: grid;
  min-width: 12.5rem;
  gap: 0.35rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(8, 8, 8, 0.98);
  box-shadow: var(--shadow);
}

.hero-menu-float[hidden] {
  display: none;
}

.hero-menu-float .mini-button {
  justify-content: center;
  width: 100%;
}

/* [D4] "Remover aluno" desabilitado enquanto o aluno estiver ativo, com a MESMA
   frase que o sheet da lista mostra — a regra é uma só nos dois lugares. */
.hero-menu-float .mini-button[disabled] {
  opacity: 0.45;
  cursor: default;
}

.hero-menu-nota {
  margin: 0.1rem 0.15rem 0.05rem;
  color: var(--txt2);
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
}

.student-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.62rem !important;
}

.student-summary-grid .student-summary-card:nth-child(2) {
  display: none !important;
}

.student-summary-card {
  min-height: 6rem !important;
  padding: 0.72rem !important;
  border-radius: 1rem !important;
  background: var(--card) !important;
  border: 1px solid var(--borda) !important;
}

.student-summary-card svg {
  width: 1.28rem !important;
  height: 1.28rem !important;
  color: var(--brand-strong) !important;
}

.student-summary-card span {
  color: rgba(247, 244, 235, 0.64) !important;
  font-size: clamp(0.7rem, 2.75vw, 0.82rem) !important;
  line-height: 1.12 !important;
}

.student-summary-card strong {
  color: var(--ink) !important;
  font-size: clamp(1.08rem, 4.8vw, 1.58rem) !important;
  font-weight: 600 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

.student-summary-card small {
  color: rgba(247, 244, 235, 0.58) !important;
  font-size: clamp(0.68rem, 2.7vw, 0.78rem) !important;
  line-height: 1.12 !important;
}

/* Abas internas da ficha como pílulas roláveis: tira sem moldura, cada aba é
   uma pílula. Ativa = preenchida na cor do tema do professor (var(--brand));
   inativas = discretas (fundo translúcido leve). Gap dá respiro p/ não apertar. */
.student-profile-tabs {
  width: 100% !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.45rem !important;
  min-height: 2.9rem !important;
  padding: 0.24rem 0.06rem !important;
  border-radius: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}

.student-profile-tabs::-webkit-scrollbar {
  display: none !important;
}

.student-profile-tabs button {
  flex: 0 0 auto !important;
  min-height: 2.5rem !important;
  padding: 0 0.95rem !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px !important;
  color: rgba(247, 244, 235, 0.66) !important;
  background: rgba(255, 255, 255, 0.045) !important;
  font-size: clamp(0.76rem, 2.7vw, 0.88rem) !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  scroll-snap-align: start !important;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

/* "notes" não faz parte da tira de 6 abas (Visão geral · Treinos · Dieta · Progresso · Agenda · Contrato) */
.student-profile-tabs button[data-profile-tab="notes"] {
  display: none !important;
}

.student-profile-tabs button.is-active {
  color: var(--brand-ink) !important;
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.3) !important;
}

.student-page .panel,
.profile-activity-card,
.profile-pending-panel,
.profile-evolution-panel {
  border-radius: 1rem !important;
  background: var(--card) !important;
  border: 1px solid var(--borda) !important;
}

.student-page .panel {
  padding: clamp(0.78rem, 3vw, 1rem) !important;
}

.student-page .section-title {
  align-items: center !important;
  gap: 0.6rem !important;
  margin-bottom: 0.62rem !important;
}

.student-page .section-title h3 {
  color: var(--ink) !important;
  font-size: clamp(1rem, 4vw, 1.32rem) !important;
  font-weight: 600 !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
}

.student-page .section-title .small-text {
  font-size: 0.76rem !important;
}

.profile-card-icon,
.profile-card-icon svg {
  width: 1.26rem !important;
  height: 1.26rem !important;
  color: var(--brand-strong) !important;
}

.student-page .mini-button {
  min-height: 2.12rem !important;
  padding: 0.46rem 0.78rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(var(--brand-rgb), 0.58) !important;
  color: var(--brand-strong) !important;
  background: rgba(5, 5, 5, 0.22) !important;
  font-size: 0.78rem !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

.profile-evolution-panel {
  overflow: hidden !important;
}

/* ── Progresso · Execuções: linha do tempo premium ───────────────────────── */
.progress-timeline {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.progress-tl-item {
  position: relative !important;
  padding: 0 0 0.85rem 1.55rem !important;
}

.progress-tl-item:last-child {
  padding-bottom: 0 !important;
}

/* trilha contínua ligando os pontos */
.progress-tl-item::before {
  content: "" !important;
  position: absolute !important;
  left: 0.42rem !important;
  top: 0.5rem !important;
  bottom: -0.35rem !important;
  width: 2px !important;
  background: var(--borda) !important;
}

.progress-tl-item:last-child::before {
  display: none !important;
}

.progress-tl-dot {
  position: absolute !important;
  left: 0 !important;
  top: 0.32rem !important;
  width: 0.9rem !important;
  height: 0.9rem !important;
  border-radius: 50% !important;
  background: var(--success) !important;
  box-shadow: 0 0 0 3px rgb(from var(--success) r g b / 0.18) !important;
}

.progress-tl-item.is-partial .progress-tl-dot {
  background: var(--brand-strong) !important;
  box-shadow: 0 0 0 3px rgb(from var(--brand-strong) r g b / 0.2) !important;
}

.progress-tl-card {
  border: 1px solid var(--borda) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-radius: 0.85rem !important;
  padding: 0.7rem 0.8rem !important;
}

.progress-tl-item.is-partial .progress-tl-card {
  border-color: rgb(from var(--brand-strong) r g b / 0.32) !important;
}

.progress-tl-head {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 0.6rem !important;
}

.progress-tl-head strong {
  color: var(--ink) !important;
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.progress-tl-time {
  flex: 0 0 auto !important;
  color: var(--muted) !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
}

.progress-tl-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.4rem !important;
  margin-top: 0.55rem !important;
}

.ptl-chip {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.18rem 0.55rem !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--ink) !important;
  font-size: 0.72rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.01em !important;
}

.ptl-chip.is-done {
  background: var(--success-soft) !important;
  color: var(--success) !important;
}

.ptl-chip.is-partial {
  background: rgb(from var(--brand-strong) r g b / 0.16) !important;
  color: var(--brand-strong) !important;
}

/* [11.1] A porta do detalhe da sessão. Texto, não botão cheio: o assunto do
   cartão é o resumo, e o detalhe é um segundo passo opcional. */
.ptl-abrir {
  justify-self: start !important;
  min-height: 2.75rem !important;
  margin-top: 0.15rem !important;
  padding: 0 !important;
  font-size: 0.8rem !important;
}

.progress-tl-loads {
  list-style: none !important;
  margin: 0.6rem 0 0 !important;
  padding: 0.55rem 0 0 !important;
  border-top: 1px solid var(--borda) !important;
  display: grid !important;
  gap: 0.32rem !important;
}

.progress-tl-loads li {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 0.6rem !important;
}

.ptl-ex-name {
  color: var(--ink) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ptl-ex-detail {
  flex: 0 0 auto !important;
  color: var(--muted) !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
}

.profile-evolution-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.8rem !important;
  align-items: stretch !important;
}

.profile-chart-wrap {
  min-width: 0 !important;
  position: relative !important;
}

.profile-volume-chart {
  width: 100% !important;
  height: auto !important;
  min-height: 9.5rem !important;
  overflow: visible !important;
}

.profile-volume-chart line {
  stroke: rgba(255, 255, 255, 0.07) !important;
  stroke-width: 1 !important;
}

.profile-volume-chart polygon {
  fill: rgba(var(--brand-rgb), 0.12) !important;
}

.profile-volume-chart polyline,
.profile-volume-chart path {
  fill: none !important;
  stroke: var(--brand-strong) !important;
  stroke-width: 3 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  filter: drop-shadow(0 0.28rem 0.55rem rgba(var(--brand-rgb), 0.18)) !important;
}

.profile-volume-chart circle {
  fill: var(--brand-strong) !important;
  stroke: rgba(8, 8, 8, 0.95) !important;
  stroke-width: 3 !important;
}

.profile-chart-labels {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 0.2rem !important;
  margin-top: -0.28rem !important;
  color: rgba(247, 244, 235, 0.58) !important;
  font-size: 0.68rem !important;
  font-weight: 650 !important;
  text-align: center !important;
}

.profile-chart-summary {
  display: grid !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 0.24rem !important;
  min-width: 8rem !important;
  padding: 0.72rem !important;
  border-radius: 0.78rem !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.075) !important;
}

.profile-chart-summary strong {
  color: var(--ink) !important;
  font-size: clamp(1.26rem, 5vw, 1.72rem) !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

.profile-chart-summary strong small {
  font-size: 0.82rem !important;
  color: rgba(247, 244, 235, 0.74) !important;
}

.profile-chart-summary > span,
.profile-chart-summary > small {
  color: rgba(247, 244, 235, 0.62) !important;
  font-size: 0.78rem !important;
  font-style: normal !important;
}

.profile-chart-summary em {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 1.36rem !important;
  padding: 0.18rem 0.48rem !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-style: normal !important;
  font-weight: 700 !important;
}

.profile-chart-summary em.is-positive {
  color: var(--success) !important;
  background: rgba(69, 214, 107, 0.13) !important;
}

.profile-chart-summary em.is-negative {
  color: var(--danger) !important;
  background: rgba(255, 77, 61, 0.13) !important;
}

.profile-tab-panel .quick-grid.student-profile-actions {
  display: none !important;
}

.student-page .workout-list,
.student-page .entity-list,
.student-page .diet-plan-list {
  display: grid !important;
  gap: 0.5rem !important;
}

.student-page .entity-row,
.student-page .workout-card,
.student-page .diet-plan-card,
.student-page .contract-row {
  border-radius: 0.78rem !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Visão geral — protótipo: próximo treino + resumo + atenção + ações */
.profile-overview {
  display: grid !important;
  gap: 0.62rem !important;
}

.profile-mini-stat {
  display: grid !important;
  gap: 0.22rem !important;
  padding: 0.7rem !important;
  border-radius: 0.85rem !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.075) !important;
}

.profile-mini-icon,
.profile-mini-icon svg {
  width: 1.18rem !important;
  height: 1.18rem !important;
  color: var(--brand-strong) !important;
}

.profile-mini-label {
  color: rgba(247, 244, 235, 0.62) !important;
  font-size: 0.74rem !important;
  line-height: 1.1 !important;
}

.profile-mini-value {
  color: var(--ink) !important;
  font-size: clamp(1.02rem, 4.4vw, 1.28rem) !important;
  font-weight: 700 !important;
  line-height: 1.06 !important;
}

.profile-mini-detail {
  color: rgba(247, 244, 235, 0.55) !important;
  font-size: 0.72rem !important;
  line-height: 1.1 !important;
}

.profile-mini-detail.is-down {
  color: var(--success) !important;
}

.profile-mini-detail.is-up {
  color: var(--danger) !important;
}

.profile-attention-row {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0.62rem !important;
  width: 100% !important;
  text-align: left !important;
  padding: 0.6rem 0.64rem !important;
  border-radius: 0.78rem !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 3px solid var(--row-tone, var(--brand-strong)) !important;
}

.profile-attention-icon {
  display: grid !important;
  place-items: center !important;
  width: 2.18rem !important;
  height: 2.18rem !important;
  border-radius: 999px !important;
  color: var(--row-tone, var(--brand-strong)) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.profile-attention-icon svg {
  width: 1.08rem !important;
  height: 1.08rem !important;
}

.profile-attention-text {
  display: grid !important;
  gap: 0.12rem !important;
  min-width: 0 !important;
}

.profile-attention-text strong {
  color: var(--ink) !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  line-height: 1.12 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.profile-attention-text span {
  color: rgba(247, 244, 235, 0.56) !important;
  font-size: 0.74rem !important;
  line-height: 1.15 !important;
}

.profile-attention-badge {
  flex: 0 0 auto !important;
  padding: 0.26rem 0.6rem !important;
  border-radius: 999px !important;
  color: var(--row-tone, var(--brand-strong)) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--row-tone, var(--brand-strong)) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

/* [F1.3] VISÃO GERAL — a pilha da ficha: situação, último treino, áreas,
   cadastro. Espaçamento igual entre os quatro blocos, para a leitura descer
   sem degrau. */
.profile-overview {
  display: grid;
  gap: 0.75rem;
}

/* [D6] Os quatro cartões de situação: duas colunas no celular (o tablet de 880
   cai no mesmo lado), cada um levando à aba que resolve o assunto. */
.situacao-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.situacao-cartao {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem;
  border: 1px solid var(--borda);
  border-radius: 1rem;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.situacao-cartao:active {
  transform: scale(0.995);
}

.situacao-icone {
  display: inline-flex;
  color: var(--txt2);
}

.situacao-icone svg {
  width: 1.05rem;
  height: 1.05rem;
}

.situacao-rotulo {
  color: var(--txt2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.situacao-valor {
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.15;
}

.situacao-detalhe {
  color: var(--txt2);
  font-size: 0.74rem;
  line-height: 1.2;
}

/* ═══════════════════════════════════════════════════════════════════════
   [41.3] TODA COR DE ESTADO SAI DO TOKEN DECLARADO.

   O que estava aqui antes era o defeito por escrito:
     · `is-warning` pintava com `var(--brand)` — ou seja, a cor de ESTADO
       seguia o TEMA do professor. Um professor de tema verde via "Em aberto"
       em verde, a cor de "pago".
     · `is-danger` e `is-success` usavam #ff5a4f e #48d764, que não são
       nossos: são os vermelhos e verdes de sistema, e mudam de aparelho
       para aparelho.

   As três agora leem o mapa do [41.3], que é hexadecimal fixo e não deriva
   de --brand. `tema-nao-pinta-estado.test.js` é a guarda.
   ═══════════════════════════════════════════════════════════════════════ */
.situacao-cartao.is-atraso .situacao-valor,
.situacao-cartao.is-danger .situacao-valor {
  color: var(--estado-atraso, #DA8E81);
}

.situacao-cartao.is-espera .situacao-valor,
.situacao-cartao.is-warning .situacao-valor {
  color: var(--estado-espera, #F59E0B);
}

.situacao-cartao.is-ok .situacao-valor,
.situacao-cartao.is-success .situacao-valor {
  color: var(--estado-ok, #7EB580);
}

.situacao-cartao.is-neutro .situacao-valor {
  color: var(--estado-neutro, #9C978C);
}

/* A bolinha de estado do [41.3]: 7px, cheia, e nada mais. Nunca um
   quadradinho colorido atrás do texto, nunca um chip de fundo saturado. */
.estado-ponto {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.36rem;
  border-radius: 50%;
  background: var(--estado-neutro, #9C978C);
  vertical-align: middle;
  flex: 0 0 auto;
}

.estado-ponto.is-ok {
  background: var(--estado-ok, #7EB580);
}

.estado-ponto.is-espera {
  background: var(--estado-espera, #F59E0B);
}

.estado-ponto.is-atraso {
  background: var(--estado-atraso, #DA8E81);
}

.estado-ponto.is-neutro {
  background: var(--estado-neutro, #9C978C);
}

.estado-ponto.is-apagado {
  background: var(--estado-apagado, #4A463F);
}

/* As três áreas do acompanhamento, uma linha cada. */
.areas-linhas {
  display: grid;
  gap: 0.1rem;
}

.area-linha {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.areas-linhas .area-linha:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.area-linha-icone {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 0.65rem;
  background: rgba(var(--brand-rgb), 0.1);
  color: var(--brand-strong, var(--brand));
}

.area-linha-icone svg {
  width: 1.05rem;
  height: 1.05rem;
}

.area-linha-texto {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.area-linha-texto strong {
  font-size: 0.9rem;
  font-weight: 700;
}

.area-linha-texto span {
  color: var(--txt2);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.area-linha-seta {
  margin-left: auto;
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--txt2);
}

.area-linha-seta svg {
  width: 1rem;
  height: 1rem;
}

/* Visão geral — dados cadastrais em linhas limpas (label à esquerda, valor à direita) */
.profile-data-list {
  display: grid !important;
  gap: 0 !important;
  margin: 0 !important;
}

.profile-data-row {
  display: grid !important;
  grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr) !important;
  align-items: baseline !important;
  gap: 0.75rem !important;
  padding: 0.72rem 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.profile-data-row:last-child {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.profile-data-label {
  margin: 0 !important;
  color: rgba(247, 244, 235, 0.6) !important;
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
}

.profile-data-value {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-align: right !important;
  word-break: break-word !important;
}

/* [41.4] Campo que existe no formulário e está em branco diz "não informado",
   na cor de ausência do [41.3] — nunca um travessão, que não distingue vazio
   de erro nem de zero. */
.profile-data-value.is-ausente {
  color: var(--estado-apagado, #4A463F) !important;
  font-weight: 500 !important;
}

/* [50.0a] O QUE O ALUNO CONTOU — a apresentação escrita pelo aluno, lida na
   Visão geral logo abaixo do objetivo. Só leitura: não há botão Editar. */
.o-que-o-aluno-contou-texto {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (min-width: 48rem) {
  .student-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .profile-evolution-layout {
    grid-template-columns: minmax(0, 1fr) 10.5rem !important;
  }
}

@media (max-width: 32.5rem) {
  .student-page {
    gap: 0.58rem !important;
  }

  .student-profile-hero {
    padding: 0.72rem !important;
  }

  .student-profile-hero .student-hero-main {
    gap: 0.62rem !important;
  }

  .student-profile-hero .student-hero-identity h3 {
    font-size: clamp(1.22rem, 5.35vw, 1.46rem) !important;
  }

  .student-summary-grid {
    gap: 0.48rem !important;
  }

  .student-summary-card {
    min-height: 5.55rem !important;
    padding: 0.62rem !important;
  }

  .student-profile-tabs {
    min-height: 2.78rem !important;
    gap: 0.4rem !important;
  }

  .student-profile-tabs button {
    min-height: 2.34rem !important;
    padding-inline: 0.85rem !important;
  }

  .profile-volume-chart {
    min-height: 7.8rem !important;
  }
}

/* Biblioteca de exercícios premium refactor v49 */
.exercise-library-page {
  max-width: 56.5rem !important;
  margin-inline: auto !important;
  gap: 0.76rem !important;
  padding-bottom: calc(var(--bottom-nav-height) + 2.75rem + var(--safe-bottom)) !important;
  overflow-x: hidden !important;
}

.library-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0.8rem !important;
}

.library-hero .eyebrow {
  color: var(--brand-strong) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.library-hero h2 {
  margin: 0.16rem 0 0 !important;
  color: var(--ink) !important;
  font-size: clamp(1.7rem, 7.1vw, 2.45rem) !important;
  font-weight: 600 !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
}

.library-primary-action {
  min-height: 3rem !important;
  min-width: 10.2rem !important;
  padding: 0.72rem 1.05rem !important;
  border-radius: 0.88rem !important;
  background: var(--brand) !important;
  color: var(--brand-ink) !important;
  box-shadow: none !important;
  font-size: clamp(0.82rem, 3.15vw, 0.94rem) !important;
  font-weight: 760 !important;
}

.library-play-badge {
  position: absolute !important;
  inset: 50% auto auto 50% !important;
  width: 2.72rem !important;
  height: 2.72rem !important;
  transform: translate(-50%, -50%) !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  color: var(--brand-ink) !important;
  background: var(--brand) !important;
  box-shadow: none !important;
}

.library-play-badge svg {
  width: 1.22rem !important;
  height: 1.22rem !important;
}

@media (max-width: 32.5rem) {
  .exercise-library-page {
    gap: 0.62rem !important;
  }

  .library-hero {
    gap: 0.58rem !important;
  }

  .library-primary-action {
    min-width: 8.75rem !important;
    min-height: 2.58rem !important;
    padding-inline: 0.78rem !important;
  }
}

@media (max-width: 23rem) {
  .library-hero {
    grid-template-columns: 1fr !important;
  }

  .library-primary-action {
    width: 100% !important;
  }
}

/* Atualizações - refino visual final */
.updates-page {
  max-width: 57.5rem !important;
  margin-inline: auto !important;
  gap: 0.72rem !important;
  padding-bottom: calc(var(--bottom-nav-height, 4.8rem) + var(--safe-bottom, 0px) + 1.8rem) !important;
}

.updates-page .updates-hero {
  padding: 0.06rem 0 0.02rem !important;
  gap: 0.4rem !important;
}

.updates-page .updates-hero .eyebrow {
  display: none !important;
}

.updates-page .updates-hero h3 {
  margin: 0 !important;
  font-size: clamp(1.78rem, 7.2vw, 2.45rem) !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
}

.updates-page .updates-hero p {
  margin-top: 0.28rem !important;
  color: rgba(247, 244, 235, 0.68) !important;
  font-size: clamp(0.88rem, 3.2vw, 1rem) !important;
  line-height: 1.28 !important;
}

.updates-page .updates-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(0.42rem, 1.8vw, 0.72rem) !important;
}

.updates-page .update-summary-card {
  min-height: clamp(5.85rem, 23vw, 7.4rem) !important;
  padding: clamp(0.52rem, 2.1vw, 0.8rem) !important;
  border-radius: 0.88rem !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 0.12rem 0.44rem !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(9, 9, 9, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.105) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 1rem 2.4rem rgba(0, 0, 0, 0.2) !important;
}

.updates-page .update-summary-card::after {
  display: none !important;
}

.updates-page .update-summary-icon {
  width: clamp(1.62rem, 6vw, 2rem) !important;
  height: clamp(1.62rem, 6vw, 2rem) !important;
}

.updates-page .update-summary-icon svg {
  width: clamp(1.18rem, 4.8vw, 1.55rem) !important;
  height: clamp(1.18rem, 4.8vw, 1.55rem) !important;
}

.updates-page .update-summary-card > span:not(.update-summary-icon) {
  font-size: clamp(0.66rem, 2.55vw, 0.9rem) !important;
  line-height: 1.12 !important;
  font-weight: 660 !important;
}

.updates-page .update-summary-card strong {
  font-size: clamp(1.55rem, 7vw, 2.45rem) !important;
  line-height: 0.98 !important;
}

.updates-page .update-summary-card small {
  font-size: clamp(0.58rem, 2.25vw, 0.78rem) !important;
  line-height: 1.15 !important;
}

.updates-page .updates-filter-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 0.5rem !important;
}

.updates-page .update-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.5rem !important;
}

.updates-page .update-filter,
.updates-page .updates-extra-filter summary {
  min-height: clamp(3.15rem, 13vw, 4rem) !important;
  padding: 0.52rem 0.64rem !important;
  border: 1px solid rgba(255, 255, 255, 0.105) !important;
  border-radius: 0.82rem !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(8, 8, 8, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

.updates-page .update-filter-icon {
  width: 1.46rem !important;
  height: 1.46rem !important;
}

.updates-page .update-filter-icon svg {
  width: 1.04rem !important;
  height: 1.04rem !important;
}

.updates-page .update-filter-label,
.updates-page .updates-extra-filter summary small {
  color: rgba(247, 244, 235, 0.58) !important;
  font-size: clamp(0.62rem, 2.25vw, 0.76rem) !important;
  line-height: 1.1 !important;
}

.updates-page .update-filter select,
.updates-page .update-filter input,
.updates-page .updates-extra-filter summary strong {
  color: var(--ink) !important;
  font-size: clamp(0.76rem, 2.85vw, 0.98rem) !important;
  line-height: 1.14 !important;
  font-weight: 660 !important;
}

.updates-extra-filter {
  position: relative !important;
  justify-self: end !important;
}

.updates-extra-filter summary {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0.52rem !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 2.38rem !important;
  padding: 0.42rem 0.62rem !important;
  cursor: pointer !important;
  list-style: none !important;
}

.updates-extra-filter summary::-webkit-details-marker {
  display: none !important;
}

.updates-extra-filter summary > span:not(.update-filter-icon) {
  display: grid !important;
  min-width: 0 !important;
  gap: 0.08rem !important;
}

.updates-extra-filter summary > svg {
  width: 1rem !important;
  height: 1rem !important;
  fill: none !important;
  stroke: var(--brand-strong) !important;
  stroke-width: 2.2 !important;
}

.updates-page .updates-extra-filter summary {
  width: max-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  height: 2.38rem !important;
  min-height: 2.38rem !important;
  padding: 0.42rem 0.62rem !important;
}

.updates-extra-filter-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.5rem !important;
  margin-top: 0.5rem !important;
}

.updates-page .updates-list-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 0.56rem !important;
}

.updates-page .updates-list-panel > .section-title {
  display: none !important;
}

.updates-page .update-card-list {
  gap: 0.7rem !important;
}

.updates-page .update-card {
  gap: 0.62rem !important;
  padding: clamp(0.64rem, 2.4vw, 0.86rem) !important;
  border-radius: 0.96rem !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.018)),
    rgba(8, 8, 8, 0.93) !important;
  border-color: rgba(255, 255, 255, 0.105) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 1.3rem 3rem rgba(0, 0, 0, 0.22) !important;
}

.updates-page .update-card-head {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: 0.64rem !important;
}

.updates-page .update-card-head .entity-avatar {
  width: clamp(3rem, 11vw, 4.1rem) !important;
  height: clamp(3rem, 11vw, 4.1rem) !important;
  border-color: rgba(var(--brand-rgb), 0.38) !important;
}

.updates-page .update-title-block strong {
  font-size: clamp(1.02rem, 4.2vw, 1.34rem) !important;
  font-weight: 760 !important;
}

.updates-page .update-title-block span {
  font-size: clamp(0.72rem, 2.7vw, 0.88rem) !important;
  gap: 0.27rem !important;
}

.updates-page .update-card-body {
  grid-template-columns: minmax(5.9rem, 0.72fr) minmax(0, 1.55fr) !important;
  gap: clamp(0.5rem, 2vw, 0.78rem) !important;
  padding-top: 0.58rem !important;
}

.updates-page .update-weight-panel {
  padding-right: clamp(0.46rem, 2vw, 0.7rem) !important;
  padding-bottom: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-bottom: 0 !important;
  gap: 0.18rem !important;
}

.updates-page .update-weight-panel span {
  font-size: clamp(0.72rem, 2.7vw, 0.9rem) !important;
}

.updates-page .update-weight-panel strong {
  font-size: clamp(1.35rem, 6vw, 2.1rem) !important;
  line-height: 1.02 !important;
}

.updates-page .update-weight-panel small {
  font-size: clamp(0.66rem, 2.45vw, 0.8rem) !important;
  line-height: 1.24 !important;
}

.updates-page .update-photo-strip,
.updates-page .update-photo-grid-detail {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(0.34rem, 1.5vw, 0.58rem) !important;
}

.updates-page .update-photo-frame {
  min-height: 0 !important;
  gap: 0.3rem !important;
  border-radius: 0 !important;
}

.updates-page .update-photo-frame img,
.updates-page .update-photo-placeholder {
  aspect-ratio: 1.05 / 0.82 !important;
  min-height: clamp(4.3rem, 16.4vw, 7.2rem) !important;
  border-radius: 0.62rem !important;
}

.updates-page .update-photo-placeholder {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014)),
    rgba(5, 5, 5, 0.72) !important;
  border-color: rgba(247, 244, 235, 0.26) !important;
  border-style: dashed !important;
}

.updates-page .update-photo-placeholder svg {
  width: clamp(1.25rem, 4.6vw, 1.65rem) !important;
  height: clamp(1.25rem, 4.6vw, 1.65rem) !important;
}

.updates-page .update-photo-frame small {
  font-size: clamp(0.63rem, 2.3vw, 0.78rem) !important;
}

.updates-page .update-card-note {
  display: none !important;
}

.updates-page .update-primary-action {
  min-height: clamp(2.34rem, 9.5vw, 2.86rem) !important;
  border-radius: 0.68rem !important;
  background: rgba(5, 5, 5, 0.18) !important;
  border-color: rgba(var(--brand-rgb), 0.58) !important;
  color: var(--brand-strong) !important;
  font-size: clamp(0.86rem, 3.1vw, 1.04rem) !important;
  font-weight: 760 !important;
}

.updates-page .update-primary-action svg {
  width: 1rem !important;
  height: 1rem !important;
}

@media (min-width: 44rem) {
  .updates-page .update-card-body {
    grid-template-columns: minmax(11rem, 0.56fr) minmax(0, 1.44fr) !important;
  }

  .updates-page .update-photo-frame img,
  .updates-page .update-photo-placeholder {
    min-height: 7.25rem !important;
  }
}

@media (max-width: 24rem) {
  .updates-page .update-card-body {
    grid-template-columns: 1fr !important;
  }

  .updates-page .update-weight-panel {
    padding-right: 0 !important;
    padding-bottom: 0.5rem !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
  }

  .updates-page .updates-extra-filter-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   TRANSIÇÕES & FEEDBACK DE TOQUE
   ========================================================================== */

/* Remove flash cinza padrão do tap no mobile */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Transition de transform para feedback tátil nos elementos clicáveis */
button:not(:disabled),
[role="button"],
.quick-link,
.day-cell {
  transition: transform 150ms ease, opacity 150ms ease;
}

/* Estado :active — leve compressão tátil */
button:active:not(:disabled),
[role="button"]:active,
.quick-link:active,
.day-cell:active {
  transform: scale(0.97);
}

/* ── Animação de entrada do conteúdo (troca de aba / seção) ──
   Tema escuro: NÃO animar opacity. Um fade a partir de opacity:0 deixa o
   fundo quase-preto do body aparecer por um instante → "flash preto" ao
   trocar de aba. Mantemos só um micro-slide, com o conteúdo sempre opaco,
   para uma troca limpa e sem piscar. */
@keyframes content-enter {
  from { transform: translateY(4px); }
  to   { transform: translateY(0); }
}

.content-area.is-entering {
  animation: content-enter 150ms ease both;
}

/* ── Saída suave do conteúdo (ex: gate → app liberado) ── */
@keyframes content-leave {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}

.content-area.is-leaving {
  animation: content-leave 280ms ease both;
}

/* ── Tela de sucesso do gate de primeiro acesso ── */
.gate-success {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.55rem;
  min-height: 56vh;
  padding: 2rem 1.25rem;
  text-align: center;
}

.gate-success-badge {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-strong);
  box-shadow: var(--shadow);
  animation: gate-success-pop 360ms cubic-bezier(0.32, 0.72, 0, 1) both;
}

.gate-success-badge svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: var(--brand-ink);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gate-success-circle {
  stroke: rgb(from var(--brand-ink) r g b / 0.28);
  stroke-width: 2;
}

.gate-success-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: gate-success-draw 420ms ease 200ms forwards;
}

.gate-success h2 {
  margin-top: 0.7rem;
  font-size: clamp(1.3rem, 6vw, 1.7rem);
}

.gate-success p {
  max-width: 22rem;
  color: var(--muted);
  line-height: 1.45;
}

.gate-success-hint {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-strong);
  opacity: 0.9;
}

@keyframes gate-success-pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes gate-success-draw {
  to { stroke-dashoffset: 0; }
}

/* ── Animação de entrada de view principal (ex: login → app) ── */
@keyframes view-enter {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.view.is-entering {
  animation: view-enter 200ms ease both;
}

/* ── Keyframes para modal e bottom-sheet ── */
@keyframes modal-bg-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-bg-out { from { opacity: 1; } to { opacity: 0; } }

@keyframes panel-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes panel-slide-down {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

/* Entrada do modal / install-sheet */
.modal.is-open .modal-backdrop,
.install-sheet.is-open .sheet-backdrop {
  animation: modal-bg-in 200ms ease both;
}

.modal.is-open .modal-panel,
.install-sheet.is-open .sheet-panel {
  animation: panel-slide-up 220ms cubic-bezier(0.32, 0.72, 0, 1) both;
}

/* Saída do modal / install-sheet (classe aplicada via JS antes de ocultar) */
.modal.is-closing .modal-backdrop,
.install-sheet.is-closing .sheet-backdrop {
  animation: modal-bg-out 160ms ease both;
}

.modal.is-closing .modal-panel,
.install-sheet.is-closing .sheet-panel {
  animation: panel-slide-down 160ms ease both;
}

/* ════════════════════════════════════════════════════════════════════
   SECUNDÁRIAS EM TELA CHEIA (modelo Instagram) — CAMADA COMPARTILHADA
   Converte os bottom-sheets (ag-sheet / el-sheet / det-sheet /
   workout-sheet) em telas cheias que:
     • cobrem a navbar (z-index acima da bottom-nav e do header);
     • preenchem 100dvh com fundo SÓLIDO (nada vaza atrás);
     • têm cabeçalho fixo respeitando safe-area-inset-top;
     • têm conteúdo com área de rolagem própria;
     • têm rodapé respeitando safe-area-inset-bottom.
   Mexe-se SÓ aqui (mecanismo compartilhado), não tela por tela.
   Seletores com especificidade dupla para vencer as regras de base dos
   módulos independente da ordem de carregamento dos CSS.
   ════════════════════════════════════════════════════════════════════ */
.ag-sheet.ag-sheet,
.workout-sheet.workout-sheet {
  z-index: 1090;          /* acima da bottom-nav (25) e do workspace-header (20) */
  place-items: stretch;   /* o painel preenche toda a viewport */
}

.ag-sheet .ag-panel,
.workout-sheet .workout-sheet-panel {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* [15.5] A FOLHA DO COMPROMISSO SAIU DESTE GRUPO. Ela virava tela cheia como
   as outras, e o conteúdo dela é pequeno — três linhas de dado e as ações —
   então sobravam quase 380px de nada entre o corpo e o rodapé. Tela cheia é
   para quem TEM conteúdo de tela cheia (montar treino, escolher exercício);
   esta é uma folha que sobe de baixo e para na altura do que tem para dizer.
   Do grupo ela leva só o que precisava mesmo: ficar acima da barra de baixo. */
.det-sheet.det-sheet {
  z-index: 1090;
}

/* Cabeçalho fixo no topo respeitando o notch (safe-area-inset-top). */
.ag-sheet .ag-panel > .ag-head,
.workout-sheet .workout-sheet-panel > .ag-head {
  padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
}

/* ── Modal genérico em TELA CHEIA (variante .modal-fullscreen) ───────────
   Usado pelas secundárias que ainda rodavam no card que sobe de baixo
   (ex.: Novo/Editar aluno). Converte o .modal compartilhado na MESMA tela
   cheia das sheets: cobre navbar, fundo SÓLIDO, cabeçalho fixo com notch e
   corpo com rolagem própria. O scroll-lock do fundo é feito no JS
   (_lockBackScroll, position:fixed). */
.modal.modal-fullscreen {
  z-index: 1090;          /* acima da bottom-nav (25) e do header (20) */
  place-items: stretch;
}
.modal.modal-fullscreen .modal-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  /* !important para vencer .modal-panel{background:…!important} da base.css */
  background: #141414 !important; /* sólido, idêntico às sheets */
  overflow: hidden;       /* a rolagem fica no #modalBody */
}
.modal.modal-fullscreen .modal-head {
  flex-shrink: 0;
  margin: 0;
  padding: calc(0.6rem + env(safe-area-inset-top, 0px)) 1rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal.modal-fullscreen #modalBody {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

/* hideHead → a tela traz o próprio cabeçalho (X + título + Salvar); o
   #modalBody encosta no topo e a safe-area fica na barra interna (.es-topbar). */
.modal.modal-headless .modal-head { display: none; }
.modal.modal-fullscreen.modal-headless #modalBody { padding-top: 0; }

/* ── Editar aluno (TELA CHEIA): barra fixa X + título + Salvar ─────────── */
.es-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 -1rem 1rem;   /* compensa o padding lateral do #modalBody */
  padding: calc(0.5rem + env(safe-area-inset-top, 0px)) 1rem 0.6rem;
  background: #141414;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.es-topbar h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
}
.es-topbar .es-close { flex-shrink: 0; }
.es-topbar .es-save {
  flex-shrink: 0;
  border: 0;
  background: none;
  color: var(--brand, #d9b25a);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.4rem 0.3rem;
  cursor: pointer;
}
.es-archive-btn {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(229, 90, 90, 0.55);
  background: transparent;
  color: #e55a5a;
  font-weight: 600;
  cursor: pointer;
}
.es-archive-btn:active { background: rgba(229, 90, 90, 0.08); }

/* Balanceia o X da es-topbar quando não há botão de ação à direita. */
.es-topbar-spacer { flex-shrink: 0; width: 40px; }

/* ── Enviar acesso (TELA CHEIA): instrução + QR + link + WhatsApp ──────── */
.sa-screen {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  max-width: 420px;
  margin: 0 auto;
  padding-top: 0.25rem;
}
.sa-intro {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.45;
}
.sa-intro strong { color: #fff; }
.sa-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 240px;
  max-width: 72vw;
  max-height: 72vw;
  margin: 0.25rem auto;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.sa-qr svg { display: block; width: 100%; height: 100%; }
.sa-qr[data-state="loading"],
.sa-qr[data-state="error"] {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}
.sa-qr-msg {
  padding: 0 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}
.sa-link-field { margin: 0; }
.sa-link-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
.sa-link-row input {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
}
.sa-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--brand, #d9b25a);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.sa-copy span { white-space: nowrap; }
.sa-copy:disabled { opacity: 0.45; cursor: default; }
.sa-copy svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sa-copy:active:not(:disabled) { background: rgba(255, 255, 255, 0.1); }
.sa-link-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: -0.35rem 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}
.sa-link-note svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sa-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.9rem;
  border: 0;
  border-radius: 14px;
  background: #25d366;
  color: #04210f;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.sa-wa-btn svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 0; }
.sa-wa-btn:disabled { opacity: 0.5; cursor: default; }
.sa-wa-btn:active:not(:disabled) { background: #1fbe5a; }

/* [36 B] O E-MAIL MUDOU DE CASA. Ele morava na folha velha do convite, que
   saiu junto com a área de mensagens — era de lá que o "+" da conversa a
   abria. Mesma função, mesma rota, mesmas medidas: só o endereço mudou. */
.sa-email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  margin-top: 0.6rem;
}

.sa-email-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.sa-email-btn:disabled { opacity: 0.55; cursor: default; }

/* Sem envio configurado no servidor o botão acima não existe; fica a linha. */
.sa-mail-note,
.sa-mail-status {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
}

.sa-mail-status.is-erro { color: var(--danger); }

/* ── Secundárias de PÁGINA (sem sheet) em TELA CHEIA ─────────────────────
   Pendências, Avaliar check-in e Novo aluno são páginas do workspace (não
   sheets). Para o mesmo padrão Instagram, ocultamos o cabeçalho da marca e
   a bottom-nav e damos respiro de notch no topo — a própria página já traz
   o seu botão de voltar. */
/* !important: navbar e header da marca têm display:…!important na base. */
body.is-mgr-fullscreen .manager-workspace .manager-header {
  display: none !important;
}
body.is-mgr-fullscreen #managerBottomNav {
  display: none !important;
}
/* Com a bottom-nav oculta no fullscreen, zera o padding-bottom de reserva da
   nav (5.75rem em mobile, vindo de base.css) — senão sobra um espaço morto
   abaixo do rodapé preso (Cancelar/Salvar) ao rolar a folha até o fim. */
body.is-mgr-fullscreen .manager-workspace {
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
}
body.is-mgr-fullscreen .manager-workspace .workspace-layout {
  padding-top: calc(0.62rem + env(safe-area-inset-top, 0px)) !important;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
}
/* A folha cadastrar/editar aluno tem rodapé PRESO (.ns-footer): zera o respiro
   inferior do layout só nela, para o rodapé colar na base sem faixa morta. As
   demais telas fullscreen (pending/avaliação/perfil) mantêm o respiro de 1rem. */
body.is-mgr-fullscreen .manager-workspace .workspace-layout:has(.new-student-screen) {
  padding-bottom: 0 !important;
}

/* ── Animações dos sheets customizados (ag-sheet, workout-sheet, det-sheet, el-sheet, video-modal) ── */
.ag-sheet.is-open .ag-backdrop,
.det-sheet.is-open .det-backdrop,
.workout-sheet.is-open .workout-sheet-backdrop,
.video-modal.is-open .video-modal-backdrop {
  animation: modal-bg-in 200ms ease both;
}
.ag-sheet.is-open .ag-panel,
.det-sheet.is-open .det-panel,
.workout-sheet.is-open .workout-sheet-panel,
.video-modal.is-open .video-modal-panel {
  animation: panel-slide-up 220ms cubic-bezier(0.32, 0.72, 0, 1) both;
}
.ag-sheet.is-closing .ag-backdrop,
.det-sheet.is-closing .det-backdrop,
.workout-sheet.is-closing .workout-sheet-backdrop,
.video-modal.is-closing .video-modal-backdrop {
  animation: modal-bg-out 160ms ease both;
}
.ag-sheet.is-closing .ag-panel,
.det-sheet.is-closing .det-panel,
.workout-sheet.is-closing .workout-sheet-panel,
.video-modal.is-closing .video-modal-panel {
  animation: panel-slide-down 160ms ease both;
}

/* Thread sheet: tela cheia — fade + deslize suave */
@keyframes thread-sheet-in  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes thread-sheet-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px); } }

/* ── Respeitar prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Banner de alterações pendentes offline ── */
@keyframes offline-banner-in {
  from { opacity: 0; transform: translateX(-50%) translateY(0.6rem); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.offline-pending-banner {
  position: fixed;
  bottom: calc(4.6rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 88;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 1rem;
  /* FIX 8 (item 5A) — A MANCHA BRANCA. Este fundo era `var(--ink)`, que e a
     variavel de TEXTO do tema. No tema escuro em vigor (refresh v22) --ink vale
     #f7f4eb, quase branco: o banner virava uma pilula branca com texto branco
     (color: #fff logo abaixo) — ilegivel, e o "aviso branco que nao some" que o
     Guilherme reportou. Passa a usar o MESMO padrao do .toast (linha 3649:
     rgba(15,15,15,.96) + a hairline de .toast na 4525), que e escuro fixo e nao
     depende do tema, entao o texto branco tem contraste nos dois temas. */
  background: rgba(15, 15, 15, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  white-space: nowrap;
  animation: offline-banner-in 200ms ease;
}

.offline-banner-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

@media (min-width: 42rem) {
  .offline-pending-banner {
    bottom: 1.5rem;
  }
}

/* Banner offline — estado de ERRO DE REGRA DE NEGOCIO (fase 4b): mostra a mensagem
   real do servidor + botao Descartar. Diferente do "salvo localmente" (falha de
   rede, sem acao), este exige decisao do gestor — por isso volta a receber cliques
   (o banner base e pointer-events:none) e usa a cor de alerta. */
.offline-pending-banner.is-business-error {
  background: var(--danger, #c0392b);
  pointer-events: auto;
  white-space: normal;
  max-width: min(92vw, 30rem);
}

/* BLOCO 6 (item 5) — o servidor RESPONDEU e recusou/errou (5xx, 413, etc.), o
   aparelho continua ONLINE. Precisa ser visualmente diferente do "salvo
   localmente" (rede fora do ar de verdade) — mesma cor de alerta do erro de
   regra de negocio acima, so que sem o botao Descartar (aqui ainda insiste
   sozinho, ate o teto de tentativas). */
.offline-pending-banner.is-server-error {
  background: #9a5b12;
}

/* BLOCO 6B (item 3) — ARMAZENAMENTO DO APARELHO CHEIO (QuotaExceededError). E o
   unico estado em que a gravacao LOCAL falhou: nada foi salvo em lugar nenhum,
   nem aqui nem no servidor. Precisa ser o mais alarmante dos tres e o mais
   distinto — carmesim escuro, longe do #c0392b da regra de negocio e do #9a5b12
   do erro de servidor. Recebe cliques porque tem acao propria (Liberar espaco). */
.offline-pending-banner.is-storage-full {
  background: #8c1f3d;
  pointer-events: auto;
  white-space: normal;
  max-width: min(92vw, 30rem);
}

.offline-banner-storage {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.offline-banner-error {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.offline-banner-discard {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: transparent;
  color: #fff;
  border-radius: 1.4rem;
  padding: 0.24rem 0.72rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.offline-banner-discard:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ===========================================================================
   PULL-TO-REFRESH — indicador do gesto "puxar para atualizar"
   Em PWA standalone, overscroll-behavior-y: contain impede o refresh nativo do
   navegador; o gesto e tratado por JS (initPullToRefresh) nas telas de lista.
   =========================================================================== */
html,
body {
  overscroll-behavior-y: contain;
}

.ptr-indicator {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 0.25rem);
  left: 50%;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(10, 10, 10, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%) translateY(-3.5rem);
  opacity: 0;
  pointer-events: none;
}

.ptr-spinner {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--brand, #e7a83e);
}

.ptr-indicator.is-armed {
  border-color: rgb(from var(--brand, #e7a83e) r g b / 0.6);
}

.ptr-indicator.is-refreshing .ptr-spinner {
  animation: ptr-spin 0.8s linear infinite;
}

@keyframes ptr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* [56.2 c] "BUSCAR DE NOVO" — o controle VISÍVEL do Android, no lugar em que a
   bolinha do puxar apareceria: preso ao topo, centrado, logo abaixo do
   cabeçalho (o `top` é medido em JS a partir do cabeçalho). Só nasce no
   Android, só para o professor, só nas telas de lista. Mesma casca escura da
   bolinha. Quando ele existe, o conteúdo desce (body.tem-buscar-de-novo) para
   a primeira linha não nascer embaixo dele. */
.ptr-buscar {
  position: fixed;
  left: 50%;
  z-index: 40;
  display: none;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(10, 10, 10, 0.94);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ptr-buscar.is-visivel {
  display: inline-flex;
}
.ptr-buscar:disabled {
  opacity: 0.6;
}
.ptr-buscar svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}
.ptr-buscar.is-avisando {
  animation: ptr-buscar-pulso 0.8s ease 2;
}
@keyframes ptr-buscar-pulso {
  50% {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 0 0 7px rgb(from var(--brand, #e7a83e) r g b / 0.35);
  }
}
body.tem-buscar-de-novo #managerContent {
  padding-top: 3.25rem !important;
}

/* ===========================================================================
   BARRA DE SINCRONIZACAO AUTOMATICA (auto-update ao voltar pro foco)
   Fininha, colada na borda superior (respeitando o safe-area do notch), cor da
   marca com gradiente (transparente -> --brand). Corre da esquerda pra direita
   enquanto sincroniza e some suave ao terminar. NAO empurra conteudo (fixed) e
   NAO bloqueia a tela (pointer-events:none). So aparece no re-fetch AUTOMATICO —
   o pull-to-refresh manual continua com a bolinha (.ptr-indicator).
   =========================================================================== */
#syncBar {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  height: 2.5px;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s ease;
}

#syncBar.is-active {
  opacity: 1;
}

#syncBar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 45%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--brand, #2dd4bf));
  animation: syncBarSlide 1.15s ease-in-out infinite;
}

@keyframes syncBarSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
  #syncBar::before { animation-duration: 2.2s; }
}

/* ==========================================================================
   MINHA ASSINATURA (Corefy) — BLOCO ADM, Fase D6
   Secao PROPRIA e no fim do arquivo de proposito: e a unica tela do app do
   professor que fala do Corefy como fornecedor, e nada aqui deve alcancar as
   telas que ele usa com os alunos dele.
   ========================================================================== */
.corefy-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, .08));
}
.corefy-row:last-child { border-bottom: 0; }
.corefy-row > span { color: var(--muted, #a8adba); font-size: .9rem; }
.corefy-row > strong { text-align: right; word-break: break-word; }
.corefy-row .corefy-row-main { display: grid; gap: 2px; }
.corefy-row .corefy-row-main strong { text-align: left; }

.corefy-aviso {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .95rem;
  line-height: 1.45;
  margin-bottom: 12px;
}
.corefy-aviso.is-atencao { background: rgba(210, 153, 34, .12); color: #d29922; }
.corefy-aviso.is-erro { background: rgba(248, 81, 73, .12); color: #f85149; }
/* [P4] o selo do periodo gratis (o que o professor TEM) e [P3] a faixa da
   versao nova do contrato (discreta, com o botao que leva a Minha assinatura). */
.corefy-aviso.is-ok { background: rgba(63, 185, 80, .12); color: #3fb950; }
.corefy-faixa-versao { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.corefy-faixa-versao .gate-link-action { margin: 0; }
.corefy-versao-nova { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }

/* [D7] Faixa da SESSAO DE LEITURA (adm lendo o app de um professor). Fica
   por cima de tudo, sempre; o app desce para caber. */
.faixa-leitura {
  position: sticky;
  top: 0;
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 8px 14px;
  background: #d29922;
  color: #1a1200;
  font-size: .9rem;
  line-height: 1.3;
}
.faixa-leitura strong { font-weight: 800; }
.faixa-leitura button,
.faixa-leitura a {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .35);
  background: rgba(255, 255, 255, .35);
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.faixa-leitura.is-erro { background: #f85149; color: #fff; }
/* Cortesia: botoes de escrita somem na sessao de leitura (o servidor e a guarda). */
.is-modo-leitura .fab,
.is-modo-leitura .fab-button,
.is-modo-leitura form button[type="submit"],
.is-modo-leitura [data-open-student-form],
.is-modo-leitura [data-open-contract-form],
.is-modo-leitura [data-delete-student],
.is-modo-leitura [data-sign-contract-gate],
.is-modo-leitura [data-manager-nav="messages"] { display: none !important; }

/* Previa HTML do contrato (gate do professor — T2 do adendo 05/09).
   Mesmo texto do .docx; o PDF abre pelo botao .contract-pdf-open-btn. */
.contract-html-preview {
  max-height: 46vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid var(--border, rgba(255, 255, 255, .12));
  border-radius: 10px;
  padding: 16px 18px;
  font-size: .92rem;
  line-height: 1.5;
  margin-bottom: 12px;
}
.contract-html-preview h1,
.contract-html-preview h2,
.contract-html-preview h3 { color: #111; margin: 12px 0 6px; font-size: 1rem; }
.contract-html-preview p { margin: 0 0 8px; }
.contract-html-preview.is-loading { color: var(--muted, #a8adba); background: transparent; text-align: center; }
.contract-pdf-open-btn {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, .16));
  color: inherit;
  text-decoration: none;
  font-size: .9rem;
}

/* ═══ [40.6]+[40.7] MINHA ASSINATURA ═══════════════════════════════════════
   O topo eram TRÊS cartões numa grade de duas colunas — o terceiro sozinho na
   segunda linha, com um buraco do lado. Agora é um painel com três LINHAS de
   fato, e cada linha diz a mesma coisa em menos espaço. */

.assin-fatos {
  display: grid;
  gap: 0;
  padding: 0.2rem 0.9rem;
}

/* A ORDEM DAS COLUNAS IMPORTA, e eu errei na primeira vez: com o valor em
   `minmax(0,1fr)` e o complemento em `auto`, era o COMPLEMENTO que pegava a
   largura natural dele primeiro e o VALOR que sobrava com o resto. No celular
   de 390, "Próximo vencimento 17/10/2026" comia a linha e "Aguardando
   entrada" nascia "Ag…". Cortar a palavra que diz a SITUAÇÃO para caber a
   data é trocar o fato pelo detalhe.
   Agora o valor tem a largura que precisa e nunca é cortado; quem cede é o
   complemento, que QUEBRA em duas linhas em vez de espremer o vizinho. */
.assin-fato {
  display: grid;
  grid-template-columns: 76px auto minmax(0, 1fr);
  align-items: baseline;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, .08));
}

.assin-fato:last-child { border-bottom: 0; }

.assin-fato-rotulo {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #a8adba);
}

.assin-fato-valor {
  font-size: 15px;
  font-weight: 600;
  /* Sem `text-overflow: ellipsis` de proposito: esta coluna nao corta. Se um
     dia o valor nao couber, ele quebra — mas nao vira reticencia. */
  white-space: nowrap;
}

.assin-fato-compl {
  font-size: 13px;
  color: var(--muted, #a8adba);
  text-align: right;
  /* Quem cede e o complemento: ele quebra em duas linhas antes de espremer o
     valor ao lado. */
  min-width: 0;
  overflow-wrap: anywhere;
}

/* O tom vive no VALOR, não no cartão inteiro: é ele que diz a situação.
   [41.3] E as três cores passam a sair do mapa declarado. #3fb950 e #d29922
   não eram nossos — eram o verde e o amarelo de sistema, que mudam de
   aparelho para aparelho. */
.assin-fato.is-danger .assin-fato-valor { color: var(--estado-atraso, #DA8E81); }
.assin-fato.is-success .assin-fato-valor { color: var(--estado-ok, #7EB580); }
.assin-fato.is-warning .assin-fato-valor { color: var(--estado-espera, #F59E0B); }

/* [40.7 B] O nome do contrato UMA vez, e a versão e a data na segunda linha. */
.assin-contrato-nome {
  display: grid;
  gap: 0.15rem;
  padding: 0.2rem 0 0.7rem;
}

.assin-contrato-nome strong {
  font-size: 15px;
  font-weight: 700;
}

.assin-contrato-nome span {
  font-size: 13px;
  color: var(--muted, #a8adba);
}

/* [40.7 C] A AÇÃO VEM PRIMEIRO: o âmbar ocupa o espaço, e o "Baixar PDF" fica
   ao lado, em superfície, com 110px. Sem nada a assinar, sobra só o Baixar. */
.assin-contrato-acoes {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.assin-contrato-acoes .assin-assinar {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.assin-baixar {
  flex: 0 0 110px;
  width: 110px;
  min-height: 44px;
  padding: 0 0.6rem;
  border: 1px solid var(--border, rgba(255, 255, 255, .16));
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.assin-baixar:active { background: rgba(255, 255, 255, 0.08); }

/* [41.15] item 2 — `.assin-aceite` foi apagado: era o fio que separava o
   bloco de aceite dentro de "Minha assinatura", e esse bloco mudou de tela.
   Regra sem dono é o que o [41.12] mandou tirar. */

/* [40.7 D] As versões anteriores viram linhas baixas e quietas: o marcador
   cheio, o número e o que aconteceu. Eram itens de histórico do Financeiro
   emprestados para cá, cada um com um botão "Abrir" — e uma versão antiga não
   é coisa que se faz, é coisa que aconteceu. A linha inteira é o toque. */
.assin-versoes {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, .08));
}

.assin-versoes-rotulo {
  margin: 0 0 0.2rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #a8adba);
}

.assin-versao {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 34px;
  padding: 0.25rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.assin-versao-ponto {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted, #a8adba);
}

.assin-versao-nome {
  font-size: 13px;
  font-weight: 600;
}

.assin-versao-fato {
  min-width: 0;
  font-size: 13px;
  color: var(--muted, #a8adba);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   [41.14] MINHA ASSINATURA — O TRILHO E O CARTÃO DO PLANO.
   ═══════════════════════════════════════════════════════════════ */

/* O TRILHO. Quatro passos, na ordem em que acontecem. Ele só existe quando
   há algo a fazer — em dia, nem é montado ([41.11]). */
.assin-trilho {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
}

.assin-passo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

/* A linha que liga, colorida na marca até onde chegou. */
.assin-passo::before {
  content: "";
  position: absolute;
  top: 11px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #232120;
}

.assin-passo:first-child::before {
  display: none;
}

.assin-passo.is-feito::before,
.assin-passo.is-atual::before {
  background: var(--brand-strong);
}

.assin-passo-marca {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg, #0D0D0D);
  color: transparent;
}

.assin-passo-marca svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

.assin-passo.is-feito .assin-passo-marca {
  background: var(--brand-strong);
  color: var(--brand-ink, #1A1713);
}

/* Passo atual: anel aberto de 3px, e o rótulo em negrito na marca. */
.assin-passo.is-atual .assin-passo-marca {
  box-shadow: inset 0 0 0 3px var(--brand-strong);
}

.assin-passo.is-futuro .assin-passo-marca {
  box-shadow: inset 0 0 0 1px #2A2724;
}

.assin-passo-rotulo {
  color: #5C574F;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
}

.assin-passo.is-atual .assin-passo-rotulo {
  color: var(--brand-strong);
  font-weight: 800;
}

.assin-passo.is-feito .assin-passo-rotulo {
  color: var(--muted);
}

/* O fio, a frase do que falta, a consequência e a ação. */
.assin-trilho-cartao {
  display: flex;
  flex-direction: column;
}

.assin-falta {
  margin: 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line, rgba(255, 255, 255, .08));
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.assin-porque {
  /* [43.4] A margem de baixo era o respiro para o botão "Ler e assinar" que
     morava logo abaixo. O botão saiu (a ação aparece UMA vez por tela, junto
     do documento), e a frase passou a ser a última linha do cartão. */
  margin: 0.25rem 0 0;
  color: var(--dim, #6B665D);
  font-size: 12.5px;
  line-height: 1.35;
}

/* ── O CARTÃO DO PLANO ──────────────────────────────────────────
   Rótulo em cima, valor embaixo. Duas linhas curtas em vez de uma linha
   comprida que quebra. E NENHUMA coluna recebe `text-overflow: ellipsis`:
   se não couber, o texto quebra — a situação é o fato, e não se corta o
   fato para caber o detalhe. */

.assin-plano-topo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, .08));
}

.assin-plano-nome {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.assin-plano-valor {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* [43.3] A LISTA DE FATOS, À ESQUERDA, SEM GRADE.

   O que estava aqui era `.assin-plano-duas`, uma grade de
   `1fr 1px 1fr` com o filete no `::before` fixado na coluna 2 e a última
   coluna fixada na 3. Medido em Chromium a 390pt: a grade abria DUAS linhas e
   punha os dois fatos na metade direita, deixando a metade esquerda vazia com
   o filete descendo sozinho no meio. A colocação automática do Grid anda para
   depois do item fixado, então a primeira coluna caía na 3 e colidia com a
   última.

   Dois fatos não precisavam de duas colunas. Agora é uma lista: cada fato com
   rótulo em cima e valor embaixo, todos começando na MESMA margem do nome do
   plano. O filete separa um fato do outro — e só existe entre fatos que
   existem, porque `:first-child` não o recebe. */
.assin-plano-fatos {
  display: flex;
  flex-direction: column;
}

.assin-plano-fato {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line, rgba(255, 255, 255, .08));
}

.assin-plano-fato:first-child {
  border-top: none;
}

.assin-plano-fato:last-child {
  padding-bottom: 0;
}

.assin-plano-rotulo {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.assin-plano-num {
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  /* A palavra inteira, sempre. Nunca mais "Ag...". */
  white-space: normal;
  overflow-wrap: anywhere;
}

.assin-plano-sub {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* [41.14 C] O aviso de rascunho encolhe: de um caixote âmbar de quatro linhas
   para um fio, um ícone de 14px e duas linhas de 11,5px. Ele avisa; para de
   gritar. O texto inteiro continua na tela de leitura, que é onde se decide. */
.assin-rascunho {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.7rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line, rgba(255, 255, 255, .08));
  color: var(--dim, #6B665D);
  font-size: 11.5px;
  line-height: 1.35;
}

.assin-rascunho svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

/* O voltar da tela de leitura: uma linha quieta, à esquerda. */
.assin-voltar {
  align-self: flex-start;
  padding-left: 0;
}

/* ===========================================================================
   [51.6 a] A SESSÃO DO ALUNO NA FICHA DO PROFESSOR — a folha que abre em
   openSessaoExecutada, agora com ação: cabeçalho, faixa de números, o relato,
   as séries como fichinhas com selo, e SUA RESPOSTA presa embaixo (rodapé do
   modal). Lado do professor: fora do kit do aluno de propósito.
   =========================================================================== */
.sessao-detalhe {
  display: grid;
  gap: 1rem;
}

.sessao-cabeca {
  display: grid;
  grid-template-columns: 40px 44px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.sessao-cabeca .entity-avatar {
  width: 44px;
  height: 44px;
}

.sessao-cabeca-texto {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.sessao-cabeca-texto strong {
  font-size: 1.05rem;
}

.sessao-cabeca-texto span {
  font-size: 0.82rem;
  color: var(--muted);
}

.sessao-faixa {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 0.85rem 0;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
}

.sessao-faixa > div {
  display: grid;
  gap: 0.1rem;
  padding: 0 0.85rem;
  border-left: 1px solid var(--line);
}

.sessao-faixa > div:first-child {
  border-left: 0;
}

.sessao-faixa strong {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sessao-faixa span {
  font-size: 0.72rem;
  color: var(--muted);
}

.sessao-secao {
  display: grid;
  gap: 0.6rem;
}

.sessao-secao-cabeca {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.sessao-rotulo {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.sessao-apagado {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.sessao-esforco {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.sessao-esforco .nota-bolinhas {
  display: inline-flex;
  gap: 5px;
}

.sessao-esforco .nota-bolinha {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--brand-strong);
}

.sessao-esforco .nota-bolinha.is-cheia {
  background: var(--brand-strong);
}

.sessao-esforco .nota-texto {
  font-weight: 600;
}

.sessao-dor {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in oklab, var(--estado-atraso) 40%, transparent);
  background: color-mix(in oklab, var(--estado-atraso) 10%, transparent);
}

.sessao-dor-rotulo {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--estado-atraso);
}

.sessao-dor p {
  margin: 0;
  font-size: 0.9rem;
}

.sessao-item {
  display: grid;
  gap: 0.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.sessao-item-cabeca {
  display: grid;
  gap: 0.1rem;
}

.sessao-item-cabeca h4 {
  margin: 0;
  font-size: 0.95rem;
}

.sessao-prescricao {
  font-size: 0.78rem;
  color: var(--muted);
}

.sessao-fichas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sessao-fichas .ficha {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 26px;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.sessao-fichas .ficha.is-recorde {
  border-color: var(--brand-strong);
}

.sessao-fichas .ficha.is-abaixo {
  border-color: var(--estado-atraso);
}

.sessao-fichas .sessao-selo {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sessao-fichas .sessao-selo.is-recorde {
  color: var(--brand-strong);
}

.sessao-fichas .sessao-selo.is-abaixo {
  color: var(--estado-atraso);
}

.sessao-nao-fez {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.sessao-resposta {
  display: grid;
  gap: 0.5rem;
}

.sessao-resposta-campo {
  display: grid;
  gap: 0.3rem;
}

.sessao-resposta textarea {
  width: 100%;
  min-height: 56px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  color: inherit;
  font: inherit;
  resize: vertical;
}

.sessao-resposta .primary-action {
  width: 100%;
}

.sessao-fichas .sessao-prescrito {
  color: var(--muted);
}
