:root {
  --bg: #070706;
  --panel: #0f0e0c;
  --panel2: #15130f;
  --line: rgb(255 255 255 / 0.07);
  --gold: #c9a24a;
  --gold-hi: #e6c574;
  --ivory: #eeebe4;
  --muted: #9b968a;
  --faint: #5f5b52;
  --red: #e5484d;
  --serif: "Cinzel", serif;
  --sans: "Montserrat", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ivory); font: 400 14px/1.5 var(--sans); min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(60% 45% at 0% 0%, rgb(201 162 74 / 0.10), transparent 70%), radial-gradient(50% 40% at 100% 100%, rgb(201 162 74 / 0.06), transparent 70%); }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0.02em; margin: 0; }
.hint { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
.err { color: #ff8a8d; font-size: 13px; min-height: 1em; margin: 10px 0 0; }

/* botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: rgb(255 255 255 / 0.03); color: var(--ivory); font: 500 13px var(--sans); text-decoration: none; cursor: pointer; transition: all .2s; white-space: nowrap; }
.btn:hover { border-color: rgb(201 162 74 / 0.45); }
.btn.gold { background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: #120f08; border-color: transparent; font-weight: 600; }
.btn.gold:hover { filter: brightness(1.07); }
.btn.danger { background: var(--red); border-color: transparent; color: #fff; }
.btn:disabled { opacity: .5; cursor: wait; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); }
input, textarea { font: 400 14px var(--sans); color: var(--ivory); background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; outline: none; transition: border-color .2s; resize: vertical; }
input:focus, textarea:focus { border-color: rgb(201 162 74 / 0.6); }
input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 0; color: var(--ivory); cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--gold); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; text-align: center; padding: 38px 30px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 40px 80px -40px #000; }
.login-mono { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 4px; filter: drop-shadow(0 8px 24px rgb(201 162 74 / .35)); }
.login-box h1 { font-size: 22px; color: var(--gold-hi); }
.login-box > p { margin: -8px 0 6px; color: var(--muted); font-size: 13px; }
.login-box label { text-align: left; }

/* barra */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 14px clamp(16px, 3vw, 32px); background: rgb(7 7 6 / 0.85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bar-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); color: var(--gold-hi); letter-spacing: 0.08em; }
.bar-brand img { width: 30px; height: 30px; object-fit: contain; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; margin: 0 auto; }
.tab { border: 0; background: none; color: var(--muted); font: 500 13px var(--sans); padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.tab.on { background: var(--panel2); color: var(--gold-hi); box-shadow: inset 0 0 0 1px rgb(201 162 74 / 0.25); }
.bar-actions { display: flex; gap: 8px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 32px) 80px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head h2 { font-size: 24px; }
.grip-inline { color: var(--gold); letter-spacing: -2px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .full { grid-column: 1 / -1; }
.form.narrow { max-width: 440px; }
.actions { display: flex; justify-content: flex-end; }

/* lista de projetos */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, opacity .2s, transform .2s; }
.row:hover { border-color: rgb(201 162 74 / 0.3); }
.row.off { opacity: 0.5; }
.row.dragging { opacity: 0.35; transform: scale(.99); }
.row.over { border-color: var(--gold); }
.grip { cursor: grab; color: var(--faint); font-size: 18px; letter-spacing: -3px; padding: 4px 4px; user-select: none; }
.grip:active { cursor: grabbing; }
.ico { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; overflow: hidden; font-family: var(--serif); font-size: 19px; border: 1px solid; }
.ico img { width: 100%; height: 100%; object-fit: cover; }
.info { flex: 1; min-width: 0; }
.info strong { display: block; font-weight: 600; font-size: 14.5px; }
.info small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.st { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.st.up { background: #6fcf8f; }
.st.down { background: var(--red); }
.icon-btn { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--line); color: var(--ivory); background: rgb(255 255 255 / 0.03); }
.icon-btn.del:hover { color: var(--red); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty { text-align: center; color: var(--muted); padding: 40px; border: 1px dashed var(--line); border-radius: 16px; }

/* modal */
.modal { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); color: var(--ivory); padding: 0; width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 50px 100px -30px #000; }
.modal.small { width: min(420px, calc(100vw - 32px)); }
.modal::backdrop { background: rgb(0 0 0 / 0.7); backdrop-filter: blur(4px); }
.modal-body { padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { font-size: 20px; color: var(--gold-hi); }
.x { border: 0; background: none; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.editor-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.upload { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.preview-col { display: flex; flex-direction: column; gap: 8px; }
.pcard { padding: 22px; border-radius: 20px; background: linear-gradient(180deg, rgb(255 255 255 / 0.035), rgb(255 255 255 / 0.01)), #0e0d0b; border: 1px solid rgb(255 255 255 / 0.08); min-height: 220px; display: flex; flex-direction: column; }
.pcard .ico { margin-bottom: 18px; width: 50px; height: 50px; }
.pcard h4 { margin: 0 0 8px; font-family: var(--serif); font-weight: 500; font-size: 19px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pcard .b { font-family: var(--sans); font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #120f08; background: linear-gradient(135deg, var(--gold-hi), var(--gold)); padding: 3px 8px; border-radius: 999px; }
.pcard p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; font-weight: 300; }
.pcard small { margin-top: auto; padding-top: 16px; color: var(--faint); font-size: 11px; letter-spacing: .08em; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--panel2); border: 1px solid rgb(201 162 74 / 0.35); color: var(--ivory); padding: 12px 18px; border-radius: 12px; font-size: 13px; transition: all .3s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: var(--red); }

@media (max-width: 760px) {
  .tabs { order: 3; margin: 0; width: 100%; justify-content: center; }
  .bar-actions { margin-left: auto; }
  .editor-grid { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .tag { display: none; }
  .row { gap: 10px; }
}

/* seletor de ícone e prévia do app (igual ao launcher) */
.flabel { display: block; font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.pick { height: 42px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: all .15s; }
.pick svg { width: 20px; height: 20px; }
.pick:hover { color: var(--ivory); border-color: rgb(201 162 74 / .4); }
.pick.on { color: var(--gold-hi); border-color: var(--gold); background: rgb(201 162 74 / .12); box-shadow: 0 0 14px -4px var(--gold); }
.ico svg { width: 22px; height: 22px; }
.pcard { align-items: center; justify-content: center; gap: 18px; background: radial-gradient(90% 80% at 50% 40%, #131317, #050506); }
.ptile { position: relative; width: 92px; height: 92px; border-radius: 27px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, rgb(255 255 255 / .34) 0%, rgb(255 255 255 / .06) 46%, transparent 47%), radial-gradient(120% 100% at 30% 0%, color-mix(in srgb, var(--accent) 70%, #fff), transparent 70%), linear-gradient(155deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  border: 1px solid color-mix(in srgb, var(--accent) 50%, #fff); box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -14px 26px rgb(0 0 0 / .28), 0 0 44px -8px var(--accent);
  font: 600 30px var(--sans); }
.ptile svg { width: 42px; height: 42px; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .35)); }
.ptile.img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ptile .b { position: absolute; top: -7px; right: -10px; font: 700 8.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #111; background: #fff; padding: 4px 7px; border-radius: 999px; }
.plabel { font: 500 10.5px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #fff; text-align: center; }
