/* ==========================================================================
   Member Intelligence dashboard - stylesheet
   A single hand-written sheet: no framework, no build step, no CDN. The whole
   front end is three static files the server can hand out unchanged.
   ========================================================================== */

:root {
  --bg:            #0d1117;
  --bg-raised:     #151b24;
  --bg-panel:      #171e28;
  --bg-hover:      #1d2632;
  --border:        #242e3b;
  --border-strong: #33404f;

  --text:          #e6edf3;
  --text-muted:    #8b98a9;
  --text-dim:      #5f6c7d;

  --accent:        #4f8cff;
  --accent-soft:   rgba(79, 140, 255, 0.14);

  --low:      #3fb950;
  --medium:   #d29922;
  --high:     #f0883e;
  --critical: #f85149;
  --online:   #3fb950;

  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 8px 28px rgba(0, 0, 0, 0.42);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.92em; }

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(79, 140, 255, 0.14), transparent 70%),
    var(--bg);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.login-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.login-mark { font-size: 30px; line-height: 1; }
.login-brand h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.2px; }
.login-brand p { margin: 2px 0 0; color: var(--text-muted); font-size: 12.5px; }

.login-card label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-card input { margin-bottom: 18px; }
.login-foot { margin: 22px 0 0; font-size: 12px; color: var(--text-dim); line-height: 1.6; }

.form-error {
  margin: 16px 0 0;
  padding: 10px 12px;
  background: rgba(248, 81, 73, 0.12);
  border: 1px solid rgba(248, 81, 73, 0.35);
  border-radius: var(--radius-sm);
  color: #ffa198;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder { color: var(--text-dim); }
select { cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #3d7cf0; border-color: #3d7cf0; }
.btn-danger { border-color: rgba(248, 81, 73, 0.5); color: #ff9d95; }
.btn-danger:hover:not(:disabled) { background: rgba(248, 81, 73, 0.14); border-color: var(--critical); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; padding: 11px; font-size: 14px; }

/* --------------------------------------------------------------------------
   App shell
   -------------------------------------------------------------------------- */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .mark { font-size: 21px; }
.sidebar-brand h1 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.1px; }
.sidebar-brand span { display: block; font-size: 11px; color: var(--text-muted); }

.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13.5px;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--text); border-color: rgba(79, 140, 255, 0.32); }
.nav-item .icon { width: 17px; text-align: center; font-size: 14px; }
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  background: var(--critical);
  border-radius: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.nav-badge.quiet { background: var(--border-strong); color: var(--text-muted); }

.sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-dim); }
.sidebar-foot .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.sidebar-foot .link { cursor: pointer; color: var(--text-muted); }
.sidebar-foot .link:hover { color: var(--text); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 26px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h2 { margin: 0; font-size: 16px; font-weight: 600; }
.topbar .sub { color: var(--text-muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }

.content { padding: 22px 26px 60px; }

/* --------------------------------------------------------------------------
   Connection pill
   -------------------------------------------------------------------------- */

.conn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
}
.conn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.conn.live .dot { background: var(--online); animation: pulse 2s ease-in-out infinite; }
.conn.live { color: var(--low); border-color: rgba(63, 185, 80, 0.35); }
.conn.down .dot { background: var(--critical); }
.conn.down { color: #ff9d95; border-color: rgba(248, 81, 73, 0.35); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.82); }
}

/* --------------------------------------------------------------------------
   Cards, grids, tiles
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: 14px; }
.grid.kpi   { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.card-head .hint { color: var(--text-dim); font-size: 11.5px; font-weight: 400; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

.tile { padding: 15px 16px; }
.tile .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.tile .value { font-size: 26px; font-weight: 650; line-height: 1.1; letter-spacing: -0.6px; }
.tile .foot { margin-top: 6px; font-size: 11.5px; color: var(--text-dim); }
.tile.alarm .value { color: var(--critical); }
.tile.warn  .value { color: var(--high); }
.tile.ok    .value { color: var(--low); }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 9px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--bg-hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }

/* --------------------------------------------------------------------------
   Badges & chips
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.badge.low      { background: rgba(63, 185, 80, 0.14);  color: var(--low);      border: 1px solid rgba(63, 185, 80, 0.3); }
.badge.medium   { background: rgba(210, 153, 34, 0.14); color: var(--medium);   border: 1px solid rgba(210, 153, 34, 0.3); }
.badge.high     { background: rgba(240, 136, 62, 0.14); color: var(--high);     border: 1px solid rgba(240, 136, 62, 0.3); }
.badge.critical { background: rgba(248, 81, 73, 0.14);  color: var(--critical); border: 1px solid rgba(248, 81, 73, 0.32); }
.badge.neutral  { background: var(--bg-raised);         color: var(--text-muted); border: 1px solid var(--border-strong); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 2px 4px 2px 0;
}
.chip.warn { border-color: rgba(240, 136, 62, 0.4); color: var(--high); }

.dot-online {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--online);
  margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.16);
}
.dot-offline {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  margin-right: 6px;
}

.score {
  display: inline-block;
  min-width: 34px;
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.score.low      { background: rgba(63, 185, 80, 0.13);  color: var(--low); }
.score.medium   { background: rgba(210, 153, 34, 0.14); color: var(--medium); }
.score.high     { background: rgba(240, 136, 62, 0.15); color: var(--high); }
.score.critical { background: rgba(248, 81, 73, 0.16);  color: var(--critical); }

/* --------------------------------------------------------------------------
   Live page
   -------------------------------------------------------------------------- */

.live-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 14px; }
@media (max-width: 1100px) { .live-layout { grid-template-columns: 1fr; } }

.member-live {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  margin-bottom: 11px;
  overflow: hidden;
}
.member-live.concurrent { border-color: rgba(240, 136, 62, 0.5); }
.member-live.flash { animation: flash 1.1s ease-out; }
@keyframes flash {
  from { background: var(--accent-soft); }
  to   { background: var(--bg-panel); }
}

.member-live-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  cursor: pointer;
}
.member-live-head:hover { background: var(--bg-hover); }
.member-live-head .who { min-width: 0; flex: 1; }
.member-live-head .name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-live-head .meta { color: var(--text-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.device-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 15px 9px 18px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}
.device-row .primary { flex: 1; min-width: 0; }
.device-row .primary b { font-weight: 600; }
.device-row .secondary { color: var(--text-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-row .age { color: var(--text-dim); font-size: 11.5px; white-space: nowrap; }

.feed { max-height: 640px; overflow-y: auto; }
.feed-item {
  display: flex;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  animation: slidein 0.28s ease-out;
}
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.feed-item .when { color: var(--text-dim); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px; }
.feed-item .what { min-width: 0; flex: 1; }
.feed-item .what .line1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-item .what .line2 { color: var(--text-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-item.new-device { background: rgba(240, 136, 62, 0.07); }
.feed-item.risk       { background: rgba(248, 81, 73, 0.07); }

/* --------------------------------------------------------------------------
   Drawer
   -------------------------------------------------------------------------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(760px, 94vw);
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 41;
  transform: translateX(100%);
  transition: transform 0.2s ease-out;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-head h3 { margin: 0 0 3px; font-size: 16px; }
.drawer-head .sub { color: var(--text-muted); font-size: 12.5px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 40px; }
.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.drawer-close:hover { color: var(--text); }

.section { margin-bottom: 22px; }
.section > h4 {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kv .k { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.kv .v { font-size: 14px; font-weight: 550; margin-top: 2px; }

.signal {
  display: flex;
  gap: 11px;
  padding: 10px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--high);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.signal .w {
  font-weight: 700;
  color: var(--high);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.signal .t { font-weight: 600; font-size: 13px; }
.signal .d { color: var(--text-muted); font-size: 12px; }

.action-bar { display: flex; flex-wrap: wrap; gap: 8px; }

.device-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 8px;
  background: var(--bg-panel);
}
.device-card.online { border-color: rgba(63, 185, 80, 0.4); }
.device-card .top { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.device-card .top b { font-size: 13px; }
.device-card .detail { color: var(--text-muted); font-size: 11.5px; }

/* --------------------------------------------------------------------------
   Charts (inline SVG)
   -------------------------------------------------------------------------- */

.chart { width: 100%; height: 190px; display: block; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-text  { fill: var(--text-dim); font-size: 10px; }
.chart .area       { fill: url(#areaFill); }
.chart .line       { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .bar        { fill: var(--accent); opacity: 0.75; }
.chart .bar.alert  { fill: var(--critical); }
.chart .point      { fill: var(--accent); }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 12.5px; }
.bar-row .label { width: 150px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { flex: 1; height: 8px; background: var(--bg-raised); border-radius: 4px; overflow: hidden; }
.bar-row .fill  { height: 100%; background: var(--accent); border-radius: 4px; }
.bar-row .fill.warn { background: var(--high); }
.bar-row .fill.bad  { background: var(--critical); }
.bar-row .value { width: 62px; text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Settings
   -------------------------------------------------------------------------- */

.setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-row .info { flex: 1; min-width: 0; }
.setting-row .info .name { font-size: 13.5px; font-weight: 550; }
.setting-row .info .desc { color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }
.setting-row input[type="number"] { width: 108px; }

.switch { position: relative; display: inline-block; width: 42px; height: 23px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-strong);
  border-radius: 23px;
  transition: background 0.15s;
}
.switch .slider:before {
  content: "";
  position: absolute;
  height: 17px; width: 17px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider:before { transform: translateX(19px); }

.callout {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.callout.warn     { border-color: rgba(240, 136, 62, 0.4); background: rgba(240, 136, 62, 0.07); }
.callout.danger   { border-color: rgba(248, 81, 73, 0.4);  background: rgba(248, 81, 73, 0.07); }
.callout b { color: var(--text); }

.codeblock {
  display: block;
  padding: 13px 15px;
  background: #0a0e14;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12.5px;
  color: #a5d6ff;
  overflow-x: auto;
  white-space: pre;
}

.step { display: flex; gap: 13px; margin-bottom: 18px; }
.step .n {
  width: 25px; height: 25px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(79, 140, 255, 0.35);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step .body { flex: 1; min-width: 0; }
.step .body h4 { margin: 2px 0 6px; font-size: 14px; }
.step .body p { margin: 0 0 9px; color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Toasts, empty states, misc
   -------------------------------------------------------------------------- */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 380px;
}
.toast {
  padding: 12px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  animation: slidein 0.22s ease-out;
}
.toast.critical { border-left-color: var(--critical); }
.toast.high     { border-left-color: var(--high); }
.toast.medium   { border-left-color: var(--medium); }
.toast .t { font-weight: 600; margin-bottom: 3px; }
.toast .d { color: var(--text-muted); }

.empty { padding: 40px 20px; text-align: center; color: var(--text-dim); }
.empty .icon { font-size: 26px; opacity: 0.55; margin-bottom: 9px; }
.empty .title { color: var(--text-muted); font-size: 13.5px; margin-bottom: 5px; }
.empty .hint { font-size: 12px; max-width: 420px; margin: 0 auto; line-height: 1.6; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.toolbar select, .toolbar input { width: auto; }

.muted { color: var(--text-muted); }
.dim   { color: var(--text-dim); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 18px; }
.hidden { display: none !important; }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.banner {
  padding: 10px 16px;
  background: rgba(240, 136, 62, 0.12);
  border-bottom: 1px solid rgba(240, 136, 62, 0.32);
  color: #ffc999;
  font-size: 12.5px;
}
.banner.danger { background: rgba(248, 81, 73, 0.12); border-bottom-color: rgba(248, 81, 73, 0.32); color: #ffa198; }

@media (max-width: 820px) {
  .sidebar { width: 62px; }
  .sidebar-brand h1, .sidebar-brand span, .nav-item .text, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; }
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 13px 14px; }
}
