:root {
  --nh-blue: #0066cc;
  --nh-blue-dark: #0050a1;
  --nh-bg: #eef1f5;           /* litt lysere bakgrunn, mer “app” */
  --nh-border: #dde3ec;
  --nh-text: #1f2933;
  --nh-danger: #d7263d;
  --nh-success: #15803d;
  --radius-lg: 12px;          /* litt strammere enn 14 */
  --radius-md: 8px;
  --shadow-card: 0 8px 26px rgba(15,23,42,0.03);
  --table-header: #f3f4f6;
  --muted: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--nh-bg);
  color: var(--nh-text);
  line-height: 1.5;
  font-size: 14px;           /* litt mindre, som prisma */
}

/* TOPP-LINJE --------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  padding: 10px 18px;
  min-height: 56px;
}

.topbar img.logo {
  height: 36px;
  width: 36px;
  object-fit: contain;
}

.topbar .title {
  font-weight: 600;
  font-size: 1rem;
}

.topbar .spacer {
  flex: 1;
}

.topbar .link,
.topbar button.link {
  background: transparent;
  border: none;
  color: #0f766e;           /* litt grønnblå, mer “prisma-ish” */
  cursor: pointer;
  font-size: 0.85rem;
}

/* PAGE WRAP ---------------------------------------------------- */
.container {
  max-width: 980px;
  margin: 22px auto 40px;
  padding: 0 16px;
}

/* CARD / PANEL ------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.02);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 20px 16px;
  margin-bottom: 18px;
}

.card h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

/* FORMER ------------------------------------------------------- */
label {
  display: block;
  margin: 6px 0 3px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
}

input, select, textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid #d0d6e1;
  font-size: 0.85rem;
  transition: border-color 0.12s ease-in-out;
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--nh-blue);
  box-shadow: 0 0 0 2px rgba(0,102,204,0.10);
}

/* KNAPPER ------------------------------------------------------ */
button.primary {
  background: var(--nh-blue);
  color: #fff;
  border: none;
  padding: 7px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  transition: background 0.12s;
}

button.primary:hover {
  background: var(--nh-blue-dark);
}

button.secondary {
  background: #fff;
  border: 1px solid #d0d6e1;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* SERIENUMMER-RADEN -------------------------------------------- */
.serial-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.serial-row input {
  flex: 1;
}

/* TABLE -------------------------------------------------------- */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.8rem;
}

.table th, .table td {
  border: 1px solid #e5e7eb;
  padding: 6px 7px;
}

.table th {
  background: var(--table-header);
  text-align: left;
  font-weight: 500;
  color: #374151;
}

/* BADGES ------------------------------------------------------- */
.badge-success {
  display: inline-block;
  background: rgba(22,163,74,0.08);
  color: #166534;
  border: 1px solid rgba(22,163,74,0.20);
  border-radius: 9999px;
  padding: 1px 10px 2px;
  font-size: 0.7rem;
}

.badge-danger {
  display: inline-block;
  background: rgba(220,38,38,0.05);
  color: #b91c1c;
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: 9999px;
  padding: 1px 10px 2px;
  font-size: 0.7rem;
}

.status-ok {
  color: var(--nh-success);
  font-weight: 500;
  margin-top: 6px;
}

.status-err {
  color: var(--nh-danger);
  font-weight: 500;
  margin-top: 6px;
}

/* FOOTER ------------------------------------------------------- */
.footer {
  text-align: center;
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 25px 0 40px;
}

/* GJEM "kopier statistikk" ------------------------------------- */
/* anta at du har en wrapper i index som vi kalte copyStatsWrap */
/* hvis ikke: gi checkboxen class="copy-stats" i HTML og bruk denne */
.copy-stats,
#copyStats,
label[for="copyStats"] {
  display: none !important;
}

/* SMÅSKJERM ---------------------------------------------------- */
@media (max-width: 720px) {
  .serial-row {
    flex-direction: column;
  }
  .container {
    max-width: 100%;
  }
  .topbar {
    flex-wrap: wrap;
  }
}
