/* Faktura Danmark staff system.
   Same style as magska.dk: light warm background, white surfaces,
   rounded corners, soft shadows, heavy headings.
   Faktura Danmark's own green is the accent colour (one variable to change). */

:root {
  --brand-green: #23b82c;   /* green in the Faktura Danmark logo */
  --brand-blue: #7d8fae;    /* grey-blue F in the logo */
  --accent: #1a8f22;        /* logo green, darkened so white text on buttons is readable */
  --accent-dark: #136b19;
  --ink: #15202b;
  --muted: rgba(21, 32, 43, 0.70);
  --soft: rgba(21, 32, 43, 0.06);
  --bg: #fbfaf7;
  --surface: #ffffff;
  --danger: #dc3545;
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 24px;
  background: var(--surface);
  box-shadow: 0 0 30px 10px rgba(0, 0, 0, 0.06);
}
.brand { display: flex; align-items: center; }
.brand img { height: 44px; width: auto; display: block; }
.tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: var(--soft);
  padding: 4px 12px;
  border-radius: 999px;
}
.top form { margin: 0; }

main { max-width: 1100px; margin: 0 auto; padding: 32px 16px 64px; }

h1, h2, h3 { font-weight: 900; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 16px var(--soft);
  padding: 28px;
}
.narrow { max-width: 440px; margin: 40px auto 0; }

label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password] {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(21, 32, 43, 0.18);
  border-radius: 10px;
}
input:focus { outline: 3px solid rgba(35, 184, 44, 0.30); border-color: var(--accent); }
input.code { font-size: 26px; letter-spacing: 0.3em; text-align: center; }

.btn {
  display: inline-block;
  margin-top: 22px;
  padding: 10px 22px;
  font: inherit;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary { background: var(--brand-blue); }
.btn.secondary:hover { background: #64779a; }
.btn.small { margin: 0; padding: 6px 16px; font-weight: 700; }

.error, .ok {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 16px 0 0;
  font-weight: 600;
}
.error { background: rgba(220, 53, 69, 0.10); color: #a51d2d; }
.ok { background: rgba(35, 184, 44, 0.12); color: var(--accent-dark); }
.warn { padding: 12px 16px; border-radius: 10px; margin: 16px 0 0; font-weight: 600; background: rgba(255, 193, 7, 0.18); color: #7a5a00; }

.muted { color: var(--muted); }
.key {
  font-family: Consolas, "Courier New", monospace;
  font-size: 20px;
  letter-spacing: 0.08em;
  background: var(--soft);
  padding: 12px 16px;
  border-radius: 10px;
  word-break: break-all;
}
ol li { margin-bottom: 6px; }
.qr { display: flex; justify-content: center; margin: 16px 0; }
.qr svg { max-width: 100%; height: auto; border-radius: 10px; }
details { margin: 8px 0 0; }
summary { cursor: pointer; font-weight: 600; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 600; margin-top: 18px; }
label.check input { width: 18px; height: 18px; }
.small { font-size: 14px; margin: 4px 0 0; }
nav.menu { display: flex; gap: 18px; align-items: center; }
nav.menu a { color: var(--ink); text-decoration: none; font-weight: 700; }
nav.menu a:hover, nav.menu a.active { color: var(--accent); }
table.list { width: 100%; border-collapse: collapse; margin-top: 12px; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--soft); vertical-align: middle; }
table.list th { font-size: 14px; color: var(--muted); }
.copy { display: flex; gap: 8px; margin-top: 10px; }
.copy input { flex: 1; }
.stack > * + * { margin-top: 24px; }
.badge { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--soft); }
.badge.ok { background: rgba(35,184,44,.14); color: var(--accent-dark); padding: 2px 10px; margin: 0; }

main { max-width: 1200px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
form.inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
form.inline .grow { flex: 1; min-width: 220px; }
form.inline .btn { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
select { width: 100%; padding: 11px 14px; font: inherit; border: 1px solid rgba(21,32,43,.18); border-radius: 10px; background: var(--surface); }
input[type=date], input[type=number] { padding: 11px 14px; font: inherit; border: 1px solid rgba(21,32,43,.18); border-radius: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.choices label.check { margin-top: 6px; font-weight: 500; }
label.check.disabled { opacity: .45; }
label.check input.qty { width: 130px; height: auto; padding: 6px 8px; border: 1px solid rgba(21,32,43,.18); border-radius: 8px; font: inherit; }
.custname { font-size: 30px; font-weight: 900; letter-spacing: .01em; margin: 4px 0; }
@media (max-width: 600px) {
  .grid2 { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .top { padding: 12px 16px; }
}
input[type=date] { cursor: pointer; }
.gridwrap { overflow-x: auto; }
table.grid th, table.grid td { padding: 6px 6px; white-space: nowrap; }
table.grid th.c, table.grid td.c { text-align: center; }
table.grid td input[type=text], table.grid td select { padding: 6px 8px; font-size: 15px; border-radius: 7px; }
table.grid td input.num { width: 70px; padding: 6px 8px; }
table.grid td input[name=modtager_nr] { width: 150px; }
table.grid td input[name=fakturanr] { width: 140px; }
table.grid td input[name=note] { min-width: 160px; }
table.grid td input[type=checkbox] { width: 18px; height: 18px; }
tr.entry td { background: rgba(35, 184, 44, .06); }
tr.row-error td { background: rgba(220, 53, 69, .08); }
.badge.err { background: rgba(220, 53, 69, .15); color: #a51d2d; }
.badge.warn { background: rgba(240, 173, 78, .2); color: #8a5300; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.card.card-error { box-shadow: 0 0 0 2px rgba(220, 53, 69, .45); }
details > summary.btn { display: inline-block; list-style: none; margin-top: 6px; }
details > summary.btn::-webkit-details-marker { display: none; }
tr.row-warn td { background: rgba(255, 193, 7, .14); }
#batch input[type=text] { width: 140px; }
#batch input[name$="[note]"] { width: 180px; }

/* Phone and tablet (27 Oct 2026) – the status reports page first, the other pages are usable. */
@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: 10px 16px; }
  .brand img { height: 34px; }
  nav.menu { order: 3; width: 100%; overflow-x: auto; gap: 16px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  nav.menu a { padding: 6px 0; }
  main { padding: 18px 10px 48px; }
  .card { padding: 18px 16px; border-radius: 14px; }
  h1 { font-size: 23px; }
  h2 { font-size: 19px; }
  .custname { font-size: 24px; }
  .hide-sm { display: none; }
  table.list { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.list th, table.list td { padding: 9px 6px; }
  .btn { padding: 12px 22px; }
  .btn.wide-sm { display: block; width: 100%; text-align: center; }
  label.check input { width: 22px; height: 22px; flex: none; }
  input[type=text], input[type=email], input[type=password], select { font-size: 16px; } /* no zoom on iPhone */
  form.inline .grow { min-width: 0; flex-basis: 100%; }
}
/* Opened as an app from the home screen: room for the phone's own status bar. */
@media (display-mode: standalone) {
  .top { padding-top: max(12px, env(safe-area-inset-top)); }
}
.error + h2, .warn + h2, .error + p, .warn + p { margin-top: 16px; }

/* Reviews (3 Nov 2026): 1-5 stars chosen with radio buttons, CSS only. The stars are in the markup from 5 to 1 and
   shown in reverse, so a chosen or hovered star also lights up the stars before it. */
fieldset.stars { border: 0; padding: 0; margin: 12px 0 4px; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
fieldset.stars legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
fieldset.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
fieldset.stars label { display: inline-block; margin: 0; padding: 0 3px; font-size: 40px; line-height: 1; color: #c9ced3; cursor: pointer; }
fieldset.stars label:hover, fieldset.stars label:hover ~ label, fieldset.stars input:checked ~ label { color: #f5a623; }
fieldset.stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid rgba(21,32,43,.18); border-radius: 10px; }
.review-stars { color: #f5a623; letter-spacing: 2px; }
