/* Joa Data Fjernhjelp – felles stil.
   Endre --brand for å bytte hovedfarge. */
:root {
  --brand: #104288;
  --brand-dark: #0b2f63;
  --brand-soft: #e7eef6;
  --ok: #1f8a4c;
  --warn: #b7791f;
  --danger: #c0392b;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #17202b;
  --muted: #5d6b7a;
  --line: #dde3ea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 4px 16px rgba(16, 32, 48, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4c8fd0;
    --brand-dark: #2f6eac;
    --brand-soft: #18283a;
    --bg: #0f141a;
    --surface: #171e26;
    --text: #e7ecf2;
    --muted: #93a1b0;
    --line: #2a3440;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
.hidden { display: none !important; }
button, input, select { font: inherit; }

.brandline { display: flex; align-items: center; gap: 12px; }
.brandline .logo { height: 46px; width: 46px; object-fit: contain; flex: none; }
.login .brandline .logo { height: 72px; width: 72px; }
.help header .logo { height: 64px; width: 64px; }
.brandline .product { color: var(--muted); font-weight: 500; font-size: 17px; }
.brandline .product b { color: var(--brand); font-weight: 700; }


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 8px;
  padding: 9px 16px; cursor: pointer; font-weight: 600;
  background: var(--brand); color: #fff; text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #a03024; }

input[type=text], input[type=password], select {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
input:focus-visible, select:focus-visible, .btn:focus-visible, canvas:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); margin-top: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.col { display: grid; gap: 20px; align-content: start; }
.programs .dl {
  display: block; margin-top: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); text-decoration: none; transition: border-color .15s, background .15s;
}
.programs .dl:hover { border-color: var(--brand); background: var(--brand-soft); }
.programs .dl b { display: block; color: var(--brand); }
.programs .dl span { display: block; font-size: 13px; color: var(--muted); }
.programs #installApp { width: 100%; margin-top: 14px; }
.big-input { font-size: 22px !important; letter-spacing: 2px; font-variant-numeric: tabular-nums; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card p.sub { margin: 0; color: var(--muted); font-size: 14px; }

.msg { margin-top: 14px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.msg.err { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.msg.info { background: var(--brand-soft); color: var(--text); }

/* ---------- innlogging ---------- */
.center { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 380px; }
.login .brandline { margin-bottom: 18px; }
.login .btn { width: 100%; margin-top: 18px; }

/* ---------- dashbord ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.topbar .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.linkbox {
  display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 4px 4px 10px;
}
.linkbox code { color: var(--text); font-size: 13px; }
.grid {
  display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px;
  padding: 20px; max-width: 1200px; margin: 0 auto;
}
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; padding: 16px; } }
.connect .btn { width: 100%; margin-top: 18px; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
td.id { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--muted); }
.pill.busy { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.empty { color: var(--muted); padding: 22px 4px 6px; font-size: 14px; }
.tablewrap { overflow-x: auto; }

/* ---------- økt ---------- */
.session { position: fixed; inset: 0; display: flex; flex-direction: column; background: #0b0e12; }
.toolbar {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; flex-wrap: wrap;
  background: #151b22; color: #dfe6ee; border-bottom: 1px solid #222b35; font-size: 13px;
}
.toolbar .who { font-weight: 600; margin-right: 6px; white-space: nowrap; }
.toolbar select { width: auto; padding: 4px 8px; background: #1e2630; color: #dfe6ee; border-color: #2c3744; font-size: 13px; }
.toolbar .btn.ghost { color: #dfe6ee; border-color: #2c3744; }
.toolbar .btn.ghost:hover { background: #222c37; }
.toolbar .spacer { flex: 1; }
.toolbar .stats { color: #8796a6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stage { flex: 1; position: relative; display: grid; place-items: center; overflow: hidden; }
#screen { background: #000; cursor: default; display: block; }
.overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #dfe6ee; text-align: center; padding: 20px; background: rgba(11,14,18,.85);
}
.overlay .spinner {
  width: 36px; height: 36px; border-radius: 50%; margin: 0 auto 14px;
  border: 3px solid #2c3744; border-top-color: #6fa8dc; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal { width: 100%; max-width: 460px; }
.modal textarea {
  width: 100%; min-height: 110px; padding: 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; resize: vertical;
}
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ---------- kundeside ---------- */
.help { max-width: 640px; margin: 0 auto; padding: 28px 16px 48px; }
.help header { margin-bottom: 26px; }
.help h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
.help .lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; }
.help .btn.huge { font-size: 18px; padding: 15px 26px; border-radius: 10px; }
.steps { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps .n {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20;
  max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 10px;
  background: #17202b; color: #eef3f8; box-shadow: 0 6px 24px rgba(0,0,0,.35); font-size: 14px;
}
.choices { display: grid; gap: 10px; margin-top: 16px; }
.choices .btn { width: 100%; }
.sub.small { font-size: 13px; margin-top: 12px; }
.msg .linkbtn { margin-left: 8px; background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.pill.login { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill.fixed { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.note { margin-top: 26px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
