/* ============================================================
   aeBun Business — Manuales interactivos
   Estilos compartidos: biblioteca (índice) + lector de manual
   ============================================================ */

:root {
  --aebun-blue: #00a7f6;
  --aebun-blue-dark: #0086c7;
  --aebun-blue-soft: #e6f7ff;
  --ink: #10233a;
  --ink-soft: #5b6b7c;
  --paper: #ffffff;
  --bg: #eef3f8;
  --line: #e2e9f1;
  --ok: #1f9d55;
  --warn: #d9822b;
  --star: #f5b301;
  --shadow-sm: 0 2px 6px rgba(16, 35, 58, .08);
  --shadow-md: 0 8px 24px rgba(16, 35, 58, .12);
  --shadow-lg: 0 18px 50px rgba(16, 35, 58, .18);
  --radius: 16px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Roboto', system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--aebun-blue-dark); }

/* ---------- Encabezado de marca ---------- */
.brandbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  background: linear-gradient(120deg, var(--aebun-blue), var(--aebun-blue-dark));
  color: #fff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brandbar .logo {
  width: 42px; height: 42px;
  background: #fff; border-radius: 12px;
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
  overflow: hidden; flex: none;
}
.brandbar .logo img { width: 30px; height: auto; }
.brandbar .titles { line-height: 1.2; }
.brandbar .titles b { font-size: 1.05rem; letter-spacing: .3px; }
.brandbar .titles span { display: block; font-size: .78rem; opacity: .85; }
.brandbar .spacer { flex: 1; }
.brandbar .back {
  color: #fff; text-decoration: none; font-weight: 500; font-size: .9rem;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  background: rgba(255,255,255,.15); transition: background .2s;
}
.brandbar .back:hover { background: rgba(255,255,255,.28); }

/* ============================================================
   ÍNDICE — formato biblioteca / libros
   ============================================================ */
.library {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.library .hero {
  text-align: center;
  margin-bottom: 48px;
}
.library .hero .kicker {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--aebun-blue-dark);
  background: var(--aebun-blue-soft);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
.library .hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: -.5px;
}
.library .hero p {
  max-width: 620px; margin: 0 auto;
  color: var(--ink-soft); font-size: 1.08rem;
}

.shelf-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  margin: 42px 0 20px;
}
.shelf-title::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
}

/* Un "libro" del estante */
.book {
  position: relative;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease;
}
.book:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.book.locked { opacity: .72; }
.book.locked:hover { transform: none; box-shadow: var(--shadow-sm); }

.book .cover {
  position: relative;
  aspect-ratio: 3 / 2;
  padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
  background: linear-gradient(135deg, var(--c1, var(--aebun-blue)), var(--c2, var(--aebun-blue-dark)));
}
/* lomo del libro */
.book .cover::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
  background: rgba(0,0,0,.18);
}
.book .cover .num {
  font-family: var(--serif);
  font-size: 2.6rem; font-weight: 600; line-height: 1;
  opacity: .35;
}
.book .cover .ico { font-size: 1.7rem; }
.book .cover h3 {
  margin: 0; font-size: 1.12rem; font-weight: 700; line-height: 1.25;
}
.book .meta {
  padding: 14px 18px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.book .meta p { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.book .meta .row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: .74rem;
}
.badge.ready { background: #e4f7ec; color: var(--ok); }
.badge.soon { background: #f1f4f8; color: var(--ink-soft); }
.badge.star { background: #fff5d6; color: #a5780a; }
.book .cover .corner {
  position: absolute; top: 14px; right: 14px;
}

/* ============================================================
   LECTOR DE MANUAL
   ============================================================ */
.reader {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 90px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
}

/* Portada del manual */
.manual-hero {
  grid-column: 1 / -1;
  margin: 34px 0 10px;
  padding: 34px 36px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--c1, var(--aebun-blue)), var(--c2, var(--aebun-blue-dark)));
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.manual-hero .num {
  position: absolute; right: 24px; top: -14px;
  font-family: var(--serif); font-size: 8rem; font-weight: 600;
  opacity: .16; line-height: 1;
}
.manual-hero .kicker {
  font-size: .78rem; letter-spacing: 2px; text-transform: uppercase;
  opacity: .85; font-weight: 700;
}
.manual-hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 8px 0 10px; max-width: 80%;
}
.manual-hero p { margin: 0; max-width: 640px; opacity: .92; }
.manual-hero .facts {
  display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px;
  font-size: .86rem;
}
.manual-hero .facts span { display: inline-flex; align-items: center; gap: 8px; }

/* Índice lateral (tabla de contenidos) */
.toc {
  position: sticky; top: 92px; align-self: start;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.toc h4 {
  margin: 0 0 12px; font-size: .78rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-soft);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 10px; border-radius: 10px;
  text-decoration: none; color: var(--ink); font-size: .9rem;
  transition: background .15s;
}
.toc a::before {
  content: counter(toc);
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); color: var(--ink-soft);
  display: grid; place-items: center; font-size: .74rem; font-weight: 700;
}
.toc a:hover { background: var(--aebun-blue-soft); }
.toc a.active { background: var(--aebun-blue-soft); color: var(--aebun-blue-dark); font-weight: 600; }
.toc a.active::before { background: var(--aebun-blue); color: #fff; }
.toc a.done::before { content: "\2713"; background: var(--ok); color: #fff; }

/* Barra de progreso */
.progress-wrap { margin-top: 16px; }
.progress-wrap .bar {
  height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden;
}
.progress-wrap .bar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--aebun-blue), var(--ok));
  transition: width .35s ease;
}
.progress-wrap .label { font-size: .78rem; color: var(--ink-soft); margin-top: 8px; }

/* Columna de pasos */
.steps { min-width: 0; }

.paso {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
  overflow: hidden;
  scroll-margin-top: 90px;
}
.paso .paso-head {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.paso .paso-head .n {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--aebun-blue-soft); color: var(--aebun-blue-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 1.05rem;
}
.paso .paso-head h2 { margin: 0; font-size: 1.2rem; }
.paso .paso-head .chk {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--ink-soft); cursor: pointer;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; transition: all .15s; user-select: none;
}
.paso .paso-head .chk:hover { border-color: var(--aebun-blue); color: var(--aebun-blue-dark); }
.paso.completed .paso-head .chk { background: var(--ok); border-color: var(--ok); color: #fff; }
.paso.completed .paso-head .n { background: var(--ok); color: #fff; }

.paso .paso-body { padding: 22px 24px 26px; }

/* Bloque de pasos "cómo hacerlo" */
.pantalla h5 {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 12px;
}
.pantalla ol { margin: 0; padding-left: 0; list-style: none; counter-reset: paso-sub; }
.pantalla ol li {
  counter-increment: paso-sub;
  position: relative; padding: 8px 0 8px 40px; border-bottom: 1px dashed var(--line);
}
.pantalla ol li:last-child { border-bottom: none; }
.pantalla ol li::before {
  content: counter(paso-sub);
  position: absolute; left: 0; top: 8px;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
kbd {
  background: #fff; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 8px; font-family: var(--sans);
  font-size: .85rem; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.field {
  display: inline-block; background: var(--aebun-blue-soft); color: var(--aebun-blue-dark);
  border-radius: 6px; padding: 1px 8px; font-weight: 600; font-size: .9em;
}

/* Nota / tip */
.nota {
  display: flex; gap: 12px;
  background: #fffaf0; border: 1px solid #f5e2c0; border-radius: 12px;
  padding: 14px 16px; margin-top: 18px; font-size: .92rem;
}
.nota .i { color: var(--warn); font-size: 1.1rem; flex: none; }
.nota.tip { background: #eefaf3; border-color: #c8ecd6; }
.nota.tip .i { color: var(--ok); }
.nota b { color: var(--ink); }

/* ---------- Texto explicativo del manual ---------- */
.texto { margin: 0 0 18px; font-size: 1.02rem; }
.texto + .texto { margin-top: -6px; }

/* ============================================================
   SIMULACIÓN de las pantallas reales de aeBun (mockups)
   ============================================================ */
.mock { margin: 18px 0 6px; }
.mock-frame {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-md); background: #fff;
}
/* Barra de navegador simulada */
.mock-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: #f1f4f8; border-bottom: 1px solid var(--line);
}
.mock-bar .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.mock-bar .dot.r { background: #ff5f57; }
.mock-bar .dot.y { background: #febc2e; }
.mock-bar .dot.g { background: #28c840; }
.mock-bar .addr {
  flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 12px; font-size: .78rem; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mock-bar .addr i { color: var(--ok); }

/* Pantalla azul de aeBun (login / registro / verificación) */
.aebun-screen {
  background: var(--aebun-blue);
  padding: 30px 20px 34px; text-align: center; color: #fff;
}
.aebun-screen .a-logo {
  background: #fff; width: 72px; height: 72px; border-radius: 18px;
  margin: 0 auto 18px; display: grid; place-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,.15);
}
.aebun-screen .a-logo img { width: 44px; height: auto; }
.aebun-screen h3 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 700; color: #fff; }
.aebun-screen .sub { margin: 0 0 20px; font-size: .9rem; opacity: .85; }
.aebun-screen .a-field {
  background: #fff; color: #8a97a5; text-align: left; border-radius: 9px;
  padding: 12px 14px; margin: 0 auto 12px; max-width: 320px; font-size: .9rem;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.aebun-screen .a-field.filled { color: var(--ink); font-weight: 500; }
.aebun-screen .a-field .eye { color: #c2cad3; }
.aebun-screen .a-check {
  max-width: 320px; margin: 0 auto 10px; text-align: left; font-size: .8rem;
  display: flex; gap: 9px; align-items: flex-start; opacity: .96;
}
.aebun-screen .a-check .box {
  width: 15px; height: 15px; border-radius: 4px; background: #fff; flex: none; margin-top: 2px;
  display: grid; place-items: center; color: var(--aebun-blue); font-size: 10px;
}
.aebun-screen .a-btn {
  background: #000; color: #fff; border-radius: 9px; padding: 12px;
  max-width: 320px; margin: 16px auto 0; font-weight: 700; font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,.15);
}
.aebun-screen .a-links { margin-top: 16px; font-size: .82rem; opacity: .92; line-height: 1.9; }
.aebun-screen .a-links a { color: #fff; text-decoration: underline; }
.aebun-screen .a-note {
  max-width: 320px; margin: 0 auto 16px; background: rgba(255,255,255,.16);
  border-radius: 9px; padding: 10px 12px; font-size: .82rem;
}

/* Resaltar el elemento clave del paso */
.aebun-screen .hl {
  outline: 3px solid #ffd54a; outline-offset: 3px;
  border-radius: 10px; box-shadow: 0 0 0 6px rgba(255,213,74,.25);
}

.mock-caption {
  text-align: center; font-size: .8rem; color: var(--ink-soft);
  margin-top: 10px; font-style: italic;
}

/* Etiqueta sobre un campo (onboarding) */
.aebun-screen .a-label {
  display: block; text-align: left; max-width: 320px; margin: 0 auto 5px;
  font-size: .78rem; font-weight: 500; opacity: .92;
}
.aebun-screen .a-field.area { min-height: 54px; align-items: flex-start; }

/* Simulación de la pantalla "Elige tu plan" (fondo claro con tarjetas) */
.plan-screen { background: #f5f7fa; padding: 28px 18px 30px; text-align: center; color: #1a2230; }
.plan-screen .crown {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 12px;
  background: linear-gradient(135deg, #01a7f6, #0176c4); color: #fff;
  display: grid; place-items: center; font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(1,167,246,.35);
}
.plan-screen h3 { color: #1a2230; margin: 0 0 4px; font-size: 1.35rem; font-weight: 800; }
.plan-screen .psub { color: #6b7280; font-size: .86rem; margin: 0 0 18px; }
.p-toggle {
  display: inline-flex; background: #eef2f7; border-radius: 999px; padding: 5px;
  margin: 0 auto 20px; box-shadow: inset 0 1px 3px rgba(0,0,0,.06);
}
.p-toggle span {
  padding: .5rem 1.35rem; border-radius: 999px; font-weight: 700; font-size: .85rem;
  color: #6b7280; display: inline-flex; align-items: center; gap: 5px;
}
.p-toggle span.on { background: #fff; color: #0176c4; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.p-toggle .save { background: #28a745; color: #fff; font-size: .6rem; font-weight: 800; padding: .1rem .4rem; border-radius: 999px; }
.p-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; max-width: 540px; margin: 0 auto;
}
.p-card {
  background: #fff; border: 1px solid #eef2f5; border-radius: 14px;
  padding: 18px 14px 16px; text-align: left; position: relative;
  box-shadow: 0 4px 14px rgba(20,30,50,.05);
}
.p-card.rec { border: 2px solid #01a7f6; background: linear-gradient(180deg, #f5fbff, #fff); }
.p-card .rec-tag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: #01a7f6; color: #fff; font-size: .6rem; font-weight: 700;
  padding: .2rem .65rem; border-radius: 999px; white-space: nowrap;
}
.p-card .pname { font-weight: 800; font-size: .95rem; }
.p-card .pprice { font-weight: 800; font-size: 1.55rem; color: #0176c4; line-height: 1.1; margin-top: 3px; }
.p-card .pprice .cy { font-size: .68rem; color: #8a929c; }
.p-card .pper { color: #8a929c; font-size: .72rem; margin-bottom: 8px; }
.p-card ul { list-style: none; margin: 10px 0 12px; padding: 0; }
.p-card li { font-size: .76rem; display: flex; gap: 6px; align-items: center; padding: 2px 0; }
.p-card li i { color: #28a745; width: 14px; }
.p-card .pbtn {
  background: #01a7f6; color: #fff; border-radius: 8px; padding: .55rem;
  text-align: center; font-weight: 700; font-size: .78rem;
}
.p-card .pbtn.free { background: #eef2f7; color: #0176c4; }

/* ============================================================
   MARCO DE LA APP: navbar azul + sidebar (como el panel real)
   ============================================================ */
.app { background: #f8f9fa; }
.app-nav {
  background: #00AEEF; height: 52px; display: flex; align-items: center;
  padding: 0 12px; gap: 12px;
}
.app-nav .logo-box {
  width: 34px; height: 34px; background: #fff; border-radius: 8px;
  display: grid; place-items: center; padding: 4px; flex: none;
}
.app-nav .logo-box img { width: 100%; height: 100%; object-fit: contain; }
.app-nav .biz {
  flex: 1; text-align: center; color: #fff; font-weight: 800; font-size: .9rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-nav .usr { display: flex; align-items: center; gap: 8px; flex: none; }
.app-nav .usr .av {
  width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #0176c4;
  display: grid; place-items: center; font-weight: 700; font-size: .7rem;
}
.app-nav .usr .um { line-height: 1.15; text-align: left; }
.app-nav .usr .um b { color: #fff; font-size: .72rem; display: block; }
.app-nav .usr .um span { color: #e0f7ff; font-size: .6rem; }

.app-body { display: flex; }
.app-side {
  width: 176px; flex: none; background: #f8f9fa; border-right: 1px solid #dee2e6;
  padding: 12px 10px;
}
.app-side .sb-biz {
  text-align: center; font-weight: 700; font-size: .88rem; color: #111;
  padding: 6px 0 14px;
}
.app-side .sl {
  display: flex; align-items: center; gap: 10px; padding: .48rem .6rem;
  border-radius: 8px; font-size: .8rem; font-weight: 500; color: #000; margin-bottom: 3px;
}
.app-side .sl i { width: 16px; text-align: center; color: #5b6b7c; font-size: .85rem; }
.app-side .sl.active { background: #01a7f6; color: #fff; font-weight: 600; }
.app-side .sl.active i { color: #fff; }
.app-side .sl.caret::after {
  content: "\f107"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  margin-left: auto; color: #9aa6b2; font-size: .7rem;
}
.app-side .sl.sub { padding-left: 2rem; font-size: .76rem; color: #333; }
.app-side .sl.sub.active { color: #fff; }
.app-main { flex: 1; min-width: 0; background: #f8f9fa; }
.app-main .panel-screen { background: #f8f9fa; }

@media (max-width: 540px) {
  .app-side { display: none; }
  .app-nav .usr .um { display: none; }
}

/* ============================================================
   Simulación del PANEL (agenda) y de los MODALES del sistema
   ============================================================ */
.panel-screen { background: #f4f6fa; padding: 20px; color: #1a2230; text-align: left; }
.panel-screen .ph {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.panel-screen .ph h4 { margin: 0; font-weight: 800; font-size: 1.15rem; color: #1a2230; }
.panel-screen .ph p { margin: 0; color: #8a929c; font-size: .8rem; }
.pill-btn {
  background: #fff; border: 1px solid #e2e9f1; border-radius: 8px;
  padding: .4rem .7rem; font-size: .8rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; color: #334;
}
.panel-screen .sec-t { font-weight: 700; font-size: .9rem; margin: 14px 0 10px; }
.spec-row { display: flex; gap: 18px; flex-wrap: wrap; }
.spec { text-align: center; font-size: .7rem; color: #8a929c; }
.spec .av {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 5px;
  background: #e6f2fb; display: grid; place-items: center; color: #01a7f6;
  font-size: 1.1rem; border: 2px solid transparent; overflow: hidden;
}
.spec .av img { width: 100%; height: 100%; object-fit: cover; }
.spec.on .av { border-color: #01a7f6; }
.spec.on { color: #0176c4; font-weight: 700; }
.view-toggle { display: inline-flex; background: #eef2f7; border-radius: 8px; padding: 3px; }
.view-toggle span {
  padding: .35rem .7rem; font-size: .75rem; font-weight: 700; border-radius: 6px;
  color: #6b7280; display: inline-flex; gap: 5px; align-items: center;
}
.view-toggle span.on { background: #fff; color: #0176c4; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.appt {
  background: #fff; border: 1px solid #eef2f5; border-left: 4px solid #01a7f6;
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.appt .t { font-weight: 800; color: #0176c4; font-size: .9rem; white-space: nowrap; }
.appt .who { font-size: .78rem; flex: 1; }
.appt .who b { display: block; color: #1a2230; }
.st { font-size: .66rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; }
.st.reservado { background: #fff4e0; color: #F59E0B; }
.st.completado { background: #e5edfb; color: #2563EB; }
.st.pagado { background: #efe6fb; color: #7C3AED; }

/* Modal simulado (estilo Bootstrap del panel) */
.modal-mock { background: #eef1f6; padding: 24px 16px; display: flex; justify-content: center; }
.md-card {
  background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(16,35,58,.22);
  width: 100%; max-width: 380px; padding: 18px 18px 20px; text-align: left;
}
.md-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.md-head .hi {
  width: 40px; height: 40px; border-radius: 12px; background: #e6f2fb; color: #01a7f6;
  display: grid; place-items: center; font-size: 1.05rem; flex: none;
}
.md-head h4 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #1a2230; }
.md-head .sub { font-size: .74rem; color: #8a929c; }
.md-head .x { margin-left: auto; color: #c2cad3; align-self: flex-start; }
.md-lbl { font-size: .72rem; font-weight: 700; color: #1a2230; display: block; margin: 12px 0 4px; }
.md-inp {
  background: #fff; border: 1px solid #dfe5ec; border-radius: 8px;
  padding: .55rem .7rem; font-size: .82rem; color: #1a2230;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.md-inp.ph { color: #9aa6b2; }
.md-inp.sel::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #9aa6b2; font-size: .62rem; }
.md-row { display: flex; gap: 8px; }
.md-row > div { flex: 1; min-width: 0; }
.md-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.md-chip {
  border: 1px solid #e2e9f1; border-radius: 999px; padding: .3rem .65rem;
  font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; color: #334;
}
.md-chip .d { width: 8px; height: 8px; border-radius: 50%; }
.md-chip.on { background: #fafcff; box-shadow: 0 0 0 2px rgba(1,167,246,.25); }
.md-info { background: #e6f2fb; color: #0176c4; border-radius: 8px; padding: .5rem .7rem; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
.md-check { display: flex; gap: 8px; align-items: center; font-size: .74rem; color: #8a929c; margin-top: 8px; }
.md-check .b { width: 15px; height: 15px; border-radius: 4px; background: #01a7f6; color: #fff; display: grid; place-items: center; font-size: 9px; flex: none; }
.md-foot { display: flex; gap: 8px; margin-top: 16px; }
.md-btn { flex: 1; border-radius: 9px; padding: .6rem; text-align: center; font-weight: 700; font-size: .82rem; }
.md-btn.primary { background: #01a7f6; color: #fff; }
.md-btn.cancel { background: #f1f4f8; color: #334; }
.md-btn.danger { background: #fff1f1; border: 1px solid #ffc9c9; color: #d64545; }

/* ---- Métricas / dashboards (Clientes y Finanzas) ---- */
.panel-screen .sub-h {
  display: flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: #8a929c; margin: 14px 0 8px;
}
.panel-screen .sub-h i { color: #01a7f6; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
.stat {
  background: #fff; border: 1px solid #eef2f5; border-radius: 12px; padding: 13px 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.stat .si { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.05rem; flex: none; }
.stat .sv { font-size: 1.45rem; font-weight: 800; line-height: 1; color: #1a2230; }
.stat .sl { font-size: .74rem; color: #8a929c; margin-top: 2px; }
.tile {
  background: #fff; border: 1px solid #eef2f5; border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.tile .ti { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1rem; flex: none; }
.tile .tt { flex: 1; font-size: .82rem; }
.tile .tt b { display: block; color: #1a2230; }
.tile .tt span { color: #8a929c; font-size: .74rem; }
.tile .chev { color: #c2cad3; }

/* Mini gráfico de barras simulado */
.bars {
  display: flex; align-items: flex-end; gap: 7px; height: 130px; padding: 12px;
  background: #fff; border: 1px solid #eef2f5; border-radius: 12px;
}
.bars .b { flex: 1; background: linear-gradient(180deg, #38bdf8, #0176c4); border-radius: 5px 5px 0 0; min-width: 6px; }

/* Ranking */
.rank { background: #fff; border: 1px solid #eef2f5; border-radius: 12px; padding: 10px 14px; }
.rank .rt { font-weight: 800; font-size: .88rem; color: #1a2230; margin-bottom: 4px; }
.rank .ri { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #f0f2f5; font-size: .82rem; }
.rank .ri:last-child { border-bottom: none; }
.rank .rv { font-weight: 800; color: #28a745; }
.mock-export {
  display: inline-flex; align-items: center; gap: 7px; background: #28a745; color: #fff;
  border-radius: 8px; padding: .5rem .9rem; font-size: .8rem; font-weight: 700;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- Modal Reporte Detallado (finanzas) ---- */
.rep-filter { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.rep-filter .rft { font-weight: 800; font-size: .8rem; margin-bottom: 10px; color: #1a2230; }
.rep-fields { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.rep-fields > div { flex: 1; min-width: 84px; }
.rep-fields .md-lbl { margin: 0 0 4px; }
.rep-results-t { font-weight: 700; font-size: .82rem; color: #55606e; margin: 4px 0 10px; }
.rep-results-t b { color: #1a2230; }
.rep-card { background: #fff; border: 1px solid #eef2f5; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.rep-card .rct { font-weight: 800; font-size: .8rem; color: #1a2230; margin-bottom: 8px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.rep-table th { text-align: left; background: #f4f6fa; padding: 6px 8px; font-weight: 700; color: #55606e; }
.rep-table th.r, .rep-table td.r { text-align: right; }
.rep-table td { padding: 6px 8px; border-top: 1px solid #eef2f5; color: #1a2230; }
.rep-table td.money { color: #28a745; font-weight: 700; }

/* ---- Tarjetas de sucursal (Sucursales) ---- */
.sec-label { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #8a929c; margin: 16px 0 8px; }
.branch-card { background: #fff; border: 1px solid #f0f2f5; border-radius: 12px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.branch-card.principal { border: 2px solid #01a7f6; background: linear-gradient(180deg, #f5fbff, #fff); }
.branch-av { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #01a7f6, #0176c4); font-size: 1.1rem; flex: none; }
.branch-av.soft { background: #eef2f7; color: #01a7f6; }
.branch-nm { font-weight: 800; font-size: 1rem; color: #1a2230; }
.branch-info { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: #495057; margin-top: 4px; }
.branch-info i { color: #01a7f6; width: 16px; text-align: center; }
.branch-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px; }
.branch-badge.blue { background: #e6f7ff; color: #0176c4; }
.branch-badge.soft { background: #eef2f7; color: #55606e; }
.mini-btn { font-size: .72rem; font-weight: 700; border: 1px solid #d3dae2; border-radius: 7px; padding: .32rem .6rem; color: #55606e; display: inline-flex; gap: 5px; align-items: center; background: #fff; }
.mini-btn.danger { color: #dc3545; border-color: #f2c2c7; }
.pl-prog { height: 7px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin-top: 7px; }
.pl-prog > i { display: block; height: 100%; border-radius: 999px; }

/* Navegación entre manuales al final */
.reader-footer {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 10px;
}
.nav-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 12px; text-decoration: none;
  font-weight: 600; background: var(--paper); border: 1px solid var(--line);
  color: var(--ink); box-shadow: var(--shadow-sm); transition: all .2s;
}
.nav-btn:hover { border-color: var(--aebun-blue); color: var(--aebun-blue-dark); transform: translateY(-2px); }
.nav-btn.primary { background: var(--aebun-blue); color: #fff; border-color: var(--aebun-blue); }
.nav-btn.primary:hover { background: var(--aebun-blue-dark); color: #fff; }
.nav-btn.ghost { visibility: hidden; }

/* Botón flotante: reiniciar progreso */
.reset-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; border: none; cursor: pointer;
  padding: 12px 18px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  box-shadow: var(--shadow-md); transition: transform .2s;
}
.reset-fab:hover { transform: translateY(-3px); }

footer.credits {
  text-align: center; color: var(--ink-soft); font-size: .82rem;
  padding: 30px 20px 40px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .reader { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .manual-hero h1 { max-width: 100%; }
  .manual-hero .num { display: none; }
}

@media print {
  .brandbar, .toc, .reset-fab, .reader-footer, .paso .chk { display: none !important; }
  .reader { grid-template-columns: 1fr; }
  .paso { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}
