@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;600&display=swap');
/* ============================================================
   Skema — fælles layout for menusider med skemahoved
   (fejemaskiner.html, renhold.html, hal.html, forsendelsesrapport.html, skadedyr-*.html)
   Samme navy Tricolore-udseende som adminpanelet.
   ============================================================ */
:root{
  color-scheme: dark;
  --bg: #0B1428;
  --surface: #111D38;
  --surface-2: #182748;
  --border: #22325A;
  --border-input: #56699A;
  --text: #ECEEF3;
  --text-dim: #A9B4CC;
  --text-faint: #8C97B3;
  --blue: #1E5FE0;
  --blue-dim: rgba(30,95,224,0.16);
  --link: #7FA6F7;
  --green: #4ADE80;
  --tricolore: linear-gradient(90deg, #1E5FE0 0 33.3%, #F5F5F2 33.3% 66.6%, #E4291A 66.6%);
  --font-display: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*{ box-sizing: border-box; }
[hidden]{ display: none !important; }   /* hidden skal vinde over display-regler */
html, body{ margin: 0; padding: 0; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  padding: max(20px, calc(env(safe-area-inset-top, 0px) + 16px)) 14px 110px;
}
body::before{ content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; background: var(--tricolore); z-index: 70; pointer-events: none; }
::selection{ background: rgba(30,95,224,0.45); color: #fff; }
:focus-visible{ outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.app{ max-width: 920px; margin: 0 auto; }

/* ---- Top bar ---- */
.top-bar{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sub{ color: var(--text-dim); font-size: 13px; margin: 0; }

/* ---- Skema header ---- */
.doc-head{
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 28px;
}
.doc-grid{ display: grid; grid-template-columns: minmax(170px, 1fr) 2fr; }
.doc-logo{
  display: flex; align-items: center; justify-content: flex-start; gap: 14px;
  padding: 20px 24px; border-right: 1px solid var(--border);
}
.doc-logo svg{ width: 48px; height: 48px; flex-shrink: 0; }
.doc-logo-name{ font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.doc-meta{ display: grid; grid-template-columns: 1fr 1fr 1fr; }
.doc-meta > div{
  padding: 12px 16px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  font-size: 14px; min-height: 48px; display: flex; align-items: center; gap: 6px;
}
.doc-meta > div.doc-extra{ border-right: none; font-weight: 700; padding: 0; }
.doc-meta > div.doc-rev{ border-right: none; }
.doc-link{
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: 100%;
  padding: 12px 16px; background: none; border: 0; color: inherit; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: color .15s ease, background .15s ease;
}
.doc-link:hover{ color: var(--text); background: rgba(255,255,255,0.04); }
.doc-link:disabled{ opacity: .55; cursor: default; }
.doc-link svg{ width: 15px; height: 15px; flex-shrink: 0; opacity: .55; }
.doc-meta > div.last{ border-bottom: none; }
.doc-meta .doc-kind{
  grid-column: 1 / -1; justify-content: flex-start; border-right: none;
  font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--text-dim);
}
.doc-meta .lbl{ color: var(--text-dim); }
.doc-meta b{ font-family: var(--font-mono); font-size: 13px; font-weight: 600; white-space: nowrap; }
.doc-title{
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  padding: 20px 24px; border-top: 1px solid var(--border); background: var(--surface-2);
}
.doc-title h1{ font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 4.6vw, 28px); letter-spacing: -0.015em; margin: 0; line-height: 1.15; }

@media (max-width: 600px){
  .doc-head{ margin-bottom: 20px; }
  .doc-grid{ grid-template-columns: 1fr; }
  .doc-logo{ display: none; }
  .doc-meta{ display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 12px 14px; }
  .doc-meta > div{ padding: 0; min-height: 0; border: 0; font-size: 12px; gap: 4px; }
  .doc-meta .doc-kind{ display: none; }
  .doc-meta > div.doc-extra{ display: none; }   /* Historik vises som knap under valget */
  .doc-title{ padding: 12px 14px 14px; }
  .doc-title h1{ font-size: 18px; }
  .doc-instr{ padding: 10px 14px 12px; }
}

.logout-btn{
  flex-shrink: 0; background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.logout-btn:hover{ border-color: var(--border-input); color: var(--text); background: var(--surface-2); }

/* ---- Content ---- */
.machine-choice{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.machine-btn{
  --accent: #1E5FE0; --accent-dim: rgba(30,95,224,0.16);
  position: relative; overflow: hidden; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 150px;
  background: var(--surface); border: 1px solid var(--border-input); border-radius: 12px;
  color: var(--text); font-family: var(--font-body);
  padding: 20px 20px 18px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.machine-btn.feje{ --accent: #D9362A; --accent-dim: rgba(228,41,26,0.16); }
.machine-btn:hover{ background: var(--surface-2); }
.machine-btn:active{ transform: scale(0.98); }
.machine-name{ font-family: var(--font-display); font-weight: 700; font-size: clamp(17px, 4.4vw, 22px); letter-spacing: -0.01em; line-height: 1.2; }
.machine-foot{
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text-dim);
}
.machine-foot svg{ width: 18px; height: 18px; color: var(--accent); transition: transform .15s ease; }
.machine-btn:hover .machine-foot svg{ transform: translateX(3px); }

@media (max-width: 600px){
  body{ padding: max(16px, calc(env(safe-area-inset-top, 0px) + 12px)) 12px 90px; }
  .logout-btn{ padding: 10px 12px; font-size: 12px; }
  .machine-btn{ min-height: 96px; padding: 16px 16px 14px; }
}

/* ---- Tilbage-knap i topbaren ---- */
a.logout-btn{ display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
a.logout-btn svg{ width: 15px; height: 15px; }
.top-bar-left{ display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-bar-actions{ display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ---- Deaktiverede Export/History (skema uden data endnu) ---- */
.doc-link[aria-disabled="true"]{ opacity: .45; cursor: default; pointer-events: none; }

/* ---- Valg-overskrift og tom/fejl-tekst ---- */
.choice-title{ margin: 0 0 12px; font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--text); }
.notice-text{ color: var(--text-dim); font-size: 14px; margin: 6px 0 0; }
.machine-btn.wide{ grid-column: 1 / -1; }
a.machine-btn{ text-decoration: none; }

/* ---- Instruktionslinje under titlen ---- */
.doc-instr{
  margin: 0; padding: 10px 24px 14px; border-top: 1px solid var(--border); background: var(--surface-2);
  font-size: 13px; line-height: 1.5; color: var(--text-dim);
}
.report-choice{ margin-top: 12px; }


/* ============================================================
   Navy Tricolore — tilføjelser (16-11-2026)
   ============================================================ */
.top-bar .sub{ font-size: 14px; color: var(--text-dim); }
.logout-btn{ min-height: 44px; border-radius: 10px; }
.machine-btn::before{ content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 3px; background: var(--accent); }
/* Dagens status på kortet: tjekket i dag eller ej */
.machine-status{ display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-dim); }
.machine-status::before{ content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1.5px var(--text-faint); }
.machine-status.done{ color: var(--green); }
.machine-status.done::before{ background: var(--green); box-shadow: none; }
.history-btn{
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; min-height: 52px; border-radius: 12px;
  border: 1px solid var(--border-input); color: var(--text); font: 600 15px var(--font-body); text-decoration: none;
}
.history-btn:hover{ background: var(--surface-2); }
.history-btn svg{ width: 18px; height: 18px; color: var(--text-dim); }
