﻿/* BlokjeKaas — Theme system */

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

:root {
  --radius: 10px;
  --radius-lg: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --accent: #5865F2;
  --accent-hover: #4752c4;
  --teal: #00D4AA;
  --warning: #fbbf24;
  --error: #ef4444;
  --success: #22c55e;
  --customer: #fbbf24;
}

/* Dark theme (default) */
[data-theme="dark"], :root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-2: #1a1a24;
  --surface-3: #22222e;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f0f0f5;
  --text-dim: #a0a0b0;
  --text-muted: #6b6b7b;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f5f5f8;
  --surface: #ffffff;
  --surface-2: #f0f0f3;
  --surface-3: #e8e8ed;
  --line: rgba(0, 0, 0, 0.1);
  --text: #0a0a0f;
  --text-dim: #5a5a6a;
  --text-muted: #8a8a9a;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

[data-theme="dark"] body, body:not([data-theme="light"]) {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(88, 101, 242, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 212, 170, 0.08), transparent),
    var(--bg);
}

[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(88, 101, 242, 0.04), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 212, 170, 0.03), transparent),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
code { font-family: Consolas, "Liberation Mono", monospace; font-size: 0.92em; }

/* Layout — shadcn/ui sidebar style */
:root {
  --sidebar-width: 16rem;
  --sidebar-width-icon: 3rem;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar base */
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  transition: width 0.2s ease;
  overflow: hidden;
  flex-shrink: 0;
}

[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.95);
}

[data-sidebar-state="collapsed"] .sidebar {
  width: var(--sidebar-width-icon);
}

/* Sidebar header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.bk-logo-img {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(88, 101, 242, 0.4));
}

.logo-text, .brand-name {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

[data-sidebar-state="collapsed"] .logo-text,
[data-sidebar-state="collapsed"] .sidebar-group-label,
[data-sidebar-state="collapsed"] [data-sidebar-label],
[data-sidebar-state="collapsed"] .user-info {
  display: none;
}

.sidebar-rail-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.15s ease;
}

[data-sidebar-state="collapsed"] .sidebar-rail-btn {
  margin: 0 auto;
}

.sidebar-rail-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Sidebar content */
.sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  overflow-y: auto;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-group-label {
  padding: 6px 12px 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.nav-item:hover {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active {
  border-color: rgba(88, 101, 242, 0.4);
  background: rgba(88, 101, 242, 0.12);
  color: var(--text);
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--teal);
  opacity: 0.8;
}

.nav-item.active .nav-icon {
  color: var(--accent);
  opacity: 1;
}

.nav-item:hover .nav-icon {
  color: var(--teal);
  opacity: 1;
}

[data-sidebar-state="collapsed"] .nav-item {
  justify-content: center;
  padding: 7px;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--line);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.user-avatar, .user-result-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  background-position: center;
  background-size: cover;
}

.user-info { min-width: 0; flex: 1; overflow: hidden; }
.user-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-status { color: var(--text-muted); font-size: 11px; }

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.theme-switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  transition: 0.2s ease;
  flex-shrink: 0;
}

.theme-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  transition: 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="light"] .theme-switch-track::after {
  left: 22px;
}

.theme-switch-icon {
  font-size: 14px;
  line-height: 1;
  transition: 0.2s ease;
}

.logout-btn, .close-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.15s ease;
  font-size: 12px;
}

.logout-btn:hover, .close-btn:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
  color: var(--text);
}

/* Sidebar trigger bar */
.sidebar-trigger-bar {
  display: flex;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 4px;
}

.sidebar-trigger {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.15s ease;
}

.sidebar-trigger:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Main content */
.main {
  min-width: 0;
  flex: 1;
  padding: 24px clamp(20px, 4vw, 48px);
  transition: margin-left 0.2s ease;
}

.tab-content { display: none; animation: fadeIn 0.18s ease; }
.tab-content.active { display: block; }

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

.page-header, .hero-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.page-header h1, .hero-header h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.1;
}

.page-header p, .hero-header p {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 15px;
}

/* Cards & sections */
.section, .panel-card, .login-card, .redeem-card, .join-card, .plan-card {
  padding: 22px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.section h2 { margin-bottom: 16px; font-size: 18px; font-weight: 800; }
.section h3 { margin-bottom: 8px; font-size: 16px; font-weight: 700; }
.section p { color: var(--text-dim); }

.stats-grid, .admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.stat-card, .metric-card {
  position: relative;
  min-height: 120px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.gradient-blue { background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), var(--surface)); }
.gradient-teal { background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), var(--surface)); }
.gradient-green { background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), var(--surface)); }
.gradient-red { background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), var(--surface)); }
.gradient-purple { background: linear-gradient(135deg, rgba(88, 101, 242, 0.25), var(--surface)); }

.stat-value, .metric-value {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label, .metric-label { color: var(--text-dim); font-size: 13px; font-weight: 600; }

/* Buttons */
.btn, .discord-btn, .cta-btn, .glow-button, .quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: 0.15s ease;
}

.btn-primary, .discord-btn, .glow-button, .cta-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover, .discord-btn:hover, .glow-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3);
}

.btn-secondary, .quiet-button, .cta-secondary {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.btn-secondary:hover, .quiet-button:hover {
  border-color: rgba(0, 212, 170, 0.4);
}

.btn-danger { background: var(--error); color: #fff; }
.btn-success { background: var(--success); color: #07130c; }
.btn-teal { background: var(--teal); color: #0a0a0f; }

.btn-link {
  color: var(--teal);
  font-size: 14px;
  font-weight: 700;
}

.btn-link:hover { color: #33e0bb; }

/* Forms */
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: 0.15s ease;
}

input, select { min-height: 42px; padding: 10px 12px; }
textarea { min-height: 90px; padding: 12px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.pin-generate-form, .key-input-group, .search-box, .toolbar-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pin-generate-form input, .key-input-group input, .search-box input { flex: 1; }

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.form-full { margin-bottom: 12px; }

.form-row label, .form-full label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
}

/* Tables */
.pins-table-wrapper, .scans-table-wrapper, .purchases-table-wrapper,
.keys-table-wrapper, .table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.data-table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.data-table tbody tr:last-child td { border-bottom: 0; }

.empty-state {
  padding: 32px 20px;
  color: var(--text-muted);
  text-align: center;
}

/* Badges */
.badge, .stat-badge, .sub-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-green, .sub-badge.active {
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: #6ee7a0;
}

.badge-yellow {
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
}

.badge-red, .stat-danger {
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.badge-gray, .sub-badge {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
}

.badge-blue {
  border: 1px solid rgba(88, 101, 242, 0.45);
  background: rgba(88, 101, 242, 0.15);
  color: #a5b4fc;
}

.badge-teal {
  border: 1px solid rgba(0, 212, 170, 0.4);
  background: rgba(0, 212, 170, 0.12);
  color: #5eead4;
}

.risk-score {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.risk-score.green { background: rgba(34, 197, 94, 0.12); color: #6ee7a0; }
.risk-score.yellow { background: rgba(251, 191, 36, 0.12); color: #fcd34d; }
.risk-score.red { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

/* Scans list */
.scans-list { display: grid; gap: 10px; }

.scan-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  transition: 0.15s ease;
}

.scan-item:hover {
  border-color: rgba(88, 101, 242, 0.4);
  transform: translateY(-1px);
}

.scan-verdict-badge {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
}

.scan-verdict-badge.clean { color: var(--success); }
.scan-verdict-badge.suspicious { color: var(--warning); }
.scan-verdict-badge.cheating { color: var(--error); }

.scan-info { min-width: 0; flex: 1; }
.scan-id { font-family: Consolas, monospace; font-size: 13px; font-weight: 700; }
.scan-meta { color: var(--text-muted); font-size: 12px; }
.scan-arrow { color: var(--text-muted); }

/* Subscription */
.subscription-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.sub-details { color: var(--text-dim); font-size: 14px; margin-top: 8px; }

/* Auth pages */
.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card, .redeem-card, .join-card {
  width: min(520px, 100%);
  padding: clamp(28px, 5vw, 40px);
}

.login-title { margin-bottom: 8px; font-size: 32px; font-weight: 900; }
.login-subtitle { margin-bottom: 24px; color: var(--text-dim); }

.error-msg {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: var(--radius);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.info-list, .steps {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.info-list h4 {
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-list ul { list-style: none; }
.info-list li { padding: 6px 0; color: var(--text-dim); }

.back-link, .logout-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.back-link:hover, .logout-link:hover { color: var(--text); }

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.user-badge img { width: 30px; height: 30px; border-radius: 50%; }

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.option-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  cursor: pointer;
  transition: 0.15s ease;
}

.option-card:hover {
  border-color: rgba(88, 101, 242, 0.45);
  transform: translateY(-1px);
}

.option-title { margin-bottom: 6px; font-size: 16px; font-weight: 800; }
.option-desc { color: var(--text-dim); font-size: 13px; }

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.step-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

/* PIN / Key alerts */
.new-pin-alert, .key-alert {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  animation: fadeIn 0.18s ease;
}

.new-pin-alert, .key-alert-success {
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
}

.key-alert-error {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.key-alert-info {
  border: 1px solid rgba(88, 101, 242, 0.4);
  background: rgba(88, 101, 242, 0.1);
}

.new-pin-label { color: var(--success); font-weight: 800; }

.new-pin-code, .data-table code, .key-redeem-card code {
  display: inline-block;
  margin: 8px 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 212, 170, 0.08);
  color: var(--teal);
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.new-pin-info { color: var(--text-muted); font-size: 12px; }

.generate-pin-card, .key-redeem-card { max-width: 720px; }

/* Management */
.management-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.12), rgba(0, 212, 170, 0.06));
}

.alert-card {
  display: block;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.alert-card.high { border-left-color: var(--error); }
.alert-card.medium { border-left-color: var(--warning); }
.alert-card.low { border-left-color: var(--teal); }
.alert-card.reviewed { opacity: 0.65; }

.user-result-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  transition: 0.15s ease;
  margin-bottom: 8px;
}

.user-result-card:hover {
  border-color: rgba(88, 101, 242, 0.4);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 4, 8, 0.8);
  backdrop-filter: blur(6px);
}

.modal-overlay.active { display: flex; }

.modal {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

/* Results */
.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
}

.result-summary { position: sticky; top: 20px; align-self: start; }

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.category-tab {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: 0.15s ease;
}

.category-tab:hover { border-color: rgba(88, 101, 242, 0.4); color: var(--text); }

.category-tab.active {
  border-color: var(--accent);
  background: rgba(88, 101, 242, 0.15);
  color: var(--text);
}

.category-panel { display: none; }
.category-panel.active { display: block; }

.category-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.category-card h3 { margin-bottom: 10px; font-size: 15px; }

.finding-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.finding-label { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.finding-value { overflow-wrap: anywhere; font-size: 14px; }

.finding-row.flagged .finding-value { color: var(--error); }
.finding-row.warn .finding-value { color: var(--warning); }
.finding-row.ok .finding-value { color: var(--text); }

/* Shop plans */
.plan-card {
  padding: 24px;
  text-align: center;
}

.plan-card.featured {
  border-color: rgba(0, 212, 170, 0.45);
  background: linear-gradient(180deg, rgba(0, 212, 170, 0.1), var(--surface));
}

.plan-name { margin-bottom: 8px; font-size: 18px; font-weight: 800; }
.plan-price { margin: 16px 0; font-size: 36px; font-weight: 900; }
.plan-price span { color: var(--text-muted); font-size: 14px; }
.plan-features { list-style: none; margin: 16px 0; text-align: left; }
.plan-features li { padding: 6px 0; color: var(--text-dim); font-size: 14px; }
.plan-features li::before { content: "✓ "; color: var(--teal); font-weight: 800; }

.soft-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.1);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.soft-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
}

.simple-nav, .bk-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .simple-nav, [data-theme="light"] .bk-nav {
  background: rgba(255, 255, 255, 0.9);
}

.page-container { width: min(1100px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 48px; }

.bk-brand, .site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
}

.bk-brand span span { color: var(--teal); }

.bk-links, .nav-actions { display: flex; align-items: center; gap: 20px; }
.bk-links a, .nav-actions a { color: var(--text-dim); font-weight: 600; font-size: 14px; }
.bk-links a:hover, .nav-actions a:hover { color: var(--text); }

.nav-pill {
  padding: 8px 14px;
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: var(--radius);
  background: rgba(88, 101, 242, 0.12);
  color: var(--text) !important;
}

.key-output {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-family: Consolas, monospace;
  font-size: 13px;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.25s ease;
  max-width: 400px;
}

.toast.confirm {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.toast-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.toast.confirm .toast-confirm-actions button {
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: 0.15s ease;
}

.toast.confirm .toast-confirm-actions button:hover {
  border-color: var(--accent);
}

.toast.confirm .toast-confirm-actions button.danger {
  background: var(--error);
  color: white;
  border-color: var(--error);
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--error); }
.toast.warning { border-color: var(--warning); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.out {
  animation: toast-out 0.2s ease forwards;
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

@media (max-width: 1100px) {
  .stats-grid, .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .result-layout { grid-template-columns: 1fr; }
  .result-summary { position: static; }
}

@media (max-width: 820px) {
  .app { flex-direction: column; }
  .sidebar { position: relative; width: 100% !important; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  [data-sidebar-state="collapsed"] .sidebar { width: 100% !important; }
  [data-sidebar-state="collapsed"] .logo-text,
  [data-sidebar-state="collapsed"] .sidebar-group-label,
  [data-sidebar-state="collapsed"] [data-sidebar-label],
  [data-sidebar-state="collapsed"] .user-info { display: block; }
  [data-sidebar-state="collapsed"] .nav-item { justify-content: flex-start; padding: 7px 10px; }
  .sidebar-rail-btn { display: none; }
  .sidebar-trigger-bar { display: none; }
  .main { padding: 20px 16px 32px; }
  .page-header, .hero-header, .subscription-card { flex-direction: column; align-items: stretch; }
  .plans-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .stats-grid, .admin-grid, .options-grid, .form-row { grid-template-columns: 1fr; }
  .pin-generate-form, .key-input-group, .search-box, .toolbar-row { flex-direction: column; align-items: stretch; }
  .btn, .discord-btn { width: 100%; }
}

/* Cookie consent banner — bottom bar, non-blocking */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  font-size: 13px;
  animation: cookie-in 0.3s ease;
}

.cookie-banner p {
  color: var(--text-dim);
  margin: 0;
  flex: 1;
}

.cookie-banner .btn {
  flex-shrink: 0;
  min-height: 34px;
  padding: 7px 16px;
  font-size: 13px;
}

@keyframes cookie-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 12px 16px;
  }
}
