/* ═══════════════════════════════════════════════════════════
   Slottsparken Roleplay
   Mörk blå bas med dämpad blåsilveraccent.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Botten – nästan svart med blå underton */
  --bg: #0b1521;
  --bg-deep: #08111c;
  --bg-soft: #101b27;

  /* Ytor. Korten byggs av gradienter mellan de här. */
  --surface: #142231;
  --surface-2: #1b2c3d;
  --surface-3: #24394d;

  --border: rgba(187, 203, 217, 0.16);
  --border-strong: rgba(187, 203, 217, 0.30);
  --hairline: rgba(255, 255, 255, 0.05);

  --text: #edf2f6;
  --muted: #9aabba;
  --dim: #71879a;

  /* Dämpad blåsilveraccent */
  --accent: #96b7d0;
  --accent-bright: #c3d5e2;
  --accent-deep: #6389a8;
  --accent-ink: #101d29;

  /* Stödfärger */
  --violet: #9aabba;
  --amber: #e0b054;
  --bark: #55627f;
  --danger: #e0685f;
  --success: #93b5a7;
  --info: #96b7d0;

  --gold: #d9b45a;
  --silver: #c3d5e2;
  --bronze: #b98450;

  --radius: 20px;
  --radius-sm: 11px;
  --radius-xs: 8px;

  --shadow-sm: 0 2px 10px -4px rgba(0, 0, 0, 0.6);
  --shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.95), 0 2px 8px -4px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 12px 34px -14px rgba(0, 0, 0, 0.35);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  /* Displayfont för rubriker – lägg en egen woff2 i /fonts och peka hit. */
  --font-display: 'Archivo Expanded', 'Arial Black', 'Segoe UI', Impact, var(--font);
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image:
    /* mjuk norrskensdimma – blått uppifrån, violett åt sidorna */
    radial-gradient(1200px 680px at 50% -14%, rgba(150, 183, 208, 0.20), transparent 64%),
    radial-gradient(820px 560px at 90% 2%, rgba(99, 137, 168, 0.16), transparent 62%),
    radial-gradient(760px 520px at 2% 22%, rgba(71, 111, 145, 0.16), transparent 64%),
    radial-gradient(900px 600px at 50% 108%, rgba(150, 183, 208, 0.10), transparent 60%),
    linear-gradient(180deg, #142231 0%, var(--bg) 46%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

/* Fin kornighet så att de stora mörka ytorna inte blir platta */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

a { color: var(--accent-bright); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: #e3edf4; text-decoration: none; }
/* Understryk bara länkar i löptext – inte i menyer, kort och tabeller. */
.prose a, p a, li a, .answer-block a {
  text-decoration: underline;
  text-decoration-color: rgba(150, 183, 208, 0.38);
  text-underline-offset: 3px;
}
.prose a:hover, p a:hover, li a:hover, .answer-block a:hover { text-decoration-color: currentColor; }
p a.btn, p a.chip, li a.btn, li a.chip { text-decoration: none; }

::selection { background: rgba(150, 183, 208, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Typografi ──────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.04;
  margin: 0 0 .7rem;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.7rem); letter-spacing: 0.005em; }
h2 { font-size: clamp(1.8rem, 4.6vw, 2.9rem); letter-spacing: 0.015em; }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.4rem); letter-spacing: 0.03em; }
h4 { font-size: 1rem; margin: 0 0 .5rem; font-weight: 700; }
p { margin: 0 0 1rem; }

.title-glow {
  background: linear-gradient(180deg, #ffffff 6%, #c3d5e2 58%, #96b7d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

code {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  padding: .1em .42em;
  border-radius: 6px;
  font-size: .88em;
  font-family: var(--font-mono);
  color: #cfdcff;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 840px; }

@media (max-width: 600px) { .wrap { padding: 0 1.15rem; } }

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  background: linear-gradient(180deg, rgba(7, 11, 22, 0.92), rgba(7, 11, 22, 0.72));
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; height: 78px; }

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: 0.13em;
}
.brand:hover { color: #fff; }
.brand img { width: 40px; height: 40px; object-fit: contain; flex: none; transition: transform .35s var(--ease); }
.brand:hover img { transform: translateY(-2px); }
.brand span { white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: .65rem; margin-left: auto; }

.icon-link {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.icon-link:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.icon-link svg { width: 24px; height: 24px; }

.user-menu { position: relative; }
.user-avatar {
  display: block;
  padding: 2px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: var(--surface-2);
  cursor: pointer;
  line-height: 0;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.user-avatar img { width: 38px; height: 38px; display: block; border-radius: 10px; }
.user-avatar:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + .65rem);
  min-width: 218px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: .5rem;
  box-shadow: var(--shadow);
  animation: drop-in .16s var(--ease);
  z-index: 60;
}
.user-dropdown[hidden] { display: none; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } }

.user-dropdown-name {
  display: block;
  padding: .45rem .75rem .65rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: .4rem;
}
.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: .52rem .75rem;
  border-radius: var(--radius-xs);
  color: var(--muted);
  font: inherit;
  font-size: .94rem;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.user-dropdown a:hover,
.user-dropdown button:hover { background: var(--surface-3); color: var(--text); }
.user-dropdown form { margin: .4rem 0 0; padding-top: .4rem; border-top: 1px solid var(--hairline); }

@media (max-width: 700px) {
  .site-header .wrap { height: 68px; }
  .brand { font-size: 1.1rem; letter-spacing: .09em; }
  .brand img { width: 33px; height: 33px; }
  .user-avatar img { width: 34px; height: 34px; }
  .icon-link { width: 38px; height: 38px; }
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(3.5rem, 8vw, 6rem);
  text-align: center;
  overflow: hidden;
}
/* Trädlinjen längst ner i hero:n */
/* Ljusstråket som ramar av hero:n nedåt */
.hero::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  width: min(920px, 92%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(150, 183, 208, .45), transparent);
  pointer-events: none;
}
/* Mjuk glöd bakom innehållet */
.hero::before {
  content: '';
  position: absolute;
  left: 50%; bottom: -120px;
  width: min(1100px, 120%);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(150, 183, 208, 0.14), transparent 72%);
  pointer-events: none;
}
.hero > .wrap { position: relative; z-index: 2; }

.hero-intro { margin-bottom: 2.4rem; }
.hero-intro h1 { margin: 0; }
.hero-intro .eyebrow { justify-content: center; }

.hero-video {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, .4);
}
.hero-video::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  pointer-events: none;
}
.hero-video iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.hero-video-placeholder {
  display: grid;
  place-content: center;
  gap: .45rem;
  height: 100%;
  color: var(--dim);
  padding: 1.5rem;
  text-align: center;
}
.hero-video-placeholder strong { color: var(--muted); font-size: 1.05rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; margin-top: 2.1rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; margin-top: 1.6rem; }
.hero-tagline { color: var(--muted); max-width: 58ch; margin: 1.6rem auto 0; font-size: 1.06rem; }

/* ── Knappar ────────────────────────────────────────────── */

.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .82rem 1.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--btn-bg);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s var(--ease), background .16s var(--ease),
              border-color .16s var(--ease), box-shadow .16s var(--ease), color .16s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  --btn-bg: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, var(--shadow-sm);
}
.btn-primary:hover {
  --btn-bg: linear-gradient(180deg, #bed1df, var(--accent-bright));
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, var(--shadow-glow);
}

.btn-outline, .btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover, .btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(150, 183, 208, 0.08);
}

.btn-surface {
  --btn-bg: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-surface:hover { --btn-bg: var(--surface-3); border-color: var(--border-strong); }

.btn-danger {
  --btn-bg: rgba(221, 106, 88, 0.14);
  color: var(--danger);
  border-color: rgba(221, 106, 88, 0.38);
}
.btn-danger:hover { --btn-bg: rgba(221, 106, 88, 0.24); color: #f08a79; }

.btn-sm { padding: .44rem .95rem; font-size: .88rem; border-radius: var(--radius-xs); }
.btn[disabled], .btn.disabled { opacity: .42; pointer-events: none; }

/* ── Sektioner ──────────────────────────────────────────── */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { margin-bottom: 2.4rem; }
.section-head p { color: var(--muted); margin: 0; }
.section-head.center { text-align: center; }
.section-head.center p { max-width: 56ch; margin: 0 auto; font-size: 1.05rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: currentColor; opacity: .8; }
.section-head.center .eyebrow { justify-content: center; }

.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }

/* ── Kort ───────────────────────────────────────────────── */

.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(26, 37, 64, 0.72), rgba(10, 16, 32, 0.82));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  pointer-events: none;
}
.card h3 { margin-bottom: .55rem; }
.card p:last-child { margin-bottom: 0; }

.card-link {
  display: block;
  color: inherit;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.card-link:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow), var(--shadow-glow);
  color: inherit;
}

.stat .value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.02;
  color: var(--text);
}
.stat .label {
  color: var(--dim);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  margin-top: .25rem;
}

.feature-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(150, 183, 208, .18), rgba(150, 183, 208, .07));
  border: 1px solid rgba(150, 183, 208, .22);
  color: var(--accent-bright);
  margin-bottom: 1.1rem;
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-display);
}

/* ── Prioritetsnivåer ───────────────────────────────────── */

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26, 37, 64, 0.72), rgba(8, 13, 26, 0.85));
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.tier::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--tier-color, var(--accent)), transparent);
  opacity: .9;
}
.tier:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.tier-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.tier-head h3 { margin: 0; }
.tier-mark { width: 52px; height: 52px; flex: none; }
.tier-price {
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 600;
  color: var(--tier-color, var(--accent));
  margin: .4rem 0 1.1rem;
}
.tier p.tier-desc { color: var(--muted); }
.tier ul { list-style: none; padding: 0; margin: 0 0 1.3rem; }
.tier li { position: relative; padding-left: 1.55rem; margin-bottom: .55rem; }
.tier li::before {
  content: '';
  position: absolute;
  left: 0; top: .5em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--tier-color, var(--accent));
  opacity: .35;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .03);
}
.tier hr { border: none; border-top: 1px solid var(--hairline); margin: 0 0 1.3rem; }
.tier .tier-foot { margin-top: auto; }
/* Köpknappen bär nivåns egen färg – brons, silver, guld. */
.tier .btn-primary {
  --btn-bg: var(--tier-color, var(--accent));
  color: #101d29;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, var(--shadow-sm);
}
.tier .btn-primary:hover {
  --btn-bg: var(--tier-color, var(--accent));
  filter: brightness(1.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, var(--shadow-sm);
}

/* ── Badges ─────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .32rem .85rem;
  border-radius: 999px;
  font-size: .79rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.badge-pending  { background: rgba(217, 164, 65, .12); color: var(--amber); border-color: rgba(217, 164, 65, .32); }
.badge-approved { background: rgba(147, 181, 167, .12); color: var(--success); border-color: rgba(147, 181, 167, .32); }
.badge-denied   { background: rgba(221, 106, 88, .12); color: var(--danger); border-color: rgba(221, 106, 88, .32); }
.badge-neutral  { background: rgba(255, 255, 255, .04); color: var(--muted); border-color: var(--border); }
.badge-info     { background: rgba(150, 183, 208, .13); color: var(--info); border-color: rgba(150, 183, 208, .3); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge.live .dot { animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .32; } }

/* ── Formulär ───────────────────────────────────────────── */

.field { margin-bottom: 1.55rem; }
.field label, .label { display: block; font-weight: 600; margin-bottom: .45rem; font-size: .98rem; }
.field .help { color: var(--dim); font-size: .88rem; margin: 0 0 .6rem; white-space: pre-line; line-height: 1.55; }
.field .error { color: var(--danger); font-size: .88rem; margin-top: .45rem; }

input[type=text], input[type=number], input[type=url], input[type=email], input[type=search],
input[type=date], textarea, select {
  width: 100%;
  background: rgba(5, 8, 16, 0.72);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .78rem .95rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .97rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(5, 8, 16, 0.9);
  box-shadow: 0 0 0 3px rgba(150, 183, 208, .16);
}
input.invalid, textarea.invalid { border-color: var(--danger); }
input[type=color] {
  width: 56px; height: 44px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.6rem;
}
.checkbox { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; }
.checkbox input { width: 19px; height: 19px; margin-top: .2rem; accent-color: var(--accent); flex: none; }
.counter { float: right; font-size: .8rem; color: var(--dim); font-weight: 500; font-family: var(--font-mono); }
.counter.ok { color: var(--success); }

.form-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form-actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-top: 1.7rem; }

/* ── Flash & notiser ────────────────────────────────────── */

.flash {
  border-radius: var(--radius-sm);
  padding: .95rem 1.2rem;
  margin: 1.3rem 0;
  border: 1px solid;
  font-size: .97rem;
}
.flash-success { background: rgba(147, 181, 167, .09); border-color: rgba(147, 181, 167, .34); color: var(--success); }
.flash-error { background: rgba(221, 106, 88, .09); border-color: rgba(221, 106, 88, .34); color: var(--danger); }

.notice {
  background: linear-gradient(180deg, rgba(26, 37, 64, .6), rgba(10, 16, 32, .7));
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
}
.notice strong { color: var(--text); }

/* ── Tabeller ───────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 28, 50, .55), rgba(10, 16, 32, .7));
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th {
  text-align: left;
  padding: .9rem 1.1rem;
  color: var(--dim);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: .88rem 1.1rem; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s var(--ease); }
tbody tr:hover { background: rgba(150, 183, 208, .045); }
.td-user { display: flex; align-items: center; gap: .7rem; }
.td-user img { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--hairline); }
.mono { font-family: var(--font-mono); font-size: .85em; color: var(--muted); }
.nowrap { white-space: nowrap; }

.empty { text-align: center; padding: 3.2rem 1rem; color: var(--dim); }
.empty h3 { color: var(--muted); }

/* ── Prosa ──────────────────────────────────────────────── */

.prose { color: var(--muted); font-size: 1.03rem; }
.prose h2 { color: var(--text); margin-top: 2.6rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.prose h3 { color: var(--text); margin-top: 1.9rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--text); }
.prose blockquote {
  margin: 1.4rem 0;
  padding: .4rem 0 .4rem 1.2rem;
  border-left: 3px solid var(--pine);
  color: var(--muted);
  font-style: italic;
}
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.2rem 0; }

/* ── Ansökningssidan ────────────────────────────────────── */

.apply-head { margin-bottom: 2.2rem; }
.apply-head h1 { margin-bottom: .35rem; }
.apply-sub {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .04em;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  color: var(--accent);
  margin: 0;
}

.apply-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.apply-form-col { grid-column: 1; grid-row: 1; }
.apply-info { grid-column: 2; grid-row: 1; }
.apply-info > :first-child { margin-top: 0; }

@media (max-width: 900px) {
  .apply-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .apply-info { grid-column: 1; grid-row: 1; }
  .apply-form-col { grid-column: 1; grid-row: 2; }
}

.form-group-label {
  font-family: var(--font);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2.2rem 0 1.1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--hairline);
}
.form-group-label:first-child { margin-top: 0; }

/* Ljusa fält i ansökningsformuläret – hög läsbarhet i långa svar. */
.form-light input[type=text],
.form-light input[type=number],
.form-light input[type=date],
.form-light input[type=url],
.form-light input[type=email],
.form-light textarea,
.form-light select {
  background: #edf2f6;
  border: 1px solid transparent;
  color: #101d29;
  border-radius: 12px;
  padding: .88rem 1.05rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12);
}
.form-light input::placeholder,
.form-light textarea::placeholder { color: #71879a; }
.form-light input:focus,
.form-light textarea:focus,
.form-light select:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(150, 183, 208, .3);
}
.form-light input.invalid,
.form-light textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(221, 106, 88, .2); }
.form-light textarea { min-height: 270px; }
.form-light select {
  background-image: linear-gradient(45deg, transparent 50%, #71879a 50%), linear-gradient(135deg, #71879a 50%, transparent 50%);
}
.form-light .optional { color: var(--dim); font-weight: 400; }

.radio-row { display: flex; flex-wrap: wrap; gap: 1.6rem; padding: .3rem 0; }
.radio { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 500; }
.radio input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }

.consent { margin-top: 1.9rem; font-size: .96rem; }
.consent span { color: var(--muted); }

.btn-submit {
  width: 100%;
  margin-top: 1.6rem;
  padding: 1.1rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 800;
  font-size: 1rem;
}
.btn-submit:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(150, 183, 208, .09);
  box-shadow: var(--shadow-glow);
}

.status-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem;
  margin-bottom: 2.6rem;
  background: linear-gradient(180deg, rgba(26, 37, 64, .72), rgba(8, 13, 26, .85));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.status-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.status-card h2 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); margin: 1rem 0 .55rem; }
.status-card p { color: var(--muted); margin-bottom: .85rem; }
.status-card-head { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; }
.status-card-links { font-size: .92rem; margin: 1.1rem 0 0; }
.status-card.status-approved::before { background: linear-gradient(90deg, transparent, var(--success), transparent); }
.status-card.status-denied::before { background: linear-gradient(90deg, transparent, var(--danger), transparent); }

/* ── Spelarpanelen ──────────────────────────────────────── */

.panel-nav {
  display: inline-flex;
  gap: .25rem;
  padding: .3rem;
  margin-bottom: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(19, 28, 50, .7), rgba(10, 16, 32, .8));
  box-shadow: var(--shadow-sm);
}
.panel-nav a {
  padding: .5rem 1.15rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: .93rem;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.panel-nav a:hover { color: var(--text); background: var(--surface-2); }
.panel-nav a.active {
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset;
}

@media (max-width: 560px) {
  .panel-nav { display: flex; width: 100%; }
  .panel-nav a { flex: 1; text-align: center; padding: .5rem .5rem; }
}

.panel-hero {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--hairline);
}
.panel-hero-avatar {
  width: 76px; height: 76px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  flex: none;
}
.panel-hero-text { flex: 1; min-width: 240px; }
.panel-hero-text .eyebrow { margin-bottom: .5rem; }
.panel-hero-text h1 { margin: 0 0 .7rem; font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
.panel-hero-badges { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }

.panel-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 1rem;
  margin-bottom: 2.6rem;
}
.panel-stat {
  position: relative;
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26, 37, 64, .6), rgba(10, 16, 32, .75));
  overflow: hidden;
}
.panel-stat::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.panel-stat.warn::before { background: linear-gradient(180deg, var(--amber), transparent); }
.panel-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.panel-stat-label {
  display: block;
  margin-top: .3rem;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  color: var(--dim);
}

.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.8rem; align-items: start; }
@media (max-width: 1000px) { .panel-grid { grid-template-columns: 1fr; } }

.panel-section-title {
  font-family: var(--font);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
}
.panel-section-title:not(:first-child) { margin-top: 2.4rem; }

.panel-empty {
  text-align: center;
  padding: 3.4rem 1.6rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(10, 16, 32, .4);
  color: var(--dim);
}
.panel-empty.compact { padding: 2.2rem 1.4rem; }
.panel-empty svg { width: 56px; height: 56px; margin: 0 auto 1rem; display: block; opacity: .6; }
.panel-empty h3 { color: var(--muted); margin-bottom: .5rem; }
.panel-empty p { margin: 0 auto; max-width: 46ch; }

/* Karaktärskort */
.char-list { display: flex; flex-direction: column; gap: .9rem; }
.char-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26, 37, 64, .68), rgba(10, 16, 32, .8));
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.char-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow), var(--shadow-glow);
  color: inherit;
}
.char-mark {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  flex: none;
  border-radius: 17px;
  background: linear-gradient(160deg, rgba(150, 183, 208, .28), rgba(46, 107, 77, .22));
  border: 1px solid rgba(150, 183, 208, .28);
  color: var(--accent-bright);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}
.char-mark.large { width: 76px; height: 76px; border-radius: 20px; font-size: 2rem; }
.char-body { flex: 1; min-width: 0; }
.char-name {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.char-job { display: block; color: var(--dim); font-size: .89rem; margin: .1rem 0 .7rem; }
.char-money { display: flex; flex-wrap: wrap; gap: .45rem; }
.money-chip {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .22rem .7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--hairline);
  font-size: .82rem;
}
.money-chip .money-label { color: var(--dim); }
.money-chip .money-value { color: var(--text); font-weight: 600; font-family: var(--font-mono); font-size: .8rem; }
.money-chip.warn { background: rgba(217, 164, 65, .1); border-color: rgba(217, 164, 65, .28); }
.money-chip.warn .money-label, .money-chip.warn .money-value { color: var(--amber); }
.char-go { color: var(--dim); font-size: 1.3rem; flex: none; transition: transform .18s var(--ease), color .18s var(--ease); }
.char-card:hover .char-go { color: var(--accent-bright); transform: translateX(4px); }

@media (max-width: 560px) {
  .char-card { align-items: flex-start; gap: .9rem; padding: 1.1rem; }
  .char-go { display: none; }
}

/* Kopplingar */
.link-list { display: flex; flex-direction: column; gap: .7rem; }
.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .95rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 32, .5);
}
.link-row-name { font-weight: 600; }
.link-row-meta { display: flex; align-items: center; gap: .8rem; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.2rem; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: .65rem;
  color: var(--muted);
  font-size: .92rem;
}
.steps li::before {
  content: counter(step);
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(150, 183, 208, .16);
  border: 1px solid rgba(150, 183, 208, .3);
  color: var(--accent-bright);
  font-size: .74rem;
  font-weight: 700;
  margin-top: .1rem;
}

.link-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: linear-gradient(180deg, rgba(150, 183, 208, .16), rgba(150, 183, 208, .07));
  border: 1px solid rgba(150, 183, 208, .32);
  border-radius: var(--radius-sm);
  padding: .7rem .8rem .7rem 1rem;
  margin: .2rem 0 .5rem;
  color: var(--accent-bright);
}
.copy-btn {
  flex: none;
  font: inherit;
  font-size: .76rem;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0;
  padding: .3rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(150, 183, 208, .35);
  background: rgba(150, 183, 208, .12);
  color: var(--accent-bright);
  cursor: pointer;
  transition: background .12s var(--ease);
}
.copy-btn:hover { background: rgba(150, 183, 208, .24); }
.link-code-hint { color: var(--dim); font-size: .84rem; margin: 0 0 1rem; }

/* Steam */
.steam-card .btn svg { margin-right: .1rem; }
.steam-linked { display: flex; align-items: center; gap: .85rem; margin-bottom: .9rem; }
.steam-linked svg { width: 34px; height: 34px; flex: none; color: var(--accent-bright); opacity: .9; }
.steam-name { font-weight: 600; color: var(--text); }

.fallback-card { padding: 0; }
.fallback-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: 1.4rem;
  cursor: pointer;
  list-style: none;
}
.fallback-card summary::-webkit-details-marker { display: none; }
.fallback-card summary h3 { margin: 0; font-size: .92rem; color: var(--muted); }
.fallback-toggle { color: var(--dim); transition: transform .2s var(--ease); }
.fallback-card[open] .fallback-toggle { transform: rotate(180deg); }
.fallback-card > :not(summary) { padding-left: 1.4rem; padding-right: 1.4rem; }
.fallback-card > :last-child { padding-bottom: 1.4rem; }

.status-pill { font-size: .8rem; font-weight: 600; }
.status-pill.on { color: var(--success); }
.status-pill.off { color: var(--dim); }
.sidebar-note { color: var(--dim); font-size: .87rem; line-height: 1.55; }

/* Fakturor */
.invoice-list { display: flex; flex-direction: column; gap: .7rem; }
.invoice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1.2rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(26, 37, 64, .55), rgba(10, 16, 32, .7));
}
.invoice-label { font-weight: 600; }
.invoice-meta { color: var(--dim); font-size: .85rem; margin-top: .15rem; }
.invoice-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--amber);
  white-space: nowrap;
}
.invoice-action form { display: flex; gap: .45rem; align-items: center; }
.invoice-action select { width: auto; padding: .38rem .6rem; font-size: .85rem; }

@media (max-width: 700px) {
  .invoice { grid-template-columns: 1fr auto; }
  .invoice-action { grid-column: 1 / -1; }
  .invoice-action form { justify-content: flex-end; }
}

/* Telefon */
.phone-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1.3rem; align-items: start; }
@media (max-width: 900px) { .phone-grid { grid-template-columns: 1fr; } }

.thread-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 28, 50, .62), rgba(10, 16, 32, .75));
  padding: .6rem;
  max-height: 640px;
  overflow-y: auto;
}
.thread-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .75rem .8rem;
}
.thread-panel-head h3 { margin: 0; font-size: .95rem; }

.thread {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-xs);
  color: var(--muted);
  transition: background .12s var(--ease);
}
.thread:hover { background: var(--surface-2); }
.thread.active { background: rgba(150, 183, 208, .12); }
.thread-avatar {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 12px;
  background: rgba(150, 183, 208, .14);
  border: 1px solid rgba(150, 183, 208, .22);
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 700;
}
.thread-avatar.contact {
  background: rgba(139, 108, 240, .16);
  border-color: rgba(139, 108, 240, .28);
  color: #c3b1ff;
  font-family: var(--font-display);
}
.thread-text { min-width: 0; }
.thread-number { display: block; color: var(--text); font-weight: 600; font-size: .92rem; font-family: var(--font-mono); }
.thread-preview {
  display: block; font-size: .84rem; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.chat {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 28, 50, .5), rgba(10, 16, 32, .68));
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: .8rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--hairline);
}
.chat-title { font-weight: 600; color: var(--text); font-size: .98rem; }
.chat-sub { color: var(--dim); font-size: .82rem; }

.chat-log {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.3rem 1.2rem;
  max-height: 460px;
  overflow-y: auto;
}
.chat-placeholder { padding: 3rem 1.4rem; text-align: center; color: var(--dim); }
.chat-placeholder h3 { color: var(--muted); }
.chat-placeholder p { margin: 0; }

.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble {
  max-width: min(78%, 460px);
  padding: .65rem .9rem .5rem;
  border-radius: 16px 16px 16px 5px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}
.bubble p { margin: 0; white-space: pre-wrap; color: var(--text); font-size: .94rem; }
.bubble time { display: block; margin-top: .25rem; font-size: .72rem; color: var(--dim); }
.bubble-row.mine .bubble {
  border-radius: 16px 16px 5px 16px;
  background: linear-gradient(180deg, rgba(150, 183, 208, .2), rgba(150, 183, 208, .12));
  border-color: rgba(150, 183, 208, .3);
}
.bubble-row.mine .bubble time { text-align: right; }

.composer { padding: 1rem 1.2rem 1.2rem; border-top: 1px solid var(--hairline); background: rgba(5, 8, 16, .35); }
.composer-row { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.composer-row input { flex: 1; }
.composer-row .counter { float: none; }
.composer textarea { min-height: 92px; }
.composer-actions { display: flex; justify-content: flex-end; margin-top: .7rem; }

/* ── Tidslinje / meddelanden ────────────────────────────── */

.timeline { display: flex; flex-direction: column; gap: 1rem; }
.msg { display: flex; gap: .9rem; }
.msg img { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.msg-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .8rem 1.05rem;
  flex: 1;
}
.msg-head { display: flex; align-items: center; gap: .55rem; font-size: .87rem; margin-bottom: .3rem; flex-wrap: wrap; }
.msg-head .name { font-weight: 600; }
.msg-head time { color: var(--dim); font-size: .79rem; }
.msg-body p { margin: 0; white-space: pre-wrap; color: var(--muted); }
.msg.staff .msg-body { border-color: rgba(150, 183, 208, .3); background: rgba(150, 183, 208, .06); }
.msg.system { justify-content: center; }
.msg.system .msg-body { background: transparent; border: none; text-align: center; color: var(--dim); font-size: .86rem; padding: .2rem; }

.answer-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.35rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, rgba(19, 28, 50, .5), rgba(10, 16, 32, .6));
}
.answer-block .q { font-weight: 600; font-size: .96rem; color: var(--text); margin-bottom: .5rem; }
.answer-block .a { color: var(--muted); white-space: pre-wrap; margin: 0; }

.progress { height: 4px; background: rgba(255, 255, 255, .06); border-radius: 99px; overflow: hidden; margin-top: .55rem; }
.progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright));
  transition: width .25s var(--ease);
}

/* ── Admin ──────────────────────────────────────────────── */

.admin-shell { display: grid; grid-template-columns: 244px 1fr; gap: 1.9rem; align-items: start; padding: 2.2rem 0 4.5rem; }
.admin-nav {
  position: sticky; top: 98px;
  background: linear-gradient(180deg, rgba(19, 28, 50, .62), rgba(10, 16, 32, .75));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem;
  box-shadow: var(--shadow-sm);
}
.admin-nav a {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .56rem .8rem;
  border-radius: var(--radius-xs);
  color: var(--muted);
  font-size: .94rem;
  font-weight: 500;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.active { background: rgba(150, 183, 208, .12); color: var(--accent-bright); }
.admin-nav a.active::before {
  content: '';
  position: absolute;
  left: -0.7rem; top: 50%;
  width: 3px; height: 18px;
  margin-top: -9px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.admin-nav .group {
  padding: .9rem .8rem .35rem;
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--dim);
  font-weight: 700;
}
.admin-nav .count {
  background: rgba(150, 183, 208, .16);
  color: var(--accent-bright);
  border-radius: 99px;
  padding: 0 .5rem;
  font-size: .76rem;
  font-weight: 600;
}

.admin-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; }
.admin-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.4rem; align-items: center; }
.filters form { display: flex; gap: .55rem; flex: 1; min-width: 240px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: .42rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .87rem;
  font-weight: 500;
  background: rgba(255, 255, 255, .025);
  transition: color .12s var(--ease), border-color .12s var(--ease), background .12s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.chip.active { background: rgba(150, 183, 208, .14); color: var(--accent-bright); border-color: rgba(150, 183, 208, .34); }

.pagination { display: flex; gap: .45rem; justify-content: center; margin-top: 1.8rem; align-items: center; }
.pagination .chip.disabled { opacity: .35; pointer-events: none; }

.split { display: grid; grid-template-columns: 1fr 336px; gap: 1.7rem; align-items: start; }
.sidebar-card {
  background: linear-gradient(180deg, rgba(19, 28, 50, .62), rgba(10, 16, 32, .75));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h3 { font-size: 1rem; margin-bottom: .95rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: .92rem; border-bottom: 1px solid var(--hairline); }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--dim); }

@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; }
  .split { grid-template-columns: 1fr; }
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  position: relative;
  margin-top: auto;
  padding: 4.5rem 0 2.2rem;
  color: var(--dim);
  font-size: .92rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .45));
  border-top: 1px solid var(--border);
}
.site-footer::before {
  content: '';
  position: absolute;
  left: 50%; top: -1px;
  width: min(920px, 92%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(150, 183, 208, .3), transparent);
  pointer-events: none;
}
.site-footer .wrap { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.2rem; margin-bottom: 2.4rem; }
.site-footer h4 { color: var(--text); font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 1rem; }
.site-footer a { color: var(--muted); display: block; padding: .2rem 0; }
.site-footer a:hover { color: var(--accent-bright); }
.footer-bottom { border-top: 1px solid var(--hairline); padding-top: 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.7rem; }
  .card, .tier { padding: 1.45rem; }
}

/* ── Övrigt ─────────────────────────────────────────────── */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 3px solid var(--bg-deep); }
::-webkit-scrollbar-thumb:hover { background: #1e3a2a; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .btn:hover, .card-link:hover, .tier:hover { transform: none; }
}
