:root {
  --bg: #070b14;
  --bg2: #0d1320;
  --card: #121a2b;
  --gold: #e8c547;
  --gold2: #c9a227;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --line: rgba(201, 162, 39, 0.28);
  --ok: #34d399;
  --danger: #f87171;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  padding-bottom: calc(72px + var(--safe-b));
}
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0f1524, var(--bg));
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; gap: 12px; align-items: center; }
.logo {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; font-size: 0.85rem;
  background: linear-gradient(135deg, #fff6c8, var(--gold), #8b6914);
  color: #0a0e17;
}
.top h1 { font-size: 1rem; font-weight: 700; }
.top p { font-size: 0.72rem; color: var(--muted); }
.badge {
  font-size: 0.65rem; font-weight: 700; padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--gold); background: rgba(232,197,71,.08);
}
.badge.off { color: var(--danger); border-color: rgba(248,113,113,.4); }
.wrap { padding: 14px 14px 24px; max-width: 720px; margin: 0 auto; }
.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: #0a0f1a; border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.bottom button {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  padding: 8px 4px 10px; font-size: 0.65rem; cursor: pointer;
}
.bottom button .ico { display: block; font-size: 1.1rem; margin-bottom: 2px; }
.bottom button.on { color: var(--gold); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
.card h2 { font-size: 0.95rem; color: var(--gold); margin-bottom: 8px; }
.card h3 { font-size: 0.85rem; margin: 10px 0 6px; }
.muted { color: var(--muted); font-size: 0.8rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.agent {
  text-align: left; width: 100%; cursor: pointer;
  background: linear-gradient(145deg, #151d30, #101826);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  color: var(--text);
}
.agent:hover, .agent:focus { border-color: var(--gold); }
.agent strong { display: block; color: var(--gold); font-size: 0.88rem; }
.agent span { font-size: 0.72rem; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 12px; padding: 10px 14px; font-weight: 700;
  font-size: 0.85rem; cursor: pointer;
}
.btn-gold {
  background: linear-gradient(135deg, #f0d56a, var(--gold2));
  color: #0a0e17;
}
.btn-outline {
  background: transparent; color: var(--gold);
  border: 1px solid var(--line);
}
.btn-sm { padding: 6px 10px; font-size: 0.75rem; }
.btn-block { width: 100%; margin-top: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
textarea, input, select {
  width: 100%; background: #0a0f1a; border: 1px solid var(--line);
  border-radius: 12px; color: var(--text); padding: 10px 12px;
  font-size: 0.9rem; margin-top: 6px;
}
textarea { min-height: 100px; resize: vertical; }
label { font-size: 0.75rem; color: var(--muted); display: block; margin-top: 10px; }
.out {
  white-space: pre-wrap; background: #0a0f1a; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; font-size: 0.85rem; margin-top: 10px;
  max-height: 50vh; overflow: auto;
}
.chat-log { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 45vh; overflow: auto; }
.bubble {
  padding: 10px 12px; border-radius: 14px; font-size: 0.85rem; max-width: 95%;
  white-space: pre-wrap;
}
.bubble.user { align-self: flex-end; background: #1a2740; border: 1px solid var(--line); }
.bubble.ai { align-self: flex-start; background: #141c2e; border: 1px solid rgba(232,197,71,.2); }
.day-card { border-left: 3px solid var(--gold); padding-left: 10px; margin-bottom: 12px; }
#toast {
  position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%);
  background: #1a2740; color: var(--text); padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 0.8rem; opacity: 0; pointer-events: none;
  transition: opacity .25s; z-index: 50; max-width: 90%; text-align: center;
}
#toast.show { opacity: 1; }
.locked { font-size: 0.7rem; color: var(--muted); margin-top: 4px; }

/* === SocialOS — difícil de ignorar === */
.hero-robot {
  display: flex; gap: 12px; align-items: center;
  padding: 14px; margin-bottom: 12px;
  border-radius: 18px;
  background: radial-gradient(ellipse at 20% 50%, rgba(232,197,71,0.18), transparent 55%),
              linear-gradient(145deg, #151d30, #0c1220);
  border: 1px solid rgba(232,197,71,0.35);
  box-shadow: 0 0 40px rgba(232,197,71,0.08);
}
.hero-robot .rb {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.4rem;
  background: linear-gradient(135deg, #1a1520, #0a0e17);
  border: 1px solid rgba(232,197,71,0.5);
  box-shadow: 0 0 20px rgba(232,197,71,0.25);
}
.hero-robot strong { color: var(--gold); display: block; font-size: 0.95rem; }
.hero-robot span { font-size: 0.75rem; color: var(--muted); }
.agent {
  position: relative;
  overflow: hidden;
  min-height: 72px;
}
.agent::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gold);
  opacity: 0.7;
}
.agent[data-agent="arte"]::after,
.agent[data-agent="reels"]::after { background: #f472b6; }
.agent[data-agent="community"]::after,
.agent[data-agent="vendas"]::after { background: #34d399; }
.agent[data-agent="revisor"]::after { background: #f87171; }
.agent[data-agent="semana"]::after,
.agent[data-agent="orquestrador"]::after { background: #60a5fa; }
.week-strip {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  margin: 10px 0;
}
.week-strip span {
  text-align: center; font-size: 0.65rem; font-weight: 700;
  padding: 8px 2px; border-radius: 8px;
  background: #0a0f1a; border: 1px solid var(--line); color: var(--muted);
}
.week-strip span.on { color: #0a0e17; background: var(--gold); border-color: var(--gold); }
