:root {
  --bg-dark: #0f172a;
  --bg-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --text: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-dark);
  background-image: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 400px),
                    radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.15), transparent 400px);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
}

.glass-container {
  width: 100%;
  max-width: 1000px;
}

header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInDown 0.6s ease-out;
}

h1 {
  font-size: 2.5rem;
  margin: 0 0 10px 0;
  background: linear-gradient(to right, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--text-muted);
  margin: 0;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: fadeInUp 0.6s ease-out;
}

h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 500;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-row {
  display: flex;
  gap: 15px;
}

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

label {
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

input {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.table-container {
  overflow-x: auto;
}

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

th, td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge.active { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge.revoked { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge.expired { background: rgba(234, 179, 8, 0.2); color: #facc15; }

.key-text {
  font-family: monospace;
  background: rgba(0,0,0,0.3);
  padding: 4px 8px;
  border-radius: 4px;
  color: #93c5fd;
  letter-spacing: 1px;
}

.hidden { display: none !important; }
.result-box {
  margin-top: 20px;
  padding: 20px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: #4ade80;
}

/* Login Overlay Styles */
.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-dark);
  background-image: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 400px),
                    radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.15), transparent 400px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.login-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
