/* ============================
   MaskaHub Service Bot — Premium UI
   Design System v3.0 — Glassmorphism Dark
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&display=swap');

/* ============================
   Design Tokens
   ============================ */

:root {
  /* Backgrounds */
  --bg-0: #060610;
  --bg-1: #0b0f2a;
  --bg-2: #10143a;

  /* Surfaces — glassmorphism */
  --panel:   rgba(16, 19, 40, 0.55);
  --panel-2: rgba(16, 19, 40, 0.35);
  --stroke:  rgba(255, 255, 255, 0.06);

  /* Text */
  --text:  #eef0ff;
  --muted: rgba(238, 240, 255, 0.5);

  /* Brand / Accent */
  --brand-1: #6d56ff;
  --brand-2: #ff5c8a;
  --brand-3: #22d3ee;

  /* Accent RGB values for alpha variants */
  --purple-rgb: 109, 86, 255;
  --pink-rgb:   255, 92, 138;
  --cyan-rgb:   34, 211, 238;
  --gold-rgb:   245, 200, 66;
  /* Legacy aliases */
  --blue-rgb:   109, 86, 255;
  --teal-rgb:   34, 211, 238;

  /* Semantic */
  --color-success: #22d3ee;
  --color-warning: #f5c842;
  --color-danger:  #ff5c8a;

  /* Shadows */
  --shadow:      0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-glow-purple: 0 0 30px rgba(109, 86, 255, 0.2);
  --shadow-glow-pink:   0 0 30px rgba(255, 92, 138, 0.2);
  --shadow-glow-cyan:   0 0 30px rgba(34, 211, 238, 0.2);

  /* Radii */
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm:  8px;

  /* Blur */
  --blur: blur(20px);

  /* Spacing scale */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* Sidebar */
  --sidebar-w: 250px;

  /* Parallax input from JS */
  --scrollY: 0px;

  /* Font */
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Animation durations */
  --dur-fast: 0.15s;
  --dur-med:  0.25s;
  --dur-slow: 0.4s;
}

/* ============================
   Reset & Base
   ============================ */

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

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.1px;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility */
.hidden { display: none !important; }

/* Custom scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 86, 255, 0.25) transparent;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(109, 86, 255, 0.3);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 86, 255, 0.5);
}

/* Selection */
::selection {
  background: rgba(109, 86, 255, 0.4);
  color: #fff;
}

h1, h2, h3, h4 {
  margin: 0 0 14px 0;
  letter-spacing: -0.3px;
}
h1 { font-size: 1.6rem;  font-weight: 800; color: var(--text); }
h2 { font-size: 1.2rem;  font-weight: 700; color: var(--text); }
h3 { font-size: 1.05rem; font-weight: 650; color: rgba(238, 240, 255, 0.88); }

p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 12px 0;
}

a {
  color: rgba(139, 116, 255, 0.95);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}
a:hover {
  color: var(--brand-2);
}

hr {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 18px 0;
}

/* ============================
   Background: galaxy + floating orbs
   ============================ */

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

/* Star dust */
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.2px 1.2px at 10%  20%, rgba(255, 255, 255, 0.6) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(1px 1px at 35%  15%, rgba(255, 255, 255, 0.35) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(1.5px 1.5px at 65%  30%, rgba(255, 255, 255, 0.5) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(1px 1px at 85%  22%, rgba(255, 255, 255, 0.3) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(1.2px 1.2px at 15%  70%, rgba(255, 255, 255, 0.35) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(1px 1px at 55%  78%, rgba(255, 255, 255, 0.4) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(1.3px 1.3px at 88%  74%, rgba(255, 255, 255, 0.32) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(1px 1px at 42%  55%, rgba(255, 255, 255, 0.28) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(1px 1px at 72%  62%, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(1.1px 1.1px at 28%  38%, rgba(255, 255, 255, 0.3) 0, rgba(255, 255, 255, 0) 2px),
    radial-gradient(0.8px 0.8px at 50%  10%, rgba(109, 86, 255, 0.6) 0, rgba(109, 86, 255, 0) 2px),
    radial-gradient(0.8px 0.8px at 80%  50%, rgba(255, 92, 138, 0.5) 0, rgba(255, 92, 138, 0) 2px),
    radial-gradient(0.8px 0.8px at 20%  85%, rgba(34, 211, 238, 0.5) 0, rgba(34, 211, 238, 0) 2px);
  opacity: 0.7;
  filter: blur(0.15px);
  animation: stars-twinkle 8s ease-in-out infinite alternate;
}

@keyframes stars-twinkle {
  0%   { opacity: 0.6; }
  50%  { opacity: 0.8; }
  100% { opacity: 0.65; }
}

/* Floating orbs — MaskaHub TMA style */
.fog {
  position: absolute;
  inset: -30%;
  opacity: 0.85;
  filter: blur(60px) saturate(1.4);
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
  animation: fog-drift-1 28s ease-in-out infinite;
  translate: 0 calc(var(--scrollY) * -0.04);
  background:
    radial-gradient(40% 40% at 15% 25%, rgba(109, 86, 255, 0.35) 0%, transparent 70%),
    radial-gradient(30% 30% at 75% 20%, rgba(255, 92, 138, 0.25) 0%, transparent 65%),
    radial-gradient(35% 35% at 60% 80%, rgba(34, 211, 238, 0.2) 0%, transparent 65%),
    radial-gradient(25% 25% at 85% 70%, rgba(109, 86, 255, 0.15) 0%, transparent 60%),
    radial-gradient(20% 20% at 35% 60%, rgba(245, 200, 66, 0.08) 0%, transparent 60%);
}

.fog.fog2 {
  opacity: 0.5;
  filter: blur(80px) saturate(1.2);
  animation: fog-drift-2 36s ease-in-out infinite;
  translate: 0 calc(var(--scrollY) * -0.065);
  background:
    radial-gradient(35% 35% at 80% 15%, rgba(34, 211, 238, 0.2) 0%, transparent 65%),
    radial-gradient(30% 30% at 20% 40%, rgba(255, 92, 138, 0.18) 0%, transparent 60%),
    radial-gradient(40% 40% at 50% 85%, rgba(109, 86, 255, 0.22) 0%, transparent 70%),
    radial-gradient(25% 25% at 10% 80%, rgba(245, 200, 66, 0.1) 0%, transparent 55%);
}

@keyframes fog-drift-1 {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1.02) rotate(0deg); opacity: 0.8; }
  25%  { transform: translate3d( 2%, -3%, 0) scale(1.06) rotate(0.5deg); opacity: 0.9; }
  50%  { transform: translate3d( 4%,  2%, 0) scale(1.03) rotate(-0.3deg); opacity: 0.85; }
  75%  { transform: translate3d(-2%,  4%, 0) scale(1.07) rotate(0.2deg); opacity: 0.92; }
  100% { transform: translate3d(-3%, -2%, 0) scale(1.02) rotate(0deg); opacity: 0.8; }
}

@keyframes fog-drift-2 {
  0%   { transform: translate3d( 3%,  2%, 0) scale(1.03) rotate(0deg); opacity: 0.48; }
  25%  { transform: translate3d(-2%,  4%, 0) scale(1.07) rotate(-0.5deg); opacity: 0.58; }
  50%  { transform: translate3d(-4%, -2%, 0) scale(1.04) rotate(0.3deg); opacity: 0.52; }
  75%  { transform: translate3d( 2%, -4%, 0) scale(1.08) rotate(-0.2deg); opacity: 0.6; }
  100% { transform: translate3d( 3%,  2%, 0) scale(1.03) rotate(0deg); opacity: 0.48; }
}

@media (prefers-reduced-motion: reduce) {
  .fog, .fog.fog2 { animation: none; }
  .bg::before { animation: none; }
}

/* ============================
   Animations library
   ============================ */

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(109, 86, 255, 0.3); }
  50%      { border-color: rgba(109, 86, 255, 0.6); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(109, 86, 255, 0.15); }
  50%      { box-shadow: 0 0 40px rgba(109, 86, 255, 0.3); }
}

@keyframes gradientRotate {
  0%   { --angle: 0deg; }
  100% { --angle: 360deg; }
}

/* ============================
   Layout
   ============================ */

.layout {
  display: flex;
  min-height: 100vh;
}

.layout--no-sidebar .main-content {
  margin-left: 0;
  width: 100%;
}

.layout--no-sidebar .main-topbar {
  display: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ============================
   Sidebar
   ============================ */

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: rgba(6, 6, 16, 0.8);
  backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 21;
  isolation: isolate;
  flex-shrink: 0;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 28px 16px 20px;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  padding: 0 6px;
}

.sidebar-logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(109, 86, 255, 0.4));
}

.sidebar-logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.1px;
  line-height: 1.15;
}

/* Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(238, 240, 255, 0.55);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition:
    background var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease,
    transform var(--dur-fast) ease;
  isolation: isolate;
  position: relative;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
  transition: height var(--dur-med) ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(109, 86, 255, 0.06);
  border-color: rgba(109, 86, 255, 0.08);
  transform: translateX(3px);
}

.nav-link:hover::before {
  height: 60%;
}

.nav-link.active {
  color: #fff;
  background: rgba(109, 86, 255, 0.08);
  border-color: rgba(109, 86, 255, 0.15);
  box-shadow: 0 0 20px rgba(109, 86, 255, 0.08);
  font-weight: 600;
}

.nav-link.active::before {
  height: 70%;
  box-shadow: 0 0 12px rgba(109, 86, 255, 0.5);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: currentColor;
  opacity: 0.7;
  transition: opacity var(--dur-fast) ease;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  opacity: 1;
}

/* Legacy sidebar-nav a support (other templates may use plain <a>) */
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(238, 240, 255, 0.55);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition:
    background var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease,
    transform var(--dur-fast) ease;
  position: relative;
}

.sidebar-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
  transition: height var(--dur-med) ease;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: rgba(109, 86, 255, 0.06);
  border-color: rgba(109, 86, 255, 0.08);
  transform: translateX(3px);
}

.sidebar-nav a:hover::before {
  height: 60%;
}

.sidebar-nav a.active {
  color: #fff;
  background: rgba(109, 86, 255, 0.08);
  border-color: rgba(109, 86, 255, 0.15);
  box-shadow: 0 0 20px rgba(109, 86, 255, 0.08);
  font-weight: 600;
}

.sidebar-nav a.active::before {
  height: 70%;
  box-shadow: 0 0 12px rgba(109, 86, 255, 0.5);
}

/* Spacer pushes profile to bottom */
.sidebar-spacer {
  flex: 1;
  min-height: 16px;
}

/* Density toggle */
.density-toggle {
  margin-bottom: 14px;
}

.density-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: rgba(238, 240, 255, 0.4);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
  font-family: var(--font-ui);
}

.density-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: currentColor;
}

.density-btn:hover {
  background: rgba(109, 86, 255, 0.06);
  border-color: rgba(109, 86, 255, 0.12);
  color: rgba(238, 240, 255, 0.7);
}

/* Sidebar profile */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  isolation: isolate;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.sidebar-profile:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(109, 86, 255, 0.12);
}

.profile-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.profile-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.profile-role {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Avatar */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(109, 86, 255, 0.3);
  isolation: isolate;
}

/* Logout button */
.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  color: rgba(238, 240, 255, 0.35);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
  flex-shrink: 0;
}

.logout-btn svg {
  width: 16px;
  height: 16px;
}

.logout-btn:hover {
  background: rgba(255, 92, 138, 0.12);
  color: var(--brand-2);
}

/* ============================
   Main content area
   ============================ */

.main-content {
  flex: 1;
  width: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Top bar with breadcrumb */
.main-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 28px;
  background: rgba(6, 6, 16, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  isolation: isolate;
  display: flex;
  align-items: center;
}

.main-content > .container {
  padding: 28px;
  flex: 1;
}

/* ============================
   Breadcrumb
   ============================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb-item {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

.breadcrumb-item:not(.breadcrumb-current):hover {
  color: var(--text);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 6px;
  color: rgba(238, 240, 255, 0.2);
}

.breadcrumb-current {
  color: rgba(238, 240, 255, 0.7);
  cursor: default;
}

/* ============================
   Page header
   ============================ */

.page-header {
  margin-bottom: 28px;
  animation: slideUp 0.5s ease both;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ============================
   Cards — glassmorphism
   ============================ */

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: var(--blur);
  padding: 20px;
  isolation: isolate;
  transition: transform var(--dur-med) ease, box-shadow var(--dur-med) ease, border-color var(--dur-med) ease;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.09);
}

/* Nested card */
.card .card {
  background: rgba(6, 6, 16, 0.4);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card .card:hover {
  transform: none;
}

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(238, 240, 255, 0.9);
  margin: 0;
}

.card-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(var(--purple-rgb), 0.85);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--purple-rgb), 0.2);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.card-link:hover {
  background: rgba(var(--purple-rgb), 0.12);
  color: var(--brand-1);
  border-color: rgba(var(--purple-rgb), 0.35);
}

/* Reveal animation — enhanced */
.card.reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card.reveal.in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered reveal for card sequences */
.card.reveal:nth-child(1) { transition-delay: 0s; }
.card.reveal:nth-child(2) { transition-delay: 0.08s; }
.card.reveal:nth-child(3) { transition-delay: 0.16s; }
.card.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ============================
   Metrics grid
   ============================ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  overflow: hidden;
}

/* Colored accent border on left side */
.metric-card::after {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  transition: box-shadow var(--dur-med) ease;
}

.metric-card .metric-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.metric-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur-med) ease, box-shadow var(--dur-med) ease;
}

.metric-card:hover .metric-icon-wrap {
  transform: scale(1.05);
}

.metric-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.metric-body {
  flex: 1;
  min-width: 0;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -1px;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

/* Blue/Purple variant */
.metric-blue .metric-icon-wrap {
  background: rgba(var(--purple-rgb), 0.12);
  color: var(--brand-1);
  box-shadow: 0 0 20px rgba(var(--purple-rgb), 0.1);
}

.metric-blue .metric-value {
  color: var(--brand-1);
}

.metric-blue .metric-accent {
  background: linear-gradient(90deg, rgba(var(--purple-rgb), 0.8), rgba(var(--purple-rgb), 0.1));
}

.metric-blue::after {
  background: linear-gradient(180deg, var(--brand-1), rgba(var(--purple-rgb), 0.3));
}

.metric-blue:hover .metric-icon-wrap {
  box-shadow: 0 0 30px rgba(var(--purple-rgb), 0.2);
}

/* Pink variant */
.metric-pink .metric-icon-wrap {
  background: rgba(var(--pink-rgb), 0.12);
  color: var(--brand-2);
  box-shadow: 0 0 20px rgba(var(--pink-rgb), 0.1);
}

.metric-pink .metric-value {
  color: var(--brand-2);
}

.metric-pink .metric-accent {
  background: linear-gradient(90deg, rgba(var(--pink-rgb), 0.8), rgba(var(--pink-rgb), 0.1));
}

.metric-pink::after {
  background: linear-gradient(180deg, var(--brand-2), rgba(var(--pink-rgb), 0.3));
}

.metric-pink:hover .metric-icon-wrap {
  box-shadow: 0 0 30px rgba(var(--pink-rgb), 0.2);
}

/* Teal/Cyan variant */
.metric-teal .metric-icon-wrap {
  background: rgba(var(--cyan-rgb), 0.12);
  color: var(--brand-3);
  box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.1);
}

.metric-teal .metric-value {
  color: var(--brand-3);
}

.metric-teal .metric-accent {
  background: linear-gradient(90deg, rgba(var(--cyan-rgb), 0.8), rgba(var(--cyan-rgb), 0.1));
}

.metric-teal::after {
  background: linear-gradient(180deg, var(--brand-3), rgba(var(--cyan-rgb), 0.3));
}

.metric-teal:hover .metric-icon-wrap {
  box-shadow: 0 0 30px rgba(var(--cyan-rgb), 0.2);
}

/* ============================
   Dashboard layout grid
   ============================ */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}

/* ============================
   Incidents table card
   ============================ */

.incidents-card {
  padding: 20px;
}

/* ============================
   Incident badges — glass pill
   ============================ */

.incident-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: lowercase;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.incident-badge:hover {
  transform: scale(1.05);
}

.badge-warn {
  background: rgba(var(--gold-rgb), 0.1);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  color: var(--color-warning);
  box-shadow: 0 0 12px rgba(var(--gold-rgb), 0.08);
}

.badge-ban {
  background: rgba(var(--pink-rgb), 0.1);
  border: 1px solid rgba(var(--pink-rgb), 0.3);
  color: var(--color-danger);
  box-shadow: 0 0 12px rgba(var(--pink-rgb), 0.08);
}

.badge-mute {
  background: rgba(255, 150, 50, 0.1);
  border: 1px solid rgba(255, 150, 50, 0.3);
  color: rgba(255, 175, 80, 0.95);
  box-shadow: 0 0 12px rgba(255, 150, 50, 0.08);
}

.badge-kick {
  background: rgba(var(--pink-rgb), 0.08);
  border: 1px solid rgba(var(--pink-rgb), 0.25);
  color: rgba(255, 120, 150, 0.95);
  box-shadow: 0 0 12px rgba(var(--pink-rgb), 0.06);
}

.badge-unmute {
  background: rgba(var(--cyan-rgb), 0.1);
  border: 1px solid rgba(var(--cyan-rgb), 0.25);
  color: var(--color-success);
  box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.08);
}

.badge-unban {
  background: rgba(var(--cyan-rgb), 0.08);
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  color: rgba(var(--cyan-rgb), 0.9);
  box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.06);
}

.badge-default {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(238, 240, 255, 0.6);
}

/* ============================
   Quick actions
   ============================ */

.quick-actions-card {
  padding: 20px;
}

.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition:
    background var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    transform var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
}

.quick-action-item:hover {
  background: rgba(109, 86, 255, 0.05);
  border-color: rgba(109, 86, 255, 0.12);
  transform: translateX(4px);
  color: inherit;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.qa-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.quick-action-item:hover .qa-icon {
  transform: scale(1.08);
}

.qa-icon svg {
  width: 18px;
  height: 18px;
}

.qa-icon-blue {
  background: rgba(var(--purple-rgb), 0.12);
  color: var(--brand-1);
}
.qa-icon-pink {
  background: rgba(var(--pink-rgb), 0.12);
  color: var(--brand-2);
}
.qa-icon-teal {
  background: rgba(var(--cyan-rgb), 0.12);
  color: var(--brand-3);
}
.qa-icon-purple {
  background: rgba(var(--purple-rgb), 0.12);
  color: var(--brand-1);
}

.qa-body {
  flex: 1;
  min-width: 0;
}

.qa-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(238, 240, 255, 0.9);
  line-height: 1.2;
}

.qa-desc {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.qa-arrow {
  width: 16px;
  height: 16px;
  color: rgba(238, 240, 255, 0.2);
  flex-shrink: 0;
  transition: color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.quick-action-item:hover .qa-arrow {
  color: var(--brand-1);
  transform: translateX(2px);
}

/* ============================
   Tables — dark glass rows
   ============================ */

.table-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

table,
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(0, 0, 0, 0.2);
}

thead th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  background: rgba(16, 19, 40, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
  white-space: nowrap;
}

.data-table thead th {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(6, 6, 16, 0.85);
  font-size: 0.75rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(238, 240, 255, 0.8);
  font-size: 0.88rem;
  transition: background var(--dur-fast) ease;
}

tbody tr {
  transition: background var(--dur-fast) ease;
}

tbody tr:hover td {
  background: rgba(109, 86, 255, 0.04);
}

tbody tr:hover {
  box-shadow: inset 0 0 30px rgba(109, 86, 255, 0.03);
}

tbody tr:last-child td {
  border-bottom: none;
}

.td-time {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.td-reason {
  color: rgba(238, 240, 255, 0.5);
  font-size: 0.85rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-cell {
  text-align: center;
  color: rgba(238, 240, 255, 0.3);
  padding: 36px 14px;
  font-size: 0.9rem;
}

/* ============================
   Buttons — gradient with glow
   ============================ */

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-ui);
  transition:
    transform var(--dur-fast) ease,
    background var(--dur-fast) ease,
    box-shadow var(--dur-med) ease,
    border-color var(--dur-fast) ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

button:hover,
.btn:hover {
  transform: translateY(-1px) scale(1.01);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.12);
}

button:active,
.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(var(--purple-rgb), 0.6), rgba(var(--pink-rgb), 0.35));
  border-color: rgba(var(--purple-rgb), 0.3);
  box-shadow: 0 0 20px rgba(var(--purple-rgb), 0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(var(--purple-rgb), 0.75), rgba(var(--pink-rgb), 0.45));
  box-shadow: 0 8px 30px rgba(var(--purple-rgb), 0.25), 0 0 20px rgba(var(--purple-rgb), 0.15);
  border-color: rgba(var(--purple-rgb), 0.5);
}

.btn-danger {
  background: linear-gradient(135deg, rgba(var(--pink-rgb), 0.25), rgba(var(--pink-rgb), 0.1));
  border-color: rgba(var(--pink-rgb), 0.2);
}

.btn-danger:hover {
  background: linear-gradient(135deg, rgba(var(--pink-rgb), 0.4), rgba(var(--pink-rgb), 0.2));
  box-shadow: 0 8px 30px rgba(var(--pink-rgb), 0.2), 0 0 20px rgba(var(--pink-rgb), 0.1);
  border-color: rgba(var(--pink-rgb), 0.4);
}

.btn-xs {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: 9px;
}

/* ============================
   Badges
   ============================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  backdrop-filter: blur(8px);
}

.badge-admin {
  background: rgba(var(--purple-rgb), 0.12);
  border: 1px solid rgba(var(--purple-rgb), 0.3);
  color: var(--brand-1);
}

.badge-super {
  background: rgba(var(--pink-rgb), 0.12);
  border: 1px solid rgba(var(--pink-rgb), 0.3);
  color: var(--brand-2);
}

.badge-user {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

/* ============================
   Forms — dark glass inputs
   ============================ */

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(238, 240, 255, 0.6);
  letter-spacing: 0.2px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: rgba(238, 240, 255, 0.25);
  pointer-events: none;
  flex-shrink: 0;
  transition: color var(--dur-fast) ease;
}

/* When the input inside is focused, light up the icon */
.input-wrap:focus-within .input-icon {
  color: rgba(var(--purple-rgb), 0.7);
}

.password-toggle {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: rgba(238, 240, 255, 0.3);
  cursor: pointer;
  padding: 0;
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
}

.password-toggle:hover {
  color: rgba(238, 240, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  transform: none;
  box-shadow: none;
}

.eye-icon {
  width: 16px;
  height: 16px;
}

.form-actions {
  padding-top: 4px;
}

input,
select,
textarea,
.input {
  width: 100%;
  background: rgba(6, 6, 16, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 11px 14px;
  font-size: 0.92rem;
  font-family: var(--font-ui);
  outline: none;
  transition:
    border-color var(--dur-med) ease,
    box-shadow var(--dur-med) ease,
    background var(--dur-fast) ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(238, 240, 255, 0.2);
}

input.input-with-icon {
  padding-left: 38px;
}

input.input-with-toggle {
  padding-right: 42px;
}

input:focus,
select:focus,
textarea:focus,
.input:focus {
  border-color: rgba(var(--purple-rgb), 0.4);
  box-shadow: 0 0 0 4px rgba(var(--purple-rgb), 0.1), 0 0 20px rgba(var(--purple-rgb), 0.08);
  background: rgba(6, 6, 16, 0.7);
}

select,
select option {
  color: #23243a;
  background: #fff;
}

/* Compact number input */
.input-compact {
  width: 140px;
  height: 34px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
}

/* ============================
   Alert
   ============================ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  animation: slideUp 0.3s ease both;
}

.alert-error {
  background: rgba(var(--pink-rgb), 0.1);
  border: 1px solid rgba(var(--pink-rgb), 0.25);
  color: rgba(255, 140, 160, 0.95);
}

.alert-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================
   Login page — stunning design
   ============================ */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 24px 0;
  animation: fadeIn 0.6s ease both;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  position: relative;
  background: rgba(16, 19, 40, 0.65);
  border: 1px solid rgba(109, 86, 255, 0.2);
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both, borderGlow 4s ease-in-out infinite;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(109, 86, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Animated gradient border glow behind the login card */
.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(109, 86, 255, 0.4),
    rgba(255, 92, 138, 0.3),
    rgba(34, 211, 238, 0.2),
    rgba(109, 86, 255, 0.4)
  );
  background-size: 300% 300%;
  animation: loginGradient 6s ease infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

@keyframes loginGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Subtle glow aura behind login card */
.login-card::after {
  content: "";
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(109, 86, 255, 0.12) 0%,
    rgba(255, 92, 138, 0.05) 40%,
    transparent 70%
  );
  z-index: -2;
  pointer-events: none;
  filter: blur(30px);
  animation: pulseGlow 4s ease-in-out infinite;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  background: rgba(var(--purple-rgb), 0.1);
  border: 1px solid rgba(var(--purple-rgb), 0.25);
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(var(--purple-rgb), 0.12);
  transition: transform var(--dur-med) ease, box-shadow var(--dur-med) ease;
}

.login-logo-wrap:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 0 40px rgba(var(--purple-rgb), 0.2);
}

.login-logo-svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px rgba(109, 86, 255, 0.3));
}

.login-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.btn-login {
  width: 100%;
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* When login page is shown, hide the breadcrumb topbar */
.login-page ~ * .main-topbar {
  display: none;
}

/* ============================
   Toggle Switch
   ============================ */

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.toggle-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
  position: relative;
  cursor: pointer;
  transition: background var(--dur-med) ease, border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
  flex: 0 0 auto;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(238, 240, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform var(--dur-med) cubic-bezier(0.34, 1.56, 0.64, 1), background var(--dur-med) ease;
}

.toggle-input:checked + .toggle-ui {
  background: rgba(var(--purple-rgb), 0.35);
  border-color: rgba(var(--purple-rgb), 0.55);
  box-shadow: 0 0 16px rgba(var(--purple-rgb), 0.15);
}

.toggle-input:checked + .toggle-ui::after {
  transform: translateY(-50%) translateX(18px);
  background: #fff;
}

.toggle-input:focus-visible + .toggle-ui {
  outline: none;
  box-shadow: 0 0 0 4px rgba(var(--purple-rgb), 0.2);
}

.toggle-input:disabled + .toggle-ui {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ============================
   Toggle list + rows
   ============================ */

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 18px;
  max-width: 560px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background var(--dur-med) ease, border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}

.toggle-row:hover {
  background: rgba(109, 86, 255, 0.04);
  border-color: rgba(109, 86, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.toggle-label {
  font-weight: 600;
  color: rgba(238, 240, 255, 0.9);
}

/* ============================
   Settings layout
   ============================ */

.settings {
  max-width: 720px;
}

.settings-group {
  margin: 16px 0 18px;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: rgba(16, 19, 40, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.settings-group-title {
  font-size: 0.78rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4px 4px 14px;
  font-weight: 600;
  position: relative;
  padding-left: 12px;
}

.settings-group-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--dur-med) ease, border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}

.setting-row + .setting-row {
  margin-top: 8px;
}

.setting-row:hover {
  background: rgba(109, 86, 255, 0.03);
  border-color: rgba(109, 86, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.08);
}

.setting-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.setting-title {
  font-weight: 650;
  color: rgba(238, 240, 255, 0.92);
  line-height: 1.15;
}

.setting-hint {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.15;
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.setting-row.toggle {
  cursor: pointer;
}

.setting-row.toggle .toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setting-row.toggle .toggle-ui {
  width: 46px;
  height: 26px;
}

.setting-row.toggle .toggle-ui::after {
  width: 20px;
  height: 20px;
}

.setting-row.toggle .toggle-input:checked + .toggle-ui {
  background: rgba(var(--purple-rgb), 0.4);
  border-color: rgba(var(--purple-rgb), 0.65);
}

.setting-row.toggle .toggle-input:checked + .toggle-ui::after {
  transform: translateY(-50%) translateX(20px);
}

.settings-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Value badge */
.value-badge {
  min-width: 44px;
  text-align: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(238, 240, 255, 0.85);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* ============================
   Toolbar (filter bars)
   ============================ */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(16, 19, 40, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  transition: box-shadow var(--dur-med) ease, border-color var(--dur-med) ease;
}

.toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  flex: 1;
}

.toolbar-field label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.3px;
  font-weight: 500;
}

.toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.toolbar:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  border-color: rgba(109, 86, 255, 0.08);
}

/* ============================
   Empty state
   ============================ */

.empty-state {
  text-align: center;
  padding: 48px 20px;
  opacity: 0.7;
}

.empty-state h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  color: rgba(238, 240, 255, 0.7);
}

.empty-state p {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ============================
   Topbar (legacy, unused but kept for other templates)
   ============================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 6, 16, 0.7);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  isolation: isolate;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin: 0;
  color: var(--text);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: rgba(238, 240, 255, 0.8);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 999px;
  transition:
    transform var(--dur-fast) ease,
    background var(--dur-fast) ease,
    color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease,
    border-color var(--dur-fast) ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.nav a:hover {
  color: var(--text);
  background: rgba(109, 86, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.nav a.active {
  background: linear-gradient(135deg, rgba(var(--purple-rgb), 0.18), rgba(var(--pink-rgb), 0.12));
  border-color: rgba(var(--purple-rgb), 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ============================
   Compact density mode
   ============================ */

body.compact .main-content > .container {
  padding: 18px 20px;
}

body.compact .card {
  padding: 14px;
}

body.compact .metrics-grid {
  gap: 10px;
  margin-bottom: 16px;
}

body.compact .metric-card {
  padding: 14px 16px;
}

body.compact .metric-value {
  font-size: 1.6rem;
}

body.compact .metric-icon-wrap {
  width: 38px;
  height: 38px;
}

body.compact .metric-icon-wrap svg {
  width: 18px;
  height: 18px;
}

body.compact .dashboard-grid {
  gap: 10px;
}

body.compact .quick-action-item {
  padding: 8px 12px;
}

body.compact .qa-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

body.compact .qa-icon svg {
  width: 14px;
  height: 14px;
}

body.compact .qa-desc {
  display: none;
}

body.compact thead th,
body.compact tbody td {
  padding: 8px 12px;
}

body.compact .setting-row {
  padding: 9px 12px;
}

body.compact .sidebar-inner {
  padding: 20px 12px 14px;
}

body.compact .sidebar-nav {
  gap: 2px;
}

body.compact .nav-link,
body.compact .sidebar-nav a {
  padding: 7px 10px;
  font-size: 0.88rem;
}

body.compact .main-topbar {
  padding: 10px 20px;
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions-card {
    order: -1;
  }

  .quick-actions-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 64px; }

  .sidebar-logo-text { display: none; }
  .sidebar-logo { justify-content: center; padding: 0; }

  .nav-link span,
  .sidebar-nav a span { display: none; }

  .nav-link,
  .sidebar-nav a {
    justify-content: center;
    padding: 10px;
    gap: 0;
  }

  .nav-link::before,
  .sidebar-nav a::before {
    display: none;
  }

  .nav-icon { width: 20px; height: 20px; opacity: 0.8; }

  .density-btn span { display: none; }
  .density-btn { justify-content: center; padding: 8px; }

  .sidebar-profile {
    flex-direction: column;
    padding: 8px 6px;
    gap: 6px;
  }

  .profile-info { display: none; }

  .logout-btn {
    width: 100%;
    justify-content: center;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 720px) {
  .container { padding: 0 14px; }
  .main-content > .container { padding: 16px; }
  .main-topbar { padding: 10px 16px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-actions-list { grid-template-columns: 1fr; }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
    margin: 0 12px;
  }

  .login-title {
    font-size: 1.2rem;
  }
}

/* ============================
   Spacing utilities
   ============================ */

.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.ml-2 { margin-left: 8px; }

/* ============================
   Inline form
   ============================ */

.form-inline { display: inline; }

/* ============================
   Action row
   ============================ */

.action-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================
   Alert variants
   ============================ */

.alert-success {
  color: var(--color-success);
  margin-top: 8px;
}

.alert-muted {
  color: var(--muted);
}

/* ============================
   Toolbar spaced
   ============================ */

.toolbar--spaced { margin-bottom: 24px; }

/* ============================
   Button variants (additional)
   ============================ */

.btn-link {
  background: transparent;
  border-color: rgba(var(--purple-rgb), 0.2);
  color: rgba(var(--purple-rgb), 0.85);
  padding: 8px 14px;
}

.btn-link:hover {
  background: rgba(var(--purple-rgb), 0.08);
  border-color: rgba(var(--purple-rgb), 0.35);
  color: var(--brand-1);
  box-shadow: 0 4px 16px rgba(var(--purple-rgb), 0.1);
}

.btn-warning {
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.2), rgba(var(--gold-rgb), 0.08));
  border-color: rgba(var(--gold-rgb), 0.25);
  color: var(--color-warning);
}

.btn-warning:hover {
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.35), rgba(var(--gold-rgb), 0.15));
  box-shadow: 0 8px 24px rgba(var(--gold-rgb), 0.15), 0 0 16px rgba(var(--gold-rgb), 0.08);
  border-color: rgba(var(--gold-rgb), 0.4);
}

/* ============================
   Eye icon toggle (login)
   ============================ */

.eye-open,
.eye-closed {
  width: 16px;
  height: 16px;
}

/* ============================
   Tabs
   ============================ */

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition:
    background var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(109, 86, 255, 0.06);
}

.tab.active {
  color: #fff;
  background: rgba(var(--purple-rgb), 0.15);
  border-color: rgba(var(--purple-rgb), 0.2);
  box-shadow: 0 0 16px rgba(var(--purple-rgb), 0.08);
  font-weight: 600;
}

/* ============================
   Button row
   ============================ */

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================
   Metrics grid — 4 columns
   ============================ */

.metrics-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.metrics-grid--3x2 {
  grid-template-columns: repeat(3, 1fr);
}

/* Gold/Amber variant for metric cards */
.metric-gold .metric-icon-wrap {
  background: rgba(var(--gold-rgb), 0.12);
  color: var(--color-warning);
  box-shadow: 0 0 20px rgba(var(--gold-rgb), 0.1);
}

.metric-gold .metric-value {
  color: var(--color-warning);
}

.metric-gold .metric-accent {
  background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.8), rgba(var(--gold-rgb), 0.1));
}

.metric-gold::after {
  background: linear-gradient(180deg, var(--color-warning), rgba(var(--gold-rgb), 0.3));
}

.metric-gold:hover .metric-icon-wrap {
  box-shadow: 0 0 30px rgba(var(--gold-rgb), 0.2);
}

/* ============================
   Attention list (dashboard)
   ============================ */

.attention-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attention-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: var(--text);
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.attention-row:hover {
  background: rgba(var(--pink-rgb), 0.04);
  border-color: rgba(var(--pink-rgb), 0.12);
  transform: translateX(4px);
  color: var(--text);
}

.attention-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.9rem;
}

.attention-count {
  min-width: 28px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(var(--pink-rgb), 0.15);
  border: 1px solid rgba(var(--pink-rgb), 0.3);
  color: var(--color-danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.attention-arrow {
  width: 14px;
  height: 14px;
  color: rgba(238, 240, 255, 0.2);
  flex-shrink: 0;
  transition: color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.attention-row:hover .attention-arrow {
  color: var(--brand-2);
  transform: translateX(2px);
}

/* ============================
   CSS Bar Chart
   ============================ */

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  padding: 12px 0 0;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}

.bar {
  width: 100%;
  max-width: 36px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(var(--purple-rgb), 0.7), rgba(var(--purple-rgb), 0.25));
  transition: height 0.4s ease, background 0.3s ease;
}

.bar:hover {
  background: linear-gradient(180deg, rgba(var(--purple-rgb), 0.9), rgba(var(--purple-rgb), 0.4));
}

.bar--purple {
  background: linear-gradient(180deg, rgba(var(--purple-rgb), 0.7), rgba(var(--purple-rgb), 0.25));
}

.bar--purple:hover {
  background: linear-gradient(180deg, rgba(var(--purple-rgb), 0.9), rgba(var(--purple-rgb), 0.4));
}

.bar--cyan {
  background: linear-gradient(180deg, rgba(var(--cyan-rgb), 0.7), rgba(var(--cyan-rgb), 0.25));
}

.bar--cyan:hover {
  background: linear-gradient(180deg, rgba(var(--cyan-rgb), 0.9), rgba(var(--cyan-rgb), 0.4));
}

.bar-label {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

/* ============================
   Chat grid (chats page)
   ============================ */

.chat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.chat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}

.chat-card:hover {
  color: var(--text);
  border-color: rgba(var(--purple-rgb), 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--purple-rgb), 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chat-card-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(238, 240, 255, 0.95);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-card-username {
  font-size: 0.82rem;
  color: var(--muted);
}

.chat-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-platform {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-platform-telegram {
  background: rgba(0, 136, 204, 0.12);
  border: 1px solid rgba(0, 136, 204, 0.3);
  color: #0088cc;
}

.badge-platform-vk {
  background: rgba(76, 117, 163, 0.12);
  border: 1px solid rgba(76, 117, 163, 0.3);
  color: #4c75a3;
}

.module-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.module-pill--active {
  background: rgba(var(--cyan-rgb), 0.08);
  border-color: rgba(var(--cyan-rgb), 0.2);
  color: var(--brand-3);
}

.chat-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.chat-card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.chat-card-stat svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.chat-card-stat--alert {
  color: var(--color-danger);
}

.chat-card-stat--alert svg {
  opacity: 0.8;
}

.chat-card-arrow {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: rgba(238, 240, 255, 0.15);
  transition: color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.chat-card:hover .chat-card-arrow {
  color: var(--brand-1);
  transform: translateX(2px);
}

/* ============================
   CSS-only Tabs (radio-based)
   ============================ */

.tab-radio {
  display: none;
}

.tab-panel {
  display: none;
}

#tab-journal:checked ~ .tab-panels .panel-journal {
  display: block;
}

#tab-analytics:checked ~ .tab-panels .panel-analytics {
  display: block;
}

#stab-users:checked ~ .tab-panels .panel-users {
  display: block;
}

#stab-holidays:checked ~ .tab-panels .panel-holidays {
  display: block;
}

.tab-labels {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 24px;
  width: fit-content;
}

.tab-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  transition:
    background var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
}

.tab-label:hover {
  color: var(--text);
  background: rgba(109, 86, 255, 0.06);
}

/* Active state for radio-based tabs */
#tab-journal:checked ~ .tab-labels label[for="tab-journal"],
#tab-analytics:checked ~ .tab-labels label[for="tab-analytics"],
#stab-users:checked ~ .tab-labels label[for="stab-users"],
#stab-holidays:checked ~ .tab-labels label[for="stab-holidays"] {
  color: #fff;
  background: rgba(var(--purple-rgb), 0.15);
  border-color: rgba(var(--purple-rgb), 0.2);
  box-shadow: 0 0 16px rgba(var(--purple-rgb), 0.08);
  font-weight: 600;
}

/* ============================
   Period quick buttons
   ============================ */

.period-buttons {
  display: flex;
  gap: 6px;
}

/* ============================
   Settings accordion (details/summary)
   ============================ */

.settings-accordion {
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-card);
  backdrop-filter: var(--blur);
  overflow: hidden;
  transition: border-color var(--dur-med) ease;
}

.settings-accordion:hover {
  border-color: rgba(255, 255, 255, 0.09);
}

.settings-accordion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(238, 240, 255, 0.9);
  list-style: none;
  user-select: none;
  transition: background var(--dur-fast) ease;
}

.settings-accordion-header::-webkit-details-marker {
  display: none;
}

.settings-accordion-header::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(238, 240, 255, 0.3);
  border-bottom: 2px solid rgba(238, 240, 255, 0.3);
  transform: rotate(45deg);
  transition: transform var(--dur-med) ease;
  flex-shrink: 0;
}

.settings-accordion[open] > .settings-accordion-header::after {
  transform: rotate(-135deg);
}

.settings-accordion-header:hover {
  background: rgba(var(--purple-rgb), 0.03);
}

.settings-accordion-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--brand-1);
  opacity: 0.7;
}

.settings-accordion-body {
  padding: 0 20px 20px;
}

/* ============================
   Hamburger menu (mobile)
   ============================ */

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-right: 12px;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.hamburger svg {
  width: 18px;
  height: 18px;
}

.hamburger:hover {
  background: rgba(var(--purple-rgb), 0.08);
  border-color: rgba(var(--purple-rgb), 0.15);
  transform: none;
  box-shadow: none;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 20;
  backdrop-filter: blur(4px);
}

.sidebar-overlay--visible {
  display: block;
}

/* ============================
   Responsive — new styles
   ============================ */

@media (max-width: 1100px) {
  .metrics-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics-grid--3x2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    min-width: 260px;
    transform: translateX(-100%);
    transition: transform var(--dur-med) ease;
    z-index: 30;
  }

  .sidebar--open {
    transform: translateX(0);
  }

  /* Override the collapsed sidebar from original media query */
  .sidebar--open .sidebar-logo-text { display: inline; }
  .sidebar--open .sidebar-logo { justify-content: flex-start; padding: 0 6px; }
  .sidebar--open .nav-link span,
  .sidebar--open .sidebar-nav a span { display: inline; }
  .sidebar--open .nav-link,
  .sidebar--open .sidebar-nav a {
    justify-content: flex-start;
    padding: 10px 12px;
    gap: 10px;
  }
  .sidebar--open .nav-link::before,
  .sidebar--open .sidebar-nav a::before { display: block; }
  .sidebar--open .density-btn span { display: inline; }
  .sidebar--open .density-btn { justify-content: flex-start; padding: 8px 12px; }
  .sidebar--open .sidebar-profile {
    flex-direction: row;
    padding: 12px 10px;
    gap: 10px;
  }
  .sidebar--open .profile-info { display: block; }
  .sidebar--open .logout-btn { width: 30px; justify-content: center; }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .metrics-grid--4 {
    grid-template-columns: 1fr 1fr;
  }
  .metrics-grid--3x2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .metrics-grid--4 {
    grid-template-columns: 1fr;
  }
  .chat-grid {
    grid-template-columns: 1fr;
  }
  .bar-chart {
    height: 120px;
  }
  .bar-label {
    font-size: 0.6rem;
  }
  .setting-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .setting-control {
    flex-wrap: wrap;
  }
}
