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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.login-box h1 {
  text-align: center;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.login-box .subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #555;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #667eea;
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #5a6fd6;
}

.error-message {
  background: #fee;
  color: #c00;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  text-align: center;
}

/* Dashboard Layout */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: #2d3748;
  color: white;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.sidebar .logo h2 {
  color: #667eea;
  margin-bottom: 2rem;
}

.nav-links {
  list-style: none;
  flex-grow: 1;
}

.nav-links li {
  margin-bottom: 0.5rem;
}

.nav-links a {
  color: #a0aec0;
  text-decoration: none;
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-links li.active a,
.nav-links a:hover {
  background: #4a5568;
  color: white;
}

.user-info {
  border-top: 1px solid #4a5568;
  padding-top: 1rem;
}

.user-info span {
  display: block;
  color: #a0aec0;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.logout-link {
  color: #fc8181;
  text-decoration: none;
  font-size: 0.875rem;
}

.logout-link:hover {
  text-decoration: underline;
}

/* Main Content */
.content {
  flex-grow: 1;
  padding: 2rem;
}

.content header {
  margin-bottom: 2rem;
}

.content header h1 {
  color: #2d3748;
}

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

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
  color: #718096;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3748;
}

.stat-value.success {
  color: #38a169;
}

/* Tables */
.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

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

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

td {
  color: #4a5568;
}

td.empty {
  text-align: center;
  color: #a0aec0;
  padding: 2rem;
}

/* Status Badges */
.status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-verified {
  background: #d1fae5;
  color: #065f46;
}

.status-expired {
  background: #fee2e2;
  color: #991b1b;
}

.status-failed {
  background: #fee2e2;
  color: #991b1b;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}

.status-inactive {
  background: #e2e8f0;
  color: #4a5568;
}

/* Sections */
.recent-section,
.keys-section,
.create-key-section {
  margin-bottom: 2rem;
}

.recent-section h2,
.keys-section h2,
.create-key-section h2 {
  margin-bottom: 1rem;
  color: #2d3748;
}

/* Create Key Form */
.create-key-form {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.create-key-form .form-group {
  flex-grow: 1;
  margin-bottom: 0;
}

.create-key-form .btn {
  width: auto;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.alert strong {
  display: block;
  margin-bottom: 0.5rem;
}

.api-key-display {
  display: block;
  background: #065f46;
  color: #d1fae5;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-family: monospace;
  margin-top: 0.5rem;
  word-break: break-all;
}

code {
  background: #e2e8f0;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.875rem;
}
