/* BM Learning Hub — UI
   Paleta: tinta azul petróleo + ámbar; superficies claras; tipografía Plus Jakarta Sans */
:root {
  --ink: #0d2b36;
  --ink-2: #123b49;
  --teal: #0e7c86;
  --teal-2: #13a3a8;
  --amber: #f2a541;
  --amber-2: #ffcf87;
  --coral: #e4685d;
  --leaf: #2f9e6e;
  --violet: #6b5ce7;
  --surface: #f4f6f8;
  --card: #ffffff;
  --line: #e3e8ee;
  --muted: #64748b;
  --text: #1b2733;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 43, 54, .06), 0 6px 18px rgba(13, 43, 54, .06);
  --bs-primary: #0e7c86;
  --bs-primary-rgb: 14, 124, 134;
  --bs-link-color: #0e7c86;
  --bs-link-hover-color: #0a5f66;
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: #1b2733;
  --sidebar-w: 260px;
}
html, body { height: 100%; }
body { font-family: var(--bs-body-font-family); color: var(--text); background: var(--surface); }
a { color: var(--teal); }
.btn-primary { --bs-btn-bg: var(--teal); --bs-btn-border-color: var(--teal); --bs-btn-hover-bg: #0a6870; --bs-btn-hover-border-color: #0a6870; --bs-btn-active-bg: #085a61; --bs-btn-disabled-bg: var(--teal); --bs-btn-disabled-border-color: var(--teal); }
.btn-outline-primary { --bs-btn-color: var(--teal); --bs-btn-border-color: var(--teal); --bs-btn-hover-bg: var(--teal); --bs-btn-hover-border-color: var(--teal); --bs-btn-active-bg: var(--teal); }
.btn-amber { background: var(--amber); color: #3b2500; border: 0; font-weight: 600; }
.btn-amber:hover { background: #e3962f; color: #2b1b00; }
.text-teal { color: var(--teal) !important; }
.bg-teal { background: var(--teal) !important; color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--teal-2); box-shadow: 0 0 0 .2rem rgba(19, 163, 168, .18); }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, var(--ink) 0%, #0a2029 100%); color: #cfe3e7; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1040; transition: transform .25s ease; }
.app-main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.2rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; letter-spacing: .5px; background: linear-gradient(135deg, var(--amber), #f7c46c); color: var(--ink); box-shadow: 0 4px 14px rgba(242, 165, 65, .35); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.02rem; }
.brand-text small { color: #8fb5bd; font-size: .74rem; }
.brand-lg .brand-mark { width: 52px; height: 52px; font-size: 1.2rem; }
.side-nav { flex: 1; overflow-y: auto; padding: .4rem .7rem 1rem; }
.nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #6f97a0; padding: 1rem .7rem .35rem; font-weight: 700; }
.side-nav .nav-link { display: flex; align-items: center; gap: .7rem; color: #cfe3e7; border-radius: 10px; padding: .52rem .75rem; font-size: .92rem; font-weight: 500; }
.side-nav .nav-link i { font-size: 1.05rem; opacity: .85; width: 1.2rem; text-align: center; }
.side-nav .nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav .nav-link.active { background: rgba(19, 163, 168, .22); color: #fff; box-shadow: inset 3px 0 0 var(--amber); }
.sidebar-foot { padding: .9rem 1.2rem; color: #6f97a0; font-size: .72rem; border-top: 1px solid rgba(255, 255, 255, .06); }

.app-topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .8rem; padding: .65rem 1.4rem; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.btn-icon { width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--ink); background: transparent; border: 1px solid transparent; }
.btn-icon:hover { background: #eef2f5; }
.btn-context { background: #eef6f7; border: 1px solid #d5e8ea; border-radius: 999px; padding: .35rem .9rem; color: var(--ink); font-size: .88rem; }
.btn-context .ctx-label { color: var(--muted); }
.top-search { flex: 1; max-width: 460px; align-items: center; gap: .5rem; background: #f1f4f7; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem; margin-left: auto; }
.top-search input { border: 0; background: transparent; outline: none; width: 100%; font-size: .9rem; }
.top-actions { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.top-search + .top-actions { margin-left: .4rem; }
.btn-user { display: flex; align-items: center; gap: .5rem; border-radius: 999px; padding: .25rem .6rem .25rem .25rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.dot-badge { position: absolute; top: 4px; right: 3px; background: var(--coral); color: #fff; font-size: .62rem; border-radius: 999px; padding: 1px 5px; font-weight: 700; }
.app-content { padding: 1.4rem 1.6rem 2rem; flex: 1; }
.app-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .9rem 1.6rem; font-size: .75rem; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.breadcrumb { font-size: .82rem; margin-bottom: .8rem; }
.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-main { margin-left: 0; }
  body.sidebar-open .app-sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1030; }
  .app-content { padding: 1rem; }
  .ctx-label { display: none; }
}

/* ---------- Page header & cards ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head h1 { font-size: 1.55rem; font-weight: 800; margin: 0; color: var(--ink); letter-spacing: -.01em; }
.page-head .lead-sm { color: var(--muted); margin: .2rem 0 0; font-size: .92rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 700; padding: .85rem 1.1rem; }
.card-body { padding: 1.1rem; }
.stat-card { border-radius: var(--radius); padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; gap: .9rem; align-items: center; height: 100%; }
.stat-card .stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1; color: var(--ink); }
.stat-card .stat-label { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.si-teal { background: #e3f4f5; color: var(--teal); }
.si-amber { background: #fff2dd; color: #b06a00; }
.si-coral { background: #fde8e6; color: #c0463c; }
.si-leaf { background: #e2f5ec; color: #23805a; }
.si-violet { background: #ecebfd; color: #5143c9; }
.si-ink { background: #e6edf0; color: var(--ink); }
.table { --bs-table-hover-bg: #f6fafb; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; border-bottom-width: 1px; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-card { overflow: hidden; }
.table-card .table { margin: 0; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.4rem; color: #b6c6cd; display: block; margin-bottom: .6rem; }

/* ---------- Badges ---------- */
.badge-hl { background: #ecebfd; color: #4a3dc0; border: 1px solid #d5d1fb; }
.badge-core { background: #e3f4f5; color: #0b6870; border: 1px solid #c9e8ea; }
.badge-ao { background: #f1f4f7; color: #334155; border: 1px solid var(--line); font-weight: 600; }
.badge-ao1 { background: #eef6ff; color: #1d4f91; }
.badge-ao2 { background: #e2f5ec; color: #1e6e4d; }
.badge-ao3 { background: #fff2dd; color: #8a5300; }
.badge-ao4 { background: #fde8e6; color: #9f3a31; }
.badge-status { font-weight: 600; }
.status-ACTIVE { background: #e2f5ec !important; color: #1e6e4d !important; }
.status-SUSPENDED, .status-LOCKED { background: #fde8e6 !important; color: #9f3a31 !important; }
.status-INACTIVE, .status-ARCHIVED, .status-DRAFT { background: #eef1f4 !important; color: #475569 !important; }
.status-PENDING { background: #fff2dd !important; color: #8a5300 !important; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; background: #eef2f5; font-size: .78rem; color: var(--ink); border: 1px solid var(--line); }
.chip-concept { background: #fff7ea; border-color: #ffe2b5; color: #7a4a00; }
.chip-tool { background: #eaf6f7; border-color: #cbe7ea; color: #0b6870; }

/* ---------- Progress ---------- */
.progress { height: .55rem; border-radius: 999px; background: #e8eef2; }
.progress-bar { background: linear-gradient(90deg, var(--teal), var(--teal-2)); }
.progress-lg { height: .9rem; }

/* ---------- Auth ---------- */
.auth-body { background: var(--surface); }
.auth-wrap { min-height: 100vh; display: flex; }
.auth-hero { flex: 1.1; background: radial-gradient(1200px 600px at 10% 10%, #145566 0%, var(--ink) 55%, #071a21 100%); color: #e6f2f4; padding: 4rem; align-items: center; position: relative; overflow: hidden; }
.auth-hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 165, 65, .35), transparent 65%); }
.hero-title { font-size: 2.3rem; font-weight: 800; line-height: 1.15; margin: 2.2rem 0 1.6rem; max-width: 560px; letter-spacing: -.02em; }
.hero-title span { color: var(--amber); }
.hero-points { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: .8rem; }
.hero-points i { color: var(--amber); margin-right: .55rem; }
.hero-note { font-size: .78rem; color: #8fb5bd; max-width: 460px; }
.auth-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 430px; background: #fff; border-radius: 20px; padding: 2.2rem; box-shadow: 0 20px 60px rgba(13, 43, 54, .12); border: 1px solid var(--line); }
.auth-title { font-weight: 800; color: var(--ink); font-size: 1.6rem; margin-bottom: .4rem; }
.auth-card .brand { color: var(--ink); padding: 0; }
.auth-card .brand-text small { color: var(--muted); }
.ctx-icon { width: 40px; height: 40px; border-radius: 10px; background: #e3f4f5; color: var(--teal); display: grid; place-items: center; }
.context-list .list-group-item { border-radius: 12px !important; margin-bottom: .5rem; border: 1px solid var(--line); }
.context-list form { margin: 0; }

/* ---------- Error ---------- */
.error-code { font-size: 5rem; font-weight: 800; color: var(--teal); line-height: 1; opacity: .25; }

/* ---------- Learning blocks ---------- */
.here-card { background: linear-gradient(135deg, var(--ink) 0%, #145566 100%); color: #e8f4f6; border: 0; }
.here-card .eyebrow { color: var(--amber-2); }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--teal); }
.next-card { border-left: 4px solid var(--amber); }
.useful-for .chip { margin: 0 .3rem .3rem 0; }
.topic-section { scroll-margin-top: 80px; }
.topic-section h2 { font-size: 1.1rem; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.topic-section h2 i { color: var(--teal); }
.callout { border-radius: 12px; padding: .9rem 1rem; border: 1px solid var(--line); background: #fbfcfd; }
.callout-amber { background: #fff9ef; border-color: #ffe2b5; }
.callout-teal { background: #f0f9fa; border-color: #cbe7ea; }
.callout-coral { background: #fff4f2; border-color: #f8cfc9; }
.callout-violet { background: #f5f4ff; border-color: #dcd8fb; }
.hl-extension { border: 2px dashed #b9b1f6; border-radius: 12px; padding: .8rem 1rem; background: #faf9ff; }
.hl-extension .hl-flag { font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: #4a3dc0; }
.unit-card { transition: transform .15s ease, box-shadow .15s ease; }
.unit-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(13, 43, 54, .10); }
.unit-num { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: #fff; }
.u1 { background: #0e7c86; } .u2 { background: #6b5ce7; } .u3 { background: #2f9e6e; } .u4 { background: #e4685d; } .u5 { background: #d88a1f; }
.kbd-num { font-variant-numeric: tabular-nums; }

/* ---------- Tools / labs ---------- */
.lab-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tool-tile { display: block; text-decoration: none; color: inherit; height: 100%; }
.tool-tile .card { height: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.tool-tile:hover .card { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(13, 43, 54, .10); }
.swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.swot-grid .quad { border-radius: 12px; padding: .7rem; min-height: 160px; }
.q-s { background: #e2f5ec; } .q-w { background: #fde8e6; } .q-o { background: #eaf2ff; } .q-t { background: #fff2dd; }
.matrix-2x2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.matrix-2x2 > div { border-radius: 12px; padding: .8rem; border: 1px solid var(--line); background: #fff; min-height: 120px; }
.calc-step { border-left: 3px solid var(--teal-2); padding: .4rem .8rem; margin-bottom: .5rem; background: #f7fbfc; border-radius: 0 8px 8px 0; }
.fs-table td, .fs-table th { padding: .35rem .6rem; }
.fs-table .fs-total { font-weight: 800; border-top: 2px solid var(--ink); }
.fs-table input { max-width: 140px; text-align: right; }
.cell-ok { background: #e2f5ec !important; }
.cell-bad { background: #fde8e6 !important; }

/* ---------- Exam mode ---------- */
.exam-bar { position: sticky; top: 64px; z-index: 1010; background: var(--ink); color: #fff; border-radius: 12px; padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.exam-timer { font-variant-numeric: tabular-nums; font-size: 1.3rem; font-weight: 800; color: var(--amber); }
.save-state { font-size: .78rem; color: #9fc3ca; }

/* ---------- Misc ---------- */
.wizard-steps { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.wizard-steps .ws { padding: .35rem .75rem; border-radius: 999px; background: #eef2f5; font-size: .78rem; color: var(--muted); text-decoration: none; border: 1px solid var(--line); }
.wizard-steps .ws.done { background: #e2f5ec; color: #1e6e4d; border-color: #c4e8d6; }
.wizard-steps .ws.current { background: var(--teal); color: #fff; border-color: var(--teal); }
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: .45rem; top: .3rem; bottom: .3rem; width: 2px; background: var(--line); }
.timeline .tl-item { position: relative; margin-bottom: .9rem; }
.timeline .tl-item::before { content: ""; position: absolute; left: -1.2rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px #e3f4f5; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sticky-side { position: sticky; top: 84px; }
.planner-week { min-height: 90px; }
.planner-cell { border: 1px solid var(--line); border-radius: 10px; padding: .5rem; background: #fff; min-height: 80px; }
.draggable { cursor: grab; }
.drop-target.drag-over { outline: 2px dashed var(--teal-2); outline-offset: 2px; }
.trace-btn { font-size: .75rem; }
.prose p { margin-bottom: .8rem; line-height: 1.65; }
.flashcard { perspective: 1000px; cursor: pointer; min-height: 160px; }
.flashcard-inner { position: relative; width: 100%; min-height: 160px; transition: transform .5s; transform-style: preserve-3d; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 14px; padding: 1rem; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--line); background: #fff; }
.flashcard-back { transform: rotateY(180deg); background: #f0f9fa; }
@media print {
  .app-sidebar, .app-topbar, .app-footer, .no-print { display: none !important; }
  .app-main { margin: 0; }
}

/* ---------- Laboratorios (Fase 6) ---------- */
.lab-grid-table td { min-width: 90px; }
.lab-grid-table td:last-child { min-width: 0; }
.lab-chart { position: relative; height: 320px; margin-top: .75rem; }
.tool-card { transition: transform .15s ease, box-shadow .15s ease; }
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.2rem rgba(20, 30, 70, .08); }
.calc-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.calc-steps li { display: flex; gap: .75rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px dashed var(--bs-border-color); }
.calc-steps li:last-child { border-bottom: 0; font-weight: 700; font-size: 1.1rem; }
.calc-steps .step-label { flex: 0 0 140px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.calc-steps .step-text { word-break: break-word; }
.statement-table td, .statement-grid td { vertical-align: middle; }
.statement-table .statement-total { border-top: 1px solid var(--bs-body-color); }
.statement-table .statement-final .statement-total { border-bottom: 3px double var(--bs-body-color); }
.statement-grid input { min-width: 90px; }
@media (max-width: 576px) { .calc-steps .step-label { flex-basis: 90px; } }

/* ---------- Business Case Lab (Fase 7) ---------- */
.case-flow { display: flex; gap: .4rem; flex-wrap: wrap; }
.case-step { flex: 1 1 110px; background: #eef6f7; border: 1px solid #d5e8ea; border-radius: 10px; padding: .45rem .7rem; font-weight: 600; font-size: .85rem; color: var(--ink); display: flex; align-items: center; gap: .45rem; }
.case-step span { width: 22px; height: 22px; border-radius: 50%; background: var(--bs-primary, #0e7c86); color: #fff; display: inline-grid; place-items: center; font-size: .75rem; }
.case-context p { line-height: 1.7; }
.decision-q { background: #fff7e6; border-left: 4px solid #d88a1f; padding: .7rem 1rem; border-radius: 6px; font-weight: 600; }

/* ---------- Evaluación interna (Fase 8) ---------- */
.ia-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem; }
.ia-step { display: flex; gap: .45rem; align-items: center; border: 1px solid var(--bs-border-color); border-radius: 10px; padding: .45rem .6rem; font-size: .85rem; text-decoration: none; color: var(--bs-body-color); }
.ia-step span { width: 22px; height: 22px; border-radius: 50%; background: #e9ecef; display: inline-grid; place-items: center; font-size: .75rem; flex: none; }
.ia-step.done span { background: #2f9e44; color: #fff; }
.ia-step.current { border-color: var(--bs-primary, #0e7c86); box-shadow: 0 0 0 2px rgba(14, 124, 134, .15); }
.concept-pick { cursor: pointer; }
.ia-dash td, .ia-dash th { white-space: nowrap; }
.ia-dash td:nth-child(3) { white-space: normal; }
.ia-draft { max-height: 640px; overflow: auto; }

/* ---------- Centros de pruebas (Fase 9) ---------- */
.stimulus-card { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.stimulus-card p { line-height: 1.7; }
.guide-box { background: #f1f8f9; border: 1px solid #d5e8ea; border-radius: 8px; padding: .7rem .9rem; }
.conn-row { padding: .35rem 0; border-bottom: 1px dashed var(--bs-border-color); }
@media (max-width: 1199.98px) { .stimulus-card { position: static; max-height: none; } }

/* ---------- EXAM_MODE (Fase 10) ---------- */
.exam-body { background: #f4f6f8; }
.exam-bar { position: sticky; top: 0; z-index: 1030; background: var(--ink, #0f2d36); color: #fff; padding: .6rem 1rem; display: flex; align-items: center; gap: 1rem; }
.exam-clock { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(255,255,255,.1); padding: .1rem .7rem; border-radius: 8px; }
.exam-clock.text-danger { background: #fff; }
.exam-wrap { max-width: 1100px; margin: 1.2rem auto; padding: 0 1rem 4rem; }

/* ---------- Recursos generados (Fase 11) ---------- */
.resource-body .res-h { margin-top: 1rem; }
.resource-body h3.res-h { font-size: 1.35rem; }
.resource-body h4.res-h { font-size: 1.1rem; color: var(--bs-primary, #0e7c86); }
.res-table th { background: #eef6f7; }
.res-callout { border-left: 4px solid #d88a1f; background: #fff7e6; padding: .5rem .8rem; border-radius: 6px; margin: .6rem 0; }
.answer-lines { height: 4.5rem; background: repeating-linear-gradient(transparent, transparent 1.45rem, #cfd6dc 1.5rem); margin: .3rem 0 1rem; }
.checklist { list-style: none; padding-left: .3rem; }
.checklist .cb { font-size: 1.1rem; margin-right: .3rem; }
.slide-deck { display: grid; gap: 1rem; }
.slide { position: relative; aspect-ratio: 16 / 9; background: #fff; border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 2rem 2.4rem; overflow: auto; box-shadow: 0 .3rem .8rem rgba(15, 45, 54, .06); }
.slide h3 { font-size: 1.7rem; }
.slide-no { position: absolute; right: 1rem; bottom: .6rem; font-size: .75rem; color: var(--bs-secondary-color); }
@media print {
  .app-sidebar, .app-topbar, .page-head .btn, .page-head form, .breadcrumb, footer, .alert { display: none !important; }
  .app-main { margin: 0 !important; }
  .card { border: 0 !important; box-shadow: none !important; }
  .slide { page-break-after: always; aspect-ratio: auto; min-height: 90vh; box-shadow: none; }
}

/* ---------- Analítica (Fase 12) ---------- */
.heatmap { display: flex; flex-wrap: wrap; gap: .3rem; }
.hm-cell { width: 58px; padding: .3rem 0; text-align: center; border-radius: 6px; font-size: .75rem; font-weight: 600; color: #0f2d36;
  background: color-mix(in srgb, #0e7c86 calc(var(--m) * 1%), #f1f4f7); }
.hm-cell small { display: block; font-weight: 400; opacity: .8; }

/* ---------- Plataforma (Fase 13) ---------- */
.support-banner { background: #b42318; color: #fff; padding: .55rem 1.4rem; font-size: .9rem; }
.chat-box { height: 56vh; overflow-y: auto; background: #f7f9fb; border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 1rem; }
.chat-msg { max-width: 80%; padding: .6rem .85rem; border-radius: 12px; margin-bottom: .6rem; white-space: pre-wrap; }
.chat-msg.user { margin-left: auto; background: var(--bs-primary, #0e7c86); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.assistant { background: #fff; border: 1px solid var(--bs-border-color); border-bottom-left-radius: 4px; }
.chat-msg.blocked { border-color: #d88a1f; background: #fff7e6; }
.log-view { background: #0f1720; color: #d7e0e8; font-size: .75rem; max-height: 70vh; overflow: auto; padding: 1rem; border-radius: 10px; }

/* ---------- Teléfonos (≤ 575 px): la barra superior nunca empuja el menú de usuario fuera de la pantalla ---------- */
.context-switch { min-width: 0; flex-shrink: 1; }
.btn-context { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { flex-shrink: 0; }
.badge { white-space: normal; max-width: 100%; }
@media (max-width: 575.98px) {
  .app-topbar { gap: .4rem; padding: .5rem .7rem; }
  .btn-context { padding: .3rem .7rem; font-size: .82rem; }
  .btn-context .badge, .context-switch > .btn-link { display: none; }
  .stat-card { padding: .8rem; gap: .6rem; }
  .stat-card .stat-icon { width: 38px; height: 38px; font-size: 1.1rem; }
  .stat-card .stat-value { font-size: 1.2rem; white-space: nowrap; }
  .stat-card > div:last-child { min-width: 0; }
  .page-head h1 { font-size: 1.3rem; }
}
