/* =========================================
   AlphaStudios Radio — Raycast-inspired UI
   ========================================= */

@font-face { font-family: 'Inter Fallback'; src: local('Arial'); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Raycast palette */
  --bg:          #07080a;
  --surface:     #101111;
  --surface-2:   #1b1c1e;
  --border:      hsl(195, 5%, 15%);
  --border-2:    #2f3031;
  --border-sub:  rgba(255,255,255,0.06);

  --red:         #FF6363;
  --red-dim:     hsla(0,100%,69%,0.15);
  --blue:        hsl(202,100%,67%);
  --blue-dim:    hsla(202,100%,67%,0.15);
  --green:       hsl(151,59%,59%);
  --green-dim:   hsla(151,59%,59%,0.15);
  --yellow:      hsl(43,100%,60%);
  --yellow-dim:  hsla(43,100%,60%,0.12);

  --text:        #f9f9f9;
  --text-2:      #cecece;
  --text-3:      #9c9c9d;
  --text-4:      #6a6b6c;
  --text-5:      #434345;

  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   16px;
  --radius-pill: 86px;

  --shadow-ring: rgb(27,28,30) 0px 0px 0px 1px, rgb(7,8,10) 0px 0px 0px 1px inset;
  --shadow-btn:  rgba(255,255,255,0.05) 0px 1px 0px 0px inset, rgba(255,255,255,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.2) 0px -1px 0px 0px inset;
  --shadow-float: rgba(0,0,0,0.5) 0px 0px 0px 2px, rgba(255,255,255,0.08) 0px 0px 24px, rgba(0,0,0,0.4) 0px 8px 32px;
  --sidebar-w:   220px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Inter Fallback', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.2px;
  font-feature-settings: 'calt', 'kern', 'liga', 'ss03';
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ===================== LOGIN ===================== */
.login-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 100;
  overflow: hidden;
}

.login-stripe {
  position: absolute;
  width: 600px; height: 600px;
  top: -200px; right: -100px;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 18px,
    rgba(255,99,99,0.04) 18px,
    rgba(255,99,99,0.04) 20px
  );
  pointer-events: none;
}

.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  border: 1px solid var(--border-sub);
  padding: 32px;
  position: relative; z-index: 1;
}

.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.login-logo h1 { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.login-logo p { font-size: 12px; color: var(--text-3); margin-top: 1px; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer; border: none;
  transition: opacity 0.15s;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: 0.7; }
.btn:active { opacity: 0.5; transform: scale(0.985); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-cta {
  background: hsla(0,0%,100%,0.9);
  color: #18191a;
  border-radius: var(--radius-pill);
  box-shadow: rgba(255,255,255,0.1) 0px 1px 0px 0px inset;
  font-weight: 700;
}
.btn-cta:hover { background: #fff; opacity: 1; }

.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: rgba(0,0,0,0.03) 0px 7px 3px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-4);
  border-radius: var(--radius-pill);
  box-shadow: rgba(255,255,255,0.05) 0px 1px 0px 0px inset;
}
.btn-ghost:hover { color: var(--text); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255,99,99,0.2);
}
.btn-success-sm {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(95,201,146,0.2);
}
.btn-warning-sm {
  background: var(--yellow-dim);
  color: var(--yellow);
  border: 1px solid rgba(255,188,51,0.2);
}

.btn-sm { padding: 5px 11px; font-size: 12px; }
.full-width { width: 100%; justify-content: center; }

.btn-logout {
  background: transparent; border: none;
  color: var(--text-4); font-size: 12px; font-weight: 500;
  cursor: pointer; padding: 4px 0; text-align: left;
  font-family: inherit; transition: color 0.15s; letter-spacing: 0.2px;
}
.btn-logout:hover { color: var(--text); }

/* ===================== FORMS ===================== */
.field-group {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
}
.field-group label {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.field-group small { font-size: 11px; color: var(--text-4); letter-spacing: 0.1px; }
.field-group .muted { opacity: 0.6; }
.required { color: var(--red); }

input, textarea, select {
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px; font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.1px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--text-4); font-weight: 400; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(255,255,255,0.18);
  box-shadow: hsla(202,100%,67%,0.15) 0px 0px 0px 3px;
}
select option { background: var(--surface); }
textarea { resize: vertical; min-height: 64px; }

.error-msg {
  background: var(--red-dim);
  border: 1px solid rgba(255,99,99,0.3);
  color: var(--red);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500;
}

/* ===================== LAYOUT ===================== */
#app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 600; letter-spacing: -0.1px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-4);
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.1px;
  transition: color 0.15s, background 0.15s;
}
.nav-item svg { flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-2); }
.nav-item.active {
  background: rgba(255,99,99,0.08);
  color: var(--text);
  box-shadow: rgba(255,99,99,0.12) 0px 0px 0px 1px;
}
.nav-item.active svg { opacity: 1; color: var(--red); }

.sidebar-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.user-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px;
}
.user-avatar {
  width: 24px; height: 24px;
  background: var(--red-dim);
  border: 1px solid rgba(255,99,99,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--red);
  flex-shrink: 0;
}
#sidebar-user { font-size: 12px; font-weight: 500; color: var(--text-3); }

.main-content {
  flex: 1; overflow-y: auto;
  padding: 36px 40px;
  background: var(--bg);
}

/* ===================== SECTIONS ===================== */
.section.hidden { display: none !important; }
.section.active { display: block; }

.section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px;
}
.section-header h2 {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.4px;
  font-feature-settings: 'liga' 0, 'ss02', 'ss08';
}
.section-sub { font-size: 13px; color: var(--text-3); margin-top: 3px; font-weight: 400; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.live-indicator {
  display: flex; align-items: center; gap: 6px;
  background: var(--green-dim);
  border: 1px solid rgba(95,201,146,0.2);
  color: var(--green);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(95,201,146,0.4); }
  50% { opacity:0.7; box-shadow: 0 0 0 4px rgba(95,201,146,0); }
}

/* ===================== STAT CARDS ===================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 0;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-ring);
  transition: border-color 0.15s;
}
.stat-card:hover { border-color: rgba(255,255,255,0.1); }

.stat-card-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
}

.stat-icon-wrap {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon-green { background: var(--green-dim); color: var(--green); }
.stat-icon-blue  { background: var(--blue-dim);  color: var(--blue);  }
.stat-icon-red   { background: var(--red-dim);   color: var(--red);   }
.stat-icon-yellow{ background: var(--yellow-dim); color: var(--yellow);}

.stat-value {
  font-size: 26px; font-weight: 700;
  letter-spacing: -1px;
  font-feature-settings: 'liga' 0;
}
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 500; margin-top: 1px; }

.stat-bar {
  height: 2px;
  background: var(--border);
  position: relative;
}
.stat-bar::after {
  content: '';
  position: absolute; left: 0; top: 0;
  height: 100%; width: var(--bar-w);
  background: var(--bar-color);
  opacity: 0.6;
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

/* ===================== CARDS ===================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius);
  box-shadow: var(--shadow-ring);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 14px; font-weight: 600; letter-spacing: -0.1px; }
.refresh-hint { font-size: 11px; color: var(--text-5); font-weight: 400; }
.mt-24 { margin-top: 20px; }

/* ===================== DASHBOARD RADIO LIST ===================== */
.dashboard-radios-list { display: flex; flex-direction: column; }

.dash-radio-row {
  display: grid;
  grid-template-columns: 36px 1fr 180px 120px 120px 100px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.dash-radio-row:last-child { border-bottom: none; }
.dash-radio-row:hover { background: rgba(255,255,255,0.02); }

.dash-radio-row-header {
  font-size: 11px; font-weight: 700; color: var(--text-5);
  text-transform: uppercase; letter-spacing: 0.5px;
  background: rgba(255,255,255,0.02);
}

.dash-logo {
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; overflow: hidden; flex-shrink: 0;
}
.dash-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }

.dash-name { font-size: 13px; font-weight: 600; }
.dash-slug { font-size: 11px; color: var(--red); font-family: ui-monospace, monospace; margin-top: 2px; }

.listeners-bar-wrap {
  display: flex; align-items: center; gap: 10px;
}
.listeners-bar-track {
  flex: 1; height: 4px;
  background: var(--border-2);
  border-radius: 2px; overflow: hidden;
}
.listeners-bar-fill {
  height: 100%; border-radius: 2px;
  background: var(--blue);
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
  min-width: 2px;
}
.listeners-count { font-size: 13px; font-weight: 700; color: var(--blue); min-width: 24px; text-align: right; }

.dash-total { font-size: 13px; font-weight: 500; color: var(--text-3); }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
}
.status-active { background: var(--green-dim); color: var(--green); border: 1px solid rgba(95,201,146,0.2); }
.status-suspended { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,99,99,0.2); }

.dash-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ===================== RADIOS GRID ===================== */
.radios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.radio-card {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-ring);
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative; overflow: hidden;
}
.radio-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,99,99,0.5), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.radio-card:hover { border-color: rgba(255,255,255,0.1); }
.radio-card:hover::before { opacity: 1; }
.radio-card.suspended { opacity: 0.5; }

.radio-card-top { display: flex; align-items: flex-start; gap: 12px; }
.radio-logo-lg {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; overflow: hidden; flex-shrink: 0;
}
.radio-logo-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }

.radio-info { flex: 1; min-width: 0; }
.radio-name { font-size: 14px; font-weight: 600; letter-spacing: -0.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-slug-tag {
  display: inline-block; margin-top: 3px;
  font-size: 11px; font-family: ui-monospace, monospace;
  color: var(--red); background: var(--red-dim);
  padding: 1px 6px; border-radius: 3px;
}
.radio-genre { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.radio-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; background: var(--surface-2);
  color: var(--text-3); border: 1px solid var(--border);
}
.tag-active { color: var(--green); background: var(--green-dim); border-color: rgba(95,201,146,0.2); }
.tag-suspended { color: var(--red); background: var(--red-dim); border-color: rgba(255,99,99,0.2); }
.tag-codec { color: var(--blue); background: var(--blue-dim); border-color: rgba(85,179,255,0.2); }
.tag-bitrate { color: var(--yellow); background: var(--yellow-dim); border-color: rgba(255,188,51,0.2); }

.radio-url-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font-size: 11px; font-family: ui-monospace, monospace;
  color: var(--text-3); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  overflow: hidden;
}
.radio-url-row:hover { border-color: rgba(255,99,99,0.4); color: var(--red); }
.radio-url-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.radio-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===================== AUDIENCE ===================== */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.audience-card {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-ring);
}
.audience-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.audience-radio-name { font-size: 14px; font-weight: 600; }
.audience-live-count {
  display: flex; align-items: center; gap: 6px;
  font-size: 24px; font-weight: 800; color: var(--blue);
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.audience-live-count .dot-blue {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); animation: pulse-dot 2s infinite;
}
.audience-label { font-size: 11px; color: var(--text-3); font-weight: 500; margin-bottom: 16px; }
.audience-divider { height: 1px; background: var(--border); margin: 12px 0; }
.audience-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.audience-row-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.audience-row-val { font-size: 13px; font-weight: 600; }

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7,8,10,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal-card {
  width: 100%; max-width: 660px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-header h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.modal-close-btn {
  width: 26px; height: 26px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.modal-close-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0 16px; padding: 18px 22px;
}
.span-2 { grid-column: span 2; }

.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0;
  background: var(--surface);
}

/* ===================== TOAST ===================== */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.1px;
  z-index: 999;
  box-shadow: var(--shadow-float);
  max-width: 300px;
  animation: toast-in 0.2s ease;
}
@keyframes toast-in {
  from { opacity:0; transform: translateY(8px); }
  to   { opacity:1; transform: translateY(0); }
}
.toast.success { border-color: rgba(95,201,146,0.3); color: var(--green); }
.toast.error   { border-color: rgba(255,99,99,0.3);  color: var(--red);   }

/* ===================== UTILS ===================== */
.accent-red    { color: var(--red); }
.accent-blue   { color: var(--blue); }
.accent-green  { color: var(--green); }
.accent-yellow { color: var(--yellow); }
.hidden { display: none !important; }
.muted  { opacity: 0.55; }

@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .dash-radio-row { grid-template-columns: 32px 1fr auto; }
  .dash-radio-row > *:nth-child(n+4) { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== AUDIENCE PANELS ===================== */
.aud-global-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.aud-global-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 160px;
  flex: 1;
}
.aud-gstat-val {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.aud-gstat-label {
  font-size: 11px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.audience-panels { display: flex; flex-direction: column; gap: 16px; }

.aud-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.aud-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.aud-panel-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aud-radio-name { font-size: 15px; font-weight: 600; color: var(--text); }
.aud-slug { font-family: 'Courier New', monospace; font-size: 12px; color: var(--text-4); }
.aud-live-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--blue-dim);
  border: 1px solid rgba(85,179,255,0.2);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.aud-live-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.live-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(85,179,255,0.5); }
  50% { opacity: 0.7; transform: scale(0.9); box-shadow: 0 0 0 5px rgba(85,179,255,0); }
}

.aud-kpi-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.aud-kpi {
  flex: 1;
  padding: 12px 18px;
  border-right: 1px solid var(--border);
}
.aud-kpi:last-child { border-right: none; }
.aud-kpi-val {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.aud-kpi-label {
  font-size: 10px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

/* Chart */
.aud-chart-wrap {
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}
.aud-chart-label {
  font-size: 10px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.aud-chart-svg-wrap { width: 100%; overflow: hidden; position: relative; }
.chart-no-data {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-4);
  padding: 18px 0 8px;
  font-style: italic;
}
/* Hourly bar chart */
.aud-hourly-wrap {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}
.aud-hourly-label {
  font-size: 10px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.hourly-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 52px;
  width: 100%;
}
.hourly-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 3px;
  position: relative;
}
.hourly-bar-fill {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: var(--red-dim);
  border-top: 1px solid rgba(255,99,99,0.5);
  min-height: 2px;
  transition: height 0.3s ease;
}
.hourly-bar-fill.has-data { background: rgba(255,99,99,0.3); border-top-color: var(--red); }
.hourly-bar-tick {
  font-size: 8px;
  color: var(--text-5);
  font-family: monospace;
  line-height: 1;
  transform: rotate(-45deg);
  transform-origin: center;
  white-space: nowrap;
}

/* Sessions table */
.aud-sessions { padding: 0; }
.aud-sessions-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 20px 8px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.aud-sessions-table { max-height: 220px; overflow-y: auto; }
.aud-session-row {
  display: grid;
  grid-template-columns: 120px 140px 90px 1fr;
  padding: 7px 20px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.025);
  align-items: center;
  gap: 12px;
}
.aud-session-row:last-child { border-bottom: none; }
.aud-session-header {
  font-size: 10px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(255,255,255,0.03);
}
.session-ip {
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  color: var(--text-3);
  cursor: default;
}
.session-time { color: var(--text-4); font-variant-numeric: tabular-nums; }
.session-dur {
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  font-weight: 500;
  font-size: 12px;
}
.session-ua { color: var(--text-5); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aud-no-sessions {
  padding: 14px 20px;
  font-size: 12px;
  color: var(--text-4);
  font-style: italic;
}
