:root {
  --bg: #0b0c0e;
  --panel: #141619;
  --panel-2: #191c20;
  --line: #262a30;
  --text: #e8eaed;
  --muted: #8d949e;
  --accent: #5b9dff;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --radius: 12px;
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.centered {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

h1 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 15px; margin: 0 0 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.muted { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

form { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

input:focus { border-color: var(--accent); }

button {
  background: var(--accent);
  color: #04070d;
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s;
}

button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.55; cursor: default; }

.msg { min-height: 20px; font-size: 13px; margin: 14px 0 0; color: var(--muted); }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }

/* ---- dashboard ---- */
.shell { max-width: 1100px; margin: 0 auto; padding: 26px 20px 60px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.who { font-size: 13px; color: var(--muted); }
.who b { color: var(--text); font-weight: 600; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row span:first-child { color: var(--muted); }
.row span:last-child { text-align: right; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: #1f4d33; }
.pill.bad { color: var(--danger); border-color: #54262a; }

.desk {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.desk iframe { display: block; width: 100%; height: 62vh; border: 0; }

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 500;
  padding: 8px 13px;
  font-size: 14px;
}

a { color: var(--accent); }

/* ---- public per-customer storefront (/ on <name>.astro.ar) ---- */
.card { max-width: 460px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #04070d;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover { filter: brightness(1.08); }

.site-meta { margin: 0 0 20px; }
.site-actions { margin: 0 0 8px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
}

.shop-actions{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px}
#shop-pause-note,#shop-rename-note,#shop-status,#shop-public-url-wrap{margin-top:8px}

/* ---- chat del dueño con tarjetas multi-choice (slice 5) --------------------
   El mismo lenguaje visual que el prototipo, en el tema oscuro del panel.
   Regla del slice: 2 a 4 opciones + "Otro", "Otro" última y abre el teclado,
   la recomendada primera y marcada, y la consecuencia a la vista en la opción
   que gasta plata, publica o borra. Cero estilos inline en el JS. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#chat-panel .chat { margin-top: 4px; }

.chat-thread {
  max-height: 340px;
  min-height: 120px;
  overflow-y: auto;
  padding: 4px 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.chat-thread:empty::after {
  content: "Todavía no hay mensajes en la app.";
  display: block;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.bubble {
  max-width: min(86%, 420px);
  margin: 8px 10px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.bubble.astro {
  margin-right: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.bubble.owner {
  margin-left: auto;
  background: var(--accent);
  color: #04070d;
  border-bottom-right-radius: 4px;
}

.decision { margin: 8px 10px 12px; }

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.decision .bubble { margin: 0; }

.choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  /* 44px de alto mínimo: el dedo también tiene que poder. */
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  font-size: 14px;
  font-weight: 400;
}

.choice:hover { filter: none; background: var(--panel-2); }
.choice:disabled { color: var(--muted); opacity: 0.7; }
.choice.is-recommended { border-color: var(--accent); }
.choice.otra, .choice.undo { color: var(--muted); }
.choice.undo { border-style: dashed; }

.choice-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.choice-label { font-weight: 500; }

.choice-mark {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.choice-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.chat-pending { margin: 8px 10px; font-size: 13px; }

.chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.chat-composer input { font-size: 14px; }
