/* Sjekkmat 2026 */
:root {
  --display: 'Bricolage Grotesque', Georgia, serif;
  --body: 'Outfit', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f3f5f7;
  --surface-3: #e9ecef;
  --border: #e2e6ea;
  --border-subtle: #edf0f3;
  --ink: #0f1419;
  --ink-2: #3d4852;
  --ink-3: #6b7785;
  --ink-4: #9aa5b1;
  --accent: #2563eb;
  --accent-soft: rgba(37,99,235,0.08);
  --accent-medium: rgba(37,99,235,0.15);
  --red: #dc2626;
  --red-soft: rgba(220,38,38,0.08);
  --red-medium: rgba(220,38,38,0.12);
  --green: #16a34a;
  --green-soft: rgba(22,163,74,0.08);
  --orange: #ea580c;
  --orange-soft: rgba(234,88,12,0.08);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
}

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

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ─── Nav ────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 16px;
  font-family: var(--display);
}

.nav-logo-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.nav-btn:hover {
  background: var(--surface-2);
  border-color: var(--ink-4);
}

.nav-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
}

/* ─── Hero ────────────────────────────── */
.hero {
  padding: 56px 24px 48px;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: visible;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero-sub {
  font-size: 15px;
  color: var(--ink-3);
  margin-bottom: 28px;
}

.search-box {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.search-box input::placeholder { color: var(--ink-4); }

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-sm);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-4);
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.search-dropdown.open { display: block; }

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.1s;
}

.search-item:hover { background: var(--surface-2); }

.search-item img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  object-fit: contain;
  background: var(--surface-2);
}

.search-item-info { flex: 1; min-width: 0; }

.search-item-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-brand {
  font-size: 11px;
  color: var(--ink-4);
}

/* ─── Stats Bar ───────────────────────── */
.stats-bar {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 44px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  white-space: nowrap;
  border-right: 1px solid var(--border-subtle);
}

.stat-item:last-child { border-right: none; }

.stat-label {
  font-size: 12px;
  color: var(--ink-4);
}

.stat-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.stat-value.alert { color: var(--red); }

/* ─── Content ─────────────────────────── */
.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* ─── Sections ────────────────────────── */
.section {
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease-out both;
}

.section:nth-child(2) { animation-delay: 0.05s; }
.section:nth-child(3) { animation-delay: 0.1s; }

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

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-meta {
  font-size: 12px;
  color: var(--ink-4);
}

/* ─── Featured Scroll ─────────────────── */
.featured-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

.featured-scroll::-webkit-scrollbar { height: 0; }

.f-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.f-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.f-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.f-card-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  object-fit: contain;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
}

.f-card-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.f-card-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.f-card-price {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.f-card-price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-4);
}

.f-card-chain {
  font-size: 11px;
  color: var(--ink-4);
  padding: 2px 8px;
  background: var(--surface-2);
  border-radius: 4px;
}

.f-card-spread {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  margin-top: 6px;
}

/* ─── Two Column ──────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

/* ─── Card ────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 8px;
}

.card-title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
}

.card-filters {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  padding: 3px;
  border-radius: var(--radius-xs);
}

.filter-btn {
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover { color: var(--ink); }

.filter-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.card-body {
  max-height: 520px;
  overflow-y: auto;
}

.card-body::-webkit-scrollbar { width: 4px; }
.card-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ─── Alert Row ───────────────────────── */
.a-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.12s;
}

.a-row:hover { background: var(--surface-2); }
.a-row:last-child { border-bottom: none; }

.a-severity {
  width: 4px;
  min-height: 36px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 2px;
}

.a-severity.critical { background: var(--red); }
.a-severity.high { background: var(--orange); }
.a-severity.medium { background: #eab308; }
.a-severity.low { background: var(--ink-4); }

.a-content { flex: 1; min-width: 0; }

.a-badges {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.a-badge {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.a-badge.critical { background: var(--red-medium); color: var(--red); }
.a-badge.high { background: var(--orange-soft); color: var(--orange); }
.a-badge.medium { background: rgba(234,179,8,0.12); color: #a16207; }
.a-badge.low { background: var(--surface-3); color: var(--ink-3); }
.a-badge.type { background: var(--surface-3); color: var(--ink-3); }

.a-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}

.a-desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}

.a-date {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  flex-shrink: 0;
  padding-top: 2px;
}

/* ─── Increase Row ────────────────────── */
.i-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.12s;
}

.i-row:hover { background: var(--surface-2); }
.i-row:last-child { border-bottom: none; }

.i-rank {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.i-rank.hot { background: var(--red-soft); color: var(--red); }
.i-rank.warm { background: var(--orange-soft); color: var(--orange); }
.i-rank.mild { background: var(--surface-3); color: var(--ink-3); }

.i-info { flex: 1; min-width: 0; }

.i-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.i-prices {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
}

.i-pct {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  color: var(--red);
  background: var(--red-soft);
}

/* ─── Product Row ─────────────────────── */
.p-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.12s;
}

.p-row:hover { background: var(--surface-2); }

.p-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  object-fit: contain;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.p-info { flex: 1; min-width: 0; }

.p-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-brand {
  font-size: 11px;
  color: var(--ink-4);
}

.p-prices {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.p-chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  color: var(--ink-3);
  white-space: nowrap;
}

.p-chip.best {
  border-color: rgba(22,163,74,0.25);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.no-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  background: var(--surface-3);
  flex-shrink: 0;
}

/* ─── Footer ──────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 24px;
  font-size: 12px;
  color: var(--ink-4);
  border-top: 1px solid var(--border);
  max-width: 1400px;
  margin: 0 auto;
}

/* ─── Utility ─────────────────────────── */
.loading-text {
  padding: 24px 18px;
  font-size: 13px;
  color: var(--ink-4);
}

.empty-state {
  padding: 32px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-4);
}

/* ─── Responsive ──────────────────────── */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .hero h1 { font-size: 28px; }
  .hero { padding: 40px 16px 32px; }
}

@media (max-width: 600px) {
  .nav { padding: 0 14px; }
  .stats-bar { padding: 0 14px; }
  .stat-item { padding: 0 12px; }
  .hero h1 { font-size: 24px; }
  .search-box input { font-size: 14px; padding: 12px 14px 12px 42px; }
  .card-header { padding: 12px 14px; }
  .a-row, .i-row, .p-row { padding: 10px 14px; }
  .footer { flex-direction: column; gap: 4px; text-align: center; }
}


/* ─── Dashboard search dropdown fix ─── */
.search-box { position: relative; z-index: 50; }
.search-dropdown { z-index: 9999 !important; }
