/* =====================================================================
   Central de Franquias — Plataforma Acquateria
   Visual: fundo escuro plano, vidro sutil, detalhes neon azul e amarelo
   ===================================================================== */

:root {
  --bg: #070c1a;
  --side: #0a1124;
  --navy: #0c1a3a;
  --card: rgba(255, 255, 255, 0.04);
  --card-2: rgba(7, 12, 26, 0.6);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f2f6ff;
  --soft: #dbe6ff;
  --muted: #a9b6d3;
  --muted-2: #8796b8;
  --cyan: #2ec5ff;
  --cyan-l: #7fd9ff;
  --yellow: #ffc629;
  --yellow-l: #ffd75e;
  --ink: #04142f;
  --danger: #ffb4a8;
  --radius: 24px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Poppins', var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
img { max-width: 100%; }
a { color: var(--cyan-l); }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------- layout */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side {
  flex: 1 1 248px; max-width: 280px; padding: 28px 16px 24px; display: flex; flex-direction: column; gap: 24px;
  background: var(--side); border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.side-logo { display: flex; flex-direction: column; gap: 10px; padding: 0 8px; text-decoration: none; }
.side-logo img { width: 196px; height: auto; display: block; }
.tag-central {
  align-self: flex-start; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--cyan-l); background: rgba(46, 197, 255, .10); border: 1px solid rgba(46, 197, 255, .30);
}
.side .side-close { display: none; align-self: flex-end; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-title { padding: 0 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 12px;
  font-size: 14px; font-weight: 500; text-decoration: none; color: #c9d6f2; border: 1px solid transparent;
}
.nav-link svg { width: 20px; height: 20px; flex: 0 0 auto; }
.nav-link:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.nav-link.active {
  font-weight: 600; color: #fff; background: rgba(46, 197, 255, .12); border-color: rgba(46, 197, 255, .45);
  box-shadow: 0 0 22px rgba(46, 197, 255, .18);
}
.nav-link.active svg { color: var(--cyan); }
.side-foot { margin-top: auto; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 6px; }
.side-foot .k { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.side-foot .v { font-size: 14px; font-weight: 600; }

.mtop {
  display: none; flex: 1 1 100%; position: relative; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--side); border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.mtop .mtop-logo img, .mtop > a > img:not(.avatar) { width: 132px; height: auto; display: block; }
.mtop img.avatar { width: 40px; height: 40px; }
.mtop .spacer { flex: 1 1 auto; }

.main { flex: 999 1 560px; min-width: 0; padding: 28px 40px 56px; display: flex; flex-direction: column; gap: 28px; }

.topbar { position: relative; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 48px; border-radius: 14px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .10);
}
.search input { flex: 1 1 auto; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font-size: 14px; }
.search svg { color: var(--muted-2); flex: 0 0 auto; }
.profile-btn {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 14px 4px 4px; border-radius: 99px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .10); color: var(--text); text-align: left; cursor: pointer;
}
.profile-btn .who { display: flex; flex-direction: column; line-height: 1.3; }
.profile-btn .who b { font-size: 14px; font-weight: 600; }
.profile-btn .who small { font-size: 12px; color: var(--muted); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--cyan), #0b5bd3);
  box-shadow: 0 0 0 2px rgba(255, 198, 41, .7); overflow: hidden; object-fit: cover;
}
img.avatar { display: block; }
.avatar.lg { width: 136px; height: 136px; font-size: 44px; font-family: var(--font-head); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(255, 198, 41, .8), 0 0 40px rgba(46, 197, 255, .25); }
.avatar.sm { width: 38px; height: 38px; font-size: 12px; box-shadow: none; background: rgba(255, 255, 255, .10); }

.menu {
  position: absolute; right: 0; top: 60px; z-index: 40; width: 300px; max-width: calc(100vw - 24px); padding: 8px; border-radius: 18px;
  background: rgba(12, 20, 42, .97); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 30px rgba(46, 197, 255, .10);
}
.menu-head { display: flex; align-items: center; gap: 12px; padding: 12px; }
.menu-head small { display: block; font-size: 12px; color: var(--muted); }
.menu-sep { height: 1px; margin: 6px 4px; background: rgba(255, 255, 255, .08); }
.menu a, .menu button {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  font-size: 14px; color: var(--soft); text-decoration: none; background: transparent; border: 0; cursor: pointer; text-align: left;
}
.menu a:hover, .menu button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.menu .sair { color: var(--danger); }
.mtop .menu { top: 62px; right: 12px; }

/* ------------------------------------------------------------- tipografia */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-head > div { display: flex; flex-direction: column; gap: 6px; }
.crumb { font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: #fff; }
.h1 { font-size: 34px; line-height: 1.15; }
.h2 { font-size: 20px; }
.h3 { font-size: 16px; font-family: var(--font); font-weight: 600; }
.lead { font-size: 15px; color: #c9d6f2; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.hl-yellow { color: var(--yellow); text-shadow: 0 0 24px rgba(255, 198, 41, .35); }
.num { color: var(--cyan); }

/* ------------------------------------------------------------- blocos */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 26px; }
.pad-sm { padding: 18px; }
.card-blue { background: var(--navy); border: 1px solid rgba(46, 197, 255, .30); border-radius: var(--radius); }
.card-yellow { background: #12140f; border: 1px solid rgba(255, 198, 41, .45); border-radius: var(--radius); box-shadow: 0 0 40px rgba(255, 198, 41, .10); }
.inset { background: var(--card-2); border: 1px solid rgba(255, 255, 255, .07); border-radius: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 3 1 560px; min-width: 0; }
.col-side { flex: 2 1 380px; min-width: 0; }
.col-third { flex: 1 1 280px; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--min, 230px), 1fr)); gap: 16px; }
.empty { padding: 28px; border-radius: 18px; text-align: center; font-size: 14px; color: #c9d6f2; background: rgba(255, 255, 255, .03); border: 1px dashed rgba(255, 255, 255, .18); }

/* ------------------------------------------------------------- botões e etiquetas */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 13px;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--yellow); color: var(--ink); font-weight: 700; box-shadow: 0 0 22px rgba(255, 198, 41, .30); }
.btn-primary:hover { color: var(--ink); filter: brightness(1.05); }
.btn-cyan { background: var(--cyan); color: var(--ink); font-weight: 700; }
.btn-cyan:hover { color: var(--ink); filter: brightness(1.05); }
.btn-ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .20); }
.btn-ghost:hover { background: rgba(255, 255, 255, .10); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 180, 168, .35); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: 12px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--cyan-l); font-weight: 600; cursor: pointer; font-size: 13px; }

.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 99px; font-size: 13px; font-weight: 500;
  color: var(--soft); background: var(--card); border: 1px solid rgba(255, 255, 255, .14); text-decoration: none; cursor: pointer;
}
.chip.on { background: var(--cyan); border-color: var(--cyan); color: var(--ink); font-weight: 700; box-shadow: 0 0 16px rgba(46, 197, 255, .45); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-yellow { background: var(--yellow); color: var(--ink); }
.b-cyan { background: var(--cyan); color: var(--ink); }
.b-light { background: var(--soft); color: var(--ink); }
.b-outline { color: var(--cyan-l); background: rgba(46, 197, 255, .10); border: 1px solid rgba(46, 197, 255, .35); font-weight: 600; }
.b-muted { color: var(--muted); background: rgba(255, 255, 255, .06); font-weight: 600; }
.b-draft { color: var(--yellow-l); background: rgba(255, 198, 41, .10); border: 1px solid rgba(255, 198, 41, .4); font-weight: 600; }
.size-chip {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 600;
  color: var(--yellow-l); background: rgba(255, 198, 41, .08); border: 1px solid rgba(255, 198, 41, .45);
}
.icon-box {
  width: 54px; height: 54px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: rgba(46, 197, 255, .12); border: 1px solid rgba(46, 197, 255, .5); box-shadow: 0 0 22px rgba(46, 197, 255, .30); color: var(--cyan);
}
.icon-box.y { background: rgba(255, 198, 41, .12); border-color: rgba(255, 198, 41, .5); box-shadow: 0 0 22px rgba(255, 198, 41, .25); color: var(--yellow); }
.icon-box svg { width: 26px; height: 26px; }
.file-ico { width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink); background: var(--yellow); }

/* ------------------------------------------------------------- flash */
.flashes { display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 14px; font-size: 14px; word-break: break-word; }
.flash.ok { color: var(--cyan-l); background: rgba(46, 197, 255, .10); border: 1px solid rgba(46, 197, 255, .40); }
.flash.erro { color: #ffe1a0; background: rgba(255, 198, 41, .08); border: 1px solid rgba(255, 198, 41, .45); }

/* ------------------------------------------------------------- imagens e cards */
.ar-16-10 { aspect-ratio: 16 / 10; }
.ar-16-7 { aspect-ratio: 16 / 7; }
.ar-14-5 { aspect-ratio: 14 / 5; }
.ar-3-2 { aspect-ratio: 3 / 2; }
.ar-4-1 { aspect-ratio: 4 / 1; }
.ar-16-9 { aspect-ratio: 16 / 9; }
.cover { display: block; width: 100%; object-fit: cover; background: var(--navy); }
.ph { display: flex; align-items: center; justify-content: center; width: 100%; color: var(--cyan); background: linear-gradient(135deg, rgba(14, 94, 214, .55), rgba(4, 16, 44, .9)); }
.ph svg { width: 34px; height: 34px; }

.tile { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tile:hover { border-color: rgba(46, 197, 255, .45); color: var(--text); }
.tile-media { position: relative; }
.tile-media .tag { position: absolute; left: 10px; top: 10px; }
.tile-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.tile-body b { font-size: 14px; font-weight: 600; line-height: 1.35; }
.tile-body span { font-size: 12px; color: var(--muted); }
.tile-foot { padding: 0 14px 14px; display: flex; gap: 8px; }
.tag-dark { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(7, 12, 26, .78); }
.tag-dark svg { width: 13px; height: 13px; color: var(--cyan); }

.module {
  display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid rgba(46, 197, 255, .28);
}
.module.y { border-color: rgba(255, 198, 41, .30); }
.module:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.module .go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--cyan); }
.module.y .go { color: var(--yellow); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills span { padding: 4px 10px; border-radius: 99px; font-size: 12px; color: var(--soft); background: rgba(255, 255, 255, .07); }

.brand-btn {
  flex: 1 1 220px; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 18px; border-radius: 18px; text-decoration: none;
  color: var(--text); background: var(--card); border: 1px solid rgba(255, 255, 255, .10);
}
.brand-btn .ini { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .08); font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.brand-btn b { display: block; font-size: 16px; }
.brand-btn small { font-size: 12px; color: var(--muted); }
.brand-btn.on { background: rgba(46, 197, 255, .12); border-color: rgba(46, 197, 255, .65); box-shadow: 0 0 26px rgba(46, 197, 255, .25); color: #fff; }
.brand-btn.on .ini { background: var(--cyan); color: var(--ink); }

.list-item { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 12px; border-radius: 16px; background: var(--card-2); border: 1px solid rgba(255, 255, 255, .06); color: var(--text); text-decoration: none; }
.list-item:hover { color: var(--text); border-color: rgba(46, 197, 255, .35); }
.list-item .grow { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.list-item .thumb { flex: 0 0 auto; width: 136px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--navy); }

.news-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); text-decoration: none; color: var(--text); }
.news-row:last-child { border-bottom: 0; }
.news-row .mod { flex: 0 0 96px; font-size: 12px; font-weight: 600; color: var(--cyan); }
.news-row .mod.doc { color: var(--yellow); }
.news-row .t { flex: 1 1 auto; font-size: 14px; }

.progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .10); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--cyan); box-shadow: 0 0 12px rgba(46, 197, 255, .8); }
.progress.y > span { background: var(--yellow); box-shadow: 0 0 12px rgba(255, 198, 41, .8); }

/* ------------------------------------------------------------- tabelas */
.table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 14px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); border-bottom: 1px solid rgba(255, 255, 255, .10); }
.table td { padding: 13px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table .acts { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cell-user { display: flex; align-items: center; gap: 12px; }
.cell-user small { display: block; font-size: 12px; color: var(--muted); }
.mini-thumb { width: 64px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--navy); flex: 0 0 auto; }

/* ------------------------------------------------------------- formulários */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--soft); }
.hint { font-size: 12px; color: var(--muted-2); }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; font-size: 14px; color: var(--text);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .16); color-scheme: dark;
}
.select { padding: 0 12px; background: #0c142a; }
.textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(46, 197, 255, .6); outline: none; box-shadow: 0 0 0 3px rgba(46, 197, 255, .15); }
.input:disabled { color: var(--muted); background: rgba(255, 255, 255, .02); border-style: dashed; cursor: not-allowed; }
.fields { display: flex; flex-wrap: wrap; gap: 16px; }
.fields > .field { flex: 1 1 220px; }
.fields > .field.wide { flex: 2 1 300px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; color: var(--soft); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--cyan); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; border-radius: 16px; text-align: center; cursor: pointer;
  background: rgba(46, 197, 255, .05); border: 1.5px dashed rgba(46, 197, 255, .45);
}
.dropzone.drag { background: rgba(46, 197, 255, .12); }
.dropzone svg { color: var(--cyan); }
.dropzone b { font-size: 14px; }
.dropzone small { font-size: 12px; color: var(--muted); line-height: 1.6; }
.dropzone .files { font-size: 13px; color: var(--cyan-l); }
.section-num { color: var(--cyan); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-actions .btn { flex: 1 1 auto; }
.locked { background: rgba(255, 255, 255, .02); border: 1px dashed rgba(255, 255, 255, .16); }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: 14px; color: var(--soft);
  background: var(--card); border: 1px solid rgba(255, 255, 255, .14); cursor: pointer;
}
.seg input:checked + label { background: var(--cyan); border-color: var(--cyan); color: var(--ink); font-weight: 700; }
.seg input:focus-visible + label { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* switch (checkbox) */
.switch { position: relative; flex: 0 0 auto; width: 52px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(255, 255, 255, .16); transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #c9d6f2; transition: transform .15s; }
.switch input:checked + span { background: var(--cyan); box-shadow: 0 0 14px rgba(46, 197, 255, .5); }
.switch input:checked + span::after { transform: translateX(22px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }

.rule { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; background: rgba(7, 12, 26, .55); border: 1px solid rgba(255, 255, 255, .10); }
.rule-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rule-head b { display: block; font-size: 15px; }
.rule-head small { font-size: 12px; color: var(--muted); }
.opt-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 14px; cursor: pointer; border: 1px solid rgba(255, 255, 255, .10); }
.opt input { width: 18px; height: 18px; accent-color: var(--cyan); flex: 0 0 auto; }
.opt:has(input:checked) { background: rgba(46, 197, 255, .10); border-color: rgba(46, 197, 255, .45); }
.opt small { color: var(--muted); }
.who-box { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 18px; background: rgba(255, 198, 41, .08); border: 1px solid rgba(255, 198, 41, .45); }
.who-box .k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.who-box .v { font-size: 15px; font-weight: 600; line-height: 1.45; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.pick { position: relative; display: block; border-radius: 12px; overflow: hidden; cursor: pointer; border: 2px solid rgba(255, 255, 255, .10); }
.pick input { position: absolute; opacity: 0; }
.pick img, .pick .ph { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; display: block; }
.pick .tag { position: absolute; left: 6px; top: 6px; display: none; }
.pick:has(input:checked) { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255, 198, 41, .45); }
.pick:has(input:checked) .tag { display: inline-flex; }
.pick:has(input:focus-visible) { outline: 2px solid var(--yellow); outline-offset: 2px; }

.preview-img { width: 100%; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); background: var(--navy); }
.dim-warn { font-size: 12px; color: #ffe1a0; }

/* ------------------------------------------------------------- carrossel */
.carousel { display: flex; flex-direction: column; gap: 12px; }
.carousel-frame { position: relative; aspect-ratio: 4 / 1; border-radius: var(--radius); overflow: hidden; background: #0b4fb8; border: 1px solid rgba(255, 255, 255, .10); }
.carousel-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }
.carousel-slide.on { opacity: 1; visibility: visible; }
.carousel-slide a, .carousel-slide picture, .carousel-slide img { display: block; width: 100%; height: 100%; }
.carousel-slide img { object-fit: cover; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(7, 12, 26, .45); border: 1px solid rgba(255, 255, 255, .45); cursor: pointer; z-index: 2;
}
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }
.dots { display: flex; justify-content: center; gap: 4px; }
.dot { width: 44px; height: 24px; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; }
.dot::after { content: ''; width: 10px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .35); transition: width .2s; }
.dot.on::after { width: 28px; background: var(--cyan); box-shadow: 0 0 10px rgba(46, 197, 255, .8); }

/* ------------------------------------------------------------- player */
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid rgba(46, 197, 255, .35); box-shadow: 0 0 60px rgba(46, 197, 255, .12); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border-radius: 14px; text-decoration: none; color: var(--soft); background: rgba(7, 12, 26, .35); border: 1px solid rgba(255, 255, 255, .08); font-size: 14px; }
.lesson:hover { color: #fff; border-color: rgba(46, 197, 255, .35); }
.lesson.on { color: #fff; font-weight: 600; background: rgba(46, 197, 255, .18); border-color: rgba(46, 197, 255, .65); box-shadow: 0 0 22px rgba(46, 197, 255, .25); }
.lesson .st { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid rgba(255, 255, 255, .28); font-size: 12px; font-weight: 700; }
.lesson .st.done { border: 1.5px solid var(--cyan); background: rgba(46, 197, 255, .16); color: var(--cyan); }
.lesson.on .st { border: 0; background: var(--cyan); color: var(--ink); }
.step-num { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #c9d6f2; border: 2px solid rgba(255, 255, 255, .22); }
.step-num.done { border: 1.5px solid var(--cyan); background: rgba(46, 197, 255, .14); color: var(--cyan); }
.step-num.now { border: 0; background: var(--yellow); color: var(--ink); box-shadow: 0 0 16px rgba(255, 198, 41, .6); }

.raf { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; text-decoration: none; color: var(--text); background: rgba(7, 12, 26, .40); border: 1px solid rgba(255, 255, 255, .10); }
.raf b { font-family: var(--font-head); font-size: 17px; font-weight: 600; }
.raf small { font-size: 12px; color: var(--muted); }
.raf.done { background: rgba(46, 197, 255, .10); border-color: rgba(46, 197, 255, .40); }
.raf.new { background: rgba(255, 198, 41, .10); border-color: rgba(255, 198, 41, .50); }

/* ------------------------------------------------------------- login */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-brand { flex: 1 1 480px; padding: 56px; display: flex; flex-direction: column; gap: 28px; background: var(--navy); border-right: 1px solid rgba(46, 197, 255, .18); position: relative; overflow: hidden; }
.auth-brand .logo { width: 420px; max-width: 100%; height: auto; }
.auth-brand .tag { align-self: flex-start; padding: 10px 22px; border-radius: 99px; font-size: 22px; font-weight: 600; color: var(--cyan-l); background: rgba(46, 197, 255, .10); border: 1.5px solid rgba(46, 197, 255, .40); box-shadow: 0 0 24px rgba(46, 197, 255, .15); }
.auth-brand h1 { margin: auto 0; max-width: 560px; font-size: 38px; line-height: 1.2; }
.auth-banners { position: absolute; inset: 0; }
.auth-banners img { width: 100%; height: 100%; object-fit: cover; }
.auth-panel { flex: 1 1 420px; padding: 56px 32px; display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; padding: 36px; border-radius: 28px; display: flex; flex-direction: column; gap: 20px; background: var(--card); border: 1px solid rgba(255, 255, 255, .10); box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 40px rgba(46, 197, 255, .08); }
.auth-card h2 { font-size: 28px; }
.pwd { display: flex; align-items: center; height: 50px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .16); }
.pwd input { flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 14px; background: transparent; border: 0; outline: none; }
.pwd button { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.pwd:focus-within { border-color: rgba(46, 197, 255, .6); box-shadow: 0 0 0 3px rgba(46, 197, 255, .15); }

/* ------------------------------------------------------------- celular */
.auth-card-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.auth-card-brand img { width: 190px; height: auto; }
.auth-card-brand .tag { padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--cyan-l); background: rgba(46, 197, 255, .10); border: 1.5px solid rgba(46, 197, 255, .40); }

@media (max-width: 860px) {
  .side { display: none; }
  .side.open { display: flex; position: fixed; inset: 0; z-index: 60; max-width: none; overflow-y: auto; }
  .side .side-close { display: inline-flex; }
  .mtop { display: flex; }
  .hide-m { display: none !important; }
  .main { padding: 16px 16px 40px; gap: 20px; }
  .h1 { font-size: 26px; }
  .pad { padding: 18px; }
  .module { padding: 18px; }
  .carousel-frame { aspect-ratio: 2 / 1; }
  .carousel-arrow { width: 36px; height: 36px; }
  .auth-brand { padding: 28px 20px; gap: 18px; }
  .auth-brand .logo { width: 260px; }
  .auth-brand .tag { font-size: 16px; padding: 8px 16px; }
  .auth-brand h1 { font-size: 28px; margin: 8px 0 0; }
  .auth-panel { padding: 28px 16px; }
  .auth-card { padding: 22px; }
  .list-item .thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}
@media (min-width: 861px) {
  .show-m { display: none !important; }
}


/* =====================================================================
   Trilha: apresentação e linha do tempo das aulas
   ===================================================================== */
.trilha-hero { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.trilha-capa { flex: 1 1 420px; min-width: 0; border-radius: 20px; }
.trilha-info { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.texto-longo { position: relative; max-width: 68ch; font-size: 14.5px; line-height: 1.7; color: #c9d6f2; }
.texto-longo p { white-space: pre-line; overflow-wrap: anywhere; }
.texto-longo.recolhido { max-height: calc(1.7em * 5); overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--cyan-l); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: #fff; }

.timeline { list-style: none; margin: 0; padding: 18px 0 8px; position: relative; display: flex; flex-direction: column; gap: 28px; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 21px; width: 2px; background: linear-gradient(var(--line-2), var(--line-2)); border-radius: 2px; }
.tl-item { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; align-items: start; }
.tl-node { grid-column: 1; grid-row: 1; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #c9d6f2; background: var(--side); border: 2px solid rgba(255, 255, 255, .28); box-shadow: 0 0 0 6px var(--bg); transition: transform .25s, box-shadow .25s; }
.tl-node.done { border-color: var(--cyan); background: rgba(46, 197, 255, .16); color: var(--cyan); }
.tl-node.now { border-color: transparent; background: var(--yellow); color: var(--ink); box-shadow: 0 0 0 6px var(--bg), 0 0 22px rgba(255, 198, 41, .55); }
.tl-card { grid-column: 2; grid-row: 1; display: block; overflow: hidden; border-radius: 18px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: transform .25s ease, border-color .25s, box-shadow .25s; }
.tl-card:hover { transform: translateY(-3px); border-color: rgba(46, 197, 255, .55); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); color: inherit; }
.tl-item:hover .tl-node { transform: scale(1.08); }
.tl-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.tl-kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan-l); }
.tl-body b { font-family: var(--font-head); font-size: 17px; font-weight: 600; line-height: 1.35; }
.tl-desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-status { display: flex; justify-content: space-between; font-size: 12px; color: var(--cyan-l); margin-top: 4px; }
.tl-btn { align-self: flex-start; margin-top: 4px; }

@media (min-width: 900px) {
  .timeline { gap: 0; padding-top: 24px; }
  .timeline::before { left: 50%; transform: translateX(-1px); }
  .tl-item { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); column-gap: 28px; margin-top: -56px; }
  .tl-item:first-child { margin-top: 0; }
  .tl-node { grid-column: 2; margin-top: 24px; }
  .tl-item.esq .tl-card { grid-column: 1; }
  .tl-item.dir .tl-card { grid-column: 3; }
  .tl-item .tl-card { max-width: 520px; }
  .tl-item.esq .tl-card { justify-self: end; }
  .tl-item.dir .tl-card { justify-self: start; }
  .tl-item { padding-bottom: 8px; }
}

/* =====================================================================
   Transição entre páginas
   Navegadores com View Transitions (Chrome/Edge/Safari recentes) fazem a troca de página
   sem piscar; a barra lateral e o topo ficam parados. Nos demais, a página entra com fade.
   ===================================================================== */
@view-transition { navigation: auto; }
.side { view-transition-name: lateral; }
.topbar { view-transition-name: topo; }
::view-transition-group(lateral), ::view-transition-group(topo) { animation-duration: 0s; }
::view-transition-old(root) { animation: pg-sai .16s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: pg-entra .32s cubic-bezier(0, 0, .2, 1) .04s both; }
@keyframes pg-sai { to { opacity: 0; transform: translateY(-6px); } }
@keyframes pg-entra { from { opacity: 0; transform: translateY(14px); } }
@supports not (view-transition-name: none) {
  .main > :not(.topbar) { animation: pg-entra .35s cubic-bezier(0, 0, .2, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .01s; animation-delay: 0s; }
  .main > :not(.topbar), .tl-card, .tl-node { animation: none; transition: none; }
}

/* ------------------------------------------------------- assinatura Base4 */
.cv-copy { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px; color: var(--muted); font-size: .8rem; }
.cv-copy a img { height: 28px; width: auto; display: block; opacity: .9; }
.cv-copy a:hover img { opacity: 1; }
/* modelo 1: embaixo do menu lateral */
.cv-copy--menu { flex-direction: column; gap: 8px; text-align: center; margin-top: 4px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: .72rem; }
.cv-copy--menu a img { height: 24px; }
/* modelo 2: rodapé da tela */
.cv-copy--rodape { flex-direction: column; gap: 8px; text-align: center; margin-top: auto; padding: 18px 0 0; }
.auth-panel .cv-copy--rodape { margin-top: 24px; }
