/* ==========================================================================
   APPLE LIQUID GLASS (iOS DARK MODE) CSS ENGINE
   Inspired by Apple iOS & visionOS Human Interface Guidelines
   Deep OLED (#050507) + Refractive Ambient Light + Apple Spring Physics
   ========================================================================== */

:root {
  --ios-oled-bg: #09090b;
  --ios-surface-glass: #121215;
  --ios-surface-glass-card: #121215;
  --ios-glass-border: rgba(255, 255, 255, 0.10);
  --ios-specular-highlight: rgba(255, 255, 255, 0.22);
  --ios-gold: #ffffff;
  --ios-gold-bright: #ffffff;
  --ios-gold-gradient: #ffffff;
  --ios-gold-glass: rgba(255, 255, 255, 0.12);
  --ios-gold-border: rgba(255, 255, 255, 0.20);
  --ios-spring-curve: cubic-bezier(0.22, 1, 0.36, 1);
  --ios-safe-bottom: max(16px, env(safe-area-inset-bottom, 16px));
}

/* --------------------------------------------------------------------------
   GLOBAL RESET & TYPOGRAPHY
   -------------------------------------------------------------------------- */
html, body {
  background-color: var(--ios-oled-bg) !important;
  color: #f5f5f7 !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Inter", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Apple Minimalist Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  backdrop-filter: blur(10px);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* --------------------------------------------------------------------------
   AMBIENT REFRACTION LIGHT SPHERES (body::before)
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle 420px at 10% 15%, rgba(255, 255, 255, 0.04), transparent 70%),
    radial-gradient(circle 480px at 88% 60%, rgba(255, 255, 255, 0.03), transparent 70%),
    radial-gradient(circle 420px at 45% 92%, rgba(255, 255, 255, 0.03), transparent 70%);
  filter: blur(90px);
  animation: ambientGlowDrift 18s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes ambientGlowDrift {
  0% {
    transform: scale(1) translate(0px, 0px);
  }
  50% {
    transform: scale(1.06) translate(-25px, 20px);
  }
  100% {
    transform: scale(0.96) translate(18px, -24px);
  }
}

/* --------------------------------------------------------------------------
   MAIN CONTAINER & STAGGER CASCADE
   -------------------------------------------------------------------------- */
.ios-main-content {
  padding-bottom: 125px !important;
  max-width: 1360px;
  margin: 0 auto;
}

@keyframes iosSlideUpFade {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-panel,
.glass-card,
.ios-card,
.client-card {
  animation: iosSlideUpFade 0.45s var(--ios-spring-curve) both;
}

/* --------------------------------------------------------------------------
   TOP GLASS HEADER
   -------------------------------------------------------------------------- */
#ios-top-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 18px;
  background: rgba(14, 14, 18, 0.72) !important;
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-bottom: 1px solid var(--ios-glass-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.ios-header-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-decoration: none !important;
  color: #fff !important;
  transition: all 0.25s var(--ios-spring-curve);
}

.ios-header-brand-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff !important;
  transform: translateY(-1px);
}

.ios-page-title-badge {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f5f5f7;
}

.ios-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-decoration: none !important;
  color: #eaeaea;
  transition: all 0.25s var(--ios-spring-curve);
}

.ios-user-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  transform: scale(1.02);
}

.ios-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   FLOATING BOTTOM PILL DOCK (MATHEMATICAL 5-GRID + PHYSICAL SLIDING PILL)
   -------------------------------------------------------------------------- */
#ios-bottom-dock {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(94vw, 440px);
  height: 64px;
  padding: 6px;
  border-radius: 32px;
  background: rgba(18, 18, 21, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: 1040;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: block;
}

.ios-dock-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  height: 100%;
  align-items: center;
  justify-items: center;
}

.ios-dock-active-pill {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / 5);
  height: 100%;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.20), 0 4px 12px rgba(0, 0, 0, 0.30);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

.ios-dock-item,
.ios-dock-btn {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #8E8E93 !important;
  text-decoration: none !important;
  border-radius: 26px;
  background: transparent !important;
  border: none !important;
  transition: color 0.22s ease, transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  padding: 0;
  box-shadow: none !important;
  outline: none;
}

.ios-dock-item:active,
.ios-dock-btn:active {
  transform: scale(0.91);
}

.ios-dock-item.active,
.ios-dock-btn.active {
  color: #FFFFFF !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ios-dock-item i,
.ios-dock-btn i,
.ios-dock-item svg,
.ios-dock-btn svg {
  font-size: 1.18rem;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ios-dock-item.active i,
.ios-dock-btn.active i,
.ios-dock-item.active svg,
.ios-dock-btn.active svg {
  transform: translateY(-1px) scale(1.06);
  color: #FFFFFF !important;
}

.ios-dock-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
}

/* SPA Top Loader & Page Transition */
#spa-top-loader {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  z-index: 99999;
  transition: width 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
  opacity: 0;
}
#spa-top-loader.loading {
  opacity: 1;
  width: 75%;
}
#spa-top-loader.done {
  opacity: 1;
  width: 100%;
}

#panel-main-content {
  transition: opacity 0.18s ease, transform 0.18s ease;
}
#panel-main-content.spa-loading {
  opacity: 0.45;
  transform: translateY(4px);
}

@media (min-width: 992px) {
  #panel-main-content {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 28px 36px 110px 36px !important;
  }
}

/* Blindagem Global de Contraste para Botões e Controles Brancos */
body .btn-primary,
body .btn-light,
body .btn-white,
body .btn-dlux,
body .btn-dlux-primary,
body .btn-accent,
body .btn-liquid-gold,
body .bg-white,
body .bg-light,
body .nav-pills .nav-link.active,
body .nav-tabs .nav-link.active,
body .fc .fc-button-primary.fc-button-active,
body .fc .fc-today-button,
body button[style*="#fff"],
body button[style*="#FFF"],
body button[style*="#ffffff"],
body button[style*="#FFFFFF"],
body button[style*="rgb(255, 255, 255)"],
body a.btn[style*="#fff"],
body a.btn[style*="#FFF"],
body a.btn[style*="#ffffff"],
body a.btn[style*="#FFFFFF"] {
  background-color: #FFFFFF !important;
  color: #09090B !important;
  border-color: #FFFFFF !important;
  font-weight: 700 !important;
}

body .btn-primary *,
body .btn-light *,
body .btn-white *,
body .btn-dlux *,
body .btn-dlux-primary *,
body .btn-accent *,
body .btn-liquid-gold *,
body .nav-pills .nav-link.active *,
body .nav-tabs .nav-link.active *,
body .fc .fc-button-primary.fc-button-active *,
body .fc .fc-today-button *,
body button[style*="#fff"] *,
body button[style*="#FFF"] *,
body button[style*="#ffffff"] *,
body button[style*="#FFFFFF"] *,
body a.btn[style*="#fff"] *,
body a.btn[style*="#FFF"] *,
body a.btn[style*="#ffffff"] *,
body a.btn[style*="#FFFFFF"] * {
  color: #09090B !important;
  fill: #09090B !important;
}



/* --------------------------------------------------------------------------
   CENTRAL DE CONTROLE (#ios-more-sheet) - ESTILOS E BLINDAGEM DE CORES
   -------------------------------------------------------------------------- */
/* 1. Todos os atalhos, ícones e textos brancos no sheet (exceto botão fechar) */
#ios-more-sheet .more-sheet-item,
#ios-more-sheet .ios-control-tile,
#ios-more-sheet a:not(#btnCloseIosSheet),
#ios-more-sheet button:not(#btnCloseIosSheet),
#ios-more-sheet [role="button"] {
  color: #FFFFFF !important;
}

#ios-more-sheet .more-sheet-item i,
#ios-more-sheet .more-sheet-item svg,
#ios-more-sheet .more-sheet-item span,
#ios-more-sheet .more-sheet-item small,
#ios-more-sheet .more-sheet-item div,
#ios-more-sheet .ios-control-tile i,
#ios-more-sheet .ios-control-tile svg,
#ios-more-sheet .ios-control-tile span,
#ios-more-sheet .ios-control-tile small,
#ios-more-sheet .ios-control-tile div,
#ios-more-sheet a:not(#btnCloseIosSheet) i,
#ios-more-sheet a:not(#btnCloseIosSheet) svg,
#ios-more-sheet a:not(#btnCloseIosSheet) span,
#ios-more-sheet a:not(#btnCloseIosSheet) small,
#ios-more-sheet a:not(#btnCloseIosSheet) div,
#ios-more-sheet button:not(#btnCloseIosSheet) i,
#ios-more-sheet button:not(#btnCloseIosSheet) svg,
#ios-more-sheet button:not(#btnCloseIosSheet) span,
#ios-more-sheet button:not(#btnCloseIosSheet) small,
#ios-more-sheet button:not(#btnCloseIosSheet) div,
#ios-more-sheet [role="button"] i,
#ios-more-sheet [role="button"] svg,
#ios-more-sheet [role="button"] span,
#ios-more-sheet [role="button"] small,
#ios-more-sheet [role="button"] div {
  color: #FFFFFF !important;
  fill: #FFFFFF !important;
}

#ios-more-sheet .ios-control-tile .ios-tile-title {
  color: #FFFFFF !important;
}

/* 2. Isolamento do Estado Ativo dentro do #ios-more-sheet */
#ios-more-sheet .active-sheet-tile,
#ios-more-sheet .ios-control-tile.active,
#ios-more-sheet .more-sheet-item.active,
#ios-more-sheet [aria-current="page"] {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.08) !important;
}

#ios-more-sheet .active-sheet-tile .ios-tile-icon,
#ios-more-sheet .ios-control-tile.active .ios-tile-icon,
#ios-more-sheet .more-sheet-item.active .ios-tile-icon,
#ios-more-sheet [aria-current="page"] .ios-tile-icon {
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  transform: none !important;
}

#ios-more-sheet .active-sheet-tile .ios-tile-icon i,
#ios-more-sheet .ios-control-tile.active .ios-tile-icon i,
#ios-more-sheet [aria-current="page"] .ios-tile-icon i,
#ios-more-sheet .ios-control-tile i.bi-sliders {
  width: 36px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  color: #FFFFFF !important;
  transform: none !important;
}

/* 3. Botão Fechar em Vermelho Semântico (#EF4444) */
#btnCloseIosSheet,
#ios-more-sheet #btnCloseIosSheet,
#ios-more-sheet .btn-outline-light#btnCloseIosSheet {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(239, 68, 68, 0.16) !important;
  border: 1px solid #EF4444 !important;
  border-color: #EF4444 !important;
  color: #EF4444 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  transition: all 0.2s ease !important;
}

#btnCloseIosSheet:hover,
#ios-more-sheet #btnCloseIosSheet:hover {
  background-color: rgba(239, 68, 68, 0.28) !important;
  border-color: #EF4444 !important;
  color: #EF4444 !important;
  transform: scale(1.05) !important;
}

#btnCloseIosSheet i,
#ios-more-sheet #btnCloseIosSheet i {
  color: #EF4444 !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
}

/* --------------------------------------------------------------------------
   iOS GLASS BOTTOM SHEET ("MAIS OPÇÕES")
   -------------------------------------------------------------------------- */
#ios-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9997;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#ios-sheet-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

#ios-more-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  max-width: 580px;
  margin: 0 auto;
  max-height: 85dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  background: linear-gradient(180deg, rgba(26, 26, 32, 0.92) 0%, rgba(12, 12, 16, 0.98) 100%);
  backdrop-filter: blur(45px) saturate(220%);
  -webkit-backdrop-filter: blur(45px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.3),
    0 -15px 50px rgba(0, 0, 0, 0.85);
  padding: 12px 20px max(32px, env(safe-area-inset-bottom, 32px));
  transform: translateY(120%) !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.45s var(--ios-spring-curve), opacity 0.3s ease, visibility 0.45s ease !important;
  will-change: transform, opacity, visibility;
}

@media (max-width: 360px) {
  #ios-bottom-dock {
    width: 98vw;
    padding: 5px 6px;
  }
  .ios-dock-btn {
    padding: 5px 6px !important;
    font-size: 10px !important;
    gap: 2px !important;
  }
  .ios-dock-btn i,
  .ios-dock-btn svg {
    font-size: 1.1rem !important;
  }
}

#ios-more-sheet.show,
#ios-more-sheet.open,
#ios-more-sheet.active {
  transform: translateY(0) !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (min-width: 992px) {
  #ios-bottom-dock {
    width: 520px !important;
    height: 66px !important;
    bottom: 20px !important;
    border-radius: 33px !important;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
  }
  @media (hover: hover) {
    #ios-bottom-dock:hover {
      transform: translate3d(-50%, -3px, 0) !important;
      border-color: rgba(255, 255, 255, 0.24) !important;
      box-shadow: 0 18px 44px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
    }
    .ios-dock-item {
      transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease, background-color 0.2s ease !important;
      border-radius: 20px;
    }
    .ios-dock-item:hover {
      background: rgba(255, 255, 255, 0.06) !important;
    }
    .ios-dock-item:hover i,
    .ios-dock-item:hover svg {
      transform: translateY(-3px) scale(1.14) !important;
      color: #FFFFFF !important;
    }
    .ios-dock-item:hover .ios-dock-label {
      transform: translateY(-1px) !important;
      color: #FFFFFF !important;
    }
    .ios-dock-track:has(.ios-dock-item:hover) .ios-dock-item:not(:hover) {
      transform: scale(0.98);
    }
  }
  #ios-more-sheet {
    top: 50% !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -45%) scale(0.95) !important;
    max-width: 560px !important;
    width: 92vw !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    padding: 24px !important;
    max-height: 80vh !important;
    margin: 0 !important;
  }
  #ios-more-sheet.show,
  #ios-more-sheet.open,
  #ios-more-sheet.active {
    transform: translate(-50%, -50%) scale(1) !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .ios-sheet-grabber {
    display: none !important;
  }
  .ios-control-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
  }
}

.ios-sheet-grabber {
  width: 42px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  margin: 0 auto 16px auto;
  cursor: pointer;
}

.ios-control-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 420px) {
  .ios-control-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

.ios-control-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  text-decoration: none !important;
  color: #f5f5f7 !important;
  text-align: center;
  transition: all 0.3s var(--ios-spring-curve);
  cursor: pointer;
}

.ios-control-tile:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
}

.ios-control-tile:active {
  transform: scale(0.94);
  transition: transform 0.15s ease;
}

.ios-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: all 0.25s ease;
}

.ios-control-tile:hover .ios-tile-icon {
  background: #ffffff;
  color: #09090b;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.ios-tile-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #ffffff !important;
}

/* High Contrast enforcement for iOS More Sheet (Central de Controle) */
#ios-more-sheet .text-muted,
#ios-more-sheet .text-secondary,
#ios-more-sheet small,
#ios-more-sheet .small,
#ios-more-sheet p,
#ios-more-sheet span:not(.badge):not(.text-accent):not(.text-gold):not(.text-success):not(.text-danger):not(.text-warning) {
  color: #ffffff !important;
  opacity: 1 !important;
}

.ios-logout-tile {
  width: 100%;
  border-radius: 18px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #f87171 !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s var(--ios-spring-curve);
  cursor: pointer;
}

.ios-logout-tile:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5 !important;
}

.ios-logout-tile:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   SQUIRCLE GLASS CARDS & CONTAINERS
   -------------------------------------------------------------------------- */
.card-panel,
.glass-card,
.card.bg-dark,
.client-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.018) 100%) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border-radius: 24px !important;
  border: 1px solid var(--ios-glass-border) !important;
  box-shadow:
    inset 0 1px 0 0 var(--ios-specular-highlight),
    0 12px 32px -8px rgba(0, 0, 0, 0.6) !important;
  color: #f5f5f7 !important;
  overflow: hidden;
}

.card-panel .card-header,
.glass-card .card-header {
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid var(--ios-glass-border) !important;
  padding: 14px 20px !important;
}

.card-panel .card-footer,
.glass-card .card-footer {
  background: rgba(255, 255, 255, 0.02) !important;
  border-top: 1px solid var(--ios-glass-border) !important;
  padding: 12px 20px !important;
}

/* Neutralize legacy Bootstrap opaque dark borders and backgrounds */
.border-secondary,
.border-dark {
  border-color: var(--ios-glass-border) !important;
}

.bg-dark,
.bg-black {
  background-color: transparent !important;
}

/* Client Cards & Grid */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}

.client-toggle {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 16px;
  cursor: pointer;
  color: inherit;
}

.client-body {
  background: rgba(0, 0, 0, 0.28) !important;
  border-top: 1px solid var(--ios-glass-border) !important;
  padding: 16px !important;
}

/* KPI numbers styling */
.kpi {
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: #f5f5f7 !important;
  line-height: 1.15;
}

.kpi-label {
  color: rgba(235, 235, 245, 0.6) !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-top: 4px;
}

/* Dashboard KPI Horizontal Carousel / Desktop 4-col Grid */
.dashboard-kpi-horizontal {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 12px !important;
  padding-bottom: 6px;
  scrollbar-width: none; /* Firefox */
}
.dashboard-kpi-horizontal::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}
.dashboard-kpi-horizontal > * {
  flex: 0 0 260px !important;
  min-width: 260px !important;
  scroll-snap-align: start;
}
@media (min-width: 992px) {
  .dashboard-kpi-horizontal {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    overflow-x: visible !important;
    gap: 16px !important;
  }
  .dashboard-kpi-horizontal > * {
    min-width: 0 !important;
    width: 100% !important;
    flex: unset !important;
  }
}
.kpi-scroll-hint {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   iOS SEGMENTED CONTROL TABS (.nav-tabs & .nav-pills)
   -------------------------------------------------------------------------- */
.nav-tabs,
.nav-tabs-dark,
.nav-pills {
  border-bottom: none !important;
  background: rgba(0, 0, 0, 0.45) !important;
  border-radius: 18px !important;
  padding: 5px !important;
  border: 1px solid var(--ios-glass-border) !important;
  display: inline-flex !important;
  gap: 4px !important;
  max-width: 100% !important;
  overflow-x: auto !important;
}

.nav-tabs .nav-item,
.nav-tabs-dark .nav-item,
.nav-pills .nav-item {
  flex: 1 1 auto;
  text-align: center;
}

.nav-tabs .nav-link,
.nav-tabs-dark .nav-link,
.nav-pills .nav-link {
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  padding: 9px 18px !important;
  color: rgba(235, 235, 245, 0.65) !important;
  font-weight: 500 !important;
  font-size: 0.88rem !important;
  background: transparent !important;
  transition: all 0.25s var(--ios-spring-curve) !important;
}

.nav-tabs .nav-link:hover,
.nav-tabs-dark .nav-link:hover,
.nav-pills .nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.nav-tabs .nav-link.active,
.nav-tabs-dark .nav-link.active,
.nav-pills .nav-link.active {
  background: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #09090B !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  font-weight: 700 !important;
}

.nav-tabs .nav-link.active *,
.nav-tabs-dark .nav-link.active *,
.nav-pills .nav-link.active * {
  color: #09090B !important;
}

/* --------------------------------------------------------------------------
   INPUTS, SELECTS & TEXTAREAS (ANTI-SAFARI ZOOM: font-size 16px)
   -------------------------------------------------------------------------- */
.form-control,
.form-select,
.panel-input,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="time"],
textarea {
  font-size: 16px !important; /* Imperative: prevents iOS Safari auto-zoom */
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  color: #f5f5f7 !important;
  padding: 11px 16px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.25s var(--ios-spring-curve) !important;
}

.form-select option,
select option,
optgroup {
  background-color: #16161b !important;
  color: #f5f5f7 !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #121217 inset !important;
  -webkit-text-fill-color: #f5f5f7 !important;
  caret-color: #f5f5f7 !important;
  transition: background-color 5000s ease-in-out 0s;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder,
.panel-input::placeholder {
  color: rgba(235, 235, 245, 0.58) !important;
}

.form-control:focus,
.form-select:focus,
.panel-input:focus,
textarea:focus {
  background: rgba(0, 0, 0, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.15),
    inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  color: #fff !important;
  outline: none !important;
}

/* --------------------------------------------------------------------------
   BUTTONS: MONOCHROME SOLID WHITE & GLASS PILLS
   -------------------------------------------------------------------------- */
.btn-accent,
.btn-primary,
.btn-liquid-gold,
.btn-action-primary {
  background: #FFFFFF !important;
  color: #09090B !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  border: none !important;
  padding: 8px 18px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 6px 18px -4px rgba(255, 255, 255, 0.25) !important;
  transition: all 0.25s var(--ios-spring-curve) !important;
}

.btn-accent *,
.btn-primary *,
.btn-liquid-gold *,
.btn-action-primary * {
  color: #09090B !important;
}

.btn-accent:hover,
.btn-primary:hover,
.btn-liquid-gold:hover,
.btn-action-primary:hover {
  background: #F4F4F5 !important;
  filter: brightness(0.96) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -4px rgba(255, 255, 255, 0.35) !important;
}

.btn-success {
  background: #10B981 !important;
  color: #09090B !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  border: none !important;
  padding: 8px 18px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 8px 20px -4px rgba(16, 185, 129, 0.4) !important;
  transition: all 0.25s var(--ios-spring-curve) !important;
}

.btn-success * {
  color: #09090B !important;
}

.btn-success:hover {
  background: #059669 !important;
  filter: brightness(1.08) !important;
  transform: translateY(-1px);
}

.btn-accent:active,
.btn-primary:active,
.btn-liquid-gold:active,
.btn-action-primary:active,
.btn:active {
  transform: scale(0.96) !important;
  transition: transform 0.15s ease !important;
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  border-radius: 9999px !important;
  color: #eaeaea !important;
  padding: 8px 16px !important;
  backdrop-filter: blur(16px);
  transition: all 0.25s var(--ios-spring-curve) !important;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.btn-danger,
.btn-outline-danger {
  border-radius: 9999px !important;
}

/* --------------------------------------------------------------------------
   APPLE SWITCH TOGGLES (51px x 31px)
   -------------------------------------------------------------------------- */
.form-check-input[type="checkbox"] {
  width: 51px !important;
  height: 31px !important;
  border-radius: 9999px !important;
  background-color: rgba(120, 120, 128, 0.32) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background-image: none !important;
  position: relative !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: background-color 0.3s var(--ios-spring-curve), border-color 0.3s var(--ios-spring-curve) !important;
  vertical-align: middle;
}

.form-check-input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s var(--ios-spring-curve);
}

.form-check-input[type="checkbox"]:checked {
  background-color: #34c759 !important; /* iOS active green */
  border-color: #34c759 !important;
}

.form-check-input[type="checkbox"].switch-gold:checked {
  background: #ffffff !important;
  border-color: #ffffff !important;
}

.form-check-input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

/* --------------------------------------------------------------------------
   TAG VARIABLE BUTTONS (WHATSAPP & TEMPLATES)
   -------------------------------------------------------------------------- */
.tag-btn {
  background: #18181B !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #FFFFFF !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  font-size: 0.82rem !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
}

.tag-btn:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #FFFFFF !important;
}

/* --------------------------------------------------------------------------
   TABLES & PAGINATION IN LIQUID GLASS
   -------------------------------------------------------------------------- */
.table-dark {
  --bs-table-bg: transparent !important;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
  --bs-table-border-color: var(--ios-glass-border) !important;
  color: #eaeaea !important;
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--ios-glass-border) !important;
  padding: 12px 14px !important;
}

.pagination {
  gap: 4px;
}

.pagination .page-link {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--ios-glass-border) !important;
  border-radius: 12px !important;
  color: #eaeaea !important;
  padding: 6px 12px !important;
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #FFFFFF !important;
}

.pagination .page-item.active .page-link {
  background: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #09090B !important;
  font-weight: 700 !important;
}

/* --------------------------------------------------------------------------
   FULLCALENDAR APPLE DARK THEME
   -------------------------------------------------------------------------- */
.fc {
  --fc-page-bg-color: transparent !important;
  --fc-neutral-bg-color: rgba(255, 255, 255, 0.04) !important;
  --fc-neutral-text-color: #eaeaea !important;
  --fc-border-color: var(--ios-glass-border) !important;
  --fc-button-bg-color: rgba(255, 255, 255, 0.06) !important;
  --fc-button-border-color: var(--ios-glass-border) !important;
  --fc-button-text-color: #eaeaea !important;
  --fc-button-hover-bg-color: rgba(255, 255, 255, 0.12) !important;
  --fc-button-active-bg-color: #FFFFFF !important;
  --fc-button-active-text-color: #09090B !important;
  --fc-today-bg-color: rgba(255, 255, 255, 0.08) !important;
}

.fc .fc-button {
  border-radius: 9999px !important;
  padding: 6px 14px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}

.fc-event {
  border-radius: 10px !important;
  padding: 2px 6px !important;
  border: none !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* --------------------------------------------------------------------------
   MODALS IN APPLE LIQUID GLASS (UNIVERSAL RESPONSIVENESS & HIGH LEGIBILITY)
   -------------------------------------------------------------------------- */
.modal-dialog {
  max-height: 90dvh !important;
  margin: 1.25rem auto !important;
}

.modal-content {
  background: linear-gradient(145deg, rgba(28, 28, 34, 0.94) 0%, rgba(14, 14, 18, 0.98) 100%) !important;
  backdrop-filter: blur(40px) saturate(210%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(210%) !important;
  border-radius: 28px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.28),
    0 24px 60px rgba(0, 0, 0, 0.85) !important;
  max-height: 85dvh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.modal-content > form {
  display: flex !important;
  flex-direction: column !important;
  max-height: 85dvh !important;
  overflow: hidden !important;
  width: 100% !important;
}

.modal-header {
  border-bottom: 1px solid var(--ios-glass-border) !important;
  padding: 18px 24px !important;
  flex-shrink: 0 !important;
}

.modal-header .modal-title,
.modal-header h1, .modal-header h2, .modal-header h3, .modal-header h4, .modal-header h5, .modal-header h6 {
  color: #ffffff !important;
}

.modal-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  flex: 1 1 auto !important;
  max-height: calc(85dvh - 120px) !important;
  padding: 18px 24px !important;
}

.modal-content > form > .modal-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  flex: 1 1 auto !important;
  max-height: calc(85dvh - 130px) !important;
}

.modal-footer {
  border-top: 1px solid var(--ios-glass-border) !important;
  padding: 16px 24px !important;
  flex-shrink: 0 !important;
}

/* Modals High Contrast Typography */
.modal-body label,
.modal-body .form-label,
.modal-body .form-text,
.modal-body p,
.modal-body small,
.modal-body .small,
.modal-body .text-muted,
.modal-body .text-secondary {
  color: #ffffff !important;
}

.modal-body .form-control,
.modal-body .form-select {
  color: #ffffff !important;
  background-color: rgba(12, 12, 16, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.modal-body .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

.btn-close-white {
  opacity: 0.85 !important;
  transition: opacity 0.2s ease;
}
.btn-close-white:hover {
  opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   NOTIFICATION TOASTS IN LIQUID GLASS
   -------------------------------------------------------------------------- */
.toast {
  background: rgba(22, 22, 28, 0.88) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid var(--ios-glass-border) !important;
  border-radius: 18px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 14px 35px rgba(0, 0, 0, 0.6) !important;
  color: #fff !important;
}
/* ApexCharts in Apple Liquid Glass */
.apexcharts-canvas {
  background: transparent !important;
}
.apexcharts-canvas text {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif !important;
}
.apexcharts-tooltip {
  background: rgba(20, 20, 26, 0.92) !important;
  backdrop-filter: blur(30px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 35px rgba(0, 0, 0, 0.7) !important;
  color: #fff !important;
}
.apexcharts-tooltip.apexcharts-theme-dark,
.apexcharts-tooltip.apexcharts-theme-light {
  background: rgba(20, 20, 26, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
.apexcharts-tooltip-title {
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-family: inherit !important;
  font-weight: 600 !important;
  color: #ffffff !important;
}
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
  background: rgba(20, 20, 26, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  color: #fff !important;
}
.apexcharts-gridline {
  stroke: rgba(255, 255, 255, 0.05) !important;
}

/* ==========================================================================
   Apple Liquid Glass - Profile & Team Management Extensions
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
@media (max-width: 576px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}
.team-card {
  background: rgba(22, 22, 26, 0.72) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  padding: 18px !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}
.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}
.team-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.08);
}
.team-avatar-ring {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* iOS Weekday Pills */
.ios-weekday-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ios-weekday-pill {
  flex: 1;
  min-width: 38px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.ios-weekday-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ios-weekday-pill.active {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #09090b !important;
  font-weight: 700 !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
}

/* Quick Time Preset Chips */
.ios-time-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ios-time-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ios-time-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ios-time-chip.active {
  background: rgba(10, 132, 255, 0.25) !important;
  border-color: #0a84ff !important;
  color: #60a5fa !important;
}

/* Block Item Card */
.block-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 18px;
  transition: all 0.2s ease;
}
.block-item-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}


/* --------------------------------------------------------------------------
   DARK THEME CONTRAST & TYPOGRAPHY FIXES (High Legibility on Dark Backgrounds)
   -------------------------------------------------------------------------- */
.text-muted,
.muted {
  color: rgba(235, 235, 245, 0.72) !important;
}

.text-secondary {
  color: rgba(235, 235, 245, 0.75) !important;
}

.text-muted.small,
small.text-muted {
  color: rgba(235, 235, 245, 0.78) !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.72) !important;
}

/* Specific Client Card Expansion Contrast */
.client-card .text-muted,
.client-body .text-muted {
  color: rgba(235, 235, 245, 0.82) !important;
}

.client-body small.text-muted {
  color: #ffffff !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
}

.client-body .p-2.rounded-3 {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* --------------------------------------------------------------------------
   CHART TOOLTIPS & OVERFLOW CONTAINMENT (Mobile Protection)
   -------------------------------------------------------------------------- */
.apexcharts-tooltip, .chartjs-tooltip, .custom-chart-tooltip {
  max-width: min(220px, 78vw) !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow: visible !important;
  z-index: 9999 !important;
}

.card-panel:has(.apexcharts-canvas),
.glass-card:has(.apexcharts-canvas),
.card.bg-dark:has(.apexcharts-canvas),
.card-panel:has(canvas),
.glass-card:has(canvas),
.card-chart,
.chart-container,
#chart, #chartBody, #timeline-chart {
  overflow: visible !important;
}

/* --------------------------------------------------------------------------
   100% WHITE TYPOGRAPHY ENFORCEMENT (#FFFFFF)
   -------------------------------------------------------------------------- */
body, p:not(.text-accent):not(.text-gold):not(.text-success):not(.text-danger):not(.text-warning):not(.text-info),
small:not(.text-accent):not(.text-gold):not(.text-success):not(.text-danger):not(.text-warning):not(.text-info),
.small:not(.text-accent):not(.text-gold):not(.text-success):not(.text-danger):not(.text-warning):not(.text-info),
label, .form-label, .form-text,
.text-muted, .muted, .text-secondary, .text-body-secondary, .text-dark,
.card-subtitle, .stat-label, .client-stat-label, th, td,
span:not(.badge):not(.text-accent):not(.text-gold):not(.text-success):not(.text-danger):not(.text-warning):not(.text-info):not(button *):not(.btn *):not([role="button"] *) {
  color: #ffffff !important;
}

.text-accent, .text-gold {
  color: #ffffff !important;
}
.text-success {
  color: #34c759 !important;
}
.text-danger {
  color: #ff3b30 !important;
}
.text-warning {
  color: #f59e0b !important;
}
.text-info {
  color: #0a84ff !important;
}

/* --------------------------------------------------------------------------
   SAAS GLOBAL BROADCASTS & FIDELIDADE STATUS BADGES
   -------------------------------------------------------------------------- */
.saas-broadcast-banner {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.saas-broadcast-banner.broadcast-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(217, 119, 6, 0.08)) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fef3c7 !important;
}
.saas-broadcast-banner.broadcast-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(21, 128, 61, 0.08)) !important;
  border: 1px solid rgba(34, 197, 94, 0.35) !important;
  color: #dcfce7 !important;
}
.saas-broadcast-banner.broadcast-info,
.saas-broadcast-banner.broadcast-default {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.20) !important;
  color: #ffffff !important;
}

.broadcast-icon-box {
  width: 38px;
  height: 38px;
}
.broadcast-icon-box.broadcast-warning {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
}
.broadcast-icon-box.broadcast-success {
  background: rgba(34, 197, 94, 0.25) !important;
  color: #4ade80 !important;
}
.broadcast-icon-box.broadcast-info,
.broadcast-icon-box.broadcast-default {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

.broadcast-action-btn {
  font-size: 0.78rem !important;
}
.broadcast-action-btn.broadcast-warning {
  background: #f59e0b !important;
  color: #000000 !important;
}
.broadcast-action-btn.broadcast-success {
  background: #22c55e !important;
  color: #000000 !important;
}
.broadcast-action-btn.broadcast-info,
.broadcast-action-btn.broadcast-default {
  background: #ffffff !important;
  color: #09090b !important;
}

/* Fidelidade Status Badge */
.fidelidade-badge-active {
  background: rgba(52, 199, 89, 0.15) !important;
  color: #34C759 !important;
  border: 1px solid rgba(52, 199, 89, 0.3) !important;
}
.fidelidade-badge-inactive {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* --------------------------------------------------------------------------
   DEFINITIVE CONTRAST ARMOR: ALL WHITE/LIGHT BUTTONS OBLIGATORILY HAVE #09090B TEXT & ICONS
   -------------------------------------------------------------------------- */
html body .btn-primary,
html body .btn-light,
html body .btn-white,
html body .btn-accent,
html body .btn-liquid-gold,
html body .btn-action-primary,
html body .btn-action-primary-sm,
html body .btn-apple-primary,
html body .btn-dlux-white,
html body .fc-button-primary.fc-button-active,
html body .fc-today-button,
html body .nav-pills .nav-link.active,
html body .nav-tabs .nav-link.active,
html body .pagination .page-item.active .page-link {
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #09090B !important;
  border-color: #FFFFFF !important;
  font-weight: 700 !important;
}

html body .btn-primary *,
html body .btn-light *,
html body .btn-white *,
html body .btn-accent *,
html body .btn-liquid-gold *,
html body .btn-action-primary *,
html body .btn-action-primary-sm *,
html body .btn-apple-primary *,
html body .btn-dlux-white *,
html body .fc-button-primary.fc-button-active *,
html body .fc-today-button *,
html body .nav-pills .nav-link.active *,
html body .nav-tabs .nav-link.active *,
html body .pagination .page-item.active .page-link *,
html body button[style*="background-color: #FFFFFF"] *,
html body button[style*="background-color: rgb(255, 255, 255)"] *,
html body .btn[style*="background-color: #FFFFFF"] *,
html body .btn[style*="background-color: rgb(255, 255, 255)"] * {
  color: #09090B !important;
  fill: #09090B !important;
}

/* --------------------------------------------------------------------------
   PRESET PILL BUTTONS (MONOCHROME OLED QUICK RULES)
   -------------------------------------------------------------------------- */
.preset-btn {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background-color: #18181B !important;
  color: #FFFFFF !important;
  border-radius: 9999px !important;
  padding: 6px 14px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none !important;
  text-decoration: none !important;
}

.preset-btn:not(.active):not([aria-pressed="true"]) {
  background-color: #18181B !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.preset-btn:not(.active):not([aria-pressed="true"]) * {
  color: #FFFFFF !important;
  fill: #FFFFFF !important;
}

.preset-btn:not(.active):not([aria-pressed="true"]):hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.30) !important;
  transform: translateY(-1px);
}

.preset-btn.active,
.preset-btn[aria-pressed="true"] {
  background-color: #FFFFFF !important;
  color: #09090B !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
  font-weight: 700 !important;
}

.preset-btn.active *,
.preset-btn[aria-pressed="true"] * {
  color: #09090B !important;
  fill: #09090B !important;
}

.preset-btn.active:hover,
.preset-btn[aria-pressed="true"]:hover {
  background-color: #F4F4F5 !important;
  color: #09090B !important;
}
