/* Cédric y Magda — conteúdo em champanhe e marfim (sem branco puro), menu navy com o logótipo, detalhes dourados. Mobile-first.
   Letras: Outfit (títulos) e Inter (texto), servidas pela própria aplicação (licença OFL, em assets/fonts). */

@font-face {
  font-family: "Outfit"; src: url("../fonts/outfit.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light;
  /* Conteúdo: fundo champanhe (liga o dourado do logótipo ao navy da lateral), cartões marfim */
  --bg: #e8dfcb;
  --surface: #f7f2e6;
  --surface-soft: #efe7d6;
  --text: #14213d;         /* 12:1 sobre o fundo, 14:1 sobre os cartões */
  --muted: #4f586c;        /* 5,4:1 sobre o fundo */
  --line: #d6cbb2;
  --line-soft: rgba(20, 33, 61, .1);
  --field-line: #6f7890;   /* limite dos campos: 3,9:1 sobre os cartões */
  --gold: #c9a24b;
  --gold-soft: #e8cf8e;
  --gold-text: #6e5212; /* dourado legível sobre o champanhe (5,5:1) */
  --gold-tint: rgba(201, 162, 75, .16);
  --gold-grad: linear-gradient(135deg, #f0d89b 0%, #c9a24b 55%, #b38a36 100%);
  --danger: #b3261e;
  --danger-bg: #f9e2dd;
  --ok: #1c7044;
  --ok-bg: #e2efe3;
  --warn: #7a5a12;
  --warn-bg: #f6e8c6;
  /* Gráficos (paleta validada: separação para daltonismo; o dourado leva sempre legenda, valor ou tabela) */
  --chart-paid: #2f8f5b;
  --chart-unpaid: #c9a24b;
  --chart-overdue: #c0392b;
  --chart-class: #1b3366;
  --chart-track: #e3d9c3;
  /* Menu (escuro, com o logótipo de fundo preto) */
  --black: #000;
  --navy-950: #071022;
  --navy-900: #0b1630;
  --navy-700: #13254a;
  --navy-600: #1b3366;
  --menu-text: #eef2fa;
  --menu-muted: #b9c3d8;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 8px 24px -12px rgba(20, 33, 61, .18);
  --shadow-hover: 0 2px 4px rgba(20, 33, 61, .06), 0 14px 32px -12px rgba(20, 33, 61, .25);
  --display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sidebar: 272px;
  --tabbar: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  font-feature-settings: "cv11", "ss01";
  background:
    radial-gradient(800px 360px at 100% -80px, rgba(201, 162, 75, .14), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body.app { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin: 0 0 .6em; color: var(--text); }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.2rem; }
a { color: var(--gold-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }
small { color: var(--muted); }
.muted, .hint { color: var(--muted); }
.hint { font-size: .88rem; margin: 0; }
.icon { width: 22px; height: 22px; flex: none; }

/* Logótipo: o ficheiro oficial tem fundo preto, por isso fica sobre áreas pretas e funde-se com elas. */
.brand, .sidebar-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img, .sidebar-brand img { display: block; background: var(--black); flex: none; }
.brand-name {
  font: 600 1.2rem/1.1 var(--display); letter-spacing: .01em; white-space: nowrap;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-name small {
  display: block; margin-top: 4px; font: 500 .66rem var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--menu-muted); -webkit-text-fill-color: var(--menu-muted);
}

/* Cabeçalho (telemóvel e tablet) */
.topbar {
  color-scheme: dark;
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(6px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
  background: linear-gradient(90deg, var(--black) 0, var(--black) 40%, var(--navy-900) 100%);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--gold), transparent) 1;
}
.brand img { width: 56px; height: 56px; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--menu-muted); cursor: pointer;
}
.icon-btn:hover, .icon-btn.active { color: var(--gold-soft); background: rgba(201, 162, 75, .16); }
.icon-btn .count { position: absolute; top: 2px; right: 0; margin: 0; box-shadow: 0 0 0 2px var(--navy-900); }
.topbar-avatar { display: inline-flex; border-radius: 50%; }
.topbar-avatar .avatar { width: 38px; height: 38px; font-size: .8rem; }

/* Barra inferior (telemóvel e tablet) */
.tabbar {
  color-scheme: dark;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  padding: 0 max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left));
  background: rgba(11, 22, 48, .96);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 -8px 24px -12px rgba(20, 33, 61, .45);
}
.tabbar a {
  flex: 1; max-width: 140px; min-height: var(--tabbar);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: 600 .72rem var(--sans); letter-spacing: .01em; color: var(--menu-muted); text-decoration: none;
}
.tabbar a .icon { width: 44px; height: 28px; padding: 3px 11px; border-radius: 999px; transition: background .15s; }
.tabbar a:hover { color: var(--menu-text); }
.tabbar a.active { color: var(--gold-soft); }
.tabbar a.active .icon { background: rgba(201, 162, 75, .2); }

/* Barra lateral (computador) */
.sidebar { display: none; }

.shell { min-width: 0; }
.container { max-width: 960px; margin: 0 auto; padding: 22px 16px 24px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.page-head .btn { flex: none; }
.greeting { margin-bottom: 20px; }
.greeting h1 { margin: 0; font-size: 2rem; }
.eyebrow { margin: 0 0 4px; font: 600 .74rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
.container > h2 { margin-top: 26px; }

/* Cartões e listas */
.card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h2 { margin: 0; min-width: 0; }
.card-head .btn { flex: none; white-space: nowrap; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.stat {
  position: relative; overflow: hidden; display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 18px 16px 16px; color: var(--muted); font-size: .9rem; line-height: 1.35; box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
}
.stat::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gold-grad); }
a.stat:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); color: var(--muted); }
/* Algarismos alinhados ("25,00 €") */
.stat strong {
  display: block; margin-bottom: 4px; font: 600 1.9rem/1.15 var(--display); font-variant-numeric: tabular-nums;
  color: var(--text); overflow-wrap: anywhere;
}
.list, .rows { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.list li:first-child { border-top: 0; padding-top: 4px; }
.rows li { margin-bottom: 10px; }
.rows a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s, border-color .15s;
}
.rows a:hover { border-color: rgba(201, 162, 75, .6); box-shadow: var(--shadow-hover); transform: translateY(-1px); color: var(--text); }
.row-main { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.row-main small { display: block; font-weight: 400; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.rows a .avatar { margin-right: 2px; }
.rows a .row-main { flex: 1; }

.badge {
  display: inline-flex; align-items: center; font: 600 .72rem/1 var(--sans); padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); white-space: nowrap;
}
.badge-admin, .badge-ativo { border-color: rgba(201, 162, 75, .55); background: var(--gold-tint); color: var(--gold-text); }
.badge-pay-pendente { border-color: rgba(201, 162, 75, .6); background: var(--warn-bg); color: var(--warn); }
.badge-inativo, .badge-pay-atraso, .badge-evento-cancelado { border-color: rgba(179, 38, 30, .3); background: var(--danger-bg); color: var(--danger); }
.badge-pay-pago, .badge-evento-inscrito, .badge-evento-participou { border-color: rgba(28, 112, 68, .3); background: var(--ok-bg); color: var(--ok); }

.details { margin: 0 0 12px; }
.details div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.details div:first-child { border-top: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 500; }
.empty { color: var(--muted); text-align: center; padding: 24px 8px; margin: 0; }

/* Formulários */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=date], input[type=time], input[type=file], select, textarea {
  width: 100%; min-height: 50px; padding: 11px 14px; font: 400 16px var(--sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 75, .3); outline: none; }
::placeholder { color: var(--muted); opacity: .8; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.form .check { flex-direction: row; align-items: center; gap: 12px; font-weight: 400; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.field-error { color: var(--danger); font-weight: 500; font-size: .9rem; }
.filters { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
textarea { min-height: 100px; resize: vertical; }
input[type=file] { padding: 10px; }
.checks { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 14px; margin: 0; }
.checks legend { font-weight: 600; font-size: .92rem; padding: 0 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 10px 22px;
  font: 600 1rem var(--sans); letter-spacing: .01em; color: #1a1305; background: var(--gold-grad);
  border: 1px solid #b38a36; border-radius: var(--radius-sm); text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(160, 120, 40, .9); transition: filter .15s, transform .15s, background .15s;
}
.btn:hover { filter: brightness(1.06); color: #1a1305; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: rgba(20, 33, 61, .25); box-shadow: none; }
.btn-ghost:hover { background: var(--gold-tint); border-color: var(--gold); color: var(--text); filter: none; }
.btn-danger { background: var(--surface); border-color: rgba(179, 38, 30, .5); color: var(--danger); box-shadow: none; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); filter: none; }
.btn-small { min-height: 40px; padding: 6px 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn .icon { width: 20px; height: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; border: 1px solid; border-left-width: 4px; overflow-wrap: anywhere; }
.alert a { color: inherit; font-weight: 600; }
.alert-error { background: var(--danger-bg); border-color: rgba(179, 38, 30, .35); border-left-color: var(--danger); color: var(--danger); }
.alert-success { background: var(--ok-bg); border-color: rgba(28, 112, 68, .3); border-left-color: var(--ok); color: var(--ok); }
.alert-warning { background: var(--warn-bg); border-color: rgba(201, 162, 75, .5); border-left-color: var(--gold); color: var(--warn); }

/* Pessoas e fotografias */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none;
  background: linear-gradient(135deg, var(--navy-600), var(--navy-900)); border: 2px solid var(--gold-soft);
}
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; font: 600 .92rem var(--display); color: var(--gold-soft); }
.avatar-md { width: 56px; height: 56px; font-size: 1.15rem; }
.avatar-lg { width: 116px; height: 116px; font-size: 2.1rem; border-width: 3px; }
.profile-card { display: flex; flex-direction: column; gap: 12px; }
.profile-card .avatar-lg { align-self: center; }
.profile-card h2 { margin: 0; }
.people { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.person { display: inline-flex; align-items: center; gap: 10px; }
.list li.person-row { flex-direction: row; align-items: center; gap: 12px; }
.person-info { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.person-info > .badge { align-self: flex-start; margin-top: 6px; }
.person-row > .badge { margin-left: auto; white-space: normal; text-align: right; }
.list form { margin-top: 6px; }
.list + .form { margin-top: 18px; }

/* Mensalidades e inscrições */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.month-nav strong { font: 600 1.15rem var(--display); text-align: center; }
.month-nav .btn { white-space: nowrap; padding: 6px 12px; }
.container > form + .hint { margin: 10px 0 18px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); background: var(--surface);
  font-size: .9rem; font-weight: 500; min-height: 40px; display: inline-flex; align-items: center; transition: all .15s;
}
.tabs a:hover { color: var(--text); border-color: var(--field-line); }
.tabs a.active { border-color: var(--navy-900); background: var(--navy-900); color: var(--gold-soft); }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pay-row .person-info { flex: 1; }
.list li .actions { margin-top: 10px; }
.list li .actions form { margin: 0; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.inline-form select { flex: 1; min-width: 180px; }

/* Eventos e notificações */
.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: 999px; background: var(--gold-grad); color: #1a1305; font: 700 .7rem var(--sans);
}
.prose { overflow-wrap: anywhere; margin: 0 0 12px; }
.list li.notice-unread { border-left: 3px solid var(--gold); padding-left: 12px; }

/* Página "Mais" */
.menu-profile {
  display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 22px; text-decoration: none; color: var(--menu-text);
  background: radial-gradient(300px 140px at 100% 0, rgba(201, 162, 75, .28), transparent 70%), linear-gradient(135deg, var(--navy-700), var(--navy-950));
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu-profile:hover { color: var(--menu-text); box-shadow: var(--shadow-hover); }
.menu-profile-info { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.menu-profile-info strong { font: 600 1.1rem var(--display); }
.menu-profile-info small { color: var(--menu-muted); }
.menu-profile > .icon { color: var(--gold-soft); width: 18px; height: 18px; }
.menu-list a > .icon { color: var(--muted); width: 18px; height: 18px; }
.menu-group { margin-bottom: 20px; }
.menu-group h2 { margin: 0 0 8px 4px; font: 600 .74rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
.menu-list {
  list-style: none; margin: 0; padding: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu-list li + li { border-top: 1px solid var(--line-soft); }
.menu-list a { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 16px; color: var(--text); text-decoration: none; font-weight: 500; }
.menu-list a:hover { background: var(--surface-soft); color: var(--text); }
.menu-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--navy-900); color: var(--gold-soft); flex: none; }
.menu-icon .icon { width: 20px; height: 20px; }
.menu-label { flex: 1; min-width: 0; }
.menu-logout { margin-bottom: 20px; }

/* Cartão "Instalar aplicação" (Mais e Perfil). O atributo hidden ganha sempre às classes com display. */
[hidden] { display: none !important; }
.install-card .hint { margin-bottom: 14px; }
.install-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }

/* Atividades, plano curricular e aulas (fase 6) */
.inline-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .85rem; }
.inline-form label.grow { flex: 1 1 160px; min-width: 0; }
.inline-form label.narrow { flex: 0 0 76px; }
.inline-form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; min-height: 44px; }
.list li .inline-form { margin-top: 0; }
.checks-group { margin: 12px 0 2px; font: 600 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.checks-group:first-of-type { margin-top: 4px; }
.activity-line { color: var(--gold-text); font-weight: 600; }
.plan-list { list-style: none; margin: 0; padding: 0; counter-reset: plan; }
.plan-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); counter-increment: plan; }
.plan-list li:first-child { border-top: 0; }
.plan-list li::before { content: counter(plan); flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--gold-tint); color: var(--gold-text); font-weight: 600; font-size: .85rem; }
.plan-list li.is-inactive { opacity: .6; }
.plan-main { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.plan-move { display: flex; gap: 6px; flex: none; }
.plan-move .btn-small { min-width: 44px; min-height: 44px; padding: 6px; }
.plan-move .btn[disabled] { opacity: .35; cursor: default; }
.lesson-class { display: flex; flex-direction: column; gap: 2px; margin: -8px 0 16px; overflow-wrap: anywhere; }
.date-picker { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.date-picker label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: .92rem; flex: 1 1 180px; }
.tag-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list li { padding: 5px 10px; border-radius: 999px; background: var(--gold-tint); border: 1px solid rgba(201, 162, 75, .35); font-size: .88rem; overflow-wrap: anywhere; }
.tag-list small { color: var(--muted); }
.lesson-notes { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--gold); background: var(--surface-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; overflow-wrap: anywhere; }
.check-tools { display: flex; gap: 8px; margin-bottom: 6px; }
.attendance, .plan-checks { list-style: none; margin: 0; padding: 0; }
.attendance li, .plan-checks li { border-top: 1px solid var(--line-soft); }
.attendance li:first-child, .plan-checks li:first-child { border-top: 0; }
.attendance .check, .plan-checks .check { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; cursor: pointer; overflow-wrap: anywhere; }
.attendance .avatar { width: 36px; height: 36px; flex: none; }
.plan-checks li { display: flex; align-items: center; gap: 10px; }
.plan-checks li .check { flex: 1; min-width: 0; }
.plan-checks li.was-previous { box-shadow: inset 3px 0 0 var(--gold); padding-left: 10px; }
.plan-video { flex: none; font-size: .88rem; font-weight: 600; }
.lesson-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.lesson-list > li { gap: 6px; }
.today-lessons { border-color: rgba(201, 162, 75, .55); }
.list li.today-lesson { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.today-lesson > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.today-lesson .btn { flex: none; }
.page-actions { margin: -6px 0 16px; }

/* Definições */
.settings .card h2 { margin-bottom: 4px; }
.settings > .btn { margin-bottom: 16px; }
.school-card { margin-top: 16px; }

/* Páginas de entrada (login, recuperar, erros): fundo navy com brilho dourado, cartão claro. */
body.auth {
  min-height: 100vh; padding: 28px 16px; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(600px 380px at 50% 0%, rgba(201, 162, 75, .28), transparent 70%),
    radial-gradient(120% 80% at 50% 0%, var(--navy-600) 0%, var(--navy-900) 60%, var(--navy-950) 100%);
}
.auth-card {
  width: 100%; max-width: 430px; padding: 30px 24px 28px;
  background: var(--surface); border-radius: 26px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
}
.auth-logo {
  display: block; width: 220px; max-width: 78%; height: auto; margin: -70px auto 16px; border-radius: 28px; background: var(--black);
  box-shadow: 0 0 0 4px var(--surface), 0 24px 50px -16px rgba(20, 33, 61, .6);
}
.auth-card { margin-top: 70px; }
.auth-school { text-align: center; margin: 0 0 24px; font: 600 1.7rem/1.1 var(--display); color: var(--text); }
.auth-school small {
  display: block; margin-top: 8px; font: 600 .72rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-text);
}
.auth-card h1 { font-size: 1.45rem; text-align: center; }
.auth-card .btn { width: 100%; }
.auth-link { text-align: center; margin: 20px 0 0; }

/* Telemóveis muito estreitos: o nome cabe ao lado do sino e da fotografia. */
/* Em atraso */
.stat-danger::before { background: var(--danger); }
.stat-danger strong { color: var(--danger); }
.alert-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; transition: box-shadow .15s; }
.alert-link:hover { color: var(--danger); box-shadow: var(--shadow); }

/* Barra de progresso (mensalidades do mês) */
.progress-block { margin: -4px 0 18px; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.progress-label strong { color: var(--text); font-variant-numeric: tabular-nums; }
.progress { display: block; width: 100%; height: 10px; }
.progress-track { fill: var(--chart-track); }
.progress-fill { fill: var(--chart-paid); }

/* Gráficos */
.chart-grid { display: grid; gap: 0 16px; }
.chart-card h2 { margin-bottom: 12px; }
.chart-legend, .cal-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; padding: 0; font-size: .85rem; color: var(--muted); }
.chart-legend li, .cal-legend li { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.sw-paid { background: var(--chart-paid); }
.sw-unpaid { background: var(--chart-unpaid); }
.sw-overdue { background: var(--chart-overdue); }
.sw-track { background: var(--chart-track); border: 1px solid var(--line); }
.bar-chart { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bar-svg { display: block; width: 100%; height: 172px; overflow: visible; }
.bar-month { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.bar-col.is-current .bar-month { color: var(--text); font-weight: 700; }
.chart-base { stroke: var(--line); stroke-width: 1; }
.chart-value { fill: var(--text); font: 600 10.5px var(--sans); font-variant-numeric: tabular-nums; }
.hit { fill: transparent; }
.mark-paid { fill: var(--chart-paid); }
.mark-unpaid { fill: var(--chart-unpaid); }
.mark-overdue { fill: var(--chart-overdue); }
.bar-grow:hover path { opacity: .85; }
.chart-table { margin-top: 14px; font-size: .9rem; }
.chart-table summary { cursor: pointer; color: var(--gold-text); font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.table-wrap { overflow-x: auto; }
.chart-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { padding: 8px 6px; border-top: 1px solid var(--line-soft); text-align: right; }
.chart-table th:first-child { text-align: left; font-weight: 500; }
.chart-table thead th { color: var(--muted); font-weight: 600; border-top: 0; }
.ring-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ring { width: 132px; height: 132px; flex: none; }
.ring circle { fill: none; stroke-width: 13; }
.ring-track { stroke: var(--chart-track); }
.ring-fill { stroke: var(--chart-paid); stroke-linecap: round; }
.ring-value { fill: var(--text); font: 700 24px var(--display); }
.ring-label { fill: var(--muted); font: 500 11px var(--sans); }
.ring-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 180px; font-size: .9rem; color: var(--muted); }
.ring-legend li { display: flex; align-items: center; gap: 9px; }
.ring-legend strong { color: var(--text); font-variant-numeric: tabular-nums; }
.hbar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hbar-label { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; margin-bottom: 4px; }
.hbar-label span { min-width: 0; overflow-wrap: anywhere; }
.hbar-label strong { font-variant-numeric: tabular-nums; }
.hbar { display: block; width: 100%; height: 10px; overflow: hidden; }
.hbar line { stroke-width: 10px; }
.hbar-track { stroke: var(--chart-track); }
.hbar-fill { stroke: var(--chart-class); stroke-linecap: round; }

/* Animações: só o ponto de partida; o estado final é o normal, por isso sem animação o gráfico fica igual */
.bar-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y .9s cubic-bezier(.2, .8, .2, 1) both; }
.grow-x { transform-box: fill-box; transform-origin: 0 50%; animation: grow-x .9s cubic-bezier(.2, .8, .2, 1) both; }
.ring-fill { animation: ring 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.chart-value { animation: fade 1s ease-out both; }
.d2 { animation-delay: .07s; } .d3 { animation-delay: .14s; } .d4 { animation-delay: .21s; } .d5 { animation-delay: .28s; } .d6 { animation-delay: .35s; }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes ring { from { stroke-dasharray: 0 100; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .bar-grow, .grow-x, .ring-fill, .chart-value { animation: none; }
}

/* Calendário */
.cal-today-link { text-align: center; margin: -8px 0 14px; font-size: .9rem; }
.cal-card { padding: 14px 10px; }
.cal-legend { padding: 0 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { text-align: center; font: 600 .72rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.cal-day {
  min-height: 52px; min-width: 0; padding: 5px 4px; border-radius: 10px; background: var(--surface-soft);
  display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); text-decoration: none;
}
.cal-day.is-empty { background: transparent; }
a.cal-day { border: 1px solid transparent; transition: border-color .15s, background .15s; }
a.cal-day:hover { border-color: var(--gold); color: var(--text); background: var(--gold-tint); }
.cal-num { font: 600 .9rem/1.4 var(--display); font-variant-numeric: tabular-nums; }
.cal-day.is-today .cal-num { background: var(--navy-900); color: var(--gold-soft); border-radius: 999px; min-width: 26px; text-align: center; padding: 0 6px; }
.cal-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; width: 100%; }
.cal-chip { width: 7px; height: 7px; border-radius: 50%; }
.cal-chip-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cal-more { font-size: .68rem; line-height: 7px; color: var(--muted); }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.cal-aula { background: var(--navy-600); }
.cal-evento { background: var(--gold); }
.cal-chip.is-cancelled { opacity: .45; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda-day { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-soft); scroll-margin-top: 90px; }
.agenda-day:first-child { border-top: 0; padding-top: 4px; }
.agenda-day:target { background: var(--gold-tint); border-radius: var(--radius-sm); padding-left: 8px; padding-right: 8px; }
.agenda-day.is-past { opacity: .6; }
.agenda-date { margin: 0; display: flex; flex-direction: column; line-height: 1.2; }
.agenda-date strong { font: 600 1.6rem var(--display); font-variant-numeric: tabular-nums; }
.agenda-date span { font-size: .75rem; color: var(--muted); }
.agenda-day.is-today .agenda-date strong { color: var(--gold-text); }
.agenda-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.agenda-item { display: grid; grid-template-columns: 10px 44px 1fr; gap: 8px; align-items: baseline; }
.agenda-time { font-weight: 600; font-variant-numeric: tabular-nums; font-size: .9rem; }
.agenda-text { min-width: 0; overflow-wrap: break-word; hyphens: auto; display: flex; flex-direction: column; }
.agenda-text a { font-weight: 600; color: var(--text); }
.agenda-text a:hover { color: var(--gold-text); }

@media (max-width: 379px) {
  .brand { gap: 8px; }
  .brand img { width: 48px; height: 48px; }
  .brand-name { font-size: 1.05rem; }
  .brand-name small { font-size: .58rem; letter-spacing: .12em; }
  .topbar-actions { gap: 2px; }
}

/* Fase 7: imagens dos eventos e lista de espera */
.badge-evento-espera { border-color: rgba(201, 162, 75, .6); background: var(--warn-bg); color: var(--warn); }
.event-thumb { width: 56px; height: 56px; flex: none; overflow: hidden; font-size: .7rem; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--surface-soft); }
.event-cover { margin: 0 0 12px; }
.event-cover a { display: block; }
.event-cover img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; border-radius: var(--radius); background: var(--black); box-shadow: var(--shadow); }
.event-cover + .btn { margin-bottom: 16px; }
.event-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.event-gallery a { display: block; }
.event-gallery img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
.image-admin { list-style: none; margin: 0 0 16px; padding: 0; }
.image-admin li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.image-admin li:first-child { border-top: 0; padding-top: 4px; }
.image-admin img { display: block; width: 88px; height: 88px; overflow: hidden; font-size: .7rem; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--surface-soft); }
.image-admin-info { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; flex: 1; }

/* Fase 8: loja */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.text-danger { color: var(--danger); }
.product-grid { list-style: none; margin: 16px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.product-card:hover { border-color: rgba(201, 162, 75, .6); box-shadow: var(--shadow-hover); transform: translateY(-1px); color: var(--text); }
.product-photo { display: block; aspect-ratio: 1; background: var(--surface-soft); border-bottom: 1px solid var(--line-soft); }
.product-photo img { display: block; width: 100%; height: 100%; object-fit: cover; overflow: hidden; font-size: .7rem; }
.product-info { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; min-width: 0; overflow-wrap: anywhere; }
.product-price { font-weight: 600; color: var(--gold-text); }
.product-figure { margin: 0 0 14px; }
.product-figure img { display: block; width: 100%; max-width: 520px; height: auto; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--surface-soft); }
.product-thumb { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-soft); overflow: hidden; font-size: .7rem; }
.cart-photo { flex: none; width: 56px; }
.cart-photo:empty { display: none; }
.cart-line, .product-admin { flex-direction: row !important; align-items: flex-start; gap: 12px !important; }
.cart-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cart-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.cart-actions form { margin: 0; }
.cart-actions .inline-form { margin-top: 0; }
.qty { width: 76px; min-height: 40px; }
.cart-subtotal { flex: none; white-space: nowrap; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 1.1rem; }
.order-line { flex-direction: row !important; justify-content: space-between; align-items: flex-start; gap: 12px !important; }
.order-line > span { display: flex; flex-direction: column; min-width: 0; }
.product-admin { flex-wrap: wrap; justify-content: space-between; }
.product-admin-main { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.product-admin-main > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.product-admin .actions { margin-top: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.badges:empty { display: none; }
.badge-pedido-pedido { border-color: rgba(201, 162, 75, .6); background: var(--warn-bg); color: var(--warn); }
.badge-pedido-pronto { border-color: rgba(201, 162, 75, .55); background: var(--gold-tint); color: var(--gold-text); }
.badge-pedido-concluido { border-color: rgba(28, 112, 68, .3); background: var(--ok-bg); color: var(--ok); }
.badge-pedido-cancelado { border-color: rgba(179, 38, 30, .3); background: var(--danger-bg); color: var(--danger); }

@media (min-width: 560px) {
  .stats { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (min-width: 760px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .event-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .event-cover img { max-height: 640px; }
  .chart-grid { grid-template-columns: 1fr 1fr; }
  .chart-wide { grid-column: 1 / -1; }
  .cal-card { padding: 18px; }
  .cal-day { min-height: 96px; align-items: stretch; padding: 6px; }
  .cal-num { align-self: flex-start; }
  .cal-chips { flex-direction: column; flex-wrap: nowrap; }
  .cal-chip { width: auto; height: auto; border-radius: 6px; padding: 2px 6px; font-size: .72rem; line-height: 1.35; overflow: hidden; }
  .cal-chip-text { position: static; width: auto; height: auto; clip-path: none; display: block; overflow: hidden; text-overflow: ellipsis; }
  .cal-aula.cal-chip { background: var(--navy-900); color: var(--menu-text); }
  .cal-evento.cal-chip { background: var(--gold-tint); color: var(--gold-text); border: 1px solid rgba(201, 162, 75, .6); }
  .cal-more { line-height: 1.3; text-align: left; padding-left: 4px; }
  .bar-svg { height: 200px; }
  .container { padding: 30px 24px 32px; }
  .filters { grid-template-columns: 2fr 1fr 1fr auto; }
  .row-side { flex-direction: row; align-items: center; }
  .greeting h1 { font-size: 2.3rem; }
}

/* Computador: barra lateral fixa com o logótipo em destaque e o menu completo, agrupado. */
@media (min-width: 1024px) {
  body.app { padding-bottom: 0; }
  .topbar, .tabbar { display: none; }
  .sidebar {
    color-scheme: dark;
    position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar);
    display: flex; flex-direction: column; overflow-y: auto;
    background: linear-gradient(180deg, var(--black) 0, var(--black) 230px, var(--navy-900) 420px, var(--navy-700) 100%);
    box-shadow: 4px 0 30px -10px rgba(20, 33, 61, .45);
    scrollbar-width: thin; scrollbar-color: var(--navy-600) transparent;
  }
  .sidebar-brand { flex-direction: column; gap: 6px; padding: 22px 16px 18px; text-align: center; }
  .sidebar-brand img { width: 140px; height: 140px; }
  .sidebar-brand .brand-name { font-size: 1.35rem; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 14px 16px; flex: 1; }
  .side-group { margin: 16px 12px 6px; font: 600 .68rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
  .side-nav a {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px;
    border-radius: var(--radius-sm); color: var(--menu-muted); text-decoration: none; font-weight: 500; font-size: .95rem;
    transition: background .15s, color .15s;
  }
  .side-nav a span:not(.count) { flex: 1; }
  .side-nav a:hover { background: rgba(255, 255, 255, .06); color: var(--menu-text); }
  .side-nav a.active { background: var(--gold-grad); color: #1a1305; font-weight: 600; box-shadow: 0 8px 20px -12px rgba(201, 162, 75, .9); }
  .side-nav a.active .count { background: #1a1305; color: var(--gold-soft); }
  .side-user {
    display: flex; align-items: center; gap: 10px; margin: 0 14px 16px; padding: 12px; color: var(--menu-text);
    border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
  }
  .side-user-info { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: .9rem; line-height: 1.3; }
  .side-user-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-user-info small { color: var(--menu-muted); }
  .side-user form { margin: 0; }
  .shell { margin-left: var(--sidebar); }
  .container { padding: 40px 40px 48px; }
}

/* ---- Fase 9: site público ---- */
body.site { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 10px 14px; background: var(--surface); border-radius: var(--radius-sm); }
.skip:focus { left: 16px; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--navy-950); color: var(--menu-text); box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .6); }
.site-bar { max-width: 1340px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; position: relative; }
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--menu-text); text-decoration: none; min-width: 0; margin-right: auto; }
.site-brand img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.site-brand .brand-name { font: 600 1.05rem/1.1 var(--display); color: var(--menu-text); }
.site-brand .brand-name small { display: block; margin-top: 3px; font: 600 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }
.site-member { color: var(--gold-soft); font-weight: 600; font-size: .88rem; text-decoration: none; padding: 10px 2px; text-align: right; line-height: 1.2; }
.site-member:hover { color: #fff; }
.site-menu > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border: 1px solid rgba(232, 207, 142, .45); border-radius: 999px; color: var(--menu-text); font-weight: 600; font-size: .9rem;
}
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu-icon, .site-menu-icon::before, .site-menu-icon::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.site-menu-icon { position: relative; }
.site-menu-icon::before, .site-menu-icon::after { content: ""; position: absolute; left: 0; }
.site-menu-icon::before { top: -5px; }
.site-menu-icon::after { top: 5px; }
.site-menu nav {
  position: absolute; left: 0; right: 0; top: 100%; padding: 8px 16px 16px; background: var(--navy-950);
  display: flex; flex-direction: column; border-top: 1px solid rgba(232, 207, 142, .2);
}
.site-menu nav a { color: var(--menu-text); text-decoration: none; padding: 12px 4px; font-weight: 500; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.site-menu nav a[aria-current="page"] { color: var(--gold-soft); }
.site-menu nav .site-cta { margin-top: 12px; border-bottom: 0; color: #1a1305; justify-content: center; }
.site-main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 16px 32px; }
.site-main .back { margin: 0 0 12px; }
.site-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; margin: -24px -16px 24px; padding: 36px 16px 32px;
  color: var(--menu-text);
  background:
    radial-gradient(600px 380px at 50% 0%, rgba(201, 162, 75, .28), transparent 70%),
    radial-gradient(120% 80% at 50% 0%, var(--navy-600) 0%, var(--navy-900) 60%, var(--navy-950) 100%);
}
.site-hero img { width: 150px; height: 150px; border-radius: 28px; box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .7); }
.site-hero h1 { color: #fff; font-size: 2.1rem; margin: 0; }
.site-hero h1 small { display: block; margin-top: 8px; font: 600 .78rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold-soft); }
.site-hero .actions { justify-content: center; margin-top: 18px; }
.site-hero .btn-ghost { background: transparent; color: var(--menu-text); border-color: rgba(232, 207, 142, .55); }
.site-hero .btn-ghost:hover { background: rgba(232, 207, 142, .12); color: #fff; }
.site-block { margin-bottom: 24px; }
.site-block-img { display: block; width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 14px; background: var(--surface-soft); overflow: hidden; font-size: .7rem; }
.site-text { overflow-wrap: anywhere; }
.site-text > :first-child { margin-top: 0; }
.site-text h2 { margin-top: 1.2em; }
.site-text h3 { font: 600 1.05rem var(--display); margin: 1em 0 .4em; }
.site-text ul { padding-left: 1.3em; }
.site-text a { color: var(--gold-text); font-weight: 600; }
.site-section { margin-top: 28px; }
.site-cards, .site-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.site-card { display: flex; flex-direction: column; gap: 6px; margin: 0; overflow: hidden; }
.site-card > a { display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none; }
.site-card > a:hover strong { color: var(--gold-text); }
.site-card strong { font: 600 1.08rem var(--display); }
.site-card p { margin: 4px 0 0; }
.site-card .btn { align-self: flex-start; margin-top: 8px; }
.site-card-img { display: block; width: calc(100% + 40px); max-width: none; margin: -20px -20px 4px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-soft); overflow: hidden; font-size: .7rem; }
.site-price { font-weight: 700; color: var(--gold-text); }
.site-list .card { margin: 0; }
.site-class { display: flex; gap: 16px; align-items: flex-start; }
.site-class-time { flex: none; font: 700 1.25rem var(--display); color: var(--gold-text); min-width: 58px; }
.site-class-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-teacher { display: flex; flex-direction: column; gap: 16px; }
.site-teacher img { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; background: var(--surface-soft); overflow: hidden; font-size: .7rem; flex: none; }
.site-article { max-width: 720px; }
.site-cover { display: block; width: 100%; height: auto; border-radius: var(--radius); margin: 12px 0 18px; background: var(--surface-soft); overflow: hidden; font-size: .7rem; }
.site-lead { font-size: 1.1rem; font-weight: 500; }
.site-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.site-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-soft); overflow: hidden; font-size: .7rem; }
.site-contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.site-contacts .label { display: block; font: 600 .72rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.site-form { max-width: 560px; }
.site-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-footer { background: var(--navy-950); color: var(--menu-muted); margin-top: 24px; }
.site-footer-inner { max-width: 960px; margin: 0 auto; padding: 28px 16px 36px; display: flex; flex-direction: column; gap: 18px; }
.site-footer-name { margin: 0; font: 600 1.1rem var(--display); color: var(--menu-text); }
.site-footer-name small { display: block; margin-top: 4px; font: 600 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }
.site-footer a { color: var(--menu-text); }
.site-footer .site-contacts .label { color: var(--gold-soft); }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; }
@media (max-width: 379px) {
  .site-brand .brand-name small { display: none; }
}
@media (min-width: 640px) {
  .site-cards { grid-template-columns: repeat(2, 1fr); }
  .site-teacher { flex-direction: row; }
  .site-hero { flex-direction: row; text-align: left; justify-content: center; gap: 32px; padding: 48px 16px; }
  .site-hero .actions { justify-content: flex-start; }
}
@media (min-width: 1380px) {
  .site-brand { flex: none; }
  .site-menu { order: 2; }
  .site-member { order: 3; }
  .site-menu > summary { display: none; }
  .site-menu nav { position: static; flex-direction: row; align-items: center; gap: 4px; padding: 0; border: 0; background: none; }
  .site-menu nav a { border: 0; padding: 10px 8px; font-size: .92rem; white-space: nowrap; }
  .site-member { white-space: nowrap; }
  .site-menu nav .site-cta { margin: 0 0 0 8px; }
  .site-cards { grid-template-columns: repeat(3, 1fr); }
  .site-main { padding-top: 32px; }
  .site-hero { margin-top: -32px; }
}
/* Gestão do site */
.site-admin-head { margin-top: 28px; }
.site-admin-block .card-head .actions { margin: 0; }
.site-admin-block .card-head form { margin: 0; }
.site-admin-img { display: block; max-width: 240px; width: 100%; height: auto; border-radius: var(--radius-sm); background: var(--surface-soft); overflow: hidden; font-size: .7rem; }
.site-admin-photo { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; }
.site-admin-delete { margin-top: 14px; }
.site-help { margin: 0 0 16px; font-size: .9rem; color: var(--muted); }
.site-help summary { cursor: pointer; font-weight: 600; color: var(--gold-text); min-height: 32px; }
.site-help ul { margin: 6px 0 0; padding-left: 1.2em; }
.site-help code { font-size: .85rem; background: var(--surface-soft); padding: 1px 5px; border-radius: 6px; }
