@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Sora:wght@400;500;600;700;800&display=swap");

:root {
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.65rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Colors mapped from original oklch */
  --background: oklch(0.985 0.005 250);
  --foreground: oklch(0.18 0.04 260);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.18 0.04 260);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.18 0.04 260);
  --primary: oklch(0.24 0.09 265);
  --primary-foreground: oklch(0.985 0.005 250);
  --secondary: oklch(0.955 0.012 250);
  --secondary-foreground: oklch(0.24 0.09 265);
  --muted: oklch(0.955 0.012 250);
  --muted-foreground: oklch(0.5 0.03 260);
  --accent: oklch(0.95 0.02 250);
  --accent-foreground: oklch(0.24 0.09 265);
  --destructive: oklch(0.58 0.22 25);
  --destructive-foreground: oklch(0.985 0.005 250);
  --border: oklch(0.9 0.015 250);
  --input: oklch(0.92 0.015 250);
  --ring: oklch(0.72 0.13 80);
  --gold: oklch(0.78 0.14 80);
  --gold-foreground: oklch(0.18 0.04 260);
  --success: oklch(0.65 0.16 150);
  --warning: oklch(0.78 0.16 70);
  --info: oklch(0.65 0.14 230);
  
  --sidebar: oklch(0.18 0.05 265);
  --sidebar-foreground: oklch(0.92 0.01 250);
  --sidebar-primary: oklch(0.78 0.14 80);
  --sidebar-primary-foreground: oklch(0.18 0.04 260);
  --sidebar-accent: oklch(0.24 0.08 265);
  --sidebar-accent-foreground: oklch(0.985 0.005 250);
  --sidebar-border: oklch(0.28 0.07 265);
  --sidebar-ring: oklch(0.78 0.14 80);
}

.dark {
  --background: oklch(0.14 0.03 265);
  --foreground: oklch(0.96 0.01 250);
  --card: oklch(0.18 0.04 265);
  --card-foreground: oklch(0.96 0.01 250);
  --popover: oklch(0.18 0.04 265);
  --popover-foreground: oklch(0.96 0.01 250);
  --primary: oklch(0.78 0.14 80);
  --primary-foreground: oklch(0.16 0.04 265);
  --secondary: oklch(0.22 0.05 265);
  --secondary-foreground: oklch(0.96 0.01 250);
  --muted: oklch(0.22 0.05 265);
  --muted-foreground: oklch(0.7 0.03 250);
  --accent: oklch(0.26 0.06 265);
  --accent-foreground: oklch(0.96 0.01 250);
  --destructive: oklch(0.65 0.2 25);
  --destructive-foreground: oklch(0.96 0.01 250);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 12%);
  --ring: oklch(0.78 0.14 80);
  --gold: oklch(0.82 0.15 80);
  --gold-foreground: oklch(0.16 0.04 265);
  --success: oklch(0.7 0.17 150);
  --warning: oklch(0.8 0.16 70);
  --info: oklch(0.7 0.14 230);
  
  --sidebar: oklch(0.12 0.03 265);
  --sidebar-foreground: oklch(0.92 0.01 250);
  --sidebar-primary: oklch(0.78 0.14 80);
  --sidebar-primary-foreground: oklch(0.16 0.04 265);
  --sidebar-accent: oklch(0.2 0.05 265);
  --sidebar-accent-foreground: oklch(0.96 0.01 250);
  --sidebar-border: oklch(1 0 0 / 8%);
  --sidebar-ring: oklch(0.78 0.14 80);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: var(--border);
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Sora", sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--foreground);
}

/* ── App Shell Structure ── */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
  width: 260px;
  background-color: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  color: var(--sidebar-foreground);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo img {
  width: 32px;
  height: 32px;
}

.sidebar-logo span {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
}

.sidebar-logo span .gold-text {
  color: var(--gold);
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.menu-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-group-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  padding-left: 0.75rem;
  margin-bottom: 0.35rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--sidebar-foreground);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.menu-item:hover, .menu-item.active {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
}

.menu-item svg {
  width: 16px;
  height: 16px;
}

.menu-item.active svg {
  color: var(--sidebar-primary);
}

/* Sub-items dropdown */
.menu-item-dropdown {
  display: flex;
  flex-direction: column;
}

.menu-item-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.menu-item-dropdown-content {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.15rem;
}

.menu-sub-item {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  text-decoration: none;
  color: rgba(255,255,255,0.65);
  border-radius: var(--radius-sm);
  display: block;
}

.menu-sub-item:hover, .menu-sub-item.active {
  color: #fff;
  background-color: rgba(255,255,255,0.05);
}

.menu-sub-item.active {
  color: var(--gold);
  font-weight: 600;
}

/* Main Content styling */
.main-wrapper {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header/topbar styling */
.header {
  height: 64px;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
}

.live-clock {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  background: var(--muted);
  border: 1px solid var(--border);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.header-icon-btn:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background-color: var(--destructive);
  border-radius: 50%;
  border: 2px solid var(--card);
}

/* User profile menu */
.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary-foreground);
  background: linear-gradient(135deg, var(--gold), var(--primary));
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.65rem;
  color: var(--muted-foreground);
}

/* Page Container */
.page-container {
  padding: 2rem;
  flex: 1;
}

/* Custom design system utility blocks */
.navy-gradient {
  background: linear-gradient(135deg, oklch(0.24 0.09 265), oklch(0.16 0.05 265));
}

.gold-gradient {
  background: linear-gradient(135deg, oklch(0.82 0.15 80), oklch(0.7 0.16 60));
}

.text-gold {
  color: var(--gold);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--destructive);
}

.text-warning {
  color: var(--warning);
}

.text-info {
  color: var(--info);
}

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
}
.dark .glass {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
}

/* ─── Gold Button ─────────────────────────────────────────── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid oklch(0.72 0.14 78);
  background: linear-gradient(135deg, oklch(0.82 0.15 80), oklch(0.7 0.16 60));
  color: oklch(0.18 0.04 260);
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn-gold:hover { opacity: 0.88; }

/* ─── Header notification dot ─────────────────────────────── */
.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: var(--destructive);
  border-radius: 50%;
  border: 2px solid var(--card);
}

/* ─── Muted text helper ───────────────────────────────────── */
.text-muted { color: var(--muted-foreground); }

/* ─── Form full-width helper ──────────────────────────────── */
.form-group.full-width { grid-column: 1 / -1; }

/* ─── Button group helper ─────────────────────────────────── */
.btn-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ─── Ranking bars colour variants ───────────────────────── */
.ranking-bar.success { background-color: var(--success) !important; }
.ranking-bar.info    { background-color: var(--info)    !important; }
.ranking-bar.danger  { background-color: var(--destructive) !important; }

/* ─── No-print utility ────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
}

/* ─── Active sidebar button highlight ────────────────────── */
#channels-selection-list button.active {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
}

