/* NORTH STAR – designsystem */
:root {
  --navy-900: #0a1d3f;
  --navy-800: #0f2a5c;
  --navy-700: #163f8a;
  --blue: #1d57ad;
  --blue-2: #2f80d8;
  --sky: #e8f1fc;
  --bg: #f2f5fa;
  --card: #ffffff;
  --line: #e1e7f0;
  --line-2: #eef2f7;
  --text: #0f1b2d;
  --muted: #64748b;
  --primary: #1d57ad;
  --ok: #0f9d6b;
  --ok-bg: #e3f6ee;
  --warn: #c27c0e;
  --warn-bg: #fdf3dc;
  --err: #d0393e;
  --err-bg: #fde8e8;
  --info: #2f80d8;
  --info-bg: #e5f0fd;
  --gray-bg: #edf1f6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 4px 16px rgba(15, 27, 45, .05);
  font-family: "Manrope", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: 13.5px;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.sidebar {
  background: radial-gradient(120% 60% at 0% 0%, #1b4590 0%, transparent 60%), linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #d6e2f5; display: flex; flex-direction: column; padding: 20px 14px 14px; overflow-y: auto; overflow-x: hidden; position: relative;
}
.sidebar::after { /* diskret kompasslinje */
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, rgba(255,255,255,.18), transparent);
}
.logo { display: flex; align-items: center; gap: 9px; padding: 4px 2px 26px; color: #fff; white-space: nowrap; }
/* The bell keeps its full size and room for its count; the name gives way on narrow sidebars */
.logo > .logo-bjelle { flex: none; margin-left: auto; padding-right: 6px; }
.logo .badge { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); flex: none; }
.logo .badge img { width: 31px; height: auto; }
.logo .ord { font-weight: 800; font-size: 16px; letter-spacing: .1em; line-height: 1.1; min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.logo .ord small { display: block; font-weight: 500; font-size: 10px; letter-spacing: .08em; white-space: normal; color: #8fb3e6; margin-top: 3px; }
.nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: #7d9bc8; text-transform: uppercase; padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #d6e2f5;
  text-decoration: none; font-size: 13.5px; margin-bottom: 2px; position: relative; transition: background .15s;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: rgba(47,128,216,.22); color: #fff; font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #5aa5ff; }
.nav a .ico { width: 18px; display: grid; place-items: center; opacity: .9; }
.nav a .count { margin-left: auto; font-size: 11px; background: #5aa5ff; color: var(--navy-900); font-weight: 700; border-radius: 10px; padding: 1px 8px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.sprak { display: flex; gap: 2px; padding: 3px; margin: 0 4px 10px; background: rgba(0,0,0,.22); border-radius: 9px; }
.sprak button { flex: 1; border: 0; background: none; color: #b7cbea; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; padding: 5px 0; border-radius: 7px; cursor: pointer; }
.sprak button:hover { color: #fff; }
.sprak button.on { background: #fff; color: var(--navy-800); }
.user { display: flex; align-items: center; gap: 10px; padding: 6px 4px 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-2), var(--blue)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; border: 2px solid rgba(255,255,255,.25); }
/* Long names and company names are shortened with «…» (the whole text on hover), so the buttons keep their place */
.user .avatar { flex: none; }
.user-tekst { flex: 1; min-width: 0; }
.user .name { font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user .org { font-size: 11px; line-height: 1.3; color: #8fb3e6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.user button { flex: none; color: #b7cbea; }
.user .icon-btn { color: #b7cbea; display: inline-grid; place-items: center; }
.user a.icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.user button:hover { background: rgba(255,255,255,.1); }
.toll-status { font-size: 11px; display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,.18); color: #b7cbea; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }

.main { overflow-y: auto; }
.page-head {
  display: flex; align-items: center; gap: 12px; padding: 18px 28px; background: rgba(242,245,250,.85);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.page-head .spacer { flex: 1; }
.content { padding: 22px 28px 120px; }
.crumb { color: var(--muted); text-decoration: none; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.crumb:hover { color: var(--text); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; font-weight: 700; margin: 0; }
.card-head .spacer { flex: 1; }
.sub-card { border: 1px dashed #c9d6ea; border-radius: 12px; padding: 16px; background: #f8fbff; }
.sub-card h3 { margin: 0 0 14px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--navy-700); display: flex; align-items: center; gap: 6px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .app { grid-template-columns: 1fr; } .sidebar { display: none; } .content { padding: 16px; } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; position: relative; }
.field label { font-size: 11.5px; font-weight: 600; color: #3b4a60; }
.field .hint { font-size: 11px; color: var(--muted); }
.input, select.input, textarea.input {
  border: 1px solid #d3dce8; border-radius: 10px; padding: 8px 11px; background: #fff; min-height: 38px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #b7c5d9; }
.input:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(47,128,216,.18); }
.input[readonly], .input:disabled { background: #f4f7fb; color: #55657a; }
.input.sm { min-height: 30px; padding: 4px 8px; font-size: 12.5px; border-radius: 8px; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.input.err { border-color: var(--err); background: #fff8f8; }
textarea.input { min-height: 64px; resize: vertical; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 15px; height: 15px; }

.switch { position: relative; width: 36px; height: 20px; display: inline-block; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 20px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::before { transform: translateX(16px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #ccd7e6; background: #fff; color: var(--text);
  border-radius: 10px; padding: 7px 15px; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; min-height: 36px; transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: #f4f8fd; border-color: #b5c6de; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--blue-2), var(--blue)); border-color: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(29,87,173,.28); }
.btn.primary:hover { background: linear-gradient(180deg, #3a8ce4, #2160bb); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.light { background: #fff; }
.btn.danger { border-color: #f1c2c4; color: var(--err); background: #fff; }
.btn.danger:hover { background: var(--err-bg); }
.btn.sm { padding: 3px 10px; min-height: 28px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.big { min-width: 240px; min-height: 42px; }
.link { background: none; border: 0; color: var(--blue); font-weight: 600; cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 5px 7px; border-radius: 8px; line-height: 1; color: var(--muted); }
.icon-btn:hover { background: var(--gray-bg); color: var(--text); }

.seg { display: inline-flex; gap: 2px; padding: 3px; background: #e4eaf3; border-radius: 11px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: #4b5b72; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: #fff; color: var(--navy-700); box-shadow: 0 1px 3px rgba(15,27,45,.12); }
.seg button:hover:not(.on) { color: var(--text); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-weight: 700; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #f8fafd; }
.tbl thead tr th:first-child { border-top-left-radius: var(--radius); }
.tbl thead tr th:last-child { border-top-right-radius: var(--radius); }
.tbl td { padding: 0 12px; height: 50px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl.compact th { padding: 8px 10px; background: transparent; }
.tbl.compact td { height: 38px; padding: 0 10px; font-size: 12.5px; }
.tbl tr.click { cursor: pointer; transition: background .12s; }
.tbl tr.click:hover td { background: #f5f9ff; }
.tbl tr.click td:first-child { box-shadow: inset 3px 0 0 var(--rad, transparent); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .c { text-align: center; }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; background: #f8fafd; }
.tbl td.wrap { white-space: normal; }
.tbl .tittel { font-weight: 700; color: var(--navy-800); }
.muted { color: var(--muted); }
.mono { font-family: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 44px 10px !important; height: auto !important; }

/* ---------- Statusmerker ---------- */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gray-bg); color: #475569; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.sm { padding: 2px 9px 2px 7px; font-size: 11px; }
.pill.ikon::before { display: none; }
.pill.klar, .pill.akseptert { background: var(--ok-bg); color: var(--ok); }
.pill.passert, .pill.frigitt { background: var(--ok); color: #fff; }
.pill.sendt { background: var(--warn-bg); color: var(--warn); }
.pill.avvist, .pill.kontroll { background: var(--err-bg); color: var(--err); }
.pill.info { background: var(--info-bg); color: var(--blue); }
.tag { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.tag.gray { background: var(--gray-bg); color: #475569; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.red { background: var(--err-bg); color: var(--err); }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.st .box { width: 9px; height: 9px; border-radius: 3px; transform: rotate(45deg); display: inline-block; background: #94a3b8; }
.st.utkast .box { background: var(--warn); }
.st.klargjort .box { background: var(--blue-2); }
.st.sendt .box { background: #e0a83a; }
.st.godkjent .box { background: var(--ok); }
.st.avvist .box { background: var(--err); }

/* ---------- Statuskort (manifestliste) ---------- */
.statuskort { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1100px) { .statuskort { grid-template-columns: repeat(3, 1fr); } }
.sk { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; cursor: pointer; text-align: left; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: border-color .15s, transform .1s; }
.sk:hover { border-color: #b5c6de; transform: translateY(-1px); }
.sk::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--k, #94a3b8); opacity: .8; }
.sk.on { border-color: var(--k); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k) 18%, transparent); }
.sk .lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.sk .val { font-size: 26px; font-weight: 800; margin-top: 4px; color: var(--navy-800); font-variant-numeric: tabular-nums; }

/* ---------- Fremdriftslinje ---------- */
.steg { display: flex; align-items: flex-start; margin: 0 0 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.steg .s { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); gap: 7px; }
.steg .s::before { content: ""; position: absolute; top: 14px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.steg .s:first-child::before { display: none; }
.steg .s .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid #cbd5e1; z-index: 1; font-size: 12px; font-weight: 800; }
.steg .s.ferdig { color: var(--text); }
.steg .s.ferdig .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.steg .s.ferdig::before, .steg .s.aktiv::before { background: var(--ok); }
.steg .s.aktiv { color: var(--blue); }
.steg .s.aktiv .n { border-color: var(--blue-2); color: var(--blue); box-shadow: 0 0 0 5px rgba(47,128,216,.15); }
.steg .s.feil .n { border-color: var(--err); color: var(--err); box-shadow: 0 0 0 5px rgba(208,57,62,.12); }
.steg .s.feil { color: var(--err); }
.steg .s small { font-weight: 500; color: var(--muted); font-size: 11px; }

/* ---------- Misc ---------- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice { border: 0; border-left: 4px solid var(--warn); background: var(--warn-bg); border-radius: 10px; padding: 12px 16px; font-size: 13px; color: #5c4510; }
.notice.ok { border-left-color: var(--ok); background: var(--ok-bg); color: #0b5a3e; }
.notice.err { border-left-color: var(--err); background: var(--err-bg); color: #7c1d20; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.notice a { color: inherit; font-weight: 700; }
.sticky-foot {
  position: fixed; bottom: 18px; right: 28px; padding: 10px; display: flex; gap: 10px; align-items: center;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 36px rgba(15,27,45,.16); z-index: 4;
}
@media (max-width: 800px) { .sticky-foot { left: 12px; right: 12px; } }
.log { list-style: none; padding: 0 0 0 4px; margin: 0; font-size: 12.5px; }
.log li { display: flex; gap: 14px; padding: 8px 0 8px 18px; position: relative; border-left: 2px solid var(--line); }
.log li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #b5c6de; }
.log time { color: var(--muted); min-width: 118px; font-variant-numeric: tabular-nums; }
.log .ok { color: var(--ok); } .log .err { color: var(--err); } .log .warn { color: var(--warn); }
.mrn { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.mrn code { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13.5px; letter-spacing: .04em; background: var(--sky); color: var(--navy-700); padding: 4px 9px; border-radius: 7px; font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font-size: 28px; font-weight: 800; margin-top: 6px; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 150px 1fr 40px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar .track { height: 10px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); border-radius: 6px; }

.sum-box { border-radius: var(--radius); padding: 16px 18px; background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #d6e2f5; min-width: 320px; box-shadow: 0 10px 30px rgba(10,29,63,.25); }
.sum-box .line { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.sum-box .line.tot { border-top: 1px solid rgba(255,255,255,.18); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 17px; color: #fff; }

/* ---------- Modal / popover / toast ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(10,29,63,.45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 18px; width: min(580px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 30px 70px rgba(10,29,63,.35); animation: pop .18s ease-out; overflow: hidden; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal.wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f8fbff, #fff); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; flex: 1; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: #f8fafd; }
.popover { position: fixed; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,27,45,.18); padding: 5px; z-index: 40; min-width: 190px; }
.popover button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.popover button:hover { background: var(--sky); }
.popover button.danger { color: var(--err); }
.toasts { position: fixed; top: 18px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--navy-800); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13px; font-weight: 500; box-shadow: 0 10px 28px rgba(10,29,63,.3); animation: tin .22s ease-out; max-width: 400px; border-left: 4px solid var(--blue-2); }
.toast.ok { border-left-color: #34d399; } .toast.err { border-left-color: #f87171; }
@keyframes tin { from { transform: translateX(16px); opacity: 0; } }
.spin { display: inline-block; width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.help h3 { margin: 26px 0 10px; font-size: 15px; font-weight: 800; color: var(--navy-800); }
.help p, .help li { line-height: 1.65; max-width: 840px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--sky); color: var(--blue); font-weight: 800; display: grid; place-items: center; font-size: 12px; }

/* ---------- Oversiktlige lister og detaljsider ---------- */
/* Innholdet fyller hele bredden; lange tekster (hjelp) har egen lesebredde */
.verktoy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.verktoy .spacer { flex: 1; }
.sokefelt { position: relative; width: 300px; }
.sokefelt svg { position: absolute; left: 11px; top: 11px; color: #94a3b8; }
.sokefelt .input { padding-left: 34px; }

/* Statuskort – slankere */
.statuskort { gap: 10px; margin-bottom: 16px; }
.sk { padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sk .lbl { font-size: 11px; letter-spacing: .06em; }
.sk .val { font-size: 22px; margin: 0; }

/* Dagsgrupper i tabell */
.tbl tr.gruppe td { height: auto; padding: 14px 14px 8px; background: transparent; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 800; color: var(--navy-700); letter-spacing: .02em; }
.tbl tr.gruppe td .ant { font-weight: 600; color: var(--muted); margin-left: 6px; }
.tbl tr.gruppe:first-child td { padding-top: 10px; }
.tbl.luft td { height: 62px; }
.hoved { font-weight: 700; color: var(--navy-800); font-size: 14px; }
.under { font-size: 12px; color: var(--muted); margin-top: 2px; }
.eta { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; color: var(--navy-800); }
.eta small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* Fremdriftsmåler */
.meter { width: 120px; height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 6px; background: var(--blue-2); }
.meter.full span { background: var(--ok); }
.meter-tekst { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* Neste steg */
.neste { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.neste.ok { color: var(--ok); }
.neste.varsel { color: var(--warn); }
.neste.feil { color: var(--err); }
.neste.ferdig { color: var(--muted); font-weight: 600; }
.ansvarlig { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.initialer { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--sky); color: var(--navy-700); font-size: 11px; font-weight: 800; }

/* To-kolonne detaljside */
.to-kol { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
@media (max-width: 1150px) { .to-kol { grid-template-columns: 1fr; } .sidepanel { position: static !important; } }
.sidepanel { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }
.sidepanel .card { margin: 0; }
.panel-neste { border: 0; color: #fff; background: linear-gradient(150deg, var(--blue-2), var(--navy-700)); box-shadow: 0 10px 28px rgba(22,63,138,.28); }
.panel-neste.ok { background: linear-gradient(150deg, #19b47c, #0b7a53); box-shadow: 0 10px 28px rgba(15,157,107,.25); }
.panel-neste.feil { background: linear-gradient(150deg, #e2585c, #a8282c); box-shadow: 0 10px 28px rgba(208,57,62,.25); }
.panel-neste.ferdig { background: linear-gradient(150deg, #334766, var(--navy-900)); }
.panel-neste .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.panel-neste .tittel { font-size: 18px; font-weight: 800; margin: 6px 0 4px; line-height: 1.25; }
.panel-neste .tekst { font-size: 12.5px; opacity: .9; line-height: 1.45; }
.panel-neste .knapper { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.panel-neste .btn { width: 100%; }
.panel-neste .btn.primary { background: #fff; color: var(--navy-800); border-color: #fff; box-shadow: none; }
.panel-neste .btn.primary:hover { background: #eef4fd; }
.panel-neste .btn.light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.panel-neste .btn.light:hover { background: rgba(255,255,255,.12); }
.panel-neste .btn:disabled { opacity: .55; }

.sjekk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sjekk li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 13px; }
.sjekk .ik { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid #cbd5e1; color: #fff; margin-top: -1px; }
.sjekk li.ok .ik { background: var(--ok); border-color: var(--ok); }
.sjekk li.feil .ik { border-color: var(--err); color: var(--err); font-weight: 800; font-size: 11px; }
.sjekk li.ok .t { color: var(--muted); }
.sjekk .t small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }

.fakta { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; margin: 0; font-size: 13px; }
.fakta dt { color: var(--muted); font-size: 12px; }
.fakta dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.fakta dd.mono { font-weight: 600; }

/* Låste felt som tekst */
.ro { display: flex; flex-direction: column; gap: 4px; }
.ro label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ro div { font-size: 14px; font-weight: 600; color: var(--text); min-height: 20px; }
.ro div.tom { color: #a3afc0; font-weight: 500; }
.card-head .hint { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Tolletatens data: velger for varenummer og info på vareposter (js/tolldata-klient.js, js/fortolling.js) */
.vv-liste { max-height: 58vh; overflow: auto; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.vv-liste details { margin: 2px 0; }
.vv-liste summary { cursor: pointer; padding: 3px 4px; border-radius: 6px; line-height: 1.4; }
.vv-liste summary:hover { background: var(--gray-bg, #f1f5f9); }
.vv-barn { padding-left: 16px; border-left: 1px dashed var(--line, #e2e8f0); margin-left: 6px; }
.vv-vare { cursor: pointer; padding: 4px 6px; border-radius: 6px; line-height: 1.4; }
.vv-vare:hover { background: var(--ok-bg, #e7f6ef); }
.vv-vare .mono { font-weight: 700; margin-right: 6px; }
.vp-info { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.6; max-width: 460px; }
.vp-info .tag { font-size: 10.5px; padding: 1px 7px; white-space: normal; }
.vp-bevis { display: flex; align-items: center; gap: 3px; font-size: 10.5px; margin-top: 4px; justify-content: center; white-space: nowrap; }
.feil-tekst { color: var(--err); font-weight: 700; }

/* Datofilter i manifestlisten (js/app.js) */
.datofilter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Tolltariff (Tolletatens tariff) ---------- */
.tt-kol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .tt-kol { grid-template-columns: 1fr; } }
.tt-venstre { position: sticky; top: 92px; padding: 16px; }
@media (max-width: 1100px) { .tt-venstre { position: static; } }
.tt-liste { margin-top: 12px; max-height: calc(100vh - 230px); overflow-y: auto; margin-right: -8px; padding-right: 8px; }
.tt-gren { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text); line-height: 1.35; }
.tt-gren:hover { background: var(--sky); }
.tt-gren b { color: var(--navy-700); white-space: nowrap; }
.tt-gren .tt-tekst { flex: 1; }
.tt-pil { display: inline-grid; place-items: center; color: var(--muted); transition: transform .15s; margin-top: 1px; flex: none; }
.tt-gren.apen .tt-pil { transform: rotate(90deg); color: var(--blue); }
.tt-ant { font-size: 11px; color: var(--muted); background: var(--gray-bg); border-radius: 10px; padding: 1px 7px; flex: none; }
.tt-avsnitt > .tt-gren { font-weight: 700; color: var(--navy-800); }
.tt-barn { margin-left: 14px; padding-left: 8px; border-left: 1px solid var(--line); }
.tt-vare { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13px; line-height: 1.35; }
.tt-vare:hover { background: var(--sky); }
.tt-vare.on { background: var(--blue); color: #fff; }
.tt-vare.on .mono, .tt-vare.on .tt-sti { color: #dbe8fb; }
.tt-vare .mono { color: var(--navy-700); font-weight: 600; }
.tt-sti { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tt-treff { border-bottom: 1px solid var(--line-2); border-radius: 0; }
.tt-ant-treff { font-size: 12px; color: var(--muted); margin: 0 8px 6px; }
.tt-laster { color: var(--muted); font-size: 12.5px; padding: 8px; }
.tt-hoyre .card { margin-bottom: 14px; }
.tt-tom { text-align: center; padding: 48px 24px; color: var(--muted); }
.tt-tom h3 { color: var(--navy-900); margin: 12px 0 6px; }
.tt-brod { font-size: 12px; color: var(--muted); line-height: 1.5; }
.tt-kode { font-size: 22px; font-weight: 800; color: var(--blue); letter-spacing: .02em; margin-top: 6px; }
.tt-navn { font-size: 19px; margin: 4px 0 0; color: var(--navy-900); }
.tt-ord { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12.5px; }
.tt-stor { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0 10px; }
.tt-stor b { font-size: 22px; color: var(--navy-800); }
.tt-rad { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.tt-rad b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tt-rad.ok b { color: var(--ok); }
.tt-avtaler { max-height: 340px; overflow-y: auto; margin-right: -8px; padding-right: 8px; }
.tt-restr { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.tt-restr svg { color: var(--warn); flex: none; margin-top: 2px; }
.tt-hoyre .hint { margin-top: 8px; display: block; }

/* ---------- Innlogging ---------- */
/* Delt side: himmelen fra forsiden (docs/) til venstre, skjemaet til høyre */
body.ute .app { display: none; }
#innlogging { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr); background: #fff; }
.li-merke { position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background: radial-gradient(70% 55% at 78% 18%, rgba(47,128,216,.35), transparent 60%), radial-gradient(60% 40% at 15% 30%, rgba(79,227,193,.12), transparent 70%), linear-gradient(180deg, #050f24 0%, var(--navy-900) 45%, #12306a 100%); }
.li-stjerner { position: absolute; inset: 0; z-index: -1; }
.li-stjerner i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: li-blink 4s ease-in-out infinite; }
@keyframes li-blink { 50% { opacity: .12; } }
.li-nordlys { position: absolute; left: -10%; right: -10%; top: 10%; height: 46%; z-index: -1; filter: blur(48px); opacity: .5;
  background: conic-gradient(from 200deg at 50% 60%, transparent 0deg, rgba(79,227,193,.55) 40deg, rgba(47,128,216,.45) 90deg, transparent 140deg, rgba(120,90,255,.25) 200deg, transparent 260deg);
  animation: li-drift 18s ease-in-out infinite alternate; }
@keyframes li-drift { to { transform: translateX(6%) skewX(-6deg); } }
.li-polaris { position: absolute; top: 12%; right: 12%; width: 84px; height: 84px; z-index: -1; filter: drop-shadow(0 0 18px rgba(156,199,255,.9)); }
.li-fjell { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26vh; min-height: 140px; max-height: 240px; z-index: -1; }
.li-merke-inn { min-height: 100%; display: flex; flex-direction: column; padding: 36px clamp(28px, 5vw, 64px) 40px; }
.li-budskap { margin: auto 0; max-width: 520px; padding: 40px 0 140px; animation: li-inn .8s cubic-bezier(.2,.7,.2,1) both; }
@keyframes li-inn { from { opacity: 0; transform: translateY(18px); } }
.li-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9cc7ff; padding: 6px 13px; border-radius: 999px; background: rgba(156,199,255,.1); border: 1px solid rgba(156,199,255,.25); }
.li-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #4fe3c1; box-shadow: 0 0 10px #4fe3c1; }
.li-budskap h2 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1; letter-spacing: -.035em; margin: 20px 0 18px; font-weight: 800; color: #fff; }
.li-budskap .glod { background: linear-gradient(90deg, #fff, #9cc7ff 45%, #4fe3c1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.li-budskap p { font-size: 16.5px; line-height: 1.6; color: #c9d8f0; margin: 0 0 24px; }
.li-budskap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: #dbe6f7; }
.li-budskap li { display: flex; align-items: center; gap: 10px; }
.li-budskap li svg { flex: none; color: #4fe3c1; }
.li-tilbake { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #c9d8f0; text-decoration: none; padding: 7px 12px; border-radius: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.li-tilbake:hover { background: rgba(255,255,255,.14); color: #fff; }

.li-skjema { display: flex; flex-direction: column; padding: 28px clamp(24px, 4vw, 56px) 24px; min-height: 100vh; }
.li-topp { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.li-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .16em; color: var(--navy-800); }
.li-logo .badge { width: 38px; height: 38px; border-radius: 10px; background: var(--sky); display: grid; place-items: center; }
.li-logo img { width: 30px; }
.li-logo.lys { color: #fff; }
.li-logo.lys .badge { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.li-sprak { background: var(--gray-bg); margin: 0; width: 96px; }
.li-sprak button { color: var(--muted); }
.li-sprak button.on { background: #fff; color: var(--navy-800); box-shadow: 0 1px 3px rgba(15,27,45,.12); }
.li-kort { width: min(420px, 100%); margin: auto; padding: 32px 0; }
.li-kort h1 { font-size: 30px; margin: 0 0 6px; color: var(--navy-900); letter-spacing: -.025em; font-weight: 800; }
.li-ingress { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 24px; }
.li-kort form { display: flex; flex-direction: column; gap: 16px; }
.li-kort .field label { font-weight: 600; }
.li-kort .input { min-height: 44px; font-size: 14.5px; }
.li-to { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.li-pass { position: relative; }
.li-pass .input { width: 100%; padding-right: 46px; }
.li-oye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 36px; border: 0; background: none; border-radius: 8px; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.li-oye:hover { color: var(--navy-800); background: var(--sky); }
.li-oye:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 1px; }
.li-caps { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--warn, #c27c0e); }
.li-caps[hidden] { display: none; }
.li-husk { align-items: flex-start; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--navy-900); }
.li-husk input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.li-husk small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 2px; }
.li-feil { display: flex; align-items: center; gap: 8px; color: var(--err); background: var(--err-bg); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.li-feil:empty { display: none; }
.btn-li { width: 100%; min-height: 46px; font-size: 15px; justify-content: center; }
.btn-li.laster { pointer-events: none; }
.btn-li.laster::after { content: ""; width: 16px; height: 16px; margin-left: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: li-spinn .7s linear infinite; }
@keyframes li-spinn { to { transform: rotate(360deg); } }
.rist { animation: li-rist .35s ease; }
@keyframes li-rist { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.li-hjelp { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.li-hjelp b { color: var(--navy-900); font-weight: 700; }
.li-demo { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--blue-50, #eef4ff); border: 1px solid var(--line); display: grid; gap: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.li-demo b { color: var(--navy-900); font-weight: 700; }
.li-demo .btn-li { min-height: 42px; font-size: 14px; gap: 8px; }
.li-valg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.li-valg .check { align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; font-weight: 700; color: var(--navy-900); cursor: pointer; }
.li-valg .check:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.li-valg input { margin: 2px 0 0; accent-color: var(--blue); flex: none; }
.li-valg small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 2px; }
.li-etikett { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.li-etikett label { margin: 0; }
.li-glemt { font-size: 12.5px; }
.li-lenke { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--blue); text-decoration: none; }
.li-takk { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg, #e7f6ee); color: var(--ok, #16824a); margin-bottom: 14px; }
.li-hint { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin: 16px 0 0; }
.li-bunn { text-align: center; font-size: 12px; color: var(--muted); margin: 0; }

@media (max-width: 900px) {
  #innlogging { grid-template-columns: 1fr; }
  .li-merke { min-height: 0; }
  .li-merke-inn { padding: 22px 20px 26px; }
  .li-tilbake, .li-budskap ul, .li-budskap p, .li-eyebrow, .li-polaris, .li-fjell { display: none; }
  .li-budskap { padding: 0; margin: 0; }
  .li-budskap h2 { font-size: 28px; margin: 16px 0 0; }
  .li-skjema { min-height: 0; padding: 16px 16px 28px; }
  .li-kort { padding: 8px 0 24px; }
}
@media (max-width: 480px) { .li-to, .li-valg { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .li-stjerner i, .li-nordlys, .li-budskap, .rist { animation: none; } }

/* Delte manifester */
.delt-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.delt-liste li { display: flex; align-items: center; gap: 8px; }
.delt-liste svg { color: var(--muted, #64748b); }

/* Valutakurser fra Tolletaten (js/tollkurser.js) */
.kurs-tabell tr.valgt td, .kurs-perioder tr.valgt td { background: var(--ok-bg, #e7f6ef); }
.kurs-endring { font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.kurs-endring.opp { color: var(--err); }
.kurs-endring.ned { color: var(--ok); }
.kurs-graf { width: 100%; height: auto; display: block; margin: 4px 0 10px; }
.kurs-graf .linje { fill: none; stroke: var(--navy-700, #163f8a); stroke-width: 2; }
.kurs-graf .hjelpelinje { stroke: var(--line, #e2e8f0); stroke-dasharray: 3 4; }
.kurs-graf .idag { stroke: var(--warn, #c27c0e); stroke-dasharray: 2 3; }
.kurs-graf text { font-size: 11px; fill: var(--muted, #64748b); }
.kurs-tall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.kurs-tall div { background: var(--gray-bg, #f1f5f9); border-radius: 9px; padding: 8px 10px; }
.kurs-tall span { display: block; font-size: 11px; color: var(--muted); }
.kurs-tall b { font-size: 14px; }
@media (max-width: 700px) { .kurs-tall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kurs-perioder { max-height: 320px; overflow-y: auto; }

/* ---------- Tolldeklarasjon (EMMA-inspirert: fakturaer, tette tabeller, hurtigtaster) ---------- */
.td-skjerm { padding-bottom: 90px; }
.td-hode .grid { gap: 10px 14px; }
.td-tabell .input.sm { min-height: 30px; }
.td-tabell tfoot td { border-top: 2px solid var(--line); padding-top: 9px; font-size: 12.5px; }
.td-rest { font-weight: 700; font-variant-numeric: tabular-nums; }
.td-rest.feil { color: var(--err); }
.td-rest.ok { color: var(--ok); }
.td-belop { display: flex; align-items: center; gap: 5px; }
.td-belop span { font-size: 11px; font-weight: 700; color: var(--muted); }
.tastelinje { position: fixed; left: 248px; right: 0; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 4px; padding: 7px 18px; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(15,27,45,.06); }
.tastelinje button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 5px 9px; border-radius: 8px; font: inherit; font-size: 12px; color: var(--navy-800); cursor: pointer; }
.tastelinje button:hover { background: var(--sky); }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px; background: #f8fafc; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 600; color: var(--navy-800); text-align: center; }
@media (max-width: 800px) { .tastelinje { display: none; } }
.td-tabell td { padding: 4px 7px; height: auto; vertical-align: top; }
.td-tabell td.r, .td-tabell td.c, .td-tabell td.muted { padding-top: 10px; }
.td-tabell .vp-info { white-space: normal; min-width: 180px; max-width: 360px; }
.td-tabell select.input.sm { max-width: 150px; }

/* ---------- Les faktura med AI ---------- */
.ai-slipp { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 20px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; cursor: pointer; color: var(--navy-800); transition: background .15s, border-color .15s; }
.ai-slipp:hover, .ai-slipp.over { background: var(--sky); border-color: var(--blue-2); }
.ai-slipp span { font-size: 12.5px; color: var(--muted); }
.ai-slipp[hidden] { display: none; }
.ai-jobber { display: flex; align-items: center; gap: 14px; padding: 22px; background: var(--sky); border-radius: 12px; }
.ai-jobber span:not(.ai-spinn) { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ai-spinn { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(47,128,216,.25); border-top-color: var(--blue-2); animation: li-spinn .8s linear infinite; }
.ai-hode { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ai-hode div { background: #f8fafd; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.ai-hode span { display: block; font-size: 11px; color: var(--muted); }
.ai-hode b { font-size: 13px; }
.ai-alt { margin-top: 3px; font-size: 11.5px; }

/* ---------- Feltnumre og kilder i tolldeklarasjonen ---------- */
.boks { display: inline-grid; place-items: center; min-width: 20px; height: 17px; padding: 0 4px; margin-right: 5px; border-radius: 5px; background: var(--sky); color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: 0; vertical-align: 1px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; text-transform: none; }
.kilde { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #eef8f4; color: #0b7a55; font-size: 10px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.td-parter { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 1100px) { .td-parter { grid-template-columns: 1fr; } }
.td-under { font-size: 12px; font-weight: 800; color: var(--navy-800); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.td-postnr { display: flex; gap: 6px; }
.td-postnr .input:last-child { flex: 1; }
.td-apne { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 2px 4px; border-radius: 6px; color: var(--muted); font: inherit; cursor: pointer; }
.td-apne svg { transition: transform .15s; }
.td-apne.on svg { transform: rotate(90deg); }
.td-apne:hover { background: var(--sky); color: var(--navy-800); }
.td-detalj td { background: #f8fafd; padding: 10px 12px 14px !important; white-space: normal; }
.td-dokrad { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ro-verdi { padding: 6px 0; font-weight: 700; }
.td-dok { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.td-dok li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; }
.td-dok li span { display: block; color: var(--muted); font-size: 11.5px; }
.sum-box small { opacity: .7; }
.td-detalj-inn { max-width: 980px; }
.ai-filer { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.ai-filer li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; }
.ai-filer li span { flex: 1; }
.ai-filer li small { color: var(--muted); }
.ai-tittel { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy-800); margin: 16px 0 8px; }

/* Dokumenter på forsendelser (js/dokumenter.js) */
.dok-liste { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.dok-rad { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.dok-rad > svg { flex: none; color: var(--muted); }
.dok-navn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dok-navn a, .dok-navn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dok-navn small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.dok-slipp { padding: 16px 14px; }
.ai-vedlagte { display: grid; gap: 6px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; }

/* Tilgang per bruker */
.tilgang-valg { display: grid; gap: 10px; }
.tilgang-valg .check { align-items: flex-start; gap: 10px; }
.tilgang-valg .check input { margin-top: 3px; }
.tilgang-valg small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- Gjestetilgang ---------- */
.gjest-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 28px 0; padding: 10px 14px; border-radius: 12px; background: var(--sky); color: var(--navy-800); font-size: 13px; }
.gjest-banner > span { flex: 1; min-width: 240px; }
.gjest-banner.lesetilgang { background: #fff6e5; color: #7a4d05; }
.gjest-tur { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafd; }
.gjest-tur span { display: block; color: var(--muted); font-size: 12.5px; }
.gjest-tur svg { color: var(--blue); flex: none; }
.gjest-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gjest-liste li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.gjest-liste li > div { flex: 1; min-width: 0; }
.gjest-liste li span:not(.tag) { display: block; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
