/* Pagina /sistemas: se carga despues de webs.css y reutiliza sus variables y componentes. */

.sis-nav { display: none; gap: .2rem; font-weight: 600; font-size: .94rem; }
.sis-nav a { position: relative; padding: .55rem .8rem; border-radius: 10px; color: var(--ink-2); }
.sis-nav a:hover { background: var(--bg-soft); }
.sis-nav a.is-active { color: var(--brand); }

.sis-hero { padding: clamp(2.5rem, 6vw, 5rem) 0; background: radial-gradient(900px 480px at 90% -10%, #ccfbf1, transparent 60%), radial-gradient(700px 400px at 0% 100%, var(--brand-soft), transparent 60%); }
.sis-hero__grid { display: grid; gap: 3rem; align-items: center; }
.sis-hero .eyebrow { background: #ccfbf1; color: #115e59; }
.sis-hero .hl { color: #0f766e; white-space: normal; }
.sis-hero .ticks { margin-top: 1.4rem; }

/* Pantallas dibujadas */
.scr { margin: 0; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; font-size: .85rem; }
.scr__bar { display: flex; align-items: center; gap: .35rem; padding: .6rem .9rem; background: #0f172a; color: #cbd5e1; font-weight: 600; font-size: .78rem; }
.scr__bar i { width: 9px; height: 9px; border-radius: 50%; background: #475569; }
.scr__bar i:first-child { background: #f87171; } .scr__bar i:nth-child(2) { background: #fbbf24; } .scr__bar i:nth-child(3) { background: #34d399; }
.scr__bar span { margin-left: .5rem; }
.scr__body { display: grid; gap: .9rem; padding: 1rem; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.kpis div { padding: .7rem; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
.kpis small { display: block; color: var(--muted); font-size: .72rem; }
.kpis b { display: block; font-size: 1.15rem; color: var(--ink); }
.kpis em { font-style: normal; font-size: .72rem; font-weight: 700; color: #0f766e; }
.kpis em.warn { color: #b45309; }
.chart { display: flex; align-items: flex-end; gap: .5rem; height: 110px; padding: .6rem; border-radius: 12px; background: linear-gradient(#f8fafc, #fff); border: 1px solid var(--line); }
.chart span { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(#14b8a6, #0f766e); }
.chart span:last-child { background: linear-gradient(#818cf8, var(--brand)); }
.rows { display: grid; gap: .35rem; }
.rows div { display: flex; justify-content: space-between; padding: .45rem .6rem; border-radius: 8px; background: var(--bg-soft); }
.rows b { color: var(--ink); }

.sis-grid { display: grid; gap: 1rem; }
.sis-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.sis-card > span { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: .8rem; border-radius: 12px; background: #f0fdfa; font-size: 1.4rem; }
.sis-card h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.sis-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.sis-card--idea { background: linear-gradient(135deg, #134e4a, #0f766e); border-color: transparent; color: #ccfbf1; }
.sis-card--idea h3 { color: #fff; }
.sis-card--idea p { color: #ccfbf1; }
.sis-card--idea > span { background: rgba(255, 255, 255, .15); }

.tag { display: inline-block; margin-bottom: .8rem; padding: .25rem .8rem; border-radius: 999px; background: #0f172a; color: #fff; font-weight: 700; font-size: .8rem; }
.case { display: grid; gap: 2rem; align-items: start; }
.case__shots { display: grid; gap: 1rem; }
.kan { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: .8rem; background: #f1f5f9; }
.kan h4 { display: flex; justify-content: space-between; margin: 0 0 .4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kan h4 em { font-style: normal; color: var(--ink); }
.kan p { margin: 0 0 .4rem; padding: .5rem; border-radius: 8px; background: #fff; border-left: 3px solid #94a3b8; font-size: .74rem; line-height: 1.35; color: var(--muted); }
.kan p b { display: block; color: var(--ink); }
.kan p.hot { border-color: #f59e0b; }
.kan p.ok { border-color: #16a34a; }
.scr--phone { justify-self: center; width: min(260px, 100%); padding: .6rem; border-radius: 32px; background: #0f172a; }
.ph { padding: 1.4rem 1rem 1rem; border-radius: 24px; background: #fff; }
.ph small { color: var(--muted); }
.ph > b { display: block; margin: .2rem 0 .9rem; font-size: 1.05rem; color: var(--ink); line-height: 1.25; }
.ph ol { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; }
.ph li { position: relative; padding-left: 1.6rem; color: #94a3b8; font-weight: 600; }
.ph li::before { content: ""; position: absolute; left: 0; top: .2rem; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid #cbd5e1; }
.ph li.d { color: var(--ink); }
.ph li.d::before { background: #16a34a; border-color: #16a34a; }
.ph li.c { color: #0f766e; }
.ph li.c::before { border-color: #0f766e; box-shadow: inset 0 0 0 3px #fff; background: #0f766e; }
.qr { display: flex; align-items: center; gap: .7rem; padding: .6rem; border-radius: 12px; background: var(--bg-soft); }
.qr span { width: 54px; height: 54px; flex: none; background: conic-gradient(#0f172a 25%, #fff 0 50%, #0f172a 0 75%, #fff 0) 0 0 / 18px 18px; border: 4px solid #0f172a; border-radius: 4px; }
.qr em { font-style: normal; font-size: .75rem; color: var(--muted); }
.case__list { display: grid; gap: 1.1rem; }
.case__list h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.case__list p { margin: 0; color: var(--muted); font-size: .97rem; }
.case__list .btn { justify-self: start; margin-top: .4rem; }

.steps--5 { counter-reset: paso; }
.plans--3 { max-width: 1100px; }
.plan__price--txt { font-size: 2rem; flex-wrap: wrap; }
.plan__price--txt span { margin-left: 0; flex-basis: 100%; margin-top: .4rem; }

@media (min-width: 640px) {
  .sis-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .sis-hero__grid { grid-template-columns: 1.1fr .9fr; }
  .sis-grid { grid-template-columns: repeat(3, 1fr); }
  .case { grid-template-columns: 1.15fr .85fr; }
  .case__shots { grid-template-columns: 1fr auto; align-items: center; }
  .steps--5 { grid-template-columns: repeat(5, 1fr); }
  .plans--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1080px) { .sis-nav { display: flex; } }

/* Menu secundario en celular (en escritorio esta en la cabecera) */
.sub-nav { position: sticky; top: 68px; z-index: 30; display: flex; gap: .4rem; overflow-x: auto; padding: .55rem 1rem; background: #fff; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.sub-nav::-webkit-scrollbar { display: none; }
.sub-nav a { flex: none; padding: .4rem .85rem; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); font-weight: 700; font-size: .88rem; }
.sub-nav a.is-on { background: var(--ink); color: #fff; }
@media (min-width: 1080px) { .sub-nav { display: none; } }

/* ---------- Maquetas de sistema por rubro (#rubros) ---------- */
.app-tabs { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1.2rem; scrollbar-width: thin; }
.app-tabs button { flex: none; display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: center; text-align: left; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.app-tabs button span { grid-row: span 2; font-size: 1.5rem; }
.app-tabs button b { font-size: .95rem; }
.app-tabs button small { color: var(--muted); font-size: .78rem; }
.app-tabs button:hover { border-color: #94a3b8; }
.app-tabs button.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.app-stage { position: relative; }

.app { --ink-a: #0f172a; --line-a: #e5e7eb; --bg-a: #f8fafc; --muted-a: #64748b; display: grid; min-height: 520px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg-a); box-shadow: var(--shadow-lg); font-size: .9rem; color: var(--ink-a); }
.app__side { display: none; flex-direction: column; gap: 1.2rem; padding: 1.1rem .9rem; background: #0f172a; color: #94a3b8; }
.app__brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800; }
.app__brand span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ac); color: #0f172a; }
.app__side nav { display: grid; gap: .2rem; }
.app__side nav span { padding: .5rem .7rem; border-radius: 9px; font-weight: 600; }
.app__side nav span.is-on { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 3px 0 0 var(--ac); }
.app__side-foot { margin-top: auto; font-size: .75rem; }
.app__main { display: flex; flex-direction: column; gap: .9rem; min-width: 0; padding: 1rem; }
.app__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.app__top small { display: block; color: var(--muted-a); font-size: .78rem; }
.app__top b { font-size: 1.25rem; }
.app__user { padding: .35rem .75rem; border-radius: 999px; background: #fff; border: 1px solid var(--line-a); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.app__kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; }
.app__kpis div { padding: .7rem .85rem; border-radius: 12px; background: #fff; border: 1px solid var(--line-a); }
.app__kpis small { display: block; color: var(--muted-a); font-size: .74rem; }
.app__kpis b { font-size: 1.15rem; }
.app__kpis b.warn { color: #d97706; }
.app__split { display: grid; gap: .9rem; align-items: start; }

.panel { display: grid; gap: .7rem; padding: 1rem; border-radius: 14px; background: #fff; border: 1px solid var(--line-a); }
.panel h4 { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0; font-size: 1.05rem; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.lines li { display: flex; justify-content: space-between; gap: .6rem; padding: .45rem .55rem; border-radius: 8px; background: var(--bg-a); }
.lines li.empty { justify-content: center; color: var(--muted-a); background: none; border: 1px dashed var(--line-a); text-align: center; }
.tot { display: flex; justify-content: space-between; align-items: baseline; padding-top: .6rem; border-top: 1px dashed var(--line-a); }
.tot b { font-size: 1.4rem; }
.panel__btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.muted { color: var(--muted-a); font-size: .78rem; }
.pill { display: inline-block; padding: .12rem .55rem; border-radius: 999px; background: var(--ac-soft); color: var(--ink-a); font-size: .72rem; font-weight: 700; font-style: normal; white-space: nowrap; }
.pill--ok { background: #dcfce7; color: #166534; }
.pill--warn { background: #fef3c7; color: #92400e; }
.pill--bad { background: #fee2e2; color: #991b1b; }
.ab { padding: .65rem .9rem; border: 0; border-radius: 10px; background: var(--ac); color: #fff; font: 700 .88rem var(--font); cursor: pointer; transition: filter .15s; }
.ab:hover { filter: brightness(1.08); }
.ab--ghost { background: #fff; color: var(--ink-a); box-shadow: inset 0 0 0 1px var(--line-a); }
.ab--block { width: 100%; }
.ab--sm { padding: .4rem .7rem; font-size: .78rem; }

/* Restaurante */
.mesas { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.mesa { display: grid; gap: .1rem; padding: .8rem; border-radius: 14px; border: 2px solid transparent; background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.mesa b { font-size: 1rem; }
.mesa small { font-weight: 600; }
.mesa em { font-style: normal; font-weight: 800; }
.mesa--libre small { color: #16a34a; }
.mesa--ocupada { background: var(--ac-soft); }
.mesa--ocupada small { color: var(--ac); }
.mesa--cuenta { background: #fef3c7; }
.mesa--cuenta small { color: #b45309; }
.mesa.is-sel { border-color: var(--ac); }

/* Bodega */
.search { display: flex; align-items: center; gap: .5rem; padding: .65rem .8rem; border-radius: 10px; background: #fff; border: 1px solid var(--line-a); color: var(--muted-a); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; background: transparent; color: inherit; }
.prods { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; margin-top: .6rem; }
.prod { display: grid; gap: .1rem; padding: .7rem; border-radius: 12px; border: 1px solid var(--line-a); background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, transform .1s; }
.prod:hover { border-color: var(--ac); }
.prod:active { transform: scale(.98); }
.prod span { font-size: 1.4rem; }
.prod b { font-size: .84rem; line-height: 1.25; }
.prod em { font-style: normal; font-weight: 800; color: var(--ac); }
.prod small { color: var(--muted-a); font-size: .72rem; }
.prod small.low { color: #dc2626; font-weight: 700; }
.qty { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.qty button { width: 22px; height: 22px; border: 0; border-radius: 6px; background: var(--ac-soft); color: var(--ac); font-weight: 800; cursor: pointer; }
.cart li { align-items: center; font-size: .82rem; }
.cart li > span:first-child { flex: 1; }
.pays { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.pays button { padding: .45rem .3rem; border-radius: 9px; border: 1px solid var(--line-a); background: #fff; font: 600 .78rem var(--font); cursor: pointer; }
.pays button.is-on { border-color: var(--ac); background: var(--ac-soft); color: #166534; }

/* Clinica */
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .8rem; font-weight: 600; }
.legend .da::before, .legend .db::before { content: ""; display: inline-block; width: .7rem; height: .7rem; margin-right: .35rem; border-radius: 3px; background: #0e7490; vertical-align: -1px; }
.legend .db::before { background: #7c3aed; }
.agenda { display: grid; grid-template-columns: 3rem repeat(5, minmax(84px, 1fr)); grid-auto-rows: minmax(54px, auto); gap: 3px; overflow-x: auto; padding: 3px; border-radius: 12px; background: var(--line-a); }
.ag-h { grid-row: 1; display: grid; place-items: center; padding: .4rem; background: #fff; font-weight: 700; font-size: .78rem; }
.ag-t { display: grid; place-items: start center; padding-top: .3rem; background: #fff; color: var(--muted-a); font-size: .72rem; }
.ag-c { background: #fff; }
.cita { position: relative; z-index: 1; margin: 2px; display: grid; align-content: start; gap: .05rem; padding: .35rem .45rem; border: 0; border-radius: 8px; background: #cffafe; border-left: 3px solid #0e7490; text-align: left; font: inherit; font-size: .74rem; color: var(--ink-a); cursor: pointer; }
.cita small { color: var(--muted-a); font-size: .68rem; }
.cita--b { background: #ede9fe; border-color: #7c3aed; }
.cita.is-sel { outline: 2px solid var(--ink-a); }
.cita.is-ok::after { content: "✓"; position: absolute; top: .25rem; right: .35rem; color: #16a34a; font-weight: 800; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem .8rem; margin: 0; font-size: .85rem; }
.dl dt { color: var(--muted-a); }
.dl dd { margin: 0; font-weight: 600; }

/* Gimnasio (tema oscuro) */
.app--dark { --ink-a: #e5e7eb; --line-a: #27272a; --bg-a: #0b0b0c; --muted-a: #a1a1aa; }
.app--dark .app__side { background: #000; }
.app--dark .app__kpis div, .app--dark .app__user, .app--dark .search, .app--dark .table { background: #141416; }
.app--dark .ab { color: #0b0b0c; }
.app--dark .pill--ok { background: #14532d; color: #bbf7d0; }
.app--dark .pill--warn { background: #713f12; color: #fde68a; }
.app--dark .pill--bad { background: #7f1d1d; color: #fecaca; }
.table { border: 1px solid var(--line-a); border-radius: 12px; overflow: hidden; background: #fff; }
.tr { display: grid; grid-template-columns: 1fr auto; gap: .3rem .8rem; align-items: center; padding: .65rem .85rem; border-top: 1px solid var(--line-a); }
.tr > span:nth-child(2), .tr > span:nth-child(3) { display: none; }
.tr > span:nth-child(4) { grid-column: 2; grid-row: 1; }
.tr > span:nth-child(5) { grid-column: 1 / -1; }
.tr b { display: block; }
.tr small { color: var(--muted-a); font-size: .72rem; }
.tr.th { display: none; }
.tr.is-in { background: rgba(163, 230, 53, .1); }
.tr.is-bad { background: rgba(220, 38, 38, .12); }

/* Hostal */
.cal { display: grid; grid-template-columns: 6.5rem repeat(var(--dias), minmax(58px, 1fr)); gap: 3px; overflow-x: auto; padding: 3px; border-radius: 12px; background: var(--line-a); }
.cal__h, .cal__r { display: grid; align-items: center; padding: .45rem .5rem; background: #fff; font-size: .74rem; font-weight: 700; }
.cal__h { text-align: center; }
.cal__c { min-height: 46px; border: 0; background: #fff; font: 700 .7rem var(--font); color: #fff; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 .3rem; }
.cal__c:hover { background: var(--ac-soft); }
.cal__c.is-res { background: var(--ac); }
.cal__c.is-new { background: #b45309; }

/* Taller */
.ots { display: grid; gap: .7rem; }
.ot { display: grid; gap: .45rem; padding: .9rem; border-radius: 14px; background: #fff; border: 1px solid var(--line-a); }
.ot__head { display: flex; justify-content: space-between; align-items: center; }
.ot h5 { margin: 0; font-size: 1rem; }
.ot p { margin: 0; color: var(--muted-a); font-size: .8rem; }
.ot__steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; margin: .2rem 0; padding: 0; }
.ot__steps li { padding-top: .45rem; border-top: 4px solid var(--line-a); color: var(--muted-a); font-size: .66rem; font-weight: 700; }
.ot__steps li.d { border-color: var(--ac); color: var(--ink-a); }
.ot__steps li.c { border-color: #f59e0b; color: #b45309; }
.ot .ab { justify-self: start; }

.app-toast { position: absolute; left: 50%; bottom: 1rem; z-index: 5; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); padding: .7rem 1rem; border-radius: 12px; background: #0f172a; color: #fff; font-weight: 600; font-size: .88rem; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .5); animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (min-width: 700px) {
  .mesas { grid-template-columns: repeat(4, 1fr); }
  .prods { grid-template-columns: repeat(4, 1fr); }
  .tr { grid-template-columns: 1.6fr .8fr .7fr .9fr auto; }
  .tr > span:nth-child(2), .tr > span:nth-child(3) { display: block; }
  .tr > span:nth-child(4), .tr > span:nth-child(5) { grid-column: auto; grid-row: auto; }
  .tr.th { display: grid; background: var(--bg-a); color: var(--muted-a); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-top: 0; }
  .ots { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .app { grid-template-columns: 190px 1fr; }
  .app__side { display: flex; }
  .app__main { padding: 1.3rem 1.5rem; }
  .app__split { grid-template-columns: 1fr 300px; }
  .app__split--agenda { grid-template-columns: 1fr 260px; }
  .app-tabs { justify-content: center; flex-wrap: wrap; overflow: visible; }
}
