:root {
  --ink: #102c31;
  --muted: #6c7c7a;
  --paper: #f3f1e9;
  --panel: #fffdf8;
  --line: #d9ded8;
  --green: #007c6d;
  --green-soft: #d9eee8;
  --lime: #b8e14b;
  --orange: #eb7f46;
  --shadow: 0 18px 50px rgba(16, 44, 49, .09);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .42; background-image: radial-gradient(rgba(16,44,49,.09) .6px, transparent .6px); background-size: 5px 5px; }
button, input, select { font: inherit; }
button { border: 0; border-radius: 9px; padding: 11px 16px; color: white; background: var(--green); font-weight: 700; cursor: pointer; transition: transform .15s, filter .15s; }
button:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: progress; transform: none; }
button.secondary { color: var(--ink); background: transparent; border: 1px solid var(--line); }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,124,109,.11); }
.topbar { position: relative; z-index: 2; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - 1320px)/2)); border-bottom: 1px solid rgba(16,44,49,.12); }
.brand { display: flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; font-size: 18px; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; color: var(--lime); background: var(--ink); font-weight: 900; }
.connection { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 13px; }
.connection button { padding: 7px 10px; font-size: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #aab2b0; box-shadow: 0 0 0 4px rgba(170,178,176,.15); }
.dot.online { background: #0ba97e; box-shadow: 0 0 0 4px rgba(11,169,126,.15); }
main { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 55px 28px 80px; }
.pair-shell { min-height: calc(100vh - 185px); display: grid; align-content: center; grid-template-columns: 1.15fr .85fr; column-gap: 8vw; }
.eyebrow, .kicker { color: var(--green); font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 10px 0 16px; max-width: 780px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 6vw, 90px); line-height: .94; letter-spacing: -.055em; font-weight: 500; }
h1 em { color: var(--green); font-weight: 400; }
.lead { max-width: 590px; color: var(--muted); font-size: 20px; line-height: 1.55; }
.pair-card { align-self: center; padding: 30px; background: var(--panel); border: 1px solid rgba(16,44,49,.12); border-radius: 16px; box-shadow: var(--shadow); }
.pair-card label { display: block; margin-bottom: 10px; font-weight: 800; }
.pair-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.pair-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 21px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.pair-card small { display: block; margin-top: 15px; color: var(--muted); line-height: 1.5; }
.auth-card { display: grid; gap: 10px; }
.auth-card label { margin: 4px 0 0; }
.auth-card button { margin-top: 8px; }
.error { min-height: 1.2em; margin: 13px 0 0; color: #ad3a2b; font-size: 13px; }
.hidden { display: none !important; }
.hero-row { display: flex; justify-content: space-between; align-items: end; margin-bottom: 30px; }
.hero-row h1 { margin: 5px 0; font-size: clamp(42px, 5vw, 68px); }
.muted { margin: 0; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.metric { padding: 20px; background: var(--ink); color: white; border-radius: 12px; }
.metric:nth-child(2) { background: var(--green); }
.metric:nth-child(3) { color: var(--ink); background: var(--lime); }
.metric:nth-child(4) { color: var(--ink); background: #e8c979; }
.metric strong { display: block; font-family: Georgia, serif; font-size: 36px; font-weight: 500; }
.metric span { font-size: 12px; opacity: .76; text-transform: uppercase; letter-spacing: .08em; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel { min-width: 0; padding: 23px; background: var(--panel); border: 1px solid rgba(16,44,49,.12); border-radius: 14px; box-shadow: 0 8px 25px rgba(16,44,49,.045); }
.panel.scope-disabled { opacity: .62; }
.panel.scope-disabled::after { content: "Rollen din har ikke tilgang til denne funksjonen."; display: block; margin-top: 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.panel-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 20px; }
h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.03em; }
.badge { flex: none; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge.neutral { color: var(--muted); background: #e9ece8; }
.badge.good { color: #05634f; background: var(--green-soft); }
.badge.bad { color: #a33f2d; background: #f8ded5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.form-grid label { color: var(--muted); font-size: 12px; font-weight: 700; }
.form-grid input, .form-grid select { margin-top: 5px; }
.result { min-height: 86px; max-height: 260px; overflow: auto; margin: 16px 0 0; padding: 14px; border-radius: 8px; background: #112f33; color: #cde9dc; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.monitor-actions, .read-row, .search-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.read-row, .search-row { grid-template-columns: 1fr auto; }
.telegrams { margin-top: 14px; min-height: 115px; max-height: 280px; overflow: auto; border-top: 1px solid var(--line); }
.telegram { display: grid; grid-template-columns: 92px minmax(150px, .9fr) minmax(210px, 1.1fr); gap: 12px; align-items: start; padding: 11px 2px; border-bottom: 1px solid var(--line); font: 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; }
.telegram > span { min-width: 0; }
.telegram .target b { display: block; color: var(--green); font-size: 13px; }
.telegram small { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font: 10px/1.35 Inter, ui-sans-serif, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.telegram-reading strong { display: block; color: var(--ink); font-size: 14px; }
.empty { padding: 24px 4px; color: var(--muted); text-align: center; }
.addresses-panel { grid-column: 1 / -1; }
.address-list { margin-top: 14px; border-top: 1px solid var(--line); }
.address { display: grid; grid-template-columns: 115px minmax(0, 1fr) 120px 80px; gap: 15px; align-items: center; padding: 11px 3px; border-bottom: 1px solid var(--line); font-size: 13px; }
.address code { color: var(--green); font-weight: 800; }
.address .dpt, .address .links { color: var(--muted); }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; max-width: 420px; padding: 13px 16px; border-radius: 10px; color: white; background: var(--ink); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) { .pair-shell { grid-template-columns: 1fr; gap: 35px; } .metrics { grid-template-columns: 1fr 1fr; } .grid { grid-template-columns: 1fr; } .addresses-panel { grid-column: auto; } .form-grid { grid-template-columns: 1fr 1fr; } .form-grid button { grid-column: 1/-1; } }
@media (max-width: 560px) { main { padding: 38px 16px 60px; } .topbar { padding: 0 16px; } .connection { font-size: 0; } .pair-card { padding: 20px; } .pair-row { grid-template-columns: 1fr; } .metrics { grid-template-columns: 1fr 1fr; } .address { grid-template-columns: 90px 1fr; } .address .dpt, .address .links { display: none; } .monitor-actions { grid-template-columns: 1fr 1fr; } .monitor-actions input { grid-column: 1/-1; } .telegram { grid-template-columns: 75px 1fr; } .telegram-reading { grid-column: 2; } }
