:root {
  --bg: #0f1420;
  --card: #171e2e;
  --border: #262f45;
  --text: #e8ecf5;
  --muted: #93a0b8;
  --accent: #b774f0;
  --accent-2: #34c98f;
  --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --border: #e2e7f0;
    --text: #16202f;
    --muted: #5b6779;
    --accent: #8a3fd6;
    --accent-2: #1a9e6b;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.site-header { border-bottom: 1px solid var(--border); padding: 18px 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 0; }
.brand { color: var(--text); font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.brand span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: 4px 16px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.site-header nav a:hover { color: var(--text); }

main.wrap { padding: 40px 20px 60px; }
h1 { font-size: 2rem; margin-bottom: 8px; }
.lede { color: var(--muted); margin-top: 0; margin-bottom: 32px; max-width: 60ch; }

.calc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 28px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit;
}
.field textarea { resize: vertical; min-height: 80px; }

.option-group { margin-bottom: 20px; }
.option-group > label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.option-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.option-tile {
  cursor: pointer; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); font-size: 0.88rem; text-align: left; color: var(--text);
}
.option-tile strong { display: block; font-size: 0.92rem; }
.option-tile span { color: var(--muted); font-size: 0.8rem; }
.option-tile.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .toggle-desc { color: var(--muted); font-size: 0.8rem; }

button.primary {
  width: 100%; padding: 14px; font-size: 1.05rem; font-weight: 600; border: none;
  border-radius: 10px; background: var(--accent); color: white; cursor: pointer;
}
button.primary:hover { filter: brightness(1.08); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }

.price-box { text-align: center; margin: 24px 0; padding: 20px; background: var(--bg); border-radius: 12px; border: 1px solid var(--border); }
.price-label { display: block; color: var(--muted); font-size: 0.85rem; }
.price-value { display: block; font-size: 2.2rem; font-weight: 700; color: var(--accent); }
.price-note { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }

.discord-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  background: #5865F2; color: white; text-decoration: none; font-weight: 600; font-size: 0.92rem;
}
.discord-btn:hover { filter: brightness(1.1); }

.user-chip { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); }
.user-chip img { width: 24px; height: 24px; border-radius: 50%; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 0.88rem; }
.site-footer .wrap { display: flex; justify-content: space-between; }
.site-footer a { color: var(--muted); }

.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-row { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.order-row .meta { color: var(--muted); font-size: 0.82rem; }
.status-badge { font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.status-ny { background: rgba(183,116,240,0.15); color: var(--accent); }
.status-i-dialog { background: rgba(79,141,253,0.15); color: #4f8dfd; }
.status-bekreftet { background: rgba(52,201,143,0.15); color: var(--accent-2); }
.status-ferdig { background: rgba(147,160,184,0.15); color: var(--muted); }

@media (max-width: 600px) {
  main.wrap { padding: 24px 16px 48px; }
  .calc-card { padding: 18px; }
  .price-value { font-size: 1.8rem; }
}
