/* BATE-PAPO GERAL — design tokens, páginas públicas, autenticação e componentes base */
:root {
  --bg: #07090f; --bg2: #0b0f19; --surface: #0f1522; --surface2: #151c2e; --surface3: #1b2438; --line: #212b44; --line2: #2b3757;
  --text: #e9eefa; --muted: #8e9bb8; --faint: #5f6b87;
  --blue: #2f7bff; --blue2: #5aa2ff; --blue-d: #1d56c4; --gold: #e8b84a; --gold2: #ffd978;
  --ok: #19c37d; --err: #ff5470; --warn: #ffb020;
  --r: 14px; --r-lg: 20px; --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Roboto, Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { color-scheme: dark; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; }
a { color: var(--blue2); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue2); outline-offset: 2px; }
[hidden] { display: none !important; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 12px; border: 1px solid transparent; cursor: pointer; font-weight: 700;
  background: linear-gradient(135deg, var(--blue2), var(--blue)); color: #fff; box-shadow: 0 6px 22px rgba(47, 123, 255, .3); text-decoration: none !important; transition: transform .12s, filter .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.1); } .btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; border-color: var(--line2); color: var(--text); box-shadow: none; } .btn.ghost:hover { background: var(--surface2); }
.btn.gold { background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #1b1303; box-shadow: 0 6px 22px rgba(232, 184, 74, .25); }
.btn.danger { background: linear-gradient(135deg, #ff7a8e, var(--err)); box-shadow: none; }
.btn.sm { padding: .42rem .8rem; font-size: .88rem; border-radius: 10px; } .btn.big { padding: .95rem 1.7rem; font-size: 1.05rem; border-radius: 14px; } .btn.block { width: 100%; }
.icon-btn { background: transparent; border: 0; color: var(--muted); cursor: pointer; width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.1rem; }
.icon-btn:hover { background: var(--surface2); color: var(--text); }

/* formulários */
.fld { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .95rem; }
.fld > span { font-size: .85rem; font-weight: 600; color: var(--muted); } .fld small { color: var(--faint); font-size: .78rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=datetime-local], input[type=url], select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: .75rem .9rem; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 123, 255, .2); }
textarea { resize: vertical; min-height: 80px; } select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.check { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; cursor: pointer; } .check input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; } @media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* marca */
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text) !important; text-decoration: none !important; }
.brand img { border-radius: 10px; }
.wm { display: flex; flex-direction: column; line-height: 1; font-weight: 800; letter-spacing: .5px; font-size: 1rem; }
.wm i { font-style: normal; background: linear-gradient(90deg, var(--blue2), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 4px; font-size: .86rem; display: inline; }
.wm b { font-weight: 800; } .wm small { font-size: .56rem; letter-spacing: 3.4px; color: var(--gold); font-weight: 700; margin-top: 3px; }

/* ===== páginas públicas ===== */
.pub-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem max(1rem, 4vw); background: rgba(7, 9, 15, .8); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.pub-head nav { display: flex; align-items: center; gap: 1rem; } .pub-head nav a:not(.btn) { color: var(--muted); font-weight: 600; } .pub-head nav a:not(.btn):hover { color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .pub-head nav a:not(.btn) { display: none; } .wm small { display: none; } }
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 9vw, 7rem) max(1.2rem, 5vw) clamp(3rem, 8vw, 6rem); }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(60% 60% at 70% 30%, rgba(47, 123, 255, .22), transparent 70%), radial-gradient(40% 40% at 15% 85%, rgba(232, 184, 74, .1), transparent 70%), url('/img/world-dots.svg') center 60% / min(1300px, 140%) no-repeat; opacity: .95; }
.hero-in { position: relative; max-width: 780px; }
.eyebrow { color: var(--gold); letter-spacing: .35em; font-weight: 800; font-size: .8rem; margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.2rem, 6.4vw, 4.2rem); line-height: 1.05; margin: 0 0 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.grad { background: linear-gradient(90deg, var(--blue2), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; } .gold { color: var(--gold); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #b8c3de; max-width: 620px; } .lead2 { color: var(--muted); font-size: 1.1rem; max-width: 640px; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1rem; } .mini { color: var(--faint); font-size: .88rem; } .center { text-align: center; }
.dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; padding: 0 max(1.2rem, 5vw) 3rem; max-width: 1200px; margin: 0 auto; }
.dim { background: linear-gradient(160deg, var(--surface2), var(--surface)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; }
.dim:nth-child(2) { border-color: rgba(47, 123, 255, .35); } .dim:nth-child(3) { border-color: rgba(232, 184, 74, .3); }
.dim-ic { font-size: 2rem; } .dim h2 { margin: .5rem 0 .3rem; letter-spacing: .15em; font-size: 1.1rem; } .dim p { color: var(--muted); margin: 0; }
.blk { max-width: 1100px; margin: 0 auto; padding: 2.5rem max(1.2rem, 4vw); } .blk h2 { font-size: 1.6rem; margin: 0 0 1.2rem; } .h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .6rem; letter-spacing: -.01em; }
.room-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: .8rem; }
.room-pill { display: flex; align-items: center; gap: .9rem; padding: .95rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--text) !important; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.room-pill:hover { border-color: var(--blue); transform: translateY(-2px); } .room-pill .ic { font-size: 1.7rem; width: 46px; height: 46px; display: grid; place-items: center; background: var(--surface3); border-radius: 12px; flex: none; }
.room-pill span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; } .room-pill small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .room-pill em { font-style: normal; color: var(--faint); font-size: .8rem; flex: none; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; } .feat h3 { margin: 0 0 .3rem; } .feat p { margin: 0; color: var(--muted); }
.room-page { text-align: center; } .rp-ic { font-size: 4rem; } .room-page .cta { justify-content: center; } .room-page .lead2 { margin: 0 auto; }
.legal { max-width: 800px; } .legal h2 { font-size: 1.25rem; margin: 1.8rem 0 .5rem; } .legal p, .legal li { color: #c3cce2; } .legal ul, .legal ol { padding-left: 1.3rem; }
.pub-foot { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; padding: 2rem max(1.2rem, 4vw) calc(2rem + var(--safe-b)); border-top: 1px solid var(--line); color: var(--muted); }
.pub-foot nav { display: flex; flex-wrap: wrap; gap: 1rem; } .pub-foot a { color: var(--muted); } small { color: var(--faint); }

/* ===== autenticação ===== */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; background: radial-gradient(60% 50% at 80% 0%, rgba(47, 123, 255, .2), transparent), radial-gradient(50% 50% at 0% 100%, rgba(232, 184, 74, .1), transparent), var(--bg); }
.auth-card { width: min(460px, 100%); background: linear-gradient(180deg, var(--surface2), var(--surface)); border: 1px solid var(--line); border-radius: 24px; padding: 2rem 1.6rem; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; margin-bottom: 1.4rem; } .auth-card h1 { margin: 0 0 .3rem; font-size: 1.5rem; text-align: center; } .auth-card .sub { text-align: center; color: var(--muted); margin: 0 0 1.4rem; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; font-size: .92rem; }
.alert { padding: .75rem .9rem; border-radius: 12px; margin-bottom: 1rem; font-size: .92rem; border: 1px solid; } .alert.err { background: rgba(255, 84, 112, .1); border-color: rgba(255, 84, 112, .4); color: #ffb3c0; }
.alert.ok { background: rgba(25, 195, 125, .1); border-color: rgba(25, 195, 125, .4); color: #9ff0cc; } .alert.info { background: rgba(47, 123, 255, .1); border-color: rgba(47, 123, 255, .4); color: #b6d2ff; }

/* ===== feedback ===== */
#toasts { position: fixed; z-index: 1000; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--safe-b)); display: flex; flex-direction: column; gap: .5rem; width: min(440px, 92vw); pointer-events: none; }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast { background: var(--surface3); border: 1px solid var(--line2); border-left: 4px solid var(--blue); padding: .75rem 1rem; border-radius: 12px; box-shadow: var(--shadow); animation: tin .25s ease; pointer-events: auto; font-size: .95rem; }
.toast.err { border-left-color: var(--err); } .toast.ok { border-left-color: var(--ok); } .toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }
.spin { width: 28px; height: 28px; border: 3px solid var(--line2); border-top-color: var(--blue2); border-radius: 50%; animation: sp .8s linear infinite; margin: 2rem auto; } @keyframes sp { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); } .empty .e-ic { font-size: 2.6rem; margin-bottom: .4rem; } .empty b { color: var(--text); display: block; } .empty p { margin: .3rem 0 0; }
.modal-back { position: fixed; inset: 0; z-index: 900; background: rgba(2, 4, 9, .72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 1rem; animation: fin .15s; } @keyframes fin { from { opacity: 0; } }
.modal { width: min(480px, 100%); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line2); border-radius: 20px; box-shadow: var(--shadow); } .modal.wide { width: min(760px, 100%); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem .5rem 1.2rem; } .modal-h h3 { margin: 0; font-size: 1.1rem; }
.modal-b { padding: .5rem 1.2rem 1rem; overflow: auto; } .modal-f { display: flex; justify-content: flex-end; gap: .6rem; padding: .8rem 1.2rem 1.1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet { display: flex; flex-direction: column; margin: 0 -.4rem; } .sheet-i { display: flex; gap: .8rem; align-items: center; background: none; border: 0; text-align: left; padding: .85rem .6rem; border-radius: 10px; cursor: pointer; font-size: 1rem; } .sheet-i:hover { background: var(--surface2); } .sheet-i.danger { color: var(--err); }
@media (max-width: 600px) { .modal-back { align-items: end; padding: 0; } .modal { border-radius: 22px 22px 0 0; width: 100%; max-height: 92dvh; padding-bottom: var(--safe-b); } }

/* avatar */
.av { border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; background: var(--surface3); }
.av-i { color: #fff; font-weight: 800; user-select: none; }
