@font-face { font-family: "Plex"; src: url(IBMPlexSans-Regular.woff2) format("woff2"); font-weight: 400; }
@font-face { font-family: "Plex"; src: url(IBMPlexSans-Medium.woff2) format("woff2"); font-weight: 500; }
@font-face { font-family: "Plex"; src: url(IBMPlexSans-SemiBold.woff2) format("woff2"); font-weight: 600; }
@font-face { font-family: "Plex"; src: url(IBMPlexSans-Bold.woff2) format("woff2"); font-weight: 700; }
@font-face { font-family: "PlexMono"; src: url(IBMPlexMono-Regular.woff2) format("woff2"); }
@font-face { font-family: "VCD"; src: url(VCD.otf) format("opentype"); font-display: swap; }

:root {
  /* Velas del Caribe brand colors, the same as the website (Web/shopify-theme) */
  --navy: #0B3522;      /* verde: header, rail, login */
  --accent: #0B3522;    /* verde: text accents, tabs */
  --oro: #F2C218;       /* oro: what is selected, main buttons */
  --oro-antiguo: #B8924A;
  --crema: #F6E7C0;
  --wash: #FBF3DC;      /* light crema: selected rows in lists */
  --bg: #FBF8F1;        /* marfil */
  --surface: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #E6DCC3;
  --orange: #e07a1f; --green: #1f9d55; --red: #d64545; --gold: #b8924a;
  --corner: 10px;
  --text-size: 14.5px;
  --side-w: 250px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--text-size)/1.5 "Plex", -apple-system, system-ui, sans-serif; }
.mono { font-family: "PlexMono", ui-monospace, monospace; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }


/* A newer panel is live and this page holds unsaved work (0.20.1): one slim line over the panel.
   The shell (sidebar, top bar, Roger's drawer) and Inicio have their own file, shell.css (0.25.0). */
.newver { height: 40px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 12px; background: var(--crema); border-bottom: 1px solid var(--border); font-size: 13.5px; }
.newver .btn { padding: 4px 12px; flex-shrink: 0; }
/* Modo Simulación (2.8.0): the red bar over everything, the login screen included; the layout makes room for it the way it
   does for .newver (shell.css) */
.simbar { position: relative; z-index: 1100; height: 32px; display: flex; align-items: center; justify-content: center; padding: 0 12px; background: var(--red); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .02em; text-align: center; line-height: 1.25; }
.simbar:not([hidden]) ~ .login { top: 32px; }

.main { flex: 1; display: flex; min-width: 0; padding: 14px; gap: 14px; overflow: hidden; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--corner); }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.center { flex: 1; }
.right { width: 320px; }
.view { display: none; flex: 1; min-height: 0; }
.view.on { display: flex; }

h2.t { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 8px; }
.bar { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.bar .grow { flex: 1; }
.pad { padding: 14px 16px; }
.scroll { overflow: auto; min-height: 0; }
.lbl { font-size: 12px; font-weight: 600; letter-spacing: 1.4px; color: var(--accent); text-transform: uppercase; }
.m { color: var(--muted); font-size: 13px; }
.btn { background: var(--oro); color: var(--navy); border: 0; border-radius: 8px; padding: 7px 14px; font-weight: 600; }
.btn.ghost { background: #fff; color: var(--accent); border: 1px solid var(--border); }
/* a darker green than --green, so the white text reads at 5.4:1 (0.13.1; --green gave 3.5:1) */
.btn.ok { background: #157a41; color: #fff; }
.btn.no { background: #fff; color: var(--red); border: 1px solid #f1c4c4; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 20px; padding: 1px 9px; }
/* 0.25.0: chips in sentence case with the mockup's dot */
.pill { position: relative; padding-left: 20px; }
.pill::first-letter { text-transform: uppercase; }
.pill::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: currentColor; }
.p-wait { background: #FDEBE9; color: #B42318; } .p-work { background: #FFF2DD; color: #9A5B00; } .p-ok { background: #E6F4EC; color: #1E7A4A; } .p-info { background: #E9F0FA; color: #1F4E8C; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f8fafd; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Roger chat */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.msgs { flex: 1; overflow: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.me-msg { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 12px 12px 2px 12px; padding: 9px 14px; max-width: 70%; }
.who { font-size: 11.5px; color: var(--muted); margin-top: 3px; text-align: right; }
.rg { max-width: 82%; }
.rg p { margin: 0 0 8px; }
.diff { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 6px 0 10px; }
.diff .row { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.diff .row > div { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.diff .hd > div { background: #f8fafd; font-size: 12px; color: var(--muted); font-weight: 600; }
.before { color: var(--muted); text-decoration: line-through; } .after { color: var(--green); font-weight: 700; }
.working { align-self: flex-start; border: 1px solid #f3c38f; background: #fff7ee; color: var(--orange); border-radius: 20px; padding: 3px 12px; font-size: 13px; font-weight: 600; }
.composer { border-top: 1px solid var(--border); padding: 12px 16px; }
.composer .box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.composer .box .ph { color: var(--muted); min-height: 24px; }
.composer .tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.chip { border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; background: #fff; }
.chip.g { color: var(--green); border-color: #bfe5cd; background: #f1faf4; }
.send { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-weight: 700; }

/* Right column */
.step-li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 4px 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; border: 2px solid var(--border); }
.dot.done { background: var(--green); border-color: var(--green); } .dot.doing { background: var(--orange); border-color: var(--orange); }
.ok-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.ok-item .acts { display: flex; gap: 8px; margin-top: 8px; }

/* Summary */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { padding: 14px 16px; }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 2px; }
.kpi .d { font-size: 12.5px; color: var(--green); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding: 10px 4px 0; }
.bars div { flex: 1; background: var(--accent); border-radius: 6px 6px 0 0; opacity: .85; position: relative; }
.bars span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 11.5px; color: var(--muted); }

/* WhatsApp */
.wa { display: flex; flex: 1; min-height: 0; }
.wa-list { width: 280px; border-right: 1px solid var(--border); overflow: auto; }
.wa-c { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.wa-c.on { background: var(--wash); }
.wa-c b { font-size: 14px; } .wa-c .m { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-conv { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wa-msgs { flex: 1; overflow: auto; padding: 16px; background: #f4f1ea; display: flex; flex-direction: column; gap: 8px; }
.b-in { align-self: flex-start; background: #fff; border-radius: 10px; padding: 7px 11px; max-width: 70%; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.b-out { align-self: flex-end; background: #dcf7c5; border-radius: 10px; padding: 7px 11px; max-width: 70%; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.b-out small, .b-in small { display: block; font-size: 11px; color: var(--muted); text-align: right; }

/* Ads, web, accounting */
.tabs { display: flex; gap: 6px; }
.tabs span { border: 1px solid var(--border); border-radius: 8px; padding: 4px 11px; font-size: 13px; background: #fff; }
.tabs span.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.asset { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.asset .img { height: 190px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; }
.asset .cap { padding: 8px 10px; font-size: 12.5px; }
.ask { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: #fff; }
.ask .ph { flex: 1; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal div { border: 1px solid var(--border); border-radius: 8px; min-height: 62px; padding: 4px 6px; font-size: 11.5px; background: #fff; }
.cal b { display: block; color: var(--muted); font-weight: 600; }
.cal i { display: block; font-style: normal; border-radius: 4px; padding: 1px 4px; margin-top: 2px; color: #fff; }
.site { display: flex; flex: 1; min-height: 0; }
.blocks { width: 290px; border-right: 1px solid var(--border); overflow: auto; padding: 12px; }
.blk { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; background: #fff; font-size: 13.5px; }
.blk.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--wash); }
.blk .h { color: #b0b9c8; cursor: grab; } .blk .grow { flex: 1; }
.prev { flex: 1; overflow: auto; background: #e9edf3; padding: 14px; }
.frame { max-width: 620px; margin: 0 auto; background: #0b3522; color: #f6e7c0; border-radius: 10px; overflow: hidden; font-family: Georgia, serif; }
.frame .hero { padding: 46px 26px; text-align: center; background: linear-gradient(180deg, #123f2b, #0b3522); }
.frame .hero h3 { font-size: 26px; margin: 6px 0; color: #f2c218; font-weight: 400; }
.frame .sel { outline: 2px dashed #f2c218; outline-offset: -6px; }
.frame .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px; }
.frame .row3 div { background: #f6e7c0; color: #0b3522; border-radius: 6px; height: 90px; display: flex; align-items: flex-end; padding: 6px; font-size: 12px; }
.money .neg { color: var(--red); } .money .pos { color: var(--green); font-weight: 700; }

/* Settings */
.set { display: flex; flex: 1; min-height: 0; }
.tree { width: var(--side-w); padding: 16px 12px; overflow: auto; border-right: 1px solid var(--border); background: #f6f8fc; border-radius: var(--corner) 0 0 var(--corner); }
.tree .h { font-size: 12px; letter-spacing: 1.6px; color: #6b7a94; font-weight: 700; margin: 16px 8px 4px; text-transform: uppercase; }
.tree .h:first-child { margin-top: 0; }
.tree button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 12px 6px 22px; border-radius: 7px; font-size: 14px; color: var(--text); }
.tree button.on { background: var(--crema); color: var(--navy); font-weight: 600; box-shadow: inset 3px 0 0 var(--oro); }
.new { background: #2e9e5b; color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.spane { flex: 1; overflow: auto; }
.field { margin: 0 0 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: #fff; }
.field textarea { min-height: 140px; font-family: "PlexMono", monospace; font-size: 13px; line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.acc { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.acc.main { border-color: var(--green); box-shadow: 0 0 0 2px #e6f6ec; }
.chk { color: var(--green); font-weight: 700; } .x { color: #c2c9d6; }
.qr { width: 150px; height: 150px; border: 1px solid var(--border); border-radius: 8px; background:
      repeating-linear-gradient(90deg, #111 0 6px, #fff 6px 12px), repeating-linear-gradient(0deg, #111 0 6px, #fff 6px 12px);
      background-blend-mode: difference; opacity: .85; }
.switch { display: inline-block; width: 38px; height: 22px; border-radius: 11px; background: var(--green); position: relative; vertical-align: middle; }
.switch::after { content: ""; position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.switch.off { background: #c8d0dc; } .switch.off::after { right: auto; left: 3px; }
.eye { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; }

/* Login */
.login { position: fixed; inset: 0; background: var(--navy); display: none; align-items: center; justify-content: center; z-index: 50; }
.login.on { display: flex; }
.login .box { width: min(380px, 92vw); background: #fff; border-radius: 14px; padding: 28px 26px; text-align: center; }
.login img { width: 200px; max-width: 100%; height: auto; }
.login .field { text-align: left; }
.login .code { display: flex; gap: 8px; justify-content: center; margin: 4px 0 14px; }
.login .code span { width: 40px; height: 46px; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }

/* Phone */
@media (max-width: 820px) {
  .newver { height: 60px; font-size: 12.5px; line-height: 1.3; }
  .simbar { height: 40px; font-size: 12px; }
  .simbar:not([hidden]) ~ .login { top: 40px; }
  .main { padding: 8px; }
  .right { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .wa-list { width: 100%; } .wa-conv { display: none; }
  .set { flex-direction: column; } .tree { width: 100%; max-height: 210px; border-right: 0; border-bottom: 1px solid var(--border); border-radius: var(--corner) var(--corner) 0 0; }
  .grid2 { grid-template-columns: 1fr; }
  .hide-phone { display: none; }
}

/* Admin additions (wave 2): not in the mockup */
[hidden] { display: none !important; }
.soon { margin: auto; text-align: center; padding: 40px 30px; max-width: 420px; }
.soon h2 { margin: 0 0 6px; font-size: 20px; }
.soon p { margin: 0; color: var(--muted); }
/* 2.8.0: Finanzas' "En Construcción" card in the simulation, above its one tab */
.soon.sim-build { margin: 0 auto 14px; padding: 18px 24px; max-width: none; }
.login .box img + p { margin: 10px 0 18px; }
.login .msg { min-height: 20px; margin: 10px 0 0; font-size: 13px; }
.login .link { background: none; border: 0; color: var(--accent); text-decoration: underline; padding: 0; font-size: 13px; }
.login input.codein { text-align: center; font-size: 22px; letter-spacing: 8px; font-weight: 700; }
.err { color: var(--red); } .okm { color: var(--green); }
.form { border: 1px solid var(--border); border-radius: var(--corner); padding: 14px 16px; margin: 0 0 16px; background: #fbfcfe; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; font-size: 13.5px; }
.checks label { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* A checkbox inside a form field keeps its own size and sits beside its text */
.field input[type="checkbox"] { width: 16px; height: 16px; padding: 0; margin: 0; flex: none; }
.field .checks { gap: 8px 14px; }
.field .checks label { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 13.5px; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13.5px; z-index: 60; max-width: 90vw; }
.toast.bad { background: var(--red); }
.inline { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.inline input { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }

/* Delete user: the red button and the confirm box */
.eye.del { color: var(--red); border-color: #f1c4c4; margin-left: 4px; }
.nowrap { white-space: nowrap; }
.btn.danger { background: var(--red); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.shade { position: fixed; inset: 0; background: rgba(15, 25, 20, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: var(--corner); max-width: 440px; width: 100%; padding: 20px 22px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.modal h3 { margin: 0 0 10px; color: var(--red); }
.modal p { margin: 0 0 14px; line-height: 1.45; }
.modal label { display: block; font-weight: 600; margin-bottom: 6px; }
.modal input { width: 100%; box-sizing: border-box; }

/* Ajustes pages (wave 3): text and collection editors, dated copies, forms, Claves */
.field textarea.doctext { min-height: 340px; height: calc(100vh - 330px); resize: vertical; }
.docs { display: flex; gap: 16px; align-items: flex-start; }
.doclist { width: 210px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.doclist button { text-align: left; background: none; border: 1px solid transparent; border-radius: 7px; padding: 6px 10px; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.doclist button.on { background: var(--crema); color: var(--navy); font-weight: 600; box-shadow: inset 3px 0 0 var(--oro); }
.doced { flex: 1; min-width: 0; }
.doced .field textarea.doctext { height: calc(100vh - 400px); }
.modal.wide { max-width: 920px; max-height: 90vh; overflow: auto; padding: 0 0 16px; }
.modal.wide table, .modal.wide .viewer { margin: 0; }
.modal.wide .viewer { padding: 0 18px; }
.modal.wide th, .modal.wide td { padding: 8px 12px; }
.bar.flat { position: sticky; top: 0; background: #fff; z-index: 1; }
.modal h3.plain { color: var(--navy); margin: 0; font-size: 16px; }
.copytext { white-space: pre-wrap; overflow-wrap: anywhere; background: #fbfaf6; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; margin: 0; max-height: 50vh; overflow: auto; }
.diffbox { border: 1px solid var(--border); border-radius: 8px; overflow: auto; max-height: 50vh; font-size: 12.5px; }
.diffbox .dl { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1px 10px; }
.dl.add { background: #e6f6ec; color: #14532d; }
.dl.del { background: #fdecea; color: #7f1d1d; text-decoration: line-through; }
span.dl { padding: 0 6px; border-radius: 4px; font-size: 12px; }
.field .pre { display: flex; align-items: center; gap: 6px; }
.field .pre span { color: var(--muted); font-weight: 600; }
.field .pair { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.field .pair input { width: auto; flex: 1; min-width: 0; }
.field label.one { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 14px; margin: 6px 0 0; }
.field.full { grid-column: 1 / -1; }
.accs { display: flex; flex-direction: column; gap: 10px; }
.accs .acc { align-items: flex-start; }
.accf { flex: 1; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr 1fr; gap: 10px; }
.accf .field { margin: 0; }
.acc.col { flex-direction: column; align-items: stretch; }
.cards { display: flex; flex-direction: column; gap: 10px; }
.p-gray { background: #F0EEE6; color: #4A5A52; }
.qr.soonqr { flex: none; width: 96px; height: 96px; opacity: .25; }
.secretval { overflow-wrap: anywhere; max-width: 420px; }

@media (max-width: 820px) {
  .docs { flex-direction: column; }
  .doclist { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .field textarea.doctext, .doced .field textarea.doctext { height: 50vh; min-height: 240px; }
  .accf { grid-template-columns: 1fr 1fr; }
  .bar { flex-wrap: wrap; }
  .modal.wide { max-height: 94vh; }
}

/* Roger and the Bandeja (wave 4): not in the mockup */
.tchange { margin: 8px 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tchange .tdiff, .tchange .tfull { max-height: 260px; }
.tchange .tfull { white-space: pre-wrap; overflow-wrap: anywhere; padding: 6px 10px; margin: 4px 0 8px; }
.tchange summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.warnline { margin: 0; background: #fdecea; color: var(--red); border: 1px solid #f1c4c4; border-radius: 8px; padding: 6px 10px; font-weight: 600; font-size: 13px; }
.untested { grid-column: 1 / -1; margin: 0; }
.who.l { text-align: left; }
.me-msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.link { background: none; border: 0; color: var(--accent); text-decoration: underline; padding: 0; font-size: 13px; }
.rg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.note { align-self: center; max-width: 90%; background: var(--wash); color: var(--accent); border-radius: 8px; padding: 5px 12px; font-size: 13px; text-align: center; }
.composer textarea { width: 100%; border: 0; resize: none; font: inherit; outline: none; min-height: 24px; }
.composer .chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.send:disabled { opacity: .45; }
.right { overflow: auto; }
.convs { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.convs .conv { text-align: left; background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; font: inherit; font-size: 13.5px; color: inherit; }
.convs .conv.on { border-color: var(--border); background: var(--wash); font-weight: 600; }
.convs .conv small { color: var(--muted); font-weight: 400; }
.diff .row > div { overflow-wrap: anywhere; }
.phone-only { display: none; }
@media (max-width: 820px) {
  .phone-only { display: block; max-width: 46vw; }
  .msgs { padding: 12px; }
  .me-msg { max-width: 88%; } .rg { max-width: 100%; }
  .diff .row > div { padding: 6px 8px; font-size: 13px; }
  .composer .chip.g { display: none; }
}

/* WhatsApp (wave 5): the view, the rail counts and the card in Ajustes */
#v-whatsapp > .card { flex: 1; min-height: 0; }
.tabs .tab { border: 1px solid var(--border); border-radius: 8px; padding: 4px 11px; font: inherit; font-size: 13px; background: #fff; color: inherit; cursor: pointer; }
.tabs .tab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
button.switch { border: 0; padding: 0; cursor: pointer; flex: none; }
.wa-search { padding: 8px 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.wa-search input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 14px; }
.wa-c .un { float: right; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; min-width: 18px; padding: 0 5px; text-align: center; }
.wa-head { min-height: 52px; }
.wa-head .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.b-in, .b-out { white-space: pre-wrap; overflow-wrap: anywhere; }
.phone-back { display: none; }
.wacard { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.wacard .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
img.qr.live { flex: none; background: #fff; opacity: 1; object-fit: contain; image-rendering: pixelated; }
@media (max-width: 820px) {
  .wa.open .wa-list { display: none; }
  .wa.open .wa-conv { display: flex; }
  .phone-back { display: inline; }
  .wa-head .acts .btn { padding: 6px 10px; font-size: 13px; }
  .b-in, .b-out { max-width: 85%; }
}

/* Resumen, Pedidos, Inventario Y Precios (wave 6) */
.bar.wrap, .acc.wrap { flex-wrap: wrap; }
.acc.col-left { flex-direction: column; align-items: flex-start; gap: 8px; }
.acc + .acc { margin-top: 10px; }
.one.size { display: flex; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
table.rows tr[tabindex] { cursor: pointer; }
table.rows tr[tabindex]:hover, table.rows tr[tabindex]:focus { background: var(--wash); outline: none; }
.inv .cell { width: 92px; text-align: right; }
.inv .cell.chg { border-color: var(--accent); background: #f3f7ff; font-weight: 700; }
.inv .low { border-color: var(--orange); color: var(--orange); font-weight: 700; }
.inv .out { border-color: var(--red); color: var(--red); font-weight: 700; }
.inv button.switch { border: 0; cursor: pointer; padding: 0; }
.kvs { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin-bottom: 12px; }
.kv { display: contents; }
.timeline { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
.big-money { font-size: 17px; color: var(--red); }
@media (max-width: 820px) {
  .inv .cell { width: 72px; }
  .bar.wrap .chip { max-width: 46vw; }
  .bar.wrap input[type="search"] { flex: 1 1 100%; max-width: none; }
  table.rows th, table.rows td { padding-left: 5px; padding-right: 5px; }
  table.rows td.num { white-space: nowrap; }
  table.rows .pill { padding: 1px 6px 1px 17px; }
  table.rows .pill::before { left: 7px; }
}
.acc .one { display: flex; gap: 8px; align-items: center; }

/* Página Web (wave 7): the mockup's .site / .blocks / .blk, the editor on the right */
.wnote { margin: 0; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.site { display: flex; flex: 1; min-height: 0; }
.blocks { width: 300px; flex: none; border-right: 1px solid var(--border); overflow: auto; padding: 12px; }
.blocks .lbl { margin: 14px 0 8px; } .blocks .lbl:first-child { margin-top: 0; }
.blk { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; background: #fff; font-size: 13.5px; }
.blk.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--wash); }
.blk.off .linkish { color: var(--muted); }
.blk.drop { border-style: dashed; border-color: var(--accent); }
.blk .h { color: #b0b9c8; cursor: grab; }
.blk .grow { flex: 1; min-width: 0; }
.blk .eye { padding: 2px 7px; }
.blk .eye:disabled { opacity: .35; }
.linkish { background: none; border: 0; padding: 2px 0; text-align: left; font: inherit; color: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.linkish:hover, .linkish:focus { color: var(--accent); text-decoration: underline; }
.btn.wide { width: 100%; margin-top: 8px; }
.blocks .one.size select { flex: 1; min-width: 0; }
.wpane { flex: 1; min-width: 0; overflow: auto; }
.wpane .pad { max-width: 760px; }
.wlines { margin: 6px 0 10px; padding-left: 18px; line-height: 1.6; }
.part .blk { margin-bottom: 4px; }
.part-body { border-left: 3px solid var(--wash); padding: 6px 0 10px 12px; margin-bottom: 10px; }
.acts.tools { margin: 0 0 6px; gap: 4px; }
.redit { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-height: 60px; background: #fff; line-height: 1.5; overflow-wrap: anywhere; }
.redit:focus { outline: 2px solid var(--wash); border-color: var(--accent); }
.redit p, .pageview p { margin: 0 0 8px; }
.pageview { border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; background: #fbf8ef; color: #0b3522; font-family: Georgia, serif; line-height: 1.55; overflow-wrap: anywhere; }
.pageview h2, .pageview h3 { color: #0b3522; font-weight: 400; margin: 10px 0 6px; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 10px; }
.foto { border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: #fff; overflow-wrap: anywhere; }
.foto img { width: 100%; height: 130px; object-fit: cover; border-radius: 6px; background: #e9edf3; display: block; margin-bottom: 6px; }
.foto .acts { margin-top: 6px; }
.modal.qr { text-align: center; }
.qrbox svg { display: block; margin: 8px auto; max-width: 100%; height: auto; }
@media (max-width: 820px) {
  .site { flex-direction: column; overflow: auto; }
  .blocks { width: auto; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }
  .wpane { overflow: visible; }
  .fotos { grid-template-columns: 1fr 1fr; }
}
a.btn { text-decoration: none; display: inline-flex; align-items: center; }

/* Contabilidad (wave 8) */
.kpi.pick { cursor: pointer; border: 1px solid transparent; }
.kpi.pick:hover, .kpi.pick:focus { border-color: var(--accent); outline: none; }
.kpi.pick.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--wash); }
#v-conta .kpi .d { color: var(--muted); }
#v-conta .kpi .d.warn { color: var(--orange); }
td.num.neg { color: var(--red); }
#c-movs .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
#c-movs .acts:empty { display: none; }
.modal.form { max-width: 560px; max-height: 92vh; overflow: auto; }
.modal.form h3 { color: inherit; }
.modal .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.modal .acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .modal .two { grid-template-columns: 1fr; }
  #v-conta .bar.wrap { flex-wrap: wrap; }
}

/* Publicidad (wave 9) */
button.asset { padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.asset:hover, button.asset:focus { border-color: var(--accent); outline: none; }
.asset .img img { width: 100%; height: 100%; object-fit: cover; }
.cal .day.today { border-color: var(--accent); }
.cal .day.over { background: var(--wash); }
.cal i { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal i[draggable="true"] { cursor: grab; }
.cal-loose { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cal-loose i { display: inline-block; font-style: normal; border-radius: 4px; padding: 2px 6px; color: #fff; font-size: 12px; cursor: grab; }
.ad-step.current { border-color: var(--accent); }
.ad-step .flat0 { padding: 0 0 8px; border: 0; }
.ad-text { white-space: pre-wrap; overflow-wrap: anywhere; background: #fafbfc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; max-height: 420px; overflow: auto; }
.ad-step .gal img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.ad-video { width: 100%; max-width: 420px; max-height: 70vh; border-radius: 10px; background: #000; display: block; }
.ad-audio { width: 100%; max-width: 420px; }
.warn-line { color: var(--red); font-weight: 600; margin: 4px 0 8px; }
.spend p { margin: 4px 0; }
/* a video spend's card (0.13.1): the still next to the video's first frame, the same height */
.vframe { margin: 8px 0; }
.vframe-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.vframe figure { margin: 0; }
.vframe img { display: block; height: 220px; width: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.vframe figcaption { margin-top: 4px; }
.track { display: grid; grid-template-columns: 1fr minmax(200px, 300px) auto; gap: 10px; align-items: center; border-top: 1px solid var(--border); padding: 8px 0; }
.ad-step .acts textarea { min-width: 220px; }
@media (max-width: 820px) {
  .cal { grid-template-columns: repeat(2, 1fr); }
  .track { grid-template-columns: 1fr; }
  .ad-step .gal img { height: 160px; }
}
#v-publicidad .ask input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; background: transparent; padding: 6px 2px; }

/* Marketplaces (0.13.0): the Corotos badge, the listing card in the Bandeja, the brake's screenshot */
.p-corotos { background: #fff4d6; color: #8a5a00; }
.p-ml { background: #fff9c4; color: #5c4a00; }
.mk-ch { margin: 18px 0 10px; font-size: 16px; }
.mk-ch:first-child { margin-top: 0; }
.mk-sugg ul { margin: 6px 0; padding-left: 18px; }
#ml-card .acts input { max-width: 220px; }
.mk-photos { display: flex; gap: 6px; overflow-x: auto; margin: 6px 0; }
.mk-photos img { height: 84px; width: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); flex: none; }
.mk-shot { max-width: 260px; width: 100%; border: 1px solid var(--border); border-radius: 8px; }
table.mk td { vertical-align: top; }
table.mk .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 820px) { table.mk .acts .btn { padding: 6px 8px; } }
/* 0.15.0: Descuentos and Tarjetas De Regalo */
.bar.dc-head { padding: 0 0 12px; border: 0; }
.tabs.wrapx { flex-wrap: wrap; align-items: center; }
.tabs.wrapx input { width: 140px; }
.ferr { color: var(--red); font-size: 12.5px; margin-top: 4px; }
.ferr:empty { display: none; }
.dc-words { margin-top: 6px; font-weight: 600; color: var(--accent); }
.dc-products { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-top: 8px; background: #fff; }
#dc-collection { margin-top: 8px; }
.gc-big { font-size: 26px; font-weight: 700; color: var(--navy); margin: 8px 0 6px; }
.gc-bar { height: 8px; border-radius: 4px; background: #eef1f5; overflow: hidden; }
.gc-bar span { display: block; height: 100%; background: var(--green); }
.gc-once { border-color: var(--oro); background: #fffbea; }
.gc-code { font-size: 22px; letter-spacing: 2px; padding: 12px 14px; margin: 10px 0; border: 1px dashed var(--oro-antiguo); border-radius: 8px; background: #fff; word-break: break-all; user-select: all; }
.pair.dc-bxgy { flex-wrap: wrap; }
.pair.dc-bxgy input { flex: none; width: 76px; }
#dc-form .grid2, #gc-form .grid2, #dc-limits .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 820px) { #dc-form .grid2, #gc-form .grid2, #dc-limits .grid2 { grid-template-columns: minmax(0, 1fr); } }
/* a table scrolls inside its own box; on a phone the box is held to the screen, so a wide table never widens
   the whole page (the Ajustes pane grows with its widest content otherwise) */
.dc-scroll { overflow-x: auto; }
@media (max-width: 820px) { .dc-scroll { max-width: calc(100vw - 52px); } }
/* 0.15.0 fix round 1: the "Todas las velas" line under Aplica a */
.dc-todas { margin-top: 6px; line-height: 1.45; }

/* Claves (0.18.0): one line per service that opens to its pieces; the Add dialog asks the kind first */
.sv-stats { margin: 4px 0 14px; }
.sv-stats .kpi .v.warn { color: var(--orange); }
.sv-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.sv-search { flex: 0 1 340px; min-width: 0; }
.sv-list { overflow: hidden; margin-bottom: 12px; }
.sv-item + .sv-item { border-top: 1px solid var(--border); }
.sv-line { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 40px; cursor: pointer; }
.sv-line:hover, .sv-line:focus { background: var(--wash); outline: none; }
.sv-kind { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 30px; border-radius: 7px; font: 700 11px/1 "PlexMono", ui-monospace, monospace; flex: none; }
.k-web { background: #e3f1ee; color: #0f5f52; } .k-api { background: #e7eefb; color: #1d4ea3; } .k-file { background: #f1e8fb; color: #6b2bb8; }
.sv-name { font-size: 15px; }
.sv-acc { color: var(--muted); font-size: 12.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.sv-own { background: var(--navy); color: var(--oro); }
.sv-count { white-space: nowrap; }
.sv-chev { color: var(--muted); font-size: 18px; transition: transform .15s; }
.sv-chev.on { transform: rotate(90deg); }
.sv-body { padding: 0 16px 10px 66px; }
.sv-piece { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.sv-piece .sv-edit { grid-column: 1 / -1; }
.sv-pl .mono { font-size: 11.5px; overflow-wrap: anywhere; }
.sv-val { background: #f4f1e8; border: 1px solid var(--border); border-radius: 7px; padding: 7px 10px; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sv-val.on { background: #fff; border-color: var(--oro); }
.sv-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.sv-list .link { font-weight: 600; text-decoration: none; padding: 6px; cursor: pointer; }
.sv-list .link.del { color: var(--red); }
.sv-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.sv-modal { max-width: 560px; }
.sv-modal .field { margin-bottom: 10px; }
.sv-modal .field input, .sv-modal .field textarea, .sv-modal .field select { width: 100%; box-sizing: border-box; }
.sv-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.sv-kcard { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; }
.sv-kcard.on { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.sv-kcard .m { font-size: 12px; line-height: 1.35; }
.sv-owner { display: flex; gap: 18px; flex-wrap: wrap; }
.sv-tech { overflow-wrap: anywhere; }
.sv-note { background: #fff4dc; color: #8a5a00; border-radius: 8px; padding: 9px 12px; font-size: 12.5px; }
.modal .acts.end { justify-content: flex-end; }
@media (max-width: 820px) {
  .sv-line { flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; }
  .sv-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .sv-acc { flex-basis: 100%; order: 5; padding-left: 48px; }
  .sv-body { padding: 0 12px 10px; }
  .sv-piece { grid-template-columns: minmax(0, 1fr); }
  .sv-acts .btn, .sv-acts .link, .sv-foot .link, .sv-line .link { min-height: 40px; }
  .sv-tools .btn, .sv-search { min-height: 40px; }
  .sv-search { flex: 1 1 100%; }
  .sv-kinds { grid-template-columns: minmax(0, 1fr); }
}
.badge-super { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .5px; border-radius: 20px; padding: 1px 9px; background: var(--navy); color: var(--oro); }

/* Usuarios Y Permisos: the Usuarios | Roles tabs, the roles list and the role form (0.21.0; an accordion since 0.21.1) */
.u-tabs { margin: 0 0 14px; }
.role-list { display: flex; flex-direction: column; gap: 8px; }
.role-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: #fff; }
.role-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.role-acts { display: flex; gap: 6px; }
.role-acts .eye.del { margin-left: 0; }
.role-empty { border: 1px dashed var(--border); border-radius: 10px; padding: 22px 16px; text-align: center; }
.role-empty p { margin: 0 0 12px; }
.role-form .r-all { display: flex; gap: 16px; margin: 0 0 6px; }
.role-form .r-group { border-bottom: 1px solid var(--border); }
.role-form .r-group summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 46px; cursor: pointer; padding: 0 6px; }
.role-form .r-group summary::-webkit-details-marker { display: none; }
.role-form .r-group .chev { width: 18px; color: var(--muted); transition: transform .15s; }
.role-form .r-group[open] .chev { transform: rotate(90deg); }
.role-form .r-group summary b { flex: 1; min-width: 0; }
.role-form .pill { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: #f1f1ee; color: var(--muted); white-space: nowrap; }
.role-form .pill::before { display: none; } /* a right's level, not a state: no dot (0.25.0) */
.role-form .pill.on { background: #e6f6ec; color: var(--green); font-weight: 600; }
.role-form .pill.part { background: var(--wash); color: #8a6a12; font-weight: 600; }
.role-form .checks { grid-template-columns: 1fr 1fr; gap: 0 16px; padding: 0 8px 10px 34px; }
.role-form .checks label { font-weight: 400; margin: 0; display: flex; gap: 8px; align-items: center; min-height: 40px; }
.role-form .checks input { width: 16px; height: 16px; flex: none; }
.role-form .acts { margin-top: 14px; }
@media (max-width: 820px) {
  .u-tabs .tab, .role-acts .eye, .role-form .btn, .role-form .link, .role-empty .btn { min-height: 40px; padding-left: 14px; padding-right: 14px; }
  .role-form .checks { grid-template-columns: minmax(0, 1fr); padding-left: 28px; }
  .role-acts { flex-basis: 100%; }
}
