/* BotManager Dashboard - Dark Theme CSS */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* Reset e variáveis */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Cores principais baseadas na imagem */
  --bg-primary: #0f1419;
  --bg-secondary: #1a202c;
  --bg-card: #1e2532;
  --bg-hover: #2a3441;

  /* Cores de destaque */
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --blue: #06b6d4;
  --blue-light: #22d3ee;

  --purple-dark: #7c3aed;


  --red-dark: #c53030;
  --red: #ef4444;
  --red-light: #f87171;

  /* Cores de texto */
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-primary-2: #e5e7eb;
  --text-muted: #6b7280;

  /* Cores de status */
  --success: #10b981;
  --success-2: #059669;
  --success-bg: rgba(16, 185, 129, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);

  /* Bordas */
  --border-radius: 12px;
  --border-radius-lg: 16px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Dashboard Container */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-secondary);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-header {
  padding: 24px 20px;
}

.logo-header {
  padding: 24px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo i {
  color: var(--purple);
  font-size: 24px;
}

.sidebar-search {
  padding: 20px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  border-color: var(--purple);
  background: var(--bg-hover);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 0 12px;
}

.sidebar-nav ul {
  list-style: none;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active .nav-link {
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.14);
  border-left: 3px solid var(--purple);
}

.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.nav-link .arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.nav-link:hover .arrow {
  transform: translateX(2px);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  border-radius: 10px;
  overflow: hidden;
  padding: 20px 15px;
}

.user-avatar i {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  flex: 1;
}

.user-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 32px;
  background: var(--bg-primary);
  min-height: 100vh;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.header-left h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.header-left p {
  font-size: 16px;
  color: var(--text-secondary);
}

.header-right {
  display: flex;
  gap: 12px;
}

/* Filters Section */
.filters-section {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 32px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-input,
.filter-select {
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--purple);
  background: var(--bg-hover);
}

.filter-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-stop {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--purple) 0%,
    var(--purple-light) 100%
  );
  color: white;
}

.btn-stop {
  background: linear-gradient(
    135deg,
    var(--red) 0%,
    var(--red-light) 100%
  );
  color: white;
}




.btn-primary:hover, .btn-stop:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: 18px;
  transition: all 0.2s ease;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-title i {
  font-size: 16px;
}

.stat-menu {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.stat-menu:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.stat-change {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
}

.stat-change.positive {
  color: var(--success);
  background: var(--success-bg);
}

.stat-change.negative {
  color: var(--danger);
  background: var(--danger-bg);
}

/* Charts Grid */
.charts {
  height: 150px;
  margin-bottom: 28px;
}

.configuration-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  grid-template-areas:
    "large small1"
    "large small2";
}

.chart-card.large {
  grid-area: large;
}

.chart-card.small:first-of-type {
  grid-area: small1;
}

.chart-card.small:last-of-type {
  grid-area: small2;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  transition: all 0.2s ease;
}


.chart-header {
  margin-bottom: 20px;
}

.chart-header h3,
.chart-header h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.chart-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.chart-value .change {
  font-size: 14px;
  font-weight: 600;
  margin-left: 8px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.purple {
  background: var(--purple);
}

.legend-dot.blue {
  background: var(--blue);
}

.chart-period {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: auto;
}

.chart-container {
  height: 300px;
  margin: 20px 0;
}

.chart-card.small .chart-container {
  height: 180px;
}

.chart-milestone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  border-left: 3px solid var(--purple);
}

.milestone-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.milestone-date {
  font-size: 12px;
  color: var(--text-muted);
}

.milestone-change {
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.view-report {
  color: var(--purple);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.view-report:hover {
  color: var(--purple-light);
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  font-size: 16px;
}

.loading i {
  margin-right: 8px;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
  .charts {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "large"
      "small1"
      "small2";
  }

  .configuration-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "large"
      "small1"
      "small2";
  }
}

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

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

  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 20px;
  }

  .header-right {
    width: 100%;
    justify-content: center;
  }

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

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

  .header-left h1 {
    font-size: 24px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-card {
    padding: 16px;
  }
}

/* Profile Page Styles */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.2s ease;
}



.card.full-width {
  grid-column: 1 / -1;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
  width: 60%; 
  display: block; 
  margin: 0 auto;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.info-value {
  font-weight: 600;
  color: var(--text-primary);
}

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

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




.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-title i {
  font-size: 16px;
}

.stat-menu {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.stat-menu:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}


.stat-change {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
}

.stat-change.positive {
  color: var(--success);
  background: var(--success-bg);
}

.stat-change.negative {
  color: var(--danger);
  background: var(--danger-bg);
}

.stat2-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all 0.2s ease;
}

.stat2-card:hover {
  background: rgba(139, 92, 246, 0.15);
  transform: translateY(-1px);
}

.stat-icon {
  font-size: 2rem;
  color: var(--purple);
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.action-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.help-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.token-form {
  margin-top: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert.success {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-input {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--purple);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

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

.step-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.step-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.step-icon {
  font-size: 2rem;
  color: var(--purple);
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.step-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .card-body {
    padding: 1rem;
    width: 100%; 
    padding: 1rem
  }
}

/* Scrollbar customization */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card,
.chart-card,
.card-admin
.filters-section {
  animation: fadeIn 0.6s ease-out;
}

.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* Performance optimizations */
.chart-container canvas {
  max-width: 100%;
  height: auto;
}

/* Mobile sidebar toggle button (small screens) */
.mobile-sidebar-toggle,
.mobile-menu-btn {
  position: fixed;
  top: 14px;
  left: 12px;
  z-index: 10010;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-primary);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  display: none; /* shown only on mobile */
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.mobile-sidebar-toggle i,
.mobile-menu-btn i {
  font-size: 18px;
}

/* Overlay that appears when sidebar is open on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 10005;
}

/* Responsive behavior for small screens */
@media (max-width: 992px) {
  .mobile-sidebar-toggle,
  .mobile-menu-btn {
    display: flex;
  }

  /* Sidebar slides from left on mobile */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    transform: translateX(-110%);
    transition: transform 260ms cubic-bezier(.2,.8,.2,1);
    z-index: 10006;
    /* keep background / other styles from desktop */
  }

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

  .sidebar-overlay {
    display: block;
  }
  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* main content should not reserve left margin on mobile */
  .main-content {
    margin-left: 0 !important;
    padding-top: 64px; /* give space for the mobile toggle if needed */
  }
}

/* Services Status Styles */
.services-status {
  margin: 2rem 0;
}

.services-status h3 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.services-status h3 i {
  color: var(--success);
  font-size: 1.2rem;
}

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

.services-header h3 {
  margin-bottom: 0;
}

.test-services-btn {
  background: linear-gradient(
    135deg,
    var(--purple) 0%,
    var(--purple-light) 100%
  );
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.test-services-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.test-services-btn i {
  margin-right: 0.5rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.status-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.status-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--text-muted);
  transition: all 0.3s ease;
}

.status-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.3);
}

.status-card.online::before {
  background: linear-gradient(90deg, var(--success) 0%, #22d3ee 100%);
}

.status-card.offline::before {
  background: linear-gradient(90deg, var(--danger) 0%, #f59e0b 100%);
}

.status-card.timeout::before {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

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

.status-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-name i {
  font-size: 1.1rem;
  opacity: 0.8;
}

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

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  animation: pulse 2s infinite;
}

.status-card.online .status-dot {
  background-color: var(--success);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.status-card.offline .status-dot {
  background-color: var(--danger);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
  animation: none;
}

.status-card.timeout .status-dot {
  background-color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
}

.status-text {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-card.online .status-text {
  color: var(--success);
}

.status-card.offline .status-text {
  color: var(--danger);
}

.status-card.timeout .status-text {
  color: #f59e0b;
}

.status-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(156, 163, 175, 0.1);
}

.response-time,
.last-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-details i {
  font-size: 0.8rem;
  opacity: 0.7;
}

.response-time {
  color: var(--success);
  font-weight: 500;
}

.status-card.offline .response-time {
  color: var(--danger);
}

.status-card.timeout .response-time {
  color: #f59e0b;
}

/* Animação de pulso para indicadores online */
@keyframes pulse {
  0% {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
  }
  50% {
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.8),
      0 0 35px rgba(16, 185, 129, 0.4);
  }
  100% {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
  }
}

/* Loading state para quando está testando */
.status-card.testing {
  opacity: 0.7;
  position: relative;
}

.status-card.testing::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 92, 246, 0.2),
    transparent
  );
  animation: loading-sweep 1.5s infinite;
}

@keyframes loading-sweep {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Responsivo para status cards */
@media (max-width: 768px) {
  .status-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .status-card {
    padding: 1rem;
  }

  .services-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .status-details {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.running {
  color: var(--success);
}

.status-badge.active {
  color: var(--purple);
}

.status-badge.stopped {
  color: var(--danger);
}

.bot-details {
  margin: 16px 0;
}

.bot-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.bot-info-item i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.bot-info-item i.online {
  color: var(--success);
}

.bot-info-item i.offline {
  color: var(--text-muted);
}

.bot-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-small {
  padding: 8px 12px;
  font-size: 12px;
  min-width: auto;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
}

.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--success);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.inactive-btn {
  width: 100%;
  justify-content: center;
  opacity: 0.7;
  cursor: not-allowed;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

/* Responsive adjustments for bot list */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .header-right {
    justify-content: center;
  }

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

  .action-buttons {
    justify-content: center;
  }

  .bot-actions {
    text-align: center;
  }
}

/* Notification animations */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.bot-list-page .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80%, 1fr));
  gap: 24px;
  max-width: none;
}

.bot-card {
  border-radius: 16px;

  transition: all 0.2s ease;
  width: 100%;

  min-height: 240px;
  min-width: 360px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* toggle animation INPUT */
.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-label span {
  position: relative;
  padding-left: 60px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.checkbox-label span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 26px;
  background: #515f76;
  border: 2px solid var(--border-color);
  border-radius: 13px;
  transition: all 0.3s ease;
}

.checkbox-label span::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.checkbox-label input[type="checkbox"]:checked + span::before {
  background: #ffffff;
  border-color: var(--border-color);
}

.checkbox-label input[type="checkbox"]:checked + span::after {
  left: 25px;
  background: #1f2937;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.checkbox-label:hover span::before {
  border-color: var(--primary-color);
}


/* Toggle Loading Animation */
.checkbox-label input[type="checkbox"]:disabled + span::before {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-label input[type="checkbox"]:disabled + span::after {
  animation: togglePulse 1.5s ease-in-out infinite;
}

@keyframes togglePulse {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
  }
  50% {
    transform: translateY(-50%) scale(0.9);
  }
}


.dashboard-final {
  display: flex; 
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

#grafico {
  width: 350%;
}

@media (max-width: 768px) {
  .dashboard-final {
    flex-direction: column;
  }

  #grafico {
    width: 100%;
  }
}


@media (max-width: 1650px) {
  #grafico {
    width: 200%;
  }
}

@media (max-width: 1400px) {
  #grafico {
    width: 150%;
  }
}

@media (max-width: 1200px) {
  #grafico {
    width: 100%;
  }
}