/* FORJA Admin v2 · se carga después de base.css (diseño de la v1) y lo amplía. */
:root { --violet: #B9A6FF; --violetSoft: rgba(185,166,255,.12); }
.ic { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 1.8; }
.btn .ic { width: 14px; height: 14px; }
.nowrap { white-space: nowrap; }
.link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 11px; font-weight: 500; background: none; border: 0; padding: 0; }
.link .ic { width: 13px; height: 13px; }
kbd { font: 500 10px var(--font); color: var(--textMuted); border: 1px solid var(--borderStrong); border-radius: 6px; padding: 2px 6px; background: var(--surface); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 10px; color: var(--textSecondary); background: var(--surfaceStrong); padding: 2px 6px; border-radius: 6px; }

/* ---------- Barra lateral ---------- */
.sidebar { padding: 20px 12px 12px; }
.brand { padding: 0 8px 20px; }
.brand-word small { color: var(--accent); opacity: .8; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: var(--borderStrong) transparent; }
.side-label { margin: 14px 0 6px; padding: 0 10px; }
.side-nav { gap: 1px; margin-bottom: 0; }
.nav-link { height: 32px; padding: 0 10px; gap: 10px; position: relative; font-size: 12px; border-radius: 9px; }
.nav-link .nav-icon { width: 15px; height: 15px; color: var(--textMuted); }
.nav-link.active { background: linear-gradient(90deg, rgba(200,255,61,.22), rgba(200,255,61,.08)); border-color: rgba(245,247,244,.24); color: var(--text); font-weight: 600; }
.nav-link.active .nav-icon { color: var(--accent); }
.nav-link.active:before { left: -12px; }
.sidebar-bottom { padding-top: 10px; border-top: 1px solid var(--border); margin-top: 10px; }

/* ---------- Barra superior ---------- */
.topbar { gap: 14px; }
.global-search { flex: 1; max-width: 460px; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--textMuted); font-size: 12px; text-align: left; }
.global-search span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-search:hover { border-color: var(--borderFocus); }
.top-btn { height: 34px; }
.pop-anchor { position: relative; }
.badge-count { position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--danger); color: #fff; font: 700 9px/15px var(--font); text-align: center; }
.popover { position: absolute; right: 0; top: 44px; width: 320px; z-index: 60; background: var(--surfaceRaised); border: 1px solid var(--borderStrong); border-radius: 14px; padding: 8px; box-shadow: 0 20px 60px #000a; }
.pop-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; font-size: 12px; }
.pop-item { display: flex; gap: 10px; padding: 9px 8px; border-radius: 10px; font-size: 11px; color: var(--textSecondary); }
.pop-item:hover { background: var(--surfaceStrong); color: var(--text); }
.pop-item .ic { color: var(--accent); margin-top: 1px; }
.pop-item small { display: block; color: var(--textMuted); font-size: 10px; margin-top: 2px; }

/* ---------- Encabezado y segmentos ---------- */
.page-heading { margin-bottom: 20px; align-items: center; }
.page-heading h1 { font-size: 26px; margin: 0 0 4px; }
.heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; overflow-x: auto; max-width: 100%; }
.seg-btn { padding: 7px 13px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--textSecondary); font-size: 11px; white-space: nowrap; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: rgba(200,255,61,.16); border-color: rgba(245,247,244,.24); color: var(--text); font-weight: 600; }

/* ---------- KPI ---------- */
.kpi-row5, .kpi-row4 { display: grid; gap: 12px; margin-bottom: 14px; }
.kpi-row5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-row4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi2 { position: relative; display: flex; gap: 13px; padding: 16px; min-height: 96px; overflow: hidden; }
.kpi2-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--border); }
.kpi2-icon .ic { width: 19px; height: 19px; }
.kpi2-icon.sm { width: 32px; height: 32px; border-radius: 9px; }
.kpi2-icon.sm .ic { width: 15px; height: 15px; }
.tone-lime { background: rgba(200,255,61,.10); color: var(--accent); border-color: rgba(200,255,61,.18); }
.tone-info { background: var(--infoSoft); color: var(--info); border-color: rgba(90,180,255,.18); }
.tone-warning { background: var(--warningSoft); color: var(--warning); border-color: rgba(255,181,71,.18); }
.tone-danger { background: var(--dangerSoft); color: var(--danger); border-color: rgba(255,92,92,.18); }
.tone-muted { background: var(--surfaceStrong); color: var(--textMuted); }
.kpi2-body { min-width: 0; flex: 1; }
.kpi2-label { display: block; font-size: 11px; color: var(--textSecondary); font-weight: 500; }
.kpi2-row { display: flex; align-items: baseline; gap: 8px; margin: 5px 0 3px; flex-wrap: wrap; }
.kpi2-value { font-size: 25px; font-weight: 600; letter-spacing: -.05em; line-height: 1.05; }
.kpi2 small { font-size: 10px; color: var(--textMuted); }
.trend { font-size: 11px; }
.trend.down { color: var(--danger); }
.kpi2-spark { position: absolute; right: 14px; bottom: 14px; width: 72px; height: 26px; opacity: .9; }

/* ---------- Rejillas ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.grid-3 { display: grid; grid-template-columns: 1.35fr 1fr 1.25fr; gap: 14px; margin-bottom: 14px; }
.grid-3b { display: grid; grid-template-columns: 1.1fr 1.05fr 1fr; gap: 14px; margin-bottom: 14px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; margin-bottom: 14px; }
.panel { margin-bottom: 0; }
.page-wrap > div > .panel, #pageContent > .panel { margin-bottom: 14px; }
.panel-head { align-items: center; margin-bottom: 12px; }
.chart { height: auto; }
.legend { margin-bottom: 6px; }

/* ---------- Dona ---------- */
.donut-wrap { gap: 26px; min-height: 0; padding: 8px 0; }
.donut { width: 170px; height: 170px; }
.donut-center strong { font-size: 28px; }
.legend-row { gap: 9px; font-size: 11px; }
.legend-row span { display: grid; }
.legend-row span small { color: var(--textMuted); font-size: 10px; }
.legend-row b { font-size: 11px; }

/* ---------- Mapa ---------- */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 14px; align-items: center; }
.map { aspect-ratio: 520 / 270; border-radius: 12px; overflow: hidden; }
.map-svg { width: 100%; height: 100%; display: block; }
.map-svg path:hover { stroke: var(--accent); stroke-width: .8; }
.country-list { display: grid; gap: 11px; }
.flag { display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 4px; border-radius: 5px; background: var(--surfaceStrong); border: 1px solid var(--borderStrong); color: var(--textSecondary); font-size: 9px; font-weight: 700; letter-spacing: .04em; }

/* ---------- Tablas ---------- */
.tabs-line { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: -4px 0 14px; overflow-x: auto; }
.tab-line { padding: 9px 12px 11px; border: 0; background: none; color: var(--textMuted); font-size: 11px; position: relative; white-space: nowrap; }
.tab-line.active { color: var(--text); font-weight: 600; }
.tab-line.active:after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.toolbar .select-mini { padding: 9px 10px; font-size: 11px; }
.searchbox .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--textMuted); width: 15px; height: 15px; }
.table-panel { border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
td { font-size: 11px; }
th { font-size: 10px; }
.cell-strong { color: var(--text); font-weight: 500; }
.tag.role { background: var(--surfaceStrong); color: var(--textSecondary); }
.tag.plan-premium { background: rgba(255,181,71,.9); color: #241500; border-color: transparent; font-weight: 600; }
.tag.plan-prueba { background: rgba(185,166,255,.85); color: #17112e; border-color: transparent; font-weight: 600; }
.tag.plan-gratis { background: var(--surfaceStrong); color: var(--textSecondary); }
.tag.violet { background: var(--violetSoft); color: var(--violet); border-color: rgba(185,166,255,.14); }
.row-actions { display: flex; gap: 5px; }
.icon-action { display: inline-grid; place-items: center; }
.icon-action .ic { width: 14px; height: 14px; }
.icon-action:hover { color: var(--text); border-color: var(--borderFocus); }
.icon-action.danger:hover { color: var(--danger); }
.check { width: 15px; height: 15px; accent-color: var(--accent); padding: 0; }
.bulk-bar { display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin-bottom: 10px; border: 1px solid rgba(200,255,61,.25); background: var(--accentSoft); border-radius: 11px; font-size: 11px; font-weight: 600; flex-wrap: wrap; }
.bulk-bar > span { flex: 1; }
.clip { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.star { color: var(--warning); width: 13px; height: 13px; vertical-align: -2px; }
.inline-progress { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.inline-progress .progress-track { flex: 1; }
.cohort .heat { text-align: center; font-weight: 600; border-radius: 6px; border: 2px solid var(--surface); }
.cohort .heat.empty { background: transparent; }

/* ---------- Accesos rápidos ---------- */
.shortcut-list { display: grid; gap: 12px; align-content: start; }
.shortcut { position: relative; display: flex; gap: 12px; padding: 15px; overflow: hidden; min-height: 108px; transition: border-color .2s, transform .2s; }
.shortcut:hover { border-color: rgba(200,255,61,.3); transform: translateY(-1px); }
.shortcut b { display: block; font-size: 13px; }
.shortcut small { display: block; font-size: 11px; color: var(--textSecondary); margin-top: 3px; }
.shortcut p { font-size: 10px; color: var(--textMuted); margin: 3px 0 7px; max-width: 170px; }
.shortcut > div:nth-child(2) { position: relative; z-index: 1; }
.shortcut-art { position: absolute; right: -18px; bottom: -22px; width: 130px; height: 130px; display: grid; place-items: center; border-radius: 50%; }
.shortcut-art .ic { width: 70px; height: 70px; color: rgba(200,255,61,.16); stroke-width: 1.2; }
.art-0 .shortcut-art, .cover.art-0, .banner-preview.art-0 { background: radial-gradient(circle at 70% 30%, rgba(200,255,61,.22), transparent 60%), linear-gradient(135deg, #1b231a, #0d100f); }
.art-1 .shortcut-art, .cover.art-1, .banner-preview.art-1 { background: radial-gradient(circle at 30% 70%, rgba(90,180,255,.2), transparent 60%), linear-gradient(135deg, #16202a, #0d100f); }
.art-2 .shortcut-art, .cover.art-2, .banner-preview.art-2 { background: radial-gradient(circle at 60% 40%, rgba(255,181,71,.2), transparent 60%), linear-gradient(135deg, #251e14, #0d100f); }
.art-3 .shortcut-art, .cover.art-3, .banner-preview.art-3 { background: radial-gradient(circle at 50% 50%, rgba(185,166,255,.22), transparent 60%), linear-gradient(135deg, #1d1a2a, #0d100f); }

/* ---------- Tarjetas ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.card-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card p { margin: 0; font-size: 11px; color: var(--textMuted); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-actions { display: flex; gap: 7px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.big-num { font-size: 24px; letter-spacing: -.05em; }
.cover { height: 86px; border-radius: 11px; border: 1px solid var(--border); display: flex; align-items: flex-end; padding: 10px 12px; }
.cover span { font-size: 9px; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.macro-line { display: flex; gap: 14px; font-size: 11px; color: var(--textMuted); }
.macro-line b { color: var(--text); }
.plan-card .price { font-size: 28px; font-weight: 600; letter-spacing: -.05em; }
.plan-card .price small { font-size: 12px; color: var(--textMuted); font-weight: 400; letter-spacing: 0; }
.plan-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: 11px; color: var(--textSecondary); }
.plan-card li { display: flex; gap: 7px; align-items: center; }
.plan-card li .ic { width: 13px; height: 13px; color: var(--accent); }
.plan-card.destacado { border-color: rgba(200,255,61,.35); background: linear-gradient(160deg, rgba(200,255,61,.08), rgba(16,18,18,.85) 50%); }
.plan-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; color: var(--textMuted); }
.plan-foot b { color: var(--text); }
.banner-preview { height: 110px; border-radius: 12px; border: 1px solid var(--border); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.banner-preview b { font-size: 14px; max-width: 220px; }
.gym-stats { margin-bottom: 0; }
.code-row code { letter-spacing: .14em; font-size: 11px; color: var(--text); }
.code-row span { flex: 1; }

/* ---------- Mini métricas, progreso, embudo ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.mini-metric b { font-size: 15px; }
.mini-metric b.warn { color: var(--warning); }
.progress-row { font-size: 11px; }
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 60px 46px; gap: 10px; align-items: center; font-size: 11px; color: var(--textSecondary); }
.funnel-row b { color: var(--text); text-align: right; font-weight: 500; }
.funnel-row small { color: var(--textMuted); text-align: right; }
.funnel-bar { height: 22px; background: var(--surfaceStrong); border-radius: 6px; overflow: hidden; }
.funnel-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), rgba(200,255,61,.45)); border-radius: 6px; }

/* ---------- Formularios ---------- */
.field-label { display: grid; gap: 6px; font-size: 11px; color: var(--textSecondary); }
.field-label select, .field-label input, .field-label textarea { width: 100%; }
.editor-form label { font-size: 11px; }
.check-row { display: flex !important; align-items: center; gap: 8px; }
.check-row input { width: auto !important; accent-color: var(--accent); }
.input-suf { display: flex; align-items: center; border: 1px solid var(--borderStrong); border-radius: 10px; background: var(--surface); overflow: hidden; }
.input-suf input { border: 0 !important; background: transparent; flex: 1; }
.input-suf span { padding: 0 11px; font-size: 10px; color: var(--textMuted); white-space: nowrap; }
textarea.mono { font: 12px/1.6 ui-monospace, Consolas, monospace; }
.gif-preview { height: 150px; border-radius: 12px; border: 1px dashed var(--borderStrong); display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--textMuted); font-size: 11px; background: radial-gradient(circle, rgba(200,255,61,.06), transparent 70%); }
.gif-preview .ic { width: 30px; height: 30px; color: var(--accent); }
.catalog-item { cursor: pointer; transition: border-color .2s; }
.catalog-item:hover { border-color: var(--borderFocus); }
.catalog-item.selected { background: var(--accentSoft); border-color: rgba(245,247,244,.24); }
.catalog-thumb .ic { width: 20px; height: 20px; }
.catalog-item .chips { margin-top: 7px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { font-size: 12px; font-weight: 500; display: block; }
.setting-row small { font-size: 10px; color: var(--textMuted); }
.switch { width: 38px; height: 22px; border-radius: 12px; border: 1px solid var(--borderStrong); background: var(--surfaceStrong); position: relative; flex-shrink: 0; padding: 0; transition: background .2s; }
.switch i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--textMuted); transition: transform .2s, background .2s; }
.switch.on { background: rgba(200,255,61,.25); border-color: rgba(200,255,61,.45); }
.switch.on i { transform: translateX(16px); background: var(--accent); }

/* ---------- Notificaciones: vista previa ---------- */
.composer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; margin-bottom: 14px; align-items: start; }
.phone { height: 420px; border-radius: 34px; border: 1px solid var(--borderStrong); background: radial-gradient(circle at 50% 0, rgba(200,255,61,.12), transparent 50%), linear-gradient(180deg, #121614, #070808); padding: 14px; position: relative; }
.phone-notch { width: 90px; height: 22px; border-radius: 12px; background: #000; margin: 0 auto; }
.phone-time { text-align: center; font-size: 46px; font-weight: 300; margin: 30px 0 22px; letter-spacing: -.03em; }
.push { background: rgba(40,45,43,.75); backdrop-filter: blur(14px); border-radius: 16px; padding: 11px 13px; font-size: 11px; }
.push b { display: block; font-size: 12px; margin: 5px 0 2px; }
.push p { margin: 0; color: var(--textSecondary); line-height: 1.4; }
.push-app { display: flex; align-items: center; gap: 6px; color: var(--textMuted); font-size: 10px; }
.brand-mark.xs { width: 16px; height: 16px; font-size: 11px; border-radius: 5px; }
.brand-mark.xs span { width: 9px; height: 2px; right: -2px; bottom: 3px; }

/* ---------- Modal, paleta, ficha ---------- */
.modal.wide { width: min(720px, 100%); }
.modal.palette { width: min(560px, 100%); align-self: start; margin-top: 10vh; }
.searchbox.big input { padding: 13px 14px 13px 38px; font-size: 13px; }
.pal-res { display: grid; gap: 2px; margin-top: 10px; max-height: 360px; overflow: auto; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--textSecondary); text-align: left; font-size: 12px; }
.pal-item span { flex: 1; }
.pal-item small { display: block; font-size: 10px; color: var(--textMuted); }
.pal-item:hover, .pal-item.active { background: var(--surfaceStrong); color: var(--text); border-color: var(--border); }
.ficha-top { display: flex; gap: 13px; align-items: center; margin-bottom: 14px; }
.ficha-top b { font-size: 14px; }
.avatar.lg { width: 50px; height: 50px; font-size: 15px; }
.toast.info { border-color: rgba(90,180,255,.3); }
.toast.info .toast-mark { color: var(--info); }
.toast-mark .ic { width: 16px; height: 16px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 19; }
.mobile-nav a { display: grid; justify-items: center; }
.mobile-nav .ic { width: 18px; height: 18px; }
.muted.ic { color: var(--textMuted); }
.ic.inline { width: 12px; height: 12px; vertical-align: -1px; }

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
  .kpi-row5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 > .panel:first-child { grid-column: 1 / -1; }
  .grid-3b { grid-template-columns: 1fr 1fr; }
  .grid-3b > .panel:first-child { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
  .kpi-row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
  .shortcut-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid, .card-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search span { display: none; }
  .global-search { flex: 0 0 auto; }
  .global-search kbd { display: none; }
}
@media (max-width: 850px) {
  .kpi-row5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3, .grid-3b, .composer-layout, .catalog-layout { grid-template-columns: 1fr; }
  .grid-3 > .panel:first-child, .grid-3b > .panel:first-child { grid-column: auto; }
  .sidebar { display: flex; }
  .top-btn, .top-admin { display: none; }
  .page-heading { flex-direction: column; align-items: flex-start; }
  .heading-actions { justify-content: flex-start; width: 100%; }
  .phone { display: none; }
}
@media (max-width: 560px) {
  .kpi-row5, .kpi-row4 { grid-template-columns: 1fr; }
  .shortcut-list, .card-grid, .card-grid.four { grid-template-columns: 1fr; }
  .map-wrap { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 1fr 50px; }
  .funnel-row .funnel-bar { grid-column: 1 / -1; grid-row: 2; }
  .funnel-row small { display: none; }
  .donut-wrap { flex-direction: column; }
  .seg { width: 100%; }
  .popover { position: fixed; left: 12px; right: 12px; width: auto; top: 64px; }
  .clip { max-width: 160px; }
}

/* ---------- Ajustes tras revisar capturas ---------- */
:root { color-scheme: dark; }
* { scrollbar-width: thin; scrollbar-color: var(--borderStrong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--borderStrong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.chart text { font-size: 12px; }
.kpi2-body { padding-right: 70px; }
.kpi2-spark { top: 50%; bottom: auto; transform: translateY(-10%); }
.donut { width: 150px; height: 150px; }
.donut-wrap { gap: 18px; }
.legend-list { flex: 1; min-width: 150px; }
.legend-row span { flex: 1; }
td { padding: 10px 13px; }
th { padding: 11px 13px; }
.map { background: radial-gradient(ellipse at 40% 50%, rgba(200,255,61,.05), transparent 70%); }
.logo-img { width: 38px; height: 38px; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.logo-img.login-logo { width: 64px; height: 64px; margin-bottom: 6px; }
.logo-img.xs { width: 16px; height: 16px; filter: none; }

/* ---------- Panel conectado ---------- */
.aviso-demo { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 16px; border-color: rgba(185,166,255,.3); }
.aviso-demo .ic { width: 20px; height: 20px; color: var(--violet); }
.aviso-demo b { display: block; font-size: 12px; }
.aviso-demo span { font-size: 11px; color: var(--textMuted); }
.nav-link.demo span:not(.nav-count) { opacity: .62; }
.nav-link.demo .nav-count { font-size: 8px; letter-spacing: .06em; text-transform: uppercase; color: var(--violet); opacity: .75; }
.catalog-thumb.img { object-fit: cover; background: #fff; padding: 0; }
.gif-preview { overflow: hidden; }
.gif-preview img { max-width: 100%; max-height: 146px; border-radius: 10px; background: #fff; }
.media-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.media-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
a.activity-row:hover { background: rgba(255,255,255,.02); }
.live-pill { white-space: nowrap; }
.btn:disabled { opacity: .6; cursor: wait; }

/* ---------- Teléfono ---------- */
.top-logo { display: none; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .14em; font-size: 14px; }
.top-logo img { width: 28px; height: 28px; }
@media (max-width: 850px) {
  .top-logo { display: flex; }
  .topbar { justify-content: flex-start; gap: 6px; }
  .global-search { order: 3; margin-left: auto; width: 34px; height: 34px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .top-actions { order: 4; }
  .page-heading .live-pill { display: flex; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .modal.palette { margin-top: 0; align-self: end; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1 1 45%; }
}
@media (max-width: 560px) {
  .page-wrap { padding: 16px 12px 92px; }
  .page-heading h1 { font-size: 21px; }
  .page-heading p { font-size: 11px; }
  .kpi-row5, .kpi-row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi-row5 > .kpi2:first-child { grid-column: 1 / -1; }
  .kpi2 { flex-direction: column; gap: 8px; padding: 12px; min-height: 0; }
  .kpi2-icon { width: 30px; height: 30px; border-radius: 9px; }
  .kpi2-icon .ic { width: 15px; height: 15px; }
  .kpi2-body { padding-right: 0; }
  .kpi2-label { font-size: 10px; }
  .kpi2-value { font-size: 21px; }
  .kpi2 small { display: block; font-size: 9px; line-height: 1.3; }
  .kpi2-spark { display: none; }
  .kpi-row5 > .kpi2:first-child .kpi2-spark { display: block; top: 14px; transform: none; }
  .panel { padding: 13px; border-radius: 15px; }
  .grid-2, .grid-3, .grid-3b, .grid-main { gap: 10px; margin-bottom: 10px; }
  .table-panel { border: 0; border-radius: 0; }
  section.table-panel, .panel .table-panel { margin: 0 -4px; }
  tbody { padding: 0; gap: 7px; }
  tbody tr { position: relative; padding: 10px 12px; }
  tbody td { padding: 3px 0; font-size: 11px; }
  tbody td:first-child { padding: 0 44px 8px 0; }
  tbody td:last-child:has(.icon-action, .btn, .row-actions) { position: absolute; top: 8px; right: 8px; padding: 0; border: 0; }
  tbody td:last-child:has(.icon-action, .btn, .row-actions)::before { display: none; }
  .toolbar { gap: 7px; }
  .toolbar .select-mini { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .catalog-item { padding: 10px; gap: 10px; }
  .catalog-thumb { width: 42px; height: 42px; }
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mini-metric { padding: 9px; }
  .mini-metric b { font-size: 13px; }
  .shortcut-list { grid-template-columns: 1fr; }
  .shortcut { min-height: 0; }
  .activity-row { flex-wrap: wrap; }
  .activity-row .activity-copy { min-width: 60%; }
  .heading-actions { gap: 6px; }
  .heading-actions .seg { flex: 1; }
  .seg-btn { flex: 1; padding: 7px 8px; }
  .card-grid, .card-grid.four { grid-template-columns: 1fr; gap: 10px; }
  .report-card { padding: 12px; }
  .table-footer { padding: 10px 4px; }
  .pagination { flex-wrap: wrap; }
}
@media (max-width: 850px) {
  .sidebar.open { z-index: 45; }
  .scrim { z-index: 44; }
  .sidebar { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
