@font-face {
  font-family: "IRANSansX";
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url("fonts/iransansx/woff2/iransansx-thin.woff2") format("woff2");
}

@font-face {
  font-family: "IRANSansX";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("fonts/iransansx/woff2/iransansx-ultralight.woff2") format("woff2");
}

@font-face {
  font-family: "IRANSansX";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/iransansx/woff2/iransansx-light.woff2") format("woff2");
}

@font-face {
  font-family: "IRANSansX";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/iransansx/woff2/iransansx-regular.woff2") format("woff2");
}

@font-face {
  font-family: "IRANSansX";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/iransansx/woff2/iransansx-medium.woff2") format("woff2");
}

@font-face {
  font-family: "IRANSansX";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/iransansx/woff2/iransansx-demibold.woff2") format("woff2");
}

@font-face {
  font-family: "IRANSansX";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/iransansx/woff2/iransansx-bold.woff2") format("woff2");
}

@font-face {
  font-family: "IRANSansX";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/iransansx/woff2/iransansx-extrabold.woff2") format("woff2");
}

@font-face {
  font-family: "IRANSansX";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/iransansx/woff2/iransansx-black.woff2") format("woff2");
}

:root {
  --bg: #0a0c14;
  --surface: #12151f;
  --surface-2: #191d2a;
  --surface-3: #1f2434;
  --border: #262c3d;
  --border-soft: #1d2230;
  --text: #eef0f7;
  --text-dim: #8b90a3;
  --text-faint: #5b6075;
  --accent: #6d5ef7;
  --accent-2: #22c39a;
  --accent-soft: rgba(109, 94, 247, 0.14);
  --blue: #4f8cff;
  --amber: #f5a623;
  --danger: #f2545b;
  --danger-soft: rgba(242, 84, 91, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  font-family: "IRANSansX", "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(109, 94, 247, 0.16), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(34, 195, 154, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

/* ─── auth / standalone pages (login, setup, upgrade, key reveal) ─── */
body.auth-body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

.page {
  width: 100%;
  max-width: 440px;
}

.page.wide {
  max-width: 880px;
}

.page.xwide {
  max-width: 1180px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  justify-content: center;
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent);
  flex-shrink: 0;
}

.brand h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}

.card + .card {
  margin-top: 18px;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2 .icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.card p.hint {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.9;
}

label {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 14px 0 6px;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  resize: vertical;
  min-height: 72px;
}

.field-with-btn {
  display: flex;
  gap: 8px;
}

.field-with-btn input {
  flex: 1;
}

button, .btn {
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  transition: filter 0.15s, background 0.15s, border-color 0.15s, transform 0.05s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
}

button:active, .btn:active {
  transform: translateY(1px);
}

.btn-primary {
  width: 100%;
  margin-top: 20px;
  background: linear-gradient(135deg, var(--accent), #8a5ef7);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(109, 94, 247, 0.6);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 13px;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-faint);
}

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.8;
}

.alert-error {
  background: rgba(242, 84, 91, 0.12);
  color: #ff9498;
  border: 1px solid rgba(242, 84, 91, 0.35);
}

.alert-success {
  background: rgba(34, 195, 154, 0.12);
  color: #7fe8cc;
  border: 1px solid rgba(34, 195, 154, 0.35);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.kv {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}

.kv:last-child {
  border-bottom: none;
}

.kv span.k {
  color: var(--text-dim);
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-ok {
  background: rgba(34, 195, 154, 0.15);
  color: #7fe8cc;
}

.badge-err {
  background: rgba(242, 84, 91, 0.15);
  color: #ff9498;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

th, td {
  text-align: right;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
}

tbody tr {
  transition: background 0.12s;
}

tbody tr:hover {
  background: var(--surface-2);
}

th {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

code, .mono {
  font-family: "Cascadia Code", Consolas, monospace;
  direction: ltr;
  display: inline-block;
  word-break: break-all;
}

.muted {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.9;
}

a {
  color: var(--accent-2);
}

.icon {
  flex-shrink: 0;
}

/* ═══════════════════════════ APP SHELL (sidebar layout) ═══════════════════════════ */

.app-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

.sidebar {
  width: 254px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0d101a 0%, #0a0c14 100%);
  border-left: 1px solid var(--border-soft);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 30;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 22px;
}

.sidebar-brand-dot {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px -4px rgba(109, 94, 247, 0.7);
  position: relative;
}

.sidebar-brand-dot::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-brand-text strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-text small {
  font-size: 11px;
  color: var(--text-faint);
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-group-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 10px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  position: relative;
}

.sidebar-link .icon {
  opacity: 0.85;
}

.sidebar-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar-link.active {
  background: var(--accent-soft);
  color: #cabcff;
  font-weight: 700;
}

.sidebar-link.active .icon {
  opacity: 1;
}

.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  margin-top: 8px;
}

.sidebar-link.logout:hover {
  color: #ff9498;
  background: var(--danger-soft);
}

.sidebar-overlay {
  display: none;
}

.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  align-items: center;
  justify-content: center;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 26px 30px 60px;
  max-width: 1400px;
}

@media (max-width: 980px) {
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(105%);
    transition: transform 0.22s ease;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 25;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .mobile-toggle {
    display: flex;
  }

  .main-content {
    padding: 74px 16px 40px;
  }
}

/* ─── topbar ─── */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.topbar-title {
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 5px;
  letter-spacing: -0.015em;
}

.topbar-subtitle {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ─── legacy top nav (kept for compat, no longer used by admin pages) ─── */
.admin-shell {
  width: 100%;
  max-width: 1180px;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.admin-nav .brand {
  margin: 0 auto 0 0;
}

.admin-nav a.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.admin-nav a.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.admin-nav a.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(109, 94, 247, 0.12);
  border: 1px solid rgba(109, 94, 247, 0.35);
  color: #cabcff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.8;
}

.banner .btn {
  white-space: nowrap;
}

/* ═══════════════════════════ KPI cards ═══════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kpi-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: #b3a6ff;
  flex-shrink: 0;
}

.kpi-icon.tone-green { background: rgba(34, 195, 154, 0.14); color: #6fe3c1; }
.kpi-icon.tone-blue { background: rgba(79, 140, 255, 0.14); color: #8bb4ff; }
.kpi-icon.tone-amber { background: rgba(245, 166, 35, 0.14); color: #f7c774; }
.kpi-icon.tone-red { background: var(--danger-soft); color: #ff9498; }

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.kpi-trend.up { background: rgba(34, 195, 154, 0.14); color: #6fe3c1; }
.kpi-trend.down { background: var(--danger-soft); color: #ff9498; }
.kpi-trend.flat { background: var(--surface-3); color: var(--text-faint); }
.kpi-trend .icon { width: 12px; height: 12px; }

.kpi-label {
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 500;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  direction: ltr;
  text-align: right;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.kpi-sub {
  color: var(--text-faint);
  font-size: 11px;
  margin-bottom: 10px;
}

.kpi-spark-svg {
  width: 100%;
  height: 30px;
  display: block;
  opacity: 0.9;
}

/* ═══════════════════════════ panels / analytics ═══════════════════════════ */
.panels-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
  align-items: stretch;
}

@media (max-width: 980px) {
  .panels-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title .icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.panel-subtitle {
  font-size: 12px;
  color: var(--text-faint);
  margin: 0;
}

.panel-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-dim);
}

.panel-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}

/* ═══════════════════════════ entity header (client show, etc.) ═══════════════════════════ */
.entity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.entity-header-id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.entity-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
}

.entity-slug {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 12px;
}

.entity-slug button {
  background: none;
  border: none;
  padding: 2px;
  color: var(--text-faint);
}

.entity-slug button:hover {
  color: var(--text);
}

.leaderboard-avatar.lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 20px;
}

/* ═══════════════════════════ leaderboard lists ═══════════════════════════ */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.leaderboard-rank {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.leaderboard-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.leaderboard-body {
  flex: 1;
  min-width: 0;
}

.leaderboard-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.leaderboard-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-name.mono {
  font-size: 12px;
}

.leaderboard-meta {
  font-size: 11.5px;
  color: var(--text-faint);
  white-space: nowrap;
  direction: ltr;
}

.leaderboard-bar-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.leaderboard-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.leaderboard-empty {
  color: var(--text-dim);
  font-size: 12.5px;
  padding: 10px 0;
}

/* ═══════════════════════════ health tiles ═══════════════════════════ */
.health-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 820px) {
  .health-grid { grid-template-columns: 1fr; }
}

.health-tile {
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.health-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.health-tile-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-pill.idle { background: var(--surface-3); color: var(--text-faint); }
.status-pill.ok { background: rgba(34, 195, 154, 0.15); color: #7fe8cc; }
.status-pill.err { background: rgba(242, 84, 91, 0.15); color: #ff9498; }

.health-tile-msg {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
  margin: 0;
}

.health-tile-detail {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--surface-3);
  border-radius: 8px;
  padding: 7px 9px;
  margin: 0;
}

/* ─── status dot for tables ─── */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}

.status-dot.ok { background: var(--accent-2); box-shadow: 0 0 8px rgba(34, 195, 154, 0.7); }
.status-dot.err { background: var(--danger); box-shadow: 0 0 8px rgba(242, 84, 91, 0.6); }

/* ─── data table wrapper ─── */
.table-wrap {
  overflow-x: auto;
}

table.data-table td, table.data-table th {
  white-space: nowrap;
}

a.row-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

a.row-link:hover {
  color: var(--accent-2);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.section-title h2 {
  margin: 0;
}

.small-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.copy-banner {
  background: rgba(34, 195, 154, 0.1);
  border: 1px solid rgba(34, 195, 154, 0.35);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.copy-banner strong {
  color: #7fe8cc;
}

.form-inline {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-inline > div {
  flex: 1;
  min-width: 140px;
}

.form-inline label { margin-top: 0; }

/* ─── chip / status badges ─── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.chip-active { background: rgba(34, 195, 154, 0.15); color: #7fe8cc; border-color: rgba(34, 195, 154, 0.3); }
.chip-suspended { background: rgba(245, 166, 35, 0.15); color: #f5c37f; border-color: rgba(245, 166, 35, 0.3); }
.chip-revoked { background: rgba(242, 84, 91, 0.15); color: #ff9498; border-color: rgba(242, 84, 91, 0.3); }

/* ─── progress bar (budget) ─── */
.progress {
  background: var(--surface-2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress > div {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-2);
  transition: width 0.3s;
}

.progress.is-warn > div { background: #f5a623; }
.progress.is-danger > div { background: var(--danger); }

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.progress-row .progress { flex: 1; }

.progress-row .progress-label {
  font-size: 11px;
  color: var(--text-dim);
  min-width: 130px;
}

.progress-row .progress-pct {
  font-size: 11px;
  color: var(--text-dim);
  min-width: 40px;
  text-align: left;
  direction: ltr;
}

/* legacy bar-chart (still available, unused on dashboard now) */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 90px;
  margin: 10px 0 6px;
}

.bar-chart .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent), #8a5ef7);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  position: relative;
}

.bar-chart-labels {
  display: flex;
  gap: 4px;
  font-size: 10px;
  color: var(--text-dim);
}

.bar-chart-labels span {
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
