@font-face { font-family: 'Komrile'; src: url('assets/fonts/Komrile-Regular.ttf'); font-display: swap; }
@font-face { font-family: 'Komrile'; font-style: italic; src: url('assets/fonts/Komrile-Italic.ttf'); font-display: swap; }
@font-face { font-family: 'Montas'; src: url('assets/fonts/Montas-Regular.ttf'); font-display: swap; }

:root {
  --bg: #06191d; --side: #041215; --surface: #0b2b32; --surface-2: #103a43;
  --line: rgba(214, 179, 100, .24); --line-soft: rgba(227, 205, 181, .12);
  --gold: #d6b364; --gold-d: #b08a3a; --beige: #e3cdb5; --cream: #fbf6ee;
  --text: #f2ebe0; --muted: #b5c1bc;
  --petroleo: #0d4a54; --vinho: #5b1218; --marrom: #54260b; --dourado: #7d6222;
  --title: 'Komrile', Georgia, serif; --body: 'Montas', 'Avenir Next', 'Segoe UI', sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--title); font-weight: 400; line-height: 1.15; margin: 0; color: var(--cream); }
h1 { font-size: clamp(34px, 5vw, 50px); }
h2 { font-size: clamp(24px, 3vw, 30px); }
h3 { font-size: 20px; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Layout */
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); border-right: 1px solid var(--line-soft); padding: 22px 14px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px; text-decoration: none; }
.brand img { width: 46px; height: 56px; object-fit: contain; flex: none; }
.brand b { display: block; font: 400 21px/1.1 var(--title); color: var(--beige); }
.brand em { font: italic 13px var(--title); color: var(--gold); }
.side nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 9px; text-decoration: none; font-size: 14.5px; color: var(--text); }
.side nav a:hover { background: rgba(214, 179, 100, .1); }
.side nav a.on { background: var(--gold); color: #1c1407; }
.side nav .tag { font-size: 10px; letter-spacing: .08em; padding: 1px 7px; border-radius: 99px; background: var(--vinho); color: var(--beige); }
.side nav a.on .tag { background: #1c1407; color: var(--gold); }
.nav-group { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 18px 12px 5px; }
.side-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 4px; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 13px; text-align: left; padding: 4px 12px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--gold); }
.main { min-width: 0; }
.page { max-width: 1040px; margin: 0 auto; padding: 44px 40px 110px; }
.topbar { display: none; }
.demo-bar { background: var(--gold); color: #1c1407; text-align: center; font-size: 12.5px; padding: 5px 12px; }

/* Peças */
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.lead { color: var(--muted); max-width: 680px; margin-top: 12px; }
.head { margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line-soft); }
.section { margin-top: 38px; }
.section > h2 { margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 22px; }
.card.hl { border-color: var(--line); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tile { display: block; text-decoration: none; transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--gold); }
.tile h3 { margin-bottom: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 99px; padding: 10px 20px; text-decoration: none; font-size: 14.5px; background: var(--gold); color: #1c1407; }
.btn:hover { background: var(--beige); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn.sm { padding: 6px 13px; font-size: 13px; }
.chip { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--beige); }
.chip.btn-chip { background: transparent; }
.chip.btn-chip.on { background: var(--gold); color: #1c1407; border-color: var(--gold); }
.p-metodologia { --pc: var(--petroleo); } .p-posicionamento { --pc: var(--vinho); } .p-conteudo { --pc: var(--dourado); } .p-funis { --pc: var(--marrom); }
.bar { height: 6px; border-radius: 9px; background: rgba(227, 205, 181, .14); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 9px; }
label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--beige); }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=datetime-local], textarea, select { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; }
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
::placeholder { color: #7f918c; }
.field { margin-bottom: 16px; }
.check { appearance: none; width: 24px; height: 24px; border: 1.5px solid var(--gold-d); border-radius: 7px; background: transparent; margin: 0; flex: none; cursor: pointer; display: inline-grid; place-items: center; }
.check:checked { background: var(--gold); border-color: var(--gold); }
.check:checked::after { content: ''; width: 6px; height: 11px; border: solid #1c1407; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check:disabled { opacity: .25; cursor: default; }
.check-line { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; font-size: 15px; color: var(--text); margin: 0; cursor: pointer; }
.empty { color: var(--muted); font-style: italic; font-size: 14.5px; }
.note { font-size: 13px; color: var(--muted); border-left: 2px solid var(--gold-d); padding-left: 12px; margin-top: 14px; }

/* Hexágono: a colmeia como assinatura visual */
.hex { width: 48px; height: 54px; flex: none; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--pc, var(--gold-d)); color: var(--cream); font-family: var(--title); font-size: 18px; }
.hex.gold { background: var(--gold); color: #1c1407; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(rgba(4, 18, 21, .68), rgba(4, 18, 21, .9)), url('assets/img/capa-maos.jpg') center/cover; }
.login-box { width: min(430px, 100%); background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
.login-box > img { width: 112px; margin: 0 auto 16px; }
.login-box h1 { font-size: 30px; text-align: center; }
.login-box .btn { width: 100%; margin-top: 10px; }
.or { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; margin: 14px 0 4px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

/* Início */
.mosaic { position: relative; display: grid; grid-template-columns: 1.1fr 1fr 1fr; grid-template-rows: 150px 150px; gap: 8px; padding: 8px; background: var(--vinho); }
.mosaic .slot { position: relative; overflow: hidden; border-radius: 10px; background-size: cover; background-position: center; border: 0; padding: 0; }
.mosaic .slot:first-child { grid-row: span 2; }
.mosaic .slot:nth-child(4) { grid-column: 2 / span 2; }
.mosaic .slot.edit::after { content: 'Trocar foto'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4, 18, 21, .55); color: var(--cream); font-size: 13.5px; }
.cover-btn { position: absolute; right: 18px; top: 18px; z-index: 2; }
.who { display: flex; align-items: flex-end; gap: 20px; padding: 0 40px; margin-top: -58px; position: relative; max-width: 1040px; margin-inline: auto; }
.medal { position: relative; width: 118px; height: 148px; border-radius: 50%; padding: 5px; flex: none; border: 3px solid var(--gold); outline: 1.5px solid var(--gold-d); outline-offset: 3px; background: var(--bg); overflow: hidden; cursor: pointer; display: grid; place-items: center; }
.medal img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.medal span { font-size: 12px; color: var(--muted); text-align: center; padding: 8px; }
.who h1 { font-size: clamp(30px, 4vw, 42px); }
.hello { background: linear-gradient(120deg, var(--petroleo), var(--surface)); }
.date-box { width: 76px; flex: none; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; }
.date-box b { display: block; font: 400 30px/1 var(--title); color: var(--gold); }
.date-box span { font-size: 11px; letter-spacing: .14em; }
.event { display: flex; gap: 18px; align-items: flex-start; }
.event .grow { flex: 1; min-width: 0; }
.event h3 { margin: 4px 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Módulos e pilares */
.module { position: relative; min-height: 165px; display: flex; flex-direction: column; background: linear-gradient(160deg, var(--pc, var(--surface-2)), var(--surface) 92%); }
.module .bar { margin-top: auto; }
.module .status { font-size: 13px; color: var(--beige); margin: 8px 0 12px; }
.question { padding: 18px 0; border-top: 1px solid var(--line-soft); }
.question:first-child { border-top: 0; padding-top: 0; }
.saved { font-size: 13px; color: var(--gold); min-height: 20px; }
.comment { background: var(--bg); border-left: 2px solid var(--gold); border-radius: 0 10px 10px 0; padding: 11px 14px; font-size: 14.5px; }
.comment b { color: var(--gold); font-weight: 400; display: block; font-size: 12.5px; margin-bottom: 2px; }
.pillar { display: grid; grid-template-columns: 230px minmax(0, 1fr); padding: 0; overflow: hidden; }
.pillar-side { padding: 20px; background: var(--pc); }
.pillar-side p { font-size: 13px; margin-top: 6px; color: var(--beige); }
.pillar-body { padding: 16px 20px; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.task:last-child { border-bottom: 0; }
.task .grow { flex: 1; min-width: 0; }
.task.done b { text-decoration: line-through; opacity: .6; }
.task b { font-weight: 400; display: block; }
.task select { width: auto; padding: 3px 8px; font-size: 12.5px; }

/* Jornada */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.level.current { border-color: var(--gold); background: linear-gradient(170deg, var(--petroleo), var(--surface)); }
.level .row { margin-bottom: 8px; }

/* Rotina */
.ring-wrap { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 400 28px var(--title); color: var(--gold); }
.table-scroll { overflow-x: auto; }
.week { width: 100%; border-collapse: collapse; min-width: 590px; }
.week th { font-weight: 400; font-size: 12px; letter-spacing: .1em; color: var(--muted); padding: 6px; }
.week td { padding: 10px 6px; text-align: center; border-top: 1px solid var(--line-soft); }
.week th:first-child, .week td:first-child { text-align: left; }
.week .today { color: var(--gold); }

/* Calculadora, tabela */
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.results div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.results b { display: block; font: 400 36px/1.05 var(--title); color: var(--gold); }
.results span { font-size: 13px; color: var(--muted); }
.people { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 14.5px; }
.people th { text-align: left; font-weight: 400; font-size: 12px; letter-spacing: .08em; color: var(--muted); padding: 8px 10px; }
.people td { padding: 11px 10px; border-top: 1px solid var(--line-soft); }
.people .bar { width: 90px; display: inline-block; vertical-align: middle; margin-right: 7px; }
.alert { color: #f0a58d; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stats b { display: block; font: 400 36px/1.1 var(--title); color: var(--gold); }

/* Mural */
.person { display: flex; flex-direction: column; gap: 10px; }
.avatar { width: 54px; height: 62px; flex: none; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--petroleo); display: grid; place-items: center; font-family: var(--title); color: var(--beige); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
details > summary { cursor: pointer; color: var(--beige); padding: 2px 0; }
.banner-img { height: 180px; border-radius: var(--r); background-size: cover; background-position: center; margin-bottom: 26px; }

/* Aulas */
.lesson { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.lesson:first-of-type { border-top: 0; }

/* Modal, toast, playlist */
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 26px; width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(2, 10, 12, .72); }
dialog h2 { margin-bottom: 12px; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px); background: var(--beige); color: #1c1407; padding: 9px 20px; border-radius: 99px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100vw - 32px); z-index: 20; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.music { position: fixed; right: 20px; bottom: 76px; width: 50px; height: 56px; border: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--gold); color: #1c1407; font-size: 20px; z-index: 5; }

/* Celular e tablet */
@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: fixed; z-index: 30; left: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(2, 10, 12, .65); }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--side); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line-soft); }
  .topbar img { height: 36px; width: 30px; object-fit: contain; }
  .topbar b { font: 400 19px var(--title); color: var(--beige); }
  .menu-btn { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 9px; padding: 6px 13px; font-size: 14px; }
  .page { padding: 28px 18px 100px; }
  .who { padding: 0 18px; gap: 14px; margin-top: -40px; }
  .medal { width: 88px; height: 110px; }
  .mosaic { grid-template-rows: 90px 90px; }
  .levels { grid-template-columns: 1fr; }
  .pillar { grid-template-columns: 1fr; }
  .grid.two { grid-template-columns: 1fr; }
  .event { gap: 12px; }
  .date-box { width: 62px; }
  .music { width: 38px; height: 43px; right: 10px; bottom: 64px; font-size: 15px; }
}

/* Versão com Firebase */
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--gold); font: italic 22px var(--title); }
.login-erro { color: #f0a58d; font-size: 14px; margin-top: 10px; text-align: center; }
.mentor-tools { display: inline-flex; gap: 6px; align-items: center; }
.btn.danger { background: transparent; border-color: #a9513c; color: #f0a58d; }
.btn.danger:hover { background: #a9513c; color: var(--cream); }
.soon { font-size: 13px; color: var(--muted); }

/* Acervo Hive */
.ficha-secao { margin: 30px 0 4px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 24px; color: var(--gold); }
.ficha-secao:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ac-abas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ac-abas a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; text-decoration: none; color: var(--beige); }
.ac-abas a:hover { border-color: var(--gold); color: var(--gold); }
.ac-abas a.on { background: var(--gold); border-color: var(--gold); color: #1c1407; }
.ac-busca { margin-bottom: 22px; }
.ac-busca input[type=search] { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; }
.ac-resultados { display: grid; gap: 8px; margin-top: 10px; }
.ac-secoes { margin-top: 22px; align-items: start; }
.ac-secao { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ac-secao img { width: 100%; height: auto; background: var(--surface-2); }
.ac-secao > div { padding: 14px 18px 16px; }
.ac-banner { border-radius: var(--r); overflow: hidden; margin-bottom: 20px; background: var(--surface-2); }
.ac-banner img { width: 100%; height: auto; }
.ac-titulo-secao { margin-bottom: 14px; }
.ac-desc { margin: 0 0 20px; }
.ac-grupo h3 { color: var(--gold); }
.ac-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin-top: 10px; }
.ac-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; margin: 6px 0; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 10px; text-decoration: none; font-size: 15px; color: var(--text); }
.ac-itens .ac-link, .ac-resultados .ac-link { margin: 0; }
.ac-link:hover { border-color: var(--gold); color: var(--gold); }
.ac-link i { font-style: normal; color: var(--gold); flex: none; }
.ac-link small { display: block; color: var(--muted); font-size: 12.5px; }
.ac-migalhas { color: var(--muted); margin-bottom: 14px; }
.ac-corpo { max-width: 780px; overflow-wrap: anywhere; }
.ac-corpo p { margin: 0 0 12px; min-height: 1em; }
.ac-corpo h2 { margin: 30px 0 12px; color: var(--gold); }
.ac-corpo h3 { margin: 26px 0 10px; font-size: 23px; color: var(--beige); }
.ac-corpo h4 { margin: 20px 0 8px; font: 400 19px/1.25 var(--title); color: var(--beige); }
.ac-corpo ul, .ac-corpo ol { margin: 0 0 12px; padding-left: 24px; }
.ac-corpo li { margin-bottom: 6px; }
.ac-corpo li > ul, .ac-corpo li > ol { margin: 6px 0 0; }
.ac-corpo a:not(.ac-link), .ac-grupo p a { color: var(--gold); }
.ac-corpo hr { border: 0; border-top: 1px solid var(--line-soft); margin: 22px 0; }
.ac-corpo figure { margin: 14px 0; }
.ac-corpo figure img { border-radius: 10px; max-height: 720px; width: auto; max-width: 100%; }
.ac-corpo figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ac-img { min-height: 60px; background: var(--surface-2); }
.ac-img[src] { min-height: 0; background: none; }
.ac-img-erro { min-height: 40px; font-size: 13px; color: var(--muted); }
blockquote { border-left: 3px solid var(--gold); margin: 0 0 14px; padding: 4px 0 4px 16px; color: var(--beige); }
.ac-recuo { padding-left: 22px; }
.ac-callout { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; }
.ac-callout > div { flex: 1; min-width: 0; }
.ac-callout > div > :last-child { margin-bottom: 0; }
.ac-icone { flex: none; font-size: 18px; }
.ac-destaque { color: var(--gold); }
.ac-toggle { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; }
.ac-toggle > div { margin-top: 10px; }
.ac-todo { display: flex; gap: 10px; margin-bottom: 8px; }
.ac-caixa { width: 18px; height: 18px; flex: none; margin-top: 3px; border: 1.5px solid var(--gold-d); border-radius: 5px; }
.ac-caixa.ok { background: var(--gold); }
.ac-colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ac-tabela { border-collapse: collapse; width: 100%; font-size: 14.5px; margin-bottom: 14px; }
.ac-tabela td, .ac-tabela th { border: 1px solid var(--line-soft); padding: 8px 10px; text-align: left; vertical-align: top; font-weight: 400; }
.ac-tabela th { color: var(--gold); }
.ac-campos { display: grid; gap: 6px; margin-bottom: 16px; font-size: 14.5px; }
.ac-campos span { color: var(--muted); margin-right: 6px; }
.ac-banco { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ac-rodape { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12.5px; }
