/* ==========================================================================
   RADIO DASHBOARD v2.0 — Optimized CSS
   Dark/Light adaptive, responsive, clean
   ========================================================================== */

/* --- 1. VARIABLES & THEMES --- */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #7c6bff;
  --accent-2: #1eceff;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  --wc-grad-1: #6ea8fe;
  --wc-grad-2: #b197fc;
  --wc-grad-3: #66d9e8;

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* Light theme (default) */
  --bg: #f6f8ff;
  --panel: rgba(255,255,255,.85);
  --panel-strong: rgba(255,255,255,.95);
  --border: #e6e9f2;
  --border-subtle: rgba(0,0,0,.06);
  --text: #1f2430;
  --text-muted: #64748b;
  --text-heading: #0f172a;
  --chip-bg: #eef2ff;
  --chip-ink: #3730a3;
  --hover-bg: #f8fafc;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow: 0 12px 34px rgba(29,38,54,.1);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.1);

  /* Gradient text */
  --grad-danger: linear-gradient(135deg,#ef4444,#b91c1c);
  --grad-primary: linear-gradient(135deg,#3b82f6,#1d4ed8);
  --grad-purple: linear-gradient(135deg,#8b5cf6,#5b21b6);
  --grad-success: linear-gradient(135deg,#10b981,#047857);
  --grad-warning: linear-gradient(135deg,#f59e0b,#b45309);

  /* Modal title color - Light mode: black */
  --modal-title-color: #000000;
}

/* --- Dark theme --- */
[data-bs-theme="dark"] {
  --bg: #0b0c10;
  --panel: rgba(18,20,28,.65);
  --panel-strong: rgba(18,20,28,.90);
  --border: rgba(255,255,255,.06);
  --border-subtle: rgba(255,255,255,.04);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-heading: #f8fafc;
  --chip-bg: #1e293b;
  --chip-ink: #c7d2fe;
  --hover-bg: rgba(255,255,255,.04);
  --shadow: 0 14px 40px rgba(0,0,0,.45);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.5);

  --grad-danger: linear-gradient(135deg,#f87171,#fca5a5);
  --grad-primary: linear-gradient(135deg,#60a5fa,#93c5fd);
  --grad-purple: linear-gradient(135deg,#a78bfa,#c4b5fd);
  --grad-success: linear-gradient(135deg,#34d399,#6ee7b7);
  --grad-warning: linear-gradient(135deg,#fbbf24,#fcd34d);

  /* Modal title color - Dark mode: white */
  --modal-title-color: #ffffff;
}

/* --- 2. BASE & LAYOUT --- */
body { background: var(--bg); color: var(--text); }
.container-fluid, .page-content { padding-left: 15px !important; padding-right: 15px !important; }
.row { width: 100%; margin-left: 0 !important; margin-right: 0 !important; }
.gx-tight { --g: 10px; margin-right: calc(-.5 * var(--g)); margin-left: calc(-.5 * var(--g)); }
.gx-tight > [class^="col"], .gx-tight > [class*=" col"] { padding-right: calc(.5 * var(--g)); padding-left: calc(.5 * var(--g)); }
.text-purple { color: #8b5cf6 !important; }

/* --- 3. CARD BASE --- */
.card {
  border-radius: var(--radius-xl);
  background: var(--panel-strong);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card.glass.card-neo {
  backdrop-filter: saturate(160%) blur(8px);
  border: 1px solid var(--border);
}

/* --- 4. KPI BAR --- */
.card.crm-widget {
  background: linear-gradient(180deg, color-mix(in oklab, var(--panel) 92%, transparent), var(--panel-strong));
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.refresh-progress {
  position: absolute; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #8b5cf6);
  z-index: 10; border-radius: 3px 0 0 0;
  transition: width .3s linear;
}
#kpi-bar {
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent) !important;
  position: relative;
}
#kpi-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #8b5cf6);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  pointer-events: none;
  z-index: 1;
}
.stat-tile {
  padding: 1.25rem 1.5rem; border-radius: 14px;
  transition: all .25s ease; position: relative;
}
.stat-tile:hover { background: var(--hover-bg); transform: translateY(-2px); }
@media (min-width: 992px) {
  .stat-tile:not(.border-end-0)::after {
    content: ""; position: absolute; right: 0; top: 25%; bottom: 25%; width: 1px;
    background: var(--border-subtle);
  }
}
.stat-tile .title {
  font-size: .72rem; letter-spacing: .05em; color: var(--text-muted);
  text-transform: uppercase; font-weight: 700;
}
.stat-tile .ico-wrapper {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--hover-bg); border: 1px solid var(--border-subtle);
  font-size: 22px; flex-shrink: 0;
}
.stat-tile .big {
  font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem);
  line-height: 1; color: var(--text-heading); transition: all .3s ease;
}
#tile-live:hover .big { background: var(--grad-danger); -webkit-background-clip: text; color: transparent; }
#tile-24h:hover .big  { background: var(--grad-primary); -webkit-background-clip: text; color: transparent; }
#tile-30j:hover .big  { background: var(--grad-purple); -webkit-background-clip: text; color: transparent; }
#tile-ret:hover .big  { background: var(--grad-success); -webkit-background-clip: text; color: transparent; }
#tile-mon:hover .big  { background: var(--grad-warning); -webkit-background-clip: text; color: transparent; }

.pulse-icon { animation: livePulse 2s infinite; font-size: 14px; }
@keyframes livePulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.3); opacity: .4; }
  100% { transform: scale(1); opacity: 1; }
}

/* --- 4.5 TREND INDICATORS --- */
.trend-indicator {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.7rem; font-weight: 600; margin-top: 0.3rem;
  letter-spacing: 0.02em; white-space: nowrap;
}
.trend-indicator .trend-icon {
  font-size: 0.9rem; font-weight: 700;
  display: inline-block; min-width: 0.8rem; text-align: center;
  transition: transform .3s ease;
}
.trend-indicator .trend-value {
  color: var(--text-muted);
  transition: color .3s ease;
}

/* États de progression */
.trend-indicator.trend-up .trend-icon {
  color: #10b981;
  transform: translateY(-1px);
}
.trend-indicator.trend-up .trend-value {
  color: #10b981; font-weight: 700;
}

.trend-indicator.trend-down .trend-icon {
  color: #ef4444;
  transform: translateY(1px);
}
.trend-indicator.trend-down .trend-value {
  color: #ef4444; font-weight: 700;
}

.trend-indicator.trend-flat .trend-icon {
  color: var(--text-muted);
}
.trend-indicator.trend-flat .trend-value {
  color: var(--text-muted);
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .trend-indicator.trend-up .trend-icon {
  color: #34d399;
}
[data-bs-theme="dark"] .trend-indicator.trend-up .trend-value {
  color: #34d399;
}
[data-bs-theme="dark"] .trend-indicator.trend-down .trend-icon {
  color: #f87171;
}
[data-bs-theme="dark"] .trend-indicator.trend-down .trend-value {
  color: #f87171;
}

/* --- 5. WELCOME CARD --- */
#welcome-card { background: transparent !important; }
#welcome-card .card-body {
  padding: 0 !important;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(102,217,232,.2), transparent 50%),
              radial-gradient(900px 500px at 110% 120%, rgba(177,151,252,.18), transparent 50%),
              linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.65)) !important;
}
[data-bs-theme="dark"] #welcome-card .card-body {
  background: radial-gradient(1200px 600px at 10% -10%, rgba(102,217,232,.1), transparent 50%),
              radial-gradient(900px 500px at 110% 120%, rgba(177,151,252,.08), transparent 50%),
              linear-gradient(180deg, rgba(20,24,31,.85), rgba(20,24,31,.80)) !important;
}

#welcome-hero { position: relative; padding: 22px; z-index: 2; }
#welcome-hero .w-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: center; }
#welcome-hero .kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-radius: var(--radius-pill); background: var(--chip-bg); color: var(--text-muted);
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--border-subtle);
}
#welcome-hero .kicker .dot { width: 8px; height: 8px; border-radius: 50%; }
.kicker .dot.green  { background: #16a34a; box-shadow: 0 0 10px #16a34a; }
.kicker .dot.orange { background: #f97316; box-shadow: 0 0 10px #f97316; }
.kicker .dot.red    { background: #dc2626; box-shadow: 0 0 10px #dc2626; }

#welcome-hero .w-title {
  margin-top: 14px; font-weight: 800; line-height: 1.1;
  color: var(--text-heading); font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em;
}
#welcome-hero .w-title span {
  background: linear-gradient(90deg, var(--wc-grad-1), var(--wc-grad-2), var(--wc-grad-3));
  -webkit-background-clip: text; color: transparent;
}

/* Animation et effets du nom de la radio */
@keyframes radioNamePulse {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes radioNameShimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

#welcome-hero .w-title .radio-name-highlight {
  background: linear-gradient(90deg,
    var(--wc-grad-1) 0%,
    var(--wc-grad-2) 50%,
    var(--wc-grad-3) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: radioNamePulse 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  display: inline-block;
  transition: all 0.3s ease;
  position: relative;
  filter: drop-shadow(0 0 8px rgba(110, 168, 254, 0.3));
}

#welcome-hero .w-title .radio-name-highlight:hover {
  animation: radioNameShimmer 2s linear infinite;
  filter: drop-shadow(0 0 16px rgba(110, 168, 254, 0.6));
  transform: scale(1.05);
}

#welcome-hero .w-title .radio-name-highlight::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  background: linear-gradient(90deg,
    var(--wc-grad-1) 0%,
    var(--wc-grad-2) 50%,
    var(--wc-grad-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: radioNameShimmer 2s linear infinite;
  pointer-events: none;
}
#welcome-hero .w-sub { margin: 10px 0 18px; color: var(--text-muted); font-size: 14px; }
#welcome-hero .w-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
#welcome-hero .b-neo {
  display: inline-flex; align-items: center; gap: 8px; border: 0;
  padding: 10px 14px; border-radius: var(--radius-md); font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.08); transition: all .2s ease;
  position: relative; overflow: hidden;
}
#welcome-hero .b-neo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,.3), transparent);
  transform: translateX(-100%);
  transition: transform .5s ease;
}
#welcome-hero .b-neo:hover::before {
  transform: translateX(100%);
}
#welcome-hero .b-neo i {
  transition: transform .3s ease;
}
#welcome-hero .b-neo:hover i {
  transform: scale(1.2) rotate(12deg);
}
#welcome-hero .b-neo.danger { background: linear-gradient(180deg,#ff6b6b,#fa5252); color: #fff; }
#welcome-hero .b-neo.success { background: linear-gradient(180deg,#34d399,#16a34a); color: #fff; }
#welcome-hero .b-neo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,.15);
}
#welcome-hero .badges { display: flex; gap: 8px; flex-wrap: wrap; }
#welcome-hero .chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border-radius: var(--radius-pill); background: var(--chip-bg); color: var(--text-muted);
  font-size: 12px; border: 1px solid var(--border-subtle);
}

/* Logo Orb */
#welcome-hero .logo-orb {
  width: clamp(140px, 28vw, 200px); height: clamp(140px, 28vw, 200px); border-radius: 50%;
  background: radial-gradient(40% 40% at 60% 30%, rgba(255,255,255,.8), transparent),
              radial-gradient(60% 60% at 50% 50%, rgba(110,168,254,.15), transparent);
  display: grid; place-items: center; position: relative;
  box-shadow: inset 0 0 24px rgba(255,255,255,.3), 0 10px 24px rgba(0,0,0,.12); overflow: hidden;
  transition: all .4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}
#welcome-hero .logo-orb::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(99, 102, 241, 0.3), transparent);
  animation: spinGradient 3s linear infinite;
  opacity: 0;
  transition: opacity .4s ease;
}
#welcome-hero .logo-orb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(99, 102, 241, 0.5);
  border-right-color: rgba(99, 102, 241, 0.2);
  animation: spinBorder 2s linear infinite;
  opacity: 0;
  transition: opacity .4s ease;
}
#welcome-hero .logo-orb:hover {
  transform: scale(1.08) rotateZ(5deg);
  box-shadow: inset 0 0 32px rgba(255,255,255,.4), 0 20px 40px rgba(99, 102, 241, 0.2);
}
#welcome-hero .logo-orb:hover::before,
#welcome-hero .logo-orb:hover::after {
  opacity: 1;
}
@keyframes spinGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes spinBorder {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
[data-bs-theme="dark"] #welcome-hero .logo-orb {
  box-shadow: inset 0 0 18px rgba(255,255,255,.06), 0 10px 24px rgba(0,0,0,.4);
}
[data-bs-theme="dark"] #welcome-hero .logo-orb:hover {
  box-shadow: inset 0 0 32px rgba(255,255,255,.08), 0 20px 40px rgba(99, 102, 241, 0.3);
}
#welcome-hero .logo-orb img {
  width: 60%; height: 60%; object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.12));
  transition: filter .4s ease;
  position: relative;
  z-index: 2;
}
#welcome-hero .logo-orb:hover img {
  filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.3));
}

/* --- 6. USAGE CARDS --- */
#usage-under-welcome .usage-card {
  margin-top: 16px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow-sm);
}
.uc-kicker { font-size: 11px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; letter-spacing: .03em; font-weight: 700; }
.uc-title { font-size: 15px; font-weight: 800; color: var(--text-heading); margin-bottom: 8px; }
.uc-bar { height: 6px; border-radius: var(--radius-pill); background: var(--border-subtle); position: relative; overflow: hidden; }
.uc-bar span { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg,#22c55e,#16a34a); border-radius: var(--radius-pill); transition: width .5s ease; }
.uc-bar.alt span { background: linear-gradient(90deg,#60a5fa,#3b82f6); }
.uc-meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.uc-badge {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; font-size: 18px; color: var(--text-muted);
  background: var(--hover-bg); border: 1px solid var(--border-subtle);
}
.uc-badge.state-ok { background: linear-gradient(135deg,#22c55e,#16a34a); color: #fff; }
.uc-badge.state-warn { background: linear-gradient(135deg,#f59e0b,#f97316); color: #fff; }
.uc-badge.state-danger { background: linear-gradient(135deg,#ef4444,#dc2626); color: #fff; animation: pulse .8s infinite; }

.uc-ring { --size: 58px; --track: var(--border-subtle); --fill: #22c55e; position: relative; width: var(--size); height: var(--size); flex-shrink: 0; }
.uc-ring-mask { width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(var(--fill) 0deg, var(--track) 0deg); }
.uc-ring-center {
  position: absolute; inset: 5px; border-radius: 50%;
  background: var(--panel-strong); display: grid; place-items: center;
}
.uc-ring-value {
  font-weight: 800; font-size: 24px; color: var(--text-heading);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.uc-ring-value i {
  font-size: 28px !important;
  font-weight: 400 !important;
  transition: all .3s ease;
  display: inline-block !important;
}
.usage-card:hover .uc-ring-value i {
  transform: rotate(20deg) scale(1.15);
}
.uc-badge i {
  font-size: 20px !important;
  font-weight: 400 !important;
  display: inline-block !important;
}
.usage-card.ok .uc-ring { --fill: #22c55e; }
.usage-card.warn .uc-ring { --fill: #f59e0b; }
.usage-card.danger .uc-ring { --fill: #ef4444; }
.usage-card:hover {
  transform: translateY(-4px);
}

/* --- 7. PLAYER CARD --- */
#radio-player-card {
  border-radius: 24px; overflow: hidden;
  background: var(--panel-strong);
  box-shadow: var(--shadow-lg); border: none;
}
.rpc-cover {
  position: relative; width: 100%; padding-top: 20px;
  display: flex; justify-content: center; align-items: center; isolation: isolate;
}
.rpc-cover-blur {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(40px) saturate(1.6); opacity: .35; z-index: 0; transform: scale(1.2);
}
/* Animations de glissement pour les covers */
@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(30px) scale(0.95);
    filter: blur(4px);
  }
  50% {
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes slideOutLeft {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-30px) scale(0.95);
    filter: blur(4px);
  }
}

@keyframes slideBlurOut {
  0% {
    opacity: 0.8;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    filter: blur(8px);
  }
}

@keyframes slideBlurIn {
  0% {
    opacity: 0;
    filter: blur(8px);
  }
  100% {
    opacity: 0.8;
    filter: blur(0);
  }
}

.rpc-cover-img {
  position: relative; z-index: 2; width: 82%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 18px; box-shadow: 0 15px 35px rgba(0,0,0,.25);
  transition: transform .4s cubic-bezier(.175,.885,.32,1.275);
}

/* Animation au changement de cover */
.rpc-cover-img.slide-out {
  animation: slideOutLeft 0.5s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.rpc-cover-img.slide-in {
  animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.rpc-cover-blur {
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.rpc-cover-blur.fade-out {
  animation: slideBlurOut 0.4s ease forwards;
}

.rpc-cover-blur.fade-in {
  animation: slideBlurIn 0.5s ease 0.1s forwards;
}

#radio-player-card:hover .rpc-cover-img { transform: scale(1.02); }
.rpc-onair {
  position: absolute; left: 18px; top: 28px; z-index: 3; padding: 5px 12px;
  border-radius: var(--radius-sm); background: rgba(220,38,38,.9); backdrop-filter: blur(4px);
  color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1px;
  display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 12px rgba(220,38,38,.25);
}
.rpc-onair .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: livePulse 1.5s infinite; }
.rpc-play {
  position: absolute; bottom: -24px; right: 28px; z-index: 10;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; font-size: 22px; cursor: pointer;
  box-shadow: 0 8px 18px rgba(99,102,241,.35);
  display: grid; place-items: center; transition: all .2s ease;
}
.rpc-play:hover { transform: scale(1.08); filter: brightness(1.1); }
.rpc-body { padding: 32px 20px 18px; text-align: left; }
.rpc-title {
  font-size: 1.2rem; font-weight: 800; margin-bottom: 2px; letter-spacing: -.4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-heading);
}
.rpc-artist { font-size: .85rem; font-weight: 500; opacity: .7; color: var(--primary); margin-bottom: 12px; }

.rpc-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.btn-neo {
  width: 38px; height: 38px; border-radius: 10px; border: none;
  background: var(--hover-bg); color: inherit; transition: all .2s; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-neo:hover { background: var(--primary); color: #fff; }
#mic-vumeter { background: var(--hover-bg); border-radius: 6px; }

.rpc-rotation-display {
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--chip-bg); border: 1px solid var(--border-subtle);
  font-size: 12px; font-weight: 600; color: var(--chip-ink);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* --- 8. HEADERS LIB --- */
.lib-header {
  padding: 1.1rem 1.4rem;
  background: linear-gradient(180deg, rgba(99,102,241,.04), transparent);
  border-bottom: 1px solid var(--border-subtle); position: relative;
}
.lib-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0; width: 20%; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent); opacity: .6;
}
.section-title .icon-wrapper {
  font-size: 20px; width: 42px; height: 42px; border-radius: var(--radius-md);
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(99,102,241,.1); color: var(--accent);
  border: 1px solid rgba(99,102,241,.2);
  box-shadow: 0 4px 10px rgba(99,102,241,.12);
}
.st-title { font-size: 1.05rem; font-weight: 800; color: var(--text-heading); letter-spacing: -.02em; margin-bottom: 2px; }
.st-subtitle { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* --- 9. BADGE & PILLS --- */
.badge-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font-weight: 600; font-size: .74rem; padding: .3rem .55rem; border-radius: var(--radius-pill);
  background: var(--chip-bg); color: var(--chip-ink); border: 1px solid rgba(99,102,241,.12);
}
.status-btn { font-weight: 800; letter-spacing: 1px; transition: all .3s ease; }
.status-on { background: rgba(16,185,129,.15); color: #10b981; border: 1px solid rgba(16,185,129,.3); }
.status-off { background: rgba(239,68,68,.15); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }

.pill-filter {
  display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .5rem;
  border-radius: var(--radius-pill); cursor: pointer; font-size: .78rem; font-weight: 600;
  background: var(--hover-bg); border: 1px solid var(--border-subtle); color: var(--text-muted);
  transition: all .2s;
}
.pill-filter.active { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.4); color: var(--accent); }

.modern-pills .nav-link {
  border-radius: 10px; padding: .4rem .7rem;
  background: var(--hover-bg); border: 1px solid var(--border-subtle);
  font-weight: 600; font-size: .82rem; color: var(--text-muted); transition: all .2s;
}
.modern-pills .nav-link.active {
  background: linear-gradient(180deg, rgba(99,102,241,.2), rgba(34,211,238,.12));
  border-color: rgba(99,102,241,.4); color: var(--accent);
}

/* --- TABS SANS BACKGROUND NOIR --- */
.no-bg-pills .nav-link {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  padding: 0.4rem 0 !important;
  border-radius: 0 !important;
}
.no-bg-pills .nav-link.active {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid var(--accent) !important;
  color: var(--accent) !important;
}

.planner-toolbar { border-radius: var(--radius-sm); }

/* --- 10. QUEUE CARDS --- */
.q-list, .h-list { min-height: 180px; }
.q-card {
  display: grid; grid-template-columns: 28px 56px 1fr auto;
  gap: .65rem; align-items: center; padding: .55rem .65rem;
  border-radius: 12px; background: var(--hover-bg); border: 1px solid var(--border-subtle);
  transition: transform .15s, background .2s, border-color .2s; margin-bottom: .5rem;
  border-left: 3px solid var(--primary);
}
.q-card:hover { transform: translateY(-1px); border-color: rgba(99,102,241,.3); }
.q-card-minimal { grid-template-columns: 24px 1fr auto !important; background: transparent !important; padding: 4px 10px !important; border-left-color: var(--text-muted); }

/* Animation d'arrivée en haut de la queue */
@keyframes slideInQueueTop {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(0.95);
    filter: blur(4px);
  }
  60% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.queue-item-incoming {
  border-left-color: #d946ef !important;
  background: linear-gradient(180deg, rgba(217,70,239,.08), var(--hover-bg));
}

.queue-item-incoming .q-drag i {
  animation: spin 1s linear infinite;
}

.q-drag { display: flex; align-items: center; justify-content: center; color: var(--text-muted); cursor: grab; }
.q-cover { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; }
.q-cover img { width: 100%; height: 100%; object-fit: cover; }
.q-meta .q-top { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.q-type {
  display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .4rem;
  border-radius: var(--radius-pill); font-size: .68rem; font-weight: 700;
  border: 1px solid var(--border-subtle); background: var(--hover-bg);
}
.q-type.type-music { border-color: rgba(99,102,241,.4); background: rgba(99,102,241,.12); color: var(--accent); }
.q-type.type-jingle { border-color: rgba(234,179,8,.4); background: rgba(234,179,8,.12); color: var(--warning); }
.q-type.type-vt { border-color: rgba(6,182,212,.4); background: rgba(6,182,212,.12); color: #06b6d4; }
.q-title { font-weight: 700; font-size: .88rem; letter-spacing: .2px; color: var(--text-heading); }
.q-artist { opacity: .8; font-weight: 500; font-size: .78rem; color: var(--text-muted); }

.q-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.q-time-info { display: flex; gap: 8px; align-items: center; }
.q-eta { font-size: 12px; font-weight: 700; color: var(--warning); font-family: monospace; }
.q-dur { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.q-actions { display: flex; gap: 4px; }
.qbtn {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border-subtle); background: var(--hover-bg);
  cursor: pointer; color: inherit; transition: all .15s;
}
.qbtn:hover { border-color: rgba(99,102,241,.4); background: rgba(99,102,241,.15); color: var(--accent); }
.qbtn.q-del:hover { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.12); color: var(--danger); }

/* --- 11. HISTORY CARDS --- */
.h-card {
  display: grid; grid-template-columns: 4px 48px 1fr; gap: 10px; align-items: center;
  padding: 8px; background: var(--hover-bg); border-radius: var(--radius-sm);
  margin-bottom: 6px; transition: background .2s;
}
.h-card:hover { background: rgba(99,102,241,.06); }
.h-mark { width: 4px; height: 100%; min-height: 40px; background: var(--primary); border-radius: 4px; }
.h-cover img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.h-meta .q-title { font-weight: 600; font-size: 13px; }
.h-meta .q-artist { font-size: 11px; color: var(--text-muted); }
.h-info-row { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.h-listeners, .h-plays {
  font-size: 10px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 3px;
  background: var(--chip-bg); padding: 1px 6px; border-radius: var(--radius-pill);
}

/* --- 12. SHOWS --- */
#rs-shows.rs-card { border: 0; border-radius: 18px; }
.rs-list { list-style: none; padding: 0; margin: 0; }

/* Animation d'apparition glissée depuis la droite */
@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.rs-item {
  display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 10px;
  border-radius: 12px; background: var(--hover-bg); border: 1px solid var(--border-subtle);
  transition: all .15s; margin-bottom: 8px;
  animation: slideInFromRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Stagger delays pour effet cascadant */
.rs-item:nth-child(1) { animation-delay: 0.05s; }
.rs-item:nth-child(2) { animation-delay: 0.1s; }
.rs-item:nth-child(3) { animation-delay: 0.15s; }
.rs-item:nth-child(4) { animation-delay: 0.2s; }
.rs-item:nth-child(5) { animation-delay: 0.25s; }
.rs-item:nth-child(n+6) { animation-delay: 0.25s; }

.rs-item:hover { border-color: rgba(99,102,241,.3); }
.rs-icon {
  height: 48px; width: 48px; border-radius: 12px;
  display: grid; place-items: center; color: #fff; font-size: 20px;
}
.rs-pink { background: linear-gradient(135deg,#ff4d8d,#ff6aa5); }
.rs-blue { background: linear-gradient(135deg,#0ea5e9,#3b82f6); }
.rs-purple { background: linear-gradient(135deg,#8b5cf6,#a78bfa); }
.rs-green { background: linear-gradient(135deg,#22c55e,#16a34a); }
.rs-status {
  font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--chip-bg); color: var(--text-muted);
}
.rs-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rs-status.live { color: var(--danger); background: rgba(239,68,68,.1); }

/* --- 13. LIBRARY --- */
.lib-item-drag {
  cursor: grab; background: var(--hover-bg); border: 1px solid var(--border-subtle);
  margin-bottom: 4px; padding: 8px; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 10px; transition: all .15s;
}
.lib-item-drag:hover { border-color: rgba(99,102,241,.3); }
.lib-item-drag:active { cursor: grabbing; opacity: .8; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: 2rem; text-align: center; color: var(--text-muted);
  transition: all .2s; background: var(--hover-bg);
}
.upload-zone.drag-over { border-color: var(--primary); background: rgba(99,102,241,.06); }

/* --- 13.5 EMPTY & LOADING STATES --- */
.state-container {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 3rem 2rem; min-height: 300px;
}

.state-icon {
  width: 80px; height: 80px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 2.5rem;
  margin-bottom: 1.5rem; background: var(--hover-bg); border: 2px solid var(--border-subtle);
  transition: all .3s ease;
}

.state-title {
  font-size: 1.1rem; font-weight: 800; color: var(--text-heading);
  margin-bottom: 0.5rem; letter-spacing: -.02em;
}

.state-subtitle {
  font-size: 0.9rem; color: var(--text-muted); line-height: 1.4;
  max-width: 280px;
}

/* LOADING STATE */
.state-container.is-loading .state-icon {
  background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(99,102,241,.05));
  border-color: rgba(99,102,241,.2);
  animation: statePulse 2s ease-in-out infinite;
}

.state-container.is-loading .state-icon i {
  animation: spin 1s linear infinite;
}

@keyframes statePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* EMPTY STATE */
.state-container.is-empty .state-icon {
  background: linear-gradient(135deg, rgba(148,163,184,.1), rgba(148,163,184,.05));
  border-color: rgba(148,163,184,.2);
  animation: slideInDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.state-container.is-empty .state-title {
  animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.state-container.is-empty .state-subtitle {
  animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- 14. MANAGEMENT ROW --- */
.mgmt-item {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  border-radius: 10px; background: var(--hover-bg); border: 1px solid var(--border-subtle);
  margin-bottom: 6px; transition: all .15s;
}
.mgmt-item:hover { border-color: rgba(99,102,241,.3); transform: translateX(2px); }
.mgmt-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99,102,241,.1); color: var(--accent); font-size: 18px; flex-shrink: 0;
}

/* --- 15. SKELETONS --- */
@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}
.skeleton-item {
  background: var(--hover-bg);
  background-image: linear-gradient(to right, transparent 0%, rgba(99,102,241,.04) 20%, transparent 40%);
  background-repeat: no-repeat; background-size: 800px 100%;
  display: flex; align-items: center; padding: 12px; margin-bottom: 8px;
  border-radius: var(--radius-sm); animation: shimmer 1.5s infinite linear;
}
.skeleton-img { width: 40px; height: 40px; border-radius: 6px; background: var(--border-subtle); margin-right: 12px; }
.skeleton-text { flex: 1; }
.skeleton-line { height: 10px; margin-bottom: 6px; border-radius: 4px; background: var(--border-subtle); width: 80%; }
.skeleton-line.short { width: 40%; }

/* --- 16. ANIMATIONS --- */
.animation-pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%{opacity:1}50%{opacity:.5}100%{opacity:1} }

/* --- 17. SWEETALERT DARK --- */
[data-bs-theme="dark"] .swal2-popup { background: #1e293b !important; color: #f1f5f9 !important; }
[data-bs-theme="dark"] .swal2-title { color: #f8fafc !important; }
[data-bs-theme="dark"] .swal2-html-container { color: #94a3b8 !important; }
[data-bs-theme="dark"] .swal2-input { background: #334155 !important; color: #f1f5f9 !important; border-color: #475569 !important; }
.swal2-popup { border-radius: 18px !important; }
.swal2-confirm { border-radius: var(--radius-pill) !important; }

/* --- 18. OFFCANVAS --- */
.offcanvas-newshow { width: min(640px, 92vw); border-radius: 1rem 0 0 1rem; box-shadow: -18px 0 40px rgba(0,0,0,.08); }
[data-bs-theme="dark"] .offcanvas-newshow { background: #1e293b; }

/* --- 19. MODAL --- */
[data-bs-theme="dark"] .modal-content { background: #1e293b; color: var(--text); border: 1px solid rgba(255,255,255,.08); }

/* --- 20. SCROLLBAR --- */
.custom-scroll::-webkit-scrollbar { width: 5px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: rgba(99,102,241,.25); border-radius: 10px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,.4); }

/* --- 21. RESPONSIVE --- */
@media (max-width: 767px) {
  #welcome-hero .w-grid { grid-template-columns: 1fr; }
  #welcome-hero .logo-orb { display: none; }
  .stat-tile { padding: .8rem 1rem; }
  .stat-tile .big { font-size: 1.2rem; }
  .q-card { grid-template-columns: 24px 44px 1fr auto; font-size: .85rem; }
  .q-cover { width: 44px; height: 44px; }
  .rpc-cover-img { width: 70%; }
  .planner-toolbar { overflow-x: auto; flex-wrap: nowrap; }
  #row-management .col-xl-4 { margin-bottom: 12px; }
  .rpc-controls { flex-wrap: wrap; }
}

@media (max-width: 575px) {
  .container-fluid, .page-content { padding-left: 8px !important; padding-right: 8px !important; }
  .actions-avenir { flex-wrap: wrap; gap: 4px !important; }
  .q-card { grid-template-columns: 20px 40px 1fr; gap: .4rem; padding: .4rem; }
  .q-side { display: none; }
}

/* Activities Refresh Button - Enhanced for Light & Dark modes */
.activities-refresh-btn {
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}

.activities-refresh-btn:hover {
  background: var(--hover-bg) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  transform: rotate(-20deg);
}

.activities-refresh-btn:active {
  transform: rotate(-20deg) scale(0.95);
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  .activities-refresh-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
  }

  .activities-refresh-btn:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgb(99, 102, 241) !important;
    color: rgb(99, 102, 241) !important;
  }
}

/* --- 22. KPI DASHBOARD v2 ENHANCEMENTS --- */

/* Time period selector */
.kpi-top-bar {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.kpi-period-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.kpi-period-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--hover-bg);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kpi-period-btn:hover {
  background: var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.kpi-period-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* KPI Actions */
.kpi-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* KPI Cards */
.kpi-card {
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  background: var(--hover-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.kpi-card.updated::before {
  transform: scaleX(1);
}

/* KPI Header */
.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.kpi-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kpi-icon {
  font-size: 20px;
}

.kpi-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.kpi-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kpi-detail-btn {
  padding: 4px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-detail-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Status Dot */
.kpi-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.kpi-status-dot.status-good {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.kpi-status-dot.status-warning {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
  animation: pulse-warning 2s infinite;
}

.kpi-status-dot.status-danger {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
  animation: pulse-danger 2s infinite;
}

@keyframes pulse-warning {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@keyframes pulse-danger {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* KPI Value Section */
.kpi-value-section {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.kpi-current {
  flex: 1;
}

.kpi-big-number {
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.kpi-big-number.updated {
  animation: countUp 0.6s ease-out;
}

@keyframes countUp {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* Variation Badge */
.kpi-variation {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kpi-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,.04);
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
}

.kpi-badge.trend-up {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.kpi-badge.trend-down {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.kpi-badge.trend-flat {
  color: #6b7280;
  background: rgba(107, 114, 128, 0.1);
}

.kpi-compare {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Sparkline */
.kpi-sparkline {
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.kpi-card:hover .kpi-sparkline {
  opacity: 1;
}

.kpi-sparkline path {
  stroke: var(--primary);
}

/* KPI Action Buttons */
#kpi-refresh-btn,
#kpi-export-btn,
#kpiExportMenu {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--hover-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

#kpi-refresh-btn:hover,
#kpi-export-btn:hover,
#kpiExportMenu:hover {
  background: var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

#kpi-refresh-btn:active,
#kpi-export-btn:active,
#kpiExportMenu:active {
  transform: translateY(0);
}

#kpi-refresh-btn i,
#kpi-export-btn i,
#kpiExportMenu i {
  font-size: 1rem;
}

/* Export Dropdown Menu */
#kpiExportMenu::after {
  margin-left: 0.5rem;
}

.kpi-actions .dropdown-menu {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  min-width: 120px;
}

.kpi-actions .dropdown-item {
  color: var(--text);
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.kpi-actions .dropdown-item:hover {
  background: var(--hover-bg);
  color: var(--primary);
}

.kpi-actions .dropdown-item:active {
  background: var(--primary);
  color: white;
}

[data-bs-theme="dark"] .kpi-actions .dropdown-menu {
  background: #1e293b;
  border-color: rgba(255,255,255,.08);
}

/* Responsive KPI */
@media (max-width: 768px) {
  .kpi-top-bar {
    flex-direction: column;
  }

  .kpi-card {
    padding: 1rem;
  }

  .kpi-big-number {
    font-size: 1.5rem;
  }

  .kpi-value-section {
    flex-direction: column;
    gap: 0.75rem;
  }

  .kpi-sparkline {
    width: 100%;
  }

  .kpi-period-selector {
    width: 100%;
  }

  .kpi-actions {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .kpi-actions button,
  .kpi-actions .dropdown {
    flex: 1;
    min-width: auto;
  }

  #kpi-refresh-btn,
  #kpi-export-btn,
  #kpiExportMenu {
    width: 100%;
    justify-content: center;
  }
}

/* --- 23. PLAYER CARD MODERNIZATION --- */

/* Container Redesign with Gradients & Improved Shadows */
#radio-player-card {
  background: linear-gradient(135deg, var(--panel-strong) 0%, color-mix(in oklab, var(--panel-strong) 95%, var(--primary)) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] #radio-player-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

#radio-player-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* Cover Section Modernization */
.rpc-cover {
  position: relative;
  width: 100%;
  padding-top: 28px;
  padding-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  isolation: isolate;
  overflow: visible;
}

/* Hide the blur background - keep only the image */
.rpc-cover-blur {
  display: none !important;
}

.rpc-cover-img {
  position: relative;
  z-index: 2;
  width: 82%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#radio-player-card:hover .rpc-cover-img {
  animation: coverHoverPulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes coverHoverPulse {
  0% {
    transform: scale(1) rotateY(0deg) rotateX(0deg);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.08) rotateY(-3deg) rotateX(2deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(59, 130, 246, 0.3),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
    filter: brightness(1.1) drop-shadow(0 0 15px rgba(59, 130, 246, 0.5));
  }
  100% {
    transform: scale(1.06) rotateY(-1deg) rotateX(0deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35),
                0 0 20px rgba(59, 130, 246, 0.2);
    filter: brightness(1.08);
  }
}

/* ON AIR Badge Modernization */
.rpc-onair {
  position: absolute;
  left: 22px;
  top: 32px;
  z-index: 5;
  padding: 6px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95) 0%, rgba(185, 28, 28, 0.9) 100%);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#radio-player-card:hover .rpc-onair {
  animation: badgeGlow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes badgeGlow {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95) 0%, rgba(185, 28, 28, 0.9) 100%);
  }
  50% {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.6),
                0 0 20px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, rgba(239, 68, 68, 1) 0%, rgba(220, 38, 38, 0.95) 100%);
  }
  100% {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.5),
                0 0 15px rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.98) 0%, rgba(220, 38, 38, 0.93) 100%);
  }
}

/* Meta Section Enhancement (Title & Artist) */
.rpc-body {
  padding: 32px 20px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
}

.rpc-meta {
  margin-bottom: 18px;
  margin-top: 12px;
}

/* --- PLAYER ACTION BUTTONS TOOLBAR --- */
.rpc-actions-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rpc-action-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
  color: rgba(99, 102, 241, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}

.rpc-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.rpc-action-btn:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.15));
  color: rgba(99, 102, 241, 1);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25),
              inset 0 0 12px rgba(99, 102, 241, 0.1);
  transform: translateY(-3px) scale(1.05);
}

.rpc-action-btn:hover::before {
  opacity: 1;
}

.rpc-action-btn:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* Bouton spécial pour l'info de connexion */
#btn-connection-info {
  border-color: rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  color: rgba(34, 197, 94, 0.8);
}

#btn-connection-info:hover {
  border-color: rgba(34, 197, 94, 0.6);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.15));
  color: rgba(34, 197, 94, 1);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25),
              inset 0 0 12px rgba(34, 197, 94, 0.1);
}

/* Boutons pour augmenter/diminuer priorité */
#btn-increase-priority {
  border-color: rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  color: rgba(34, 197, 94, 0.8);
}

#btn-increase-priority:hover {
  border-color: rgba(34, 197, 94, 0.6);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.15));
  color: rgba(34, 197, 94, 1);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25),
              inset 0 0 12px rgba(34, 197, 94, 0.1);
}

#btn-decrease-priority {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
  color: rgba(239, 68, 68, 0.8);
}

#btn-decrease-priority:hover {
  border-color: rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.15));
  color: rgba(239, 68, 68, 1);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.25),
              inset 0 0 12px rgba(239, 68, 68, 0.1);
}

/* Bouton désactiver */
#btn-disable-track {
  border-color: rgba(251, 146, 60, 0.3);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.1), rgba(251, 146, 60, 0.05));
  color: rgba(251, 146, 60, 0.8);
}

#btn-disable-track:hover {
  border-color: rgba(251, 146, 60, 0.6);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(251, 146, 60, 0.15));
  color: rgba(251, 146, 60, 1);
  box-shadow: 0 8px 24px rgba(251, 146, 60, 0.25),
              inset 0 0 12px rgba(251, 146, 60, 0.1);
}

.rpc-title {
  font-size: clamp(1.15rem, 1rem + 1.5vw, 1.35rem);
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-heading);
  line-height: 1.2;
  transition: all 0.3s ease;
}

.rpc-title:hover {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rpc-artist {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.75;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

/* Enhanced Progress Bar */
.rpc-progress {
  width: 100%;
  margin-bottom: 16px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rpc-progress-bar {
  height: 8px;
  background: linear-gradient(90deg, var(--border-subtle) 0%, color-mix(in oklab, var(--border-subtle) 50%, transparent) 100%);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.rpc-progress-bar:hover {
  height: 10px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(99, 102, 241, 0.15);
}

.rpc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #7c6bff 100%);
  border-radius: 12px;
  width: 0%;
  transition: width 0.8s linear;
  position: relative;
  overflow: hidden;
}

.rpc-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.rpc-progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
  opacity: 0;
  transition: all 0.2s ease;
  cursor: grab;
}

.rpc-progress-bar:hover .rpc-progress-thumb {
  opacity: 1;
  right: -4px;
  width: 16px;
  height: 16px;
}

.rpc-progress-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.2px;
  font-weight: 500;
}

/* Volume Slider Modernization */
.rpc-volume-wrapper {
  margin-bottom: 18px !important;
  padding: 12px;
  background: var(--hover-bg);
  border-radius: 14px;
  transition: all 0.3s ease;
}

.rpc-volume-wrapper:hover {
  background: color-mix(in oklab, var(--hover-bg) 85%, var(--primary));
}

.rpc-volume-slider {
  width: 100%;
  height: 5px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--border-subtle) 0%, color-mix(in oklab, var(--border-subtle) 50%, transparent) 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.rpc-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
}

.rpc-volume-slider::-webkit-slider-thumb:hover {
  width: 16px;
  height: 16px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.6);
}

.rpc-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
}

.rpc-volume-slider::-moz-range-thumb:hover {
  width: 16px;
  height: 16px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.6);
}

/* Stats Widget Redesign */
.rpc-stats {
  margin-bottom: 18px !important;
  gap: 12px !important;
}

.rpc-stat-widget {
  flex: 1;
  padding: 14px 12px;
  border-radius: 14px;
  background: var(--hover-bg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rpc-stat-widget:hover {
  background: color-mix(in oklab, var(--hover-bg) 90%, var(--primary));
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.1);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: color-mix(in oklab, currentColor 15%, transparent);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.rpc-stat-widget:hover .stat-icon {
  transform: scale(1.1);
  filter: brightness(1.15);
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}

/* Rotation Display Badge Modernization */
.rpc-rotation-display {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--chip-bg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

.rpc-rotation-display:hover {
  background: color-mix(in oklab, var(--chip-bg) 85%, var(--primary));
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.icon-onair {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--primary) 20%, transparent);
  color: var(--primary);
  font-size: 16px;
  transition: all 0.3s ease;
}

.rpc-rotation-display:hover .icon-onair {
  transform: scale(1.1) rotate(12deg);
  background: color-mix(in oklab, var(--primary) 30%, transparent);
}

/* Play Button Enhancement */
.rpc-play {
  position: absolute;
  bottom: -20px;
  right: 28px;
  z-index: 10;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, var(--primary) 0%, #7c6bff 100%);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
  display: grid;
  place-items: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.rpc-play:hover {
  transform: scale(1.12);
  filter: brightness(1.15);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.rpc-play:active {
  transform: scale(0.95);
}

/* Popup Button */
.rpc-popup-btn {
  position: absolute;
  right: 18px;
  top: 28px;
  z-index: 6;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.rpc-popup-btn:hover {
  background: #fff;
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .rpc-popup-btn {
  background: rgba(30, 41, 59, 0.8);
  color: #fff;
}

[data-bs-theme="dark"] .rpc-popup-btn:hover {
  background: rgba(30, 41, 59, 0.95);
}

/* Animation Improvements */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-60px);
  }
}

@keyframes slideBlurIn {
  from {
    filter: blur(20px);
    opacity: 0;
  }
  to {
    filter: blur(0);
    opacity: 0.35;
  }
}

@keyframes slideBlurOut {
  from {
    filter: blur(0);
    opacity: 0.35;
  }
  to {
    filter: blur(20px);
    opacity: 0;
  }
}

.rpc-cover-img.slide-out {
  animation: slideOutLeft 0.5s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.rpc-cover-img.slide-in {
  animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.rpc-cover-blur.fade-out {
  animation: slideBlurOut 0.4s ease forwards;
}

.rpc-cover-blur.fade-in {
  animation: slideBlurIn 0.5s ease 0.1s forwards;
}

/* Responsive Design for Mobile/Tablet */
@media (max-width: 1200px) {
  .rpc-title {
    font-size: 1.1rem;
  }

  .rpc-stat-widget {
    padding: 12px 10px;
    font-size: 0.9rem;
  }

  .rpc-progress-bar:hover {
    height: 5px;
  }
}

@media (max-width: 768px) {
  #radio-player-card {
    border-radius: 24px;
  }

  .rpc-cover {
    padding-top: 24px;
    padding-bottom: 10px;
  }

  .rpc-cover-img {
    width: 75%;
    border-radius: 18px;
  }

  .rpc-body {
    padding: 24px 16px 14px;
  }

  .rpc-title {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .rpc-artist {
    font-size: 0.85rem;
    margin-bottom: 10px;
  }

  .rpc-progress {
    margin-bottom: 12px;
  }

  .rpc-volume-wrapper {
    margin-bottom: 14px !important;
    padding: 10px;
  }

  .rpc-stats {
    margin-bottom: 14px !important;
  }

  .rpc-stat-widget {
    padding: 10px 8px;
    border-radius: 12px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .stat-val {
    font-size: 0.9rem;
  }

  .rpc-rotation-display {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
  }

  .rpc-play {
    width: 50px;
    height: 50px;
    font-size: 20px;
    bottom: -20px;
    right: 24px;
  }

  .rpc-onair {
    left: 18px;
    top: 26px;
    padding: 5px 12px;
    font-size: 0.7rem;
  }

  .rpc-popup-btn {
    width: 36px;
    height: 36px;
    right: 16px;
    top: 26px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  #radio-player-card {
    border-radius: 20px;
  }

  .rpc-cover {
    padding-top: 20px;
    padding-bottom: 8px;
  }

  .rpc-cover-img {
    width: 70%;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  }

  .rpc-body {
    padding: 20px 14px 12px;
  }

  .rpc-title {
    font-size: 0.95rem;
    margin-bottom: 4px;
  }

  .rpc-artist {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .rpc-volume-wrapper {
    margin-bottom: 12px !important;
    padding: 8px;
    gap: 6px !important;
  }

  .rpc-progress {
    margin-bottom: 10px;
  }

  .rpc-progress-bar {
    height: 4px;
  }

  .rpc-stats {
    flex-direction: column;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .rpc-stat-widget {
    padding: 8px;
    border-radius: 10px;
  }

  .stat-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .stat-label {
    font-size: 0.6rem;
    margin-bottom: 1px;
  }

  .stat-val {
    font-size: 0.85rem;
  }

  .rpc-rotation-display {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
  }

  .icon-onair {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 14px;
  }
}

/* --- KPI QUICK REFRESH BUTTON --- */
.kpi-quick-refresh {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 20;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  opacity: 0.7;
}

.kpi-quick-refresh:hover {
  opacity: 1;
  background: var(--hover-bg);
  color: var(--text-heading);
  transform: rotate(20deg);
}

.kpi-quick-refresh.loading {
  animation: spinRefresh 0.8s linear infinite;
  color: var(--primary-color);
  opacity: 1;
}

@keyframes spinRefresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}