/* Quimonit - Website Monitoring Dashboard Styles */
/* Color Theme: White background with #007cbc accent */

:root {
  --primary: #007cbc;
  --primary-dark: #005a8a;
  --primary-light: #e6f3fa;
  --secondary: #2d3748;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-width: 260px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
}

/* Typography */
h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
}

p {
  color: var(--gray-500);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-full {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: white;
  color: var(--gray-800);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group small {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.monitor-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.monitor-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1rem 0.5rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.monitor-type-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.monitor-type-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(0, 124, 188, 0.15);
}

.monitor-type-btn svg {
  width: 28px;
  height: 28px;
  color: var(--gray-600);
}

.monitor-type-btn.active svg {
  color: var(--primary);
}

.monitor-type-btn span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
  text-align: center;
}

.monitor-type-btn small {
  font-size: 0.65rem;
  color: var(--gray-500);
  margin-top: 0;
}

/* Auth Page */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, white 50%, var(--gray-50) 100%);
}

.auth-card {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 0.5rem;
}

.logo-img {
  height: auto;
  width: auto;
  max-width: 100%;
}

.auth-tagline {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 0.25rem;
}

.auth-tab {
  flex: 1;
  padding: 0.625rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 1rem;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-logo .logo-img {
  width: auto;
  max-width: 100%;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.2s;
  margin-bottom: 0.25rem;
}

.nav-item:hover {
  background: var(--gray-50);
  color: var(--gray-800);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Small numeric badge used on sidebar items (e.g. Incidents) */
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(239,68,68,0.15);
}

/* bump animation for badge when incrementing */
.nav-badge.bump {
  animation: badge-bump 420ms cubic-bezier(.2,.8,.2,1);
}

@keyframes badge-bump {
  0% { transform: scale(1); }
  30% { transform: scale(1.25); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

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

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
}

.upgrade-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 1rem 1rem 1rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 124, 188, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.upgrade-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 124, 188, 0.4);
  filter: brightness(1.1);
}

.system-status {
  margin-bottom: 1rem;
}

.status-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 0.05em;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.healthy {
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-dot.warning {
  background: var(--warning);
}

.status-dot.danger {
  background: var(--danger);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-details {
  flex: 1;
  overflow: hidden;
}

.user-details span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-details span:first-child {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--gray-800);
}

.user-details span:last-child {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.btn-logout {
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.btn-logout:hover {
  background: var(--gray-100);
  color: var(--danger);
}

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

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1rem;
  align-items: center;
  justify-content: space-between;
  z-index: 99;
}

.menu-toggle {
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.mobile-logo {
  max-height: 32px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gray-50);
  padding: 1rem 0;
  margin-top: -1rem;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  padding: 0.625rem 0.875rem 0.625rem 2.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: white;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gray-400);
}

.top-bar-actions {
  display: flex;
  gap: 0.75rem;
}

/* Page Layout */
.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 9999px;
  background: var(--gray-100);
  color: var(--gray-600);
  border: none;
  transform: translateY(0.1rem);
}

.tier-badge.free {
  background: var(--gray-200);
  color: var(--gray-600);
}

.tier-badge.pro {
  background: var(--primary);
  color: white;
}

.tier-badge.enterprise {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.tier-badge.infinity {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-500);
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.stat-value span:first-child {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
}

.stat-trend {
  font-size: 0.8125rem;
  font-weight: 500;
}

.stat-trend.up {
  color: var(--success);
}

.stat-trend.down {
  color: var(--danger);
}

.stat-trend.neutral {
  color: var(--gray-400);
}

/* Monitors Section */
.monitors-section {
  margin-bottom: 2rem;
}

.monitors-section h2 {
  margin-bottom: 1rem;
}

.monitors-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Monitor Card */
.monitor-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.monitor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.monitor-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.monitor-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.monitor-icon.ping,
.monitor-icon.content,
.monitor-icon.dns,
.monitor-icon.malware,
.monitor-icon.blacklist {
  background: var(--primary-light);
  color: var(--primary);
}

.monitor-details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.monitor-details h3 {
  font-size: 0.9375rem;
  margin: 0;
}

.monitor-details span {
  font-size: 0.75rem;
  color: var(--gray-500);
  display: block;
}

.monitor-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.up {
  background: #dcfce7;
  color: #166534;
}

.status-badge.down {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.monitor-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all 0.2s;
}

.monitor-btn:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

.monitor-btn svg {
  width: 14px;
  height: 14px;
}

.ai-help-btn {
  position: relative;
}

.ai-help-btn::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.ai-icon svg {
  width: 20px;
  height: 20px;
}

.monitor-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  /* Allow stats area to grow and push chart to bottom */
}

.monitor-stat-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.125rem;
}

.monitor-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.monitor-stat-value small {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
}

.monitor-chart {
  display: flex;
  gap: 2px;
  margin-top: 1rem;
  height: 8px;
}

.chart-bar {
  flex: 1;
  border-radius: 2px;
  background: var(--success);
}

.chart-bar.warning {
  background: var(--warning);
}

.chart-bar.danger {
  background: var(--danger);
}

/* Charts Section */
.charts-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.chart-card h3 {
  margin-bottom: 1rem;
}

.chart-card canvas {
  max-height: 250px;
}

/* Settings */
.settings-content {
  max-width: 600px;
}

.settings-section {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

.settings-section h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}

.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.toggle-label input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: var(--gray-300);
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}

.toggle-label input:checked+.toggle-slider {
  background: var(--primary);
}

.toggle-label input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

.subscription-info {
  text-align: center;
}

.tier-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.subscription-info p {
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content.modal-sm {
  max-width: 400px;
}

.modal-content.modal-lg {
  max-width: 90vw;
  width: 1200px;
  height: 85vh;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.modal-form {
  padding: 1.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* AI Help Modal */
.ai-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-icon {
  font-size: 1.5rem;
}

.ai-content {
  padding: 1.5rem;
  min-height: 150px;
}

.ai-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--gray-500);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ai-explanation {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--gray-700);
}

/* DOM Selector Modal */
.selector-content {
  display: flex;
  flex-direction: column;
  height: calc(85vh - 60px);
  overflow: hidden;
}

.selector-url-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.selector-url-bar input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--gray-50);
}

.selector-preview {
  flex: 1;
  background: var(--gray-100);
  overflow: hidden;
  min-height: 300px;
}

.selector-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.selector-info {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.selector-info .form-group {
  margin-bottom: 0;
}

.selector-info textarea {
  resize: none;
  height: 80px;
}

.selector-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

@media (max-width: 768px) {
  .modal-content.modal-lg {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }

  .selector-content {
    height: calc(100vh - 60px);
  }

  .selector-info {
    grid-template-columns: 1fr;
  }
}

/* Incidents List */
.incidents-list {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.incident-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.incident-item:last-child {
  border-bottom: none;
}

.incident-severity {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.incident-severity.critical {
  background: var(--danger);
}

.incident-severity.warning {
  background: var(--warning);
}

.incident-info {
  flex: 1;
}

.incident-info h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 0.125rem;
}

.incident-info p {
  font-size: 0.8125rem;
}

.incident-time {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.empty-state {
  padding: 3rem;
  text-align: center;
  color: var(--gray-500);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--gray-300);
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .monitors-grid,
  .charts-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

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

  .mobile-header {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-top: 76px;
  }

  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    top: 60px;
    padding: 0.75rem 0;
  }

  .search-box {
    max-width: none;
  }

  .top-bar-actions {
    justify-content: space-between;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value span:first-child {
    font-size: 1.25rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }
}

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

  .auth-card {
    padding: 1.5rem;
  }

  .top-bar-actions .btn-outline {
    display: none;
  }
}

/* Notifications */
.notification-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.notification {
  min-width: 300px;
  max-width: 450px;
  background: white;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease-out;
  pointer-events: auto;
  border-left: 4px solid var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-800);
}

.notification.success {
  border-left-color: var(--success);
}

.notification.error {
  border-left-color: var(--danger);
}

.notification.info {
  border-left-color: var(--primary);
}

.notification.fade-out {
  animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Subscription Card */
.subscription-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1rem;
}

.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.usage-stats {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.usage-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.usage-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

.usage-bar-container {
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}

/* Footer Attribution */
.footer-attribution {
  margin-top: auto;
  font-size: 13px;
  color: var(--gray-500);
  text-align: right;
}

.footer-attribution a {
  color: #009245;
  text-decoration: none;
  font-weight: 500;
}

.footer-attribution a:hover {
  text-decoration: underline;
}

.usage-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.usage-text {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-align: right;
}

.usage-bar.warning {
  background: var(--warning);
}

.usage-bar.danger {
  background: var(--danger);
}

/* Monitor Groups by TLD */
.monitor-group {
  margin-bottom: 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.monitor-group-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 1rem 1.5rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.monitor-group.paused {
  opacity: 0.7;
}

.monitor-group.paused .monitor-group-header {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.monitor-group.paused .monitor-card {
  opacity: 0.6;
  pointer-events: none;
}

.monitor-group-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.monitor-group-title svg {
  opacity: 0.9;
}

.monitor-group-stats {
  margin-left: auto;
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.9;
}

.monitor-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: var(--gray-50);
}

.monitor-group-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.chart-card-sm {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 180px;
}

.chart-card-sm h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chart-card-sm canvas {
  max-height: 140px;
}

@media (max-width: 768px) {
  .monitor-group-cards {
    grid-template-columns: 1fr;
  }

  .monitor-group-charts {
    grid-template-columns: 1fr;
  }

  .monitor-group-stats {
    display: none;
  }
}