/* TidsReg – fælles udseende for app og arbejdsgiverprogram */
:root {
  --bg: #f4f6f5;
  --panel: #ffffff;
  --text: #15201b;
  --muted: #56635d;
  --line: #d9e0dc;
  --brand: #0e5e3a;
  --brand-ink: #ffffff;
  --brand-soft: #e3f1ea;
  --in: #0a7d3b;
  --out: #1f2a37;
  --warn: #8a5300;
  --warn-bg: #fff4dc;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --ok-bg: #e5f5ec;
  --focus: #1d6fe0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --panel: #18211d;
    --text: #e8efeb;
    --muted: #a3b1aa;
    --line: #2b3832;
    --brand: #3fb27a;
    --brand-ink: #062414;
    --brand-soft: #1b3127;
    --in: #34b36b;
    --out: #d7dee6;
    --warn: #ffc566;
    --warn-bg: #3a2c10;
    --danger: #ff8a80;
    --danger-bg: #3b1613;
    --ok-bg: #173323;
    --focus: #6aa8ff;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--brand); }
small, .muted { color: var(--muted); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; }
.stack > * + * { margin-top: 10px; }

label { display: block; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
input, select, textarea {
  font: inherit; color: inherit; background: var(--panel);
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 10px;
}
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
input[type=checkbox], input[type=radio] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--brand); }
textarea { min-height: 80px; resize: vertical; }

.btn {
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--panel); color: var(--text);
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: .92rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }

.msg { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.msg.err { background: var(--danger-bg); color: var(--danger); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.msg.ok { background: var(--ok-bg); color: var(--in); }

.badge {
  display: inline-block; font-size: .78rem; font-weight: 650; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); white-space: nowrap;
}
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--danger-bg); color: var(--danger); }
.badge.grey { background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: inherit; font-weight: 600; min-height: 44px; min-width: 56px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer;
}
.chip[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { font-size: .85rem; color: var(--muted); font-weight: 600; }
table.list td.r, table.list th.r { text-align: right; }
.num { font-variant-numeric: tabular-nums; }

dialog {
  border: none; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px));
  background: var(--panel); color: var(--text); box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog .dlg-body { padding: 20px; max-height: calc(100vh - 80px); overflow: auto; }
dialog .dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; max-width: calc(100vw - 32px);
  box-shadow: 0 6px 24px rgba(0,0,0,.25); font-weight: 600;
}
