/* Cuik UI Core v4.9.2
   Capa visual compartida: tooltips, marca blanca, menús colapsables y fullscreen por tarjeta. */
:root {
  --cuik-ui-purple: #8d5cff;
  --cuik-ui-panel: rgba(18, 16, 27, .97);
  --cuik-ui-text: #f8f7ff;
  --cuik-ui-muted: #a9a4b6;
  --cuik-ui-line: rgba(255,255,255,.12);
  --cuik-ui-shadow: 0 22px 70px rgba(0,0,0,.48);
}

#cuikGlobalTooltip {
  position: fixed;
  z-index: 2147483646;
  max-width: min(260px, calc(100vw - 24px));
  padding: 7px 10px;
  border: 1px solid var(--cuik-ui-line);
  border-radius: 9px;
  background: var(--cuik-ui-panel);
  box-shadow: var(--cuik-ui-shadow);
  color: var(--cuik-ui-text);
  font: 750 11px/1.25 Inter, ui-sans-serif, system-ui, sans-serif;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
  white-space: normal;
}
#cuikGlobalTooltip.is-visible { opacity: 1; transform: translateY(0); }
@media (hover:none), (pointer:coarse) { #cuikGlobalTooltip { display:none!important; } }

.cuik-card-fullscreen-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 18;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--cuik-ui-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--cuik-ui-panel) 88%, transparent);
  color: inherit;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.cuik-card-fullscreen-button:hover,
.cuik-card-fullscreen-button:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--cuik-ui-purple) 68%, white 10%);
  outline: none;
}
.cuik-card-fullscreen-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cuik-fullscreen-ready { position: relative!important; }
.cuik-fullscreen-ready > .card-head,
.cuik-fullscreen-ready > .section-head,
.cuik-fullscreen-ready > header { padding-right: 52px; }

.cuik-fullscreen-ready:fullscreen,
.cuik-fullscreen-ready:-webkit-full-screen {
  width: 100vw!important;
  height: 100vh!important;
  max-width: none!important;
  max-height: none!important;
  min-height: 100vh!important;
  margin: 0!important;
  padding: clamp(16px, 2vw, 30px)!important;
  border: 0!important;
  border-radius: 0!important;
  background: var(--bg, var(--panel-solid, var(--cuik-ui-panel)))!important;
  overflow: auto!important;
  box-sizing: border-box!important;
}
.cuik-fullscreen-ready:fullscreen .chart,
.cuik-fullscreen-ready:fullscreen .chart-wrap,
.cuik-fullscreen-ready:fullscreen canvas,
.cuik-fullscreen-ready:-webkit-full-screen .chart,
.cuik-fullscreen-ready:-webkit-full-screen .chart-wrap,
.cuik-fullscreen-ready:-webkit-full-screen canvas {
  width: 100%!important;
  max-width: none!important;
}
.cuik-fullscreen-ready:fullscreen .chart,
.cuik-fullscreen-ready:fullscreen .chart-wrap,
.cuik-fullscreen-ready:-webkit-full-screen .chart,
.cuik-fullscreen-ready:-webkit-full-screen .chart-wrap {
  min-height: min(72vh, 760px)!important;
  height: calc(100vh - 150px)!important;
}

/* Consultar Fichas: colapso real en escritorio y panel móvil. */
.cuik-fichas-menu-button { flex: 0 0 auto; }
body.cuik-fichas-sidebar-collapsed .fichas-layout { grid-template-columns: 82px minmax(0,1fr); }
body.cuik-fichas-sidebar-collapsed .fichas-user-card > div:last-child,
body.cuik-fichas-sidebar-collapsed .fichas-nav a span,
body.cuik-fichas-sidebar-collapsed .fichas-security-note > div { display:none!important; }
body.cuik-fichas-sidebar-collapsed .fichas-user-card,
body.cuik-fichas-sidebar-collapsed .fichas-nav a { justify-content:center; padding-left:8px; padding-right:8px; }
body.cuik-fichas-sidebar-collapsed .fichas-security-note { right:12px; left:12px; justify-content:center; }
.cuik-fichas-backdrop { display:none; }
@media (max-width:780px) {
  .cuik-fichas-backdrop {
    position: fixed;
    inset: 0;
    z-index: 74;
    display: block;
    border: 0;
    background: rgba(0,0,0,.58);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  body.cuik-fichas-sidebar-open { overflow:hidden; }
  body.cuik-fichas-sidebar-open .cuik-fichas-backdrop { opacity:1; pointer-events:auto; }
  .fichas-layout { display:block!important; }
  .fichas-sidebar {
    position: fixed!important;
    inset: 0 auto 0 0!important;
    z-index: 75!important;
    display: flex!important;
    width: min(310px, 86vw)!important;
    height: 100vh!important;
    flex-direction: column!important;
    align-items: stretch!important;
    gap: 14px!important;
    padding: 18px 14px!important;
    border-right: 1px solid var(--line)!important;
    border-bottom: 0!important;
    overflow: auto!important;
    transform: translateX(-104%);
    transition: transform .22s ease;
  }
  body.cuik-fichas-sidebar-open .fichas-sidebar { transform: translateX(0); }
  .fichas-sidebar .fichas-user-card { display:flex!important; }
  .fichas-sidebar .fichas-nav { display:grid!important; flex:0 0 auto!important; margin-top:8px!important; }
  .fichas-sidebar .fichas-nav a { justify-content:flex-start!important; min-height:44px!important; }
  .fichas-sidebar .fichas-security-note { position:static!important; display:flex!important; margin-top:auto; }
}

/* Campaña Refiere: shell con menú colapsable. */
body.cuik-referrals-shell { overflow-x:hidden; }
.cuik-referral-layout { min-height:100vh; }
.cuik-referral-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 72;
  width: 250px;
  padding: 20px 14px;
  border-right: 1px solid var(--line, var(--cuik-ui-line));
  background: color-mix(in srgb, var(--bg, #0b0a10) 94%, transparent);
  backdrop-filter: blur(18px);
  transition: width .22s ease, transform .22s ease;
  overflow:auto;
}
.cuik-referral-side-brand { display:flex; align-items:center; gap:11px; min-height:58px; padding:5px 46px 18px 8px; }
.cuik-referral-side-mark { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; overflow:hidden; border-radius:13px; background:linear-gradient(135deg,#fff,#d9ccff); color:#17111f; font-weight:950; }
.cuik-referral-side-mark img { width:100%; height:100%; object-fit:contain; padding:5px; }
.cuik-referral-side-copy { display:grid; gap:2px; min-width:0; }
.cuik-referral-side-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cuik-referral-side-copy small { color:var(--muted, var(--cuik-ui-muted)); }
.cuik-referral-nav { display:grid; gap:7px; }
.cuik-referral-nav a { display:flex; align-items:center; gap:11px; min-height:44px; padding:0 12px; border:1px solid transparent; border-radius:12px; color:var(--muted, var(--cuik-ui-muted)); text-decoration:none; font-size:12px; font-weight:800; }
.cuik-referral-nav a:hover,.cuik-referral-nav a.active { border-color:rgba(140,82,255,.32); background:rgba(140,82,255,.14); color:var(--text, var(--cuik-ui-text)); }
.cuik-referral-nav svg { width:18px; height:18px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.cuik-referral-sidebar-toggle {
  position:absolute; top:24px; right:12px; z-index:2;
  width:34px; height:34px; min-height:34px; padding:0;
  display:grid; place-items:center;
  border:1px solid var(--line, var(--cuik-ui-line)); border-radius:11px;
  color:var(--text, var(--cuik-ui-text)); background:var(--surface-2, rgba(255,255,255,.06));
  box-shadow:0 8px 22px rgba(0,0,0,.18); cursor:pointer;
  transition:transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.cuik-referral-sidebar-toggle:hover { transform:translateY(-1px); border-color:rgba(140,82,255,.55); color:var(--purple-2, #b177ff); }
.cuik-referral-sidebar-toggle:focus-visible { outline:3px solid rgba(140,82,255,.28); outline-offset:2px; }
.cuik-referral-sidebar-toggle svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.cuik-referral-main { margin-left:250px; min-width:0; transition:margin-left .22s ease; }
.cuik-referral-main > .app { max-width:none; }
body.cuik-referral-sidebar-collapsed .cuik-referral-sidebar { width:78px; }
body.cuik-referral-sidebar-collapsed .cuik-referral-main { margin-left:78px; }
body.cuik-referral-sidebar-collapsed .cuik-referral-side-copy,
body.cuik-referral-sidebar-collapsed .cuik-referral-nav span { display:none; }
body.cuik-referral-sidebar-collapsed .cuik-referral-side-brand { justify-content:center; min-height:auto; padding:5px 0 8px; }
body.cuik-referral-sidebar-collapsed .cuik-referral-sidebar-toggle { position:relative; top:auto; right:auto; margin:0 auto 12px; }
body.cuik-referral-sidebar-collapsed .cuik-referral-nav a { justify-content:center; padding-left:8px; padding-right:8px; }
.cuik-referral-mobile-menu { display:none!important; }
.cuik-referral-backdrop { display:none; }
@media(max-width:980px) {
  .cuik-referral-sidebar { width:min(310px,86vw); transform:translateX(-104%); }
  .cuik-referral-side-brand { padding-right:52px; }
  .cuik-referral-sidebar-toggle { top:18px; right:14px; width:36px; height:36px; min-height:36px; }
  .cuik-referral-main, body.cuik-referral-sidebar-collapsed .cuik-referral-main { margin-left:0; }
  body.cuik-referral-sidebar-collapsed .cuik-referral-side-brand { justify-content:flex-start; min-height:58px; padding:5px 52px 18px 8px; }
  body.cuik-referral-sidebar-collapsed .cuik-referral-side-copy { display:grid; }
  body.cuik-referral-sidebar-collapsed .cuik-referral-sidebar-toggle { position:absolute; top:18px; right:14px; margin:0; }
  body.cuik-referral-sidebar-collapsed .cuik-referral-nav span { display:inline; }
  body.cuik-referral-sidebar-collapsed .cuik-referral-nav a { justify-content:flex-start; padding:0 12px; }
  body.cuik-referral-sidebar-open { overflow:hidden; }
  body.cuik-referral-sidebar-open .cuik-referral-sidebar { transform:translateX(0); }
  .cuik-referral-mobile-menu { display:grid!important; }
  .cuik-referral-backdrop { position:fixed; inset:0; z-index:71; display:block; border:0; background:rgba(0,0,0,.58); backdrop-filter:blur(6px); opacity:0; pointer-events:none; transition:opacity .2s ease; }
  body.cuik-referral-sidebar-open .cuik-referral-backdrop { opacity:1; pointer-events:auto; }
}

/* El branding dinámico siempre conserva la proporción del logo. */
[data-cuik-brand-logo], .cuik-dynamic-brand-logo { max-width:100%; max-height:100%; object-fit:contain; }


/* v4.9.2 · Fullscreen coherente con tema y gráfica diaria centrada */
html[data-theme="light"],html[data-cuik-theme="light"],body.theme-light {
  --cuik-ui-panel:#ffffff; --cuik-ui-text:#171326; --cuik-ui-muted:#655d75; --cuik-ui-line:rgba(72,49,117,.16); --cuik-ui-shadow:0 22px 60px rgba(50,35,85,.16);
}
html[data-theme="light"] .cuik-card-fullscreen-button,html[data-cuik-theme="light"] .cuik-card-fullscreen-button,body.theme-light .cuik-card-fullscreen-button {
  background:rgba(255,255,255,.94)!important; color:#24183b!important; border-color:rgba(72,49,117,.2)!important; box-shadow:0 10px 24px rgba(50,35,85,.13)!important;
}
html[data-theme="light"] .cuik-card-fullscreen-button:hover,html[data-cuik-theme="light"] .cuik-card-fullscreen-button:hover,body.theme-light .cuik-card-fullscreen-button:hover { background:#f3edff!important; color:#6d28d9!important; }
html[data-theme="light"] .cuik-fullscreen-ready:fullscreen,html[data-theme="light"] .cuik-fullscreen-ready:-webkit-full-screen,html[data-cuik-theme="light"] .cuik-fullscreen-ready:fullscreen,html[data-cuik-theme="light"] .cuik-fullscreen-ready:-webkit-full-screen,body.theme-light .cuik-fullscreen-ready:fullscreen {
  --bg:#f6f3ff; --panel:#ffffff; --panel-solid:#ffffff; --text:#171326; --muted:#655d75; --line:rgba(72,49,117,.16);
  background:#f6f3ff!important; color:#171326!important; border-color:transparent!important;
}
html[data-theme="light"] .cuik-fullscreen-ready:fullscreen :where(.card-head,.section-head,header,.chart,.chart-wrap,.panel,.table-wrap),html[data-cuik-theme="light"] .cuik-fullscreen-ready:fullscreen :where(.card-head,.section-head,header,.chart,.chart-wrap,.panel,.table-wrap),body.theme-light .cuik-fullscreen-ready:fullscreen :where(.card-head,.section-head,header,.chart,.chart-wrap,.panel,.table-wrap) { background-color:transparent!important; color:#171326!important; }
html[data-theme="light"] .cuik-fullscreen-ready:fullscreen :where(h1,h2,h3,h4,strong,svg text),html[data-cuik-theme="light"] .cuik-fullscreen-ready:fullscreen :where(h1,h2,h3,h4,strong,svg text),body.theme-light .cuik-fullscreen-ready:fullscreen :where(h1,h2,h3,h4,strong,svg text) { color:#171326!important; fill:#171326; }
html[data-theme="light"] .cuik-fullscreen-ready:fullscreen :where(p,.note,.muted,small),html[data-cuik-theme="light"] .cuik-fullscreen-ready:fullscreen :where(p,.note,.muted,small),body.theme-light .cuik-fullscreen-ready:fullscreen :where(p,.note,.muted,small) { color:#655d75!important; }
.cuik-fullscreen-ready[data-cuik-fullscreen-layout="daily-placement"]:fullscreen,.cuik-fullscreen-ready[data-cuik-fullscreen-layout="daily-placement"]:-webkit-full-screen {
  display:grid!important; grid-template-rows:auto minmax(0,1fr)!important; align-items:stretch!important; overflow:hidden!important;
}
.cuik-fullscreen-ready[data-cuik-fullscreen-layout="daily-placement"]:fullscreen #chartDailyPlacement,.cuik-fullscreen-ready[data-cuik-fullscreen-layout="daily-placement"]:-webkit-full-screen #chartDailyPlacement {
  place-self:center stretch!important; width:100%!important; height:min(68vh,720px)!important; min-height:360px!important; max-height:720px!important; margin:auto 0!important;
}
