/* ===== Tokens — identidade Formação em Perfumaria (cores extraídas do Canva) ===== */
:root {
  --paper: #EEECE9;
  --paper-2: #E4E0DA;
  --card: #F8F6F3;
  --ink: #1D1311;
  --ink-2: #4E403C;
  --muted: #7C6D68;
  --line: rgba(29, 19, 17, .12);
  --rust: #A8382A;          /* laranja/terracota oficial da formação */
  --rust-deep: #7E2A1F;
  --espresso: #221010;
  --salmon: #D78A7D;
  --radius: 28px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.35, .5, 1);
  --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
img { display: block; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 12px; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Botões ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; letter-spacing: -.005em; cursor: pointer; text-decoration: none; transition: transform .2s var(--ease), background .2s, border-color .2s, opacity .2s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--soft { background: var(--paper-2); color: var(--ink); }
.btn--soft:hover { background: #DAD5CE; }
.btn--rust { background: var(--rust); color: #fff; }
.btn--rust:hover { background: var(--rust-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: rgba(29,19,17,.3); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--danger { background: #8E1F16; color: #fff; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.iconbtn:hover { background: var(--paper-2); }
.iconbtn:active { transform: scale(.94); }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: rgba(29,19,17,.35); }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip--ghost { border-color: transparent; color: var(--rust); padding: 0 8px; }
.empty { color: var(--muted); padding: 28px 4px; text-align: center; font-size: 15px; }

/* ===== Estrutura pública ===== */
.pub { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.top { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; padding: max(22px, env(safe-area-inset-top)) 20px 6px; max-width: 1080px; width: 100%; margin: 0 auto; }
.top__logo { width: clamp(138px, 38vw, 230px); height: auto; margin-top: 4px; }
.top__title { text-align: right; }
.top__title h1 { font-family: 'Open Sans', sans-serif; font-weight: 400; font-style: normal; font-size: clamp(28px, 8.2vw, 52px); line-height: .98; letter-spacing: -.04em; }
.top__eyebrow { color: var(--rust); font-size: clamp(18px, 4.6vw, 26px); letter-spacing: -.02em; margin-top: 4px; min-height: 1.3em; transition: opacity .3s; }
.pubmain { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 18px 16px 0; outline: none; }
.pubmain[data-view="calendario"] { max-width: 1080px; }
.pubmain > .anim { animation: viewIn .5s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.foot { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; width: 100%; margin: 0 auto; padding: 48px 20px calc(118px + env(safe-area-inset-bottom)); }
.foot img { width: 118px; height: auto; }
.foot .foot__mark { width: 36px; }

/* ===== Barra de navegação ===== */
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.tabbar__inner { position: relative; display: flex; width: min(100%, 420px); gap: 2px; padding: 6px; background: rgba(29, 17, 15, .94); border-radius: 999px; box-shadow: 0 18px 40px -14px rgba(34,16,16,.55), inset 0 1px 0 rgba(255,255,255,.08); pointer-events: auto; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.tabbar__ind { position: absolute; top: 6px; left: 0; height: calc(100% - 12px); border-radius: 999px; background: var(--paper); transition: transform .5s var(--spring), width .5s var(--spring); }
.tab { position: relative; z-index: 1; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px; padding: 0 10px; border: 0; background: none; border-radius: 999px; color: rgba(255,255,255,.62); font-size: 14px; font-weight: 600; cursor: pointer; transition: color .3s; }
.tab:hover { color: #fff; }
.tab.is-active { color: var(--ink); }
.tab svg { transition: transform .4s var(--spring); }
.tab.is-active svg { transform: scale(1.08); }
.tab:focus-visible { outline-color: var(--salmon); outline-offset: -2px; border-radius: 999px; }
@media (max-width: 360px) { .tab { padding: 0 6px; gap: 5px; font-size: 13px; } }
@media (min-width: 900px) {
  .tabbar { position: sticky; top: 14px; bottom: auto; margin: 6px 0 4px; }
  .foot { padding-bottom: 40px; }
}

/* ===== Próxima aula ===== */
.next { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label go" "title go" "when go"; align-items: center; column-gap: 12px; width: 100%; text-align: left; padding: 14px 14px 14px 18px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.5); cursor: pointer; transition: background .25s, transform .25s var(--ease); }
button.next:hover { background: rgba(255,255,255,.85); }
button.next:active { transform: scale(.99); }
.next__label { grid-area: label; display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rust); }
.next__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rust); box-shadow: 0 0 0 0 rgba(168,56,42,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(168,56,42,0); } 100% { box-shadow: 0 0 0 0 rgba(168,56,42,0); } }
.next__title { grid-area: title; font-weight: 600; font-size: 15px; line-height: 1.3; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.next__when { grid-area: when; font-size: 13px; color: var(--muted); margin-top: 2px; }
.next__go { grid-area: go; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); transition: transform .3s var(--spring); }
button.next:hover .next__go { transform: translateX(3px); }
.next--empty { cursor: default; grid-template-areas: "label" "title"; grid-template-columns: 1fr; }
.next--empty .next__title { color: var(--muted); font-weight: 500; }
.next--empty .next__dot { background: var(--muted); animation: none; }

/* ===== Pilha de meses ===== */
.stack { list-style: none; margin: 18px 0 0; padding: 0; --ov: 36px; }
.mcard { position: relative; margin-top: calc(var(--ov) * -1); margin-inline: calc(min(var(--d), 3) * 6px); border-radius: 32px; color: #fff; background: var(--bg); isolation: isolate;
  box-shadow: 0 -16px 30px -20px rgba(34,16,16,.7), inset 0 1px 0 rgba(255,255,255,.14);
  transition: margin .6s var(--ease), transform .45s var(--ease), box-shadow .45s; }
.mcard:first-child { margin-top: 0; }
.mcard::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: var(--glow, none); pointer-events: none; }
.stack.has-open .mcard { margin-inline: 0; }
@media (hover: hover) { .mcard:not(.is-open):hover { transform: translateY(-5px); } }
.mcard__h { font: inherit; }
.mcard__head { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name icon" "meta icon"; align-items: center; width: 100%; padding: 22px 22px calc(var(--ov) + 22px) 26px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 32px; transition: padding .55s var(--ease); -webkit-tap-highlight-color: transparent; }
.mcard:last-child .mcard__head { padding-bottom: 26px; }
.mcard.is-open .mcard__head { padding-bottom: 12px; }
.mcard__head:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
.mcard__name { grid-area: name; font-size: 34px; font-weight: 600; letter-spacing: -.035em; line-height: 1.05; transform-origin: left center; transition: font-size .55s var(--ease); }
.mcard.is-open .mcard__name { font-size: 46px; }
.mcard__meta { grid-area: meta; font-size: 13px; font-weight: 600; letter-spacing: .02em; opacity: 0; max-height: 0; transform: translateY(-4px); transition: opacity .4s, transform .5s var(--ease), max-height .5s var(--ease); color: rgba(255,255,255,.75); }
.mcard.is-open .mcard__meta { opacity: 1; max-height: 24px; transform: none; margin-top: 4px; }
.mcard__icon { grid-area: icon; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); transition: transform .55s var(--spring), background .3s; }
.mcard__head:hover .mcard__icon { background: rgba(255,255,255,.24); }
.mcard.is-open .mcard__icon { transform: rotate(180deg); }
.mcard__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.mcard.is-open .mcard__body { grid-template-rows: 1fr; }
.mcard__clip { overflow: hidden; min-height: 0; }
.mcard__inner { container-type: inline-size; padding: 6px 10px calc(var(--ov) + 12px); }
.mcard:last-child .mcard__inner { padding-bottom: 12px; }

/* Gradientes extraídos das imagens originais do Canva (sRGB, 2 paradas, de cima para baixo) */
:root {
  --g1: linear-gradient(180deg, #210E0B 0%, #B92817 100%);
  --g2: linear-gradient(180deg, #B92817 0%, #E4887D 100%);
  --g3: linear-gradient(180deg, #B92817 0%, #210E0B 100%);
  --g4: radial-gradient(farthest-corner at 50% 50%, #210E0B 0%, #B92817 100%);
  --note: #B92817;
}
.tone-0 { --bg: var(--g1); }
.tone-1 { --bg: var(--g2); }
.tone-2 { --bg: var(--g3); }
.tone-3 { --bg: var(--g4); }

/* ===== Card de aula (hierarquia do Canva) ===== */
.lesson { position: relative; margin-top: -22px; padding: 22px 20px 42px; border-radius: 26px; background: var(--g1); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 -12px 24px -16px rgba(20,8,6,.6); opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .45s, transform .6s var(--ease); }
.lesson:first-child { margin-top: 0; }
/* aulas seguem a sequência de cards de cada página do Canva */
.lesson:nth-child(3n+2) { background: var(--g2); }
.lesson:nth-child(3n) { background: var(--g3); }
.lesson:last-child { padding-bottom: 22px; }
.mcard.is-open .lesson { opacity: 1; transform: none; transition-delay: calc(var(--k, 0) * 60ms + 120ms); }
.lesson:nth-child(2) { --k: 1; } .lesson:nth-child(3) { --k: 2; } .lesson:nth-child(4) { --k: 3; } .lesson:nth-child(5) { --k: 4; } .lesson:nth-child(n+6) { --k: 5; }
.lesson__top { display: grid; gap: 14px; }
.lesson__mod { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.72); margin-bottom: 6px; }
.lesson__title { font-size: 21px; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
.lesson__bottom { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: stretch; }
.pill { display: inline-flex; flex-direction: column; justify-content: center; padding: 8px 18px; border: 1px solid rgba(255,255,255,.72); border-radius: 22px; font-size: 14.5px; line-height: 1.3; letter-spacing: -.01em; width: fit-content; max-width: 100%; }
.pill i { font-style: normal; opacity: .7; padding: 0 2px; }
.pill__sub { opacity: .88; }
.pill--date { font-weight: 500; }
.pill--note { background: var(--note); border-color: rgba(255,255,255,.35); font-size: 13.5px; }
@container (min-width: 520px) {
  .lesson__top { grid-template-columns: 1fr auto; align-items: start; gap: 20px; }
  .pill--date { text-align: right; align-items: flex-end; }
  .lesson__title { font-size: 23px; }
}
.lesson.is-flash { animation: flash 1.1s var(--ease) 2; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.85), 0 -12px 24px -16px rgba(20,8,6,.6); } 100% { box-shadow: 0 0 0 12px rgba(255,255,255,0), 0 -12px 24px -16px rgba(20,8,6,.6); } }

/* ===== Calendário ===== */
.cal { display: grid; gap: 16px; }
@media (min-width: 900px) { .cal { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; gap: 24px; } .cal__day { position: sticky; top: 96px; } }
.cal__panel { background: var(--card); border-radius: var(--radius); padding: 18px 16px 16px; border: 1px solid var(--line); }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.cal__head h2 { font-size: 26px; font-weight: 600; letter-spacing: -.035em; }
.cal__head h2 span { color: var(--rust); font-weight: 400; }
.cal__week, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__week span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 6px; letter-spacing: .06em; }
.day { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-height: 40px; border: 0; background: none; border-radius: 50%; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .2s, color .2s, transform .25s var(--spring), box-shadow .2s; }
.day:hover { background: var(--paper-2); }
.day:active { transform: scale(.92); }
.day--pad { pointer-events: none; }
.day.has { background: var(--rust); color: #fff; font-weight: 700; }
.day.has:hover { background: var(--rust-deep); }
.day.today { box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 700; }
.day.today.has { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--ink); }
.day.sel { background: var(--ink); color: var(--paper); transform: scale(1.06); }
.day.sel.has::after { content: ""; position: absolute; bottom: 18%; width: 5px; height: 5px; border-radius: 50%; background: var(--salmon); }
.cal__foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.cal__foot .chip { margin-left: auto; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; }
.legend__has { background: var(--rust); }
.legend__today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cal__jump { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.cal__jump > span { font-size: 12px; color: var(--muted); margin-right: 4px; }
.cal__day { display: grid; gap: 10px; }
.cal__dayhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 0; min-height: 40px; }
.cal__dayhead h3 { font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.dayitem { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 18px; animation: viewIn .45s var(--ease) both; }
.dayitem__when { font-size: 13px; color: var(--rust); font-weight: 600; }
.dayitem h4 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin-top: 4px; }
.dayitem__who { font-size: 14px; margin-top: 6px; color: var(--ink-2); }
.dayitem__who span { color: var(--muted); }
.dayitem__note { font-size: 13px; margin-top: 8px; display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(168,56,42,.1); color: var(--rust-deep); }
.dayitem__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ===== Avisos ===== */
.notices { display: grid; gap: 12px; }
.notice { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.notice h2 { font-size: 21px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; margin: 8px 0 8px; text-wrap: balance; }
.notice p { color: var(--ink-2); font-size: 15px; }
.notice p + p { margin-top: 8px; }
.notice__meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.notice--important { background: linear-gradient(165deg, #221010 0%, #5A2219 60%, #8A2F22 100%); color: #fff; border-color: transparent; box-shadow: 0 20px 40px -24px rgba(34,16,16,.7); }
.notice--important p, .notice--important .notice__meta { color: rgba(255,255,255,.82); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--rust); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tag svg { width: 13px; height: 13px; }

/* ===== Barra de prévia (usada pelo painel) ===== */
.previewbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; background: var(--rust); color: #fff; font-size: 14px; }
.previewbar__dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 2s infinite; }
.previewbar__actions { margin-left: auto; display: flex; gap: 8px; }
.previewbar .btn { min-height: 36px; padding: 0 14px; font-size: 13px; }

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