/* ── CSS Variables ───────────────────────────────────────────── */
:root {
  --bg-deep:        #0d1117;
  --bg:             #161b22;
  --surface:        #21262d;
  --surface-raised: #2d333b;
  --surface-hover:  #30363d;
  --border:         #30363d;
  --border-subtle:  rgba(48,54,61,0.6);

  --text:           #e6edf3;
  --text-muted:     #8b949e;
  --text-dim:       #484f58;

  --accent:         #388bfd;
  --accent-soft:    rgba(56,139,253,0.15);
  --accent-hover:   #1f6feb;

  --success:        #3fb950;
  --success-soft:   rgba(63,185,80,0.15);
  --warning:        #d29922;
  --warning-soft:   rgba(210,153,34,0.15);
  --danger:         #f85149;
  --danger-soft:    rgba(248,81,73,0.15);
  --info:           #79c0ff;
  --info-soft:      rgba(121,192,255,0.15);
  --purple:         #bc8cff;
  --purple-soft:    rgba(188,140,255,0.15);

  --sidebar-w:      240px;
  --topbar-h:       56px;

  --radius-sm:  6px;
  --radius:     8px;
  --radius-lg: 12px;
  --shadow:     0 8px 32px rgba(0,0,0,0.45);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Aptos", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
input[type="checkbox"] { accent-color: var(--accent); }

/* ── App shell ───────────────────────────────────────────────── */
#app { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.22s ease, min-width 0.22s ease;
  z-index: 100;
  flex-shrink: 0;
}
.sidebar.collapsed { width: 56px; min-width: 56px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-item span:not(.nav-icon),
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-meta { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .nav-icon { font-size: 18px; width: auto; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  min-height: 64px;
  flex-shrink: 0;
}
.brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #388bfd, #0d6efd);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(56,139,253,0.4);
}
.brand-text { overflow: hidden; white-space: nowrap; }
.brand-name { display: block; font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.brand-sub  { display: block; font-size: 11px; color: var(--text-muted); }

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0;
}
.sidebar-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.nav-group { padding: 2px 0 6px; }
.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  padding: 10px 16px 4px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  font-size: 13.5px;
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); }
.nav-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.user-pill {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
}
.user-pill:hover { background: var(--surface); }
.user-avatar {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), #0d6efd);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.user-meta { overflow: hidden; flex: 1; }
.user-name  { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; }
.user-role  { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.user-logout {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font-size: 14px; line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.user-logout:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(248,81,73,0.4);
}
.sidebar.collapsed .user-logout { display: none; }

/* ── Main wrap ───────────────────────────────────────────────── */
.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  min-width: 0;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 50;
}
.hamburger {
  background: none; border: none; padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.hamburger:hover { background: var(--surface); }
.hamburger span { display: block; width: 18px; height: 2px; background: var(--text-muted); border-radius: 1px; }
.topbar-filters { display: flex; gap: 8px; flex: 1; min-width: 0; }
.top-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 13px;
}
.top-select:focus { outline: none; border-color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.time-range {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tr-btn {
  background: none; border: none;
  padding: 5px 11px;
  color: var(--text-muted);
  font-size: 12px; font-weight: 500;
  transition: background 0.1s, color 0.1s;
}
.tr-btn:hover  { background: var(--surface-raised); color: var(--text); }
.tr-btn.active { background: var(--accent-soft); color: var(--accent); }
.sync-pill {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  white-space: nowrap;
}
.sync-dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.sync-dot.offline { background: var(--danger); animation: none; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }

/* ── Page content ────────────────────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg);
}
.page-content::-webkit-scrollbar { width: 6px; }
.page-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title    { font-size: 20px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-actions  { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px; font-weight: 500;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.btn-primary  { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost    { background: var(--surface); color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-raised); color: var(--text); }
.btn-success  { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.btn-success:hover { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-warning  { background: var(--warning-soft); color: var(--warning); border-color: var(--warning); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 2px 7px; font-size: 11px; }
.btn-icon { padding: 6px; width: 32px; height: 32px; justify-content: center; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.card-title { font-size: 14px; font-weight: 600; }
.card-actions { display: flex; gap: 6px; }
.card-tag {
  font-size: 11px;
  background: var(--surface-raised);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 99px;
}
.card-body { padding: 16px 18px; }

/* ── KPI strip ───────────────────────────────────────────────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px,1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.kpi-blue::before   { background: var(--accent); }
.kpi-green::before  { background: var(--success); }
.kpi-amber::before  { background: var(--warning); }
.kpi-red::before    { background: var(--danger); }
.kpi-purple::before { background: var(--purple); }

.kpi-label { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px; }
.kpi-value { font-size: 28px; font-weight: 700; line-height: 1; }
.kpi-unit  { font-size: 15px; color: var(--text-muted); font-weight: 400; margin-left: 3px; }
.kpi-trend { margin-top: 8px; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.kpi-trend.up      { color: var(--success); }
.kpi-trend.down    { color: var(--danger); }
.kpi-trend.neutral { color: var(--text-muted); }

/* ── Grid helpers ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-col-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

/* ── Chart containers ────────────────────────────────────────── */
.chart-wrap { padding: 16px 18px; position: relative; }
.chart-canvas { max-height: 220px; }
.chart-canvas-tall { max-height: 300px; }

/* ── Events feed ─────────────────────────────────────────────── */
.events-feed {
  max-height: 310px;
  overflow-y: auto;
}
.events-feed::-webkit-scrollbar { width: 3px; }
.events-feed::-webkit-scrollbar-thumb { background: var(--border); }
.event-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.1s;
}
.event-row:hover { background: var(--surface-raised); }
.event-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.dot-critical { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.dot-major    { background: var(--warning); }
.dot-minor    { background: var(--info); }
.dot-info     { background: var(--text-dim); }
.event-meta   { flex: 1; min-width: 0; }
.event-text   { font-size: 13px; color: var(--text); }
.event-src    { font-size: 11px; color: var(--text-muted); }
.event-time   { font-size: 11px; color: var(--text-dim); flex-shrink: 0; white-space: nowrap; }

/* ── Ops queue ───────────────────────────────────────────────── */
.ops-list { max-height: 260px; overflow-y: auto; }
.ops-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.ops-status {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 99px; flex-shrink: 0;
}
.ops-pending { background: var(--warning-soft); color: var(--warning); }
.ops-running { background: var(--accent-soft); color: var(--accent); }
.ops-done    { background: var(--success-soft); color: var(--success); }
.ops-failed  { background: var(--danger-soft); color: var(--danger); }

/* ── Quick links ─────────────────────────────────────────────── */
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; }
.quick-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.quick-link:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ── Comm health ─────────────────────────────────────────────── */
.comm-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.comm-row:last-child { border-bottom: none; }
.comm-media { font-size: 13px; min-width: 72px; }
.comm-bar   { flex: 1; }
.comm-pct   { font-size: 13px; font-weight: 600; min-width: 40px; text-align: right; }
.comm-count { font-size: 11px; color: var(--text-muted); min-width: 70px; text-align: right; }

/* ── Progress bar ────────────────────────────────────────────── */
.progress-wrap { background: var(--surface-raised); border-radius: 99px; height: 6px; overflow: hidden; }
.progress-bar  { height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.4s; }
.progress-bar.green  { background: var(--success); }
.progress-bar.amber  { background: var(--warning); }
.progress-bar.red    { background: var(--danger); }

/* ── Table toolbar ───────────────────────────────────────────── */
.table-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.search-box {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px; gap: 6px;
  flex: 1; min-width: 180px; max-width: 320px;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input {
  background: none; border: none; outline: none;
  color: var(--text); padding: 6px 0;
  width: 100%; font-size: 13px;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-icon { color: var(--text-dim); font-size: 13px; }
.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 10px; font-size: 13px;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

/* ── Data table ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.data-table { background: var(--surface); font-size: 13px; }
.data-table thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; cursor: pointer; user-select: none;
}
.data-table thead th:hover { color: var(--text); }
.data-table thead th.sorted { color: var(--accent); }
.data-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.1s;
}
.data-table tbody tr:hover { background: var(--surface-raised); cursor: pointer; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table td { padding: 10px 14px; color: var(--text); }
.data-table td.muted { color: var(--text-muted); font-size: 12px; }
.data-table .td-mono { font-family: 'Courier New', monospace; font-size: 12px; }
.table-check { accent-color: var(--accent); width: 14px; height: 14px; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}
.page-info { font-size: 12px; color: var(--text-muted); margin-right: auto; }
.page-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  transition: all 0.1s;
}
.page-btn:hover { background: var(--surface-raised); color: var(--text); }
.page-btn.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* ── Status badges ───────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 99px; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-online  { background: var(--success-soft); color: var(--success); }
.badge-online::before { background: var(--success); }
.badge-offline { background: var(--surface-raised); color: var(--text-muted); }
.badge-offline::before { background: var(--text-dim); }
.badge-alarm   { background: var(--danger-soft); color: var(--danger); }
.badge-alarm::before { background: var(--danger); }
.badge-maintenance { background: var(--warning-soft); color: var(--warning); }
.badge-maintenance::before { background: var(--warning); }
.badge-info    { background: var(--info-soft); color: var(--info); }
.badge-info::before { background: var(--info); }
.badge-purple  { background: var(--purple-soft); color: var(--purple); }
.badge-purple::before { background: var(--purple); }
/* Event-profile lifecycle: draft awaiting activation. */
.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-pending::before { background: var(--warning); }

/* ── Severity ────────────────────────────────────────────────── */
.sev { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.sev-critical { background: var(--danger-soft); color: var(--danger); }
.sev-major    { background: var(--warning-soft); color: var(--warning); }
.sev-minor    { background: var(--info-soft); color: var(--info); }
.sev-info     { background: var(--surface-raised); color: var(--text-muted); }
/* Canonical-event severities (INFO · LOW · MEDIUM · HIGH · CRITICAL). */
.sev-high     { background: var(--danger-soft); color: var(--danger); }
.sev-medium   { background: var(--warning-soft); color: var(--warning); }
.sev-low      { background: var(--info-soft); color: var(--info); }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab-btn {
  background: none; border: none;
  padding: 10px 18px;
  color: var(--text-muted);
  font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}
.tab-btn:hover  { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Detail header ───────────────────────────────────────────── */
.detail-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.detail-icon {
  width: 48px; height: 48px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.detail-title { font-size: 18px; font-weight: 700; }
.detail-sub   { font-size: 13px; color: var(--text-muted); }
.detail-meta  { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.meta-item    { text-align: right; }
.meta-label   { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.meta-value   { display: block; font-size: 14px; font-weight: 600; }

/* ── Info grid ───────────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 14px; }
.info-field {}
.info-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.info-value { font-size: 14px; font-weight: 500; }
.info-value.mono { font-family: 'Courier New', monospace; font-size: 12px; color: var(--accent); }

/* ── Signal bars ─────────────────────────────────────────────── */
.signal-bars { display: flex; align-items: flex-end; gap: 2px; }
.signal-bar { width: 4px; border-radius: 1px; background: var(--border); }
.signal-bar.lit { background: var(--success); }
.signal-bar:nth-child(1) { height: 5px; }
.signal-bar:nth-child(2) { height: 8px; }
.signal-bar:nth-child(3) { height: 11px; }
.signal-bar:nth-child(4) { height: 14px; }

/* ── Tree view ───────────────────────────────────────────────── */
.tree-wrap { overflow-y: auto; max-height: 500px; }
.tree-wrap::-webkit-scrollbar { width: 4px; }
.tree-wrap::-webkit-scrollbar-thumb { background: var(--border); }
.tree-node {}
.tree-item {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.1s;
}
.tree-item:hover { background: var(--surface-raised); }
.tree-item.selected { background: var(--accent-soft); color: var(--accent); }
.tree-toggle { width: 14px; font-size: 10px; text-align: center; flex-shrink: 0; color: var(--text-muted); }
.tree-icon   { font-size: 13px; flex-shrink: 0; }
.tree-label  { flex: 1; color: var(--text); }
.tree-badge  { font-size: 11px; color: var(--text-muted); }
.tree-children { margin-left: 20px; }
.tree-node.collapsed > .tree-children { display: none; }
.tree-node.leaf > .tree-item .tree-toggle { visibility: hidden; }

/* ── Map area ────────────────────────────────────────────────── */
.map-area {
  background: #0a1628;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  min-height: 400px;
}
.map-grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(56,139,253,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,139,253,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.map-pins { position: absolute; inset: 0; }
.map-pin  { position: absolute; transform: translate(-50%,-50%); cursor: pointer; }
.map-pin-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  transition: transform 0.15s;
}
.map-pin:hover .map-pin-dot { transform: scale(1.6); }
.map-pin.online .map-pin-dot      { background: var(--success); box-shadow: 0 0 8px var(--success); }
.map-pin.offline .map-pin-dot     { background: var(--text-dim); }
.map-pin.alarm .map-pin-dot       { background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: blink 1s infinite; }
.map-pin.maintenance .map-pin-dot { background: var(--warning); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }
.map-pin-label {
  position: absolute; top: 16px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px; color: var(--text-muted); white-space: nowrap;
  background: rgba(13,17,23,0.85);
  padding: 1px 5px; border-radius: 3px;
  pointer-events: none; display: none;
}
.map-pin:hover .map-pin-label { display: block; }
.map-legend {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(13,17,23,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.map-legend-item { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.map-legend-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.map-layer-toggles {
  position: absolute; top: 12px; left: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.map-layer-btn {
  background: rgba(13,17,23,0.9);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  transition: all 0.12s;
}
.map-layer-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ── OBIS code ───────────────────────────────────────────────── */
.obis { font-family: 'Courier New', monospace; font-size: 12px; background: var(--surface-raised); color: var(--accent); padding: 2px 6px; border-radius: 4px; }
.class-badge { font-size: 11px; background: var(--purple-soft); color: var(--purple); padding: 2px 6px; border-radius: 4px; }

/* ── Command builder ─────────────────────────────────────────── */
.cmd-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.cmd-section-title {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.cmd-quick-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cmd-quick-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px; text-align: left;
  transition: all 0.12s;
}
.cmd-quick-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.cmd-quick-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.cmd-label { display: block; font-weight: 600; }
.cmd-sub   { display: block; font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.cmd-quick-btn:hover .cmd-sub,
.cmd-quick-btn.active .cmd-sub { color: var(--accent); opacity: 0.7; }

.apdu-preview {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 12px; color: var(--success);
  white-space: pre-wrap; word-break: break-all;
  max-height: 110px; overflow-y: auto;
}

/* ── Job tracker ─────────────────────────────────────────────── */
.job-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.job-row:last-child { border-bottom: none; }
.job-info   { flex: 1; min-width: 0; }
.job-cmd    { font-size: 13px; font-weight: 500; }
.job-target { font-size: 11px; color: var(--text-muted); }
.job-progress { width: 100px; }
.job-result   { font-size: 12px; min-width: 64px; text-align: right; }
.job-result.ok  { color: var(--success); }
.job-result.err { color: var(--danger); }

/* ── Firmware ────────────────────────────────────────────────── */
.fw-state {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
}
.fw-state.not-initiated { background: var(--surface-raised); color: var(--text-muted); }
.fw-state.initiated     { background: var(--info-soft); color: var(--info); }
.fw-state.verified      { background: var(--accent-soft); color: var(--accent); }
.fw-state.activated     { background: var(--success-soft); color: var(--success); }
.fw-state.failed        { background: var(--danger-soft); color: var(--danger); }

/* ── Tariff editor ───────────────────────────────────────────── */
.tariff-day-grid {
  display: grid; grid-template-columns: repeat(24, 1fr);
  gap: 2px; margin: 8px 0;
}
.tariff-cell {
  height: 28px; border-radius: 3px; cursor: pointer;
  transition: opacity 0.1s; position: relative;
}
.tariff-cell:hover { opacity: 0.7; }
.tariff-cell.peak     { background: #c53030; }
.tariff-cell.shoulder { background: #b7791f; }
.tariff-cell.off-peak { background: #276749; }
.tariff-cell.night    { background: #2c5282; }
.tariff-hour-labels {
  display: grid; grid-template-columns: repeat(24, 1fr);
  gap: 2px; margin-bottom: 4px;
}
.tariff-hour-label { font-size: 9px; color: var(--text-dim); text-align: center; }
.tariff-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.tariff-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.tariff-legend-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-row         { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-row.single  { grid-template-columns: 1fr; }
.form-row.triple  { grid-template-columns: 1fr 1fr 1fr; }
.form-field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: border-color 0.12s;
}
.form-input:focus   { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-dim); }
.form-select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.form-select:focus { outline: none; border-color: var(--accent); }
.form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
}
.form-textarea:focus { outline: none; border-color: var(--accent); }

/* ── Toggle switch ───────────────────────────────────────────── */
.toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--surface-raised);
  border-radius: 99px; cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::after {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  background: var(--text-muted);
  border-radius: 50%; top: 3px; left: 3px;
  transition: transform 0.2s, background 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent-soft); }
.toggle input:checked + .toggle-slider::after { transform: translateX(16px); background: var(--accent); }

/* ── Settings rows ───────────────────────────────────────────── */
.settings-row {
  display: flex; align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
}
.settings-row:last-child { border-bottom: none; }
.settings-label { flex: 1; }
.settings-label strong { display: block; font-size: 13px; }
.settings-label span   { font-size: 12px; color: var(--text-muted); }
.settings-control { min-width: 180px; }

/* ── Report cards ────────────────────────────────────────────── */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.report-card:hover { border-color: var(--accent); background: var(--surface-raised); }
.report-icon { font-size: 26px; margin-bottom: 10px; }
.report-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.report-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ── Role matrix ─────────────────────────────────────────────── */
.role-matrix { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.role-matrix table { font-size: 12px; }
.role-matrix th { background: var(--bg); padding: 8px 12px; font-weight: 600; color: var(--text-muted); text-align: center; }
.role-matrix th:first-child { text-align: left; }
.role-matrix td { padding: 8px 12px; border-top: 1px solid var(--border-subtle); text-align: center; }
.role-matrix td:first-child { text-align: left; font-weight: 500; }
.role-check { color: var(--success); font-size: 14px; }
.role-dash  { color: var(--text-dim); }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px; color: var(--text-muted); text-align: center;
}
.empty-icon  { font-size: 36px; margin-bottom: 12px; opacity: 0.35; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

/* ── Log view ────────────────────────────────────────────────── */
.log-entry {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
}
.log-entry:hover { background: var(--surface-raised); }
.log-ts   { color: var(--text-dim); white-space: nowrap; font-family: monospace; }
.log-kind { padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.log-kind.request  { background: var(--accent-soft);  color: var(--accent); }
.log-kind.response { background: var(--success-soft); color: var(--success); }
.log-kind.error    { background: var(--danger-soft);  color: var(--danger); }
.log-kind.system   { background: var(--surface-raised); color: var(--text-muted); }
.log-kind.heartbeat { background: var(--purple-soft); color: var(--purple); }
.log-kind.connect  { background: var(--info-soft); color: var(--info); }
.log-kind.disconnect { background: var(--surface-raised); color: var(--text-dim); }
.log-summary { flex: 1; color: var(--text); }
.log-kind.gateway { background: rgba(56,139,253,0.18); color: #6cb6ff; }

/* ── Live Backend Activity console ───────────────────────────── */
.bc-clickable { cursor: pointer; }
.bc-clickable:hover { background: var(--surface-raised); }
.backend-console-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,0.78);
  display: flex; align-items: stretch; justify-content: center;
  padding: 24px;
}
.bc-shell {
  display: flex; flex-direction: column;
  width: min(1280px, 97vw); height: 100%;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.bc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.bc-title { font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.bc-sub { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.bc-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bc-body { flex: 1; display: grid; grid-template-columns: 1.6fr 1fr; min-height: 0; }
.bc-feed { overflow-y: auto; border-right: 1px solid var(--border); font-size: 12px; }
.bc-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 14px; border-bottom: 1px solid var(--border-subtle); cursor: pointer;
}
.bc-row:hover { background: var(--surface); }
.bc-row.selected { background: var(--accent-soft); }
.bc-time { color: var(--text-dim); font-family: monospace; white-space: nowrap; }
.bc-text { flex: 1; color: var(--text); word-break: break-word; }
.bc-decoder { overflow-y: auto; padding: 16px 18px; background: var(--bg-deep); }
.bc-dec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bc-dec-dir { font-size: 13px; font-weight: 600; color: var(--text); }
.bc-sect { margin-bottom: 16px; }
.bc-sect-h {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle); padding-bottom: 4px;
}
.bc-kv { display: flex; gap: 10px; font-size: 12px; padding: 2px 0; }
.bc-kv-k { width: 140px; flex-shrink: 0; color: var(--text-muted); }
.bc-kv-v { flex: 1; color: var(--text); word-break: break-all; font-family: monospace; }
.bc-hex {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: Consolas, monospace; font-size: 12px;
  line-height: 1.6; word-break: break-all; color: #9ecbff;
}
.bc-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
@media (max-width: 820px) { .bc-body { grid-template-columns: 1fr; } }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: 13px; min-width: 260px;
  animation: toast-in 0.2s ease;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent); }
@keyframes toast-in { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }

/* ── Loading spinner (inline, for buttons/cells while a command runs) ── */
.spinner {
  display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
.spinner.sm { width: 0.85em; height: 0.85em; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading { opacity: 0.75; cursor: progress; }
.row-busy { background: rgba(56,139,253,0.06); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(580px, 95vw);
  max-height: 82vh; overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
/* Data-grid modals (event-code map, profile mapping grid) need room for a
   multi-column editable table; the default width is tuned for forms. */
.modal-box.modal-wide { width: min(1120px, 96vw); max-height: 88vh; }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 18px; padding: 2px 4px; border-radius: 4px; }
.modal-close:hover { background: var(--surface-raised); color: var(--text); }
.modal-body { padding: 20px; }

/* ── Editor panels ───────────────────────────────────────────── */
/* A labelled frame around a block of an editor (toolbar, grid), so the
   controls read as a group instead of a loose row of buttons. */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--surface-raised);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.panel + .panel { margin-top: 0; }
.panel-title {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.panel-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-row + .panel-row { margin-top: 8px; }
.panel-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 2px; }
.panel-note { font-size: 11px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
/* Keep a wide grid inside its own scroller so the modal never scrolls sideways. */
.grid-scroll { max-height: 46vh; overflow: auto; }

/* ── Divider ─────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Code block ──────────────────────────────────────────────── */
.code-block {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: 'Courier New', monospace;
  font-size: 12px; color: var(--info);
  white-space: pre-wrap; word-break: break-all;
  max-height: 200px; overflow-y: auto;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 200; transform: translateX(-100%);
    transition: transform 0.22s ease;
  }
  .sidebar.open { transform: translateX(0); width: var(--sidebar-w) !important; min-width: var(--sidebar-w) !important; }
  .sidebar.open .brand-text, .sidebar.open .nav-label,
  .sidebar.open .nav-item span:not(.nav-icon), .sidebar.open .nav-badge,
  .sidebar.open .user-meta { display: block !important; }
  .grid-2, .grid-3, .grid-col-2-1 { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3 { grid-column: span 1; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .detail-meta { margin-left: 0; }
}
@media (max-width: 600px) {
  .kpi-strip { grid-template-columns: 1fr; }
  .page-content { padding: 14px; }
  .topbar-filters { display: none; }
}

/* ── Login landing page ─────────────────────────────────────────── */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(56,139,253,0.14), transparent 60%),
    var(--bg-deep);
}
.login-shell { width: 100%; max-width: 400px; }
.login-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 30px 26px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.login-brand-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 22px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(56,139,253,0.35);
}
.login-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.login-brand-name { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; color: var(--text); }
.login-brand-sub { font-size: 12px; color: var(--text-muted); }

.login-title { font-size: 20px; font-weight: 650; color: var(--text); margin: 0 0 4px; }
.login-subtitle { font-size: 13px; color: var(--text-muted); margin: 0 0 22px; }

.login-form { display: flex; flex-direction: column; gap: 15px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.login-field input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-error {
  font-size: 12.5px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(248,81,73,0.4);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
}

.login-btn {
  margin-top: 4px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent-hover);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.login-btn:hover { background: var(--accent-hover); }
.login-btn:disabled { opacity: 0.6; cursor: default; }

.login-foot {
  margin: 20px 0 0;
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
}
