:root {
  --primary: #4b5dff;
  --primary-dark: #2f3dce;
  --accent: #ff6b6b;
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --success: #22c55e;
  --warning: #f97316;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(160deg, #0f172a 0%, #111827 30%, #0f172a 100%);
  color: var(--text);
  min-height: 100vh;
}
a {
  color: inherit;
  text-decoration: none;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(16px, 5vw, 64px);
  position: sticky;
  top: 0;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.logo {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
nav a {
  margin-left: 24px;
  font-weight: 500;
  color: var(--text-muted);
}
nav a.active,
nav a:hover {
  color: var(--text);
}
.hero {
  padding: clamp(48px, 12vw, 160px) clamp(16px, 6vw, 120px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  margin-bottom: 16px;
}
.hero-content p {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  line-height: 1.6;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
  box-shadow: 0 16px 30px rgba(75, 93, 255, 0.35);
}
/* Accessible focus styles */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.25);
}
.section {
  padding: clamp(48px, 8vw, 120px) clamp(16px, 6vw, 120px);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 3vw, 36px);
}
.card {
  background: rgba(30, 41, 59, 0.85);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card h3 {
  margin: 0 0 12px;
}
.card p {
  color: var(--text-muted);
  line-height: 1.5;
}
.ledger-section {
  background: rgba(15, 23, 42, 0.4);
}
.ledger-headline {
  max-width: 720px;
  margin-bottom: 32px;
}
.ledger-headline h2 {
  margin: 12px 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.ledger-headline p {
  color: var(--text-muted);
  line-height: 1.6;
}
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.ledger-card {
  min-height: 0;
  gap: 16px;
}
.flow-list,
.ledger-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-muted);
}
.flow-list li,
.ledger-points li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.flow-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
  min-width: 64px;
}
.ledger-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ledger-meta .meta-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.form-card {
  max-width: 520px;
  margin: 48px auto;
  background: rgba(30, 41, 59, 0.9);
  padding: clamp(24px, 4vw, 36px);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}
form input,
form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  margin-bottom: 18px;
}
.alert {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-weight: 500;
}
.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: var(--success);
}
.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--accent);
}
.table-wrapper {
  background: rgba(17, 24, 39, 0.75);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead {
  background: rgba(30, 41, 59, 0.9);
}
th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
th {
  font-weight: 600;
  letter-spacing: 0.02em;
}
tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}
data-grid {
  display: grid;
  gap: 16px;
}
.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(16px, 3vw, 28px);
}
.stat-card {
  background: rgba(30, 41, 59, 0.9);
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.stat-card h4 {
  margin: 0 0 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
}
footer {
  padding: 48px clamp(16px, 5vw, 80px);
  text-align: center;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.85);
}
.notice {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-auth .user-chip {
  background: rgba(59, 130, 246, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
}
.nav-auth button {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-auth button:hover {
  border-color: rgba(255, 255, 255, 0.6);
}
.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}
.qr-wrapper img {
  max-width: 220px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: white;
}
.alert-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}
.card-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  gap: 10px;
}
.card-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.grid-three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(16px, 3vw, 24px);
}
.search-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}
.search-bar input[type="search"] {
  flex: 1;
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
}
.ngo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.ngo-card {
  background: rgba(30, 41, 59, 0.9);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
}
.ngo-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.ngo-card__claim {
  font-family: 'Inter', monospace;
  font-size: 0.8rem;
  background: rgba(148, 163, 184, 0.1);
  padding: 6px 10px;
  border-radius: 10px;
}
.ngo-card__description {
  color: var(--text-muted);
  line-height: 1.5;
}
.ngo-card__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0;
}
.ngo-card__facts dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ngo-card__facts dd {
  margin: 0;
  font-size: 0.95rem;
}
.ngo-card__section h4 {
  margin: 0 0 6px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ngo-card__section p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.4;
}
.ngo-card__section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}
.ngo-card__footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}
.loading,
.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.empty-state h3 {
  margin-bottom: 8px;
}
.empty-state p {
  margin: 0;
  color: var(--text-muted);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 12px;
}
.back-link:hover {
  color: var(--text);
}
.opt-badge {
  margin-bottom: 20px;
  display: inline-flex;
}
.opt-badge--danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 0;
}
.data-grid div {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.55);
}
.data-grid dt {
  margin: 0 0 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.data-grid dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}
.lead {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}
.meta-heading {
  margin: 16px 0 6px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.code-block {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  overflow-x: auto;
}

/* Analytics Sidebar Navigation */
.analytics-sidebar {
  transition: all 0.3s ease;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.sidebar-link:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.3);
}

.sidebar-link.active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

/* Sortierbare Tabellen */
.sortable-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
  position: relative;
}

.sortable-table th.sortable:hover {
  background: rgba(59, 130, 246, 0.15);
}

.sortable-table .sort-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.sortable-table th.sortable:hover .sort-icon {
  color: #60a5fa;
}

/* Table Controls */
.table-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.table-controls input[type="text"] {
  transition: all 0.2s ease;
}

.table-controls input[type="text"]:focus {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(30, 41, 59, 0.95);
}

.table-controls select {
  transition: all 0.2s ease;
}

.table-controls select:focus {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(30, 41, 59, 0.95);
}

/* Pagination Info */
.pagination-info {
  text-align: right;
  font-style: italic;
}

/* Table Section Transitions */
.table-section {
  animation: fadeIn 0.3s ease;
}

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

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .section {
    flex-direction: column;
  }

  .analytics-sidebar {
    position: static;
    min-width: 100%;
    margin-bottom: 24px;
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .sidebar-link {
    white-space: nowrap;
  }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .table-controls input[type="text"],
  .table-controls select {
    width: 100%;
  }
}
