@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0a0a0c;
  --bg2: #0f0f12;
  --panel: #131317;
  --panel2: #18181d;
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .12);
  --text: #f2f2f3;
  --muted: #8d8d96;
  --dim: #5b616d;
  --green: #22c55e;
  --green-d: #0f6b45;
  --green-bg: rgba(25, 195, 125, .12);
  --red: #ff2d3a;
  --red-bg: rgba(255, 77, 87, .13);
  --yellow: #f2b90c;
  --yellow-d: #8a6a06;
  --yellow-bg: rgba(242, 185, 12, .13);
  --blue: #2aa6ff;
  --blue-bg: rgba(42, 166, 255, .12);
  --purple: #a77bff;
  --discord: #5865f2;
  --head: 'Bebas Neue', Impact, sans-serif;
  --accent: #e3101e;
  --accent2: #ff2d3a;
  --accent-bg: rgba(227, 16, 30, .12);
  --body: 'Inter', system-ui, sans-serif;
  --side: 256px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--green); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #22262e; border: 3px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

.head, h1, h2, h3 {
  font-family: var(--head);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .2px;
  margin: 0;
  line-height: 1;
}
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.green { color: var(--green); }
.red { color: var(--red); }
.yellow { color: var(--yellow); }
.blue { color: var(--blue); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--dim); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.i { width: 16px; height: 16px; stroke-width: 1.8; flex: none; }
.i-sm { width: 13px; height: 13px; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side);
  flex: none;
  background: var(--bg2);
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 14px 20px; height: 62px; border-bottom: 1px solid var(--line); }
.brand .logo { width: 40px; height: auto; object-fit: contain; }
.brand .name { font-family: var(--head); font-style: italic; font-weight: 800; font-size: 22px; text-transform: uppercase; }
.brand .name span { color: var(--green); }
.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-sec { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--dim); padding: 18px 12px 8px; font-weight: 500; }
.nav a {
  display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 4px;
  color: #c9ced7; font-size: 15px; position: relative; margin-bottom: 2px;
}
.nav a .i { color: var(--muted); }
.nav a:hover { background: var(--panel2); }
.nav a.active { background: #1a1d24; color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--green); }
.nav a.active .i { color: var(--green); }
.nav .badge-n { margin-left: auto; background: var(--green); color: #000; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.side-user { border-top: 1px solid var(--line); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.side-user img { width: 36px; height: 36px; border-radius: 50%; }
.side-user .nm { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.side-user .logout { margin-left: auto; color: var(--muted); padding: 6px; border-radius: 4px; background: none; border: 0; cursor: pointer; position: relative; }
.side-user .logout:hover { color: #fff; background: var(--panel2); }
.side-user .logout:hover::after {
  content: 'Log ud'; position: absolute; left: 110%; top: 50%; transform: translateY(-50%);
  background: #000; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 3px; white-space: nowrap;
}

.main { flex: 1; margin-left: var(--side); min-width: 0; }
.topbar {
  height: 62px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; background: rgba(11, 13, 17, .92); backdrop-filter: blur(8px); z-index: 10;
}
.topbar .title { font-family: var(--head); font-style: italic; font-weight: 800; font-size: 22px; text-transform: uppercase; }
.online-pill { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); padding: 8px 12px; border-radius: 3px; color: var(--muted); }
.online-pill b { color: #fff; font-weight: 600; }
.online-pill .i { color: var(--green); }
.online-pill.off .i { color: var(--red); }
.menu-btn { display: none; background: none; border: 0; color: #fff; padding: 6px; margin-right: 10px; }
.content { padding: 28px 24px 120px; max-width: 1700px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 44px; }
.page-head .sub { color: var(--muted); margin-top: 8px; font-size: 14px; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 18px; }
.back:hover { color: #fff; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 12px; align-items: start; }
.split-l { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 12px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mt { margin-top: 12px; }

.card { background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); min-height: 62px; }
.card-h h3 { font-size: 21px; display: flex; align-items: center; gap: 10px; }
.card-h h3 .i { color: var(--green); width: 18px; height: 18px; }
.card-h .act { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-b { padding: 20px; }
.card-b.tight { padding: 0; }
.empty { padding: 36px 20px; text-align: center; color: var(--dim); }

.stat { background: var(--panel); border: 1px solid var(--line); padding: 20px; position: relative; overflow: hidden; min-height: 112px; }
.stat.click { cursor: pointer; }
.stat.click:hover { border-color: var(--line2); }
.stat .lbl { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.stat .lbl .i { width: 13px; height: 13px; }
.stat .val { font-family: var(--head); font-style: italic; font-weight: 800; font-size: 36px; margin-top: 14px; line-height: 1; }
.stat .note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.stat .bg-i { position: absolute; right: -6px; top: -6px; width: 58px; height: 58px; color: #fff; opacity: .05; stroke-width: 1.3; }

/* ---------- Buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--head); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 18px;
  padding: 9px 16px; border: 0; border-radius: 2px; cursor: pointer; background: #1d2027; color: #fff; white-space: nowrap;
  transition: filter .12s, opacity .12s;
}
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn .i { width: 16px; height: 16px; }
.btn.green { background: var(--green); color: #031b10; }
.btn.green-d { background: var(--green-d); color: #c6f5de; }
.btn.red { background: var(--red); color: #fff; }
.btn.yellow { background: var(--yellow); color: #1a1400; }
.btn.yellow-d { background: var(--yellow-d); color: #2a2000; }
.btn.discord { background: var(--discord); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); color: #ddd; }
.btn.block { width: 100%; padding: 12px; }
.btn.sm { font-size: 15px; padding: 6px 12px; }
.btn.xs { font-size: 13px; padding: 4px 9px; }
.btn-plain { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; }
.btn-plain:hover { color: #fff; }
.link-h { font-family: var(--head); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 18px; color: #9aa0ab; cursor: pointer; background: none; border: 0; }
.link-h:hover { color: #fff; }

.input, select.input, textarea.input {
  width: 100%; background: #0c0e12; border: 1px solid var(--line2); border-radius: 2px; padding: 10px 12px; outline: none; color: var(--text);
}
.input:focus { border-color: #3a404c; }
textarea.input { resize: vertical; min-height: 90px; }
.input::placeholder { color: #5b616d; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23bbb' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.search { position: relative; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 15px; height: 15px; }
.search .input { padding-left: 36px; min-width: 220px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .flabel { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.hint { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.check input { accent-color: var(--green); width: 15px; height: 15px; }

/* Segmenteret tabs */
.seg { display: inline-flex; border: 1px solid var(--line2); padding: 3px; gap: 2px; background: var(--bg); flex-wrap: wrap; }
.seg button {
  font-family: var(--head); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 18px;
  background: none; border: 0; color: #8f96a2; padding: 5px 12px; cursor: pointer;
}
.seg button:hover { color: #fff; }
.seg button.on { background: #fff; color: #000; }
.seg.sm button { font-size: 15px; padding: 3px 9px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line2); background: transparent; padding: 7px 13px; cursor: pointer; font-size: 14px; color: #c9ced7; }
.chip .n { color: var(--dim); margin-left: 8px; font-size: 12px; }
.chip.on { background: #fff; color: #000; border-color: #fff; }
.chip.on .n { color: #666; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--head); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 14px; padding: 2px 8px; line-height: 1.3; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.yellow { background: var(--yellow); color: #1a1400; }
.badge.yellow-s { background: var(--yellow-bg); color: var(--yellow); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.grey { background: #1d2027; color: #aab; }
.badge.purple { background: rgba(167, 123, 255, .14); color: var(--purple); }
.rank { display: inline-block; font-family: var(--head); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 14px; padding: 2px 7px; }
.rank.red { background: #4a1418; color: var(--red); }
.rank.yellow { background: var(--yellow); color: #1a1400; }
.rank.green { background: #0d3b28; color: var(--green); }
.rank.blue { background: #0b3150; color: var(--blue); }
.rank.purple { background: #2e1f52; color: var(--purple); }
.rank.grey { background: #23262d; color: #bbb; }
.tag { display: inline-block; font-size: 11px; padding: 2px 6px; background: #0d2a1e; color: var(--green); margin: 0 4px 4px 0; }
.tag.wl { background: #0b2738; color: var(--blue); }
.tag.plain { background: #23262d; color: #ddd; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #555b66; }
.status-dot.on { color: var(--green); }
.status-dot.on::before { background: var(--green); box-shadow: 0 0 8px var(--green); }
.wl-badge { display: inline-flex; align-items: center; gap: 7px; background: var(--green-bg); color: var(--green); padding: 6px 12px; font-size: 14px; }
.wl-badge.no { background: var(--red-bg); color: var(--red); }
.trust { display: inline-flex; align-items: center; gap: 5px; font-family: var(--head); font-style: italic; font-weight: 800; font-size: 19px; color: var(--green); }
.trust.mid { color: var(--yellow); }
.trust.low { color: var(--red); }
.trust .i { width: 14px; height: 14px; }

/* Tabel */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 16px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #14171c; }
.table .grp td { background: #0f1115; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); padding: 10px 20px; }
.table .chev { color: var(--dim); width: 30px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who img, .avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; background: #1d2027; object-fit: cover; }
.who .nm { font-weight: 600; font-size: 15px; }
.who .sb { font-size: 12px; color: var(--muted); margin-top: 2px; }
.av-sm { width: 26px; height: 26px; }

/* Log-liste */
.log { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.log:last-child { border-bottom: 0; }
.log .tp { font-family: var(--head); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 18px; line-height: 1.2; color: #dfe3ea; }
.log .ln1 { font-size: 15px; }
.log .ln1 b { font-weight: 600; }
.log .ln2 { font-size: 13px; color: var(--muted); margin-top: 2px; }
.log .ln3 { font-size: 12px; color: var(--dim); margin-top: 2px; }
.log .ln3 b { font-weight: 500; color: #8a909c; }
.tp.green { color: var(--green) !important; }
.tp.red { color: var(--red) !important; }
.tp.yellow { color: var(--yellow) !important; }
.tp.blue { color: var(--blue) !important; }

/* Charts */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.bars .b .f { background: var(--green); min-height: 2px; opacity: .85; }
.bars .b:hover .f { opacity: 1; }
.bars .b .tt { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #000; padding: 3px 7px; font-size: 11px; white-space: nowrap; display: none; z-index: 2; }
.bars .b:hover .tt { display: block; }
.bar-x { display: flex; gap: 6px; margin-top: 8px; }
.bar-x span { flex: 1; text-align: center; font-size: 10px; color: var(--dim); }
.meter { height: 6px; background: #1d2027; margin-top: 6px; }
.meter > i { display: block; height: 100%; background: var(--green); }
.dist-row { padding: 10px 0; }
.dist-row .row { justify-content: space-between; font-size: 13px; }

/* Grid-celler (inventar m.m.) */
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cells > div { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cells > div:nth-child(3n) { border-right: 0; }
.cells .c-nm { font-size: 14px; }
.cells .c-sb { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; }
.kv .k { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.kv .v { margin-top: 4px; font-size: 15px; }

/* Lister */
.li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; }
.li.click:hover { background: #14171c; }

/* Profil-header */
.profile { display: flex; align-items: center; gap: 20px; padding: 22px 20px; }
.profile .pic { width: 82px; height: 82px; border-radius: 50%; border: 2px solid #22262e; object-fit: cover; background: #1d2027; }
.profile h1 { font-size: 46px; }
.profile .meta { display: flex; align-items: center; gap: 14px; margin-top: 10px; color: var(--muted); flex-wrap: wrap; }
.profile .side { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; color: var(--muted); }

/* Hurtige handlinger */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qa-grid .btn { background: #171a20; color: #d5d9e0; }
.qa-grid .btn:disabled { color: #4c525d; }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--yellow-bg); color: var(--yellow); font-size: 14px; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

/* Faneblade (karakter) */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; }
.tabs button.on { color: #fff; border-bottom-color: var(--green); }
.tabs button:hover { color: #fff; }

/* Tickets */
.tk-list { max-height: calc(100vh - 230px); overflow-y: auto; }
.tk { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tk:hover, .tk.on { background: #15181e; }
.tk .t { font-weight: 600; font-size: 15px; }
.tk .s { font-size: 12px; color: var(--muted); }
.tk .c { font-size: 12px; color: var(--blue); }
.discord-view { background: #313338; color: #dbdee1; font-family: 'gg sans', 'Noto Sans', Helvetica, Arial, sans-serif; max-height: calc(100vh - 330px); overflow-y: auto; padding: 14px 0; }
.dmsg { display: flex; gap: 14px; padding: 6px 18px; }
.dmsg:hover { background: #2e3035; }
.dmsg img.av { width: 40px; height: 40px; border-radius: 50%; }
.dmsg .au { font-weight: 500; color: #f2f3f5; }
.dmsg .dapp { background: #5865f2; color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 3px; margin-left: 4px; font-weight: 600; }
.dmsg .ts { color: #949ba4; font-size: 12px; margin-left: 6px; }
.dmsg .tx { white-space: pre-wrap; word-wrap: break-word; line-height: 1.4; }
.mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; padding: 0 2px; border-radius: 3px; }
.embed { background: #2b2d31; border-left: 4px solid #1e1f22; border-radius: 4px; padding: 10px 14px 12px; margin-top: 6px; max-width: 520px; }
.embed .et { font-weight: 600; color: #fff; margin-bottom: 6px; }
.embed .ed { font-size: 14px; white-space: pre-wrap; }
.embed .ef { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.embed .ef > div { min-width: 140px; flex: 1 1 100%; }
.embed .ef > div.inl { flex: 1 1 140px; }
.embed .fn { font-weight: 600; font-size: 14px; color: #fff; }
.embed .fv { font-size: 14px; white-space: pre-wrap; }
.embed .ft { font-size: 12px; margin-top: 8px; color: #b5bac1; }
.dmsg .att img { max-width: 360px; max-height: 280px; border-radius: 6px; margin-top: 6px; }

/* Support-widget */
.support {
  position: fixed; right: 16px; bottom: 16px; z-index: 30; background: #111318; border: 1px solid var(--line2);
  min-width: 340px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.support .bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; }
.support .bar .head { font-size: 22px; }
.support .cnt { margin-left: auto; background: #23262d; font-family: var(--head); font-style: italic; font-weight: 800; padding: 1px 8px; }
.support.alert .cnt { background: var(--red); color: #fff; }
.support .list { border-top: 1px solid var(--line); max-height: 300px; overflow-y: auto; }
.support .list .li { padding: 10px 16px; }
.support .mute { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; }
.support.alert { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { border-color: var(--line2); } 50% { border-color: var(--red); } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.modal { background: var(--panel); border: 1px solid var(--line2); width: 100%; max-width: 560px; }
.modal.wide { max-width: 900px; }
.modal .card-b { display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }

/* Toast */
.toasts { position: fixed; top: 74px; right: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #15181e; border: 1px solid var(--line2); border-left: 3px solid var(--green); padding: 12px 16px; min-width: 260px; max-width: 380px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); animation: tin .2s; }
.toast.err { border-left-color: var(--red); }
@keyframes tin { from { transform: translateX(20px); opacity: 0; } }

/* Kort */
.map-wrap { height: 720px; background: #0fa4d6; border: 1px solid var(--line); }
.leaflet-container { background: #0fa4d6 !important; font-family: var(--body); }
.leaflet-bar a { background: #0f1a22 !important; color: #fff !important; border-color: #22303b !important; }

/* Loader */
.loading { padding: 60px; text-align: center; color: var(--dim); }
.spin { width: 22px; height: 22px; border: 2px solid #2a2e36; border-top-color: var(--green); border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Responsiv */
@media (max-width: 1400px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1100px) {
  .split, .split-l { grid-template-columns: minmax(0, 1fr); }
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 34px; }
  .log { grid-template-columns: 1fr; gap: 4px; }
  .kv, .cells { grid-template-columns: 1fr 1fr; }
  .support { min-width: 0; left: 16px; }
  .table-scroll { overflow-x: auto; }
}

/* ============================================================
   Savannah Roleplay-tema (samme stil som savannahroleplay.dk)
   ============================================================ */
.head, h1, h2, h3, .brand .name, .topbar .title, .stat .val, .link-h, .badge, .rank, .log .tp, .trust, .support .cnt {
  font-style: normal !important; font-weight: 400 !important; letter-spacing: .6px;
}
::selection { background: var(--accent); color: #fff; }
.brand .name span, .nav a.active .i, .card-h h3 .i { color: var(--accent); }
.nav a { border-radius: 8px; font-size: 14px; font-weight: 500; }
.nav a.active { background: rgba(255, 255, 255, .05); }
.nav a.active::before { background: var(--accent); left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; }
.sidebar .brand .logo { width: 42px; }
.side-user .rank { font-size: 15px; }

.card, .stat, .modal, .support { border-radius: 14px; }
.stat { background: linear-gradient(180deg, var(--panel2), var(--panel)); }
.stat .val { font-size: 40px; }
.card-h h3 { font-size: 24px; }
.page-head h1 { font-size: 54px; letter-spacing: 1px; }
.profile h1 { font-size: 52px; }

.btn { font-family: var(--body); font-weight: 700; font-size: 14px; text-transform: none; border-radius: 10px; padding: 10px 18px; letter-spacing: 0; border: 1px solid transparent; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn:active { transform: scale(.98); }
.btn.sm { font-size: 13px; padding: 8px 14px; border-radius: 8px; }
.btn.xs { font-size: 12px; padding: 5px 10px; border-radius: 7px; }
.btn.block { padding: 13px; }
.btn.green, .btn.green-d { background: var(--accent); color: #fff; }
.btn.green:hover, .btn.green-d:hover { background: var(--accent2); box-shadow: 0 8px 30px rgba(227, 16, 30, .35); filter: none; }
.btn.red { background: var(--accent-bg); color: var(--accent2); border-color: rgba(227, 16, 30, .3); }
.btn.red:hover { background: rgba(227, 16, 30, .2); filter: none; }
.btn.ghost { background: rgba(255, 255, 255, .04); border-color: var(--line2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .08); filter: none; }
.qa-grid .btn { background: rgba(255, 255, 255, .04); border-color: var(--line); }
.link-h { font-size: 20px; }

.input, select.input, textarea.input { border-radius: 10px; background: #0d0d10; }
.input:focus { border-color: rgba(227, 16, 30, .5); }
.seg { border-radius: 10px; }
.seg button { border-radius: 7px; font-style: normal; font-weight: 400; letter-spacing: .6px; }
.seg button.on { background: var(--accent); color: #fff; }
.chip { border-radius: 99px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on .n { color: rgba(255, 255, 255, .75); }
.badge, .rank { border-radius: 6px; }
.tag { border-radius: 5px; }
.wl-badge, .notice { border-radius: 8px; }
.online-pill { border-radius: 10px; }
.tabs button.on { border-bottom-color: var(--accent); }
.check input { accent-color: var(--accent); }
.bars .b .f { background: var(--accent); border-radius: 4px 4px 0 0; }
.meter { border-radius: 99px; overflow: hidden; }
.meter > i { background: var(--accent); border-radius: 99px; }
.toast { border-left-color: var(--accent); border-radius: 10px; }
.spin { border-top-color: var(--accent); }
.support .take { margin-left: auto; }
/* ---------- Tickets: Discord-visning + svar ---------- */
.discord-view { max-height: calc(100vh - 360px); min-height: 320px; padding: 16px 0 8px; }
.dmsg { display: block; padding: 4px 18px 4px 18px; margin-top: 10px; }
.dmsg.grouped { display: flex; gap: 14px; margin-top: 0; padding-top: 1px; padding-bottom: 1px; }
.dmsg .dgutter { width: 40px; flex: none; text-align: right; }
.dmsg .dtime { font-size: 10px; color: #949ba4; visibility: hidden; line-height: 22px; }
.dmsg.grouped:hover .dtime { visibility: visible; }
.dmsg .dapp.staff { background: var(--accent); }
.dreply { font-size: 12px; color: #b5bac1; margin: 0 0 4px 54px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dedited { font-size: 10px; color: #949ba4; }
.dlink { color: #00a8fc; }
.dlink:hover { text-decoration: underline; }
.dinline { background: #1e1f22; padding: 1px 4px; border-radius: 4px; font-size: 13px; }
.dcode { background: #1e1f22; border: 1px solid #1a1b1e; padding: 8px 10px; border-radius: 4px; font-size: 13px; white-space: pre-wrap; margin: 4px 0; }
.dspoiler { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; }
.dspoiler.on { color: inherit; background: rgba(255, 255, 255, .1); }
.dh1 { font-size: 22px; font-weight: 700; margin: 6px 0 2px; color: #f2f3f5; }
.dh2 { font-size: 18px; font-weight: 700; margin: 6px 0 2px; color: #f2f3f5; }
.dh3 { font-size: 16px; font-weight: 700; margin: 4px 0 2px; color: #f2f3f5; }
.dquote { border-left: 4px solid #4e5058; padding-left: 10px; }
.dli { padding-left: 6px; }
.embed { max-width: 560px; }
.embed .ebody { display: flex; gap: 14px; }
.embed .emain { flex: 1; min-width: 0; }
.embed .eauthor { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.embed .eauthor img { width: 24px; height: 24px; border-radius: 50%; }
.embed .ethumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; flex: none; }
.embed .eimage { max-width: 100%; border-radius: 4px; margin-top: 10px; display: block; }
.embed .ft { display: flex; align-items: center; gap: 6px; }
.embed .ft img { width: 18px; height: 18px; border-radius: 50%; }
.dbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dbtn { padding: 5px 14px; border-radius: 4px; font-size: 13px; font-weight: 500; color: #fff; background: #4e5058; opacity: .9; cursor: default; }
.dbtn.primary { background: #5865f2; }
.dbtn.success { background: #248046; }
.dbtn.danger { background: #da373c; }
.dfile { display: inline-block; background: #2b2d31; border: 1px solid #1e1f22; padding: 10px 14px; border-radius: 6px; color: #00a8fc; margin-top: 6px; }
.answers { padding: 12px 20px; border-bottom: 1px solid var(--line); }
.answers summary { cursor: pointer; }
.composer { display: flex; gap: 10px; align-items: flex-end; padding: 12px 16px; background: #313338; border-top: 1px solid #26272b; border-radius: 0 0 14px 14px; }
.composer textarea { flex: 1; resize: none; background: #383a40; border: 0; border-radius: 8px; padding: 11px 14px; color: #dbdee1; outline: none; font-size: 14px; line-height: 1.4; max-height: 200px; }
.composer textarea::placeholder { color: #8b8f98; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #555; margin-left: 6px; vertical-align: middle; }
.live-dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); animation: livepulse 1.6s infinite; }
@keyframes livepulse { 50% { opacity: .4; } }