:root {
  --bg: #0a0710;
  --surface: #110e1a;
  --surface-2: #161221;
  --raised: #1b1628;
  --line: #241d36;
  --line-soft: #1a1528;
  --text: #ece8f4;
  --text-dim: #a79dbb;
  --text-faint: #6e6584;
  --accent: #a855f7;
  --accent-dim: #7c3aed;
  --accent-wash: rgba(168, 85, 247, 0.12);
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

svg {
  flex: none;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}

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

.num {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--text-faint);
}

/* ===================== innlogging ===================== */

.login-body {
  background: var(--bg);
}

.login-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

/* Venstre: merkevare. Flatt — ingen glød, ingen gradienter. */
.login-brand {
  padding: 40px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.login-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.login-letter {
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-dim);
  border-color: transparent;
}

.login-copy {
  margin: auto 0;
  max-width: 400px;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
}

.login-eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.login-copy h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 22px 0 0;
  font-weight: 800;
}

.login-copy h1 em {
  font-style: normal;
  color: var(--accent);
}

.login-copy > p {
  color: var(--text-dim);
  font-size: 15px;
  margin: 14px 0 0;
  max-width: 320px;
}

.login-points {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 10px;
}

.login-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  color: var(--text-dim);
}

.login-points li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.login-foot {
  font-size: 12px;
  color: var(--text-faint);
}

/* Høyre: selve kortet. */
.login-form {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}

.login-card {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 30px;
}

.login-card h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.login-sub {
  color: var(--text-faint);
  font-size: 13px;
  margin: 8px 0 22px;
}

.login-card .err {
  display: none;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.06);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.login-button {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 14px;
}

.login-note {
  color: var(--text-faint);
  font-size: 11.5px;
  text-align: center;
  margin: 14px 0 0;
}

@media (max-width: 860px) {
  .login-split {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 26px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-copy {
    margin: 22px 0;
  }

  .login-points,
  .login-foot {
    display: none;
  }
}

/* ===================== skjelett ===================== */

.app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 16px 12px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* Menyen scroller for seg selv, så logo og bruker alltid er synlige. */
.sidebar nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  margin-right: -6px;
  padding-right: 6px;
}

.sidebar nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar nav::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.sidebar nav::-webkit-scrollbar-thumb:hover {
  background: #322745;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 16px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--raised);
  border: 1px solid var(--line);
}

.brand-letter {
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-dim);
  border-color: transparent;
}

.brand-text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.04em;
}

.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-faint);
  padding: 14px 10px 6px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13.5px;
  text-align: left;
  position: relative;
  transition: background 0.12s, color 0.12s;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--raised);
  color: var(--text);
  font-weight: 500;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 7px;
  bottom: 7px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-item svg {
  opacity: 0.72;
}

.nav-item.active svg {
  opacity: 1;
  color: var(--accent);
}

.nav-count {
  margin-left: auto;
  font-size: 11px;
  min-width: 18px;
  text-align: center;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--accent-wash);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.side-user {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding: 12px 8px 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.side-user img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--raised);
}

.side-user .who {
  overflow: hidden;
}

.side-user .who div:first-child {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user .who div:last-child {
  font-size: 10.5px;
  color: var(--text-faint);
}

.side-user a {
  margin-left: auto;
  color: var(--text-faint);
  padding: 6px;
  border-radius: 6px;
  display: flex;
}

.side-user a:hover {
  color: var(--text);
  background: var(--surface-2);
}

/* ===================== topbar ===================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  height: 54px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 7, 16, 0.85);
  backdrop-filter: blur(12px);
}

.crumbs {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--text-faint);
}

.crumbs h1 {
  font-size: 14.5px;
  color: var(--text);
}

.crumbs .sep {
  opacity: 0.5;
}

.topbar .sub {
  color: var(--text-faint);
  font-size: 12.5px;
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
}

.topbar .spacer {
  margin-left: auto;
}

.content {
  padding: 22px 24px 80px;
  max-width: 1120px;
}

/* ===================== kort ===================== */

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 14px;
  overflow: hidden;
}

.card > header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card > header h2 {
  font-size: 13px;
}

.card > header p {
  margin: 1px 0 0;
  color: var(--text-faint);
  font-size: 12px;
}

.card > header .spacer {
  margin-left: auto;
}

.card .body {
  padding: 16px;
}

.card .body.flush {
  padding: 0;
}

.split {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cols {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.35fr 1fr;
  align-items: start;
}

/* ===================== KPI ===================== */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 13px 15px;
}

.kpi .k {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi .v {
  font-size: 26px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  margin-top: 6px;
  line-height: 1.1;
}

.kpi .v small {
  font-size: 13px;
  color: var(--text-faint);
  font-weight: 500;
  margin-left: 2px;
  letter-spacing: 0;
}

.kpi .foot {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 5px;
}

.delta {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.delta.up {
  color: var(--ok);
}

.delta.down {
  color: var(--bad);
}

.delta.flat {
  color: var(--text-faint);
}

/* ===================== graf ===================== */

.chart {
  position: relative;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
}

.chart .axis {
  fill: var(--text-faint);
  font-size: 10.5px;
  font-family: inherit;
}

.chart .bar {
  fill: var(--accent);
  transition: fill 0.12s;
}

.chart .bar.dim {
  fill: #3d2f5c;
}

.chart .hit {
  fill: transparent;
  cursor: default;
}

.chart .hit:hover + .bar,
.chart .col:hover .bar {
  fill: #c084fc;
}

.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0.1s;
  box-shadow: var(--shadow);
  z-index: 5;
}

.chart-tip.show {
  opacity: 1;
}

.chart-tip b {
  color: var(--accent);
}

/* liggende stolper */

.hbars {
  display: grid;
  gap: 9px;
}

.hbar {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.hbar .label {
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hbar .track {
  display: block;
  height: 8px;
  background: var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
}

.hbar .fill {
  display: block;
  height: 8px;
  background: var(--accent);
  border-radius: 4px;
  min-width: 3px;
}

.hbar .value {
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  font-size: 12.5px;
  min-width: 24px;
  text-align: right;
}

/* ===================== skjema ===================== */

.field {
  display: block;
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

.field > .lbl {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 500;
}

.field .help {
  display: block;
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 5px;
}

input[type="text"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #30264a;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}

textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6584' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch-row code {
  font-size: 11.5px;
  color: var(--text-faint);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 9px;
  color: var(--text-faint);
}

.search input {
  padding-left: 30px;
  width: 220px;
  height: 32px;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  cursor: pointer;
  font-size: 13.5px;
}

.check input {
  appearance: none;
  width: 34px;
  height: 19px;
  border-radius: 10px;
  background: #2a2140;
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background 0.15s;
}

.check input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #8b82a3;
  transition: transform 0.15s, background 0.15s;
}

.check input:checked {
  background: rgba(168, 85, 247, 0.35);
}

.check input:checked::after {
  transform: translateX(15px);
  background: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
  color: var(--text-dim);
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.tag:hover {
  border-color: #30264a;
  color: var(--text);
}

.tag.on {
  border-color: var(--accent-dim);
  background: var(--accent-wash);
  color: var(--text);
}

.tag i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.7;
}

/* segmentert velger */

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
  border-right: 1px solid var(--line);
  transition: background 0.12s, color 0.12s;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.segmented button.on {
  background: var(--accent-wash);
  color: #fff;
  font-weight: 500;
}

/* ===================== knapper ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 7px;
  padding: 7px 13px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}

.btn:hover {
  background: #241d36;
  border-color: #30264a;
}

.btn.primary {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #fff;
  font-weight: 500;
}

.btn.primary:hover {
  background: #8b45f0;
  border-color: #8b45f0;
}

.btn.quiet {
  background: transparent;
}

.btn.bad {
  color: #fca5a5;
}

.btn.bad:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.35);
}

.btn.tiny {
  padding: 4px 9px;
  font-size: 12px;
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ===================== tabell ===================== */

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  font-weight: 700;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
  white-space: nowrap;
}

thead th.sortable {
  cursor: pointer;
  user-select: none;
}

thead th.sortable:hover {
  color: var(--text-dim);
}

thead th .arrow {
  color: var(--accent);
  margin-left: 3px;
}

tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.clickable {
  cursor: pointer;
}

tbody tr.clickable:hover td {
  background: var(--surface-2);
}

tbody tr.active td {
  background: var(--accent-wash);
}

.ref {
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  white-space: nowrap;
}

.who-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--raised);
  border: 1px solid var(--line);
  flex: none;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--text-faint);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.open {
  color: var(--ok);
}

.badge.closed {
  color: var(--text-faint);
}

.prio {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--text-faint);
  white-space: nowrap;
}

.prio.hoy {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}

.prio.lav {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.07);
}

/* ===================== skuff ===================== */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 9, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 40;
}

.scrim.show {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.drawer.show {
  transform: translateX(0);
}

.drawer > header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer > header h2 {
  font-size: 14px;
}

.drawer > header .close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
}

.drawer > header .close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.drawer-body {
  overflow-y: auto;
  padding: 16px;
  flex: 1;
}

.drawer-section {
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  margin-top: 14px;
}

.drawer-section:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.drawer-section > h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 10px;
}

.inline-form {
  display: flex;
  gap: 6px;
}

.inline-form input,
.inline-form select {
  flex: 1;
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 14px;
  font-size: 13px;
  align-items: center;
}

.kv dt {
  color: var(--text-faint);
}

.kv dd {
  margin: 0;
}

.answer {
  border-left: 2px solid var(--line);
  padding-left: 10px;
  margin-bottom: 10px;
}

.answer strong {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.answer span {
  font-size: 13px;
  white-space: pre-wrap;
}

/* ===================== discord-forhåndsvisning ===================== */

.dc {
  background: #313338;
  border-radius: 8px;
  padding: 16px;
}

.dc-container {
  border: 1px solid #3f4147;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #2b2d31;
  padding: 14px 16px;
  max-width: 480px;
  font-size: 14px;
  color: #dbdee1;
}

.dc-container img.media {
  width: 100%;
  border-radius: 6px;
  display: block;
  margin-bottom: 12px;
}

.dc-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dc-row img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
}

.dc-title {
  color: #f2f3f5;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.dc-text {
  white-space: pre-wrap;
  line-height: 1.4;
}

.dc-text code,
.dc-bullets code {
  background: #1e1f22;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 12.5px;
  font-family: ui-monospace, Consolas, monospace;
}

.dc-sep {
  height: 1px;
  background: #3f4147;
  margin: 12px 0;
}

.dc-bullets {
  line-height: 1.6;
}

.dc-bullets b {
  color: #f2f3f5;
}

.dc-select {
  margin-top: 12px;
  background: #1e1f22;
  border: 1px solid #131416;
  border-radius: 4px;
  padding: 9px 11px;
  color: #949ba4;
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
}

.dc-foot {
  color: #949ba4;
  font-size: 12px;
  margin-top: 10px;
}

/* ===================== kategori-editor ===================== */

.cat {
  border-bottom: 1px solid var(--line-soft);
}

.cat:last-child {
  border-bottom: 0;
}

.cat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  cursor: pointer;
}

.cat-head:hover {
  background: var(--surface-2);
}

.cat-head .ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--raised);
  border: 1px solid var(--line);
  font-size: 14px;
}

.cat-head .name {
  font-size: 13.5px;
  font-weight: 500;
}

.cat-head .meta {
  font-size: 12px;
  color: var(--text-faint);
}

.cat-head .spacer {
  margin-left: auto;
}

.cat-head .chev {
  color: var(--text-faint);
  transition: transform 0.15s;
}

.cat.open .chev {
  transform: rotate(90deg);
}

.cat-body {
  padding: 4px 16px 18px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
}

.sub-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  font-weight: 700;
  margin: 20px 0 4px;
}

.qcard {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 12px 8px;
  margin-bottom: 8px;
  background: var(--surface);
}

/* ===================== diverse ===================== */

.feed-row {
  display: flex;
  align-items: baseline;
  gap: 11px;
  padding: 9px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
}

.feed-row:last-child {
  border-bottom: 0;
}

.feed-row .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  opacity: 0.65;
}

.feed-row .when {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 12px;
  white-space: nowrap;
}

.dot-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bad);
  display: inline-block;
}

.dot-status.on {
  background: var(--ok);
}

.empty {
  color: var(--text-faint);
  text-align: center;
  padding: 34px 16px;
  font-size: 13px;
}

.empty svg {
  display: block;
  margin: 0 auto 10px;
  opacity: 0.3;
}

.savebar {
  position: sticky;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(27, 22, 40, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.savebar .hint {
  font-size: 12.5px;
  color: var(--text-faint);
}

.savebar .hint.dirty {
  color: var(--warn);
}

.savebar .spacer {
  margin-left: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 14px);
  background: var(--raised);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s, transform 0.16s;
  z-index: 60;
  max-width: 380px;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.bad {
  border-left-color: var(--bad);
}

.banner-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(45deg, var(--line-soft) 25%, transparent 25%, transparent 75%, var(--line-soft) 75%) 0 0 / 16px 16px,
    linear-gradient(45deg, var(--line-soft) 25%, transparent 25%, transparent 75%, var(--line-soft) 75%) 8px 8px / 16px 16px,
    var(--bg);
}

.banner-frame img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 4px;
  transition: opacity 0.15s;
}

@media (max-width: 980px) {
  .cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px;
    gap: 4px;
  }

  .brand {
    padding: 0 10px 0 4px;
  }

  .nav-label,
  .side-user .who {
    display: none;
  }

  .nav-item {
    width: auto;
  }

  .nav-item.active::before {
    display: none;
  }

  .side-user {
    margin-left: auto;
    margin-top: 0;
    border: 0;
    padding-top: 0;
  }

  .topbar,
  .content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .search input {
    width: 140px;
  }
}
