:root {
    --bg: #f5f6fb;
    --card: #fff;
    --text: #1d1d35;
    --muted: #6b6b80;
    --input-bg: #ededed;
    --req: #d90429;
    --grad-a: #4361ee;
    --grad-b: #1a0ba0;
    --notice-a: #f1e9ff;
    --notice-b: #dfe3ff;
    --purple: #6d28d9;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Roboto', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--grad-a); }

/* Topo */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 32px; background: #fff;
    box-shadow: 0 2px 12px rgba(26, 11, 160, .08);
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--grad-a), var(--grad-b)) 1;
}
.brand { display: flex; align-items: center; }
.brand img { height: 76px; width: auto; display: block; }
.topnav { display: flex; align-items: center; gap: 24px; }
.topnav a, .link-btn {
    color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
    background: none; border: 0; cursor: pointer; font-family: inherit; padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.topnav a.active { color: var(--grad-a); border-bottom-color: var(--grad-a); }
.topnav a:hover, .link-btn:hover { color: var(--grad-a); }
.topnav form { margin: 0; }

/* Conteúdo */
/* Área logada: o conteúdo usa a largura toda ao lado do menu lateral */
.container { width: 100%; margin: 0; padding: 28px clamp(16px, 3vw, 44px); flex: 1; }
.shell-main .grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.shell-main .summary { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
    background: var(--card); border-radius: 12px; padding: 32px;
    box-shadow: 0 4px 24px rgba(26, 11, 160, .08); margin-bottom: 24px;
}
h1 { margin: 0 0 4px; font-size: 24px; }
.subtitle { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.section-title { font-size: 16px; margin: 12px 0 0; }

/* Formulário */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.grid.one { grid-template-columns: 1fr; }
.full { grid-column: 1 / -1; }

.field label { display: block; font-size: 15px; margin-bottom: 6px; }
.req { color: var(--req); }

input[type=text], input[type=email], input[type=password], select {
    width: 100%; height: 40px; padding: 0 14px;
    border: 2px solid transparent; border-radius: 4px;
    background: var(--input-bg); color: var(--text);
    font-family: inherit; font-size: 15px;
}
input::placeholder { color: #777; }
input:focus, select:focus { outline: none; border-color: var(--grad-a); background: #fff; }
input.invalid, select.invalid { border-color: var(--req); }
select { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0h12L6 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; }

.error { display: block; color: var(--req); font-size: 13px; margin-top: 4px; }

/* Aviso de campos obrigatórios */
.notice {
    display: flex; align-items: center; gap: 18px; padding: 18px 22px;
    border-radius: 10px; background: linear-gradient(90deg, var(--notice-a), var(--notice-b));
}
.notice-badge { width: 40px; height: 40px; flex: none; }
.notice-icon { width: 48px; height: 48px; flex: none; }
.notice-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notice-text strong { font-size: 15px; }
.notice-text span { font-size: 13px; }

/* Botão */
.actions { display: flex; align-items: center; gap: 20px; margin-top: 4px; }
.btn {
    display: inline-block; min-width: 204px; padding: 16px 28px; border: 0; border-radius: 12px;
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
    color: #fff; font-family: inherit; font-weight: 700; font-size: 16px; text-align: center;
    text-decoration: none; cursor: pointer; box-shadow: 0 14px 28px rgba(26, 11, 160, .28);
    transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 18px 32px rgba(26, 11, 160, .32); }
.one .btn { width: 100%; }

/* Utilitários */
.muted-link { color: var(--muted); font-size: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.check { display: flex; align-items: center; gap: 6px; }
.center { text-align: center; }
.small { font-size: 14px; margin: 20px 0 0; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #e6f7ec; color: #14532d; border: 1px solid #b7e4c7; }

.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 0 0 24px; }
.summary dt { font-size: 13px; color: var(--muted); }
.summary dd { margin: 2px 0 0; font-weight: 500; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }

@media (max-width: 640px) {
    .grid, .summary { grid-template-columns: 1fr; }
    .card { padding: 22px 18px; }
    .notice-icon { display: none; }
    .btn { width: 100%; }
    .actions { flex-direction: column; align-items: stretch; text-align: center; }
    .guest-logo img { height: 100px; }
    .topbar { padding: 4px 16px; }
    .brand img { height: 56px; }
}

/* Cadastro: campos empilhados, compacto para caber sem rolagem */
.wizard-page .card { padding: 22px 28px; }
.wizard-page .subtitle { margin-bottom: 14px; }
.wizard-page .stepper { margin-bottom: 14px; }
.wizard-page .stepper li { font-size: 13px; gap: 6px; }
.wizard-page .steps { min-height: 330px; }
.wizard-page .step { gap: 10px; }
.wizard-page .field label { margin-bottom: 4px; font-size: 14px; }
.wizard-page input[type=text], .wizard-page input[type=email], .wizard-page input[type=password], .wizard-page select { height: 38px; }
.wizard-page .notice { padding: 12px 16px; gap: 12px; }
.wizard-page .notice-badge { width: 32px; height: 32px; }
.wizard-page .notice-icon { width: 38px; height: 38px; }
.wizard-page .wizard-actions { margin-top: 14px; gap: 12px; }
.wizard-page .wizard-actions .btn { flex: 1; min-width: 0; margin: 0; padding: 12px 16px; }

/* ---------- Cadastro em etapas ---------- */
.stepper { display: flex; list-style: none; margin: 0 0 14px; padding: 0; gap: 8px; }
.stepper li {
    flex: 1; display: flex; align-items: center; gap: 6px; padding-bottom: 8px;
    font-size: 13px; color: var(--muted); border-bottom: 3px solid #e3e3ec; cursor: pointer;
    transition: color .2s, border-color .2s;
}
.stepper li span {
    display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    background: #e3e3ec; color: var(--muted); font-size: 13px; font-weight: 700; transition: background .2s, color .2s;
}
.stepper li.active { color: var(--text); font-weight: 500; border-color: var(--grad-a); }
.stepper li.active span, .stepper li.done span { background: var(--grad-a); color: #fff; }
.stepper li.done { border-color: var(--grad-a); }

.step { border: 0; margin: 0; padding: 0; min-width: 0; align-content: start; animation: step-in .3s ease; }
.step[hidden] { display: none; }
@keyframes step-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.wizard-actions { margin-top: 14px; }
.btn[hidden] { display: none; }
.btn-ghost { background: #fff; color: var(--grad-b); box-shadow: inset 0 0 0 2px var(--grad-a); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--grad-a), 0 8px 18px rgba(26, 11, 160, .15); }

/* ---------- Telas sem login: card de um lado, arte animada do outro ---------- */
.narrow { width: 100%; max-width: 460px; }

body.guest .footer { display: none; }

.stage { flex: 1; min-height: 100vh; display: flex; position: relative; overflow: hidden; }
.stage.card-right { justify-content: flex-end; }   /* card à direita */
.stage.card-left { justify-content: flex-start; }  /* card à esquerda */
.panel { flex: none; width: 50%; position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.panel-inner { display: flex; flex-direction: column; align-items: center; }
.panel-inner .card { width: 100%; margin: 0; }
.guest-logo { display: block; margin-bottom: 8px; }
.guest-logo img { display: block; height: 130px; width: auto; }

.art {
    position: absolute; top: 0; bottom: 0; width: 50%; z-index: 1; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, #4361ee 0%, #3a2fc9 45%, #1a0ba0 100%);
}
.card-right .art { left: 0; }
.card-left .art { right: 0; }
.art-focus { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; }
.panel-inner .card { box-shadow: 0 16px 48px rgba(26, 11, 160, .14); }
.art-text { position: relative; z-index: 3; max-width: 420px; }
.art-text h2 { margin: 0 0 8px; font-size: 32px; line-height: 1.15; text-shadow: 0 2px 14px rgba(10, 4, 80, .6); }
.art-text p { margin: 0; font-size: 17px; opacity: .85; }

.orb { position: absolute; border-radius: 50%; opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.orb-1 { width: 320px; height: 320px; background: radial-gradient(circle, #8b5cf6 0, rgba(139, 92, 246, 0) 70%); top: -80px; right: -60px; }
.orb-2 { width: 260px; height: 260px; background: radial-gradient(circle, #22d3ee 0, rgba(34, 211, 238, 0) 70%); bottom: 80px; left: -80px; animation-duration: 18s; opacity: .35; }
.orb-3 { width: 200px; height: 200px; background: radial-gradient(circle, #ffc83d 0, rgba(255, 200, 61, 0) 70%); top: 45%; right: 12%; animation-duration: 22s; opacity: .22; }
.ring { position: absolute; border: 2px solid rgba(255,255,255,.18); border-radius: 50%; animation: spin 40s linear infinite; }
.ring-1 { width: 420px; height: 420px; top: 8%; left: 50%; margin-left: -210px; border-style: dashed; }
.ring-2 { width: 560px; height: 560px; top: 0; left: 50%; margin-left: -280px; animation-direction: reverse; animation-duration: 60s; }
.dots { position: absolute; inset: 0; opacity: .25;
    background-image: radial-gradient(#fff 1.2px, transparent 1.2px); background-size: 26px 26px;
    mask-image: radial-gradient(circle at 50% 40%, #000, transparent 70%); -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 70%); }

.float { position: absolute; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 14px 22px rgba(10, 4, 80, .35)); }
.f-main  { width: 190px; top: 34%; left: 50%; margin: -95px 0 0 -95px; animation-duration: 7s; z-index: 3; }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(2deg); } }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.15); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Transição entre páginas ----------
   Card e logo usam nomes diferentes por lado (-r / -l): assim o navegador NÃO tenta
   "transformar" um card no outro (o que desviava o trajeto, pois têm alturas diferentes)
   e fazemos um deslize puramente horizontal de metade da tela (50vw). */
@view-transition { navigation: auto; }
.card-right .panel-inner .card { view-transition-name: card-r; }
.card-left  .panel-inner .card { view-transition-name: card-l; }
.card-right .guest-logo { view-transition-name: logo-r; }
.card-left  .guest-logo { view-transition-name: logo-l; }
.art { view-transition-name: art; }
.f-main { view-transition-name: cap; }

::view-transition-group(art), ::view-transition-group(cap) {
    animation-duration: .75s; animation-timing-function: cubic-bezier(.65, 0, .35, 1);
}
::view-transition-old(card-r), ::view-transition-old(card-l), ::view-transition-new(card-r), ::view-transition-new(card-l),
::view-transition-old(logo-r), ::view-transition-old(logo-l), ::view-transition-new(logo-r), ::view-transition-new(logo-l) {
    animation-duration: .75s; animation-timing-function: cubic-bezier(.65, 0, .35, 1); animation-fill-mode: both;
    mix-blend-mode: normal;
}
/* Saindo da direita -> vai para a esquerda; chegando na direita -> vem da esquerda (e vice-versa) */
::view-transition-old(card-r), ::view-transition-old(logo-r) { animation-name: slide-out-left; }
::view-transition-new(card-r), ::view-transition-new(logo-r) { animation-name: slide-in-from-left; }
::view-transition-old(card-l), ::view-transition-old(logo-l) { animation-name: slide-out-right; }
::view-transition-new(card-l), ::view-transition-new(logo-l) { animation-name: slide-in-from-right; }

@keyframes slide-out-left  { 0% { transform: translateX(0); opacity: 1; } 55%, 100% { opacity: 0; } 100% { transform: translateX(-50vw); } }
@keyframes slide-out-right { 0% { transform: translateX(0); opacity: 1; } 55%, 100% { opacity: 0; } 100% { transform: translateX(50vw); } }
@keyframes slide-in-from-left  { 0% { transform: translateX(-50vw); opacity: 0; } 45% { opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes slide-in-from-right { 0% { transform: translateX(50vw); opacity: 0; } 45% { opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }

/* Capelo: gira enquanto atravessa a tela */
::view-transition-image-pair(cap) { animation: .75s cubic-bezier(.65, 0, .35, 1) both cap-spin; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .01s; }
@keyframes cap-spin { 50% { transform: scale(1.35) rotate(180deg); } to { transform: rotate(360deg); } }
@supports not (view-transition-name: a) { .card { animation: card-in .35s ease; } }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
    .art { display: none; }
    .panel { width: 100%; }
}
@media (max-height: 800px) { .guest-logo img { height: 84px; } .wizard-page .guest-logo img { height: 60px; } }
@media (prefers-reduced-motion: reduce) {
    *, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
.wizard-page .guest-logo img { height: 84px; }
@media (max-height: 800px) { .wizard-page .guest-logo img { height: 60px; } }

/* Faixas de cursos em movimento */
.tape-field {
    position: absolute; inset: -30% -40%; transform: rotate(-14deg);
    display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.tape { overflow: hidden; }
.tape-track { display: flex; gap: 14px; width: max-content; animation: tape var(--dur, 55s) linear infinite; animation-delay: calc(var(--off, 0s) - var(--t, 0s)); }
.tape.rev .tape-track { animation-direction: reverse; }
@keyframes tape { to { transform: translateX(-16.6667%); } }

.pill {
    display: inline-flex; align-items: center; gap: 10px; padding: 9px 20px 9px 10px; flex: none;
    border-radius: 999px; font-size: 16px; font-weight: 500; white-space: nowrap;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .7); opacity: .75;
}
.pill b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .55); font-size: 18px; font-weight: 400; }
.pill.hot { background: linear-gradient(90deg, rgba(255, 200, 61, .55), rgba(255, 159, 28, .4)); color: #fff; border-color: rgba(255, 200, 61, .35); font-weight: 500; opacity: .85; }

/* Véu: abre espaço para o capelo no centro e garante leitura do texto embaixo */
/* Véu leve: só abre espaço para o capelo e dá leitura ao texto, sem cobrir os cursos */
.art-veil { position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(circle at 50% 38%, rgba(48, 28, 190, .92) 0, rgba(48, 28, 190, .7) 100px, rgba(48, 28, 190, 0) 240px),
        linear-gradient(to top, rgba(26, 11, 160, .85) 0, rgba(26, 11, 160, .55) 90px, rgba(26, 11, 160, 0) 190px); }
.ring { z-index: 1; top: calc(38% - 210px); }
.ring-2 { top: calc(38% - 280px); }
@media (max-height: 760px) { .f-main { width: 140px; margin: -70px 0 0 -70px; } .pill { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .tape-track { animation: none !important; } }

.f-main.cap-only { top: 38%; width: 300px; margin: -129px 0 0 -150px; }
@media (max-height: 760px) { .f-main.cap-only { width: 230px; margin: -99px 0 0 -115px; } }

/* ---------- Select com busca (combobox) ---------- */
.combo { position: relative; }
.combo-native { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.combo-input { padding-right: 40px; }
.combo.has-emoji .combo-input { padding-left: 42px; }
.combo-emoji { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 18px; line-height: 1; pointer-events: none; }
.combo-toggle { position: absolute; right: 0; top: 0; bottom: 0; width: 38px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.combo-toggle svg { transition: transform .2s; }
.combo.is-open .combo-toggle svg { transform: rotate(180deg); }
.combo-list {
    position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
    max-height: 300px; overflow-y: auto; background: #fff; border-radius: 10px;
    box-shadow: 0 18px 44px rgba(26, 11, 160, .22), 0 0 0 1px rgba(26, 11, 160, .08);
    animation: combo-in .15s ease;
}
.combo-list[hidden] { display: none; }
@keyframes combo-in { from { opacity: 0; transform: translateY(-4px); } }
.combo-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.combo-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 15px; cursor: pointer; }
.combo-option.active { background: #eef0ff; }
.combo-option.selected { font-weight: 700; color: var(--grad-a); }
.combo-oe { width: 22px; text-align: center; font-size: 17px; flex: none; }
.combo-option mark { background: #ffe58a; color: inherit; border-radius: 3px; padding: 0 1px; }
.combo-empty { padding: 14px 10px; font-size: 14px; color: var(--muted); }
.combo-other { margin-top: 8px; display: block; border: 0; background: #eef0ff; color: var(--grad-a); font: inherit; font-weight: 700; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
#curso-outro { animation: step-in .25s ease; }

.combo-input:disabled { cursor: not-allowed; opacity: .65; }
.combo.is-disabled .combo-toggle { opacity: .35; cursor: not-allowed; }

/* ===== Área logada: menu lateral ===== */
.shell { flex: 1; display: flex; min-height: 100vh; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shell-main .container { flex: 1; }

.sidebar {
    width: 252px; flex: none; display: flex; flex-direction: column; padding: 16px 14px;
    background: #fff; border-right: 1px solid #e8eaf5;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 60;
}
.sb-brand { display: flex; justify-content: center; padding: 2px 0 14px; margin-bottom: 8px; border-bottom: 1px solid #eef0f8; }
.sb-brand img { height: 96px; width: auto; display: block; }
.sb-group { margin: 14px 0 4px; padding: 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sb-link {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px;
    background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; text-align: left; cursor: pointer;
    transition: background .15s, color .15s;
}
.sb-link svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-link:hover { background: #f3f4fd; }
.sb-link.active { background: linear-gradient(90deg, #eef0ff, #f6f2ff); color: var(--grad-a); font-weight: 700; box-shadow: inset 3px 0 0 var(--grad-a); }
.sb-user { margin-top: auto; padding-top: 14px; border-top: 1px solid #eef0f8; display: flex; flex-direction: column; gap: 8px; }
.sb-user form { margin: 0; }
.sb-me { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.sb-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
.sb-who { min-width: 0; }
.sb-name { font-size: 14px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-role { font-size: 12px; color: var(--muted); }
.sb-logout { color: var(--muted); }
.sb-logout:hover { color: #c42a58; background: #fff0f4; }

.mobilebar, .nav-overlay { display: none; }

@media (max-width: 900px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(10, 4, 80, .25); }
    body.nav-open .sidebar { transform: none; }
    .nav-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(15, 10, 60, .45); opacity: 0; pointer-events: none; transition: opacity .25s; display: block; }
    body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
    .mobilebar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; padding: 6px 12px; background: #fff; border-bottom: 1px solid #e8eaf5; }
    .mobilebar img { height: 48px; width: auto; }
    .burger { width: 42px; height: 42px; border: 0; border-radius: 10px; background: #f3f4fd; display: grid; place-items: center; cursor: pointer; }
    .burger svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
}

/* Menu do usuário (rodapé do menu lateral) */
.sb-user { position: relative; gap: 0; }
.sb-me {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 8px; border: 0; border-radius: 12px;
    background: none; font: inherit; text-align: left; cursor: pointer; transition: background .15s;
}
.sb-me:hover, .sb-me[aria-expanded="true"] { background: #f3f4fd; }
.sb-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sb-name, .sb-role { display: block; }
.sb-chevron { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.sb-me[aria-expanded="true"] .sb-chevron { transform: rotate(180deg); }
.sb-menu {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); padding: 6px; background: #fff; border-radius: 12px;
    box-shadow: 0 16px 40px rgba(26, 11, 160, .2), 0 0 0 1px rgba(26, 11, 160, .08); animation: combo-in .15s ease; z-index: 5;
}
.sb-menu[hidden] { display: none; }
.sb-menu form { margin: 0; }
.stack-form { max-width: 440px; }
.profile-cards.side { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 24px; align-items: stretch; }
.profile-cards.side .card { margin-bottom: 0; }
/* mesma altura: o botão de cada card desce para o rodapé */
.profile-cards.side .card { display: flex; flex-direction: column; }
.profile-cards.side .card form { flex: 1; display: flex; flex-direction: column; align-content: start; }
.profile-cards.side .card form .actions { margin-top: auto; padding-top: 6px; }

/* ===== Menu lateral: espaço entre os itens ===== */
.sb-nav { display: flex; flex-direction: column; gap: 6px; }
.sb-group { margin-top: 18px; }
.sb-group:first-child { margin-top: 8px; }
.sb-link { padding: 12px 14px; }
.sb-menu { display: flex; flex-direction: column; gap: 4px; }
.sb-menu[hidden] { display: none; }

/* ===== Transição entre páginas (área logada): o menu fica parado e só o conteúdo anima ===== */
.sidebar { view-transition-name: sidebar; }
.shell-main .container { view-transition-name: content; }
::view-transition-group(sidebar) { animation: none; }
::view-transition-old(sidebar) { display: none; }
::view-transition-new(sidebar) { animation: none; }
::view-transition-old(content) { animation: .18s ease both vt-content-out; mix-blend-mode: normal; }
::view-transition-new(content) { animation: .4s cubic-bezier(.2, .7, .2, 1) both vt-content-in; mix-blend-mode: normal; }
@keyframes vt-content-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-content-in { from { opacity: 0; transform: translateY(16px); } }
/* navegadores sem View Transitions: entrada suave ao carregar */
@supports not (view-transition-name: a) { .shell-main .container { animation: page-in .35s ease; } }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } }

/* Aviso temporário (toast) */
#toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 10000; display: flex; align-items: center; gap: 10px;
    padding: 12px 18px 12px 14px; border-radius: 12px; background: #1d1d35; color: #fff; font-size: 14px; font-weight: 500;
    box-shadow: 0 16px 40px rgba(10, 4, 80, .35); opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
    transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
}
#toast::before {
    content: "✓"; width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%;
    background: #34d399; color: #0b3b2a; font-weight: 700; font-size: 13px;
}
#toast.erro::before { content: "!"; background: #ff8a65; color: #4a1a0a; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
