/* App-screen mockups — built in HTML/CSS, ny palett: navy + burgunder */

/* ── Generic mock app frame ──────────────────────────── */
.mock-app {
  display: flex;
  background: var(--bg-base);
  font-size: 11px;
  min-height: 380px;
  position: relative;
}

.mock-sidebar {
  width: 168px;
  background: #07223c;
  color: #ffffff;
  padding: 14px 10px;
  flex-shrink: 0;
  display: flex; flex-direction: column;
  gap: 2px;
  border-right: 1px solid #1a4d73;
}
.mock-sidebar .logo {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px; letter-spacing: -0.01em; font-weight: 600;
}
.mock-sidebar .logo .feld, .mock-sidebar .logo .kart { font-style: normal; font-weight: 600; opacity: 1; color: #fff; }
.mock-sidebar .logo .pin {
  display: inline-flex; width: 18px; height: 18px; border-radius: 5px;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  align-items: center; justify-content: center;
  margin-left: 0; margin-right: 4px; transform: none; order: -1;
}
.mock-sidebar .logo .pin::before {
  content: ""; width: 10px; height: 10px;
  background-color: #10b981;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2L3 6v8l7 4 7-4V6L10 2z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/><circle cx='10' cy='10' r='2' fill='black'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2L3 6v8l7 4 7-4V6L10 2z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/><circle cx='10' cy='10' r='2' fill='black'/></svg>");
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

/* Legacy compat */
.mock-sidebar .logo .m {
  display: none;
}
.mock-sidebar .logo .n {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: -0.02em;
}

.mock-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 4px;
  color: #8c97a8; font-size: 11px; font-weight: 500;
  border-left: 2px solid transparent;
}
.mock-nav-item.active {
  background: #103858;
  color: #ffffff;
  border-left-color: #10b981;
}
.mock-nav-item .ico { width: 12px; height: 12px; opacity: 0.85; flex-shrink: 0; }

.mock-main { flex: 1; padding: 18px; overflow: hidden; min-width: 0; }

/* Dashboard mock */
.mock-page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.mock-page-head .title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em;
}
.mock-period {
  display: inline-flex; padding: 3px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 6px;
  gap: 2px;
}
.mock-period span {
  padding: 4px 8px; font-size: 9px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  border-radius: 3px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.mock-period span.active {
  background: var(--text-primary);
  color: var(--bg-base);
}

.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 12px;
}
.kpi {
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  position: relative;
}
.kpi .label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-secondary);
}
.kpi .val {
  margin-top: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 22px; font-weight: 900; letter-spacing: -0.025em;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
  line-height: 1;
}
.kpi.active {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.kpi.active .label { color: var(--text-primary); }
.kpi.active .val { color: var(--text-primary); }
.kpi.active::after { display: none; }

.mock-chart {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  height: 140px;
  position: relative;
}
.mock-chart .ch-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.mock-chart svg { width: 100%; height: 90px; display: block; }

.mock-row {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px;
  margin-top: 8px;
}
.mock-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
}
.mock-card .ch-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-primary); margin-bottom: 10px;
}

.mock-leader { display: grid; gap: 6px; }
.leader-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-soft);
}
.leader-row:last-child { border-bottom: none; }
.leader-row .av {
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}
.leader-row .nm { flex: 1; font-size: 11px; font-weight: 600; color: var(--text-primary); }
.leader-row .ct { font-size: 9px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.leader-row .pf {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.profit-card .total { margin-top: 10px; padding: 10px; border-radius: 4px; background: var(--bg-elevated); border: 1px solid var(--border); }
.profit-card .total .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted);
}
.profit-card .total .val {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 24px; font-weight: 900; letter-spacing: -0.03em; color: var(--text-primary); font-variant-numeric: tabular-nums;
  line-height: 1.1; margin-top: 2px;
}
.profit-bar { margin-top: 8px; }
.profit-bar .bar-label { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-secondary); margin-bottom: 4px; font-family: 'JetBrains Mono', monospace; }
.profit-bar .bar { height: 3px; background: var(--bg-elevated); border-radius: 999px; overflow: hidden; }
.profit-bar .bar > div { height: 100%; background: var(--accent); }

/* ── Map mock ────────────────────────────────────────── */
.mock-map {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(20,32,46,0.05), transparent 60%),
    var(--bg-tinted);
  height: 420px;
  border-radius: 0;
  overflow: hidden;
}
[data-theme="dark"] .mock-map { background: radial-gradient(ellipse at 30% 40%, rgba(7,34,60,0.06), transparent 60%), var(--bg-base); }
.mock-map svg.tile-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-toolbar {
  position: absolute; top: 14px; left: 14px;
  display: flex; gap: 4px; align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
  box-shadow: var(--shadow-sm);
}
.map-toolbar .chip {
  padding: 5px 10px; font-size: 11px; font-weight: 500; color: var(--text-secondary);
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em;
}
.map-toolbar .chip.active { background: var(--text-primary); color: var(--bg-base); font-weight: 500; }

.map-territory {
  position: absolute;
  border-radius: 8px;
  background: rgba(110,31,42,0.06);
  border: 1.5px dashed rgba(110,31,42,0.45);
}
[data-theme="dark"] .map-territory {
  background: rgba(7,34,60,0.10);
  border-color: rgba(7,34,60,0.5);
}

/* Pins matcher faktisk app: emerald = solgt, gul = oppfølging, rød = ikke hjemme */
.map-pin {
  position: absolute; width: 10px; height: 10px; border-radius: 999px;
  background: #10b981;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transform: translate(-50%, -50%);
}
.map-pin.green { background: #10b981; }     /* solgt */
.map-pin.amber { background: #f59e0b; }      /* oppfølging */
.map-pin.red   { background: #ef4444; }      /* ikke hjemme */

.map-cluster {
  position: absolute;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  border: 3px solid var(--bg-base);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px var(--text-primary), var(--shadow);
  font-variant-numeric: tabular-nums;
}
.map-popup {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  font-size: 11px;
}
.map-popup::before {
  content: ""; position: absolute; top: 0; left: 12px;
  width: 24px; height: 2px; background: var(--accent);
}
.map-popup .addr {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 500; color: var(--text-primary); font-size: 13px;
  letter-spacing: -0.01em;
}
.map-popup .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-muted); margin-top: 4px;
}
.map-popup .status {
  display: inline-block; margin-top: 6px;
  padding: 2px 8px; border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
}
.status.solgt { background: #10b981; color: #07223c; }

/* Image placeholder — for slots where a real product screenshot should go */
.img-placeholder {
  background: repeating-linear-gradient(
    45deg,
    var(--bg-tinted),
    var(--bg-tinted) 12px,
    var(--bg-elevated) 12px,
    var(--bg-elevated) 24px
  );
  border: 1.5px dashed var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  min-height: 380px;
}
.img-placeholder .ph-inner {
  text-align: center; max-width: 380px; padding: 32px 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.img-placeholder .ph-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: var(--radius);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.img-placeholder .ph-title {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text-primary); margin-bottom: 8px;
}
.img-placeholder .ph-sub {
  font-size: 13.5px; color: var(--text-secondary); line-height: 1.55;
  margin-bottom: 14px;
}
.img-placeholder .ph-spec {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.06em;
  color: var(--text-muted);
  padding-top: 10px; border-top: 1px solid var(--border-soft);
}

/* ── Konkurranse / leaderboard mock ──────────────────── */
.comp-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.comp-hero {
  padding: 18px;
  background: var(--text-primary);
  color: var(--bg-base);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.comp-hero::before {
  content: ""; position: absolute; top: -30px; right: -30px;
  width: 140px; height: 140px; border-radius: 999px;
  background: radial-gradient(circle, rgba(16,185,129,0.45), transparent 70%);
}
.comp-hero::after {
  content: ""; position: absolute; left: 18px; bottom: -1px;
  width: 40px; height: 3px; background: var(--accent);
}
.comp-hero .name {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px; font-weight: 500; letter-spacing: -0.015em;
  position: relative;
}
.comp-hero .desc {
  font-size: 11px; opacity: 0.7; margin-top: 4px;
  font-family: 'JetBrains Mono', monospace; letter-spacing: 0.02em;
  position: relative;
}
.comp-hero .countdown {
  position: absolute; top: 16px; right: 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em;
  background: rgba(7,34,60,0.30); color: #a7f3d0;
  padding: 4px 10px; border-radius: 4px;
  border: 1px solid rgba(16,185,129,0.4);
}

.podium-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.podium {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 14px 10px; text-align: center; position: relative;
}
.podium .rank {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
}
.podium .av {
  width: 34px; height: 34px; border-radius: 999px; margin: 6px auto;
  background: var(--accent-subtle); border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600; color: var(--accent);
}
.podium .nm { font-size: 11px; font-weight: 600; color: var(--text-primary); margin-top: 4px; }
.podium .sc {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px; font-weight: 500; color: var(--text-primary);
  margin-top: 2px; font-variant-numeric: tabular-nums; line-height: 1;
}
.podium.first {
  background: var(--accent);
  border-color: var(--accent-deep);
}
.podium.first .rank,
.podium.first .nm,
.podium.first .sc { color: var(--bg-base); }
.podium.first .rank { color: rgba(247,244,238,0.7); }
.podium.first .av {
  background: rgba(247,244,238,0.14);
  border-color: rgba(247,244,238,0.3);
  color: var(--bg-base);
}

.lb-list { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px; }
.lb-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 6px 6px; border-radius: 3px; }
.lb-row + .lb-row { border-top: 1px solid var(--border-soft); }
.lb-row .rk {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.lb-row .lb-name { font-size: 11px; font-weight: 600; color: var(--text-primary); }
.lb-row .lb-stats {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-muted); display: flex; gap: 10px;
}
.lb-row .lb-pts {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px; font-weight: 500; color: var(--text-primary); font-variant-numeric: tabular-nums;
}

/* ── Mobile mock (selger) ────────────────────────────── */
.mobile-mock {
  width: 230px;
  height: 460px;
  background: #0a0a0a;
  border-radius: 32px;
  padding: 7px;
  box-shadow: var(--shadow-xl);
  position: relative;
  margin: 0 auto;
}
.mobile-mock::before {
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 16px; border-radius: 99px; background: #0a0a0a; z-index: 5;
}
.mobile-screen {
  width: 100%; height: 100%; border-radius: 26px;
  background: var(--bg-base); overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.mobile-status {
  height: 30px; padding: 8px 18px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; font-weight: 600; color: var(--text-primary);
}
.mobile-status .icons { display: flex; gap: 4px; opacity: 0.8; }

.mobile-header {
  padding: 8px 14px 12px;
  background: #14202e; color: #f4ede0;
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-header .title {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
}
.mobile-header .ico { width: 22px; height: 22px; border-radius: 4px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; }

.mobile-map {
  flex: 1; position: relative;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(20,32,46,0.06), transparent 60%),
    var(--bg-tinted);
  overflow: hidden;
}
.mobile-tab-bar {
  background: #14202e;
  display: flex; padding: 6px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mobile-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 8px; font-weight: 600; color: #5d6877;
  padding: 4px 0; letter-spacing: 0.04em;
  font-family: 'JetBrains Mono', monospace;
}
.mobile-tab.active { color: #f4ede0; position: relative; }
.mobile-tab.active::before {
  content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px; background: var(--accent);
}
.mobile-tab .ico { width: 16px; height: 16px; }

.mobile-bottom-sheet {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}
.mobile-bottom-sheet::before {
  content: ""; position: absolute; top: 0; left: 12px;
  width: 24px; height: 2px; background: var(--accent);
}
.mobile-bottom-sheet .addr {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px; font-weight: 500; color: var(--text-primary); letter-spacing: -0.01em;
}
.mobile-bottom-sheet .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: var(--text-muted); margin-top: 2px;
}
.mobile-bottom-sheet .actions { display: flex; gap: 4px; margin-top: 10px; }
.mobile-bottom-sheet .actions span {
  font-size: 9px; padding: 5px 8px; border-radius: 3px;
  background: var(--bg-elevated); color: var(--text-secondary); font-weight: 600;
  font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mobile-bottom-sheet .actions span.primary { background: var(--accent); color: var(--accent-fg); }
