:root {
  --bg: #f6f4ec;
  --surface: #ffffff;
  --surface-soft: #fbf9f2;
  --ink: #0a0a0a;
  --muted: #696866;
  --line: #e8e3d7;
  --line-strong: #d6cfbe;
  --lime: #d4fb4f;
  --lime-soft: #f2fbd0;
  --blue: #2f40e8;
  --blue-dark: #202ab6;
  --red-soft: #f8d8d5;
  --red: #9d2929;
  --orange-soft: #fde5c7;
  --orange: #8a4b17;
  --violet-soft: #e4dbff;
  --violet: #4d368e;
  --green-soft: #dbf3d2;
  --green: #316f26;
  --shadow: 0 18px 55px rgba(10, 10, 10, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
a { color: inherit; }

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.spark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--lime);
  color: var(--ink);
  font-size: 17px;
}

/* Auth */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(460px, 1.05fr);
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  background: #090909;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.auth-side::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -190px;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(212, 251, 79, 0.22), transparent 64%);
}

.claim {
  max-width: 560px;
  font-size: 40px;
  line-height: 1.13;
  font-weight: 800;
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
}
.claim span { color: var(--lime); }

.proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  position: relative;
  z-index: 1;
}
.proof b { display: block; color: var(--lime); font-size: 28px; }
.proof span { color: #b8b8b8; font-size: 13px; }

.auth-form { display: grid; place-items: center; padding: 48px; }
.form-card { width: min(430px, 100%); }

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: 38px; line-height: 1.07; letter-spacing: -0.04em; }
h2 { margin-bottom: 8px; font-size: 26px; line-height: 1.14; letter-spacing: -0.03em; }
.sub { color: var(--muted); }

/* Form */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label, .field > span { color: #171717; font-size: 13px; font-weight: 650; }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 14px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.textarea { min-height: 104px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(10, 10, 10, 0.06);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #222; }
.btn.lime { background: var(--lime); border-color: #c8ed45; color: var(--ink); }
.btn.danger { background: var(--red-soft); border-color: #f0bfbb; color: var(--red); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 34px; padding: 7px 13px; font-size: 12px; }

.link { color: var(--blue); font-weight: 750; text-decoration: none; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 13px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* App shell */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 64px 1fr auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 244, 236, 0.94);
  backdrop-filter: blur(16px);
}
.grow { flex: 1; }

.connected {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 750;
  font-size: 13px;
}
.connected i {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.account-btn {
  justify-content: flex-start;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  font-size: 13px;
}
.account-btn span { display: block; color: #bebebe; font-size: 11px; font-weight: 500; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #e9d8c4;
  border: 1px solid rgba(10, 10, 10, 0.12);
  font-weight: 850;
  font-size: 13px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* Sidebar layout */
.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

.nav-section {
  padding: 6px 8px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 12px;
}
.nav-section:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
  transition: background 0.1s, color 0.1s;
}
.nav-item:hover { background: var(--surface-soft); color: var(--ink); }
.nav-item.active { background: var(--lime-soft); color: var(--ink); border: 1px solid #e1f08c; }
.nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; }

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
}
.nav-badge.ok { background: var(--lime-soft); color: var(--green); }

/* sidebar nav wrapper — transparent on desktop, scrollable on mobile */
.sidebar-nav { display: contents; }

/* sidebar bottom pinned section */
.sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  margin-top: 4px;
}
.sidebar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e9d8c4;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 850;
  flex: none;
}
.sidebar-user-email {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 142px;
}
.sidebar-logout {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.sidebar-logout:hover { color: var(--ink); }

/* Main content */
.main {
  min-width: 0;
  padding: 30px 36px;
}

/* Panel / Box */
.panel {
  width: min(760px, 100%);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(10, 10, 10, 0.04);
}

.box {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid #e1f08c;
  border-radius: 14px;
  background: var(--lime-soft);
  font-size: 13px;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* Stat cards */
.stat-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.stat-card .count {
  font-size: 36px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
  margin-bottom: 4px;
}
.stat-card .label { color: var(--muted); font-size: 13px; }

a.stat-card { text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
a.stat-card:hover { border-color: var(--ink); box-shadow: 0 2px 10px rgba(10,10,10,0.09); }
.stat-card.orange { border-color: #fde5c7; }
.stat-card.green  { border-color: #b6e6a8; }
.stat-card.red    { border-color: #f0bfbb; }
.stat-card .stat-icon { font-size: 20px; margin-bottom: 10px; line-height: 1; }
.stat-card .stat-desc { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Customer hero banner */
.cust-hero {
  background: linear-gradient(135deg, var(--lime-soft) 0%, #fff 65%);
  border: 1px solid var(--lime);
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cust-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.cust-hero-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}
.cust-hero-sub { color: var(--muted); font-size: 14px; max-width: 440px; }
.cust-section-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cust-section-hd strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cust-section-hd strong::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--lime);
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.cust-section-hd .sub { font-size: 12px; }
.cust-page-intro {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-left: 16px;
  border-left: 4px solid var(--lime);
}
.cust-page-intro h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}
.cust-page-intro .sub { font-size: 13px; color: var(--muted); }
.scan-step-badge {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--lime); color: var(--ink);
  font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.review-row.status-pending { border-left: 3px solid var(--orange); }
.review-row.status-success { border-left: 3px solid var(--green); }
.review-row.status-failed  { border-left: 3px solid #d48884; }
@media (max-width: 640px) {
  .cust-hero { padding: 20px; }
  .cust-hero-title { font-size: 22px; }
}

/* Scan page: sticky mobile submit bar */
.scan-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.10);
  padding: 12px 16px;
  z-index: 30;
  align-items: center;
  gap: 12px;
}
.scan-mobile-bar .mobile-bar-count {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  font-weight: 600;
}
@media (max-width: 900px) {
  .scan-mobile-bar { display: flex; }
  #results-section { padding-bottom: 76px; }
  .scan-filters-bar { top: 56px; }
}

/* Search */
.search { position: relative; margin: 18px 0 12px; }
.search input { padding-left: 44px; height: 46px; }
.search::before {
  content: "⌕";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-52%);
  color: var(--muted);
  font-size: 22px;
}

/* Filters bar */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.filters .input {
  min-width: 160px;
  flex: 1;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 8px 12px;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.12s, background 0.12s;
}
.chip:hover { border-color: var(--line-strong); }
.chip.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip.green { border-color: #b6e6a8; background: var(--green-soft); color: var(--green); }
.chip.red { border-color: #f0bfbb; background: var(--red-soft); color: var(--red); }
.chip.orange { border-color: #f9d5a3; background: var(--orange-soft); color: var(--orange); }
.chip.green-hint  { border-color: #b6e6a8; color: var(--green); }
.chip.green-hint:hover  { background: var(--green-soft); }
.chip.red-hint    { border-color: #f0bfbb; color: var(--red); }
.chip.red-hint:hover    { background: var(--red-soft); }
.chip.orange-hint { border-color: #fde5c7; color: var(--orange); }
.chip.orange-hint:hover { background: var(--orange-soft); }

/* Chip-style select wrapper */
.chip-select {
  position: relative;
  display: inline-flex;
  margin-left: auto;
}
.chip-select::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 11px;
  color: var(--muted);
  font-weight: 900;
}
.chip-select select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 34px;
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.12s;
  min-width: 160px;
  max-width: none;
}
.chip-select select:hover { border-color: var(--line-strong); }
.chip-select select:focus { border-color: var(--ink); }
.chip-select.has-value select { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip-select.has-value::after { color: rgba(255,255,255,0.6); }

/* Tags */
.tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.orange { background: var(--orange-soft); color: var(--orange); }
.tag.violet { background: var(--violet-soft); color: var(--violet); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.blue { background: #dbeafe; color: #1d4ed8; }
.tag.gray { background: #f3f4f6; color: #4b5563; }

/* Status badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.status.sm { padding: 2px 8px; font-size: 11px; }
.status.pending { background: var(--orange-soft); color: var(--orange); }
.status.success { background: var(--green-soft); color: var(--green); }
.status.failed { background: var(--red-soft); color: var(--red); }
.status.created { background: #f3f4f6; color: #4b5563; }
.status.invited { background: var(--violet-soft); color: var(--violet); }
.status.registered { background: var(--green-soft); color: var(--green); }
.status.geblockt { background: var(--red-soft); color: var(--red); }

/* Status history row */
.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
  flex-wrap: wrap;
}

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--surface-soft); }

/* Review row */
.review-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  margin-bottom: 10px;
}
.review-row:hover { border-color: var(--ink); }
.review-row.is-selected { background: var(--lime-soft); border-color: #c8ed45; }
.review-row.no-click { cursor: default; }
.review-row.no-click:hover { border-color: var(--line); }

.review-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e9d8c4;
  font-weight: 850;
  flex: none;
  font-size: 13px;
}

.review-text { margin: 6px 0 8px; color: #1e1e1e; line-height: 1.5; }

.check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1.5px solid #c9c3b8;
  border-radius: 6px;
  background: #fff;
  color: transparent;
  font-weight: 950;
  flex: none;
  font-size: 12px;
}
.is-selected .check {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--lime);
}

.stars { color: #f4a800; letter-spacing: 1px; white-space: nowrap; }

/* Tags row */
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* View toggle */
.view-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.view-toggle button {
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  font-weight: 800;
  font-size: 13px;
}
.view-toggle button.active { background: var(--ink); color: #fff; }

/* Card view */
.card-stage {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 18px;
  padding-top: 16px;
}
.round-action {
  width: 60px;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}
.round-action.pick { border-color: #e1f08c; background: var(--lime-soft); }

.big-review {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid #e1f08c;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 5px var(--lime-soft), var(--shadow);
}

/* Timeline */
.timeline { display: grid; gap: 0; }
.timeline-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.timeline-step::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 38px;
  bottom: -10px;
  width: 2px;
  background: var(--line);
}
.timeline-step:last-child::after { display: none; }
.timeline-step i {
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 850;
}
.timeline-step.todo i { border: 1px solid var(--line-strong); background: #fff; color: var(--muted); }

/* Upload area */
.upload {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 90px;
  padding: 18px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

/* Mark / icon box */
.mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f2f0e7;
  font-size: 16px;
  font-weight: 850;
  flex: none;
}

/* Scan loading */
.scan-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 24px;
  text-align: center;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Flash messages */
.flash-messages { margin-bottom: 18px; }
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.flash.success { background: var(--green-soft); color: var(--green); border: 1px solid #b6e6a8; }
.flash.error { background: var(--red-soft); color: var(--red); border: 1px solid #f0bfbb; }
.flash.info { background: var(--violet-soft); color: var(--violet); border: 1px solid #cfc2f5; }

/* Footer */
.footer {
  display: flex;
  justify-content: center;
  gap: 38px;
  padding: 16px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer b { color: var(--ink); }

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-header h2 { margin-bottom: 4px; }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 36px; }

/* Method/business cards */
.method-card, .business-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  margin-bottom: 10px;
}
.method-card:hover, .business-card:hover { border-color: var(--ink); }
.method-card.selected, .business-card.selected {
  border-color: var(--ink);
  background: var(--lime-soft);
}

/* Responsive */
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { flex-wrap: wrap; height: auto; padding: 14px 18px; }
  .main { padding: 22px 16px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { min-height: 260px; padding: 32px; }
  .auth-form { padding: 32px 24px; }
  .claim { font-size: 30px; }
  .proof b { font-size: 22px; }
}

@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .card-stage { grid-template-columns: 48px 1fr 48px; }
  .auth-side { min-height: 200px; padding: 24px 20px; }
  .auth-form { padding: 24px 16px; }
  .claim { font-size: 24px; }
  .proof { gap: 12px; }
  .proof b { font-size: 20px; }
  .cust-hero { flex-direction: column; align-items: stretch; gap: 16px; }
  .cust-hero > .btn { text-align: center; justify-content: center; }
  .detail-stats-row { grid-template-columns: repeat(2, 1fr); }
  .list-toolbar { flex-direction: column; align-items: stretch; }
  .list-toolbar .row { flex-wrap: wrap; }
  .btn.wide { width: 100%; justify-content: center; }
  .page-header { flex-direction: column; gap: 10px; }
  .page-header > .btn, .page-header > a.btn { align-self: flex-start; }
  .avatar { display: none; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.5);
  display: none;
  place-items: center;
  z-index: 50;
  padding: 20px;
}
.modal-overlay.open {
  display: grid;
}
.modal {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  width: min(480px, 100%);
  box-shadow: var(--shadow);
}
.modal h3 { margin-bottom: 16px; }

/* Inline edit helper */
.meta { min-width: 0; flex: 1; }
.meta b { display: block; }
.meta span { display: block; color: var(--muted); font-size: 13px; }

/* ── Hamburger / Mobile Nav ─────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex: none;
}
.hamburger span {
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  display: block;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.4);
  z-index: 19;
}
.sidebar-backdrop.visible { display: block; }

@media (max-width: 1100px) {
  .hamburger { display: flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 240px;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    overflow-y: auto;
  }
  .sidebar.open {
    display: flex !important;
    transform: translateX(0);
  }
  .sidebar-user-email { max-width: 160px; }
  .sidebar { overflow: hidden; padding: 0; }
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    padding: 22px 16px 8px;
  }
  .sidebar-bottom {
    flex-shrink: 0;
    margin-top: 0;
    padding: 8px 16px 16px;
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
}

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--ink); font-weight: 700; }

/* ── Form Validation States ─────────────────────────────────────── */
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(157,41,41,0.08);
}
.field-error { color: var(--red); font-size: 12px; font-weight: 700; margin-top: 4px; }
.field.has-success .input { border-color: var(--green); }

/* ── Expand / Collapse Review Text ──────────────────────────────── */
.review-text-wrap { position: relative; }
.review-text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.expand-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  padding: 2px 0;
  margin-top: 2px;
  display: block;
}
.expand-btn:hover { text-decoration: underline; }

/* ── Pagination ─────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pagination .page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
.pagination .page-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.pagination .page-btn:hover:not(.active) { border-color: var(--ink); }
.pagination .page-btn.disabled { opacity: 0.4; pointer-events: none; }
.pagination .page-ellipsis { color: var(--muted); padding: 0 4px; }

/* ── Table Scroll Hint ──────────────────────────────────────────── */
.table-scroll-wrap {
  position: relative;
  overflow: hidden;
}
.table-scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
  pointer-events: none;
  border-radius: 0 16px 16px 0;
}
.table-scroll-wrap .table-wrap {
  overflow-x: auto;
  scroll-behavior: smooth;
}

/* ── Password Strength Meter ────────────────────────────────────── */
.pw-strength { margin-top: 8px; }
.pw-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 5px;
}
.pw-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  transition: background 0.2s;
}
.pw-bar.weak { background: var(--red); }
.pw-bar.fair { background: var(--orange); }
.pw-bar.good { background: #e6c027; }
.pw-bar.strong { background: var(--green); }
.pw-label { font-size: 12px; font-weight: 700; color: var(--muted); }

/* ── Admin Search Bar ───────────────────────────────────────────── */
.list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.list-toolbar .input {
  flex: 1;
  min-width: 200px;
  height: 42px;
  padding: 10px 14px;
}

/* ── Flash close button ─────────────────────────────────────────── */
.flash { justify-content: space-between; }
.flash-close {
  background: none;
  border: none;
  font-size: 16px;
  opacity: 0.6;
  cursor: pointer;
  padding: 0 4px;
  flex: none;
}
.flash-close:hover { opacity: 1; }

/* ── Copy link box ──────────────────────────────────────────────── */
.copy-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--lime-soft);
  border: 1px solid #e1f08c;
  border-radius: 12px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  word-break: break-all;
}
.copy-link-box button {
  flex: none;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* ── Stat card with delta ───────────────────────────────────────── */
.stat-delta {
  font-size: 12px;
  color: var(--green);
  font-weight: 700;
}
.stat-delta.zero { color: var(--muted); }

/* ── Business card clickable ────────────────────────────────────── */
.business-card.link-card { cursor: pointer; text-decoration: none; display: flex; }
.business-card.link-card:hover { border-color: var(--ink); background: var(--surface-soft); }

/* ── Selectable business card (scan page) ───────────────────────── */
.business-card.selectable-biz:hover { border-color: var(--ink); }
.business-card.selectable-biz.selected { border-color: var(--ink); background: var(--lime-soft); }
.business-card .check { border-color: transparent; background: transparent; }
.business-card.selected .check { border-color: var(--ink); background: var(--ink); color: var(--lime); }

/* ── Filters search with icon ───────────────────────────────────── */
.filters-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.filters-search::before {
  content: "⌕";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-52%);
  color: var(--muted);
  font-size: 20px;
  pointer-events: none;
}
.filters-search .input {
  padding-left: 36px;
  height: 38px;
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
}

/* ── Error pages ────────────────────────────────────────────────── */
.error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 40px 20px;
}
.error-card {
  text-align: center;
  max-width: 440px;
  padding: 48px 36px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.error-code {
  font-size: 80px;
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}
.error-card .logo { margin: 0 auto 28px; display: inline-flex; }

/* ── Import ─────────────────────────────────────────────────────── */
.import-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.import-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-right: 1px solid var(--line);
  transition: background 0.15s;
  cursor: default;
}
.import-step:last-child { border-right: 0; }
.import-step .step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.import-step.active { color: var(--ink); background: var(--surface-soft); }
.import-step.active .step-num { background: var(--ink); color: #fff; }
.import-step.done { color: var(--green); }
.import-step.done .step-num { background: var(--green); color: #fff; }

.drop-zone {
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--ink);
  background: var(--surface-soft);
}
.drop-zone .drop-icon {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.5;
}
.drop-zone b { display: block; margin-bottom: 4px; font-size: 15px; }
.drop-zone input[type=file] { display: none; }

.mapping-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.mapping-row {
  display: contents;
}
.mapping-row > div {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mapping-row:last-child > div { border-bottom: 0; }
.mapping-row > div:first-child {
  background: var(--surface-soft);
  font-weight: 600;
  border-right: 1px solid var(--line);
}
.mapping-row > div .select {
  width: 100%;
  height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}
.mapping-header > div {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 8px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}
.mapping-header > div:first-child { border-right: 1px solid var(--line); }

.preview-mini {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 20px;
}
.preview-mini table { width: 100%; border-collapse: collapse; }
.preview-mini th {
  background: var(--surface-soft);
  padding: 7px 10px;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.preview-mini td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-mini tr:last-child td { border-bottom: 0; }
.preview-mini .enc-cell { color: var(--muted); font-style: italic; }

.import-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.import-stat {
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.import-stat .num { font-size: 28px; font-weight: 900; letter-spacing: -0.04em; }
.import-stat .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.import-stat.green .num { color: var(--green); }
.import-stat.orange .num { color: var(--orange); }
.import-stat.red .num { color: var(--red); }

/* ── Customer detail page ───────────────────────────────────────── */
.detail-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.detail-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.detail-stat.green { border-color: var(--green-soft); background: var(--green-soft); }
.detail-stat.orange { border-color: #fde8cc; background: #fff8f0; }
.detail-stat-val {
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
}
.detail-stat.green .detail-stat-val { color: var(--green); }
.detail-stat.orange .detail-stat-val { color: var(--orange); }
.detail-stat-lbl { font-size: 11px; color: var(--muted); font-weight: 600; }

.detail-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}
.detail-field-lbl {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .detail-stats-row { grid-template-columns: repeat(2, 1fr); }
  .detail-main-grid { grid-template-columns: 1fr; }
}

/* ── Customer typeahead dropdown ───────────────────────────────── */
.cust-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 200;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}
.cust-item {
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.cust-item:last-child { border-bottom: 0; }
.cust-item:hover { background: var(--bg-soft); }
.cust-item.muted { color: var(--muted); cursor: default; }

/* ── Scan page: two-column results layout ──────────────────────── */
.scan-results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 20px;
  align-items: start;
}

.scan-price-col {
  position: sticky;
  top: 80px;
}

/* Compact review rows (scan list) */
.review-row.compact {
  padding: 12px 14px;
  gap: 10px;
  margin-bottom: 8px;
  border-radius: 10px;
}
.review-avatar.sm {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

/* Sticky filter bar inside review column */
.scan-filters-bar {
  position: sticky;
  top: 64px;
  z-index: 10;
  background: var(--bg);
  padding: 8px 0 10px;
}

/* Price panel */
.scan-price-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.scan-price-header {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.scan-next-discount {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--lime-soft);
}

.scan-next-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.scan-progress-track {
  height: 6px;
  background: rgba(0,0,0,0.10);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 5px;
}

.scan-progress-bar {
  height: 100%;
  background: #a3d900;
  border-radius: 99px;
  transition: width 0.25s ease;
}

.scan-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.scan-price-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

/* Summary screen: two-column */
.scan-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
}

/* Number input spinner-Pfeile verstecken */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Mobile: stack to single column */
@media (max-width: 900px) {
  .scan-results-grid {
    grid-template-columns: 1fr;
  }
  .scan-price-col {
    order: -1;
    position: static;
  }
  .scan-summary-grid {
    grid-template-columns: 1fr;
  }
}
