/* Réplica visual de la app de los videos de Cueva — recreada con CSS,
   sin assets del original. Tema claro, acento verde, botones negros. */
:root {
  --bg: #f6faf5;
  --panel: #ffffff;
  --ink: #141814;
  --muted: #6d786d;
  --line: #e2eae1;
  --green: #8ce88f;
  --green-hover: #79dd7e;
  --green-ink: #0f2c10;
  --green-soft: #ecf6eb;
  --green-banner: #effaf0;
  --black: #171c16;
  --danger: #d64545;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; }
h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
h3 { font-size: 18px; font-weight: 750; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.hidden { display: none !important; }
.screen { min-height: 100vh; }

/* ── Marca (glifo dibujado con SVG + texto) ── */
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 850; font-size: 21px; letter-spacing: -0.02em; color: var(--ink); }
.brand.center { display: flex; justify-content: center; margin-bottom: 10px; }
.brand svg { display: block; }

/* ── Layout con riel lateral ── */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.rail { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 14px; }
.rail-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 10px 12px; font: 500 14.5px var(--font); color: var(--ink); cursor: pointer; }
.rail-item:hover { background: var(--green-soft); }
.rail-item.active { background: var(--green-soft); font-weight: 700; }
.rail-item .ri { width: 18px; text-align: center; color: var(--muted); }
.main { padding: 26px 34px 40px; max-width: 1180px; width: 100%; margin: 0 auto; }
.main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.userbox { display: flex; align-items: center; gap: 12px; }
.bell { position: relative; font-size: 17px; cursor: pointer; }
.bell i { position: absolute; top: 0; right: -1px; width: 8px; height: 8px; border-radius: 50%; background: #f0564f; border: 1.5px solid #fff; }
.balance-chip { background: var(--green-soft); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; color: var(--muted); }
.balance-chip b { color: var(--ink); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #dcefe0; color: #23602c; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.user-name { font-weight: 700; font-size: 14px; line-height: 1.15; display: flex; flex-direction: column; }
.user-name em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; }

/* ── Tabs y filtros ── */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-top: 22px; }
.tab { background: none; border: 0; font: 650 15.5px var(--font); color: var(--muted); padding: 10px 2px; cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.filters { display: flex; gap: 12px; align-items: flex-end; margin: 18px 0 14px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .seg-field > span { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.field select, .field input, .field textarea {
  font: 500 14.5px var(--font); color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 170px; outline: none;
}
.field textarea { min-width: 0; width: 100%; resize: vertical; }
.field select:focus, .field input:focus, .field textarea:focus { border-color: #a9d3a4; }
.field.grow { flex: 1; } .field.grow input { width: 100%; }
.refresh { background: none; border: 0; font: 650 14px var(--font); color: var(--muted); cursor: pointer; padding: 10px 4px; }
.refresh:hover { color: var(--ink); }

/* ── Tabla de ofertas ── */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.offers { width: 100%; border-collapse: collapse; }
.offers th { text-align: left; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fbfdfb; }
.offers td { padding: 15px 16px; border-bottom: 1px solid #eef3ee; vertical-align: middle; }
.offers tbody tr:nth-child(even) { background: #f8fbf7; }
.offers tbody tr:hover { background: var(--green-banner); }
.offers tbody tr:last-child td { border-bottom: 0; }
.seller { display: flex; gap: 11px; align-items: center; min-width: 190px; }
.seller .avatar { width: 34px; height: 34px; font-size: 13px; }
.seller b { font-size: 14.5px; }
.seller .meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.price { font-weight: 800; font-size: 16.5px; white-space: nowrap; }
.price small { display: block; font-weight: 550; color: var(--muted); font-size: 12px; margin-top: 2px; }
.disp b { font-size: 14px; } .disp span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.methods { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.net { font-size: 13.5px; font-weight: 600; }
.net span { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ── Pulgares (SVG propio) ── */
.thumb { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; }
.thumb.big { width: 30px; height: 30px; }
.thumb.up { color: #2f9e44; } .thumb.down { color: #e05252; transform: scaleY(-1); }

/* ── Botones ── */
.btn { border: 0; border-radius: 10px; padding: 11px 20px; font: 700 14.5px var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.black { background: var(--black); color: #fff; }
.btn.black:hover { background: #242b23; }
.btn.green { background: var(--green); color: var(--green-ink); }
.btn.green:hover { background: var(--green-hover); }
.btn.green-soft { background: var(--green-soft); color: #23602c; border: 1px solid #cfe8cd; }
.btn.green-big { background: var(--green); color: var(--green-ink); width: 100%; padding: 16px; font-size: 16px; border-radius: 12px; }
.btn.green-big:hover { background: var(--green-hover); }
.btn.outline { background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.btn.outline.danger { color: var(--danger); border-color: #f0d4d4; }
.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn.google { background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.btn.google .g { font-weight: 900; color: #4285f4; font-size: 16px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: default; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.pagination button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); font: 600 14px var(--font); cursor: pointer; }
.pagination button.cur { background: var(--black); color: #fff; border-color: var(--black); }

/* ── Topbar (sala y formularios) ── */
.topbar { display: flex; align-items: center; gap: 22px; background: var(--panel); border-bottom: 1px solid var(--line); padding: 14px 30px; }
.topbar .userbox { margin-left: auto; }
.crumb { color: var(--muted); font-size: 14px; } .crumb b { color: var(--ink); }

/* ── Sala de orden ── */
.room { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; padding: 26px 30px 34px; max-width: 1180px; margin: 0 auto; align-items: start; }
.room h1 { margin-bottom: 4px; }
.banner { border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.5; margin: 16px 0; }
.banner.ok { background: var(--green-banner); border: 1px solid #cfe8cd; }
.banner.warn { background: #fdf3e3; border: 1px solid #f0ddba; }
.banner b { display: block; margin-bottom: 2px; }
.summary { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 6px 18px; }
.summary > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid #eef3ee; font-size: 14.5px; }
.summary > div:last-child { border-bottom: 0; }
.summary span { color: var(--muted); flex: none; }
.summary b { text-align: right; font-weight: 650; }
.copy { background: var(--green-soft); border: 0; color: #23602c; border-radius: 7px; padding: 3px 10px; font: 700 12.5px var(--font); cursor: pointer; margin-left: 8px; }
.room-actions { display: flex; gap: 10px; margin-top: 16px; }
.room-actions .btn { flex: 1; }
.count-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.count-chip i { width: 8px; height: 8px; border-radius: 50%; background: #f0a13c; display: inline-block; }

/* ── Chat ── */
.room-chat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; height: 560px; overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.chat-head .with { color: var(--muted); font-weight: 500; }
.chat-icons { color: var(--muted); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: #fbfdfb; }
.bubble { max-width: 82%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; position: relative; }
.bubble .time { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 4px; }
.bubble.sys { background: var(--green-soft); color: #33463a; max-width: 100%; font-size: 13px; }
.bubble.in { background: var(--green-soft); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.out { background: #fff; border: 1px solid var(--line); align-self: flex-end; border-bottom-right-radius: 4px; }
.day { text-align: center; color: var(--muted); font-size: 12px; margin: 4px 0; }
.chat-form { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; font: 500 14.5px var(--font); outline: none; }
.chat-form input:focus { border-color: #a9d3a4; }
.attach { color: var(--muted); font-size: 18px; cursor: pointer; }
.send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--black); color: #fff; cursor: pointer; font-size: 14px; flex: none; }

/* ── Centro: éxito, asistente ── */
.center-col { display: flex; justify-content: center; padding: 40px 20px 60px; }
.success-card, .wizard { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px; width: 100%; max-width: 520px; }
.success-card { text-align: center; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: var(--green-ink); font-size: 30px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.success-icon.sm { width: 52px; height: 52px; font-size: 24px; }
.receipt { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px; margin: 20px 0; }
.receipt > div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #eef3ee; font-size: 14.5px; }
.receipt > div:last-child { border-bottom: 0; }
.receipt span { color: var(--muted); }
.success-card .btn + .btn { margin-top: 10px; }
.wizard { display: flex; flex-direction: column; gap: 15px; }
.wizard h2 { text-align: center; }
.wizard .field select, .wizard .field input { width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg-field { display: flex; flex-direction: column; gap: 6px; }
.seg { display: flex; background: var(--green-soft); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 8px; font: 650 14px var(--font); cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(20, 40, 20, 0.12); }
.note-green { background: var(--green-banner); border: 1px solid #cfe8cd; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.55; color: #2c4630; }

/* ── Mis anuncios / detalle ── */
.empty { text-align: center; padding: 70px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 22px; }
.empty h3 { margin-top: 16px; }
.empty p { color: var(--muted); margin: 6px 0 18px; }
.pill-on { background: var(--green-banner); border: 1px solid #cfe8cd; color: #23602c; font-weight: 700; font-size: 13px; border-radius: 999px; padding: 7px 14px; }
.detail-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 22px 22px; margin-top: 22px; }
.detail-card .summary { border: 0; padding: 0; }
.row-btns { display: flex; gap: 10px; margin-top: 18px; }
.row-btns.end { justify-content: flex-end; }

/* ── Modales ── */
.overlay { position: fixed; inset: 0; background: rgba(24, 32, 24, 0.42); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal { background: var(--panel); border-radius: 18px; padding: 28px; width: 100%; position: relative; box-shadow: 0 24px 60px rgba(10, 25, 10, 0.25); }
.modal-sm { max-width: 410px; } .modal-lg { max-width: 680px; }
.modal.center, .center { text-align: center; }
.modal .x { position: absolute; top: 14px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; }
.modal .field { margin: 14px 0; } .modal .field input, .modal .field select, .modal .field textarea { width: 100%; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.legal { text-align: center; color: var(--muted); font-size: 12px; margin: 16px 0 0; line-height: 1.5; }
.tomar { display: grid; grid-template-columns: 1fr 1.25fr; gap: 26px; }
.seller-head { display: flex; gap: 11px; align-items: center; }
.seller-head em { display: block; font-style: normal; color: #2f9e44; font-size: 12.5px; font-weight: 600; }
.thumbs { display: flex; align-items: center; gap: 8px; margin: 16px 0; font-size: 15px; }
.thumbs .thumb.down { margin-left: 12px; }
.stats { border-top: 1px solid var(--line); }
.stats > div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #eef3ee; font-size: 14px; }
.stats span { color: var(--muted); }
.tomar-left .note-green { margin-top: 16px; }
.amount { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.amount input { border: 0 !important; flex: 1; font-size: 17px !important; font-weight: 750; min-width: 0 !important; }
.amount .cur { padding: 0 14px; font-weight: 700; color: var(--muted); font-size: 14px; }
.recibes { display: flex; justify-content: space-between; align-items: center; background: var(--green-banner); border: 1px solid #cfe8cd; border-radius: 12px; padding: 13px 16px; margin: 16px 0; }
.recibes span { color: var(--muted); font-weight: 600; }
.recibes b { font-size: 17px; }
.rate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 4px; }
.rate-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); font: 700 14.5px var(--font); cursor: pointer; }
.rate-btn.sel-up { border-color: #2f9e44; background: #f2fbf2; }
.rate-btn.sel-down { border-color: #e05252; background: #fdf3f3; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; } .rail { display: none; }
  .room { grid-template-columns: 1fr; } .tomar { grid-template-columns: 1fr; }
  .room-chat { height: 440px; } .main { padding: 20px 16px 34px; }
}

/* ── Lanzador de demo (solo muestra) ── */
.demo { position: fixed; left: 16px; bottom: 16px; z-index: 80; }
.demo-btn { background: var(--black); color: #fff; border: 0; border-radius: 999px; padding: 11px 18px; font: 700 13.5px var(--font); cursor: pointer; box-shadow: 0 10px 26px rgba(10, 25, 10, 0.3); }
.demo-panel { position: absolute; left: 0; bottom: 52px; width: 248px; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(10, 25, 10, 0.22); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.demo-panel > b { font-size: 14px; }
.demo-note { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.demo-group { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.demo-panel button[data-demo] { text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; font: 550 13.5px var(--font); color: var(--ink); cursor: pointer; }
.demo-panel button[data-demo]:hover { background: var(--green-soft); }
