/* ServerDeck — base, shells & components */

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
}
#app {
  position: relative;
  height: 100vh;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
}
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--accent-soft); }

/* scrollbars */
.scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.scroll::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: padding-box; }

/* =================== SHELLS =================== */
/* sidebar layout */
.shell { display: grid; height: 100vh; grid-template-rows: auto 1fr; grid-template-columns: 1fr; }

.shell-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.page { flex: 1; min-height: 0; overflow-y: auto; padding: 26px 30px 60px; }
[data-density="compact"] .page { padding: 18px 22px 48px; }
.page-inner { max-width: 1480px; margin: 0 auto; }

/* ----- Sidebar ----- */
.sidebar-nav {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  min-height: 0;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 18px 16px;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 60%, var(--accent-2)));
  display: grid; place-items: center;
  flex: none; box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.28);
  position: relative; isolation: isolate;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.brand-mark img { width: 22px; height: 22px; object-fit: contain; filter: brightness(0) invert(1); }
[data-theme="dark"] .brand-mark img { filter: none; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand-name b { color: var(--accent); }
.brand-sub { font-size: 10px; color: var(--text-3); letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }

.nav-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 12px 12px; }
.nav-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3); padding: 16px 10px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; font-size: 13px;
  position: relative; transition: background .14s, color .14s; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
[data-theme="dark"] .nav-item.active { color: var(--accent); }
svg.ic { width: 18px; height: 18px; flex: none; }
.nav-item .ic { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-item .lbl { flex: 1; }
.nav-count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--text-3); background: var(--surface-2); padding: 1px 7px; border-radius: 20px;
}
.nav-item.active .nav-count { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.nav-badge {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: #fff;
  background: var(--danger); padding: 1px 6px; border-radius: 20px; min-width: 18px; text-align: center;
}
.nav-foot {
  border-top: 1px solid var(--line); padding: 12px; display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px;
}
.nav-foot .who { flex: 1; min-width: 0; }
.nav-foot .who .nm { font-weight: 600; font-size: 12.5px; }
.nav-foot .who .rl { font-size: 11px; color: var(--text-3); }

/* ----- Top bar (shared) ----- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 30px; min-height: 62px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20;
}
[data-density="compact"] .topbar { padding: 9px 22px; min-height: 52px; }
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.crumb .sep { opacity: .5; }
.crumb a:hover { color: var(--accent); }
.crumb .cur { color: var(--text); font-weight: 600; }
.topbar .title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.topbar .spacer { flex: 1; }
.topbar.sub {
  min-height: 56px;
  background: var(--surface-2);
  backdrop-filter: none;
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .topbar.sub { background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }
[data-density="compact"] .topbar.sub { min-height: 48px; }

/* contextual back button — always present on drill-down pages */
.back-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px 7px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--text); font-weight: 600; font-size: 12.5px;
  transition: background .14s, border-color .14s, transform .14s, box-shadow .14s;
  flex: none; box-shadow: var(--shadow-sm);
}
.back-btn .ic { width: 16px; height: 16px; transition: transform .14s; color: var(--accent); }
.back-btn span { letter-spacing: -.01em; }
.back-btn:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.back-btn:hover .ic { transform: translateX(-2px); }
.back-btn:active { transform: translateY(1px); }
.back-sep { width: 1px; height: 22px; background: var(--line-strong); flex: none; }

.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 13px; width: 300px; color: var(--text-3);
  transition: border-color .14s, background .14s, box-shadow .14s;
}
.search .ic { width: 16px; height: 16px; opacity: .8; }
.search:hover { border-color: var(--line-strong); }
.search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input { border: none; background: none; outline: none; flex: 1; color: var(--text); font-size: 13px; font-family: inherit; }
.search input::placeholder { color: var(--text-3); }
.kbd {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-3);
  border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 5px;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  color: var(--text-2); position: relative; transition: background .14s, color .14s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }

/* ----- Header utility cluster (shared across hub / sidebar / topnav) ----- */
.hb-div { width: 1px; height: 26px; background: var(--line); flex: none; }
.hub-utils { display: flex; align-items: center; gap: 2px; flex: none; }
.user-chip {
  display: flex; align-items: center; gap: 9px; flex: none;
  padding: 4px 11px 4px 4px; border-radius: 30px;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color .14s, background .14s;
}
.user-chip:hover { border-color: var(--line-strong); background: var(--surface); }
.user-chip .avatar { width: 30px; height: 30px; font-size: 11px; box-shadow: var(--shadow-sm); }
.user-chip .uc-text { display: flex; flex-direction: column; line-height: 1.18; text-align: left; }
.user-chip .uc-nm { font-size: 12.5px; font-weight: 600; color: var(--text); }
.user-chip .uc-rl { font-size: 10.5px; color: var(--text-3); }
.user-chip .ic { width: 15px; height: 15px; color: var(--text-3); margin-left: -3px; }

/* ----- Top-nav layout bar ----- */
.topnav-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 10px 26px;
}
.topnav-items { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: wrap; }
.topnav-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; font-size: 13px; transition: background .14s, color .14s;
}
.topnav-item:hover { background: var(--surface-2); color: var(--text); }
.topnav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.topnav-item .ic { width: 17px; height: 17px; }
.topnav-item .nav-count { background: var(--surface-2); }

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 15px; border-radius: var(--r-sm); font-weight: 600; font-size: 12.5px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  transition: all .14s var(--ease); white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-on); border-color: transparent; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--accent-press); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn.sm { padding: 6px 11px; font-size: 11.5px; border-radius: var(--r-xs); }
.btn.icon { padding: 8px; }

/* =================== PILLS / DOTS / BADGES =================== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; line-height: 1.5;
  white-space: nowrap;
}
.pill .pdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--success); background: var(--success-soft); }
.pill.warn { color: var(--warning); background: var(--warning-soft); }
.pill.bad { color: var(--danger); background: var(--danger-soft); }
.pill.neutral { color: var(--neutral); background: var(--neutral-soft); }
.pill.accent { color: var(--accent); background: var(--accent-soft); }
.pill.cyan { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 14%, transparent); }

.sdot { width: 9px; height: 9px; border-radius: 50%; flex: none; position: relative; }
.sdot.online { background: var(--success); }
.sdot.degraded { background: var(--warning); }
.sdot.offline { background: var(--danger); }
.sdot.online::after, .sdot.degraded::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid currentColor; color: inherit; opacity: .4; animation: pulse 2.4s var(--ease) infinite;
}
.sdot.online { color: var(--success); }
.sdot.degraded { color: var(--warning); }
@keyframes pulse { 0% { transform: scale(.7); opacity: .55; } 70%,100% { transform: scale(1.5); opacity: 0; } }

.tag {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600; color: var(--text-2);
  background: var(--surface-2); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line);
}
.tag.cat-pool { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.tag.cat-dedicated { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 13%, transparent); border-color: transparent; }
.tag.cat-dev { color: var(--warning); background: var(--warning-soft); border-color: transparent; }

/* =================== CARDS =================== */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.card.pad { padding: var(--pad-card); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px var(--pad-card); border-bottom: 1px solid var(--line); }
.card-head .ic { width: 18px; height: 18px; flex: none; color: var(--text-2); }
.card-head .ct { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.card-head .spacer { flex: 1; }

/* KPI stat card */
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 17px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .16s var(--ease), border-color .16s, box-shadow .16s;
}
.stat:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.stat .lbl { font-size: 11.5px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat .lbl .ic { width: 15px; height: 15px; opacity: .8; }
.stat .num { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 8px; font-feature-settings: "tnum" 1; }
[data-density="compact"] .stat .num { font-size: 25px; }
.stat .num small { font-size: 14px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.stat .foot { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 11.5px; color: var(--text-2); }
.delta { font-family: var(--font-mono); font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; gap: 3px; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--text-3); }
.stat .spark { position: absolute; right: 14px; bottom: 12px; width: 88px; height: 30px; opacity: .9; }

/* meter */
.meter { display: flex; flex-direction: column; gap: 4px; }
.meter .mt-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; }
.meter .mt-lbl { color: var(--text-2); font-weight: 600; }
.meter .mt-val { font-family: var(--font-mono); font-weight: 700; font-size: 11.5px; }
.meter .track { height: 6px; border-radius: 6px; background: var(--meter-track); overflow: hidden; }
.meter .fill { height: 100%; border-radius: 6px; transition: width .8s var(--ease), background .4s; }
.fill.lo { background: var(--success); }
.fill.mid { background: var(--warning); }
.fill.hi { background: var(--danger); }

/* =================== TABLE =================== */
.tbl-wrap { overflow: hidden; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.tbl-wrap.scrollx { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.tbl thead { background: var(--surface-2); }
table.tbl th {
  text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; background: var(--surface-2); z-index: 1;
}
table.tbl th:first-child { padding-left: 20px; }
table.tbl th:last-child { padding-right: 20px; }
table.tbl th.sortable { cursor: pointer; transition: color .14s; }
table.tbl th.sortable::after { content: "↕"; font-size: 9px; opacity: .35; margin-left: 5px; vertical-align: middle; }
table.tbl th.sortable:hover { color: var(--text); }
table.tbl td {
  padding: 0 16px; border-bottom: 1px solid var(--line); height: var(--row-h);
  vertical-align: middle; position: relative;
}
table.tbl td:first-child { padding-left: 20px; }
table.tbl td:last-child { padding-right: 20px; }
table.tbl tbody tr { transition: background .12s; cursor: pointer; }
table.tbl tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 38%, transparent); }
table.tbl tbody tr:hover { background: var(--accent-soft); }
table.tbl tbody tr:hover td:first-child::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); border-radius: 0 2px 2px 0;
}
table.tbl tbody tr:last-child td { border-bottom: none; }
.cell-strong { font-weight: 600; color: var(--text); }
.cell-mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); }
.row-actions { display: flex; gap: 6px; opacity: 0; transition: opacity .12s; justify-content: flex-end; }
tr:hover .row-actions { opacity: 1; }
/* in-cell mini meter sits tidy & vertically centred */
table.tbl td .meter { min-width: 84px; }

/* =================== TABS =================== */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 11px 15px; font-weight: 600; font-size: 13px; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .14s, border-color .14s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-color: var(--accent); }

/* segmented control */
.segmented { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; border: 1px solid var(--line); }
.segmented button { padding: 6px 12px; border-radius: var(--r-xs); font-weight: 600; font-size: 12px; color: var(--text-2); transition: all .14s; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* inputs */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: -.005em; display: flex; align-items: center; gap: 6px; }
.field label .req { color: var(--danger); font-weight: 700; }
.field .hint { font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.input {
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  padding: 9px 12px; color: var(--text); font-size: 13px; font-family: inherit; outline: none; width: 100%;
  transition: border-color .14s, box-shadow .14s, background .14s; box-sizing: border-box; -webkit-appearance: none;
}
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: color-mix(in srgb, var(--accent) 32%, var(--line-strong)); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input.mono { font-family: var(--font-mono); }
textarea.input { resize: vertical; line-height: 1.5; min-height: 84px; }
select.input {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A92A9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
/* domain / prefixed input */
.input-prefix { display: flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; background: var(--surface); transition: border-color .14s, box-shadow .14s; }
.input-prefix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-prefix .pfx { display: grid; place-items: center; padding: 0 13px; background: var(--surface-2); color: var(--text-3); font-family: var(--font-mono); font-size: 12px; border-right: 1.5px solid var(--line); }
.input-prefix input { border: 0; background: none; outline: none; padding: 11px 14px; width: 100%; color: var(--text); font-size: 13.5px; font-family: inherit; }

/* misc layout helpers */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--text-3); }
.t2 { color: var(--text-2); }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
[data-density="compact"] .page-title { font-size: 22px; }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.divider { height: 1px; background: var(--line); }

/* empty fade-in for live items */
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.enter { animation: slidein .4s var(--ease); }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Visual polish pass ────────────────────────────────────── */

/* Status dots: provisioning + failed states */
.sdot.provisioning, .sdot.building, .sdot.queued {
  background: var(--accent);
  color: var(--accent);
  animation: sdot-spin 1.4s linear infinite;
}
.sdot.failed { background: var(--danger); }
@keyframes sdot-spin {
  0%,100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* KPI card: thin top accent strip + coloured icon */
.stat { border-top: 3px solid var(--card-accent, var(--accent)); }
.stat .lbl-ic .ic { width: 14px; height: 14px; }
.stat .lbl { color: var(--text-2); }  /* reset — icon gets colour via inline style */

/* Server card: provisioning shimmer */
.srv-card.is-provisioning { opacity: .85; }
.srv-card.is-provisioning .sc-meters { opacity: .4; pointer-events: none; }

/* Hub section rule: extends a line to the right of the label */
.hub-section-rule {
  display: flex; align-items: center; gap: 12px;
}
.hub-section-rule::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* Pill accent variant (for provisioning badge) */
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* catTag production */
.tag.cat-prod { color: var(--success); background: var(--success-soft, color-mix(in srgb,var(--success) 12%,transparent)); border-color: transparent; }

/* ── Bottom navigation bar ───────────────────────────────────────
   Used on hub and all pages — icon + label + optional badge pill.
   Replaces the sidebar on this layout. */
.bottom-nav {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--line);
  height: 58px;
  padding: 0 6px;
  gap: 2px;
  position: sticky;
  bottom: 0;
  z-index: 100;
  flex-shrink: 0;
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 6px 2px 4px;
  border-radius: var(--r-sm, 6px);
  color: var(--text-3);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: color 0.15s, background 0.15s;
  min-width: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

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

.bnav-item.bnav-active {
  color: var(--accent);
}

.bnav-item .ic {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.75;
}

.bnav-item.bnav-active .ic {
  opacity: 1;
}

.bnav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1;
}

/* Count / metric badge — sits top-right of the icon area */
.bnav-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 20px);
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 20px;
  line-height: 1.5;
  min-width: 14px;
  text-align: center;
  pointer-events: none;
}

.bnav-badge.bnav-danger {
  background: var(--danger);
}

/* "LIVE" pill — amber/accent rather than the count style */
.bnav-badge:empty { display: none; }

.bnav-item[data-nav="tv"] .bnav-badge {
  background: var(--success, #15a34a);
  font-size: 8px;
  letter-spacing: 0.05em;
  padding: 1px 3px;
  right: calc(50% - 22px);
}
