:root {
  --bg: #0f0f10;
  --panel: #18181b;
  --panel-2: #222226;
  --line: #2e2e33;
  --fg: #f4f1ea;
  --muted: #a3a09a;
  --gold: #d4a937;
  --gold-2: #f0c95a;
  --green: #4fbf7f;
  --blue: #5aa2e6;
  --orange: #e69a3c;
  --red: #d9655b;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a { color: var(--gold-2); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Hero */
.hero {
  padding: 28px 0 48px;
  background:
    radial-gradient(900px 300px at 80% -10%, rgba(212,169,55,.22), transparent 70%),
    linear-gradient(180deg, #151516, var(--bg));
  border-bottom: 1px solid var(--line);
}
.logo {
  display: inline-block;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -.02em;
  color: var(--fg);
  text-decoration: none;
  margin-bottom: 40px;
}
.logo span, h1 span { color: var(--gold); }
.logo img { display: block; height: 64px; width: auto; }
.login .logo { margin-bottom: 20px; }
.login .logo img { height: 46px; }
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 0 0 12px;
  max-width: 14ch;
}
.lead { color: var(--muted); font-size: 1.15rem; margin: 0; max-width: 46ch; }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 28px 0 20px;
}
.filters .search { flex: 1 1 220px; }
input, select, textarea, button {
  font: inherit;
  color: var(--fg);
}
input, select, textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.filters select { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
button {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
}
button:hover { border-color: var(--gold); }
.primary, button.ask {
  background: var(--gold);
  color: #1a1404;
  border-color: var(--gold);
  font-weight: 650;
}
.primary:hover, button.ask:hover { background: var(--gold-2); }
.reset { color: var(--muted); font-size: .95rem; }

/* Grid */
.grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: #4a4120; transform: translateY(-2px); }
.card.is-sold .num, .card.is-sold .type, .card.is-sold .price, .card.is-sold .extra { opacity: .45; }
.card.is-target { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,169,55,.25); }
.card-actions { display: flex; gap: 8px; }
.card-actions .ask { flex: 1; min-width: 0; white-space: nowrap; padding: 10px 8px; font-size: .95rem; }
.share {
  flex: 0 0 auto; width: 44px; display: grid; place-items: center; padding: 0;
  background: var(--panel-2); color: var(--gold-2);
}
.share:hover { border-color: var(--gold); color: var(--fg); }
.share-pop {
  position: fixed; z-index: 100; width: 260px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); padding: 12px;
}
.share-pop[hidden] { display: none; }
.share-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: .95rem; }
.share-x { background: none; border: 0; font-size: 1.4rem; line-height: 1; padding: 0 4px; color: var(--muted); }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.share-grid a, .share-grid button {
  display: block; text-align: center; padding: 8px; border-radius: 8px; font-size: .88rem;
  background: var(--panel); border: 1px solid var(--line); color: var(--fg); text-decoration: none;
}
.share-grid a:hover, .share-grid button:hover { border-color: var(--gold); }
.share-grid [data-k=copy] { grid-column: 1 / -1; }
.num {
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.type { color: var(--muted); font-size: .92rem; }
.badge {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.badge.sale { background: #22c55e; border-color: #22c55e; color: #052e14; }
.badge.bid { background: #2563eb; border-color: #2563eb; color: #fff; }
.badge.reserved { background: #f59e0b; border-color: #f59e0b; color: #2a1a00; }
.badge.sold { background: #e11d1d; border-color: #e11d1d; color: #fff; }
.badge.rented { background: rgba(225,29,29,.35); border: 2px solid #22c55e; color: #fff; padding: 2px 7px; }
.extra { font-size: .92rem; color: var(--muted); }
.extra span { color: var(--fg); }
.price { font-size: 1.15rem; font-weight: 650; color: var(--gold-2); margin-top: auto; }
.card button.ask { width: 100%; }
.empty { color: var(--muted); padding: 30px 0; }

/* Inquiry */
.inquiry {
  margin: 56px 0 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-left: auto;
  margin-right: auto;
  scroll-margin-top: 16px;
}
/* Samme bredde som to nummerbokse (kolonnebredde + mellemrum), centreret */
@media (min-width: 780px) { .inquiry { width: calc((100% - 28px) * 2 / 3 + 14px); } }
@media (min-width: 1034px) { .inquiry { width: calc(50% - 7px); } }
.inquiry h2 { margin: 0 0 4px; }
.inquiry > p { color: var(--muted); margin: 0 0 18px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: .92rem; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; }

.notice {
  border-radius: 10px;
  padding: 12px 16px;
  margin: 20px 0;
  border: 1px solid;
}
.notice.ok { border-color: var(--green); background: rgba(79,191,127,.1); }
.notice.error { border-color: var(--red); background: rgba(217,101,91,.1); }
.notice ul { margin: 0; padding-left: 18px; }

.foot { color: var(--muted); font-size: .9rem; padding-top: 20px; padding-bottom: 40px; border-top: 1px solid var(--line); }

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .filters select, .filters button { flex: 1 1 auto; }
  .inquiry { padding: 18px; }
}

/* ---------- Admin ---------- */
.admin-top {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  background: rgba(15,15,16,.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); margin-bottom: 24px;
}
.admin-top-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; padding-bottom: 8px; gap: 10px; flex-wrap: wrap;
}
.admin-top .logo { display: flex; align-items: center; gap: 8px; }
.admin-top .logo img { height: 36px; }
.admin-top .logo small { color: var(--muted); font-weight: 500; font-size: .9rem; }
.admin-top .btn-sm { padding: 5px 10px; font-size: .82rem; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.save-btn { padding: 6px 12px; font-size: .82rem; letter-spacing: .03em; border-radius: 8px; }
.save-btn.pulse { box-shadow: 0 0 0 0 rgba(212,169,55,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(212,169,55,0); } 100% { box-shadow: 0 0 0 0 rgba(212,169,55,0); } }
.dirty-note { color: var(--gold-2); font-size: .8rem; }
.dirty-note[hidden] { display: none; }

/* Redigerbar tabel */
.edit-table td { padding: 6px 8px; }
.edit-table input, .edit-table select {
  background: transparent; border-color: transparent; padding: 8px 10px; border-radius: 8px;
}
.edit-table input:hover, .edit-table select:hover { border-color: var(--line); }
.edit-table input:focus, .edit-table select:focus { background: var(--bg); }
.edit-table .in-num { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 130px; }
.edit-table .in-price { min-width: 110px; }
.edit-table select { min-width: 140px; cursor: pointer; }
.edit-table .in-format { min-width: 160px; }
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link span { opacity: .5; font-size: .8em; }
.sort-link.on, .sort-link:hover { color: var(--gold-2); }
.sort-link.on span { opacity: 1; }
.edit-table tr.is-changed td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.edit-table tr.is-new { background: rgba(212,169,55,.07); }
.edit-table tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.edit-table tr.is-deleted { opacity: .4; }
.edit-table tr.is-deleted input { text-decoration: line-through; }
.edit-table tr.has-error td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.edit-table tr.err-row td { color: var(--red); font-size: .88rem; padding-top: 0; }
.admin-top .logo { margin: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a {
  padding: 5px 10px; border-radius: 8px; font-size: .88rem; text-decoration: none; color: var(--muted); border: 1px solid transparent;
}
.tabs a.on { color: var(--fg); border-color: var(--line); background: var(--panel); }
.tabs .count { background: var(--gold); color: #1a1404; border-radius: 999px; padding: 0 7px; font-size: .78rem; font-weight: 700; margin-left: 4px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; background: var(--panel); }
tr:last-child td { border-bottom: 0; }
td.n { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; }
.btn-sm { padding: 6px 10px; font-size: .88rem; border-radius: 8px; text-decoration: none; display: inline-block; background: var(--panel-2); border: 1px solid var(--line); color: var(--fg); }
.btn-danger:hover { border-color: var(--red); color: var(--red); }
.toolbar { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 560px; }
.inq { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.inq.unread { border-color: #5a4b1c; }
.inq header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.inq .when { color: var(--muted); font-size: .88rem; }
.inq p { margin: 8px 0 0; white-space: pre-wrap; }
.inq dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: .95rem; }
.inq dt { color: var(--muted); }
.inq dd { margin: 0; }
.inline-select { width: auto; padding: 5px 8px; font-size: .88rem; }
.login { max-width: 360px; margin: 12vh auto; }

/* Mobil: kompakt admin-menu og fastlåst nummerkolonne */
.edit-table th:first-child, .edit-table td:first-child { position: sticky; left: 0; background: var(--bg); z-index: 1; }
.edit-table th:first-child { background: var(--panel); }
@media (max-width: 700px) {
  .admin-top-inner { gap: 6px 8px; padding-top: 6px; padding-bottom: 6px; }
  .admin-top .logo small, .tabs .ext { display: none; }
  .admin-top .logo img { height: 30px; }
  .tabs { order: 3; width: 100%; }
  .tabs a { padding: 4px 8px; font-size: .82rem; }
  .dirty-note { display: none; }
  .edit-table .in-num { min-width: 128px; padding-left: 6px; padding-right: 4px; }
}

.admin-pill {
  position: fixed; top: 12px; right: 12px; z-index: 60;
  background: var(--gold); color: #1a1404; font-weight: 700; font-size: .85rem;
  padding: 7px 12px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.admin-pill:hover { background: var(--gold-2); }

/* To-faktor */
.code-input { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.form label.check input { width: auto; }
.login-links { display: flex; justify-content: space-between; margin-top: 14px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-2); text-decoration: underline; font-size: .9rem; cursor: pointer; }

/* ---------- SEO-indhold ---------- */
h3.num { margin: 0; }
.num a { color: inherit; text-decoration: none; }
.num a:hover { color: var(--gold-2); }
.crumbs { color: var(--muted); font-size: .9rem; margin: -18px 0 14px; }
.crumbs a { color: var(--muted); }
.lead .badge { vertical-align: 2px; }
.lead-price { color: var(--gold-2); }
.hero-cta { margin: 22px 0 0; }
.btn-cta {
  display: inline-block; background: var(--gold); color: #1a1404; font-weight: 700;
  padding: 12px 20px; border-radius: 10px; text-decoration: none;
}
.btn-cta:hover { background: var(--gold-2); }

.about { margin: 24px 0 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about h2 { font-size: 1.35rem; margin: 0 0 12px; letter-spacing: -.01em; }
.about p { color: var(--muted); margin: 0 0 12px; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 8px; }
.steps strong { color: var(--fg); }
.faq-title { margin-top: 40px !important; }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 16px; }
.foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 24px; } }

.nowrap { white-space: nowrap; }
.hero h1.h1-nr { max-width: none; }
