@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: #F2C44F;       /* 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;
  --rail-w: 82px;
  --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; }


/* Header */
.hdr { height: 60px; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 16px; }
.hdr img { width: 40px; height: 40px; border-radius: 8px; background: #fff; object-fit: contain; }
.hdr .name { line-height: 1.15; }
.hdr .name b { display: block; font-family: "VCD", "Plex", serif; font-weight: 400; font-size: 27px; line-height: 1; color: var(--oro); }
.hdr .name span { color: #f2c44f; font-size: 13px; font-weight: 500; }
.hdr .grow { flex: 1; }
.hdr .eng { font-size: 12px; text-align: right; line-height: 1.3; opacity: .92; }
.hdr .eng b { color: var(--oro); }
.hdr .me { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 5px 10px; font-size: 13px; }
.badge-master { background: #f2c44f; color: #3a2a00; font-weight: 700; font-size: 11px; border-radius: 4px; padding: 1px 6px; letter-spacing: .5px; }

/* Body grid */
.app { display: flex; height: calc(100% - 60px); }
.rail { width: var(--rail-w); background: var(--navy); color: #E9DFC4; display: flex; flex-direction: column; align-items: stretch; padding: 8px 6px; gap: 4px; }
.rail button { background: none; border: 0; color: inherit; border-radius: 8px; padding: 9px 2px 7px; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; }
.rail button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.rail button.on { background: var(--oro); color: var(--navy); font-weight: 600; }
.rail .cnt { position: absolute; top: 3px; right: 14px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 9px; min-width: 18px; padding: 0 4px; }
.rail .sp { flex: 1; }

.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); }
.btn.ok { background: var(--green); 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; }
.p-wait { background: #fdecea; color: var(--red); } .p-work { background: #fff1e3; color: var(--orange); } .p-ok { background: #e6f6ec; color: var(--green); } .p-info { background: var(--wash); color: var(--accent); }
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: #f2c44f; font-weight: 400; }
.frame .sel { outline: 2px dashed #f2c44f; 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; }
.perm td:not(:first-child), .perm th:not(:first-child) { text-align: center; }
.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: 92px; height: 92px; }
.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) {
  .hdr .eng, .hdr .me span.full { display: none; }
  .app { flex-direction: column-reverse; height: calc(100% - 60px); }
  .rail { width: 100%; flex-direction: row; padding: 4px; overflow-x: auto; }
  .rail button { min-width: 64px; font-size: 11px; }
  .rail .sp { display: none; }
  .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; }
.hdr .me .out { background: none; border: 0; color: #E9DFC4; font-size: 12.5px; padding: 0 0 0 6px; text-decoration: underline; }
.badge-role { background: rgba(255,255,255,.18); color: #fff; font-weight: 700; font-size: 11px; border-radius: 4px; padding: 1px 6px; letter-spacing: .5px; }
.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); }
.login .box h2 + p { margin: 0 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; }
.perm input { width: 16px; height: 16px; }
/* 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; }
.perm th .rn { display: block; }
.perm th .eye { margin: 3px 2px 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); }
.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; }

/* Brand name in the logo's script (VCD) on the login box */
.login .box h2.brand { font-family: "VCD", "Plex", serif; font-weight: 400; font-size: 40px; color: var(--navy); }

/* Ajustes pages (wave 3): text and collection editors, dated copies, forms, Claves */
.intro { margin: 0 0 14px; }
.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: #eef1f5; color: var(--muted); }
.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; }
}
