/* Love is in the Hair® – Toftild Hårdonation (farver og font fra toftildforhandler.dk/love-is-in-the-hair) */
:root {
  --sand: #e5e3da;
  --bg: #f4f2ec;
  --card: #fff;
  --text: #3e3e3e;
  --muted: #8b877e;
  --line: #e5e3da;
  --red: #e14f52;        /* koralrød fra logoet */
  --red-dark: #c55154;
  --pink: #f6d3d1;       /* lyserød logovariant */
  --gold: #cbba93;
  --ok: #e9f1e4;
  --ok-text: #3d6b2e;
  --err: #fbe4e3;
  --err-text: #b23a3d;
  --warn: #fbf3dd;
}
* { box-sizing: border-box; }
body {
  margin: 0 auto; max-width: 900px; padding: 16px;
  font: 16px/1.45 "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
}
header.brand {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--sand); border-radius: 18px; padding: 14px 20px; margin-bottom: 6px;
}
header.brand img { width: 84px; height: 84px; flex: none; border-radius: 50%; }
header.brand .titles { flex: 1; min-width: 180px; }
header.brand h1 { margin: 0; font-size: 1.55rem; font-weight: 800; letter-spacing: .01em; }
header.brand p { margin: 2px 0 0; color: #6d6a63; }
header.brand nav { font-weight: 600; }
h1 { font-size: 1.6rem; margin: 8px 0 12px; }
h2 { font-size: 1.05rem; font-weight: 800; margin: 18px 0 8px; }
h2:first-of-type { margin-top: 4px; }
h2 small { font-weight: 400; color: var(--muted); }
a { color: var(--red-dark); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 14px 0; }
.muted { color: var(--muted); }

.flash { padding: 10px 14px; border-radius: 10px; margin: 10px 0; }
.flash.ok { background: var(--ok); color: var(--ok-text); }
.flash.error { background: var(--err); color: var(--err-text); }
.flash.warn { background: var(--warn); }

/* Store valg-knapper (radio) */
.choices { display: grid; gap: 10px; }
.choices.len { grid-template-columns: repeat(4, 1fr); }
.choices.col { grid-template-columns: repeat(5, 1fr); }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; }
.choices span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 72px; padding: 10px 6px; text-align: center; font-weight: 600; font-size: 1.05rem;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; user-select: none;
  transition: border-color .12s, background .12s, transform .05s;
}
.choices span:active { transform: scale(.98); }
.choices span:hover { border-color: var(--pink); }
.choices input:checked + span { border-color: var(--red); background: #fdf0ef; box-shadow: 0 0 0 2px var(--red) inset; color: var(--red-dark); }
.choices input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }
.choices i { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
i.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }

input[type=email], input[type=password] {
  width: 100%; padding: 14px; font-size: 1.05rem; border: 2px solid var(--line); border-radius: 12px;
}
input[type=email]:focus, input[type=password]:focus { outline: none; border-color: var(--red); }
.hint { margin: 6px 2px 0; color: var(--muted); font-size: .9rem; }

button { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 6px 12px; color: var(--text); }
button.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 800; border-radius: 999px; }
button.primary:hover:not(:disabled) { background: var(--red-dark); }
button.big { width: 100%; margin-top: 18px; padding: 18px; font-size: 1.2rem; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost { background: transparent; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; color: var(--muted); font-size: .9rem; }
.stats b { display: block; font-size: 1.7rem; font-weight: 800; color: var(--red); }
footer { text-align: center; color: var(--muted); font-size: .85rem; margin: 24px 0 8px; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td.actions { display: flex; gap: 6px; }
td.actions form { margin: 0; }
.err { color: var(--err-text); font-weight: 600; }

body.login { display: grid; place-items: center; min-height: 100vh; }
body.login form { width: 100%; max-width: 360px; text-align: center; }
body.login form img { width: 120px; height: 120px; }
body.login label { text-align: left; }
body.login label { display: block; margin: 12px 0; }
body.login button { width: 100%; padding: 12px; }

@media (max-width: 640px) {
  .choices.len { grid-template-columns: repeat(2, 1fr); }
  .choices.col { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
