/* admin.css – KFZ-Tiny License Admin */

/* Grundfarben / Design */
:root {
  --bg: #050816;
  --bg-elevated: #0b1625;
  --bg-elevated-2: #111827;
  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #ef4444;
  --success: #22c55e;
  --border-subtle: #1f2933;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 35px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 50%, #000 100%);
  color: var(--text-main);
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: #020617;
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.topbar-title {
  font-weight: 600;
  font-size: 15px;
}

.topbar-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.topbar-nav a {
  color: var(--text-muted);
  font-weight: 500;
}
.topbar-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Seitenlayout */
.page {
  padding: 32px 24px 40px;
}

.page-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Überschriften & Texte */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
}

h1.page-title {
  font-size: 26px;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Karten */
.card {
  background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--bg-elevated-2) 100%);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.9);
}

.card-title {
  font-size: 18px;
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Dashboard-Statistik */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
  margin-bottom: 28px;
}

.metric-number {
  font-size: 32px;
  font-weight: 700;
  margin-top: 18px;
}

/* Aktionen */
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

/* Buttons */
.btn {
  border-radius: 999px;
  padding: 8px 18px;
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: var(--accent);
  color: #020617;
  font-weight: 600;
}
.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--text-main);
}
.btn-secondary:hover {
  border-color: var(--accent);
}

/* Tabellen (Codes-Liste) */
.table-card {
  margin-top: 28px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table thead {
  background: rgba(15, 23, 42, 0.95);
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.table th {
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
}

.table tr:nth-child(even) td {
  background-color: rgba(15, 23, 42, 0.75);
}

/* Status-Badges */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
}

.badge-success {
  background: rgba(34, 197, 94, 0.14);
  color: var(--success);
}

/* Formulare (Login / Neuer Code / Tools) */
.form-card {
  max-width: 640px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row label {
  font-size: 13px;
  color: var(--text-muted);
}

input[type="text"],
input[type="password"],
select,
textarea {
  border-radius: 10px;
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-main);
  font-size: 14px;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

/* Flash-Meldungen */
.flash-container {
  margin-bottom: 14px;
}

.flash {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
}

.flash.success {
  background: rgba(34, 197, 94, 0.09);
  color: var(--success);
}

.flash.error {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 10px 24px 14px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: rgba(3, 7, 18, 0.95);
}

/* Login-Spezial */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

/* Mobil */
@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .topbar-nav {
    gap: 12px;
    flex-wrap: wrap;
  }

  .page {
    padding: 24px 14px 32px;
  }
}
.page-header {
  margin-bottom: 24px;
}

.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.code-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #0ea5e9; /* dein Türkis */
  color: #0b1020;
  font-weight: 600;
  font-size: 0.9rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px;
  margin-bottom: 24px;
}

.detail-list {
  margin: 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-row dt {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.detail-row dd {
  margin: 0;
  text-align: right;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.actions {
  display: flex;
  gap: 12px;
}

.code-link {
  text-decoration: none;
  font-weight: 600;
}

.code-link:hover {
  text-decoration: underline;
}
.codes-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-form input[type="text"] {
  min-width: 260px;
}

.btn-reset {
  opacity: 0.8;
}

.btn-reset:hover {
  opacity: 1;
}
