/* Publifia — Apple-style liquid-glass buttons, applied dashboard-wide.
   Pure-CSS retrofit (no markup changes): translucent fill + backdrop blur +
   layered speculars + a gentle SVG refraction, with a magnify-on-hover feel. */

/* The design canvas rendered the app at 75% zoom to fit its preview frame.
   In the real app we render at native scale, so the shell just fills the viewport. */
#publifia-dash { width: 100%; height: 100vh; overflow: hidden; }

/* "opportunities discovered" counter → dark glass bubble (flat fill, no gradient) + dots */
.nc-counter {
  position: relative; overflow: hidden;
  background: rgba(255,255,255,0.045) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(135,138,145,0.24) !important;
  box-shadow:
    inset 0 1px 0.5px rgba(255,255,255,0.22),
    inset 0 -1px 1px rgba(0,0,0,0.3),
    0 12px 34px -18px rgba(0,0,0,0.7) !important;
}
.nc-counter::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0) 42%),
    radial-gradient(rgba(255,255,255,0.16) 1.3px, transparent 1.5px),
    radial-gradient(rgba(171,173,178,0.22) 1.3px, transparent 1.5px);
  background-size: auto, 18px 18px, 18px 18px;
  background-position: 0 0, 0 0, 9px 9px;
  -webkit-mask-image: radial-gradient(135% 135% at 100% 0%, #000 12%, transparent 72%);
  mask-image: radial-gradient(135% 135% at 100% 0%, #000 12%, transparent 72%);
}
.nc-counter > * { position: relative; z-index: 1; }
.nc-counter .prog {
  background: rgba(255,255,255,0.08) !important;
  box-shadow: inset 0 1px 1.5px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.07);
}
.nc-counter .prog i {
  position: relative;
  background: rgba(153,156,161,0.98) !important;
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.7), 0 0 12px rgba(107,110,116,0.6);
}
.nc-counter .prog i::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0) 55%);
}

/* Jordan Avery user pill → Apple liquid-glass bubble */
.sb-user {
  position: relative; overflow: hidden;
  padding: 9px 11px !important; margin-top: 8px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03)) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    inset 0 1px 0.5px rgba(255,255,255,0.35),
    inset 0 -1px 1px rgba(0,0,0,0.3),
    0 8px 22px -14px rgba(0,0,0,0.6);
  transition: transform .2s cubic-bezier(.2,.9,.3,1), border-color .18s, box-shadow .18s;
}
.sb-user::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 45%);
  mix-blend-mode: screen;
}
.sb-user:hover {
  transform: translateY(-1px);
  border-color: rgba(135,138,145,0.4);
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.4), 0 10px 26px -14px rgba(107,110,116,0.6);
}
.sb-user > * { position: relative; z-index: 1; }
.sb-user .av {
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(153,156,161,0.95), rgba(163,165,170,0.95)) !important;
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.6), inset 0 -1px 2px rgba(0,0,0,0.3), 0 4px 12px -4px rgba(107,110,116,0.7);
  border: 1px solid rgba(255,255,255,0.18);
}

/* buttons that become glass bubbles */
.cta,
.ibtn,
.greet .gbtn,
.btn3,
.fchip,
.ex-cta,
.audit-btn,
.daterange button,
.se-btn,
.se-x,
.mx-ic,
.mx-seg button,
.se-seg button,
.sv-seg .sv-opt,
.nc-seg button,
.nc-x,
.gbtn.w {
  position: relative;
  -webkit-backdrop-filter: blur(9px) saturate(1.25);
  backdrop-filter: blur(9px) saturate(1.25);
  transition: transform .24s cubic-bezier(.2,.9,.3,1), filter .2s ease, box-shadow .2s ease, background .2s ease;
  overflow: hidden;
}

/* translucent, refractive fills so the blur reads as glass */
.cta { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); color: #fff; }
.ibtn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); }
.btn3 { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); }
.fchip { background: rgba(255,255,255,0.04); }
.daterange { background: rgba(255,255,255,0.04); }
.se-btn { background: rgba(255,255,255,0.05); }
.greet .gbtn { background: rgba(226,227,228,0.075); }

/* primary / accent bubbles keep purple but go translucent */
.audit-btn,
.btn3.pp,
.gbtn.w,
.se-btn.primary,
.ex-cta {
  background: rgba(135,138,145,0.92) !important;
  border: 1px solid rgba(255,255,255,0.28) !important;
  color: #fff !important;
}

/* top specular sheen + glass edge — sits above bg, below the label */
.cta::after,
.ibtn::after,
.greet .gbtn::after,
.btn3::after,
.fchip::after,
.ex-cta::after,
.audit-btn::after,
.daterange button::after,
.se-btn::after,
.mx-ic::after,
.gbtn.w::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, rgba(255,255,255,0.30), rgba(255,255,255,0.05) 34%, rgba(255,255,255,0) 55%);
  box-shadow:
    inset 0 1px 0.5px rgba(255,255,255,0.55),
    inset 0 -1px 1px rgba(0,0,0,0.30),
    inset 1px 0 1px rgba(255,255,255,0.12),
    inset -1px 0 1px rgba(255,255,255,0.12);
  mix-blend-mode: screen;
}

/* refractive backdrop distortion (gentle) on the roomy bubbles */
.cta::before,
.ex-cta::before,
.audit-btn::before,
.gbtn.w::before,
.se-btn.primary::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; z-index: 1; pointer-events: none;
  -webkit-backdrop-filter: blur(2px) url(#lg-distort);
  backdrop-filter: blur(2px) url(#lg-distort);
}

/* keep the label crisp above the glass layers */
.cta > *, .btn3 > *, .greet .gbtn > *, .ex-cta > *, .audit-btn > *,
.se-btn > *, .mx-ic > svg, .ibtn > svg { position: relative; z-index: 3; }

/* magnify on hover, press in on active */
.cta:hover,
.ibtn:hover,
.greet .gbtn:hover,
.btn3:hover,
.fchip:hover,
.ex-cta:hover,
.audit-btn:hover,
.se-btn:hover,
.mx-ic:hover,
.gbtn.w:hover { transform: scale(1.05); filter: brightness(1.07) saturate(1.05); }

.cta:active,
.btn3:active,
.greet .gbtn:active,
.ex-cta:active,
.audit-btn:active,
.se-btn:active,
.gbtn.w:active { transform: scale(0.97); filter: brightness(0.98); }

/* segmented pills: glassy selected chip */
.mx-seg button.on,
.se-seg button.on,
.daterange button.on,
.nc-seg button.on {
  background: rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.5), 0 2px 6px rgba(0,0,0,0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* reduced motion: no magnify */
@media (prefers-reduced-motion: reduce) {
  .cta, .ibtn, .btn3, .greet .gbtn, .ex-cta, .audit-btn, .se-btn, .mx-ic, .gbtn.w { transition: none; }
  .cta:hover, .ibtn:hover, .btn3:hover, .greet .gbtn:hover, .ex-cta:hover, .audit-btn:hover, .se-btn:hover, .mx-ic:hover, .gbtn.w:hover { transform: none; }
}

/* =====================================================================
   EXTENDED GLASS — vivid CTA, frosted cards, glass chips & display text
   ===================================================================== */

/* top-right primary CTA: bright solid button, dark label — must read at a glance */
.cta {
  background: #f4f5f7 !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
  color: #101013 !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 26px -10px rgba(0,0,0,0.7), inset 0 1px 0.5px rgba(255,255,255,0.8) !important;
}
.cta:hover { background: #fff !important; color: #101013 !important; }
.cta svg { color: #101013; }
.cta::before, .cta::after { display: none !important; }

/* cards become frosted glass panels (skip the image/gradient tiles) */
.tile:not(.hero):not(.greet):not(.maptile):not(.explore-tile) {
  background: rgba(255,255,255,0.045) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    inset 0 1px 0.5px rgba(255,255,255,0.30),
    inset 0 -1px 1px rgba(0,0,0,0.22),
    0 12px 36px -18px rgba(0,0,0,0.6);
}

/* stat cards, pills & badges → small glass bubbles */
.greet-stats .gstat,
.hero .hp,
.stbadge, .badge2, .role, .sb-item .ct, .kbd, .np-count, .rc-chip, .rc-rel {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.42), inset 0 -1px 1px rgba(0,0,0,0.28);
}
.greet-stats .gstat {
  background: rgba(226,227,228,0.075) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}

/* frosted floating panels */
.notif-pop, .search-pop, .ai-panel {
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  background: rgba(20,20,28,0.72) !important;
}

/* glassy display text — subtle top-lit sheen, blended like Apple UI */
.greet .hi, .hero .big {
  background: linear-gradient(178deg, #ffffff 0%, #dbd2c7 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0.5px rgba(255,255,255,0.12));
}
.kmini .v, .mt-stat .v, .cc-stat .n, .cc-name {
  text-shadow: 0 1px 0 rgba(255,255,255,0.14), 0 0 16px rgba(255,255,255,0.05);
}
/* greeting stats read as crisp numbers, not frosted glass */
.greet-stats .gstat {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(226,227,228,0.055) !important;
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.16) !important;
}
.greet-stats .gs-n { text-shadow: none; color: #f4f5f7; -webkit-font-smoothing: antialiased; }
.greet-stats .gs-l { color: rgba(226,227,228,0.62); font-weight: 550; }
.mn-top h1 {
  background: linear-gradient(178deg, #ffffff 0%, #d9d0c5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* filter chips (Studio / Campaigns): clearer glass, vivid selected state */
.fchip {
  background: rgba(226,227,228,0.075) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  color: var(--txt) !important;
}
.fchip:hover { background: rgba(255,255,255,0.11) !important; border-color: rgba(255,255,255,0.2) !important; }
.fchip.on {
  background: rgba(189,191,194,0.96) !important;
  border: 1px solid rgba(255,255,255,0.32) !important;
  color: #fff !important;
  box-shadow: 0 5px 16px -6px rgba(107,110,116,0.85), inset 0 1px 0.5px rgba(255,255,255,0.55);
}

/* secondary primary buttons (Schedule pitch, Invite member) → graphite glass,
   distinct from the purple .cta so adjacent CTAs don't read as identical */
.btn3.pp {
  background: linear-gradient(180deg, rgba(62,64,82,0.92), rgba(42,44,58,0.88)) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,0.6), inset 0 1px 0.5px rgba(255,255,255,0.4) !important;
}
.btn3.pp:hover { filter: brightness(1.15); }

/* plan-usage bar → liquid glass track + glossy fill */
.usebar .ub-track {
  background: rgba(226,227,228,0.075) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 1.5px rgba(0,0,0,0.4), inset 0 -1px 0.5px rgba(255,255,255,0.12), inset 0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden;
}
.usebar .ub-track span {
  position: relative;
  background: rgba(189,191,195,0.98) !important;
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.65), 0 0 12px rgba(107,110,116,0.5);
}
.usebar .ub-track span::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0) 55%);
}

/* greeting left accent bar → glossy liquid-glass rail */
.greet::before {
  width: 4px !important;
  background: rgba(191,193,196,0.98) !important;
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.7), inset -1px 0 1px rgba(255,255,255,0.25), 0 0 12px rgba(107,110,116,0.55);
  opacity: 1 !important;
}

/* map location dots → glossy liquid-glass bubbles */
.mini-pin span,
.mx-pin-dot {
  background:
    radial-gradient(circle at 33% 27%, rgba(255,255,255,0.9), rgba(255,255,255,0) 42%),
    var(--c) !important;
  box-shadow:
    inset 0 -1.5px 2px rgba(0,0,0,0.4),
    inset 0 1px 1px rgba(255,255,255,0.55),
    0 2px 6px rgba(0,0,0,0.5),
    0 0 8px color-mix(in srgb, var(--c) 55%, transparent) !important;
}

/* Coverage Intel hero: dark glass card with a purple glow accent (not full purple) */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(115% 115% at 100% 0%, rgba(107,110,116,0.34), transparent 58%),
    rgba(255,255,255,0.05) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
  border: 1px solid rgba(135,138,145,0.24) !important;
  box-shadow:
    inset 0 1px 0.5px rgba(255,255,255,0.28),
    0 12px 36px -18px rgba(0,0,0,0.6),
    0 0 34px -14px rgba(107,110,116,0.55) !important;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,0.16) 1.3px, transparent 1.5px),
    radial-gradient(rgba(171,173,178,0.20) 1.3px, transparent 1.5px);
  background-size: 19px 19px, 19px 19px;
  background-position: 0 0, 9.5px 9.5px;
  -webkit-mask-image: radial-gradient(130% 130% at 100% 0%, #000 10%, transparent 70%);
  mask-image: radial-gradient(130% 130% at 100% 0%, #000 10%, transparent 70%);
}
.hero > * { position: relative; z-index: 1; }
.hero .hp { background: rgba(255,255,255,0.08) !important; }

/* Greeting box: same dark-glass + purple-glow + dotted style as the hero */
.greet {
  overflow: hidden;
  background:
    radial-gradient(118% 130% at 100% 0%, rgba(107,110,116,0.30), transparent 56%),
    rgba(255,255,255,0.045) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
  border: 1px solid rgba(135,138,145,0.20) !important;
  box-shadow:
    inset 0 1px 0.5px rgba(255,255,255,0.26),
    0 12px 36px -18px rgba(0,0,0,0.6),
    0 0 34px -16px rgba(107,110,116,0.5) !important;
}
.greet::after {
  background-image:
    radial-gradient(rgba(255,255,255,0.14) 1.3px, transparent 1.5px),
    radial-gradient(rgba(171,173,178,0.18) 1.3px, transparent 1.5px) !important;
  background-size: 19px 19px, 19px 19px !important;
  background-position: 0 0, 9.5px 9.5px !important;
  -webkit-mask-image: radial-gradient(130% 130% at 100% 0%, #000 10%, transparent 70%) !important;
  mask-image: radial-gradient(130% 130% at 100% 0%, #000 10%, transparent 70%) !important;
}

/* ===== Modern minimal scrollbars (app-wide) ===== */
* { scrollbar-width: thin; scrollbar-color: rgba(135,138,145,0.35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background .18s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(135,138,145,0.5); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
/* override the older chunky main-scroll thumb */
.mn-scroll::-webkit-scrollbar { width: 8px; }
.mn-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
.mn-scroll::-webkit-scrollbar-thumb:hover { background: rgba(135,138,145,0.5); background-clip: padding-box; }

/* Overview greeting card: crisp, no frosted blur (it softened the text) */
.greet {
  background:
    radial-gradient(118% 130% at 100% 0%, rgba(107,110,116,0.22), transparent 56%),
    var(--surface) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.greet::before, .greet::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; filter: none !important; }
.greet .hi {
  background: none !important;
  -webkit-background-clip: border-box !important; background-clip: border-box !important;
  -webkit-text-fill-color: #fff; color: #fff;
  text-shadow: none !important;
}
.greet, .greet * { text-rendering: optimizeLegibility; }
