/* server.tcmcd.se — mörkt, glasigt, mobilt först. */

:root {
  color-scheme: dark;
  --bg: #06080e;
  --bg2: #0b0f19;
  --card: rgba(255, 255, 255, .035);
  --card-h: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .075);
  --line2: rgba(255, 255, 255, .13);
  --text: #e9edf5;
  --dim: #8a94a8;
  --dim2: #5d6679;
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --pink: #f472b6;
  --orange: #fb923c;
  --grad: linear-gradient(135deg, #38bdf8, #a78bfa);
  --r: 18px;
  --r2: 12px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 0% -10%, rgba(56, 189, 248, .13), transparent 60%),
    radial-gradient(800px 600px at 110% 10%, rgba(167, 139, 250, .12), transparent 60%),
    radial-gradient(700px 500px at 50% 120%, rgba(52, 211, 153, .06), transparent 60%);
}
a { color: var(--cyan); text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(56, 189, 248, .35); }

/* ------------------------------------------------------------ layout */

.app { display: flex; min-height: 100vh; }
.side {
  display: none;
}
.main {
  flex: 1; min-width: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(var(--nav-h) + var(--safe-b) + 24px);
  max-width: 1500px; margin: 0 auto; width: 100%;
}
.topbar {
  display: flex; align-items: center; gap: 12px; margin: 2px 0 18px;
}
.topbar h1 {
  margin: 0; font-size: 26px; letter-spacing: -.02em; font-weight: 750; line-height: 1.1;
}
.topbar .sub { color: var(--dim); font-size: 13px; margin-top: 3px; }
.topbar .grow { flex: 1; min-width: 0; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; vertical-align: middle; margin-right: 6px;
}
.live-dot.is-off { background: var(--dim2); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* mobil bottenmeny */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  padding: 6px 6px calc(6px + var(--safe-b));
  background: rgba(8, 11, 18, .82);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--line);
}
.tabbar button, .side nav button {
  background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--dim); font-size: 10.5px; font-weight: 600; padding: 6px 8px; border-radius: 12px; min-width: 58px;
  -webkit-tap-highlight-color: transparent; transition: color .15s;
}
.tabbar button svg { width: 23px; height: 23px; }
.tabbar button.is-on { color: var(--text); }
.tabbar button.is-on svg { stroke: url(#gnav); filter: drop-shadow(0 0 8px rgba(56, 189, 248, .45)); }

/* "Mer"-arket */
.sheet-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-scrim.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  background: #0d1220; border-top: 1px solid var(--line2); border-radius: 22px 22px 0 0;
  padding: 10px 14px calc(18px + var(--safe-b));
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet.is-open { transform: none; }
.sheet::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sheet-grid button {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.sheet-grid button svg { width: 24px; height: 24px; stroke: var(--cyan); }
.sheet-grid button.is-on { border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .08); }
.sheet .logout { margin-top: 14px; width: 100%; }

@media (min-width: 960px) {
  .tabbar { display: none; }
  .side {
    display: flex; flex-direction: column; width: 232px; flex: none;
    position: sticky; top: 0; height: 100vh; padding: 22px 14px;
    border-right: 1px solid var(--line); background: rgba(8, 11, 18, .55);
    backdrop-filter: blur(12px);
  }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
  .side .brand img { width: 36px; height: 36px; }
  .side .brand b { display: block; font-size: 14.5px; letter-spacing: -.01em; }
  .side .brand span { font-size: 11.5px; color: var(--dim); }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav button {
    flex-direction: row; gap: 12px; font-size: 14px; padding: 10px 12px; justify-content: flex-start; width: 100%; font-weight: 550;
  }
  .side nav button svg { width: 20px; height: 20px; }
  .side nav button:hover { background: var(--card); color: var(--text); }
  .side nav button.is-on { background: linear-gradient(90deg, rgba(56, 189, 248, .14), rgba(167, 139, 250, .06)); color: var(--text); }
  .side nav button.is-on svg { stroke: var(--cyan); }
  .side .foot { margin-top: auto; padding: 0 8px; font-size: 12px; color: var(--dim); }
  .side .foot form { margin-top: 10px; }
  .main { padding: 28px 32px 48px; }
  .topbar h1 { font-size: 30px; }
}

/* ------------------------------------------------------------- kort */

.grid { display: grid; gap: 14px; align-items: start; }
.g2 { grid-template-columns: 1fr; }
.g3 { grid-template-columns: 1fr; }
.g4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) {
  .g2 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .g4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .g3 { grid-template-columns: repeat(3, 1fr); }
}
.span2 { grid-column: 1 / -1; }
@media (min-width: 1200px) { .span2 { grid-column: span 2; } }
.full { grid-column: 1 / -1; }
.mt { margin-top: 14px; }

.card {
  position: relative; min-width: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 40px -20px rgba(0, 0, 0, .6);
}
.card h2 {
  margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.card h2 .right { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.card h2 .count { background: var(--card-h); color: var(--text); border-radius: 99px; padding: 1px 8px; font-size: 11.5px; letter-spacing: 0; }
.card h2.mt { margin-top: 20px; }
.card.pad0 { padding: 0; }
.card.pad0 h2 { padding: 16px 16px 0; }

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .lbl { font-size: 12px; color: var(--dim); font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 750; letter-spacing: -.025em; line-height: 1.15; }
.kpi .val small { font-size: 14px; color: var(--dim); font-weight: 600; margin-left: 3px; letter-spacing: 0; }
.kpi .note { font-size: 12px; color: var(--dim); }
.kpi .spark { height: 34px; margin-top: 6px; }
@media (min-width: 700px) { .kpi .val { font-size: 30px; } }

/* hjältekortet */
.hero {
  display: grid; gap: 16px; grid-template-columns: 1fr; align-items: center;
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(56, 189, 248, .16), transparent 70%),
    radial-gradient(500px 220px at 100% 100%, rgba(167, 139, 250, .14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
}
.hero .status { display: flex; align-items: center; gap: 14px; }
.hero .status .orb {
  width: 54px; height: 54px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #6ee7b7, #059669); box-shadow: 0 0 30px rgba(52, 211, 153, .45);
}
.hero .status .orb.warn { background: radial-gradient(circle at 35% 30%, #fde68a, #d97706); box-shadow: 0 0 30px rgba(251, 191, 36, .45); }
.hero .status .orb.bad { background: radial-gradient(circle at 35% 30%, #fca5a5, #dc2626); box-shadow: 0 0 30px rgba(248, 113, 113, .5); }
.hero .status .orb svg { width: 26px; height: 26px; stroke: #fff; }
.hero .status h3 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.hero .status p { margin: 2px 0 0; color: var(--dim); font-size: 13px; }
.rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(260px, 1fr) 2fr; } }

.ring { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.ring svg { width: 100%; max-width: 104px; height: auto; display: block; }
.ring .rv { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.ring .rl { font-size: 11.5px; color: var(--dim); font-weight: 600; text-align: center; }
.ring .rs { font-size: 11px; color: var(--dim2); text-align: center; white-space: nowrap; }
.ring circle { transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1), stroke .4s; }

/* checklista */
.checks { display: flex; flex-direction: column; gap: 8px; }
.check {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r2);
  background: rgba(251, 191, 36, .07); border: 1px solid rgba(251, 191, 36, .22); cursor: pointer;
}
.check.bad { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .3); }
.check b { display: block; font-size: 14px; }
.check span { color: var(--dim); font-size: 12.5px; }
.check i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-top: 6px; flex: none; box-shadow: 0 0 10px var(--amber); }
.check.bad i { background: var(--red); box-shadow: 0 0 10px var(--red); }

/* tjänstechips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  background: var(--card); border: 1px solid var(--line);
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.chip.off i { background: var(--dim2); box-shadow: none; }
.chip.bad i { background: var(--red); box-shadow: 0 0 8px var(--red); }
.chip.warn i { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* knappar / segment */
.seg {
  display: inline-flex; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  border: 0; background: none; padding: 6px 11px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--dim); cursor: pointer; white-space: nowrap;
}
.seg button.is-on { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.btn {
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); border-radius: 11px; padding: 8px 14px;
  font-size: 13.5px; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { background: rgba(255, 255, 255, .09); }
.btn.primary { background: var(--grad); border-color: transparent; color: #061018; }
.iconbtn { border: 1px solid var(--line); background: var(--card); border-radius: 12px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; flex: none; }
.iconbtn svg { width: 19px; height: 19px; }
input.search, select.sel {
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line2); color: var(--text); border-radius: 11px;
  padding: 8px 12px; font: inherit; font-size: 14px; min-width: 0; outline: none;
}
input.search:focus, select.sel:focus { border-color: rgba(56, 189, 248, .6); box-shadow: 0 0 0 3px rgba(56, 189, 248, .15); }
select.sel { -webkit-appearance: none; appearance: none; padding-right: 30px;
  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='%238a94a8' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
select.sel option { background: #0d1220; }

/* ------------------------------------------------------------ diagram */

.chart { position: relative; width: 100%; min-height: 160px; }
.chart.h200 { height: 200px; }
.chart.h240 { height: 240px; }
.chart.h120 { height: 120px; min-height: 120px; }
.chart .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font-size: 13px; }

.uplot { font-family: inherit; }
.uplot .u-legend { font-size: 12px; color: var(--dim); text-align: left; margin-top: 6px; }
.uplot .u-legend .u-series { padding: 2px 10px 2px 0; }
.uplot .u-legend .u-series th { font-weight: 600; }
.uplot .u-legend .u-series td { color: var(--text); font-weight: 650; }
.uplot .u-legend .u-marker { border-radius: 3px; width: 10px; height: 10px; }
.uplot .u-legend tr:first-child th { font-weight: 600; color: var(--dim); }
.uplot .u-legend tr.u-series:first-child td { color: var(--dim); }
.uplot .u-cursor-x, .uplot .u-cursor-y { border-color: rgba(255, 255, 255, .25) !important; }
.uplot .u-select { background: rgba(56, 189, 248, .12); }

/* staplar i listor */
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar {
  position: relative; display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 7px 10px; border-radius: 9px; font-size: 13px; overflow: hidden; min-width: 0;
}
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, rgba(56, 189, 248, .2), rgba(167, 139, 250, .14)); z-index: 0; }
.bar > span { position: relative; z-index: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .k { font-family: var(--mono); font-size: 12.3px; }
.bar .k.plain { font-family: inherit; font-size: 13px; }
.bar .n { flex: none; font-weight: 700; }
.bar .n small { color: var(--dim); font-weight: 600; margin-left: 6px; }
.bars.red .fill { background: linear-gradient(90deg, rgba(248, 113, 113, .25), rgba(251, 146, 60, .12)); }
.bars.green .fill { background: linear-gradient(90deg, rgba(52, 211, 153, .22), rgba(56, 189, 248, .1)); }
.bars.amber .fill { background: linear-gradient(90deg, rgba(251, 191, 36, .22), rgba(251, 146, 60, .1)); }

/* fördelning (staplad rad) */
.split { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .05); margin: 4px 0 10px; }
.split i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--dim); }
.legend b { color: var(--text); font-weight: 650; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* tabeller */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--dim); font-weight: 650; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 9px 8px; border-bottom: 1px solid rgba(255, 255, 255, .045); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgba(255, 255, 255, .03); }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .mono { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.tbl .nowrap { white-space: nowrap; }
.tbl .ell { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.ok { color: var(--green); }
.warn { color: var(--amber); }
.bad { color: var(--red); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--card-h); white-space: nowrap; }
.pill.ok { background: rgba(52, 211, 153, .14); }
.pill.warn { background: rgba(251, 191, 36, .14); }
.pill.bad { background: rgba(248, 113, 113, .15); }
.pill.info { background: rgba(56, 189, 248, .14); color: var(--cyan); }

/* mobila listrader i stället för breda tabeller */
.rows { display: flex; flex-direction: column; }
.row { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); min-width: 0; }
.row:last-child { border-bottom: 0; }
.row .main-col { flex: 1; min-width: 0; }
.row .t1 { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t2 { color: var(--dim); font-size: 12.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t2.wrap { white-space: normal; word-break: break-word; }
.row .end { text-align: right; flex: none; font-size: 13px; }
.row .end .t2 { text-align: right; }
.row.click { cursor: pointer; }
.row .badge { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(56, 189, 248, .1); color: var(--cyan); font-size: 13px; font-weight: 800; }
.row .badge svg { width: 18px; height: 18px; }
.row .badge.ok { background: rgba(52, 211, 153, .12); color: var(--green); }
.row .badge.bad { background: rgba(248, 113, 113, .13); color: var(--red); }
.row .badge.warn { background: rgba(251, 191, 36, .13); color: var(--amber); }

/* processer */
.meter { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: 5px; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 3px; }
.meter.warn i { background: linear-gradient(90deg, var(--amber), var(--orange)); }
.meter.bad i { background: linear-gradient(90deg, var(--orange), var(--red)); }

/* loggar */
.logbox {
  background: #05070c; border: 1px solid var(--line); border-radius: var(--r2);
  font: 12px/1.55 var(--mono); padding: 10px 0; overflow: auto; max-height: calc(100vh - 260px); min-height: 300px;
  -webkit-overflow-scrolling: touch;
}
.logbox.wrap .ln { white-space: pre-wrap; word-break: break-all; }
.logbox .ln { white-space: pre; padding: 1px 14px; color: #c3cad8; }
.logbox .ln:hover { background: rgba(255, 255, 255, .035); }
.logbox .ln.err { color: #fca5a5; background: rgba(248, 113, 113, .06); }
.logbox .ln.wrn { color: #fcd34d; }
.logbox .ln.ok { color: #86efac; }
.logbox .ln.mute { color: #6b7488; }
.logbox mark { background: rgba(251, 191, 36, .35); color: #fff; border-radius: 3px; padding: 0 1px; }
.logbox .ts { color: #6f8fb3; }
.logbox .ip { color: #c4b5fd; }
.logbox .st2 { color: #86efac; }
.logbox .st3 { color: #93c5fd; }
.logbox .st4 { color: #fcd34d; }
.logbox .st5 { color: #fca5a5; font-weight: 700; }
.logmeta { font-size: 12px; color: var(--dim); margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }

/* detaljruta (modal) */
.modal-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50; display: none; align-items: flex-end; justify-content: center; }
.modal-scrim.is-open { display: flex; }
.modal {
  background: #0d1220; border: 1px solid var(--line2); border-radius: 22px 22px 0 0; width: 100%; max-width: 760px; max-height: 86vh;
  overflow: auto; padding: 18px 18px calc(18px + var(--safe-b)); animation: up .25s cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 700px) { .modal-scrim { align-items: center; } .modal { border-radius: 22px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 12px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.modal h3 .iconbtn { margin-left: auto; }
.modal pre { background: #05070c; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: 12px/1.55 var(--mono); white-space: pre-wrap; word-break: break-all; margin: 8px 0 0; max-height: 50vh; overflow: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }

/* laddning */
.skel { position: relative; overflow: hidden; background: rgba(255, 255, 255, .04); border-radius: var(--r); min-height: 120px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: sh 1.4s infinite; }
@keyframes sh { to { transform: translateX(100%); } }
.err-box { padding: 16px; border-radius: var(--r); background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .3); }
.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }

/* ------------------------------------------------------------- login */

.login-body { display: grid; place-items: center; padding: 24px 16px; }
.login-glow { position: fixed; width: 520px; height: 520px; border-radius: 50%; background: var(--grad); filter: blur(130px); opacity: .22; top: 50%; left: 50%; transform: translate(-50%, -60%); z-index: -1; }
.login {
  width: 100%; max-width: 380px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
  border: 1px solid var(--line2); border-radius: 24px; padding: 26px 22px 24px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  backdrop-filter: blur(16px);
}
.login__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login__brand h1 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.login__brand p { margin: 2px 0 0; color: var(--dim); font-size: 13px; }
.login__form { display: flex; flex-direction: column; gap: 14px; }
.login__form label > span { display: block; font-size: 12.5px; color: var(--dim); font-weight: 600; margin-bottom: 6px; }
.login__form input:not([type=checkbox]) {
  width: 100%; background: rgba(0, 0, 0, .3); border: 1px solid var(--line2); border-radius: 13px; color: var(--text);
  padding: 13px 14px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.login__form input:focus { border-color: rgba(56, 189, 248, .7); box-shadow: 0 0 0 4px rgba(56, 189, 248, .15); }
.login__check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--dim); }
.login__check span { margin: 0 !important; font-weight: 500 !important; }
.login__check input { margin-top: 2px; accent-color: #38bdf8; width: 16px; height: 16px; }
.login__err { margin: 0; color: #fecaca; background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .3); border-radius: 11px; padding: 10px 12px; font-size: 13.5px; }
.login__form button {
  margin-top: 4px; border: 0; border-radius: 13px; padding: 14px; font-size: 16px; font-weight: 750; cursor: pointer;
  background: var(--grad); color: #061018; box-shadow: 0 10px 30px -10px rgba(56, 189, 248, .6);
}
.login__form button:disabled { opacity: .5; cursor: not-allowed; }

.btn svg { width: 15px; height: 15px; flex: none; }
.toolbar .search { flex: 1 1 200px; }
.toolbar .sel { max-width: 100%; }
