/*
 * goLive — brand layer over Metronic 9 (Tailwind, dark).
 * Palette taken from the approved design:
 *   lime      #C4FF00  (primary actions, positive metrics)
 *   red       #F0384A  (REC / LIVE / negative metrics)
 *   background#080B10, surfaces #0B0E14 / #10141B, borders #1B202A
 */

@font-face {
  font-family: 'InterVariable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/InterVariable.woff2') format('woff2');
}

:root,
.dark {
  --default-font-family: 'InterVariable', ui-sans-serif, system-ui, sans-serif;
}

:root,
.dark {
  --background: #080B10;
  --foreground: #F2F4F7;
  --card: #0B0E14;
  --card-foreground: #F2F4F7;
  --popover: #10141B;
  --popover-foreground: #F2F4F7;
  --primary: #C4FF00;
  --primary-foreground: #0A0F00;
  --secondary: #151A22;
  --secondary-foreground: #F2F4F7;
  --muted: #10141B;
  --muted-foreground: #7C8391;
  --accent: #151A22;
  --accent-foreground: #F2F4F7;
  --destructive: #F0384A;
  --destructive-foreground: #FFFFFF;
  --border: #1B202A;
  --input: #232935;
  --ring: #3A4150;
}

body {
  font-family: var(--default-font-family);
  background: var(--background);
}

.gl-lime { color: #C4FF00; }
.gl-red { color: #F0384A; }

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.gl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
  padding: 0 1.25rem;
  background: #000000;
}

.gl-header-brand { display: flex; align-items: center; gap: 0.75rem; }
.gl-header-brand img { height: 26px; }

.gl-header-product {
  padding-left: 0.75rem;
  border-left: 1px solid #262C37;
  color: #7C8391;
  font-size: 0.8125rem;
  font-weight: 500;
}

.gl-header-tools { display: flex; align-items: center; gap: 0.625rem; }

.gl-session {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.75rem;
  padding-left: 1rem;
  border-left: 1px solid #262C37;
}

.gl-timer {
  padding: 0.375rem 0.75rem;
  border: 1px solid #262C37;
  border-radius: 0.375rem;
  color: #F2F4F7;
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  font-weight: 600;
}

.gl-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid #F0384A;
  border-radius: 0.375rem;
  color: #F0384A;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gl-pill .gl-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #F0384A;
}

.gl-pill--live .gl-dot { animation: gl-blink 1.2s ease-in-out infinite; }

@keyframes gl-blink { 50% { opacity: 0.25; } }

@media (prefers-reduced-motion: reduce) {
  .gl-pill--live .gl-dot { animation: none; }
}

/* ------------------------------------------------------------------ */
/* Auth (split screen)                                                 */
/* ------------------------------------------------------------------ */

.gl-auth {
  display: grid;
  grid-template-columns: minmax(420px, 46%) 1fr;
  min-height: 100vh;
}

.gl-auth-form {
  display: flex;
  flex-direction: column;
  padding: 2.5rem 3rem;
  background: #080B10;
}

.gl-auth-form-inner {
  width: 100%;
  max-width: 400px;
  margin: auto;
}

.gl-auth-title { font-size: 1.75rem; font-weight: 600; color: #F2F4F7; }
.gl-auth-subtitle { margin-top: 0.375rem; color: #7C8391; font-size: 0.9375rem; }

.gl-auth-footer { color: #7C8391; font-size: 0.8125rem; }

.gl-auth-aside {
  position: relative;
  display: none;
  overflow: hidden;
  padding: 4.5rem 4rem 0;
  background: radial-gradient(120% 90% at 85% 10%, #232C4A 0%, #131A2E 45%, #0B0F1A 100%);
}

.gl-auth-aside-quote { max-width: 34rem; }
.gl-auth-aside-quote h2 { font-size: 1.875rem; line-height: 1.3; font-weight: 600; color: #FFFFFF; }
.gl-auth-aside-quote .gl-handle { margin-top: 1.75rem; font-size: 1.5rem; font-weight: 600; color: #FFFFFF; }
.gl-auth-aside-quote .gl-author { margin-top: 1rem; color: #E5E8EE; font-weight: 600; }
.gl-auth-aside-quote .gl-role { margin-top: 0.125rem; color: #9AA1AF; font-size: 0.875rem; }

.gl-auth-aside-shot {
  margin-top: 3.5rem;
  margin-left: 6rem;
  border-radius: 0.75rem 0 0 0;
  border: 1px solid #2A3350;
  border-bottom: 0;
  border-right: 0;
  box-shadow: -24px -18px 60px rgba(0, 0, 0, 0.45);
  display: block;
  width: 100%;
}

.gl-stars { display: inline-flex; gap: 0.25rem; color: #C4FF00; }

@media (min-width: 1024px) {
  .gl-auth-aside { display: flex; flex-direction: column; }
}

@media (max-width: 1023px) {
  .gl-auth { grid-template-columns: 1fr; }
  .gl-auth-form { padding: 2rem 1.5rem; }
}

/* ------------------------------------------------------------------ */
/* Dashboard grid                                                      */
/* ------------------------------------------------------------------ */

.gl-dash {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 330px;
  gap: 1rem;
  padding: 1rem 1.25rem 2rem;
  align-items: start;
}

@media (max-width: 1399px) {
  .gl-dash { grid-template-columns: 300px minmax(0, 1fr); }
  .gl-dash > .gl-col-stats { grid-column: 1 / -1; }
}

@media (max-width: 991px) {
  .gl-dash { grid-template-columns: 1fr; }
}

.gl-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
}

.gl-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  color: #AEB4C0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Targets */

.gl-target {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.gl-target--stopped { background: rgba(240, 56, 74, 0.06); }

.gl-target-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.gl-target-channel { display: flex; align-items: center; gap: 0.75rem; }
.gl-target-channel img { width: 34px; height: 34px; border-radius: 0.5rem; }
.gl-target-channel .gl-kicker { display: block; }
.gl-target-channel strong { font-size: 1rem; font-weight: 600; color: #F2F4F7; }

.gl-kicker {
  color: #6B7280;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gl-target-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin-top: 0.875rem;
}

.gl-metric .gl-kicker { display: block; margin-bottom: 0.125rem; }
.gl-metric strong { font-size: 1.25rem; font-weight: 600; color: #F2F4F7; font-variant-numeric: tabular-nums; }
.gl-metric span { font-size: 0.9375rem; color: #D2D6DE; font-variant-numeric: tabular-nums; }
.gl-metric--end { text-align: right; }

/* Stream card */

.gl-stream-media { position: relative; }
.gl-stream-media img {
  width: 100%;
  border-radius: 0.625rem 0.625rem 0 0;
  display: block;
  aspect-ratio: 16 / 9.6;
  object-fit: cover;
}

.gl-stream-body { padding: 1rem 1.25rem 1.25rem; }
.gl-stream-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gl-stream-title h1 { font-size: 1.5rem; font-weight: 600; color: #FFFFFF; }

.gl-stream-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.gl-stream-meta strong { display: block; margin-top: 0.125rem; font-size: 1.0625rem; font-weight: 600; color: #F2F4F7; }

/* Messages */

.gl-msg { padding: 1rem; border-top: 1px solid var(--border); }
.gl-msg-head { display: flex; align-items: center; gap: 0.5rem; color: #7C8391; font-size: 0.8125rem; }
.gl-msg-head strong { color: #F2F4F7; font-weight: 600; font-size: 0.875rem; }
.gl-msg-head img { width: 14px; height: 14px; }
.gl-msg p { margin-top: 0.5rem; color: #C6CBD4; font-size: 0.9375rem; line-height: 1.55; }

/* Stats */

.gl-stat { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 1rem; border-top: 1px solid var(--border); }
.gl-stat-value { font-size: 1.75rem; font-weight: 600; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.gl-stat-delta { margin-top: 0.25rem; font-size: 0.8125rem; color: #7C8391; }
.gl-stat-chart { width: 150px; min-height: 60px; flex: none; }

/* Locations */

.gl-geo { padding: 0.25rem 1rem 1rem; }
.gl-geo-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; }
.gl-geo-row img { width: 22px; height: 22px; border-radius: 9999px; object-fit: cover; }
.gl-geo-row .gl-geo-name { width: 40%; color: #D2D6DE; font-size: 0.875rem; }
.gl-geo-bar { flex: 1; height: 6px; border-radius: 9999px; background: #1B202A; overflow: hidden; }
.gl-geo-bar span { display: block; height: 100%; border-radius: 9999px; background: #C4FF00; }
.gl-geo-row .gl-geo-share { width: 3rem; text-align: right; color: #AEB4C0; font-size: 0.875rem; font-variant-numeric: tabular-nums; }

.gl-map-placeholder {
  margin: 0 1rem;
  height: 190px;
  border-radius: 0.5rem;
  background-color: #0A0D13;
  background-image:
    radial-gradient(circle at 32% 42%, rgba(196, 255, 0, 0.9) 0 2px, rgba(196, 255, 0, 0.18) 3px 7px, transparent 8px),
    radial-gradient(circle at 55% 30%, rgba(196, 255, 0, 0.8) 0 2px, rgba(196, 255, 0, 0.14) 3px 6px, transparent 7px),
    radial-gradient(circle at 72% 58%, rgba(196, 255, 0, 0.7) 0 2px, rgba(196, 255, 0, 0.12) 3px 6px, transparent 7px),
    radial-gradient(circle at 20% 65%, rgba(196, 255, 0, 0.6) 0 1.5px, transparent 5px),
    radial-gradient(#1C2330 1px, transparent 1.5px);
  background-size: auto, auto, auto, auto, 9px 9px;
  border: 1px solid var(--border);
}

/* ------------------------------------------------------------------ */
/* Content pages (users, profile)                                      */
/* ------------------------------------------------------------------ */

.gl-page { max-width: 1080px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.gl-page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.gl-page-head h1 { font-size: 1.375rem; font-weight: 600; color: #FFFFFF; }
.gl-page-head p { margin-top: 0.25rem; color: #7C8391; font-size: 0.875rem; }

.gl-form-grid { display: grid; gap: 1rem; }
.gl-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) { .gl-form-grid--2 { grid-template-columns: 1fr; } }

.gl-field label { display: block; margin-bottom: 0.375rem; }
.gl-error { margin-top: 0.375rem; color: #F0384A; font-size: 0.8125rem; }

.gl-table-wrap { overflow-x: auto; }

/* Brand accents over Metronic components */
.kt-badge-success {
  color: #C4FF00;
  background: rgba(196, 255, 0, 0.1);
  border-color: rgba(196, 255, 0, 0.28);
}
.kt-avatar-status-online { background: #C4FF00; }

.gl-stat-delta { white-space: nowrap; }

.gl-icon-badge { position: relative; }
.gl-icon-badge .kt-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.625rem;
  border-radius: 9999px;
  background: #C4FF00;
  color: #0A0F00;
  border: 0;
  justify-content: center;
}

/* Utilities absent from the compiled Metronic build (used by goLive views) */
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.p-6 { padding: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.-bottom-0\.5 { bottom: -0.125rem; }
.bg-secondary { background-color: var(--secondary); }
.max-h-\[340px\] { max-height: 340px; }
.normal-case { text-transform: none; }
.tracking-normal { letter-spacing: 0; }
.opacity-50 { opacity: 0.5; }
.pointer-events-none { pointer-events: none; }

.kt-badge-primary {
  color: #C4FF00;
  background: rgba(196, 255, 0, 0.1);
  border-color: rgba(196, 255, 0, 0.28);
}
