/* =========================================================
   sistema.css — Showcase interactivo, módulos, beneficios
   ========================================================= */

/* ============= APP WINDOW (demo visual) ============= */
.app-showcase { padding: clamp(1.5rem, 5vh, 3rem) var(--container-pad) clamp(2rem, 6vh, 4rem); }
.demo-lead {
  max-width: 62ch;
  margin: 0 auto 1.1rem;
  text-align: center;
  color: var(--c-text-soft);
  font-size: .95rem;
}
.demo-lead strong { color: #fff; }

.app-window {
  max-width: 1040px;
  margin-inline: auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(159, 208, 255, .28);
  background: #f4f7fb;
  color: #16324a;
  box-shadow: var(--sh-glow), 0 30px 80px rgba(0, 0, 0, .45);
  position: relative;
}
.app-bar {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .75rem 1rem;
  background: #0d1a29;
  border-bottom: 1px solid rgba(159, 208, 255, .1);
}
.app-bar span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #37475c;
}
.app-bar span:nth-child(1) { background: #ff5f57; }
.app-bar span:nth-child(2) { background: #febc2e; }
.app-bar span:nth-child(3) { background: #28c840; }
.app-bar em {
  font-style: normal;
  margin-left: auto;
  font-size: .74rem;
  color: var(--c-text-mute);
  letter-spacing: .04em;
  font-family: var(--ff-mono);
}
.app-bar .demo-live {
  margin-left: .65rem;
  padding: .12rem .45rem;
  border-radius: 999px;
  background: rgba(125, 206, 160, .15);
  color: var(--c-ok);
  font-style: normal;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.app-body {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 560px;
}
.app-side {
  background: linear-gradient(180deg, #102f4c, #0c2238);
  padding: 1rem .75rem .85rem;
  border-right: 1px solid rgba(159, 208, 255, .08);
  display: flex;
  flex-direction: column;
  color: #d5e4f2;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
  padding: 0 .25rem;
}
.app-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c-primary-3), var(--c-primary));
  color: #fff;
  font-weight: 900;
  flex-shrink: 0;
}
.app-brand-name { display: flex; flex-direction: column; line-height: 1; }
.app-brand-name strong { font-size: .78rem; letter-spacing: .04em; color: #fff; }
.app-brand-name em {
  font-style: normal;
  font-size: .62rem;
  letter-spacing: .22em;
  color: var(--c-accent);
  font-weight: 800;
  margin-top: 3px;
}
.app-nav li {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .62rem .7rem;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: #b7c9dc;
  cursor: pointer;
  margin-bottom: .2rem;
  transition: background .2s, color .2s;
}
.app-nav li svg { width: 16px; height: 16px; flex-shrink: 0; }
.app-nav li:hover { background: rgba(159, 208, 255, .08); color: #fff; }
.app-nav li.activo {
  background: rgba(245, 196, 81, .14);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--c-accent);
}
.app-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(159, 208, 255, .1);
}
.app-user > span {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--c-accent);
  color: #1a1406;
  font-weight: 900;
  font-size: .8rem;
}
.app-user strong, .app-user small { display: block; }
.app-user strong { font-size: .72rem; color: #fff; font-weight: 700; }
.app-user small { color: var(--c-accent); font-size: .62rem; letter-spacing: .08em; }

.app-main {
  padding: 1rem 1.1rem 1.15rem;
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(29, 110, 171, .08), transparent 70%),
    #f4f7fb;
  max-height: 640px;
  overflow: auto;
}
.app-panel { display: none; animation: fadeUp .35s var(--ease); }
.app-panel.activo { display: block; }
.app-window h3, .app-window h4 { color: #102f4c; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.app-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.app-head > :last-child { margin-left: auto; }
.app-head h3 { font-size: 1.15rem; color: #0d5e9c; letter-spacing: -.02em; }
.app-pill, .app-select {
  margin-left: auto;
  padding: .35rem .7rem;
  border-radius: var(--r-pill);
  background: #e7f3ff;
  color: #0d5e9c;
  font-size: .75rem;
  font-weight: 800;
  border: 1px solid #c5dff3;
}
.app-select { cursor: pointer; }

/* Stats dashboard */
.app-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
  margin-bottom: 1rem;
}
.app-stats div {
  padding: .8rem .9rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e1ebf4;
  box-shadow: 0 8px 18px rgba(16, 47, 76, .05);
  position: relative;
}
.app-stats span {
  display: block;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #6d849b;
  margin-bottom: .25rem;
}
.app-stats strong { font-size: 1.45rem; color: #102f4c; display: block; }
.app-stats em {
  font-style: normal;
  font-size: .68rem;
  font-weight: 800;
  position: absolute;
  top: .8rem; right: .9rem;
}
.app-stats em.up { color: var(--c-ok); }
.app-stats em.ok { color: var(--c-accent); }

/* Chart */
.app-chart {
  display: flex;
  align-items: flex-end;
  gap: .4rem;
  height: 120px;
  padding: .7rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e1ebf4;
}
.app-chart span {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 4px;
  background: linear-gradient(to top, var(--c-primary-3), var(--c-accent-2));
  animation: growBar 1s ease-out both;
}
.app-chart span:nth-child(1) { animation-delay: .05s; }
.app-chart span:nth-child(2) { animation-delay: .1s; }
.app-chart span:nth-child(3) { animation-delay: .15s; }
.app-chart span:nth-child(4) { animation-delay: .2s; }
.app-chart span:nth-child(5) { animation-delay: .25s; }
.app-chart span:nth-child(6) { animation-delay: .3s; }
.app-chart span:nth-child(7) { animation-delay: .35s; }
.app-chart span:nth-child(8) { animation-delay: .4s; }
@keyframes growBar {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); }
}

/* Listas */
.app-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.app-list li, .ops-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .8rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e1ebf4;
  font-size: .82rem;
  flex-wrap: wrap;
}
.app-list li strong, .ops-row strong { color: #102f4c; }
.app-list li small, .ops-row small { color: #6d849b; margin-left: auto; font-size: .72rem; }
.app-list li:has(.ops-row) { padding: 0; background: transparent; border: 0; }
.app-list li em, .ops-row em { color: #3d5870; font-style: normal; }
.app-list button.ops-row, button.ops-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color .2s, transform .2s;
}
button.ops-row:hover { border-color: #9fc4e4; transform: translateY(-1px); }

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.ok   { background: var(--c-ok); box-shadow: 0 0 8px var(--c-ok); }
.dot.warn { background: var(--c-warn); box-shadow: 0 0 8px var(--c-warn); }

.badge {
  font-size: .62rem;
  padding: .15rem .5rem;
  border-radius: var(--r-pill);
  font-weight: 800;
  letter-spacing: .06em;
  flex-shrink: 0;
}
.badge.ok   { background: rgba(125,206,160,.15); color: var(--c-ok); }
.badge.warn { background: rgba(245,196,81,.15);  color: var(--c-warn); }
.badge.mute { background: rgba(142,160,181,.15); color: var(--c-text-mute); }

/* Cotización */
.app-cot { display: flex; flex-direction: column; gap: .5rem; }
.app-cot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem .85rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e1ebf4;
  font-size: .85rem;
}
.app-cot-row span { color: #6d849b; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.app-cot-row strong { color: #102f4c; font-weight: 700; }
.app-cot-row.total {
  background: #fff8e8;
  border-color: rgba(245, 196, 81, .55);
}
.app-cot-row.total strong { color: #8a6410; font-size: 1.05rem; }

.demo-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: .7rem; margin-top: .7rem; }
.demo-card {
  background: #fff;
  border: 1px solid #e1ebf4;
  border-radius: 12px;
  padding: .75rem .8rem .85rem;
}
.demo-card h4 {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5d7590;
  margin-bottom: .65rem;
}
.demo-shortcuts { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }
.demo-btn {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: .52rem .8rem;
  font-weight: 800;
  font-size: .75rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s var(--ease), background .15s, border-color .15s;
}
.demo-btn:hover { transform: translateY(-1px); }
.demo-btn.gold { background: #f5c451; color: #1a1406; }
.demo-btn.navy { background: #133e63; color: #fff; }
.demo-btn.line { background: #fff; color: #133e63; border-color: #c5d6e6; }
.demo-btn.ok { background: #1f7a4d; color: #fff; }
.demo-subtabs, .demo-chips { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .75rem; }
.demo-subtabs button, .demo-chips button {
  border: 1px solid #d3e0eb;
  background: #fff;
  color: #133e63;
  border-radius: 999px;
  padding: .38rem .7rem;
  font-weight: 800;
  font-size: .72rem;
  cursor: pointer;
  font-family: inherit;
}
.demo-subtabs button.activo, .demo-chips button.activo {
  background: #133e63;
  color: #fff;
  border-color: #133e63;
}
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.demo-field { display: flex; flex-direction: column; gap: .28rem; min-width: 0; }
.demo-field.full { grid-column: 1 / -1; }
.demo-field span {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5d7590;
}

.app-window input, .app-window select, .app-window textarea {
  width: 100%;
  font: inherit;
  font-size: .84rem;
  color: #102f4c;
  background: #fff;
  border: 1px solid #c5d6e6;
  border-radius: 9px;
  padding: .55rem .7rem;
}
.app-window textarea { min-height: 68px; resize: vertical; }
.app-window input[readonly] { background: #f3f6f9; color: #5d7590; }
.app-window input:focus, .app-window select:focus, .app-window textarea:focus {
  outline: 2px solid #1d6eab;
  border-color: #1d6eab;
}
.biz-panel { display: none; }
.biz-panel.activo { display: block; }
.demo-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .75rem; }
.capsulas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.capsula {
  background: #fff;
  border: 1px solid #e1ebf4;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.capsula header {
  padding: .7rem .8rem;
  font-size: .78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #102f4c, #1d6eab);
}
.capsula .num {
  font-size: 1.8rem;
  font-weight: 900;
  color: #102f4c;
  padding: .7rem .8rem 0;
  letter-spacing: -.03em;
}
.capsula p { color: #6d849b; font-size: .72rem; padding: 0 .8rem .7rem; }
.capsula .demo-actions { padding: 0 .7rem .75rem; margin-top: auto; }
.ops-view { display: none; }
.ops-view.activo { display: block; }
.cat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.cat-card {
  text-align: left;
  background: #fff;
  border: 1px solid #e1ebf4;
  border-radius: 12px;
  padding: .85rem;
  cursor: pointer;
  font: inherit;
  color: #102f4c;
}
.cat-card strong { display: block; margin-bottom: .2rem; }
.cat-card small { color: #6d849b; }
.cat-card:hover { border-color: #9fc4e4; }
.mini-table { width: 100%; border-collapse: collapse; font-size: .78rem; background: #fff; border-radius: 10px; overflow: hidden; }
.mini-table th, .mini-table td { padding: .5rem .55rem; text-align: left; border-bottom: 1px solid #e7eef5; }
.mini-table th { color: #5d7590; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
.route-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .6rem;
  align-items: center;
  margin-bottom: .7rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e1ebf4;
}
.route-bar b { color: #102f4c; font-size: .82rem; }
.route-bar i {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #133e63, #f5c451);
  display: block;
}
.demo-toast {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%) translateY(8px);
  background: #102f4c;
  color: #fff;
  border-radius: 999px;
  padding: .55rem .9rem;
  font-size: .78rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 5;
  max-width: calc(100% - 32px);
  text-align: center;
}
.demo-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.reciente { cursor: pointer; }
.reciente:hover { border-color: #9fc4e4; }

/* ============= MÓDULOS ============= */
.modulos { padding: clamp(3rem, 8vh, 6rem) var(--container-pad); }
.modulos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.modulo {
  padding: 1.6rem 1.4rem;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: linear-gradient(160deg, rgba(16, 47, 76, .42), rgba(12, 18, 26, .68));
  transition: border-color .3s, box-shadow .3s;
  will-change: transform;
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}
.modulo:hover {
  border-color: rgba(159, 208, 255, .35);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .4);
}
.modulo-ico {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--c-primary-3), var(--c-primary));
  font-size: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 24px rgba(29, 110, 171, .35);
  transform: translateZ(20px);
}
.modulo h3 {
  font-size: 1.05rem;
  margin-bottom: .4rem;
  transform: translateZ(10px);
}
.modulo p {
  color: var(--c-text-soft);
  font-size: .9rem;
  line-height: 1.55;
  transform: translateZ(6px);
}
/* =========================================================
   NUEVA SECCIÓN: Capturas reales del sistema
   ========================================================= */

.capturas-reales {
  padding: clamp(3rem, 8vh, 6rem) var(--container-pad);
}

.capturas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  align-items: start;
}

.captura-card {
  margin: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: linear-gradient(160deg, rgba(16, 47, 76, .42), rgba(12, 18, 26, .68));
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  display: flex;
  flex-direction: column;
}

.captura-card:hover {
  transform: translateY(-6px);
  border-color: rgba(159, 208, 255, .35);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .45);
}

.captura-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10; /* Ajusta si tus capturas son 16:9 o 4:3 */
  background: #08121c;
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
}

.captura-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .6s var(--ease);
  display: block;
}

.captura-card:hover .captura-img {
  transform: scale(1.04);
}

/* Efecto de brillo sutil al pasar el mouse */
.captura-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(5, 7, 11, .6));
  pointer-events: none;
  opacity: .8;
  transition: opacity .35s;
}
.captura-card:hover .captura-img-wrap::after {
  opacity: .4;
}

.captura-card figcaption {
  padding: 1.1rem 1.2rem 1.3rem;
}

.captura-card figcaption h3 {
  font-size: 1.05rem;
  margin-bottom: .35rem;
  color: #fff;
  transform: none; /* Anula el tilt para que el texto se lea bien */
}

.captura-card figcaption p {
  color: var(--c-text-soft);
  font-size: .88rem;
  line-height: 1.55;
  transform: none;
}

/* Ajuste responsive fino para pantallas muy pequeñas */
@media (max-width: 480px) {
  .capturas-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   LIGHTBOX MODAL (Para Capturas reales)
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(5, 7, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}

.lightbox.activo {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.95);
  transition: transform .35s var(--ease-bounce);
}

.lightbox.activo .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(159, 208, 255, 0.2);
}

.lightbox-caption {
  margin-top: 1rem;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  background: rgba(16, 47, 76, 0.6);
  padding: 0.5rem 1.25rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-border);
  backdrop-filter: blur(4px);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.5rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  z-index: 10;
  line-height: 1;
}

.lightbox-close:hover {
  background: var(--c-accent);
  color: #1a1406;
  transform: rotate(90deg);
}

/* Cursor pointer en las capturas para indicar que son clickeables */
.captura-img-wrap {
  cursor: pointer;
}

/* Responsive para móviles */
@media (max-width: 720px) {
  .lightbox { padding: 1rem; }
  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 2rem;
  }
  .lightbox-caption { font-size: 0.85rem; }
}
/* ============= BENEFICIOS ============= */
.beneficios {
  padding: clamp(3rem, 8vh, 6rem) 0;
  background: linear-gradient(180deg, transparent, rgba(12, 18, 26, .55), transparent);
}
.beneficios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.beneficio {
  padding: 1.8rem 1.5rem;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: linear-gradient(160deg, rgba(16, 47, 76, .3), rgba(12, 18, 26, .6));
  transition: transform .3s var(--ease), border-color .3s;
}
.beneficio:hover {
  transform: translateY(-4px);
  border-color: rgba(159, 208, 255, .3);
}
.beneficio-num {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-accent);
  letter-spacing: -.03em;
  margin-bottom: .6rem;
  text-shadow: 0 0 20px rgba(245, 196, 81, .3);
}
.beneficio h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.beneficio p { color: var(--c-text-soft); font-size: .92rem; line-height: 1.6; }




@media (max-width: 820px) {
  .app-body { grid-template-columns: 1fr; min-height: 0; }
  .app-side {
    flex-direction: row;
    overflow-x: auto;
    padding: .65rem;
    border-right: 0;
    border-bottom: 1px solid rgba(159, 208, 255, .08);
    gap: .35rem;
    align-items: center;
  }
  .app-brand-name, .app-user { display: none; }
  .app-brand { margin: 0 .2rem 0 0; }
  .app-nav { display: flex; gap: .25rem; }
  .app-nav li { margin-bottom: 0; white-space: nowrap; }
  .app-main { max-height: none; }
  .app-stats, .demo-split, .demo-grid, .capsulas, .cat-cards { grid-template-columns: 1fr; }
  .app-stats div:nth-child(3) { grid-column: auto; }
}
