/* @relay/ui v3.4 — built 2026-06-07 sha:ed5906f1ad9fc97770bf5e8a0d9e4829ea3b3ec0 */

/* ── tokens.css ─── */
/*
 * @relay/ui — Design Tokens
 * v3.4 canonical — source: VK5VES + relay-creative/prototype web/app-v34.html
 * Locked: CAZAZT
 *
 * Canonical names: --teal, --surface, --panel etc. (no prefix)
 * Light mode is primary. Dark mode: [data-theme="dark"], opt-in.
 */

:root {
  /* ── Backgrounds ─────────────────────────────────────────── */
  --bg:          #ffffff;
  --surface:     #f7f7f7;
  --panel:       #f0f0f0;
  --deep:        #e8e8e8;

  /* ── Borders ─────────────────────────────────────────────── */
  --border:      #e4e4e4;
  --border-hi:   #cccccc;

  /* ── Text ────────────────────────────────────────────────── */
  --text:        #111111;
  --text-2:      #555555;
  --text-muted:  #999999;
  --text-bright: #000000;

  /* ── Brand ───────────────────────────────────────────────── */
  --teal:        #0d9488;
  --teal-dim:    rgba(13,148,136,0.08);
  --teal-glow:   rgba(13,148,136,0.04);
  --indigo:      #6366f1;
  --indigo-dim:  rgba(99,102,241,0.08);

  /* ── Semantic ────────────────────────────────────────────── */
  --success:     #16a34a;
  --warning:     #d97706;
  --error:       #dc2626;

  /* ── Shape ───────────────────────────────────────────────── */
  --radius:      8px;
  --radius-sm:   4px;
  --radius-lg:   10px;
  --radius-full: 9999px;

  /* ── Typography ──────────────────────────────────────────── */
  --font:        'Outfit', system-ui, sans-serif;
  --display:     'Cormorant Garamond', Georgia, serif;
  --mono:        'JetBrains Mono', monospace;

  /* ── Layout ──────────────────────────────────────────────── */
  --sidebar-w:   220px;
  --topbar-h:    52px;

}

/* ── Dark mode ───────────────────────────────────────────────── */

[data-theme="dark"] {
  --bg:          #181818;
  --surface:     #0d0d0d;
  --panel:       #222222;
  --deep:        #080808;
  --border:      #2a2a2a;
  --border-hi:   #383838;
  --text:        #f0f0f0;
  --text-2:      #999999;
  --text-muted:  #606060;
  --text-bright: #ffffff;
  --teal:        #2dd4bf;
  --teal-dim:    rgba(45,212,191,0.08);
  --teal-glow:   rgba(45,212,191,0.04);
  --indigo:      #818cf8;
  --indigo-dim:  rgba(99,102,241,0.12);
  --success:     #22c55e;
  --warning:     #f59e0b;
  --error:       #ef4444;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:          #181818;
    --surface:     #0d0d0d;
    --panel:       #222222;
    --deep:        #080808;
    --border:      #2a2a2a;
    --border-hi:   #383838;
    --text:        #f0f0f0;
    --text-2:      #999999;
    --text-muted:  #606060;
    --text-bright: #ffffff;
    --teal:        #2dd4bf;
    --teal-dim:    rgba(45,212,191,0.08);
    --teal-glow:   rgba(45,212,191,0.04);
    --indigo:      #818cf8;
    --indigo-dim:  rgba(99,102,241,0.12);
    --success:     #22c55e;
    --warning:     #f59e0b;
    --error:       #ef4444;
  }
}

/* ── Base reset ───────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── sidebar.css ─── */
/*
 * @relay/ui — Sidebar & Navigation
 *
 * .app-shell        flex root layout (sidebar + main)
 * .sidebar          fixed left nav column (220px)
 * .sidebar-logo     logo + wordmark header
 * .sidebar-footer   user chip at bottom
 * .nav-section      grouped nav block
 * .nav-label        section heading (uppercase, muted)
 * .nav-item         clickable nav row
 * .nav-item.active  selected state
 * .nav-icon         16px icon inside nav-item
 * .main             content area (margin-left: 220px)
 * .topbar           sticky top bar
 * .content          page content padding
 *
 * Requires: @relay/ui/tokens
 */

/* ── Shell layout ─────────────────────────────────────────────── */

.app-shell { display: flex; min-height: 100vh; }
.main      { margin-left: 220px; flex: 1; display: flex; flex-direction: column; }
.content   { padding: 28px; flex: 1; max-width: 1100px; }

/* ── Sidebar ──────────────────────────────────────────────────── */

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0 0 24px 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 16px 14px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 8px;
}
.sidebar-logo svg       { flex-shrink: 0; }
.sidebar-logo-text      { font-weight: 600; font-size: 15px; color: var(--text-bright); }
.sidebar-logo-sub       { font-size: 10px; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; }

.sidebar-footer {
  margin-top: auto;
  padding: 0 8px;
  border-top: 0.5px solid var(--border);
  padding-top: 10px;
}

/* ── Nav items ────────────────────────────────────────────────── */

.nav-section { padding: 0 10px; }

.nav-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 10px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  user-select: none;
}
.nav-item:hover  { background: var(--panel); color: var(--text); }
.nav-item.active { background: var(--teal-dim); color: var(--teal); }

.nav-icon               { width: 15px; height: 15px; opacity: 0.6; flex-shrink: 0; }
.nav-item.active .nav-icon { opacity: 1; }

/* ── User chip ────────────────────────────────────────────────── */

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.user-chip:hover { background: var(--surface); }

.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--teal-dim); border: 1px solid var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--teal); flex-shrink: 0;
}
.user-info  { overflow: hidden; }
.user-name  { font-size: 13px; font-weight: 500; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-badge {
  margin-left: auto; font-family: var(--mono); font-size: 9px;
  background: var(--teal-dim); color: var(--teal);
  border: 0.5px solid var(--border-hi);
  border-radius: 4px; padding: 2px 6px; flex-shrink: 0;
}

/* ── Topbar ───────────────────────────────────────────────────── */

.topbar {
  height: 48px;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 12px;
}
.topbar-title   { font-size: 15px; font-weight: 600; color: var(--text-bright); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* ── Light mode ───────────────────────────────────────────────── */

[data-theme="light"] .sidebar { background: var(--surface); border-right-color: var(--border); }
[data-theme="light"] .nav-item           { color: var(--text-2); }
[data-theme="light"] .nav-item:hover     { background: var(--panel); color: var(--text); }
[data-theme="light"] .nav-item.active    { background: var(--teal-dim); color: var(--teal); }
[data-theme="light"] .sidebar-footer     { border-top-color: var(--border); }

/* ── card.css ─── */
/*
 * @relay/ui — Cards & Stat Cards
 *
 * .card             elevated content container
 * .card-header      flex header row (title + action)
 * .card-title       uppercase section heading
 * .stat-grid        4-column stats row
 * .stat-card        individual metric tile
 * .stat-label       metric name
 * .stat-value       metric number (large)
 * .stat-sub         metric subtext
 * .stat-value.loading  skeleton shimmer state
 *
 * Requires: @relay/ui/tokens
 */

/* ── Content card ─────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 20px;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-sub  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.card-body { padding-top: 4px; }

/* ── Stat row ─────────────────────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 16px 18px;
}
.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.stat-sub.up { color: var(--success); }

/* Loading skeleton */
@keyframes relay-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Canonical skeleton block — use .skeleton for any loading placeholder */
.skeleton {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  animation: relay-pulse 1.3s ease-in-out infinite;
}
/* Backward-compat aliases */
.skeleton-block { background: var(--surface); border-radius: var(--radius, 8px); animation: relay-pulse 1.3s ease-in-out infinite; }
.rl-skeleton    { height: 52px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; animation: relay-pulse 1.3s ease-in-out infinite; }

.stat-value.loading { color: transparent !important; position: relative; }
.stat-value.loading::after {
  content: '';
  position: absolute;
  inset: 2px 0;
  background: var(--border);
  border-radius: 4px;
  animation: relay-pulse 1.3s ease-in-out infinite;
}

/* ── Empty state ──────────────────────────────────────────────── */

.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty svg { opacity: 0.3; margin-bottom: 12px; }
.empty p   { font-size: 13px; }

/* ── Light mode ───────────────────────────────────────────────── */

[data-theme="light"] .card {
  background: var(--bg);
  border-color: var(--border);
}
[data-theme="light"] .stat-card { background: var(--bg); border-color: var(--border); }

/* ── list.css ─── */
/*
 * @relay/ui — List Items
 *
 * .list-item        row with icon + text content
 * .list-icon        square icon container (accent tinted)
 * .list-main        flex text column
 * .list-title       primary row text
 * .list-sub         secondary row text
 *
 * Requires: @relay/ui/tokens
 */

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--panel); }

.list-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--teal-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 14px;
  flex-shrink: 0;
}

.list-main  { flex: 1; overflow: hidden; }
.list-title { font-weight: 500; color: var(--text-bright); font-size: 13.5px; }
.list-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── table.css ─── */
/*
 * @relay/ui — Tables
 *
 * Standard data table styles. Applied to native <table> elements.
 * .row-hover    adds hover highlight on <tr>
 *
 * Requires: @relay/ui/tokens
 */

table { width: 100%; border-collapse: collapse; }

th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr.row-hover:hover td { background: var(--panel); }

/* ── badge.css ─── */
/*
 * @relay/ui — Badges & Pills
 *
 * .badge            base badge (requires a colour modifier)
 * .badge-green      success / active
 * .badge-teal       brand accent
 * .badge-blue       informational
 * .badge-warn       warning
 * .badge-red        error / destructive
 * .badge-muted      neutral / inactive
 *
 * Requires: @relay/ui/tokens
 */

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.badge-green  { background: rgba(22,163,74,0.10);    color: var(--success);  border: 0.5px solid rgba(22,163,74,0.2); }
.badge-teal   { background: var(--teal-dim);          color: var(--teal);     border: 0.5px solid var(--border-hi); }
.badge-indigo { background: var(--indigo-dim);        color: var(--indigo);   border: 0.5px solid rgba(99,102,241,0.25); }
.badge-blue   { background: rgba(82, 153, 224, 0.12); color: var(--indigo);   border: 0.5px solid rgba(82,153,224,0.2); }
.badge-warn   { background: rgba(217,119,6,0.10);     color: var(--warning);  border: 0.5px solid rgba(217,119,6,0.2); }
.badge-red    { background: rgba(220,38,38,0.10);     color: var(--error);    border: 0.5px solid rgba(220,38,38,0.2); }
.badge-muted  { background: var(--panel); color: var(--text-muted); border: 0.5px solid var(--border); }

/* Light mode — tokens already match prototype in light, no overrides needed */

/* ── Relay-status variants (replaces rl-chip inline styles) ───── */
.badge-deleted   { background: var(--panel); color: var(--text-muted); border: 0.5px solid var(--border); }
.badge-expired   { background: var(--panel); color: var(--text-muted); border: 0.5px solid var(--border); }
.badge-relay     { background: var(--teal-dim); color: var(--teal); border: 0.5px solid var(--border-hi); }
.badge-org       { background: rgba(59,130,246,.10); color: #3b82f6; border: 0.5px solid rgba(59,130,246,.2); }
.badge-broadcast { background: rgba(139,92,246,.10); color: #8b5cf6; border: 0.5px solid rgba(139,92,246,.2); }
.badge-private   { background: var(--panel); color: var(--text-muted); border: 0.5px solid var(--border); }

/* Chip row container */
.rl-chips { display: flex; gap: 5px; flex-shrink: 0; }

/* Chip variants — used in relay cards */
.rl-chip {
  font-family: var(--mono); font-size: 9px;
  padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.rl-chip-teal   { background: var(--teal-dim);   color: var(--teal);   border: 0.5px solid var(--border-hi); }
.rl-chip-indigo { background: var(--indigo-dim);  color: var(--indigo); border: 0.5px solid rgba(99,102,241,0.25); }

/* ── Status dot (staleness indicator) ─────────────────────────── */

.stale-label { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; color: var(--text-muted); }
.stale-dot   { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.fresh   .stale-dot { background: var(--success); }
.aging   .stale-dot { background: var(--warning); }
.stale   .stale-dot { background: var(--error); }
.expired .stale-dot { background: var(--text-muted); }

/* ── Weight chip ───────────────────────────────────────────────── */

.weight-chip  {
  font-size: 10px; padding: 2px 7px; border-radius: 4px;
  font-family: var(--font-mono, monospace); letter-spacing: 0.04em; border: 1px solid;
}
.weight-light { background: rgba(74, 80, 96, 0.15);   color: var(--text-muted);  border-color: rgba(74, 80, 96, .3); }
.weight-mid   { background: rgba(140, 145, 160, 0.1); color: var(--text-muted);  border-color: rgba(140, 145, 160, .25); }
.weight-heavy { background: rgba(82, 153, 224, 0.12); color: var(--indigo);        border-color: rgba(82, 153, 224, .3); }
.weight-dense { background: rgba(224, 166, 82, 0.12); color: var(--warning);        border-color: rgba(224, 166, 82, .3); }
.weight-max   { background: rgba(224, 82, 82, 0.12);  color: var(--error);       border-color: rgba(224, 82, 82, .3); }

/* ── button.css ─── */
/*
 * @relay/ui — Buttons
 *
 * .btn              base button
 * .btn-accent       teal filled (primary action)
 * .btn-ghost        transparent with border (secondary action)
 * .btn-danger       destructive action
 * .btn-sm           smaller padding variant
 *
 * Requires: @relay/ui/tokens
 */

.btn {
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm, 5px);
  padding: 6px 12px;
  transition: opacity 0.12s, background 0.12s;
  font-family: inherit;
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-accent { background: var(--teal); color: #fff; font-weight: 600; }
.btn-accent:hover { opacity: 0.88; }

.btn-teal { background: var(--teal); color: #fff; font-weight: 600; } /* alias */
.btn-teal:hover { opacity: 0.88; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 0.5px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hi);
  opacity: 1;
}

.btn-danger {
  background: rgba(224, 82, 82, 0.12);
  color: var(--error);
  border: 1px solid rgba(224, 82, 82, 0.25);
}

.btn-sm      { padding: 4px 9px;  font-size: 11px; }
.btn-xs      { padding: 3px 8px;  font-size: 11px; }
.btn-primary { background: var(--teal); color: #000; } /* alias for btn-accent */

/* Light mode overrides */
[data-theme="light"] .btn-accent:hover { opacity: 0.88; }
[data-theme="light"] .btn-teal:hover   { opacity: 0.88; }
[data-theme="light"] .btn-ghost { color: var(--text-2); border-color: var(--border); }
[data-theme="light"] .btn-ghost:hover { color: var(--text); border-color: var(--border-hi); }

/* ── form.css ─── */
/*
 * @relay/ui — Forms
 *
 * .form-row         vertical field container (label + input + desc)
 * .form-label       field label
 * .form-input       text input / select / textarea
 * .form-desc        helper text below input
 * .form-actions     row of buttons at form bottom
 *
 * Requires: @relay/ui/tokens
 */

.form-row    { margin-bottom: 18px; }

.form-label  {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-input  {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 5px);
  color: var(--text-bright);
  font-size: 13px;
  padding: 8px 11px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--teal); }

select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }

.form-desc    {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ── Light mode ─────────────────────────────────────────────── */

[data-theme="light"] .form-input,
:root:not([data-theme]) .form-input {
  background: var(--surface);
  color: var(--text-bright);
  border-color: var(--border);
}

/* ── toast.css ─── */
/*
 * @relay/ui — Toast notifications
 *
 * Requires a <div id="toast"> in the HTML.
 * Controlled by the toast() utility in @relay/shared/utils.
 *
 * Requires: @relay/ui/tokens
 */

#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-bright);
  z-index: 999;
  display: none;
  max-width: 320px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show          { display: block; opacity: 1; transform: translateY(0); }
#toast.toast-success { border-color: var(--success); color: var(--success); }
#toast.toast-error   { border-color: var(--error);   color: var(--error); }
#toast.toast-info    { border-color: var(--indigo);     color: var(--indigo); }

/* Light mode */
[data-theme="light"] #toast {
  box-shadow: 0 4px 24px rgba(31, 35, 40, 0.16), 0 1px 4px rgba(31, 35, 40, 0.08);
}

/* ── notification.css ─── */
/*
 * @relay/ui — Notification Component
 * v3.4 · Source: BNF67K spec + relay-app #176
 *
 * Two visual states communicate urgency without text:
 *   teal border  = informational (relay received, claim approved)
 *   amber border = action required (claim request, connection request)
 *
 * Feed philosophy: actioned items stay visible (muted), not removed.
 * This is a feed, not a to-do list.
 *
 * Requires: @relay/ui/tokens
 */

/* ── Panel container ─────────────────────────────────────────── */

.notif-panel {
  background: var(--rly-surface);
  border: 0.5px solid var(--rly-border);
  border-radius: var(--rly-radius-card);
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────── */

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 0.5px solid var(--rly-border);
}

.notif-header-label {
  font-family: var(--rly-font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rly-text-muted);
}

.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-header-action {
  font-family: var(--rly-font-ui, 'Outfit', sans-serif);
  font-size: 11px;
  font-weight: 400;
  color: var(--rly-teal);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.12s;
}
.notif-header-action:hover { background: var(--rly-panel); }

/* ── Timeline mode toggle ────────────────────────────────────── */

.notif-mode-toggle {
  font-family: var(--rly-font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  font-weight: 500;
  color: var(--rly-text-muted);
  background: none;
  border: 0.5px solid var(--rly-border);
  border-radius: var(--rly-radius-sm);
  padding: 2px 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.12s, border-color 0.12s;
}
.notif-mode-toggle:hover       { color: var(--rly-text); border-color: var(--rly-border-hi); }
.notif-mode-toggle.active      { color: var(--rly-teal); border-color: var(--rly-teal); }

/* ── Item list ───────────────────────────────────────────────── */

.notif-list {
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ── Base item ───────────────────────────────────────────────── */

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 0.5px solid var(--rly-border);
  border-left: 1.5px solid transparent;   /* placeholder — overridden by state */
  background: var(--rly-surface);
  transition: background 0.12s;
  cursor: default;
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover      { background: var(--rly-panel); }

/* ── Unread states ───────────────────────────────────────────── */

/* Informational — teal border, panel bg */
.notif-item--unread {
  border-left-color: var(--rly-teal);
  background: var(--rly-panel);
}

/* Action required — amber border, amber tint bg */
.notif-item--action {
  border-left-color: var(--rly-warning);
  background: rgba(217, 119, 6, 0.04);
}
.notif-item--action:hover { background: rgba(217, 119, 6, 0.07); }

/* ── Read / actioned (stays in feed, muted) ──────────────────── */

.notif-item--read {
  background: var(--rly-surface);
  border-left-color: transparent;
}
.notif-item--read .notif-label,
.notif-item--read .notif-subtitle { color: var(--rly-text-muted); }

/* ── Dismissed (collapsed under toggle) ─────────────────────── */

.notif-item--dismissed {
  display: none;      /* hidden until 'Show dismissed' is toggled */
  opacity: 0.5;
}
.notif-item--dismissed.visible { display: flex; }

/* ── Status dot ──────────────────────────────────────────────── */

.notif-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;   /* align with first text line */
}
.notif-dot--teal  { background: var(--rly-teal); }
.notif-dot--amber { background: var(--rly-warning); }
.notif-dot--muted { background: var(--rly-border-hi); }

/* ── Item icon ───────────────────────────────────────────────── */

.notif-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
  margin-top: 1px;
  color: var(--rly-text-2);
}
.notif-item--unread .notif-icon,
.notif-item--action .notif-icon { opacity: 1; color: var(--rly-text); }

/* ── Item body ───────────────────────────────────────────────── */

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-label {
  font-family: var(--rly-font-ui, 'Outfit', sans-serif);
  font-size: 12px;
  font-weight: 600;
  color: var(--rly-text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-subtitle {
  font-family: var(--rly-font-ui, 'Outfit', sans-serif);
  font-size: 11px;
  font-weight: 400;
  color: var(--rly-text-2);
  margin-top: 2px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Inline Relay Code ───────────────────────────────────────── */

.notif-code {
  font-family: var(--rly-font-mono, 'JetBrains Mono', monospace);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rly-teal);
}

/* ── Timestamp ───────────────────────────────────────────────── */

.notif-timestamp {
  font-family: var(--rly-font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  font-weight: 400;
  color: var(--rly-text-muted);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  white-space: nowrap;
}

/* ── Context menu trigger ────────────────────────────────────── */

.notif-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--rly-text-muted);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  align-self: flex-start;
  opacity: 0;
  transition: opacity 0.1s, background 0.1s;
}
.notif-item:hover .notif-menu-btn { opacity: 1; }
.notif-menu-btn:hover              { background: var(--rly-deep); color: var(--rly-text); }

/* ── Inline action buttons (claim.request, connection.request) ─ */

.notif-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.notif-action-btn {
  font-family: var(--rly-font-ui, 'Outfit', sans-serif);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--rly-radius-sm);
  border: none;
  cursor: pointer;
  transition: opacity 0.12s;
}
.notif-action-btn:hover { opacity: 0.8; }

.notif-action-btn--primary {
  background: var(--rly-teal);
  color: #fff;
}
.notif-action-btn--secondary {
  background: var(--rly-panel);
  color: var(--rly-text-2);
  border: 0.5px solid var(--rly-border);
}
.notif-action-btn--danger {
  background: rgba(220, 38, 38, 0.08);
  color: var(--rly-error);
  border: 0.5px solid rgba(220, 38, 38, 0.2);
}

/* ── Section divider ('Earlier', 'Today') ────────────────────── */

.notif-divider {
  padding: 6px 16px;
  font-family: var(--rly-font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rly-text-muted);
  background: var(--rly-surface);
  border-bottom: 0.5px solid var(--rly-border);
}

/* ── Dismissed section toggle ────────────────────────────────── */

.notif-dismissed-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  border-top: 0.5px solid var(--rly-border);
  cursor: pointer;
  font-family: var(--rly-font-ui, 'Outfit', sans-serif);
  font-size: 11px;
  color: var(--rly-text-muted);
  transition: color 0.12s;
  text-align: left;
}
.notif-dismissed-toggle:hover { color: var(--rly-text-2); }

/* ── Empty state ─────────────────────────────────────────────── */

.notif-empty {
  padding: 24px 16px;
  text-align: center;
  font-family: var(--rly-font-ui, 'Outfit', sans-serif);
  font-size: 13px;
  color: var(--rly-text-muted);
}

/* ── Timeline mode ───────────────────────────────────────────── */

.notif-timeline { padding: 4px 0; }

.notif-timeline-date {
  padding: 6px 16px 2px;
  font-family: var(--rly-font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rly-text-muted);
}

/* Timeline items use the same dot+connector as relay detail */
.notif-timeline .notif-item {
  border-left: none;
  padding-left: 28px;
  position: relative;
}
.notif-timeline .notif-item::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rly-border);
}
.notif-timeline .notif-item:first-child::before { top: 18px; }
.notif-timeline .notif-item:last-child::before  { bottom: calc(100% - 18px); }

.notif-timeline .notif-dot {
  position: absolute;
  left: 11px;
  top: 15px;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--rly-surface);
  z-index: 1;
}

/* ── Skeleton loading ────────────────────────────────────────── */

@keyframes notif-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.notif-skeleton {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 0.5px solid var(--rly-border);
}
.notif-skeleton:last-child { border-bottom: none; }

.notif-skeleton-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rly-border);
  flex-shrink: 0;
  margin-top: 4px;
  animation: notif-pulse 1.3s ease-in-out infinite;
}

.notif-skeleton-body { flex: 1; }

.notif-skeleton-line {
  height: 10px;
  border-radius: 5px;
  background: var(--rly-border);
  animation: notif-pulse 1.3s ease-in-out infinite;
  margin-bottom: 6px;
}
.notif-skeleton-line--label    { width: 55%; }
.notif-skeleton-line--subtitle { width: 75%; }

/* ── utils.css ─── */
/*
 * @relay/ui — Utility classes
 *
 * Small single-purpose helpers.
 *
 * Requires: @relay/ui/tokens
 */

/* ── Code / monospace ─────────────────────────────────────────── */

.pin-chip {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--teal);
  letter-spacing: 2px;
  cursor: pointer;
  user-select: all;
}
.pin-chip:hover { border-color: var(--teal); }

/* ── Progress bars ────────────────────────────────────────────── */

.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--teal);
  transition: width 0.3s ease;
}

@keyframes progress-indeterminate {
  0%   { transform: translateX(-100%); width: 40%; }
  50%  { width: 60%; }
  100% { transform: translateX(250%); width: 40%; }
}
.progress-track.indeterminate .progress-fill {
  width: 40% !important;
  animation: progress-indeterminate 1.2s ease infinite;
}

/* ── Page / screen visibility ─────────────────────────────────── */

.page        { display: none; }
.page.active { display: block; }

/* ── Theme toggle button ──────────────────────────────────────── */

#theme-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px 8px;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s;
}
#theme-btn:hover { color: var(--text-bright); border-color: var(--teal); }

/* ── Notification event rows ──────────────────────────────────── */

.notif-event-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.notif-event-row:last-child { border-bottom: none; }

/* ── Global search item ───────────────────────────────────────── */

.gs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.gs-item:hover,
.gs-item--focused { background: var(--surface); color: var(--text-bright); }

/* ── Login status bar ─────────────────────────────────────────── */

.login-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}
.login-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
}
.login-status-dot.active { background: var(--success); }

/* ── Accessibility ────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--teal);
  color: #000;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
}
.skip-link:focus { left: 8px; }

