/* App Tarjetas de Presentación Digital — estilos mobile-first */
:root {
  --bg: #0b1416;
  --panel: #122024;
  --panel2: #0f1c20;
  --line: #1e3238;
  --text: #eaf4f4;
  --muted: #9fb8b8;
  --accent: #2dd4bf;
  --accent-d: #0e7c86;
  --danger: #f87171;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.5;
}
a { color: var(--accent); }
img, video { max-width: 100%; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #0d181b; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; }
.brand .logo { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-d)); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.nav a.active, .nav a:hover { color: var(--text); background: var(--panel); }
.userchip { font-size: 13px; color: var(--muted); }
.userchip button { margin-left: 8px; }

/* ---------- Contenido ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 18px 14px 60px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 22px; margin: 26px 0 10px; }
h3 { font-size: 17px; margin: 18px 0 8px; }
p.lead { color: var(--muted); font-size: 17px; max-width: 640px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Formularios ---------- */
label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], textarea, select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); font-size: 16px;
}
textarea { min-height: 80px; resize: vertical; }
input[type=color] { width: 56px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); padding: 2px; }
.color-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.color-row span { font-size: 14px; color: var(--muted); min-width: 190px; }
.file-row { display: flex; gap: 10px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.err { color: var(--danger); font-size: 14px; margin: 8px 0; }
.okmsg { color: var(--accent); font-size: 14px; margin: 8px 0; }

/* ---------- Botones ---------- */
.btn-primary, .btn-ghost, .btn-danger {
  display: inline-block; padding: 12px 20px; border-radius: 12px; font-size: 16px; font-weight: 700;
  border: none; cursor: pointer; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--accent); color: #06302b; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); padding: 8px 14px; font-size: 14px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Landing ---------- */
.hero { text-align: center; padding: 46px 10px 30px; }
.hero h1 { font-size: 34px; }
.hero .price-tag { display: inline-block; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; margin: 14px 0; font-weight: 700; color: var(--accent); }
.steps { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 18px 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step .n { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #06302b; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.testi { border-left: 3px solid var(--accent); padding: 6px 0 6px 14px; margin: 12px 0; color: var(--muted); font-style: italic; }
.testi b { color: var(--text); font-style: normal; }
.plan { text-align: center; max-width: 520px; margin: 0 auto; }
.plan .big { font-size: 44px; font-weight: 800; color: var(--accent); }
.plan ul { text-align: left; display: inline-block; margin: 12px auto; }
.demo-badge { display: inline-block; background: #3b2f0b; color: #fbbf24; border: 1px solid #92600e; border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 700; }

/* ---------- Creador ---------- */
.creator { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 980px) { .creator { grid-template-columns: 1fr 400px; align-items: start; } }
.theme-row { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-opt { border: 2px solid var(--line); border-radius: 12px; padding: 6px; cursor: pointer; background: var(--panel2); text-align: center; font-size: 13px; color: var(--muted); }
.theme-opt.sel { border-color: var(--accent); color: var(--text); }
.theme-swatch { width: 86px; height: 44px; border-radius: 8px; }
.preview-sticky { position: sticky; top: 70px; }
.preview-label { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 8px; }
.prod-edit { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; background: var(--panel2); }
.prod-edit .top { display: flex; justify-content: space-between; align-items: center; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }

/* ---------- Tarjeta pública ---------- */
.public-body { background: #0b1416; }
.pub-wrap { max-width: 460px; margin: 0 auto; padding: 14px 12px 40px; }
.pub-card {
  border-radius: 22px; overflow: hidden; color: #102a2e;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
}
.card-cover { height: 130px; }
.card-photo { margin: -48px auto 6px; border-radius: 50%; overflow: hidden; border: 4px solid #fff; background: #cbd5d5; position: relative; z-index: 2; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-initials { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; color: #0e5a63; background: linear-gradient(135deg, #bfe9e4, #7cc9c0); }
.card-name { text-align: center; font-size: 30px; margin: 8px 12px 2px; color: #0f2b30; }
.card-title { text-align: center; font-size: 17px; font-weight: 700; margin: 0 14px; }
.card-company { text-align: center; font-size: 15px; color: #41606a; margin: 2px 14px; }
.card-address { text-align: center; font-size: 14px; color: #5a7a83; margin: 6px 14px; }
/* Botones de contacto: 4 en una sola línea, compactos */
.cbtn-row { display: flex; gap: 8px; justify-content: center; padding: 12px 15px 4px; }
.cbtn {
  flex: 1 1 0; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: 12px; text-decoration: none; font-size: 12px; font-weight: 700;
}
.card-descbox { margin: 12px 15px; padding: 14px; border-radius: 14px; font-size: 15px; }
/* Íconos sociales: solo íconos reales, grandes dentro del círculo, centrados */
.sicon-row { display: flex; gap: 10px; justify-content: center; padding: 12px 15px; flex-wrap: wrap; }
.sicon {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.card-sec { padding: 4px 15px 10px; }
.card-sec-title { font-size: 16px; font-weight: 800; color: #0f2b30; margin: 8px 0; }
.card-media img, .card-media video { width: 100%; border-radius: 14px; display: block; }
.prod { border-radius: 14px; padding: 12px; margin: 10px 0; display: flex; gap: 12px; align-items: flex-start; }
.prod-img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.prod-body { flex: 1; min-width: 0; }
.prod-name { font-weight: 800; font-size: 16px; }
.prod-desc { font-size: 14px; opacity: .92; margin: 2px 0 8px; }
.prod-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prod-price { font-weight: 800; font-size: 16px; }
.btn-solicitar { background: var(--accent); color: #06302b; font-weight: 800; font-size: 14px; padding: 9px 16px; border-radius: 10px; text-decoration: none; white-space: nowrap; }
/* QR */
.pub-qr { border-radius: 22px; margin-top: 14px; padding: 18px; text-align: center; }
.pub-qr #card-qr { display: inline-block; background: #fff; padding: 10px; border-radius: 12px; }
.qr-cap { margin-top: 10px; font-size: 14px; font-weight: 700; color: #334155; }
.pub-actions { display: flex; gap: 10px; margin-top: 14px; }
.pub-actions .btn-ghost, .pub-actions .btn-primary { flex: 1; }
.notfound { padding: 40px 24px; text-align: center; }
.notfound h2 { color: #0f2b30; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: 100%; max-width: 420px; }
.modal h2 { margin-top: 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs button { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); font-weight: 700; cursor: pointer; }
.tabs button.sel { background: var(--accent); color: #06302b; border-color: var(--accent); }

/* ---------- Tablas ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.pending { background: #3b2f0b; color: #fbbf24; }
.pill.paid { background: #0b3b2e; color: #34d399; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.stat .v { font-size: 24px; font-weight: 800; color: var(--accent); }
.stat .l { font-size: 13px; color: var(--muted); }
.copyrow { display: flex; gap: 8px; margin: 10px 0; }
.copyrow input { flex: 1; }
footer.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 10px; border-top: 1px solid var(--line); margin-top: 30px; }
