:root {
  --bg: #0b1020;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e9f2;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --red: #cc1f1f;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 10px 30px rgba(15,23,42,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, #1e1b4b 0%, #0b1020 55%) fixed, var(--bg);
  color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: var(--brand); text-decoration: none; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: #fff; border-radius: 20px; box-shadow: 0 24px 64px rgba(0,0,0,.35);
  width: 100%; max-width: 400px; padding: 40px 36px; }
.logo { font-size: 26px; font-weight: 800; letter-spacing: -.5px; text-align: center; color: var(--ink); }
.logo span { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { text-align: center; color: var(--muted); margin: 6px 0 26px; font-size: 14px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; background: #fff; color: var(--ink); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 600; background: var(--brand); color: #fff; transition: .15s; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: #f8fafc; }
.btn.ghost { background: none; color: var(--muted); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Launcher ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; color: #fff; }
.topbar .logo { color: #fff; text-align: left; font-size: 20px; }
.topbar .logo span { color: #a5b4fc; background: none; -webkit-text-fill-color: #a5b4fc; }
.topbar .user { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #cbd5e1; }
.topbar .user a { color: #94a3b8; }

.launch { max-width: 900px; margin: 20px auto 60px; padding: 0 24px; }
.launch h1 { color: #fff; font-size: 26px; letter-spacing: -.4px; margin: 8px 0 4px; }
.launch .lede { color: #94a3b8; font-size: 14px; margin-bottom: 28px; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.app-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
  display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: .16s; border: 1px solid transparent; position: relative; }
.app-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(0,0,0,.22); border-color: rgba(124,58,237,.35); }
.app-card .icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.app-card h3 { margin: 0; font-size: 17px; }
.app-card p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.app-card .go { font-size: 13px; font-weight: 700; color: var(--brand); }
.app-card .badge { position: absolute; top: 16px; right: 16px; font-size: 10px; font-weight: 700; color: #fff;
  background: var(--brand-2); padding: 2px 8px; border-radius: 999px; letter-spacing: .4px; }
.ic-seo { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.ic-cambra { background: linear-gradient(135deg, #cc1f1f, #8c1d1d); }
.ic-radar { background: linear-gradient(135deg, #1a4080, #0e7490); }

/* ---------- Modal & toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5,8,20,.6); display: flex; align-items: center;
  justify-content: center; padding: 20px; z-index: 50; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto;
  padding: 26px; box-shadow: 0 24px 64px rgba(0,0,0,.4); }
.modal h3 { margin: 0 0 18px; font-size: 19px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

#toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #0f172a; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35); animation: slidein .2s; }
.toast.err { background: #dc2626; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }
.muted { color: var(--muted); }
