/* Seven Cat Studio · base de apps (Vital, Estadía, Folio, Cupo, Cinco)
   Cada app define --acc (acento) y --acc-ink en su propio :root. */
:root {
  --bg: #f3f1ec; --bg-2: #ebe8e1; --card: #faf9f6; --card-2: #ffffff;
  --ink: #0e0e0d; --ink-2: #2b2a27; --ink-3: #75716a;
  --line: rgba(14,14,13,.11); --line-2: rgba(14,14,13,.2);
  --acc: #9a8259; --acc-ink: #ffffff; --acc-soft: rgba(154,130,89,.12);
  --ok: #2f6b4c; --ok-soft: rgba(47,107,76,.11);
  --warn: #9a6417; --warn-soft: rgba(154,100,23,.12);
  --bad: #a8382c; --bad-soft: rgba(168,56,44,.1);
  --info: #2f5bd3; --info-soft: rgba(47,91,211,.1);
  --side: #0e0e0d; --side-ink: #f3f1ec; --side-mute: #8f8a82; --side-line: rgba(243,241,236,.1);
  --shadow: 0 24px 60px -34px rgba(14,14,13,.45);
  --fd: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --fi: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22,1,.36,1);
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f0f0e; --bg-2: #181816; --card: #171716; --card-2: #1e1e1c;
  --ink: #f3f1ec; --ink-2: #d6d2ca; --ink-3: #8f8a82;
  --line: rgba(243,241,236,.1); --line-2: rgba(243,241,236,.2);
  --ok: #7cc39c; --ok-soft: rgba(124,195,156,.12); --warn: #e0a85a; --warn-soft: rgba(224,168,90,.12);
  --bad: #e8786c; --bad-soft: rgba(232,120,108,.12); --info: #8aa8ff; --info-soft: rgba(138,168,255,.12);
  --side: #090908; --shadow: 0 24px 60px -30px rgba(0,0,0,.8);
} }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.5 var(--fi); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--acc); color: var(--acc-ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--fd); font-weight: 300; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.mono, .lbl { font-family: var(--fd); font-size: 10.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.num { font-family: var(--fd); font-variant-numeric: tabular-nums; }
.mute { color: var(--ink-3); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Estructura ---------- */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 22px 14px 18px; gap: 22px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; text-decoration: none; }
.brand .mk { width: 38px; height: 38px; border-radius: 11px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; flex: none; }
.brand .mk svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand b { display: block; font-family: var(--fd); font-weight: 400; font-size: 1.35rem; letter-spacing: -.01em; line-height: 1; }
.brand small { display: block; font-family: var(--fd); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--side-mute); margin-top: 5px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--side-mute); font-size: 13.5px; transition: background .3s, color .3s; }
.nav a:hover { color: var(--side-ink); background: var(--side-line); }
.nav a[aria-current="page"] { color: var(--side-ink); background: rgba(243,241,236,.08); box-shadow: inset 2px 0 0 var(--acc); }
.nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav a .nb { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--acc); color: var(--acc-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.side-sep { font-family: var(--fd); font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--side-mute); padding: 14px 12px 4px; opacity: .7; }
.side-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--side-line); font-size: 12.5px; color: var(--side-mute); display: grid; gap: 2px; }
.side-foot b { color: var(--side-ink); font-weight: 500; }
.side-foot a { color: var(--side-mute); font-size: 11.5px; margin-top: 8px; text-underline-offset: 3px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 16px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 1.6rem; margin-right: auto; }
.top-menu { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 18px; }
.demo-bar { margin: 16px 28px 0; padding: 10px 14px; border-radius: var(--r); background: var(--acc-soft); color: var(--ink-2); font-size: 12.5px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.demo-bar button { text-decoration: underline; text-underline-offset: 3px; font-weight: 500; color: var(--ink); }
.demo-bar .x { margin-left: auto; text-decoration: none; font-size: 16px; }
.view { padding: 24px 28px 60px; outline: none; animation: in .45s var(--ease); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
.tabbar { display: none; }

/* ---------- Piezas ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-family: var(--fd); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; text-decoration: none; color: var(--ink); transition: background .3s, border-color .3s, color .3s, transform .3s; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: scale(.98); }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.pri:hover { filter: brightness(1.06); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.wa { background: #1f7a4d; border-color: #1f7a4d; color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 10.5px; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 12.5px; }
.btn.bad { color: var(--bad); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: inline-grid; place-items: center; font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.card.flat { box-shadow: none; }
.card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.kpi b { display: block; font-family: var(--fd); font-weight: 300; font-size: 2.1rem; letter-spacing: -.03em; line-height: 1.05; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; color: var(--ink-3); }
.kpi.acc { background: var(--side); color: var(--side-ink); border-color: var(--side); }
.kpi.acc .lbl, .kpi.acc span { color: var(--side-mute); }
.up { color: var(--ok); } .down { color: var(--bad); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.nodot::before { display: none; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.acc { background: var(--acc-soft); color: var(--ink); }
.list { display: grid; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--line); text-align: left; width: 100%; }
.row:first-child { border-top: 0; }
button.row:hover, a.row:hover { background: var(--bg-2); border-radius: 10px; }
a.row { text-decoration: none; }
.row .grow { flex: 1; min-width: 0; }
.row b { font-weight: 500; }
.row small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--acc-soft); color: var(--ink); display: grid; place-items: center; font-family: var(--fd); font-size: 13px; font-weight: 500; flex: none; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tb th { text-align: left; font-family: var(--fd); font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.tb td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tb tr:last-child td { border-bottom: 0; }
.tb tr.click { cursor: pointer; } .tb tr.click:hover td { background: var(--bg-2); }
.tb .r { text-align: right; }
.tbl-wrap { overflow-x: auto; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; gap: 2px; }
.seg button { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.inp, select.inp, textarea.inp { width: 100%; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card-2); transition: border-color .3s; }
textarea.inp { height: auto; min-height: 86px; padding: 10px 14px; resize: vertical; }
.inp:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.search-inp { max-width: 320px; }
.fld { display: grid; gap: 6px; margin-bottom: 14px; }
.fld > span { font-size: 12.5px; color: var(--ink-3); }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; margin-bottom: 12px; }
.chk input { width: 18px; height: 18px; accent-color: var(--acc); margin-top: 1px; flex: none; }
.empty { padding: 34px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 14px; }
.bar { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--acc); border-radius: inherit; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--bg-2); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--acc); }
.note { padding: 12px 14px; border-radius: 10px; background: var(--bg-2); font-size: 13px; color: var(--ink-2); }
.note.acc { background: var(--acc-soft); }
.sec-t { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 28px 0 12px; }
.sec-t h2 { font-size: 1.45rem; }
.hello { margin-bottom: 20px; }
.hello h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.hello p { margin: 6px 0 0; color: var(--ink-3); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 24px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
.timeline li::after { content: ""; position: absolute; left: 8.5px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline small { display: block; color: var(--ink-3); font-size: 12px; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--fi); font-size: 10px; fill: var(--ink-3); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Ventana y aviso ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(14,14,13,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(640px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--card); border-radius: 18px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.5); padding: 24px 26px; animation: pop .45s var(--ease); }
.modal.wide { width: min(900px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.modal-h h2 { font-size: 1.6rem; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 120; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow); transition: .4s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Páginas públicas (cliente final) ---------- */
.pub { max-width: 560px; margin: 0 auto; padding: 22px 18px 80px; }
.pub-h { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.pub-h .mk { width: 44px; height: 44px; border-radius: 13px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-family: var(--fd); font-size: 18px; }
.pub-h b { display: block; font-family: var(--fd); font-weight: 400; font-size: 1.2rem; }
.pub-h small { color: var(--ink-3); font-size: 12.5px; }
.pub h1 { font-size: clamp(2rem, 7vw, 2.8rem); margin-bottom: 8px; }
.pub .lead { color: var(--ink-2); margin: 0 0 22px; font-size: 15px; }
.step { margin-top: 22px; }
.step > .lbl { display: block; margin-bottom: 10px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); margin-bottom: 8px; transition: border-color .3s, background .3s; }
.opt:hover { border-color: var(--ink-3); }
.opt[aria-pressed="true"] { border-color: var(--acc); background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc); }
.opt .grow { flex: 1; }
.opt small { display: block; color: var(--ink-3); font-size: 12.5px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); font-family: var(--fd); font-size: 14px; }
.slot[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.slot:disabled { opacity: .35; text-decoration: line-through; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.dayb { flex: none; width: 62px; padding: 10px 0; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); text-align: center; }
.dayb small { display: block; font-family: var(--fd); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.dayb b { display: block; font-family: var(--fd); font-weight: 300; font-size: 1.5rem; }
.dayb[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dayb[aria-pressed="true"] small { color: var(--bg); opacity: .7; }
.pub-foot { margin-top: 40px; text-align: center; font-size: 11.5px; color: var(--ink-3); }
.pub-foot a { color: var(--ink-3); }
.sticky-cta { position: sticky; bottom: 14px; margin-top: 22px; }
.sticky-cta .btn { width: 100%; box-shadow: var(--shadow); }
.ok-big { text-align: center; padding: 30px 10px; }
.ok-big .ic { width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-size: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .45s var(--ease); }
  .side-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .top { padding: 12px 16px; }
  .top h1 { font-size: 1.3rem; }
  .top-menu { display: inline-grid; place-items: center; }
  .top .hide-m { display: none; }
  .demo-bar { margin: 12px 16px 0; }
  .view { padding: 18px 16px 100px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 9px 0 8px; font-size: 10.5px; color: var(--ink-3); text-decoration: none; }
  .tabbar a svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .toast { bottom: 84px; }
  .search-inp { max-width: none; flex: 1; }
}
@media (max-width: 560px) { .g4 { grid-template-columns: 1fr 1fr; } .f2 { grid-template-columns: 1fr; } .modal { padding: 20px 18px; } .kpi b { font-size: 1.7rem; } }
@media print { .side, .top, .tabbar, .demo-bar, [data-sc-tema] { display: none !important; } .app { display: block; } .view { padding: 0; } }
