/* gonker. — hoja de estilos
   Identidad: verde bosque, lima y fondo claro. Bricolage Grotesque para títulos y montos; Instrument Sans para el resto. */

:root {
  --forest: #183d34;
  --forest-deep: #102b24;
  --forest-soft: #23503f;
  --lime: #d7ef93;
  --lime-soft: #eef7d2;
  --bg: #f6f7f4;
  --card: #ffffff;
  --ink: #13241f;
  --muted: #5b6862;
  --faint: #8a958f;
  --line: #e1e6de;
  --line-strong: #cdd5ca;
  --focus: #2f7a5f;
  --danger: #a3392a;

  --draft-fg: #4f5b56; --draft-bg: #eceee9;
  --sent-fg: #22547f; --sent-bg: #e3edf7;
  --won-fg: #2e5b12; --won-bg: #dff0b4;
  --lost-fg: #8f3424; --lost-bg: #f6e2dc;
  --expired-fg: #7a5a0c; --expired-bg: #f4eacb;

  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --side: 252px;
  --tab: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 2px rgb(19 36 31 / 6%), 0 8px 24px -12px rgb(19 36 31 / 18%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--body); font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; line-height: 1.12; font-weight: 700; }
h1 { font-size: clamp(28px, 4.2vw, 38px); }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.fineprint { color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- estructura ---------- */
.side { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; background: rgb(246 247 244 / 92%);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .brand { margin-right: auto; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 800 22px/1 var(--display); letter-spacing: -0.04em; }
.brand i { font-style: normal; color: #7fae2e; }
.view { padding: 22px 16px calc(var(--tab) + var(--safe-b) + 32px); max-width: 1200px; margin: 0 auto; outline: none; }
body:not(.ready) .view { opacity: 0; }
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line);
}
.tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 0; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar a.active { color: var(--forest); }
.tabbar a.active .i { stroke-width: 2.1; }
.tabbar .tab-new { width: 52px; height: 52px; margin: -14px auto 0; border-radius: 18px; background: var(--forest); color: var(--lime); display: grid; place-items: center; box-shadow: 0 8px 18px -8px rgb(24 61 52 / 60%); }
.tabbar .tab-new .i { width: 26px; height: 26px; }
.tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--lime); color: var(--forest-deep); font: 700 11px/18px var(--body); text-align: center; }
.avatar {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--forest); color: var(--lime);
  font: 700 13px/1 var(--display); text-decoration: none; background-size: contain; background-repeat: no-repeat; background-position: center; flex: none;
}
.avatar.has-logo { background-color: #fff; border: 1px solid var(--line); }
.plan-chip { font-size: 12px; font-weight: 600; text-decoration: none; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.plan-chip .i { width: 14px; height: 14px; }
.plan-chip.premium { background: var(--lime); border-color: transparent; color: var(--forest-deep); }
.offline { position: sticky; top: 57px; z-index: 19; background: var(--ink); color: #fff; font-size: 13px; padding: 8px 16px; text-align: center; }

@media (min-width: 960px) {
  .topbar, .tabbar { display: none; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: var(--side); display: flex; flex-direction: column; gap: 22px; padding: 26px 18px 20px;
    background: var(--forest); color: #d6e5dc; z-index: 20;
  }
  .side .brand { color: #fff; padding: 0 8px; }
  .side .brand i { color: var(--lime); }
  .side-new { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border-radius: var(--r); background: var(--lime); color: var(--forest-deep); text-decoration: none; font-weight: 700; transition: transform .15s; }
  .side-new:hover { transform: translateY(-1px); }
  .side-nav { display: grid; gap: 2px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; color: #cfe0d6; }
  .side-nav a:hover { background: rgb(255 255 255 / 6%); color: #fff; }
  .side-nav a.active { background: rgb(215 239 147 / 14%); color: var(--lime); }
  .side-nav .count { margin-left: auto; font: 600 12px var(--body); color: #9fb8ab; }
  .side-nav .badge { margin-left: auto; }
  .side-foot { margin-top: auto; display: grid; gap: 10px; }
  .biz-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r); background: rgb(255 255 255 / 6%); text-decoration: none; }
  .biz-card .avatar { background-color: var(--lime); color: var(--forest-deep); }
  .biz-card .avatar.has-logo { background-color: #fff; }
  .biz-card b { display: block; color: #fff; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
  .biz-card small { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #a9c3b5; }
  .biz-card small .i { width: 13px; height: 13px; color: var(--lime); }
  .local-note { font-size: 12px; color: #8fae9f; padding: 0 10px; display: flex; align-items: center; gap: 8px; }
  .local-note::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
  .view { margin-left: var(--side); padding: 40px 48px 64px; max-width: calc(1240px + var(--side)); }
  .offline { top: 0; margin-left: var(--side); }
  .mob-only { display: none !important; }
}
@media (max-width: 959px) { .desk-only { display: none !important; } }

/* ---------- botones y campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--forest); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn.primary:hover { background: var(--forest-deep); }
.btn.primary .i { color: var(--lime); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgb(19 36 31 / 5%); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.sm .i { width: 17px; height: 17px; }
.btn.big { min-height: 54px; font-size: 16px; padding: 0 24px; border-radius: 14px; width: 100%; }
.btn.add { width: 100%; border-style: dashed; color: var(--forest); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--muted); }
.icon-btn:hover:not(:disabled) { background: rgb(19 36 31 / 6%); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--forest); font-weight: 650; text-decoration: underline; text-decoration-color: rgb(24 61 52 / 30%); text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }
.link .i { width: 17px; height: 17px; }
.link.sm { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > span:first-child, legend { font-size: 13px; font-weight: 650; color: var(--muted); }
input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line-strong); background: #fff;
  font-size: 16px; /* evita el zoom en iOS */ transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 0; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgb(24 61 52 / 14%); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); box-shadow: 0 0 0 3px rgb(163 57 42 / 12%); }
input[type=date] { min-width: 0; }
select { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6862' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 18px; }
.select-sm select { min-height: 40px; font-size: 14px; padding-top: 6px; padding-bottom: 6px; }
.hint { color: var(--faint); font-size: 12.5px; }
.err { color: var(--danger); font-size: 13px; font-weight: 600; margin-top: 4px; }
.err-slot { color: var(--danger); font-size: 13px; font-weight: 600; }
.err-slot:empty { display: none; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.money-in, .pct-in { position: relative; display: block; }
.money-in i, .pct-in i { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--faint); font-size: 14px; pointer-events: none; }
.money-in i { left: 13px; }
.money-in input { padding-left: 30px !important; text-align: right; font-variant-numeric: tabular-nums; }
.pct-in i { right: 13px; }
.pct-in input { padding-right: 46px !important; text-align: right; font-variant-numeric: tabular-nums; }

.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 8px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: #fff; font-weight: 600; font-size: 14px; }
.chip span .i { width: 17px; height: 17px; }
.chip input:checked + span { background: var(--forest); color: #fff; border-color: var(--forest); }
.chip input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.chip.upload span { border-style: dashed; color: var(--forest); }
.chip-btn { min-height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: #fff; font-size: 13px; font-weight: 600; }
.chip-btn.on, .chip-btn:hover { border-color: var(--forest); color: var(--forest); background: var(--lime-soft); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; flex: none; width: 44px; height: 26px; margin: 0; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .15s; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 20%); transition: transform .15s; }
.switch input:checked { background: var(--forest); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:disabled { opacity: .5; }
.switch small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }

.segmented { border: 0; padding: 4px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; background: #eef1ec; border-radius: 13px; gap: 4px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: grid; place-items: center; min-height: 42px; padding: 4px 8px; text-align: center; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--muted); line-height: 1.2; }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(19 36 31 / 12%); }
.segmented input:focus-visible + span { outline: 2.5px solid var(--focus); }

details.more summary { cursor: pointer; color: var(--forest); font-weight: 650; font-size: 14px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.more summary::before { content: '+'; font-weight: 700; }
details.more[open] summary::before { content: '–'; }
details.more[open] > :not(summary) { margin-top: 12px; }

/* ---------- títulos de página ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.lead { color: var(--muted); font-size: 16px; margin-top: 6px; }
.eyebrow-date { color: var(--muted); font-size: 13.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eyebrow-date::first-letter { text-transform: uppercase; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; margin-left: -6px; flex-basis: 100%; }
.back .i { width: 18px; height: 18px; }
.display { font-size: clamp(36px, 7vw, 60px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; }
.display .dot { color: #7fae2e; }

/* ---------- paneles ---------- */
.panel, .card, .block { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel { display: grid; gap: 16px; align-content: start; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lock { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; color: var(--forest); background: var(--lime-soft); padding: 4px 10px; border-radius: 99px; }
.lock .i { width: 14px; height: 14px; }
.notice { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r); background: var(--lime-soft); border: 1px solid #dbe9b4; margin-bottom: 20px; }
.notice > .i { color: var(--forest); }
.notice p { flex: 1 1 220px; font-size: 14px; }
.notice.soft { background: #eef1ec; border-color: var(--line); }
.notice.recover { background: #fff; border-color: var(--forest); }
.quiet-note { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; padding: 14px 0; }
.quiet-note .i { color: #7fae2e; }
@media (min-width: 700px) { .panel, .card, .block { padding: 26px; } }

/* ---------- estados ---------- */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.draft { color: var(--draft-fg); background: var(--draft-bg); }
.pill.sent { color: var(--sent-fg); background: var(--sent-bg); }
.pill.won { color: var(--won-fg); background: var(--won-bg); }
.pill.lost { color: var(--lost-fg); background: var(--lost-bg); }
.pill.expired { color: var(--expired-fg); background: var(--expired-bg); }

/* ---------- inicio ---------- */
.home-head { margin-bottom: 28px; }
.home-grid { display: grid; gap: 16px; margin-bottom: 28px; }
@media (min-width: 900px) { .home-grid { grid-template-columns: 1fr 1.15fr; } }
.create-tile {
  position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; text-align: left;
  min-height: 190px; padding: 24px; border: 0; border-radius: var(--r-lg); background: var(--forest); color: #fff;
}
.create-tile::before { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 38px solid rgb(215 239 147 / 9%); }
.create-copy { position: relative; display: grid; gap: 6px; max-width: 280px; }
.create-copy b { font: 800 30px/1.02 var(--display); letter-spacing: -0.035em; }
.create-copy span { color: #bcd2c6; font-size: 14.5px; }
.create-plus { position: relative; width: 64px; height: 64px; border-radius: 20px; background: var(--lime); color: var(--forest-deep); display: grid; place-items: center; transition: transform .2s; flex: none; }
.create-plus .i { width: 30px; height: 30px; stroke-width: 2.2; }
.create-tile:hover .create-plus { transform: rotate(90deg); }
.pipe { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 16px; align-content: start; }
.pipe-head { display: flex; justify-content: space-between; align-items: baseline; }
.pipe-rate { font-size: 13px; color: var(--muted); }
.pipe-rate b { font: 800 22px var(--display); color: var(--ink); margin-right: 3px; }
.pipe-bar { display: flex; gap: 3px; height: 14px; border-radius: 99px; overflow: hidden; background: #eef1ec; }
.pipe-bar span { min-width: 0; flex-basis: 0; }
.pipe-bar .draft { background: #c9d0c8; }
.pipe-bar .sent { background: var(--forest); }
.pipe-bar .won { background: #9ccc3e; }
.pipe-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.pipe-legend dt { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pipe-legend dt small { color: var(--faint); }
.pipe-legend dt i { width: 8px; height: 8px; border-radius: 3px; }
.pipe-legend i.draft { background: #c9d0c8; } .pipe-legend i.sent { background: var(--forest); } .pipe-legend i.won { background: #9ccc3e; }
.pipe-legend dd { margin: 2px 0 0; font-size: clamp(15px, 2.6vw, 21px); font-weight: 700; overflow-wrap: anywhere; }
.pipe.intro h2 { margin-bottom: 2px; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: how; }
.how li { counter-increment: how; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; color: var(--muted); font-size: 14px; }
.how li::before { content: counter(how); grid-row: span 2; width: 34px; height: 34px; border-radius: 11px; background: var(--lime-soft); color: var(--forest); display: grid; place-items: center; font: 800 15px var(--display); }
.how b { color: var(--ink); font-size: 15px; }
.home-cols { display: grid; gap: 16px; }
@media (min-width: 1100px) { .home-cols { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.block { display: grid; gap: 10px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.block-head + .block-head { margin-top: 12px; }
.block .list + .block-head, .block .quiet-note + .block-head { margin-top: 18px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; }
.feed a { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; color: var(--muted); }
.feed li:last-child a { border-bottom: 0; }
.feed b { color: var(--ink); }
.feed time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transform: translateY(-1px); }
.feed-dot.status, .feed-dot.created { background: var(--forest); }
.feed-dot.contact, .feed-dot.shared { background: #9ccc3e; }

/* ---------- listas de cotizaciones ---------- */
.list { display: grid; }
.list.big { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 4px 18px; }
.qrow { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; align-items: center; }
.list > .qrow:last-child { border-bottom: 0; }
.qrow:hover strong { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.qrow-main { display: grid; min-width: 0; }
.qrow-main strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow-main span { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow-side { display: grid; justify-items: end; gap: 4px; flex: none; }
.qrow-side b { font-size: 17px; }
.qrow-meta { display: flex; gap: 8px; align-items: center; }
.qrow-meta small { color: var(--faint); font-size: 12px; display: none; }
@media (min-width: 640px) { .qrow-meta small { display: inline; } }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.search { position: relative; flex: 1; }
.search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 42px !important; }
.toolbar .select-sm select { min-height: 46px; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; margin: 0 -16px 4px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.filters a { flex: none; text-decoration: none; padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--muted); background: #fff; border: 1px solid var(--line); }
.filters a small { color: var(--faint); margin-left: 3px; }
.filters a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters a.on small { color: #b8c2bd; }
@media (min-width: 960px) { .filters { margin: 0 0 4px; padding-left: 0; } }

.empty { text-align: center; padding: 48px 20px; display: grid; justify-items: center; gap: 10px; }
.empty p { color: var(--muted); max-width: 420px; }
.empty .btn { margin-top: 10px; }
.empty-art { position: relative; width: 96px; height: 96px; margin-bottom: 10px; }
.empty-art span { position: absolute; inset: 0; border-radius: 16px; background: #fff; border: 1px solid var(--line-strong); }
.empty-art span:nth-child(1) { transform: rotate(-9deg) translate(-12px, 4px); }
.empty-art span:nth-child(2) { transform: rotate(6deg) translate(10px, 0); }
.empty-art span:nth-child(3) { background: var(--forest); border: 0; transform: scale(.92); }
.empty-art span:nth-child(3)::after { content: ''; position: absolute; left: 22px; right: 22px; top: 30px; height: 26px; border-top: 4px solid var(--lime); border-bottom: 4px solid rgb(215 239 147 / 50%); }

/* ---------- documento ---------- */
.doc-pages { display: grid; gap: 14px; }
.doc-sheet { background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgb(0 0 0 / 8%), 0 12px 30px -16px rgb(19 36 31 / 35%); overflow: hidden; }
.doc-sheet svg { width: 100%; height: auto; }
.doc-viewer { background: #e9ece6; border-radius: var(--r-lg); padding: 14px; }
.doc-viewer-bar, .preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; padding: 0 4px; }

/* ---------- detalle ---------- */
.detail-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; width: 100%; }
.detail-head { margin-bottom: 18px; }
.detail-head h1 { overflow-wrap: anywhere; }
.detail-total { display: grid; text-align: right; }
.detail-total small { color: var(--muted); font-size: 13px; }
.detail-total b { font-size: clamp(30px, 5vw, 42px); font-weight: 800; letter-spacing: -0.035em; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.detail-actions .btn.icon-only { width: 44px; padding: 0; }
@media (max-width: 559px) {
  .detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-actions #send { grid-column: 1 / -1; }
  .detail-actions .btn.icon-only { width: auto; }
  .detail-total { text-align: left; }
}
.detail-grid { display: grid; gap: 16px; }
@media (min-width: 1000px) { .detail-grid { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); align-items: start; } .detail-side { position: sticky; top: 24px; } }
.detail-side { display: grid; gap: 14px; }
.card { display: grid; gap: 14px; }
.card h2 { font-size: 17px; display: flex; align-items: baseline; gap: 8px; }
.card h2 small { font: 500 12px var(--body); color: var(--faint); }
.card.internal { background: #fbfcf8; border-style: dashed; }
.status-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.status-pick button { min-height: 42px; border-radius: 11px; border: 1px solid var(--line-strong); background: #fff; font-weight: 650; font-size: 14px; }
.status-pick button.on.draft { background: var(--draft-bg); color: var(--draft-fg); border-color: var(--draft-fg); }
.status-pick button.on.sent { background: var(--sent-bg); color: var(--sent-fg); border-color: var(--sent-fg); }
.status-pick button.on.won { background: var(--won-bg); color: var(--won-fg); border-color: var(--won-fg); }
.status-pick button.on.lost { background: var(--lost-bg); color: var(--lost-fg); border-color: var(--lost-fg); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.facts dt { font-size: 12.5px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; }
.next-contact { display: flex; gap: 10px; align-items: center; background: var(--lime-soft); padding: 12px; border-radius: 12px; font-size: 14px; }
.next-contact .i { color: var(--forest); }
.field.inline { grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-height: 360px; overflow: auto; }
.timeline li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.note-form { display: flex; gap: 8px; }
.note-form input { min-height: 40px !important; font-size: 15px !important; }

/* ---------- editor ---------- */
body[data-route=nueva] .tabbar, body[data-route=editar] .tabbar { display: none; }
body[data-route=nueva] .view, body[data-route=editar] .view { padding-bottom: calc(110px + var(--safe-b)); }
.editor-head { margin-bottom: 14px; }
.editor-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.doc-number { font: 700 14px var(--display); color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 3px 10px; border-radius: 8px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #eaede7; padding: 4px; border-radius: 15px; margin-bottom: 18px; position: sticky; top: 61px; z-index: 10; }
.steps button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; padding: 7px 4px; border-radius: 11px; color: var(--muted); font-weight: 650; font-size: 12.5px; }
.steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--display); background: #fff; color: var(--muted); }
.steps button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(19 36 31 / 12%); }
.steps button.on b { background: var(--forest); color: var(--lime); }
.steps button.done b { background: var(--lime); color: var(--forest-deep); }
@media (min-width: 600px) { .steps button { flex-direction: row; justify-content: center; gap: 8px; font-size: 14px; } }
@media (min-width: 960px) { .steps { top: 12px; max-width: 640px; } }
.editor-grid { display: grid; gap: 20px; }
.editor-form { display: grid; gap: 16px; align-content: start; min-width: 0; }
.editor-preview { display: none; }
@media (min-width: 1180px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr); align-items: start; }
  .editor-preview { display: block; position: sticky; top: 72px; max-height: calc(100dvh - 170px); overflow: auto; background: #e9ece6; border-radius: var(--r-lg); padding: 14px; }
}
@media (max-width: 1179px) {
  body[data-step="3"] .editor-preview { display: block; order: -1; }
  body[data-step="3"] .editor-preview .doc-pages { max-width: 520px; margin: 0 auto; }
}
.items { display: grid; gap: 12px; }
.item { border: 1px solid var(--line); background: #fbfcfa; border-radius: 16px; padding: 14px; display: grid; gap: 12px; }
.item-top { display: flex; gap: 8px; align-items: flex-end; }
.item-top .grow { flex: 1; }
.item-tools { display: flex; gap: 0; margin-bottom: 3px; }
.item-nums { display: grid; grid-template-columns: 0.8fr 0.8fr 1.4fr; gap: 10px; }
.item-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 18px; }
.item-foot .hint { color: var(--forest); font-weight: 600; }
.cost-total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px; }
.cost-total span { color: var(--muted); font-weight: 600; }
.cost-total b { font-size: 24px; }
@media (max-width: 420px) {
  .item-tools .icon-btn[data-move] { display: none; }
  .item-nums { grid-template-columns: 1fr 1fr; }
  .item-nums .field:last-child { grid-column: 1 / -1; }
}
.pct-row { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: end; }
.pct-row .pct input { font: 700 22px var(--display); }
input[type=range] { width: 100%; accent-color: var(--forest); height: 46px; }
.explain { font-size: 15px; line-height: 1.55; background: var(--lime-soft); border-radius: 12px; padding: 12px 14px; }
.margin-grid { display: grid; gap: 16px; }
@media (min-width: 1180px) {
  /* En el paso Margen, el ticket ocupa el lugar de la vista previa: aquí importan los números. */
  body[data-step="2"] .editor-grid { grid-template-columns: 1fr; }
  body[data-step="2"] .editor-preview { display: none; }
  body[data-step="2"] .editor-form { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr); align-items: start; }
  body[data-step="2"] .editor-form .ticket { grid-column: 2; grid-row: 1; position: sticky; top: 72px; }
}

/* El ticket: el único elemento llamativo del editor. */
.ticket {
  position: relative; background: var(--forest); color: #cfe0d6; border-radius: var(--r-lg) var(--r-lg) 6px 6px; padding: 22px 22px 26px;
  display: grid; gap: 2px;
  -webkit-mask: radial-gradient(circle 7px at 10px 100%, #0000 97%, #000) left bottom / 20px 14px repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 13px) no-repeat;
  mask: radial-gradient(circle 7px at 10px 100%, #0000 97%, #000) left bottom / 20px 14px repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 13px) no-repeat;
}
.tk-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; }
.tk-row b { color: #fff; font-size: 17px; font-weight: 600; }
.tk-row.gain b { color: var(--lime); }
.tk-row.sub { border-top: 1px dashed rgb(215 239 147 / 30%); margin-top: 6px; padding-top: 13px; }
.tk-total { display: flex; flex-direction: column; gap: 2px; border-top: 1px dashed rgb(215 239 147 / 30%); margin-top: 10px; padding-top: 16px; }
.tk-total span { font-size: 13px; color: #a9c3b5; }
.tk-total b { font-size: clamp(38px, 9vw, 54px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; color: var(--lime); overflow-wrap: anywhere; }
.sheet .ticket { margin-top: 6px; }

.templates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .templates { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tpl { position: relative; display: grid; gap: 6px; cursor: pointer; }
.tpl input { position: absolute; opacity: 0; }
.tpl-thumb { display: block; border-radius: 10px; overflow: hidden; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line-strong); transition: box-shadow .15s, transform .15s; background: #fff; }
.tpl-thumb .doc-sheet { box-shadow: none; border-radius: 0; }
.tpl input:checked + .tpl-thumb { border-color: var(--forest); box-shadow: 0 0 0 3px var(--lime); }
.tpl input:focus-visible + .tpl-thumb { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.tpl:hover .tpl-thumb { transform: translateY(-2px); }
.tpl-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 5px; }
.tpl-name .i { width: 14px; height: 14px; color: var(--faint); }
.tpl small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.tpl.locked .tpl-thumb { opacity: .55; }
@media (max-width: 480px) { .tpl small { display: none; } }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { display: flex; padding: 3px; border-radius: 12px; border: 2px solid transparent; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch i { width: 22px; height: 30px; }
.swatch i:first-child { border-radius: 8px 0 0 8px; } .swatch i:last-child { border-radius: 0 8px 8px 0; }
.swatch.on { border-color: var(--forest); }
.field.color { grid-template-columns: 1fr auto; align-items: center; background: #fbfcfa; border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 14px; }
.field.color input { width: 52px; height: 36px; border: 0; padding: 0; background: none; border-radius: 8px; cursor: pointer; }
.design-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.design-tools .select-sm { flex: 1 1 200px; }
.is-locked { background: #fbfcf8; }
.review-cta { padding: 4px 0 8px; }

.editor-bar {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-b)); background: rgb(255 255 255 / 96%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.editor-bar .btn { min-height: 48px; }
.editor-bar #prev span { display: none; }
.ticket-mini { margin-right: auto; display: grid; text-align: left; border: 0; background: none; padding: 2px 6px; border-radius: 10px; min-width: 0; }
.ticket-mini small { font-size: 11.5px; color: var(--muted); }
.ticket-mini b { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
@media (min-width: 600px) { .editor-bar #prev span { display: inline; } }
@media (min-width: 960px) { .editor-bar { left: var(--side); padding: 12px 48px; } }

/* ---------- seguimiento ---------- */
.fsection { margin-bottom: 26px; }
.fsection h2 { margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.fsection h2 small { font: 600 14px var(--body); color: var(--faint); }
.fsection > .muted { margin: -4px 0 10px; font-size: 14px; }
.fcards { display: grid; gap: 10px; }
@media (min-width: 900px) { .fcards { grid-template-columns: 1fr 1fr; } }
.fcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px; border-left: 4px solid var(--line-strong); }
.fcard.late { border-left-color: var(--danger); }
.fcard.today { border-left-color: #9ccc3e; }
.fcard.soon { border-left-color: var(--forest); }
.fcard-main { display: grid; text-decoration: none; min-width: 0; }
.fcard-main span { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard-main small { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.fcard-when { display: grid; text-align: right; align-content: start; }
.fcard-when b { font: 700 16px var(--display); }
.fcard-when small { color: var(--muted); font-size: 12px; }
.fcard.late .fcard-when small { color: var(--danger); font-weight: 600; }
.fcard-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.sequence { margin-top: 10px; }
.seq-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; align-items: end; }
.notice.soft { margin-top: 18px; }

/* ---------- mi negocio ---------- */
.settings { display: grid; gap: 16px; }
@media (min-width: 1100px) { .settings { grid-template-columns: 1fr 1fr; align-items: start; } #designs, #data { grid-column: span 1; } }
.form-foot { display: flex; justify-content: flex-end; }
.logo-box { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 16px; }
.logo-box b { display: inline; }
.logo-box .fineprint { margin: 4px 0 10px; }
.logo-prev { width: 112px; height: 76px; flex: none; border-radius: 12px; background: #fff repeating-conic-gradient(#f0f2ee 0 25%, #fff 0 50%) 0 0 / 14px 14px; border: 1px solid var(--line); display: grid; place-items: center; padding: 8px; }
.logo-prev img { max-height: 100%; object-fit: contain; }
.logo-prev.empty { color: var(--faint); background: #fbfcfa; }
.habitual { display: grid; gap: 16px; }
@media (min-width: 640px) { .habitual { grid-template-columns: 200px 1fr; align-items: start; } }
.tpl-thumb.big { max-width: 220px; }
.design-list { list-style: none; margin: 0; padding: 0; display: grid; }
.design-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.design-list li > span:nth-child(2) { flex: 1; display: grid; }
.design-list small { color: var(--muted); font-size: 12.5px; }
.sw { display: flex; } .sw i { width: 16px; height: 28px; } .sw i:first-child { border-radius: 6px 0 0 6px; } .sw i:last-child { border-radius: 0 6px 6px 0; }
.storage { font-size: 14px; color: var(--muted); }
.install-card { grid-template-columns: auto 1fr; align-items: center; }
.install-card img { border-radius: 14px; }
.install-card .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 640px) { .install-card { grid-template-columns: auto 1fr auto; } .install-card .btn { grid-column: auto; } }
.plan-line { color: var(--muted); font-size: 14px; padding: 4px 6px; }

/* ---------- planes ---------- */
.plans { display: grid; gap: 16px; margin: 6px 0 16px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; max-width: 900px; } }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: grid; gap: 14px; align-content: start; }
.plan.featured { background: var(--forest); color: #d6e5dc; border-color: var(--forest); }
.plan.featured h2 { color: #fff; }
.plan .price { font: 800 34px/1 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.plan.featured .price { color: var(--lime); font-size: 26px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan li .i { width: 18px; height: 18px; margin-top: 2px; color: #7fae2e; }
.plan.featured li .i { color: var(--lime); }
.plan li.no { color: var(--faint); }
.plan li.no .i { color: var(--faint); }
.plan .btn { justify-self: start; }
.plan.featured .btn.primary { background: var(--lime); color: var(--forest-deep); border-color: var(--lime); }
.plan.featured .btn.primary .i { color: var(--forest-deep); }
.plan-current { font-weight: 700; font-size: 14px; }
.plan.featured .plan-current { color: var(--lime); }

/* ---------- hojas y diálogos ---------- */
dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; background: #fff; color: var(--ink); box-shadow: 0 -10px 40px rgb(0 0 0 / 20%); animation: sheet-up .22s cubic-bezier(.2, .8, .2, 1); }
dialog.sheet::backdrop { background: rgb(16 43 36 / 45%); animation: fade .2s; }
dialog.sheet.closing { animation: sheet-down .16s ease-in forwards; }
.sheet-body { padding: 22px 20px calc(22px + var(--safe-b)); display: grid; gap: 14px; overflow: auto; max-height: 92dvh; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -6px -8px 0 0; }
.sheet-title { font-size: 21px; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 480px) { .sheet-actions.stack-mobile { flex-direction: column-reverse; } .sheet-actions.stack-mobile .btn { width: 100%; } }
dialog.sheet-full { height: 92dvh; }
dialog.sheet-full .doc-pages { padding-bottom: 20px; }
@media (min-width: 700px) {
  dialog.sheet { margin: auto; border-radius: 24px; max-width: 540px; animation: pop .18s ease-out; }
  dialog.sheet-sm { max-width: 440px; }
  dialog.sheet-full { max-width: 760px; }
  dialog.sheet.closing { animation: fade-out .14s ease-in forwards; }
  .sheet-body { padding: 26px; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.send-grid { display: grid; gap: 8px; }
.send-opt { text-decoration: none; color: inherit; display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.send-opt:hover { border-color: var(--forest); background: #fbfcf8; }
.send-opt > .i { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--lime-soft); color: var(--forest); }
.send-opt b { display: block; }
.send-opt small { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; }
.confirm-sent { background: var(--lime-soft); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.confirm-sent .row { justify-content: flex-end; flex-wrap: wrap; }
.menu { display: grid; }
.menu button { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; font-weight: 600; text-align: left; }
.menu button:last-child { border-bottom: 0; }
.menu .danger { color: var(--danger); }
.install-hero { display: flex; gap: 14px; align-items: center; }
.install-hero img { border-radius: 16px; }
.install-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }

/* ---------- aviso ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab) + var(--safe-b) + 14px); z-index: 60; transform: translate(-50%, 20px);
  display: flex; gap: 14px; align-items: center; max-width: min(92vw, 520px); width: max-content; padding: 12px 16px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 14.5px; box-shadow: 0 10px 30px rgb(0 0 0 / 25%); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.ok::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.toast.error { background: var(--danger); }
.toast button { flex: none; border: 0; background: none; color: var(--lime); font-weight: 700; padding: 4px; }
.toast.error button { color: #fff; text-decoration: underline; }
body[data-route=nueva] .toast, body[data-route=editar] .toast { bottom: calc(86px + var(--safe-b)); }
@media (min-width: 960px) { .toast { bottom: 28px; left: calc(50% + var(--side) / 2); } body[data-route=nueva] .toast, body[data-route=editar] .toast { bottom: 96px; } }

.fatal { max-width: 560px; margin: 80px auto; padding: 24px; display: grid; gap: 12px; }
.fatal pre { white-space: pre-wrap; background: #fff; padding: 12px; border-radius: 10px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
@media print { .side, .topbar, .tabbar, .editor-bar, .toast { display: none !important; } .view { margin: 0; padding: 0; } }
h1[tabindex="-1"]:focus { outline: none; }

/* ---------- 2.1: editor, ítems, planes ---------- */
.editor-title { align-items: center; }
.view-toggle { border: 0; margin: 0 0 0 auto; padding: 3px; display: inline-flex; gap: 2px; background: #eaede7; border-radius: 11px; }
.view-toggle label { position: relative; }
.view-toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.view-toggle span { display: block; padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.view-toggle input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(19 36 31 / 12%); }
.view-toggle input:focus-visible + span { outline: 2.5px solid var(--focus); }
@media (max-width: 599px) { .view-toggle { margin: 6px 0 0; } }
body[data-step="all"] .steps { position: sticky; }
.sec { display: grid; gap: 16px; scroll-margin-top: 130px; }
.sec + .sec { margin-top: 18px; }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.sec-title b { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--forest); color: var(--lime); font: 800 15px var(--display); }
body[data-step="all"] .ticket { margin-top: 2px; }

.mini-seg { border: 0; margin: 0; padding: 3px; display: inline-grid; grid-template-columns: 1fr 1fr; gap: 3px; background: #eef1ec; border-radius: 10px; justify-self: start; }
.mini-seg label { position: relative; }
.mini-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.mini-seg span { display: block; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 650; color: var(--muted); text-align: center; }
.mini-seg input:checked + span { background: #fff; color: var(--forest); box-shadow: 0 1px 2px rgb(19 36 31 / 12%); }
.mini-seg input:focus-visible + span { outline: 2.5px solid var(--focus); }
.item-nums { grid-template-columns: 0.7fr 0.7fr 1.4fr 0.75fr; }
.item.is-price { border-color: #dbe9b4; }
.item-cost-opt .field > span:first-child { font-weight: 500; color: var(--faint); }
.item-cost-opt input { background: #fbfcfa !important; }
@media (max-width: 520px) {
  .item-nums { grid-template-columns: 1fr 1fr; }
  .item-nums .field:nth-child(3) { grid-column: 1 / 2; }
}
@media (max-width: 420px) { .item-nums .field:last-child { grid-column: auto; } }

.color-in { display: flex; align-items: center; gap: 8px; }
.color-in input[type=color] { width: 44px; height: 36px; border: 0; padding: 0; background: none; border-radius: 8px; cursor: pointer; flex: none; }
.color-in .hex { width: 96px !important; min-height: 36px !important; padding: 6px 10px !important; font: 600 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace !important; text-transform: lowercase; }
.field.color { grid-template-columns: 1fr auto; }
.upsell { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--lime-soft); border-radius: 14px; padding: 12px 14px; }
.upsell > .i { color: var(--forest); }
.upsell p { flex: 1 1 220px; font-size: 14px; }
.quick .chip-btn { white-space: nowrap; }
.settings h3 { margin-top: 4px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.settings h3 small { font: 400 13px var(--body); }

.plans3 { display: grid; gap: 14px; margin: 6px 0 20px; }
@media (min-width: 860px) { .plans3 { grid-template-columns: repeat(3, 1fr); } }
.plans3 .price small { font: 600 14px var(--body); color: inherit; opacity: .7; }
.plan-for { font-size: 14px; color: var(--muted); }
.plan.featured .plan-for { color: #bcd2c6; }
.plan.current { box-shadow: 0 0 0 2px var(--lime); }
.compare-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 14px; }
.compare { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 14px; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.compare thead th { font: 700 15px var(--display); background: #fbfcfa; }
.compare thead th:nth-child(3) { background: var(--forest); color: var(--lime); }
.compare tbody th { text-align: left; font-weight: 500; }
.compare td:nth-child(3) { background: #f7fbec; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare .yes { color: #4f8a12; display: inline-grid; } .compare .yes .i { width: 18px; height: 18px; }
.compare .no { color: var(--faint); }
.compare .soon { font-size: 12px; font-weight: 700; color: var(--forest); background: var(--lime-soft); padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.compare .val { font-weight: 650; }
.compare thead th:first-child { text-align: left; }

/* ---------- 2.2: estudio de diseño ---------- */
.top-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: var(--forest); border: 1px solid var(--line-strong); text-decoration: none; }
.top-icon.active { background: var(--lime); border-color: transparent; }
.studio { display: grid; gap: 18px; }
.studio-controls { display: grid; gap: 16px; align-content: start; min-width: 0; }
.studio-preview { background: #e9ece6; border-radius: var(--r-lg); padding: 14px; order: -1; }
.studio-preview .doc-pages { max-width: 520px; margin: 0 auto; }
.studio-preview .preview-bar { flex-wrap: wrap; }
.studio-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) {
  .studio { grid-template-columns: minmax(0, 1fr) minmax(400px, 0.95fr); align-items: start; }
  .studio-preview { order: 0; position: sticky; top: 24px; max-height: calc(100dvh - 130px); overflow: auto; }
}
@media (min-width: 1400px) { .studio-tpls { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1099px) { .studio-preview { max-height: 62dvh; overflow: auto; } }
body[data-route=diseno] .view { padding-bottom: calc(var(--tab) + var(--safe-b) + 96px); }
.studio-bar {
  position: fixed; inset: auto 0 calc(var(--tab) + var(--safe-b)) 0; z-index: 25; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: rgb(255 255 255 / 96%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.studio-bar p { margin-right: auto; }
.studio-bar .btn { min-height: 44px; }
.studio-bar .btn:disabled { opacity: .45; cursor: default; }
@media (min-width: 960px) { .studio-bar { left: var(--side); bottom: 0; padding: 12px 48px; } body[data-route=diseno] .view { padding-bottom: 110px; } }
@media (max-width: 480px) { .studio-bar #d-status { display: none; } .studio-bar .btn.primary { flex: 1; } }
.design-link { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; text-decoration: none; transition: border-color .15s; }
.design-link:hover { border-color: var(--forest); }
.design-link > span:nth-child(2) { display: grid; gap: 4px; }
.design-link-art { display: flex; width: 56px; height: 56px; border-radius: 16px; overflow: hidden; }
.design-link-art i { flex: 1; }
body[data-route=diseno] .toast { bottom: calc(var(--tab) + var(--safe-b) + 80px); }
@media (min-width: 960px) { body[data-route=diseno] .toast { bottom: 96px; } }
@media (max-width: 599px) { .wide-only { display: none; } }
