/* EDEN: preto, branco e azul Ranosi (o mesmo azul-petróleo do CRM). Modo dia e noite. */
:root { color-scheme:light; --bg:#f5f5f3; --surface:#fff; --soft:#eef1f3; --text:#1d1d1b; --muted:#6b6b66; --line:#e2e1dc; --accent:#1f4e5f; --accent-text:#fff; --warn:#a15f00; --bad:#a8473d; --sky1:#a9cbe8; --sky2:#fbe3cc; --back1:#e9f0f6; --back2:#f1eee9; --tower:#c9d4df; }
:root[data-theme="dark"] { color-scheme:dark; --bg:#121213; --surface:#1d1e20; --soft:#262a2d; --text:#ecebe6; --muted:#9a9993; --line:#34353a; --accent:#5fa3b8; --accent-text:#0f1a1e; --warn:#e0a24a; --bad:#e0857b; --sky1:#0d1b33; --sky2:#33486b; --back1:#0c1020; --back2:#1b2236; --tower:#222c44; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:var(--bg); color:var(--text); font:15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color:var(--accent); }
h1,h2,h3 { font-family:"Space Grotesk", Sora, Inter, -apple-system, sans-serif; font-weight:500; margin:0 0 .4em; }
h1 { font-size:26px; }
h2 { font-size:19px; margin-top:24px; }
h3 { font-size:15px; margin:16px 0 4px; }
.muted { color:var(--muted); }
.small { font-size:13px; }
button, input, select, textarea { font:inherit; color:inherit; }
button { cursor:pointer; background:var(--surface); border:1px solid var(--line); border-radius:9px; padding:8px 14px; }
button:hover { border-color:var(--accent); }
button.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-text); font-weight:600; }
button:disabled { opacity:.5; cursor:default; }
input, select, textarea { background:var(--surface); border:1px solid var(--line); border-radius:9px; padding:10px 12px; width:100%; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
label { display:block; margin:12px 0; }
.label { display:block; font-size:10px; letter-spacing:.24em; text-transform:uppercase; color:var(--accent); }
.error { color:var(--bad); min-height:1.5em; margin:8px 0 0; }
.empty { padding:24px; text-align:center; border:1px dashed var(--line); border-radius:12px; color:var(--muted); }

.gate { min-height:100vh; display:grid; place-items:center; padding:24px; }
.gate > .icon { position:fixed; top:14px; right:14px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:28px; width:min(400px,100%); box-shadow:0 24px 50px -30px #000; }
.card.broad { width:min(640px,100%); }
.terms { max-height:42vh; overflow:auto; padding:4px 16px; background:var(--soft); border-radius:12px; font-size:14px; }
.brand { text-align:center; margin-bottom:18px; }
.brand img { width:96px; height:96px; }
.brand strong { display:block; font-size:30px; font-weight:400; letter-spacing:.34em; padding-left:.34em; }
.brand span { color:var(--accent); font-size:11px; letter-spacing:.3em; }
.check { display:flex; gap:8px; align-items:center; }
.check input { width:auto; }
canvas.qr { display:block; margin:12px auto; background:#fff; border-radius:8px; }
code { background:var(--soft); padding:2px 6px; border-radius:6px; word-break:break-all; }

header { position:sticky; top:0; z-index:5; display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding:12px 22px; background:var(--surface); border-bottom:1px solid var(--line); }
header .logo { display:flex; align-items:center; gap:10px; letter-spacing:.3em; }
header .logo img { width:36px; height:36px; }
nav { display:flex; flex-wrap:wrap; gap:4px; flex:1; }
nav button { background:transparent; border-color:transparent; }
nav button[aria-current="page"] { background:var(--accent); color:var(--accent-text); }
.tools { display:flex; gap:6px; align-items:center; }
.icon { position:relative; width:40px; height:40px; padding:0; font-size:18px; line-height:1; }
.icon.news { opacity:.55; }
.icon.news.has { opacity:1; border-color:var(--accent); }
.icon.news.has::after { content:""; position:absolute; top:4px; right:4px; width:9px; height:9px; border-radius:50%; background:#d9483b; }
.badge { display:inline-block; min-width:18px; padding:0 5px; margin-left:6px; border-radius:10px; background:#d9483b; color:#fff; font-size:11px; font-weight:700; line-height:18px; }
.icon .badge { position:absolute; top:-5px; right:-5px; margin:0; }
.badge[hidden], .toolmenu[hidden], .updatebar[hidden], .bubble[hidden] { display:none; }
.toolbox { position:relative; }
.toolmenu { position:absolute; right:0; top:46px; z-index:20; width:260px; display:flex; flex-direction:column; padding:6px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:0 18px 40px -20px #000; }
.toolmenu button { text-align:left; border-color:transparent; }
.updatebar { display:flex; gap:12px; justify-content:center; align-items:center; padding:8px; background:var(--soft); }

main { max-width:1100px; margin:0 auto; padding:24px 16px 100px; }
main.wide { max-width:1560px; padding-top:16px; }
main form { max-width:560px; padding:0 4px; }

.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; margin:18px 0; }
.stat, .phase, .mission { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 18px; }
.stat b { display:block; font-size:30px; font-weight:500; }
.stat.bad b { color:var(--bad); }
.stat.warn b { color:var(--warn); }
.list { list-style:none; margin:0; padding:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.list li { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:center; padding:11px 16px; background:var(--surface); border-top:1px solid var(--line); }
.list li:first-child { border-top:0; }
.list .name { flex:1 1 240px; }
.list label { margin:0; }
.grants { display:flex; flex-wrap:wrap; gap:10px; }
.tag { font-size:12px; border-radius:20px; padding:2px 10px; background:var(--soft); white-space:nowrap; }
.tag.bad { background:var(--bad); color:var(--accent-text); }
.tag.warn { border:1px solid var(--warn); color:var(--warn); background:transparent; }
.tag.ghost { background:transparent; border:1px solid var(--line); color:var(--muted); }
details { margin:10px 0; }
summary { cursor:pointer; padding:10px 14px; background:var(--surface); border:1px solid var(--line); border-radius:10px; }
details[open] summary { margin-bottom:8px; }
.toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:14px 0; }
.toolbar input { max-width:320px; }
.phase { margin:12px 0; }
.phase ul { list-style:none; padding:0; margin:8px 0 0; }
.phase li::before { content:"○"; color:var(--muted); margin-right:10px; }
.phase li.done::before { content:"●"; color:var(--accent); }
.actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
progress { appearance:none; width:100%; height:8px; border:0; border-radius:8px; overflow:hidden; background:var(--soft); }
progress::-webkit-progress-bar { background:var(--soft); }
progress::-webkit-progress-value { background:var(--accent); }
progress::-moz-progress-bar { background:var(--accent); }
progress.good::-webkit-progress-value { background:#2f80d0; }
progress.mid::-webkit-progress-value { background:#f2b632; }
progress.low::-webkit-progress-value { background:#ee6a55; }
.missions { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
dl { display:grid; grid-template-columns:minmax(120px,220px) 1fr; gap:4px 14px; margin:8px 14px; font-size:13px; }
dt { color:var(--accent); }
dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }

.sug { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 18px; margin:12px 0; }
.sug.isnew { border-color:var(--accent); }
.sughead { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; }
.msg { border-left:3px solid var(--line); padding:4px 10px; margin:6px 0; }
.msg.boss { border-color:var(--accent); background:var(--soft); }
.thumbs { display:flex; gap:8px; margin:8px 0; }
.thumbs span { position:relative; }
.thumbs img { width:96px; height:72px; object-fit:cover; border-radius:8px; border:1px solid var(--line); }
.thumbs span button { position:absolute; top:2px; right:2px; padding:0 6px; }

/* o estúdio */
.game { position:relative; border-radius:16px; overflow:hidden; background:var(--back2); box-shadow:0 30px 60px -34px #000; }
.scroller { overflow:auto; max-height:calc(100vh - 190px); min-height:480px; }
.world { display:block; margin:auto; }
.stop-back1 { stop-color:var(--back1); } .stop-back2 { stop-color:var(--back2); }
.stop-sky1 { stop-color:var(--sky1); } .stop-sky2 { stop-color:var(--sky2); }
.towers rect, .towers path { fill:var(--tower); }
.windowtower { fill:#7d8fa6; }
:root[data-theme="dark"] .windowtower { fill:#101827; }
.citylight { fill:#ffd98a; opacity:0; }
:root[data-theme="dark"] .citylight { opacity:.95; }
.sim { cursor:pointer; }
.sim:focus-visible { outline:none; }
.sim .ring { fill:none; stroke:transparent; stroke-width:3; }
.sim:hover .ring, .sim:focus-visible .ring { stroke:#fff; }
.sim.picked .ring { stroke:#1f4e5f; }
.nametag { cursor:pointer; }
.nametag .tag { fill:#fff; filter:drop-shadow(0 2px 4px rgba(0,0,0,.22)); }
.nametag.me .tag { fill:#1f4e5f; }
.tagname { fill:#171a18; font-size:11.5px; font-weight:600; }
.nametag.me .tagname { fill:#fff; }
.roomtag { cursor:pointer; }
.roomtag rect { fill:rgba(16,19,22,.82); }
.roomtag text { fill:#f3f3eb; font-size:10px; font-weight:600; letter-spacing:1.6px; }
.roomtag:hover rect, .roomtag:focus-visible rect { fill:#1f4e5f; }
.roomtag:focus-visible { outline:none; }
.ranoroom { cursor:pointer; }
.sign { fill:#f3f3eb; font-size:22px; letter-spacing:9px; }
.onair { fill:#c7463a; }
.onairtext { fill:#fff; font-size:12px; font-weight:700; letter-spacing:2px; }
.steam { opacity:.7; animation:steam 3s ease-in-out infinite alternate; }
@keyframes steam { to { transform:translateY(-5px); opacity:.2; } }
.gamehud, .simpanel, .zoom button { background:var(--surface); border:1px solid var(--line); box-shadow:0 14px 34px -18px rgba(0,0,0,.5); }
.gamehud { position:absolute; top:14px; left:14px; width:232px; border-radius:12px; padding:12px 16px; }
.gamehud b { display:block; font-size:18px; font-weight:600; }
.gamehud progress { margin:4px 0; }
.simpanel { position:absolute; left:14px; bottom:14px; width:290px; max-height:calc(100% - 140px); overflow:auto; border-radius:14px; padding:14px 16px; }
.simpanel h2 { margin:2px 0 0; }
.portrait { display:block; width:100%; height:200px; margin:-2px 0 8px; border-radius:10px; background:linear-gradient(180deg, var(--soft), var(--surface)); }
.about { margin:8px 0; font-size:13px; }
.about b { display:block; font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--accent); }
.needs { margin:10px 0; }
.need { display:grid; grid-template-columns:104px 1fr; gap:8px; align-items:center; font-size:12px; margin:5px 0; }
.zoom { position:absolute; top:14px; right:14px; display:flex; flex-direction:column; gap:6px; }
.zoom button { width:38px; height:38px; padding:0; font-size:19px; border-radius:10px; }
.dock { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin:14px 0; }
.dock button.outside { border-color:var(--accent); }
.dock button.soon { border-style:dashed; }

/* Ranosinho no canto */
.rano { position:fixed; z-index:16; width:62px; padding:0; border:0; background:none; cursor:grab; touch-action:none; filter:drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.rano img { width:100%; display:block; pointer-events:none; }
.bubble { position:fixed; right:18px; bottom:96px; z-index:15; width:320px; padding:14px 16px; background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:0 18px 40px -18px rgba(0,0,0,.5); }
.ranohead { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.ranohead button { padding:2px 8px; }
.bubble .actions button { font-size:12px; padding:4px 10px; }

@media (max-width:760px) {
  header { position:static; padding:10px 12px; }
  main.wide { padding:10px 10px 100px; }
  nav { order:3; flex:1 0 100%; flex-wrap:nowrap; overflow-x:auto; }
  nav button { white-space:nowrap; }
  .tools { margin-left:auto; }
  .who { display:none; }
  .scroller { max-height:60vh; min-height:0; }
  .world { width:260%; max-width:none; }
  .gamehud, .simpanel { position:static; width:auto; max-height:none; border-radius:0; }
  .zoom { display:none; }
  .bubble { left:10px; right:10px; width:auto; }
  .card { padding:20px; }
  dl { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) { .steam { animation:none; } }

.sep { width:1px; align-self:stretch; background:var(--line); margin:0 6px; }
button.stat { text-align:left; border-radius:12px; }
button.stat.on { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent); }
.stat.good b { color:var(--accent); }
.bars { display:flex; flex-direction:column; gap:6px; }
.bar-row { display:grid; grid-template-columns:minmax(130px,230px) 1fr 44px; gap:10px; align-items:center; text-align:left; }
button.bar-row { background:transparent; border-color:transparent; padding:4px 8px; }
button.bar-row.on { background:var(--soft); border-color:var(--accent); }
.bar-row progress { height:14px; }
.bar-name { font-size:13px; }
.kanban { display:flex; gap:12px; overflow-x:auto; padding-bottom:12px; align-items:flex-start; }
.kcolumn { flex:0 0 270px; background:var(--soft); border-radius:12px; padding:12px; max-height:70vh; overflow-y:auto; }
.kcolumn h3 { margin:0; }
.kcard { background:var(--surface); border:1px solid var(--line); border-left:4px solid var(--line); border-radius:10px; padding:10px 12px; margin-top:8px; }
.kcard.stale { border-left-color:var(--warn); }
.kcard.late { border-left-color:var(--bad); }
.kmeta { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; align-items:center; }
details.wide { flex-basis:100%; margin:0; }
.bubble { max-height:min(640px, calc(100vh - 120px)); overflow:auto; width:340px; }
.chatlog { max-height:220px; overflow:auto; margin:8px 0; }
.chatlog .msg { white-space:pre-wrap; font-size:13px; }
.chatlog .msg.mine { text-align:right; border-left:0; border-right:3px solid var(--accent); }
.bubble form { max-width:none; padding:0; }
.bubble form button { margin-top:6px; }
main.wide, main.board { max-width:1560px; }
@media (max-width:760px) { .bar-row { grid-template-columns:110px 1fr 36px; } .kcolumn { flex-basis:82vw; } .bubble { width:auto; } }
.phase .list li::before, .phase .list li.done::before { content:none; }
