/* === UNIVERSAL REACTVIBE ULTRA-GLASS BACKGROUND SYSTEM ===
   Exact replica of https://uzkiro.com/crm background across every page.
*/
:root {
  --mouse-x: 50vw;
  --mouse-y: 30vh;
}

html, body {
  background-color: #030712 !important;
  color: #f8fafc !important;
  color-scheme: dark !important;
  position: relative !important;
}

body::before, html::before {
  display: none !important;
}

.reactvibe-bg {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
}

.reactvibe-dots-base {
  position: absolute !important;
  inset: 0 !important;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) !important;
  background-size: 28px 28px !important;
}

.reactvibe-dots-spotlight {
  position: absolute !important;
  inset: 0 !important;
  background-image: radial-gradient(rgba(56, 189, 248, 0.28) 1.5px, transparent 1.5px) !important;
  background-size: 28px 28px !important;
  mask-image: radial-gradient(circle 380px at var(--mouse-x, 50vw) var(--mouse-y, 30vh), black 0%, transparent 100%) !important;
  -webkit-mask-image: radial-gradient(circle 380px at var(--mouse-x, 50vw) var(--mouse-y, 30vh), black 0%, transparent 100%) !important;
}

.reactvibe-radial-glow {
  position: absolute !important;
  inset: 0 !important;
  background: 
    radial-gradient(circle at var(--mouse-x, 50vw) var(--mouse-y, 30vh), rgba(56, 189, 248, 0.12) 0%, rgba(129, 140, 248, 0.05) 35%, transparent 65%),
    radial-gradient(circle at 10% 90%, rgba(192, 132, 252, 0.08) 0%, transparent 45%) !important;
}

#vibeWavesCanvas {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 1 !important;
  opacity: 0.65 !important;
}

/* Ensure app shells and content sit properly above background */
#app, .shell, main, .crm, .hub-main, .container, .page-wrap {
  position: relative;
  z-index: 2;
}

/* === UNIVERSAL REACTVIBE LUXURY GLASS SYSTEM ACROSS ALL PAGES === */

/* 1. Universal Glass Cards & Panels */
:is(.overview-panel, .card, .panel, .setting-card, .monitoring-page, .ao-card, .wake-card, .bridge-card, .sample-card, .theme-vibe, .merged-card) {
  /* No per-card backdrop blur: dozens of blurred cards made every scroll repaint the page behind them
     (heavy on phones). A slightly denser surface keeps the same glass look. */
  background: rgba(15, 23, 42, 0.84) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
  color: #f8fafc !important;
}

/* 2. Universal Modern Accordion for EVERY <details> and <summary> (never touch workspace inner controls) */
details:not(.sw-workspace details) {
  background: rgba(15, 23, 42, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  padding: 14px 18px !important;
  margin: 12px 0 !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

details:not(.sw-workspace details):hover {
  border-color: rgba(56, 189, 248, 0.28) !important;
  background: rgba(15, 23, 42, 0.75) !important;
}

details:not(.sw-workspace details)[open] {
  border-color: rgba(56, 189, 248, 0.35) !important;
  background: rgba(15, 23, 42, 0.82) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

summary:not(.sw-workspace summary) {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #f8fafc !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  list-style: none !important;
  outline: none !important;
  min-height: 28px !important;
  user-select: none !important;
}

summary:not(.sw-workspace summary)::-webkit-details-marker,
summary:not(.sw-workspace summary)::marker {
  display: none !important;
}

summary:not(.sw-workspace summary)::after {
  content: '' !important;
  width: 9px !important;
  height: 9px !important;
  border-right: 2px solid #94a3b8 !important;
  border-bottom: 2px solid #94a3b8 !important;
  transform: rotate(45deg) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
  flex-shrink: 0 !important;
  margin-left: 12px !important;
}

details:not(.sw-workspace details)[open] > summary::after {
  transform: rotate(-135deg) !important;
  border-color: #38bdf8 !important;
}

details:not(.sw-workspace details)[open] > summary {
  margin-bottom: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

/* 3. Universal Modern Form Controls (Inputs, Selects, Textareas) - never touch video player controls */
:is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):not(.player-seek):not(.player-volume):not(#playerSeek):not(#playerVolume),
  select:not(#videoQuality):not(.player-quality select),
  textarea
):not(.video-controls *):not(#playerControls *) {
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(10, 15, 30, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  color: #f8fafc !important;
  padding: 11px 14px !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  outline: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}

select:not(#videoQuality):not(.player-quality select):not(.video-controls *):not(#playerControls *) {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 40px !important;
  cursor: pointer !important;
}

select:not(#videoQuality):not(.player-quality select):not(.video-controls *):not(#playerControls *) option {
  background: #0f172a !important;
  color: #f8fafc !important;
  padding: 8px !important;
}

:is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea):focus {
  border-color: #38bdf8 !important;
  background: rgba(10, 15, 30, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}

::placeholder {
  color: #64748b !important;
}

/* 4. Universal Glass Buttons */
[hidden],
html [hidden],
.btn[hidden] {
  display: none !important;
}

.btn:not([hidden]), button.btn-vibe:not([hidden]) {
  border-radius: 11px !important;
  padding: 9px 18px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  background: #141923 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.btn:hover, button.btn-vibe:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

.btn:is(.primary, .ig-primary, [type="submit"]),
.btn-vibe-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border: 1px solid #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4) !important;
}

.btn:is(.primary, .ig-primary, [type="submit"]):hover,
.btn-vibe-cyan:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.55), 0 0 16px rgba(56, 189, 248, 0.35) !important;
}
