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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0b0e17 0%, #111827 50%, #0b0e17 100%);
  color: #e5e7eb;
  min-height: 100vh;
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 0.85rem 2rem;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(55, 65, 81, 0.4);
  position: sticky;
  top: 0;
  z-index: 50;
}

nav .brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #f9fafb;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav a {
  color: #9ca3af;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover { color: #f9fafb; }

main {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.toolbar h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f9fafb;
}

.card {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(55, 65, 81, 0.5);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

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

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(55, 65, 81, 0.3);
  font-size: 0.875rem;
}

th {
  background: rgba(31, 41, 55, 0.5);
  color: #6b7280;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(55, 65, 81, 0.2); }
tr.disabled td { opacity: 0.4; }

td.mono {
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  font-size: 0.78rem;
}

td input[readonly] {
  background: transparent;
  border: none;
  color: #60a5fa;
  width: 260px;
  font-family: inherit;
  font-size: inherit;
  cursor: text;
  outline: none;
}

.actions { white-space: nowrap; gap: 0.4rem; display: flex; }

button, .btn {
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(55, 65, 81, 0.6);
  border-radius: 8px;
  background: rgba(31, 41, 55, 0.6);
  color: #d1d5db;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}

button:hover {
  background: rgba(55, 65, 81, 0.8);
  border-color: rgba(75, 85, 99, 0.8);
}

button.danger {
  border-color: rgba(220, 38, 38, 0.4);
  color: #fca5a5;
}

button.danger:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.6);
  color: #fca5a5;
}

button.primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border: none;
  color: #fff;
}

button.primary:hover {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.login-form {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid rgba(55, 65, 81, 0.5);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-form h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #f9fafb, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-form .subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.login-form input {
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(55, 65, 81, 0.6);
  border-radius: 10px;
  color: #e5e7eb;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}

.login-form input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.login-form button {
  margin-top: 0.5rem;
  padding: 0.75rem;
  font-size: 0.95rem;
}

.error {
  color: #fca5a5;
  font-size: 0.85rem;
  text-align: center;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  padding: 0.5rem;
}

.modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}

.modal-content {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(55, 65, 81, 0.5);
  border-radius: 16px;
  padding: 2rem;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #f9fafb;
}

.modal-content input {
  padding: 0.65rem 0.9rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(55, 65, 81, 0.6);
  border-radius: 10px;
  color: #e5e7eb;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.modal-content input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

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

.modal-actions button { flex: 1; }

.copy-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.copy-btn:hover { color: #60a5fa; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
