/* Dashboard - Professional Styles */
/* Self-contained styles - no main.css dependency */

/* ========================================
   CSS Variables
======================================== */
:root {
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #0a0a0a;
}

/* ========================================
   Reset & Base Styles
======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ========================================
   Custom Scrollbars
======================================== */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(17, 24, 39, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-700);
  border-radius: 4px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-600);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-700) rgba(17, 24, 39, 0.5);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #000;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ========================================
   Background Effects
======================================== */
.bg-effects {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #000 0%, var(--gray-950) 50%, #000 100%);
}

.bg-glow-1 {
  position: absolute;
  top: -100px;
  left: 25%;
  width: 500px;
  height: 500px;
  background: rgba(220, 38, 38, 0.15);
  border-radius: 50%;
  filter: blur(100px);
  animation: pulse 4s ease-in-out infinite;
}

.bg-glow-2 {
  position: absolute;
  bottom: 20%;
  right: 20%;
  width: 400px;
  height: 400px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  filter: blur(100px);
  animation: pulse 4s ease-in-out infinite 1s;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 50, 50, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* ========================================
   Animated Eye Logo
======================================== */
.eye-logo {
  overflow: visible;
}

.eye-logo .eye-pupil {
  transform-origin: center;
  transition: transform 0.15s ease-out;
}

.eye-logo .eye-outline {
  transform-origin: center;
}

@keyframes lookAround {
  0%, 100% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(2px, -1px);
  }
  25% {
    transform: translate(3px, 0);
  }
  40% {
    transform: translate(1px, 1px);
  }
  55% {
    transform: translate(-2px, 1px);
  }
  70% {
    transform: translate(-3px, 0);
  }
  85% {
    transform: translate(-1px, -1px);
  }
}

.eye-logo.autonomous .eye-pupil {
  animation: lookAround 4s ease-in-out infinite;
}

@keyframes blink {
  0%, 45%, 55%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.1);
  }
}

.eye-logo.blink .eye-outline,
.eye-logo.blink .eye-pupil {
  animation: blink 0.15s ease-in-out;
}

/* ========================================
   Buttons
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-600) 0%, var(--red-500) 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--red-500) 0%, var(--red-400) 100%);
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.25);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--gray-700);
  color: #fff;
}

.btn-secondary:hover {
  border-color: var(--gray-600);
  background: rgba(255, 255, 255, 0.05);
}

/* ========================================
   Dashboard Layout
======================================== */
.dashboard-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    position: relative;
    z-index: 10;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(17, 24, 39, 0.95);
    border-right: 1px solid var(--gray-800);
    display: flex;
    flex-direction: column;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-800);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo .logo-text {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.sidebar-logo .logo-text .accent {
    color: var(--red-500);
}

/* Project Selector */
.project-selector {
    padding: 12px;
    border-bottom: 1px solid var(--gray-800);
    position: relative;
}

.project-selector-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--gray-800);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.project-selector-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gray-700);
}

.project-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-url {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-chevron {
    color: var(--gray-500);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.project-selector.open .project-chevron {
    transform: rotate(180deg);
}

.project-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 12px;
    right: 12px;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.project-selector.open .project-dropdown {
    display: block;
}

.project-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
}

.project-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.project-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.project-dropdown-item.active {
    background: rgba(239, 68, 68, 0.1);
}

.project-dropdown-item .project-item-icon {
    width: 32px;
    height: 32px;
    background: var(--gray-700);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    flex-shrink: 0;
}

.project-dropdown-item.active .project-item-icon {
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    color: #fff;
}

.project-dropdown-item .project-item-info {
    flex: 1;
    min-width: 0;
}

.project-dropdown-item .project-item-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-dropdown-item .project-item-url {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-dropdown-item .wp-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    background: rgba(33, 117, 155, 0.2);
    color: #21759b;
    border-radius: 4px;
    flex-shrink: 0;
}

.project-dropdown-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--gray-700);
    background: rgba(0, 0, 0, 0.2);
}

.add-project-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-400);
    transition: color 0.15s ease;
}

.add-project-link:hover {
    color: var(--red-400);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    min-height: 0;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    display: block;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-400);
}

.nav-item.active svg {
    color: var(--red-400);
}

.nav-badge {
    margin-left: auto;
    background: var(--red-500);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-800);
    margin-top: auto;
    flex-shrink: 0;
}

.plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.plan-badge.pro {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.plan-badge.pro svg {
    stroke: #22c55e;
}

.upgrade-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--red-600) 0%, var(--red-500) 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, var(--red-500) 0%, var(--red-400) 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.25);
}

/* Main Content Area */
.dashboard-main {
    grid-column: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

/* Dashboard Header */
.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 32px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-800);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    padding: 8px;
    cursor: pointer;
}

/* Breadcrumb Navigation */
.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-item {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: #fff;
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    color: var(--gray-600);
}

.breadcrumb-current {
    color: #fff;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.header-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--gray-400);
    padding: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.header-btn:hover {
    color: #fff;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--red-500);
    border-radius: 50%;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--red-600) 0%, var(--red-500) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid var(--gray-800);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 12px;
    border-bottom: 1px solid var(--gray-800);
    margin-bottom: 8px;
}

.user-email {
    font-size: 13px;
    color: var(--gray-400);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--gray-300);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.user-dropdown-item.logout {
    color: var(--red-400);
}

.user-dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--gray-800);
    margin: 8px 0;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 32px;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.welcome-text h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.welcome-text h1 span {
    background: linear-gradient(135deg, var(--red-400) 0%, var(--red-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-text p {
    font-size: 15px;
    color: var(--gray-400);
}

.welcome-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Stats use shared .monitors-stats classes from monitors.css */

/* Loading spinner for stats */
.stat-loading {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--red-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Dashboard Card */
.dashboard-card {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid var(--gray-800);
    border-radius: 16px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-800);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.card-link {
    font-size: 13px;
    color: var(--red-400);
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-link:hover {
    color: var(--red-300);
}

/* Quick Actions */
.quick-actions {
    padding: 12px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.quick-action:hover {
    background: rgba(255, 255, 255, 0.03);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    background: rgba(29, 161, 242, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1da1f2;
}

.quick-action-icon.brand {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-400);
}

.quick-action-icon.alert {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.quick-action-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-action-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.quick-action-desc {
    font-size: 13px;
    color: var(--gray-500);
}

.quick-action > svg {
    color: var(--gray-600);
}

/* Activity List */
.activity-list {
    padding: 8px 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 24px;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.search {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.activity-icon.brand {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-400);
}

.activity-icon.alert {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    color: #fff;
    margin-bottom: 2px;
}

.activity-meta {
    font-size: 12px;
    color: var(--gray-500);
}

/* Chart Section */
.chart-section {
    margin-bottom: 32px;
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.chart-controls {
    display: flex;
    gap: 12px;
}

.chart-filter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--gray-700);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-filter:hover {
    border-color: var(--gray-600);
}

.chart-filter:focus {
    outline: none;
    border-color: var(--red-500);
}

.chart-filter option {
    background: #1f2937;
    color: #fff;
}

.chart-container {
    padding: 24px;
    height: 350px;
}

.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    gap: 16px;
}

.chart-empty svg {
    color: var(--gray-600);
}

.chart-empty p {
    color: var(--gray-500);
    font-size: 15px;
}

.chart-empty .btn {
    margin-top: 8px;
}

/* Chart Legend */
.chart-legend {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-800);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-400);
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.chart-legend-label {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chart-legend-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-400);
    text-transform: uppercase;
}

.chart-legend-badge.user-brand {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red-400);
}

.chart-legend-item.user-brand {
    font-weight: 600;
    color: #fff;
}

/* User's brand pulsing dot animation */
.chart-legend-item.user-brand .chart-legend-color {
    background: var(--red-500) !important;
    border-radius: 50%;
    animation: userBrandPulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--red-500), 0 0 16px rgba(239, 68, 68, 0.4);
}

@keyframes userBrandPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px var(--red-500), 0 0 16px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 12px var(--red-500), 0 0 24px rgba(239, 68, 68, 0.6);
    }
}

/* Brands Table Section */
.brands-table-section {
    margin-bottom: 32px;
}

.table-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.table-search {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--gray-700);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    width: 200px;
    transition: all 0.2s ease;
}

.table-search::placeholder {
    color: var(--gray-500);
}

.table-search:focus {
    outline: none;
    border-color: var(--red-500);
}

.brand-count {
    font-size: 13px;
    font-weight: 400;
    color: var(--gray-500);
    margin-left: 8px;
}

.brands-table-container {
    overflow-x: auto;
}

.brands-table {
    width: 100%;
    border-collapse: collapse;
}

.brands-table th,
.brands-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--gray-800);
}

.brands-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    background: rgba(0, 0, 0, 0.2);
}

.brands-table tbody tr {
    transition: background 0.2s ease;
}

.brands-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.brands-table tbody tr.pinned {
    background: rgba(239, 68, 68, 0.05);
}

.brands-table tbody tr.pinned:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* User's Brand Row - Special Styling */
.brands-table tbody tr.user-brand-row {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid var(--red-500);
}

.brands-table tbody tr.user-brand-row:hover {
    background: rgba(239, 68, 68, 0.12);
}

.brands-table tbody tr.user-brand-row .brand-name {
    color: var(--red-400);
    font-weight: 600;
}

.brands-table tbody tr.user-brand-row .brand-color {
    animation: userBrandPulse 2s ease-in-out infinite;
    box-shadow: 0 0 6px var(--red-500), 0 0 12px rgba(239, 68, 68, 0.4);
    border-radius: 50%;
}

.brands-table tbody tr.user-brand-row .user-brand-label {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--red-400);
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.th-pin {
    width: 70px;
    text-align: center;
}

.th-brand {
    min-width: 180px;
}

.th-mentions {
    width: 120px;
}

.th-providers {
    width: 120px;
}

.th-trend {
    width: 140px;
}

/* Pin Button */
.pin-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--gray-700);
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 0 auto;
}

.pin-btn:hover {
    border-color: var(--gray-500);
    color: #fff;
}

.pin-btn.pinned {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--red-400);
}

.pin-btn.pinned:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Brand Cell */
.brand-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 500;
    color: #fff;
}

.brand-name-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.brand-name-link:hover {
    color: var(--primary);
}

.brand-name-link:hover .brand-name {
    color: var(--primary);
    text-decoration: underline;
}

.brand-rank {
    font-size: 11px;
    color: var(--gray-500);
    margin-left: 4px;
}

.brand-rank.user-rank {
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Pinned user brand row separator */
.brands-table tbody tr.user-brand-row + tr:not(.user-brand-row) {
    border-top: 2px solid var(--gray-600);
}

/* Pinned at top row (user brand always visible at top) */
.brands-table tbody tr.pinned-at-top {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-left: 3px solid var(--red-500);
    position: relative;
}

.brands-table tbody tr.pinned-at-top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--red-500) 0%, transparent 100%);
}

.brands-table tbody tr.pinned-at-top .brand-rank {
    background: rgba(239, 68, 68, 0.2);
    color: var(--red-400);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Mentions Cell */
.mentions-cell {
    font-weight: 600;
    color: #fff;
}

/* Providers Cell */
.providers-cell {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.provider-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Trend Cell */
.trend-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.trend-sparkline {
    width: 60px;
    height: 24px;
}

.trend-value {
    font-size: 12px;
    font-weight: 600;
}

.trend-value.up {
    color: #22c55e;
}

.trend-value.down {
    color: var(--red-400);
}

.trend-value.neutral {
    color: var(--gray-500);
}

/* Empty table state */
.brands-table-empty {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

/* Monitors Section */
.monitors-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.section-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-link:hover {
    color: var(--red-400);
}

.section-link svg {
    transition: transform 0.2s ease;
}

.section-link:hover svg {
    transform: translateX(3px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-700);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    border-color: var(--gray-500);
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.monitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* Dashboard preview - limit to 3 columns */
.monitors-grid-preview {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1200px) {
    .monitors-grid-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .monitors-grid-preview {
        grid-template-columns: 1fr;
    }
}

.monitor-card {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid var(--gray-800);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.monitor-card:hover {
    border-color: rgba(239, 68, 68, 0.3);
}

.monitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.monitor-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-600);
}

.monitor-status.active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.monitor-status.paused {
    background: #fbbf24;
}

/* Processing state - dashboard dot-only status indicator */
.monitor-header .monitor-status.processing {
    background: var(--primary);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* Failed state */
.monitor-status.failed {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.failed-text {
    color: #ef4444;
}

/* Card highlight when analyzing - subtle pulsing glow only */
.monitor-card.is-analyzing {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
    }
    50% {
        box-shadow: 0 0 25px rgba(239, 68, 68, 0.35);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.monitor-badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.monitor-schedule {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

.monitor-auto-replicate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 3px 6px;
    border-radius: 4px;
}

.monitor-auto-replicate svg {
    flex-shrink: 0;
}

.monitor-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monitor-query {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.monitor-meta {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.monitor-actions {
    display: flex;
    gap: 8px;
}

.monitor-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--gray-700);
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.monitor-btn:hover {
    border-color: var(--gray-500);
    color: #fff;
}

.monitor-btn.run:hover {
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.monitor-btn.delete:hover {
    border-color: rgba(239, 68, 68, 0.5);
    color: var(--red-400);
    background: rgba(239, 68, 68, 0.1);
}

.monitor-btn.citations {
    text-decoration: none;
}

.monitor-btn.citations:hover {
    border-color: rgba(59, 130, 246, 0.5);
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.monitors-empty {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
    font-size: 14px;
}

.monitors-empty a {
    color: var(--red-400);
    text-decoration: none;
}

.monitors-empty a:hover {
    text-decoration: underline;
}

/* Responsive - Tablet */

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .dashboard-main {
        grid-column: 1;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .dashboard-content {
        padding: 24px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 12px 16px;
        gap: 12px;
    }

    .header-search {
        display: none;
    }

    .user-name {
        display: none;
    }

    .dashboard-content {
        padding: 16px;
    }

    .welcome-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .welcome-text h1 {
        font-size: 24px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Brand Merge Modal & Selection UI
======================================== */

/* Table selection checkbox column */
.th-select {
    width: 40px;
    text-align: center;
}

.brand-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--red-500);
}

/* Selected row highlight */
.brands-table tbody tr.selected {
    background: rgba(239, 68, 68, 0.1);
}

/* Merge button */
.merge-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--red-500);
    color: var(--red-500);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.merge-btn:hover {
    background: var(--red-500);
    color: #fff;
}

/* Alias badge */
.alias-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(239, 68, 68, 0.2);
    color: var(--red-400);
    border-radius: 4px;
    margin-left: 8px;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

/* Modal content */
.modal-content {
    background: var(--gray-900);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-body p {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.merge-brand-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.merge-brand-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-800);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.merge-brand-item:hover {
    background: var(--gray-700);
    border-color: rgba(255, 255, 255, 0.1);
}

.merge-brand-item input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--red-500);
    cursor: pointer;
}

.merge-brand-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.modal-footer .btn {
    padding: 10px 20px;
    font-size: 14px;
}

/* ========================================
   Brands Table Pagination
======================================== */
.brands-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-800);
    flex-wrap: wrap;
    gap: 16px;
}

.brands-pagination .pagination-info {
    font-size: 13px;
    color: var(--gray-500);
}

.brands-pagination .pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brands-pagination .pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--gray-700);
    border-radius: 8px;
    color: var(--gray-300);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.brands-pagination .pagination-btn:hover:not(:disabled) {
    border-color: var(--red-500);
    color: var(--red-400);
    background: rgba(239, 68, 68, 0.1);
}

.brands-pagination .pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.brands-pagination .page-indicator {
    font-size: 13px;
    color: var(--gray-400);
    padding: 0 8px;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .brands-pagination {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .brands-pagination .pagination-controls {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   X Leads Section
======================================== */
.x-leads-section {
    margin-bottom: 32px;
}

.x-leads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.x-lead-card {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}

.x-lead-card:hover {
    border-color: var(--gray-700);
}

.x-lead-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.x-lead-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.x-lead-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.x-lead-author-info {
    display: flex;
    flex-direction: column;
}

.x-lead-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-100);
}

.x-lead-handle {
    font-size: 12px;
    color: var(--gray-500);
}

.x-lead-relevance {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

.x-lead-relevance.high {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.x-lead-relevance.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.x-lead-relevance.low {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.x-lead-content {
    font-size: 13px;
    color: var(--gray-300);
    line-height: 1.5;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
}

.x-lead-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--gray-800);
}

.x-lead-metrics {
    display: flex;
    gap: 12px;
}

.x-lead-metric {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray-500);
}

.x-lead-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--gray-800);
    border-radius: 4px;
    font-size: 12px;
    color: var(--gray-300);
    transition: background 0.2s;
}

.x-lead-link:hover {
    background: var(--gray-700);
}

.x-leads-empty {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
}

.x-leads-empty p {
    color: var(--gray-500);
    margin-bottom: 8px;
}

.x-leads-empty a {
    color: var(--red-400);
}

.x-leads-empty a:hover {
    text-decoration: underline;
}

/* Responsive X leads */
@media (max-width: 1024px) {
    .x-leads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .x-leads-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   WORDPRESS INTEGRATION MODAL
   ===================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-800);
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.modal-header h2 svg {
    color: #21759b;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: #fff;
    background: var(--gray-800);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-800);
    background: rgba(17, 24, 39, 0.5);
}

/* WordPress Setup Steps */
.wp-setup-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.setup-step {
    display: flex;
    gap: 16px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
}

.step-content p {
    font-size: 14px;
    color: var(--gray-400);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

/* License Key Box */
.license-key-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.license-key-display {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    flex: 1;
    min-width: 200px;
}

.license-key-display .no-key {
    color: var(--gray-500);
    font-style: italic;
}

.license-key-display .key {
    color: var(--green-400);
    word-break: break-all;
}

/* Connected Sites */
.connected-sites {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-800);
}

.connected-sites h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-300);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sites-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-800);
    border-radius: 8px;
}

.site-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.site-url-text {
    font-size: 12px;
    color: var(--gray-500);
}

.site-status {
    font-size: 12px;
    font-weight: 500;
    color: var(--green-400);
    background: rgba(34, 197, 94, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* WordPress quick action icon */
.quick-action-icon.wordpress {
    background: linear-gradient(135deg, #21759b 0%, #1e6a8d 100%);
}

/* ========================================
   SPA Loading & Error States
======================================== */
.spa-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.spa-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gray-700);
    border-top-color: var(--red-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spa-loading p {
    color: var(--gray-400);
    font-size: 14px;
}

.spa-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--gray-400);
}

.spa-error svg {
    color: var(--red-500);
    margin-bottom: 16px;
}

.spa-error p {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.spa-error small {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* SPA Navigation Transitions */
.dashboard-content {
    transition: opacity 0.15s ease;
}

.dashboard-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   Monitor Setup Progress Card
======================================== */
.setup-progress-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    grid-column: 1 / -1;
}

.setup-progress-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setup-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: setup-spin 1s linear infinite;
}

@keyframes setup-spin {
    to {
        transform: rotate(360deg);
    }
}

.setup-progress-content {
    flex: 1;
    min-width: 0;
}

.setup-progress-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.setup-progress-text {
    font-size: 13px;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.setup-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.setup-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ========================================
   Upgrade Modal - Pro Feature Gate
======================================== */
.upgrade-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.upgrade-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.upgrade-modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    padding: 40px 32px 32px;
    text-align: center;
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 100px -20px rgba(245, 158, 11, 0.15);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
}

.upgrade-modal-overlay.active .upgrade-modal {
    transform: scale(1) translateY(0);
}

.upgrade-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.upgrade-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    color: #f59e0b;
}

.upgrade-modal-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 6px;
    margin-bottom: 16px;
}

.upgrade-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.3;
}

.upgrade-modal-desc {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.6;
    margin: 0 0 24px;
}

.upgrade-modal-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    text-align: left;
}

.upgrade-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 13px;
    color: var(--gray-300);
}

.upgrade-feature-item svg {
    flex-shrink: 0;
    color: #22c55e;
}

.upgrade-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--red-600) 0%, var(--red-500) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.upgrade-modal-btn:hover {
    background: linear-gradient(135deg, var(--red-500) 0%, var(--red-400) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.upgrade-modal-btn svg {
    flex-shrink: 0;
}

.upgrade-modal-note {
    font-size: 12px;
    color: var(--gray-500);
    margin: 16px 0 0;
}

/* Upgrade Modal - Mobile Responsive */
@media (max-width: 480px) {
    .upgrade-modal-overlay {
        padding: 16px;
        align-items: flex-end;
    }

    .upgrade-modal {
        max-width: 100%;
        padding: 32px 24px 24px;
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
    }

    .upgrade-modal-overlay.active .upgrade-modal {
        transform: scale(1) translateY(0);
    }

    .upgrade-modal-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }

    .upgrade-modal-icon svg {
        width: 28px;
        height: 28px;
    }

    .upgrade-modal-title {
        font-size: 20px;
    }

    .upgrade-modal-desc {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .upgrade-modal-features {
        margin-bottom: 24px;
    }

    .upgrade-feature-item {
        padding: 8px 12px;
        font-size: 12px;
    }

    .upgrade-modal-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* ========================================
   Pro Locked UI States
======================================== */
.pro-locked-overlay {
    position: relative;
}

.pro-locked-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: inherit;
    z-index: 10;
}

.pro-locked-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    text-align: center;
}

.pro-locked-badge-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
    border-radius: 50%;
    color: #f59e0b;
}

.pro-locked-badge-text {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.pro-locked-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--red-600), var(--red-500));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pro-locked-badge-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
