html {
  height: 100%;
  min-height: 100vh;
}

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

#app, .app {
  display: flex;
  width: 100%;
}

div.container {
  height: 100% !important;
  min-height: 100vh;
  align-items: stretch;
}

body {
  background: #141414;
  color: #ffffff;
  display: flex;
  overflow: hidden;
}

.modal .card {
  background: rgb(42 42 42);
}

.primary-blueprint {
  overflow: hidden;
}

.auth-container {
  display: flex;
  width: 100%;
  height: 100%;
  align-content: center;
  justify-content: center;
  align-items: center;
}

.bg-gradient {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 210vw;
  height: 210vh;
  background: radial-gradient(circle at 20% 80%, #1e40af 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, #2563eb 0%, transparent 50%),
              radial-gradient(circle at 40% 40%, #3b82f6 0%, transparent 50%);
  opacity: 0.15;
  pointer-events: none;
  transform: rotate(29deg);
  z-index: 100;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green {
  background-color: rgba(72, 187, 120, 0.1);
  color: #48bb78;
  border: 1px solid #48bb7840;
}

.badge-blue {
  background-color: rgba(49, 130, 206, 0.1);
  color: #3182ce;
  border: 1px solid #3182ce40;
}

.badge-red {
  background-color: rgba(229, 62, 62, 0.1);
  color: #e53e3e;
  border: 1px solid #e53e3e40;
}

.badge-purple {
  background-color: rgba(159, 122, 234, 0.1);
  color: #9f7aea;
  border: 1px solid #9f7aea40;
}

.badge-orange {
  background-color: rgba(237, 137, 54, 0.1);
  color: #ed8936;
  border: 1px solid #ed893640;
}

.badge-info {
  background-color: rgba(86, 180, 235, 0.1);
  color: #56b4eb;
  border: 1px solid #56b4eb40;
}

.badge-secondary {
  background-color: rgba(160, 174, 192, 0.1);
  color: #a0aec0;
  border: 1px solid #a0aec040;
}

.badge-danger {
  background-color: rgba(229, 62, 62, 0.1);
  color: #e53e3e;
  font-weight: 600;
  border: 1px solid #e53e3e40;
}

/* ========== SIDEBAR ========== */
.sidebar {
  width: 320px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  z-index: 10;
}

.cluster-name {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.cluster-status {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.sidebar-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-section-title {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 24px;
  margin-bottom: 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 11px 24px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  font-size: 14px;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.sidebar-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-item:hover .sidebar-icon,
.sidebar-item.active .sidebar-icon {
  opacity: 1;
}

.main-content {
  flex: 1;
  position: relative;
  z-index: 10;
  background: #141414;
}

.main-content .body,
.main-content .body .content {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.main-content .body .content {
  padding: 32px;
  overflow-y: auto;
}

.main-content .content .main-text,
.main-content .content a.main-text {
  color: white!important;
  font-weight: 500;
}

.main-content .content .main-text-guid {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8em;
}

.card .card-subtitle.header.header-with-border {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
}

.date-time {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-time i {
  opacity: 0.5;
}

.sidebar-icon .icon,
.empty-chart .icon,
.empty-state .icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-chart,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 20px;
  height: 300px;
  width: 100%;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  font-weight: 400;
}

.empty-chart i {
  color: rgba(255, 255, 255, 0.2);
}

/* Background icon */
.stat-icon-bg {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 180px;
  opacity: 0.08;
  transition: all 0.3s ease;
}

.stat-icon-bg svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* Card content */
.stat-content {
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  font-weight: 500;
}

.stat-value {
  font-size: 48px;
  font-weight: 300;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.stat-period {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.stat-change svg {
  width: 14px;
  height: 14px;
}

.stat-change.neutral {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.stat-change.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.stat-change.positive {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

/* Color themes for different cards */
.stat-card.automation {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.stat-card.automation .stat-icon-bg {
  color: #3b82f6;
}

.stat-card.automation:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

.stat-card.traffic {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.stat-card.traffic .stat-icon-bg {
  color: #ef4444;
}

.stat-card.traffic:hover {
  border-color: rgba(239, 68, 68, 0.5);
}

.stat-card.users {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.stat-card.users .stat-icon-bg {
  color: #10b981;
}

.stat-card.users:hover {
  border-color: rgba(16, 185, 129, 0.5);
}

 .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  width: 100%;
  position: relative;
  z-index: 10;
  margin-bottom: 24px;
}

.stats-grid-minimal {
  margin-top: 60px;
}

.stat-card-minimal {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 180px;
}

.stat-icon-minimal {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.stat-icon-minimal svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.stat-card-minimal.automation .stat-icon-minimal {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.stat-card-minimal.traffic .stat-icon-minimal {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.stat-card-minimal.users .stat-icon-minimal {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stat-card-minimal:hover .stat-icon-minimal {
  transform: scale(1.1);
}

.time-selector {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.time-selector:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Label */
.time-selector .selector-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  white-space: nowrap;
}

/* Tab group */
.time-selector .tab-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.time-selector .tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  outline: none;
}

.time-selector .tab:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.time-selector .tab.active {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.time-selector .tab.active:hover {
  background: #2563eb;
}

/* Divider */
.time-selector .divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

/* Date range display */
.time-selector .date-range {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.time-selector .date-range:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.time-selector .date-range.active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.time-selector .date-text {
  font-weight: 500;
}

.time-selector .calendar-icon {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.5);
}

.time-selector .refresh-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.time-selector .refresh-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.time-selector .refresh-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.time-selector .refresh-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

/* Date picker modal (hidden by default) */
.time-selector .date-picker-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

.time-selector .date-picker-modal.show {
  display: block;
}

/* Minimal version */
.time-selector.minimal {
  padding: 12px 16px;
  gap: 16px;
}

.time-selector.minimal .tab {
  padding: 6px 12px;
  font-size: 12px;
}

.time-selector.minimal .date-range {
  padding: 9px 12px;
  font-size: 12px;
}

.time-selector.minimal .refresh-btn {
  padding: 8px 12px;
  font-size: 12px;
}

/* Activity badges */
.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  min-width: 100px;
}

.activity-badge.updated {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.activity-badge.created {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.activity-badge.removed {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.activity-badge.renamed {
  background: rgba(147, 51, 234, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

/* Floating particles */
.particles {
  position: fixed;
  top: -20px;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: float 20s linear infinite;
}

.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Radio group */
.radio-group {
  display: flex;
  padding-top: 0.5rem;
  gap: 24px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.radio-label:hover {
  color: #ffffff;
}

.radio-input {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-input:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.radio-input:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.radio-input:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
}