:root {
  --primary: rgb(13, 110, 253);
  --border-radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  min-height: 100vh;
  color: #333;
  background-color: whitesmoke;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-container {
  max-width: 400px;
  margin: 100px auto;
}

.dashboard {
  display: none;
}

.dashboard.active {
  display: block;
}

h1,
h2 {
  color: #2d3748;
  margin-bottom: 20px;
}

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

.btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  border-radius: var(--border-radius);
  display: inline-block;
}

.btn:hover {
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.btn-danger:hover {
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
  color: #333;
}

.btn-success {
  background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #4a5568;
}

input,
textarea,
select {
  width: 100%;
  border-radius: var(--border-radius);
  padding: 12px;
  border: 2px solid #e2e8f0;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 25px;
  text-align: center;
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  display: block;
}

.stat-label {
  font-size: 0.9em;
  opacity: 0.9;
  margin-top: 5px;
}

.table-container {
  overflow-x: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #f7fafc;
  font-weight: 600;
  color: #4a5568;
}

tr:hover {
  background: #f7fafc;
}

.status-badge {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active {
  background: #c6f6d5;
  color: #22543d;
}

.status-suspended {
  background: #fed7d7;
  color: #742a2a;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
}

.alert-success {
  background: #c6f6d5;
  color: #22543d;
  border: 1px solid #9ae6b4;
}

.alert-error {
  background: #fed7d7;
  color: #742a2a;
  border: 1px solid #feb2b2;
}

.api-key-display {
  background: #f7fafc;
  border: 2px dashed #cbd5e0;
  padding: 15px;
  border-radius: var(--border-radius);
  font-family: "Courier New", monospace;
  word-break: break-all;
  margin: 15px 0;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #718096;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

.tabs {
  display: flex;
  margin-bottom: 30px;
  border-bottom: 2px solid #e2e8f0;
}

.tab {
  padding: 15px 25px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-weight: 600;
}

.tab.active {
  border-bottom-color: #667eea;
  color: #667eea;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

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

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

  table {
    font-size: 14px;
  }

  th,
  td {
    padding: 10px 5px;
  }
}
