/* =============================================================
   MantenPro · Sistema de diseño
   Estética: industrial / sala de control. Pizarra profunda +
   ámbar de señalización de seguridad. Tipografía IBM Plex.
   Edita las variables de :root para cambiar toda la apariencia.
   ============================================================= */
:root {
  --mp-accent: #f59e0b;
  --mp-accent-600: #d97706;
  --mp-accent-soft: rgba(245, 158, 11, .14);
  --mp-ink: #0f172a;
  --mp-bg: #eef2f6;
  --mp-surface: #ffffff;
  --mp-surface-2: #f8fafc;
  --mp-border: #e2e8f0;
  --mp-text: #0f172a;
  --mp-muted: #64748b;
  --mp-sidebar-bg: #0b1220;
  --mp-sidebar-bg-2: #111a2e;
  --mp-sidebar-fg: #94a3b8;
  --mp-radius: 14px;
  --mp-radius-sm: 10px;
  --mp-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px -8px rgba(15, 23, 42, .10);
  --mp-shadow-lg: 0 20px 50px -20px rgba(15, 23, 42, .35);
  --sidebar-w: 268px;
  --sidebar-w-c: 78px;
  --topbar-h: 64px;
  --bs-body-font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-bg: var(--mp-bg);
  --bs-link-color: #b45309;
  --bs-link-hover-color: #92400e;
  --bs-border-radius: 10px;
  --bs-focus-ring-color: rgba(245, 158, 11, .3);
}
[data-bs-theme="dark"] {
  --mp-bg: #070c18;
  --mp-surface: #0f172a;
  --mp-surface-2: #131d33;
  --mp-border: #1f2a44;
  --mp-text: #e2e8f0;
  --mp-muted: #8b9ab3;
  --mp-sidebar-bg: #050914;
  --mp-sidebar-bg-2: #0b1222;
  --mp-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -10px rgba(0, 0, 0, .6);
  --bs-body-bg: var(--mp-bg);
  --bs-body-color: var(--mp-text);
  --bs-border-color: var(--mp-border);
  --bs-link-color: #fbbf24;
  --bs-link-hover-color: #fcd34d;
  --bs-tertiary-bg: var(--mp-surface-2);
}

body { background: var(--mp-bg); color: var(--mp-text); -webkit-font-smoothing: antialiased; }
.mono, .code { font-family: 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: -.01em; }
.text-muted, .text-secondary { color: var(--mp-muted) !important; }
::selection { background: var(--mp-accent); color: var(--mp-ink); }

/* ---------- Botones ---------- */
.btn { font-weight: 500; border-radius: 10px; }
.btn-primary {
  --bs-btn-bg: var(--mp-accent); --bs-btn-border-color: var(--mp-accent); --bs-btn-color: #111827;
  --bs-btn-hover-bg: var(--mp-accent-600); --bs-btn-hover-border-color: var(--mp-accent-600); --bs-btn-hover-color: #111827;
  --bs-btn-active-bg: #b45309; --bs-btn-active-border-color: #b45309; --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--mp-accent); --bs-btn-disabled-border-color: var(--mp-accent); --bs-btn-disabled-color: #111827;
  font-weight: 600;
}
.btn-dark-ink { background: var(--mp-ink); color: #fff; border-color: var(--mp-ink); }
.btn-dark-ink:hover { background: #1e293b; color: #fff; }
[data-bs-theme="dark"] .btn-dark-ink { background: #1e293b; border-color: #334155; }
.btn-icon { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border-radius: 10px; border: 1px solid var(--mp-border); background: var(--mp-surface); color: var(--mp-text); }
.btn-icon:hover { border-color: var(--mp-accent); color: var(--mp-accent-600); }
.btn-sm.btn-icon { width: 32px; height: 32px; }
.btn-soft { background: var(--mp-surface-2); border: 1px solid var(--mp-border); color: var(--mp-text); }
.btn-soft:hover { border-color: var(--mp-accent); background: var(--mp-accent-soft); color: var(--mp-text); }
.btn-wa { background: #25d366; color: #05361b; border: none; font-weight: 600; }
.btn-wa:hover { background: #1fb457; color: #05361b; }

/* ---------- Formularios ---------- */
.form-control, .form-select { border-radius: 10px; border-color: var(--mp-border); background-color: var(--mp-surface); }
.form-control:focus, .form-select:focus { border-color: var(--mp-accent); box-shadow: 0 0 0 .2rem rgba(245, 158, 11, .2); }
.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--mp-accent); border-color: var(--mp-accent); }
.req::after { content: ' *'; color: #ef4444; }
.input-group .btn-pass { border-color: var(--mp-border); background: var(--mp-surface); }
.select2-container--bootstrap-5 .select2-selection { border-radius: 10px; border-color: var(--mp-border); background-color: var(--mp-surface); min-height: 38px; }
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection { border-color: var(--mp-accent); box-shadow: 0 0 0 .2rem rgba(245, 158, 11, .2); }
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--highlighted { background: var(--mp-accent-soft); color: var(--mp-text); }
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected { background: var(--mp-accent); color: #111; }
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown { background: var(--mp-surface); border-color: var(--mp-border); color: var(--mp-text); }
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered { color: var(--mp-text); }
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field { background: var(--mp-surface-2); color: var(--mp-text); border-color: var(--mp-border); }
.s2-opt { display: flex; align-items: center; gap: 8px; }
.s2-opt img, .s2-opt .ph { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex: none; }
.s2-opt small { color: var(--mp-muted); }

/* ---------- Tarjetas base ---------- */
.mp-card { background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: var(--mp-radius); box-shadow: var(--mp-shadow); }
.mp-card-head { padding: 14px 18px; border-bottom: 1px solid var(--mp-border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mp-card-head h6 { margin: 0; font-weight: 600; }
.mp-card-body { padding: 18px; }

/* ---------- Encabezado de página ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-size: 1.45rem; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.page-head .sub { color: var(--mp-muted); font-size: .9rem; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: var(--mp-radius); padding: 12px; margin-bottom: 16px; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mp-muted); }
.search-box input { padding-left: 36px; }

/* ---------- Tarjetas de registro (reemplazan tablas) ---------- */
.item-card { background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: var(--mp-radius); box-shadow: var(--mp-shadow); height: 100%;
  display: flex; flex-direction: column; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; position: relative; }
.item-card:hover { transform: translateY(-2px); box-shadow: var(--mp-shadow-lg); border-color: rgba(245, 158, 11, .5); }
.item-card .ic-media { aspect-ratio: 16 / 9; background: var(--mp-surface-2); position: relative; overflow: hidden; cursor: pointer; }
.item-card .ic-media img { width: 100%; height: 100%; object-fit: cover; }
.item-card .ic-media .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.6rem; }
.item-card .ic-media .ic-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; }
.item-card .ic-body { padding: 14px 16px; flex: 1; }
.item-card .ic-title { font-weight: 600; font-size: 1rem; line-height: 1.3; margin-bottom: 2px; cursor: pointer; }
.item-card .ic-title:hover { color: var(--mp-accent-600); }
.item-card .ic-code { font-family: 'IBM Plex Mono', monospace; font-size: .75rem; color: var(--mp-muted); }
.item-card .ic-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: .84rem; color: var(--mp-muted); }
.item-card .ic-meta i { width: 18px; color: var(--mp-accent-600); }
.item-card .ic-foot { padding: 10px 16px; border-top: 1px solid var(--mp-border); display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; background: var(--mp-surface-2); }
.item-row { display: flex; gap: 14px; align-items: center; padding: 12px 16px; background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: var(--mp-radius-sm); margin-bottom: 8px; }
.item-row:hover { border-color: rgba(245, 158, 11, .5); }
.item-row .ir-main { flex: 1; min-width: 0; }
.item-row .ir-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row .ir-sub { font-size: .82rem; color: var(--mp-muted); }
.stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.prio-critica .stripe { background: #dc2626; } .prio-alta .stripe { background: #f97316; } .prio-media .stripe { background: #eab308; } .prio-baja .stripe { background: #22c55e; }

/* Avatares y miniaturas */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; font-weight: 600; font-size: .9rem; background: var(--mp-accent-soft); color: var(--mp-accent-600); }
.avatar-lg { width: 84px; height: 84px; font-size: 1.6rem; }
.avatar-sm { width: 30px; height: 30px; font-size: .75rem; }
.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--mp-surface-2); display: grid; place-items: center; font-size: 1.4rem; color: var(--mp-muted); }

/* Badges suaves */
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 6px; }
.bs { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.bs::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bs-gray { background: #f1f5f9; color: #475569; } .bs-blue { background: #e0f2fe; color: #0369a1; } .bs-green { background: #dcfce7; color: #15803d; }
.bs-amber { background: #fef3c7; color: #b45309; } .bs-red { background: #fee2e2; color: #b91c1c; } .bs-purple { background: #ede9fe; color: #6d28d9; }
.bs-orange { background: #ffedd5; color: #c2410c; } .bs-cyan { background: #cffafe; color: #0e7490; }
[data-bs-theme="dark"] .bs-gray { background: rgba(148,163,184,.15); color: #cbd5e1; } [data-bs-theme="dark"] .bs-blue { background: rgba(14,165,233,.15); color: #7dd3fc; }
[data-bs-theme="dark"] .bs-green { background: rgba(34,197,94,.15); color: #86efac; } [data-bs-theme="dark"] .bs-amber { background: rgba(245,158,11,.15); color: #fcd34d; }
[data-bs-theme="dark"] .bs-red { background: rgba(239,68,68,.15); color: #fca5a5; } [data-bs-theme="dark"] .bs-purple { background: rgba(139,92,246,.15); color: #c4b5fd; }
[data-bs-theme="dark"] .bs-orange { background: rgba(249,115,22,.15); color: #fdba74; } [data-bs-theme="dark"] .bs-cyan { background: rgba(6,182,212,.15); color: #67e8f9; }
.ic-media .bs { background: rgba(15, 23, 42, .78); color: #fff; backdrop-filter: blur(4px); }
.crit { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: .75rem; }
.crit-A { background: #dc2626; color: #fff; } .crit-B { background: #f59e0b; color: #111; } .crit-C { background: #22c55e; color: #fff; }

/* ---------- KPI ---------- */
.kpi { background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: var(--mp-radius); padding: 16px; display: flex; gap: 14px; align-items: center; box-shadow: var(--mp-shadow); height: 100%; position: relative; overflow: hidden; }
.kpi .kpi-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.kpi .kpi-val { font-size: 1.6rem; font-weight: 700; line-height: 1; font-family: 'IBM Plex Mono', monospace; letter-spacing: -.03em; }
.kpi .kpi-lbl { font-size: .8rem; color: var(--mp-muted); margin-top: 4px; }
.kpi a.stretched-link { z-index: 1; }
.ico-amber { background: #fef3c7; color: #b45309; } .ico-blue { background: #e0f2fe; color: #0369a1; } .ico-green { background: #dcfce7; color: #15803d; }
.ico-red { background: #fee2e2; color: #b91c1c; } .ico-purple { background: #ede9fe; color: #6d28d9; } .ico-slate { background: #e2e8f0; color: #334155; }
[data-bs-theme="dark"] .ico-amber { background: rgba(245,158,11,.15); color: #fcd34d; } [data-bs-theme="dark"] .ico-blue { background: rgba(14,165,233,.15); color: #7dd3fc; }
[data-bs-theme="dark"] .ico-green { background: rgba(34,197,94,.15); color: #86efac; } [data-bs-theme="dark"] .ico-red { background: rgba(239,68,68,.15); color: #fca5a5; }
[data-bs-theme="dark"] .ico-purple { background: rgba(139,92,246,.15); color: #c4b5fd; } [data-bs-theme="dark"] .ico-slate { background: rgba(148,163,184,.15); color: #cbd5e1; }

/* ---------- Estado vacío / carga ---------- */
.empty { text-align: center; padding: 48px 16px; color: var(--mp-muted); }
.empty i { font-size: 3rem; display: block; margin-bottom: 8px; color: var(--mp-accent); opacity: .7; }
.skeleton { background: linear-gradient(90deg, var(--mp-surface-2) 25%, var(--mp-border) 37%, var(--mp-surface-2) 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: var(--mp-radius); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.loader-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--mp-accent); z-index: 3000; width: 0; transition: width .3s ease, opacity .3s; box-shadow: 0 0 10px var(--mp-accent); }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.g-item { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--mp-border); background: var(--mp-surface-2); aspect-ratio: 1; }
.g-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.g-item .g-doc { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 8px; text-align: center; font-size: .75rem; word-break: break-word; color: var(--mp-text); text-decoration: none; }
.g-item .g-doc i { font-size: 2rem; color: #dc2626; }
.g-item .g-tools { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.g-item .g-tools button { background: rgba(255,255,255,.9); border: none; border-radius: 6px; width: 26px; height: 26px; display: grid; place-items: center; font-size: .8rem; color: #111; }
.g-item .g-tag { position: absolute; top: 6px; left: 6px; font-size: .65rem; background: rgba(15,23,42,.8); color: #fff; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }
.g-drop { border: 2px dashed var(--mp-border); border-radius: 10px; display: grid; place-items: center; aspect-ratio: 1; cursor: pointer; color: var(--mp-muted); text-align: center; font-size: .8rem; transition: .15s; }
.g-drop:hover, .g-drop.drag { border-color: var(--mp-accent); color: var(--mp-accent-600); background: var(--mp-accent-soft); }
.g-drop i { font-size: 1.6rem; display: block; }
.img-pick { position: relative; width: 100%; aspect-ratio: 16/10; border: 2px dashed var(--mp-border); border-radius: 12px; display: grid; place-items: center; overflow: hidden; cursor: pointer; background: var(--mp-surface-2); color: var(--mp-muted); }
.img-pick.round { width: 110px; height: 110px; aspect-ratio: auto; border-radius: 50%; margin: 0 auto; }
.img-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-pick:hover { border-color: var(--mp-accent); }
.img-pick input { display: none; }

/* ---------- Línea de tiempo ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--mp-border); }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-item::before { content: ''; position: absolute; left: -23px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--mp-surface); border: 3px solid var(--mp-accent); }
.tl-item.sistema::before { border-color: #94a3b8; } .tl-item.cliente::before { border-color: #0ea5e9; }
.tl-item .tl-head { font-size: .78rem; color: var(--mp-muted); }
.tl-item .tl-body { background: var(--mp-surface-2); border: 1px solid var(--mp-border); border-radius: 10px; padding: 8px 12px; margin-top: 4px; font-size: .9rem; white-space: pre-line; }

/* ---------- Pestañas ---------- */
.nav-tabs-mp { border-bottom: 1px solid var(--mp-border); gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-tabs-mp .nav-link { border: none; border-bottom: 2px solid transparent; color: var(--mp-muted); font-weight: 500; white-space: nowrap; border-radius: 0; padding: 10px 14px; }
.nav-tabs-mp .nav-link.active { color: var(--mp-text); border-bottom-color: var(--mp-accent); background: transparent; }

/* ---------- Modales ---------- */
.modal-content { border: 1px solid var(--mp-border); border-radius: 16px; background: var(--mp-surface); }
.modal-header { border-bottom: 1px solid var(--mp-border); }
.modal-header .modal-title { font-weight: 700; }
.modal-footer { border-top: 1px solid var(--mp-border); background: var(--mp-surface-2); border-radius: 0 0 16px 16px; }
@media (max-width: 575.98px) { .modal-dialog:not(.modal-sm) { margin: 0; max-width: 100%; min-height: 100%; } .modal-dialog:not(.modal-sm) .modal-content { border-radius: 0; min-height: 100vh; } }
.swal2-popup { border-radius: 16px !important; font-family: 'IBM Plex Sans', sans-serif; }
[data-bs-theme="dark"] .swal2-popup { background: var(--mp-surface); color: var(--mp-text); }
[data-bs-theme="dark"] .swal2-title, [data-bs-theme="dark"] .swal2-html-container { color: var(--mp-text); }
.swal2-confirm { background: var(--mp-accent) !important; color: #111 !important; font-weight: 600 !important; }

/* ---------- Paginación ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: .85rem; color: var(--mp-muted); }
.pagination .page-link { color: var(--mp-text); border-color: var(--mp-border); background: var(--mp-surface); }
.pagination .active .page-link { background: var(--mp-accent); border-color: var(--mp-accent); color: #111; }

/* ---------- Listas clave/valor (detalle) ---------- */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.kv-grid > div { background: var(--mp-surface-2); border: 1px solid var(--mp-border); border-radius: 10px; padding: 10px 12px; }
.kv-grid .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mp-muted); }
.kv-grid .v { font-weight: 600; word-break: break-word; }
.section-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mp-muted); font-weight: 600; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--mp-border); }

/* ---------- Checklist ---------- */
.chk-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--mp-border); border-radius: 10px; margin-bottom: 6px; background: var(--mp-surface-2); }
.chk-item.done { opacity: .7; } .chk-item.done span { text-decoration: line-through; }
.progress { background: var(--mp-surface-2); border-radius: 999px; }
.progress-bar { background: var(--mp-accent); }

/* ---------- Asistente IA (chat) ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 150px); min-height: 420px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 16px; line-height: 1.55; font-size: .94rem; }
.msg.user { align-self: flex-end; background: var(--mp-ink); color: #fff; border-bottom-right-radius: 4px; }
[data-bs-theme="dark"] .msg.user { background: #1e293b; }
.msg.assistant { align-self: flex-start; background: var(--mp-surface-2); border: 1px solid var(--mp-border); border-bottom-left-radius: 4px; }
.msg.assistant p:last-child { margin-bottom: 0; } .msg.assistant ul, .msg.assistant ol { padding-left: 1.2rem; margin-bottom: .5rem; }
.msg.assistant table { font-size: .85rem; } .msg.typing { color: var(--mp-muted); font-style: italic; }
.chat-input { border-top: 1px solid var(--mp-border); padding: 12px; display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { resize: none; max-height: 140px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--mp-border); background: var(--mp-surface); font-size: .82rem; cursor: pointer; transition: .15s; color: var(--mp-text); }
.chip:hover { border-color: var(--mp-accent); background: var(--mp-accent-soft); }
.ai-btn { background: linear-gradient(135deg, #7c3aed, #db2777); color: #fff; border: none; font-weight: 600; }
.ai-btn:hover { filter: brightness(1.1); color: #fff; }
.ai-out { white-space: pre-line; background: var(--mp-surface-2); border: 1px dashed #a78bfa; border-radius: 10px; padding: 12px; font-size: .9rem; }

/* Estrellas */
.stars { color: #f59e0b; letter-spacing: 1px; }
.stars .off { color: var(--mp-border); }

/* =============================================================
   LAYOUT DE LA APLICACIÓN (sidebar + topbar + contenido)
   ============================================================= */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--mp-sidebar-bg); color: var(--mp-sidebar-fg); z-index: 1040;
  display: flex; flex-direction: column; transition: width .22s ease, transform .22s ease; border-right: 1px solid rgba(255,255,255,.04); }
.sidebar::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px); background-size: 22px 22px; }
.sb-brand { height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.06); position: relative; flex: none; }
.sb-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--mp-accent); color: #111; display: grid; place-items: center; font-size: 1.3rem; flex: none; overflow: hidden; }
.sb-logo img { width: 100%; height: 100%; object-fit: cover; }
.sb-brand-text { line-height: 1.15; overflow: hidden; white-space: nowrap; }
.sb-brand-text b { color: #fff; font-size: .98rem; display: block; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.sb-brand-text small { font-size: .7rem; color: #64748b; font-family: 'IBM Plex Mono', monospace; }
.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 10px 20px; position: relative; scrollbar-width: thin; scrollbar-color: #1e293b transparent; }
.sb-group { margin-bottom: 4px; position: relative; }
.sb-group-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: none; background: transparent; color: var(--mp-sidebar-fg);
  border-radius: 10px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; text-align: left; }
.sb-group-btn:hover { color: #e2e8f0; background: rgba(255,255,255,.04); }
.sb-group-btn > i:first-child { font-size: 1.05rem; width: 22px; text-align: center; }
.sb-group-btn .chev { margin-left: auto; transition: transform .2s; font-size: .75rem; }
.sb-group-btn[aria-expanded="true"] { color: #fff; }
.sb-group-btn[aria-expanded="true"] .chev { transform: rotate(90deg); }
.sb-group.has-active > .sb-group-btn { color: var(--mp-accent); }
.sb-items { padding: 2px 0 6px; }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 16px; margin: 1px 0 1px 12px; color: var(--mp-sidebar-fg); text-decoration: none; border-radius: 10px;
  font-size: .9rem; position: relative; white-space: nowrap; border-left: 1px solid rgba(148,163,184,.12); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.sb-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.sb-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sb-link.active { color: #111; background: var(--mp-accent); font-weight: 600; border-left-color: var(--mp-accent); box-shadow: 0 6px 18px -6px rgba(245,158,11,.6); border-radius: 10px; }
.sb-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.06); position: relative; flex: none; }
.sb-user { display: flex; align-items: center; gap: 10px; color: #e2e8f0; text-decoration: none; padding: 6px; border-radius: 10px; }
.sb-user:hover { background: rgba(255,255,255,.05); color: #fff; }
.sb-user .avatar { background: rgba(245,158,11,.2); color: var(--mp-accent); }
.sb-user-text { line-height: 1.2; overflow: hidden; } .sb-user-text b { font-size: .86rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-text small { font-size: .72rem; color: #64748b; }

.topbar { position: sticky; top: 0; z-index: 1030; height: var(--topbar-h); background: color-mix(in srgb, var(--mp-surface) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mp-border); display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.topbar .tb-title { font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar .tb-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .tb-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.tb-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: #ef4444; color: #fff; font-size: .65rem; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
.notif-menu { width: 340px; max-width: 92vw; padding: 0; border-radius: 14px; overflow: hidden; border-color: var(--mp-border); background: var(--mp-surface); }
.notif-menu .n-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--mp-border); text-decoration: none; color: var(--mp-text); font-size: .86rem; }
.notif-menu .n-item:hover { background: var(--mp-surface-2); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; transition: margin-left .22s ease; display: flex; flex-direction: column; }
.content { padding: 22px; flex: 1; width: 100%; max-width: 1680px; margin: 0 auto; }
.app-footer { padding: 14px 22px; font-size: .78rem; color: var(--mp-muted); border-top: 1px solid var(--mp-border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.sb-overlay { position: fixed; inset: 0; background: rgba(2, 6, 23, .55); z-index: 1035; display: none; backdrop-filter: blur(2px); }

/* Sidebar colapsado (escritorio): solo íconos; el contenido crece */
@media (min-width: 992px) {
  body.sb-collapsed .sidebar { width: var(--sidebar-w-c); }
  body.sb-collapsed .main { margin-left: var(--sidebar-w-c); }
  body.sb-collapsed .sb-brand { padding: 0 19px; }
  body.sb-collapsed .sb-brand-text, body.sb-collapsed .sb-group-btn span, body.sb-collapsed .sb-group-btn .chev,
  body.sb-collapsed .sb-user-text { display: none; }
  body.sb-collapsed .sb-nav { overflow: visible; }
  body.sb-collapsed .sb-group-btn { justify-content: center; padding: 12px; }
  body.sb-collapsed .sb-group-btn > i:first-child { font-size: 1.25rem; }
  body.sb-collapsed .sb-items { display: none !important; position: absolute; left: calc(100% + 4px); top: 0; min-width: 220px; background: var(--mp-sidebar-bg-2);
    border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 8px; box-shadow: 0 20px 40px rgba(0,0,0,.4); z-index: 1050; height: auto !important; }
  body.sb-collapsed .sb-group:hover .sb-items { display: block !important; }
  body.sb-collapsed .sb-items::before { content: attr(data-title); display: block; padding: 4px 10px 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; font-weight: 600; }
  body.sb-collapsed .sb-link { margin-left: 0; border-left: none; border-radius: 8px; }
  body.sb-collapsed .sb-foot { padding: 12px 10px; } body.sb-collapsed .sb-user { justify-content: center; }
}
/* Móvil y tablet: sidebar deslizable */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); width: min(86vw, 300px); box-shadow: var(--mp-shadow-lg); }
  body.sb-open .sidebar { transform: translateX(0); }
  body.sb-open .sb-overlay { display: block; }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .topbar { padding: 0 12px; }
}
@media (max-width: 575.98px) {
  .page-head h1 { font-size: 1.2rem; }
  .page-head .actions { width: 100%; } .page-head .actions .btn { flex: 1; }
  .kpi .kpi-val { font-size: 1.3rem; }
  .msg { max-width: 94%; }
}

/* =============================================================
   PANTALLAS DE ACCESO (login, registro, recuperar, portal, maestro)
   Pantalla completa dividida: panel de marca + panel de formulario.
   ============================================================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--mp-surface); }
.auth-hero { position: relative; background: #0b1220; color: #e2e8f0; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-hero::before { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148,163,184,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.08) 1px, transparent 1px),
  linear-gradient(rgba(148,163,184,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.04) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px; }
.auth-hero::after { content: ''; position: absolute; width: 620px; height: 620px; right: -220px; bottom: -220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.28), transparent 65%); }
.auth-hero > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.2rem; color: #fff; }
.auth-brand .sb-logo { width: 44px; height: 44px; }
.auth-evolean { display: inline-flex; align-items: center; margin-left: 5px; }
.auth-evolean img { display: block; width: 104px; height: auto; filter: brightness(0) invert(1); }
.auth-hero h1 { font-size: clamp(2rem, 3.4vw, 3.2rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; color: #fff; max-width: 560px; }
.auth-hero h1 em { font-style: normal; color: var(--mp-accent); }
.auth-hero p.lead { color: #94a3b8; max-width: 500px; font-size: 1.05rem; }
.auth-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; }
.auth-feat { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: #cbd5e1; }
.auth-feat i { color: var(--mp-accent); font-size: 1.15rem; }
.auth-gauge { position: absolute; right: 48px; top: 40px; width: 150px; opacity: .9; }
.hazard { height: 8px; background: repeating-linear-gradient(-45deg, var(--mp-accent) 0 14px, #0b1220 14px 28px); border-radius: 4px; width: 160px; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 96px); position: relative; background: var(--mp-surface); }
.auth-panel .auth-top { position: absolute; top: 20px; right: 24px; left: 24px; display: flex; justify-content: space-between; align-items: center; }
.auth-form { width: 100%; max-width: 460px; margin: 0 auto; }
.auth-form h2 { font-weight: 700; letter-spacing: -.02em; font-size: 1.75rem; }
.auth-form .form-control, .auth-form .input-group-text { padding-top: .7rem; padding-bottom: .7rem; }
.auth-form .input-group-text { background: var(--mp-surface-2); border-color: var(--mp-border); color: var(--mp-muted); }
.auth-form .btn-lg { padding: .8rem; font-size: 1rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--mp-muted); font-size: .8rem; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--mp-border); }
.btn-social { border: 1px solid var(--mp-border); background: var(--mp-surface); color: var(--mp-text); font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 10px; padding: .65rem; }
.btn-social:hover { border-color: var(--mp-accent); background: var(--mp-surface-2); color: var(--mp-text); }
.btn-social svg { width: 20px; height: 20px; }
.emp-chip { display: none; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--mp-accent-soft); font-size: .88rem; margin-top: 8px; }
.emp-chip img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.auth-mobile-brand { display: none; }
@media (max-width: 991.98px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { min-height: 100vh; justify-content: flex-start; padding-top: 0; }
  .auth-mobile-brand { display: flex; margin: 0 calc(-1 * clamp(24px, 6vw, 96px)) 28px; padding: 22px clamp(24px, 6vw, 96px); background: #0b1220; color: #fff; align-items: center; gap: 12px;
    border-bottom: 4px solid var(--mp-accent); font-weight: 700; }
  .auth-panel .auth-top { position: static; margin-bottom: 16px; }
}
.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.steps .st { flex: 1; height: 5px; border-radius: 3px; background: var(--mp-border); }
.steps .st.on { background: var(--mp-accent); }

.login-landing { background: var(--mp-bg); border-top: 1px solid var(--mp-border); padding: clamp(32px, 6vw, 76px) 24px 24px; }
.landing-wrap { max-width: 1160px; margin: 0 auto; }
.landing-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr .9fr; align-items: center; gap: clamp(28px, 5vw, 72px); padding: clamp(30px, 6vw, 68px); border: 1px solid rgba(148,163,184,.16); border-radius: 24px; color: #e2e8f0; background: radial-gradient(ellipse at 82% 18%, rgba(245,158,11,.17), transparent 38%), linear-gradient(135deg,#0b1220,#111d32 62%,#16243a); box-shadow: var(--mp-shadow-lg); }
.landing-hero::after { content: ''; position: absolute; width: 360px; height: 360px; right: 12%; bottom: -290px; border: 1px solid rgba(245,158,11,.2); border-radius: 50%; box-shadow: 0 0 0 34px rgba(245,158,11,.035),0 0 0 68px rgba(245,158,11,.025); pointer-events: none; }
.landing-hero-copy, .landing-preview { position: relative; z-index: 1; }
.landing-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #b77912; font-size: .73rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.landing-hero .landing-eyebrow { color: #fbbf24; }
.landing-hero h2 { margin: 18px 0; color: #fff; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 700; letter-spacing: -.055em; line-height: 1.02; }
.landing-hero h2 span { color: #fbbf24; }
.landing-hero-copy > p { max-width: 520px; margin-bottom: 24px; color: #aab8ca; font-size: 1.04rem; line-height: 1.75; }
.landing-hero .btn { display: inline-flex; align-items: center; gap: 9px; }
.landing-text-link { display: block; width: fit-content; margin-top: 18px; color: #cbd5e1; font-size: .9rem; text-decoration: none; }
.landing-text-link:hover { color: #fbbf24; }
.landing-preview { padding: 20px; border: 1px solid rgba(203,213,225,.16); border-radius: 16px; background: rgba(8,15,28,.76); box-shadow: 0 24px 50px rgba(0,0,0,.24); }
.preview-top, .preview-heading, .preview-work, .preview-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-top { padding-bottom: 15px; border-bottom: 1px solid rgba(148,163,184,.16); color: #d7e0ed; font-size: .78rem; font-weight: 600; }
.preview-top > span:first-child { display: flex; align-items: center; gap: 8px; }
.preview-top > span:first-child i { color: #fbbf24; }
.preview-live { display: inline-flex; align-items: center; gap: 6px; color: #86efac; font-size: .7rem; }
.preview-live i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px rgba(74,222,128,.7); }
.preview-heading { margin: 20px 0 14px; align-items: flex-start; }
.preview-heading div, .preview-work div { display: grid; gap: 5px; }
.preview-heading small, .preview-work small { color: #8190a5; font-size: .62rem; letter-spacing: .1em; }
.preview-heading b { color: #fff; font-size: 1rem; }
.preview-heading > i { color: #8190a5; }
.preview-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preview-stats > div { position: relative; display: grid; gap: 8px; min-height: 88px; padding: 13px; border: 1px solid rgba(148,163,184,.15); border-radius: 11px; background: rgba(30,41,59,.55); }
.preview-stats span { color: #9aa9bd; font-size: .72rem; }
.preview-stats b { max-width: 82%; color: #e8eef7; font-size: .82rem; }
.preview-stats i { position: absolute; right: 12px; top: 12px; color: #fbbf24; font-size: 1.05rem; }
.preview-stats > div:nth-child(2) i { color: #67e8f9; }
.preview-work { justify-content: flex-start; margin-top: 10px; padding: 12px; border: 1px solid rgba(148,163,184,.15); border-radius: 11px; background: rgba(30,41,59,.55); }
.preview-work-icon { width: 34px; height: 34px; display: grid; flex: none; place-items: center; border-radius: 9px; background: rgba(245,158,11,.13); color: #fbbf24; }
.preview-work b { color: #e8eef7; font-size: .77rem; }
.preview-work > i:last-child { color: #8190a5; }
.preview-bars { height: 52px; display: flex; align-items: end; gap: 7px; margin: 17px 0 12px; padding: 0 3px; border-bottom: 1px solid rgba(148,163,184,.2); }
.preview-bars i { flex: 1; height: 42%; border-radius: 4px 4px 0 0; background: linear-gradient(0deg,rgba(245,158,11,.2),#fbbf24); }
.preview-bars i:nth-child(3n) { height: 78%; }.preview-bars i:nth-child(3n + 1) { height: 58%; }.preview-bars i:nth-child(4n) { height: 92%; }
.preview-caption { color: #8492a6; font-size: .64rem; }
.preview-caption span:first-child { display: flex; align-items: center; gap: 6px; }.preview-caption i { color: #86efac; }
.landing-section-head { max-width: 680px; margin: clamp(54px, 8vw, 92px) auto 30px; text-align: center; }
.landing-section-head h2, .landing-flow h2 { margin: 10px 0; color: var(--mp-text); font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 700; letter-spacing: -.04em; }
.landing-section-head p, .landing-flow-intro > p { margin: 0; color: var(--mp-muted); line-height: 1.7; }
.landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.landing-feature { min-height: 195px; padding: 22px; border: 1px solid var(--mp-border); border-radius: 16px; background: var(--mp-surface); box-shadow: var(--mp-shadow); transition: transform .18s ease, box-shadow .18s ease; }
.landing-feature:hover { transform: translateY(-3px); box-shadow: var(--mp-shadow-lg); }
.landing-feature-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; font-size: 1.15rem; }
.feature-amber { color: #b45309; background: #fef3c7; }.feature-blue { color: #1d4ed8; background: #dbeafe; }.feature-green { color: #15803d; background: #dcfce7; }
.feature-purple { color: #7e22ce; background: #f3e8ff; }.feature-cyan { color: #0e7490; background: #cffafe; }.feature-rose { color: #be123c; background: #ffe4e6; }
.landing-feature h3 { margin: 16px 0 7px; color: var(--mp-text); font-size: 1rem; font-weight: 700; }
.landing-feature p { margin: 0; color: var(--mp-muted); font-size: .88rem; line-height: 1.65; }
[data-bs-theme="dark"] .landing-feature-icon { filter: brightness(.82); }
.landing-flow { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: center; margin-top: clamp(52px, 8vw, 88px); padding: clamp(26px, 5vw, 48px); border: 1px solid var(--mp-border); border-radius: 20px; background: var(--mp-surface); box-shadow: var(--mp-shadow); }
.landing-flow-intro h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.landing-steps { display: grid; gap: 8px; }
.landing-step { display: flex; align-items: flex-start; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--mp-border); }
.landing-step:last-child { border-bottom: 0; }
.landing-step > span { color: #d97706; font-family: 'IBM Plex Mono',monospace; font-size: .8rem; font-weight: 600; }
.landing-step b { color: var(--mp-text); font-size: .95rem; }
.landing-step p { margin: 4px 0 0; color: var(--mp-muted); font-size: .84rem; }
.landing-pricing { margin-top: clamp(52px, 8vw, 88px); scroll-margin-top: 24px; }
.landing-pricing .landing-section-head { margin-top: 0; }
.landing-pricing-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.landing-plan { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--mp-border); border-radius: 18px; background: var(--mp-surface); box-shadow: var(--mp-shadow); }
.landing-plan-label { display: inline-flex; align-items: center; gap: 7px; color: #a16207; font-size: .73rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.landing-plan h3 { margin: 12px 0 6px; color: var(--mp-text); font-size: 1.3rem; font-weight: 700; }
.landing-plan > p, .landing-plan-custom-intro > p { min-height: 48px; margin: 0 0 18px; color: var(--mp-muted); font-size: .88rem; line-height: 1.6; }
.landing-plan-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.landing-plan-price { position: relative; display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 5px; padding: 14px; border: 1px solid var(--mp-border); border-radius: 12px; }
.landing-plan-annual { border-color: rgba(217,119,6,.35); background: rgba(245,158,11,.07); }
.landing-price-period { color: var(--mp-muted); font-size: .78rem; font-weight: 600; }
.landing-plan-price strong { color: var(--mp-text); font-size: clamp(1.45rem, 2.5vw, 1.8rem); font-weight: 700; letter-spacing: -.04em; white-space: nowrap; }
.landing-plan-price strong small, .landing-custom-price small { font-size: .7rem; font-weight: 600; letter-spacing: 0; }
.landing-plan-price strong > span { color: var(--mp-muted); font-size: .75rem; font-weight: 500; letter-spacing: 0; }
.landing-price-note { color: var(--mp-muted); font-size: .72rem; line-height: 1.45; }
.landing-price-offer { position: absolute; top: -10px; right: 9px; padding: 3px 7px; border-radius: 20px; background: #d97706; color: #fff; font-size: .64rem; font-weight: 700; }
.landing-plan .btn { min-height: 44px; font-weight: 600; }
.landing-plan-featured { border-color: rgba(217,119,6,.45); box-shadow: 0 10px 30px rgba(217,119,6,.09), var(--mp-shadow); }
.landing-plan-custom { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 30px; margin-top: 16px; border-color: rgba(148,163,184,.16); color: #e2e8f0; background: radial-gradient(ellipse at 82% 18%, rgba(245,158,11,.16), transparent 38%), linear-gradient(135deg,#0b1220,#111d32 62%,#16243a); }
.landing-plan-custom .landing-plan-label { color: #fbbf24; }
.landing-plan-custom h3 { color: #fff; font-size: clamp(1.45rem, 3vw, 2rem); }
.landing-plan-custom-intro > p { min-height: 0; color: #aab8ca; }
.landing-custom-price { display: block; margin: 16px 0 2px; color: #fff; font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 700; letter-spacing: -.05em; }
.landing-plan-custom .landing-price-note { color: #aab8ca; }
.landing-custom-includes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 0; padding: 0; list-style: none; }
.landing-custom-includes li { display: flex; align-items: flex-start; gap: 9px; color: #d7e0ed; font-size: .86rem; line-height: 1.5; }
.landing-custom-includes i { flex: none; color: #86efac; }
.landing-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 0 4px; color: var(--mp-muted); font-size: .82rem; }
.landing-footer-brands { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.landing-footer-brands > span { display: flex; align-items: center; gap: 8px; }
.landing-footer .sb-logo { width: 30px; height: 30px; flex: none; }
.landing-footer-brands > span b { color: var(--mp-text); }
.landing-developed-by { color: var(--mp-muted); font-size: .76rem; }
.landing-developed-by a { display: inline-flex; align-items: center; }
.landing-developed-by img { display: block; width: 108px; height: auto; }
[data-bs-theme="dark"] .landing-developed-by img { filter: brightness(0) invert(1); }
.landing-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.landing-footer a { color: var(--mp-muted); text-decoration: none; }.landing-footer a:hover { color: var(--bs-link-color); }
@media (max-width: 991.98px) { .landing-hero { grid-template-columns: 1fr 1fr; padding: 34px; gap: 24px; }.landing-features { grid-template-columns: repeat(2, 1fr); }.landing-flow { grid-template-columns: 1fr; gap: 20px; }.landing-plan-custom { grid-template-columns: 1fr 1.2fr; gap: 20px; } }
@media (max-width: 700px) { .login-landing { padding: 18px 14px; }.landing-hero { grid-template-columns: 1fr; padding: 28px 22px; border-radius: 18px; }.landing-preview { max-width: 520px; width: 100%; margin: 4px auto 0; }.landing-section-head { margin: 48px auto 24px; }.landing-features { gap: 10px; }.landing-feature { min-height: auto; padding: 17px; }.landing-feature p { font-size: .82rem; }.landing-flow { padding: 24px 20px; }.landing-pricing-plans, .landing-plan-custom { grid-template-columns: 1fr; }.landing-plan-custom { gap: 12px; }.landing-custom-includes { gap: 12px; }.landing-footer { align-items: flex-start; flex-direction: column; gap: 14px; }.landing-footer nav { gap: 12px 18px; } }
@media (max-width: 430px) { .landing-features { grid-template-columns: 1fr; }.landing-feature { display: grid; grid-template-columns: 42px 1fr; column-gap: 13px; align-items: center; }.landing-feature-icon { grid-row: span 2; }.landing-feature h3 { margin: 0 0 4px; }.landing-feature p { grid-column: 2; }.preview-caption { align-items: flex-start; flex-direction: column; gap: 5px; } }

/* Impresión */
@media print { .sidebar, .topbar, .app-footer, .no-print { display: none !important; } .main { margin: 0; } body { background: #fff; } }

/* Utilidades */
.min-w-0 { min-width: 0; }
.mw-100 { max-width: 100% !important; }
.text-purple { color: #8b5cf6; }
.place-items-center { place-items: center; }
.s2-opt .ph { display: grid; place-items: center; background: var(--mp-surface-2); color: var(--mp-muted); }
.btn-check:checked + .btn-soft { background: var(--mp-accent); border-color: var(--mp-accent); color: #111; font-weight: 600; }

/* ---------- Mapas (Leaflet) ---------- */
.leaflet-container { font-family: 'IBM Plex Sans', sans-serif; border-radius: var(--mp-radius); background: var(--mp-surface-2); }
.mp-pin-wrap { background: none; border: none; }
.mp-pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.35); display: grid; place-items: center; }
.mp-pin i { transform: rotate(45deg); color: #fff; font-size: .95rem; }
.mp-pin.sel { animation: pinPulse 1.4s ease-in-out infinite; }
@keyframes pinPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,.6), 0 4px 12px rgba(0,0,0,.35); } 50% { box-shadow: 0 0 0 12px rgba(245,158,11,0), 0 4px 12px rgba(0,0,0,.35); } }
.leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 260px !important; }
.pop-eq img, .pop-eq .ph { width: 100%; height: 120px; object-fit: cover; display: grid; place-items: center; font-size: 2rem; }
.pop-eq .pb { padding: 10px 12px; font-size: .84rem; line-height: 1.45; }
.pop-eq .pb b { font-size: .95rem; }
.pop-eq .pa { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; }
.pop-eq .pa a { flex: 1; text-align: center; font-size: .78rem; padding: 6px 4px; border-radius: 8px; text-decoration: none; background: #f1f5f9; color: #0f172a; font-weight: 600; }
.pop-eq .pa a.pri { background: var(--mp-accent); color: #111; }
.map-wrap { position: relative; height: calc(100vh - var(--topbar-h) - 220px); min-height: 480px; }
.map-wrap #mapa { position: absolute; inset: 0; }
.map-side { max-height: calc(100vh - var(--topbar-h) - 220px); min-height: 480px; overflow: auto; }
.map-legend { position: absolute; left: 12px; bottom: 28px; z-index: 500; background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: 12px; padding: 8px 12px; font-size: .78rem; box-shadow: var(--mp-shadow); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; }
.map-legend span::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.map-pick { height: 260px; border: 1px solid var(--mp-border); border-radius: 12px; }
.map-mini { height: 220px; border: 1px solid var(--mp-border); border-radius: 12px; }
.map-placing #mapa { cursor: crosshair; }
.map-banner { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 600; background: var(--mp-ink); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: .85rem; box-shadow: var(--mp-shadow-lg); white-space: nowrap; }
.side-item { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.side-item:hover, .side-item.on { background: var(--mp-accent-soft); border-color: rgba(245,158,11,.4); }
.side-item .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
@media (max-width: 991.98px) { .map-wrap { height: 62vh; min-height: 380px; } .map-side { max-height: none; min-height: 0; } }
.rounded-3 > .ph, .map-mini > .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 4rem; border-radius: inherit; }
#cal .fc .fc-list-day-cushion, #cal .fc .fc-list-sticky .fc-list-day > * { background: var(--mp-surface-2); }
#cal .fc .fc-list-event:hover td { background: var(--mp-accent-soft); }
