/* Escalador — tema "cidade à noite": fundo escuro, dourado, rosa neon e verde-dinheiro. Visual original inspirado em jogos de mundo aberto. */
:root {
  color-scheme: dark;
  --bg: #0b0912; --card: #15111f; --card2: #1d1830; --ink: #f4efe4; --muted: #9d96b3; --line: #2e2745;
  --brand: #f2b705; --brand-d: #ffd34d; --brand-l: rgba(242,183,5,.13); --on-brand: #150f00;
  --pink: #ff2e88; --cyan: #19d3da;
  --ok: #7ed957; --warn: #f2b705; --bad: #ff5468; --bad-bg: rgba(255,84,104,.14); --bad-line: rgba(255,84,104,.45);
  --radius: 12px; --shadow: 0 0 0 1px rgba(255,255,255,.02), 0 8px 28px rgba(0,0,0,.45);
  --display: "Anton", Impact, "Haettenschweiler", "Arial Narrow Bold", "Arial Black", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--ink);
  background: radial-gradient(900px 520px at 85% -8%, rgba(255,46,136,.16), transparent 62%), radial-gradient(800px 480px at -5% 0%, rgba(25,211,218,.08), transparent 58%), var(--bg);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
a:hover { color: var(--brand-d); }
code { background: var(--card2); padding: 1px 6px; border-radius: 6px; font-size: 90%; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; letter-spacing: .6px; text-transform: uppercase; }
.hidden { display: none !important; }
::selection { background: var(--pink); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #3a3158; border-radius: 99px; } ::-webkit-scrollbar-track { background: transparent; }

/* Layout */
#app { display: flex; min-height: 100%; }
.side { width: 232px; flex: none; background: linear-gradient(180deg, #120d1d, #0d0a15); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh; }
.logo { font-family: var(--display); font-size: 25px; letter-spacing: 1.5px; text-transform: uppercase; padding: 2px 10px 18px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, #ffe27a, var(--brand) 45%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo i { width: 28px; height: 28px; border-radius: 50%; display: inline-block; flex: none; -webkit-text-fill-color: initial;
  background: radial-gradient(circle at 50% 100%, #ffe27a 0 38%, var(--brand) 39% 55%, var(--pink) 56% 100%); box-shadow: 0 0 16px rgba(255,46,136,.55); }
.side a.nav { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; letter-spacing: .2px; border-left: 3px solid transparent; }
.side a.nav:hover { background: var(--card2); color: var(--ink); }
.side a.nav.on { background: linear-gradient(90deg, var(--brand-l), transparent); color: var(--brand); border-left-color: var(--brand); }
.side a.nav.soon { color: var(--muted); cursor: default; opacity: .6; }
.side a.nav.soon small { margin-left: auto; font-size: 11px; background: var(--card2); padding: 1px 7px; border-radius: 99px; }
.side .grow { flex: 1; }
.main { flex: 1; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(13,10,21,.86); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--pink), var(--brand) 55%, transparent); opacity: .85; }
.top h1 { font-size: 26px; margin: 0; flex: 1; line-height: 1.1; }
.top .who { color: var(--muted); font-size: 14px; }
.page { padding: 24px 28px 60px; max-width: 1200px; }

/* Controles */
.btn { border: 1px solid var(--line); background: var(--card2); padding: 9px 16px; border-radius: 8px; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .05s, box-shadow .15s; }
.btn:hover { border-color: #5a4d86; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #ffd34d, var(--brand)); border-color: #b98500; color: var(--on-brand); text-transform: uppercase; letter-spacing: .5px; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 4px 18px rgba(242,183,5,.25); }
.btn.primary:hover { background: linear-gradient(180deg, #ffe27a, #ffc21a); color: var(--on-brand); box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 6px 24px rgba(242,183,5,.4); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad-line); color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #0f0b19; width: 100%; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #6c6585; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,183,5,.18); }
input[readonly] { color: var(--muted); }
textarea { resize: vertical; min-height: 84px; }
input[type=range] { width: 100%; accent-color: var(--brand); }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--bad); font-size: 14px; margin: 8px 0; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 4px; letter-spacing: .6px; background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.badge.ok { background: rgba(126,217,87,.13); color: var(--ok); border-color: rgba(126,217,87,.4); }
.badge.draft { background: var(--brand-l); color: var(--brand); border-color: rgba(242,183,5,.4); }
.badge.ia { background: rgba(25,211,218,.12); color: var(--cyan); border-color: rgba(25,211,218,.4); }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
details > summary { cursor: pointer; }
hr { border-color: var(--line) !important; }

/* Login: pôr do sol na cidade */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #0d0719 0%, #26104a 42%, #8d1f78 70%, #ff2e88 86%, #f2b705 100%); }
.login::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 190px; pointer-events: none; opacity: .96;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='190' viewBox='0 0 520 190'%3E%3Cg fill='%230a0712'%3E%3Crect x='0' y='90' width='46' height='100'/%3E%3Crect x='52' y='40' width='38' height='150'/%3E%3Crect x='96' y='110' width='58' height='80'/%3E%3Crect x='160' y='60' width='34' height='130'/%3E%3Crect x='200' y='100' width='64' height='90'/%3E%3Crect x='270' y='20' width='40' height='170'/%3E%3Crect x='316' y='84' width='52' height='106'/%3E%3Crect x='374' y='50' width='36' height='140'/%3E%3Crect x='416' y='104' width='60' height='86'/%3E%3Crect x='480' y='70' width='40' height='120'/%3E%3C/g%3E%3Cg fill='%23f2b705' opacity='.75'%3E%3Crect x='60' y='60' width='5' height='7'/%3E%3Crect x='74' y='84' width='5' height='7'/%3E%3Crect x='170' y='80' width='5' height='7'/%3E%3Crect x='282' y='44' width='5' height='7'/%3E%3Crect x='296' y='80' width='5' height='7'/%3E%3Crect x='382' y='70' width='5' height='7'/%3E%3Crect x='490' y='92' width='5' height='7'/%3E%3C/g%3E%3C/svg%3E") repeat-x bottom / auto 190px; }
.login .card { width: 100%; max-width: 390px; padding: 28px; position: relative; z-index: 1; background: rgba(21,17,31,.94); border-color: rgba(255,255,255,.1); box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(255,46,136,.18); }
.login h2 { margin: 0 0 4px; font-size: 30px; } .login p { margin: 0 0 18px; color: var(--muted); }

/* Templates */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform .12s, border-color .12s, box-shadow .12s; }
.tcard:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 24px rgba(242,183,5,.18); }
.tcard .pic { aspect-ratio: 9/16; background: #0a0812; position: relative; }
.tcard .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard .pic .badge { position: absolute; top: 8px; left: 8px; }
.tcard .meta { padding: 10px 12px; }
.tcard .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(4,2,10,.78); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { background: var(--card); border: 1px solid #3a3158; border-radius: 14px; padding: 24px; width: 100%; max-width: 720px; max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 40px rgba(255,46,136,.12); }
.modal h2 { margin: 0 0 4px; font-size: 30px; }
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; margin: 18px 0; }
.type { border: 2px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; text-align: center; background: var(--card2); transition: border-color .12s, transform .12s; }
.type:hover { border-color: #5a4d86; }
.type.on { border-color: var(--brand); background: var(--brand-l); box-shadow: 0 0 20px rgba(242,183,5,.2); }
.type img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 8px; background: #0a0812; display: block; margin-bottom: 8px; }

/* Assistente */
.wiz { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.step { flex: 1; min-width: 92px; padding: 8px 10px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); cursor: pointer; text-align: center; }
.step:hover { border-color: #5a4d86; }
.step.on { background: linear-gradient(180deg, #ffd34d, var(--brand)); border-color: #b98500; color: var(--on-brand); box-shadow: 0 0 18px rgba(242,183,5,.3); }
.step.done { color: var(--brand); background: var(--brand-l); border-color: rgba(242,183,5,.35); }
.bar { height: 9px; background: #0f0b19; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--brand)); transition: width .3s; box-shadow: 0 0 12px rgba(242,183,5,.5); }
.phone { position: sticky; top: 84px; background: #050309; border: 1px solid #3a3158; border-radius: 34px; padding: 10px; box-shadow: 0 16px 50px rgba(0,0,0,.6), 0 0 36px rgba(255,46,136,.18); }
.phone img { width: 100%; display: block; border-radius: 26px; aspect-ratio: 9/16; background: #0a0812; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.sliders .field { margin-bottom: 8px; }
.sliders output, .field output { float: right; font-weight: 800; color: var(--brand); text-transform: none; letter-spacing: 0; }
.plist { display: flex; flex-direction: column; gap: 8px; }
.pitem { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card2); }
.pitem .txt { flex: 1; white-space: pre-wrap; word-break: break-word; }
.pitem textarea { min-height: 60px; }
.mgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.mitem { position: relative; border-radius: 10px; overflow: hidden; background: #0a0812; border: 2px solid var(--line); cursor: pointer; }
.mitem img { width: 100%; aspect-ratio: 9/14; object-fit: cover; display: block; }
.mitem .cap { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; font-size: 11px; padding: 14px 6px 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mitem.sel { border-color: var(--brand); box-shadow: 0 0 18px rgba(242,183,5,.3); }
.mitem .chk { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; }
.mitem .x { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.7); color: #fff; border: 0; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }
.mitem .x:hover { background: var(--bad); }
.drop { border: 2px dashed #4a3f70; border-radius: 12px; padding: 26px; text-align: center; color: var(--muted); cursor: pointer; background: #0f0b19; }
.drop:hover { border-color: #7a6bb0; }
.drop.over { border-color: var(--brand); background: var(--brand-l); }
.up { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.up .bar { flex: 1; }
.vgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.vcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.vcard video, .vcard .ph { width: 100%; aspect-ratio: 9/16; background: #0a0812; display: block; object-fit: cover; }
.vcard .ph { display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 8px; }
.vcard .meta { padding: 8px 10px; font-size: 12px; color: var(--muted); }
.vcard .meta p { margin: 0 0 6px; max-height: 3.6em; overflow: hidden; color: var(--ink); }
.foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #0f0b19; color: var(--ink); border: 1px solid var(--brand); padding: 10px 18px; border-radius: 8px; z-index: 99; max-width: 90vw; box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 24px rgba(242,183,5,.25); }
.toast.bad { border-color: var(--bad); box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 24px rgba(255,84,104,.25); }
.note { background: var(--brand-l); color: #f6dd8a; border: 1px solid rgba(242,183,5,.3); border-left: 4px solid var(--brand); border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.note a { color: var(--brand-d); }

@media (max-width: 900px) {
  .side { position: fixed; bottom: 0; left: 0; right: 0; top: auto; width: 100%; height: auto; flex-direction: row; padding: 6px; z-index: 20; border-top: 1px solid var(--line); border-right: 0; background: #0d0a15; }
  .side .logo, .side .grow, .side a.nav.soon, .side a.nav.desk { display: none; }
  .side a.nav { flex: 1; justify-content: center; padding: 10px 4px; border-left: 0; border-top: 3px solid transparent; font-size: 13px; }
  .side a.nav.on { border-top-color: var(--brand); background: var(--brand-l); }
  .page { padding: 18px 14px 90px; } .top { padding: 12px 14px; } .top h1 { font-size: 22px; }
  .wiz { grid-template-columns: 1fr; } .phone { position: static; max-width: 260px; margin: 0 auto; order: -1; }
  .two, .sliders, .types { grid-template-columns: 1fr; } .types { grid-template-columns: repeat(2, 1fr); }
}
