:root {
  --primary-blue: #1e3a8a;
  --secondary-blue: #3b82f6;
  --cyan: #06b6d4;
  --dark-blue: #1e293b;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --light-gray: #f1f5f9;
  --border-color: #e2e8f0;
  --text-dark: #334155;
  --text-light: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-gray);
  color: var(--text-dark);
}

/* Dashboard Container */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, #334155 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: bold;
}

.logo i {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

.text-cyan {
  color: var(--cyan) !important;
}

.logo-text {
  color: white;
}

/* User Profile */
.user-profile {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.user-avatar {
  margin-bottom: 1rem;
}

.user-avatar i {
  font-size: 3rem;
  color: var(--cyan);
}

.user-name {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.user-email {
  color: var(--cyan);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.user-badge {
  background-color: var(--cyan);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 1rem 0;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
}

.nav-link:hover {
  background-color: var(--sidebar-hover);
  color: white;
  transform: translateX(5px);
}

.nav-link.active {
  background-color: var(--cyan);
  color: white;
}

.nav-link i {
  width: 20px;
  margin-right: 0.75rem;
  font-size: 1rem;
}

.nav-link span {
  font-size: 0.9rem;
}

.nav-link.text-danger {
  color: var(--danger) !important;
}

.nav-link.text-danger:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger) !important;
}

/* Main Content */
.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  background-color: var(--light-gray);
}

.main-header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: between;
  align-items: center;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.user-dropdown .btn-link {
  border: none;
  padding: 0;
  color: var(--text-dark);
}

/* Content Area */
.content-area {
  padding: 2rem;
}

/* Summary Cards */
.summary-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  height: 100%;
}

.card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-info {
  flex: 1;
}

.card-label {
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.btn-cyan {
  background-color: var(--cyan);
  border: none;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-cyan:hover {
  background-color: #0891b2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--cyan);
  opacity: 0.7;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  background: white;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--cyan);
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #0891b2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.5rem;
}

.service-title {
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

/* Developer Section */
.developer-section,
.settings-section {
  max-width: 1200px;
}

.developer-section h2,
.settings-section h2 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.api-key-section .input-group {
  background: var(--light-gray);
  border-radius: 8px;
  padding: 0.25rem;
}

.api-key-section .form-control {
  border: none;
  background: transparent;
  font-family: "Monaco", "Menlo", monospace;
  font-size: 0.875rem;
}

.stat-item {
  padding: 1rem;
}

.stat-item h4 {
  margin-bottom: 0.25rem;
  font-weight: bold;
}

/* WhatsApp Support */
.whatsapp-support {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
  background: #128c7e;
  transform: scale(1.1);
  color: white;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.6);
  }
  100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    margin-left: 240px;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .content-area {
    padding: 1rem;
  }

  .main-header {
    padding: 1rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .service-card {
    padding: 1.5rem 1rem;
  }

  .service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .card-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-card .card-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Alert Styles */
.alert {
  border-radius: 8px;
  border: none;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #065f46;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

.alert-info {
  background-color: rgba(6, 182, 212, 0.1);
  color: #0c4a6e;
}

/* Form Controls */
.form-control {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--secondary-blue);
  border-color: var(--secondary-blue);
}

.btn-primary:hover {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
}

/* Toggle Switches */
.form-check-input:checked {
  background-color: var(--cyan);
  border-color: var(--cyan);
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
}
