/* Dashboard Specific Styles */
.dashboard-header {
  background-color: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(10px);
}

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

.dashboard-badge {
  background-color: #dc2626;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: bold;
}

.dashboard-container {
  padding-top: 5rem;
  min-height: 100vh;
}

/* Stats Section */
.stats-section {
  padding: 2rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
}

.stat-header {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
}

.stat-value.blue {
  color: #60a5fa;
}
.stat-value.red {
  color: #ef4444;
}
.stat-value.yellow {
  color: #fbbf24;
}
.stat-value.green {
  color: #10b981;
}

/* Alerts Section */
.alerts-section {
  padding: 1rem 0 2rem;
}

.alert-card {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 0.5rem;
  overflow: hidden;
}

.alert-header {
  background-color: rgba(220, 38, 38, 0.2);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ef4444;
  font-weight: bold;
}

.alert-content {
  padding: 1rem;
}

.alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.alert-item:last-child {
  margin-bottom: 0;
}

.alert-item.critical {
  background-color: rgba(220, 38, 38, 0.2);
}

.alert-item.warning {
  background-color: rgba(245, 158, 11, 0.2);
}

.alert-indicator {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  margin-left: 1rem;
}

.alert-item.critical .alert-indicator {
  background-color: #ef4444;
  animation: pulse 1s infinite;
}

.alert-item.warning .alert-indicator {
  background-color: #fbbf24;
}

.alert-info {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.alert-subtitle {
  font-size: 0.875rem;
  color: #9ca3af;
}

.alert-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: bold;
}

.alert-badge.critical {
  background-color: #dc2626;
  color: #ffffff;
}

.alert-badge.warning {
  background-color: #f59e0b;
  color: #000000;
}

/* Servers Section */
.servers-section {
  padding: 1rem 0 2rem;
}

.server-card {
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  overflow: hidden;
}

.server-header {
  padding: 1.5rem;
  border-bottom: 1px solid #374151;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 1.125rem;
}

.server-header i {
  color: #60a5fa;
}

.server-subtitle {
  font-size: 0.875rem;
  color: #9ca3af;
  font-weight: normal;
  margin-right: auto;
}

.servers-list {
  padding: 1rem;
}

.server-item {
  background-color: rgba(55, 65, 81, 0.5);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.server-item:last-child {
  margin-bottom: 0;
}

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

.server-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.server-main i {
  font-size: 1.25rem;
}

.server-item.safe .server-main i {
  color: #10b981;
}
.server-item.under-attack .server-main i {
  color: #ef4444;
}
.server-item.isolated .server-main i {
  color: #fbbf24;
}

.server-details {
  display: flex;
  flex-direction: column;
}

.server-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.server-ip {
  font-size: 0.875rem;
  color: #9ca3af;
}

.server-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: bold;
}

.server-status-badge.safe {
  background-color: #10b981;
  color: #ffffff;
}

.server-status-badge.under-attack {
  background-color: #ef4444;
  color: #ffffff;
  animation: pulse 1s infinite;
}

.server-status-badge.isolated {
  background-color: #fbbf24;
  color: #000000;
}

.server-protection {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #9ca3af;
}

.server-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.metric {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  background-color: #374151;
  border-radius: 0.25rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background-color: #60a5fa;
  transition: width 0.3s ease;
}

.progress-fill.critical {
  background-color: #ef4444;
}

.metric-value {
  font-size: 0.875rem;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.connection-status i.green {
  color: #10b981;
}
.connection-status i.red {
  color: #ef4444;
}

.server-actions {
  display: flex;
  gap: 0.5rem;
}

.attack-info {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ef4444;
  font-size: 0.875rem;
}

/* Bottom Section */
.bottom-section {
  padding: 1rem 0 3rem;
}

.bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.settings-card,
.stats-card {
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  overflow: hidden;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid #374151;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
}

.card-header i {
  color: #60a5fa;
}

.settings-list,
.stats-list {
  padding: 1.5rem;
}

.setting-item,
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.setting-item:not(:last-child),
.stat-row:not(:last-child) {
  border-bottom: 1px solid #374151;
}

.stat-number {
  font-weight: bold;
}

.stat-number.red {
  color: #ef4444;
}
.stat-number.green {
  color: #10b981;
}
.stat-number.blue {
  color: #60a5fa;
}

/* Switch Component */
.switch {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.5rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151;
  transition: 0.4s;
  border-radius: 1.5rem;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.25rem;
  width: 1.25rem;
  left: 0.125rem;
  bottom: 0.125rem;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #60a5fa;
}

input:checked + .slider:before {
  transform: translateX(1.5rem);
}

/* Button Variants */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-warning {
  background-color: #f59e0b;
  color: #000000;
}

.btn-warning:hover {
  background-color: #d97706;
}

.btn-success {
  background-color: #10b981;
  color: #ffffff;
}

.btn-success:hover {
  background-color: #059669;
}

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

  .server-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .server-metrics {
    grid-template-columns: 1fr;
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .alert-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .server-actions {
    flex-direction: column;
    width: 100%;
  }
}

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

  .server-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
}
