:root {
  --bg: #0f1420;
  --card: #171e2e;
  --border: #262f45;
  --text: #e8ecf5;
  --muted: #93a0b8;
  --accent: #ff8a3d;
  --accent-2: #34c98f;
  --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb; --card: #ffffff; --border: #e2e7f0; --text: #16202f;
    --muted: #5b6779; --accent: #e06a1f; --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: 720px; 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 14px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.site-header nav a:hover { color: var(--text); }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-btn { background: var(--card); color: var(--muted); border: none; padding: 5px 10px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.lang-btn.active { background: var(--accent); color: white; }

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 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; }

.dropzone {
  border: 2px dashed var(--border); border-radius: 14px; padding: 40px 20px; text-align: center;
  cursor: pointer; color: var(--muted); transition: border-color 0.15s ease;
}
.dropzone.drag { border-color: var(--accent); color: var(--text); }
.dropzone strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 6px; }

.estimate-box { margin-top: 24px; padding: 20px; background: var(--bg); border-radius: 12px; border: 1px solid var(--border); }
.estimate-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.92rem; }
.estimate-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.1rem; }
.estimate-note { color: var(--muted); font-size: 0.8rem; margin-top: 10px; }

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; }

.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); }

.account { position: relative; }
.account-trigger { display: flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); cursor: pointer; font-size: 0.85rem; color: var(--text); font-family: inherit; }
.account-trigger:hover { border-color: var(--accent); }
.account-trigger img { width: 24px; height: 24px; border-radius: 50%; display: block; }
.admin-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); display: inline-block; }
.account-menu { position: absolute; top: calc(100% + 8px); right: 0; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 6px; min-width: 170px; display: none; flex-direction: column; gap: 2px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); z-index: 30; }
.account-menu.open { display: flex; }
.account-menu a { padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.88rem; }
.account-menu a:hover { background: var(--bg); }

.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(255,138,61,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); }

.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); }

.notice-box { background: rgba(255,138,61,0.1); border: 1px solid rgba(255,138,61,0.3); color: var(--text); padding: 12px 16px; border-radius: 10px; font-size: 0.88rem; margin-bottom: 20px; }
.admin-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.save-btn { padding: 8px 14px; border-radius: 8px; border: none; background: var(--accent); color: white; cursor: pointer; font-size: 0.85rem; }

@media (max-width: 600px) {
  main.wrap { padding: 24px 16px 48px; }
  .calc-card { padding: 18px; }
}
