:root {
  --bg-deep: #07080a;
  --bg-surface: #0d0f13;
  --bg-elevated: #141720;
  --bg-card: #181c25;
  --border-subtle: #1e2330;
  --border-accent: #2a3045;
  --text-primary: #e8eaf0;
  --text-secondary: #8890a4;
  --text-muted: #555d73;
  --accent-primary: #ff3b3b;
  --accent-glow: #ff3b3b33;
  --accent-green: #22c55e;
  --accent-green-glow: #22c55e33;
  --accent-red: #ff3b3b;
  --accent-amber: #f59e0b;
  --accent-blue: #3b82f6;
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { background: var(--bg-deep); }

body {
  font-family: var(--font-display);
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: #ff3b3b; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Toast */
.toast {
  position: fixed; top: 70px; right: 20px;
  padding: 12px 20px; border-radius: 8px;
  font-size: 14px; z-index: 1000;
  animation: slideIn 0.3s ease;
}
.toast--success { background: #22c55e22; border: 1px solid var(--accent-green); color: var(--accent-green); }
.toast--error { background: #ff3b3b22; border: 1px solid var(--accent-red); color: var(--accent-red); }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Layout */
.page-center {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 40px 20px;
}
.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }

/* Header */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.header-brand {
  font-family: var(--font-mono);
  font-size: 16px; font-weight: 600;
  color: var(--text-primary);
}
.logo-icon-sm {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #ff3b3b, #cc2020);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.7rem;
  color: white; box-shadow: 0 0 24px rgba(255,59,59,0.4);
}
.logo-text-nav { font-family: var(--font-mono); font-weight: 600; font-size: 1.1rem; color: var(--text-primary); }
.logo-text-nav .muted { color: var(--text-muted); font-weight: 400; }
.logo-icon-sm {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #ff3b3b, #cc2020);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.7rem;
  color: white; box-shadow: 0 0 24px rgba(255,59,59,0.4);
}
.logo-text-nav { font-family: var(--font-mono); font-weight: 600; font-size: 1.1rem; color: var(--text-primary); }
.logo-text-nav .muted { color: var(--text-muted); font-weight: 400; }
.header-nav { display: flex; gap: 24px; align-items: center; }
.header-nav a {
  color: var(--text-secondary); font-size: 14px;
  transition: color 0.2s;
}
.header-nav a:hover, .header-nav a.active { color: var(--text-primary); text-decoration: none; }
.header-user { color: var(--text-muted); font-size: 13px; }

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}
.card-title {
  font-size: 18px; font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Auth card */
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 36px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo h1 {
  font-family: var(--font-mono);
  font-size: 24px;
  color: #ff3b3b;
}
.auth-logo p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Tabs */
.tabs {
  display: flex; gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.tab {
  flex: 1; padding: 10px;
  text-align: center; cursor: pointer;
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none; border-top: none; border-left: none; border-right: none;
}
.tab.active { color: #ff3b3b; border-bottom-color: #ff3b3b; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-display);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: #ff3b3b; }
.form-input::placeholder { color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all 0.2s;
  font-family: var(--font-display);
}
.btn-primary {
  background: #ff3b3b;
  color: #fff;
  width: 100%;
}
.btn-primary:hover { background: #e03030; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
}
.btn-secondary:hover { border-color: var(--text-muted); }
.btn-danger {
  background: #ff3b3b22;
  color: var(--accent-red);
  border: 1px solid #ff3b3b44;
}
.btn-danger:hover { background: #ff3b3b33; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Code blocks */
.code-block {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  margin: 12px 0;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}
.code-body {
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-secondary);
  max-height: 200px;
  overflow-y: auto;
}

/* License key display */
.license-key {
  background: var(--bg-deep);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  position: relative;
}
.license-key-value {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  color: var(--text-primary);
  max-height: 120px;
  overflow-y: auto;
  padding-right: 60px;
}
.license-key .copy-btn {
  position: absolute;
  top: 12px; right: 12px;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge--active { background: #3b82f622; color: var(--accent-blue); }
.badge--expired { background: #ff3b3b22; color: var(--accent-red); }
.badge--pending { background: #f59e0b22; color: var(--accent-amber); }

/* Info rows */
.info-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); }
.info-value { color: var(--text-primary); font-family: var(--font-mono); font-size: 13px; }

/* Textarea */
.form-textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  resize: vertical;
  min-height: 120px;
}
.form-textarea:focus { border-color: #ff3b3b; }

/* Loading */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border-accent);
  border-top-color: #ff3b3b;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 600px) {
  .header { flex-direction: column; gap: 12px; }
  .header-nav { gap: 16px; }
  .card { padding: 20px; }
  .info-row { flex-direction: column; gap: 4px; }
}
