/* ── Splash Screen ── */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease;
}

#splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

#splash-screen.hidden {
  display: none;
}

#splash-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#splash-skip {
  position: absolute;
  bottom: 40px;
  right: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 24px;
  border-radius: 20px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

#splash-skip:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

:root {
  --bg: #ffffff;
  --bg-card: #f8f9fb;
  --bg-input: #f1f3f6;
  --bg-elevated: #ffffff;
  --border: #e2e5ea;
  --border-hover: #c4c9d1;
  --border-subtle: rgba(37, 73, 232, 0.08);
  --text: #111827;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-dim: #9ca3af;
  --accent: #2549e8;
  --accent-hover: #3b5fef;
  --accent-glow: rgba(37, 73, 232, 0.08);
  --accent-glow-strong: rgba(37, 73, 232, 0.12);
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --blue: #2549e8;
  --radius: 10px;
  --radius-lg: 14px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --primary: var(--accent);
  --card: var(--bg-card);
  --muted: var(--text-dim);
  --font-mono: var(--mono);
}

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

body {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
}

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

header {
  border-bottom: 1px solid rgba(30, 58, 180, 0.15);
  padding: 0 24px;
  position: sticky;
  top: 0;
  background: rgba(22, 42, 140, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  overflow: visible;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  overflow: visible;
}

.logo {
  font-family: "IBM Plex Mono", monospace;
  font-size: 22px;
  font-weight: 400;
  color: #ffffff;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo:hover {
  color: rgba(255, 255, 255, 0.85);
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 1px;
  flex: 1;
}

.tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition:
    color 0.15s,
    background 0.15s;
}

.tab:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
}
.tab.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* ── Nav Links (new router-based nav) ── */
.nav-link {
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  transition:
    color 0.15s,
    background 0.15s;
}

.nav-link:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.nav-link--docs {
  color: rgba(139, 92, 246, 0.8);
}

.nav-link--docs:hover {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.1);
}

/* ── Connect Wallet Button ── */
.connect-wallet-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 16px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.connect-wallet-btn:hover {
  border-color: rgba(99, 102, 241, 0.8);
  background: rgba(99, 102, 241, 0.1);
  color: #fff;
}

.connect-wallet-btn.connected {
  border-color: rgba(34, 197, 94, 0.5);
  color: rgba(34, 197, 94, 0.9);
}

.connect-wallet-btn.connected:hover {
  border-color: rgba(34, 197, 94, 0.8);
  background: rgba(34, 197, 94, 0.1);
}

/* ── Wallet Dropdown ── */
.wallet-dropdown {
  position: fixed;
  top: 52px;
  right: 20px;
  background: #1a1b2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 200px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.wallet-dropdown-address {
  padding: 10px 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-family: "JetBrains Mono", monospace;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  word-break: break-all;
}

.wallet-dropdown-item {
  display: block;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s;
}

.wallet-dropdown-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Console Tabs ── */
.console-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  padding: 0 4px;
}

.console-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
}

.console-tab:hover {
  color: var(--text-primary);
}

.console-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Credit Balance Button ── */
.credit-balance-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 73, 232, 0.15);
  border: 1px solid rgba(37, 73, 232, 0.3);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.credit-balance-btn:hover {
  background: rgba(37, 73, 232, 0.25);
  border-color: var(--accent);
}

.deposit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deposit-modal {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px;
  max-width: 400px;
  width: 90%;
}

.deposit-modal h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.deposit-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.deposit-amount-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s;
}

.deposit-amount-btn:hover,
.deposit-amount-btn.selected {
  background: rgba(37, 73, 232, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.deposit-modal .btn-primary {
  width: 100%;
  margin-top: 8px;
}

.deposit-modal .deposit-balance {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.console-panel-content {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ── Console Sessions Panel ── */
.console-session-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.console-session-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.console-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.console-session-agent {
  font-weight: 600;
  color: var(--text-primary);
}

.console-session-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.console-session-id {
  font-size: 0.75rem;
  color: var(--text-tertiary, rgba(255, 255, 255, 0.3));
  margin-top: 4px;
  font-family: monospace;
}

/* ── Google Login Button ── */
.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.google-login-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.google-login-btn.hidden {
  display: none;
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1px;
  transition: 0.2s;
}

/* ── Main ────────────────────────────────────────────── */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
  flex: 1;
  width: 100%;
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

/* ── Hero / Landing ──────────────────────────────────── */

.hero {
  text-align: center;
  padding: 72px 0 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(37, 73, 232, 0.15);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(37, 73, 232, 0.3);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 6px rgba(37, 73, 232, 0);
  }
}

.hero-title {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: 58px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-transform: uppercase;
  padding-right: 6px;
  overflow: visible;
}

.gradient-text {
  background: linear-gradient(135deg, #2549e8 0%, #3b82f6 40%, #60a5fa 70%, #2549e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Split Text Effect ──────────────────────────────── */

.split-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.split-char {
  display: inline-block;
  position: relative;
}

.split-char-top,
.split-char-bottom {
  display: block;
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

.split-char-top {
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.split-char-bottom {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
}

.split-text.gradient-text .split-char-top,
.split-text.gradient-text .split-char-bottom {
  background: linear-gradient(135deg, #2549e8 0%, #3b82f6 40%, #60a5fa 70%, #2549e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* Hero Search */
.hero-search {
  display: flex;
  align-items: center;
  max-width: 600px;
  margin: 0 auto 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 73, 232, 0.08);
}

.hero-search-icon {
  color: var(--text-dim);
  margin: 0 12px;
  flex-shrink: 0;
}

.hero-search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  padding: 12px 4px;
  outline: none;
}

.hero-search-input::placeholder {
  color: var(--text-dim);
}

.hero-search-btn {
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ── Featured Section ────────────────────────────────── */

.featured-section {
  margin: 0 0 56px;
}

/* ── Marquee ─────────────────────────────────────────── */

.marquee-section {
  margin: 0 0 56px;
  text-align: center;
}

.marquee-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin-bottom: 16px;
}

.marquee-track {
  overflow: hidden;
}

.marquee-scroll {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-track:hover .marquee-scroll {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.mi-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── A2A Ecosystem ──────────────────────────────────── */

.ecosystem-section {
  margin: 0 0 64px;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.ecosystem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.ecosystem-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.ecosystem-card-cta {
  border-color: rgba(37, 73, 232, 0.15);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(37, 73, 232, 0.03) 100%);
}

.ecosystem-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ecosystem-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.ecosystem-logo-svg {
  flex-shrink: 0;
}

.ecosystem-card-header h4 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}

.ecosystem-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.ecosystem-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.ecosystem-explainer {
  margin-top: 20px;
}

.ecosystem-explainer-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  text-align: center;
}

.ecosystem-explainer-inner h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.ecosystem-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ecosystem-flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.ecosystem-flow-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ecosystem-flow-arrow {
  flex-shrink: 0;
}

.ecosystem-explainer-sub {
  font-size: 12px;
  color: var(--text-dim);
}

.ecosystem-explainer-sub code {
  color: var(--accent);
  font-size: 12px;
  background: var(--accent-glow);
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .ecosystem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .ecosystem-grid {
    grid-template-columns: 1fr;
  }
  .ecosystem-flow {
    flex-direction: column;
  }
  .ecosystem-flow-arrow {
    transform: rotate(90deg);
  }
}

/* ── Features ────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 64px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.feature-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── How It Works ────────────────────────────────────── */

.how-it-works {
  margin: 0 0 64px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
}

.steps {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.step {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color 0.2s;
}

.step:hover {
  border-color: var(--border-hover);
}

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  color: var(--text-dim);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-glow-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  font-family: var(--mono);
}

.step-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.step-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Code Section ────────────────────────────────────── */

.code-section {
  margin: 0 0 56px;
  border: 1px solid #2d2d3f;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1e1e2e;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #2d2d3f;
  background: #252536;
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3d3d4f;
}

.code-dots span:first-child {
  background: #ef4444;
}
.code-dots span:nth-child(2) {
  background: #eab308;
}
.code-dots span:nth-child(3) {
  background: #22c55e;
}

.code-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  flex: 1;
}

.btn-copy {
  background: #2d2d3f;
  border: 1px solid #3d3d4f;
  color: #94a3b8;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}

.code-block {
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  color: #e2e8f0;
}

.code-dim {
  color: #64748b;
}
.code-str {
  color: #60a5fa;
}
.code-num {
  color: var(--yellow);
}

/* ── Live Stats Bar ──────────────────────────────────── */

.live-stats-bar {
  display: flex;
  justify-content: center;
  gap: 56px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.live-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.live-stat-value {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -1px;
}

.live-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

/* ── Controls / Browse Header ────────────────────────── */

.browse-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.browse-header .page-title {
  margin-bottom: 0;
}

.result-count {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
}

.controls {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  padding-left: 36px !important;
}

.filter-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.select-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: auto;
}

.select-input:focus {
  border-color: var(--accent);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
}

/* ── Inputs ──────────────────────────────────────────── */

.input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}

.input:focus {
  border-color: var(--accent);
}
.input::placeholder {
  color: var(--text-dim);
}

/* ── Buttons ─────────────────────────────────────────── */

.btn {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  padding: 10px 20px;
  transition: all 0.15s;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.btn-large {
  padding: 13px 28px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-full {
  width: 100%;
}

.btn-back {
  margin-bottom: 24px;
  font-size: 13px;
  padding: 8px 16px;
}

/* ── Agent Avatars ───────────────────────────────────── */

.agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.agent-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-glow-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.agent-avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 28px;
}

.agent-avatar-lg.agent-avatar {
  width: 72px;
  height: 72px;
}

/* ── Agent Grid ──────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition:
    border-color 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  cursor: pointer;
}

.agent-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.agent-card .agent-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.agent-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.agent-card .agent-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.agent-price {
  font-size: 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 500;
}

.price-dynamic {
  background: var(--accent);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-right: 4px;
}

.badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}
.badge-inactive {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}
.badge-mode {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.agent-card .skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.skill-tag {
  background: var(--accent-glow);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.skill-tag-more {
  background: var(--bg-elevated);
  color: var(--text-dim);
}

.agent-card-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.agent-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.agent-stat:not(:last-child) {
  border-right: 1px solid var(--border);
}

.agent-stat-value {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: -0.3px;
}

.agent-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ── Agent Profile ───────────────────────────────────── */

.profile-header {
  margin-bottom: 32px;
}

.profile-header-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-header-info {
  flex: 1;
}

.profile-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-pubkey {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.btn-copy-inline {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy-inline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.profile-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.profile-stat-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -0.5px;
}

.profile-stat-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.profile-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.profile-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.profile-section-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 16px;
}

.profile-section .skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-section .skill-tag {
  padding: 5px 14px;
  font-size: 13px;
}

.profile-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}

.profile-endpoint code {
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-section .code-section {
  margin: 0;
}

/* Ratings */
.rating-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.rating-row:last-child {
  border-bottom: none;
}

.rating-row-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.rating-stars {
  color: var(--yellow);
  font-size: 14px;
  letter-spacing: 1px;
}

.rating-from {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.rating-job {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-left: auto;
}

.rating-comment {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 6px;
}

/* ── Jobs Network + List ─────────────────────────────── */

.jobs-network-wrap {
  background: #0a0e1a;
  border: 1px solid rgba(37, 73, 232, 0.15);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(37, 73, 232, 0.08);
}

.jobs-network-wrap canvas {
  display: block;
  width: 100%;
  height: 400px;
}

.jobs-list-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.jobs-list-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.jobs-list-count {
  font-size: 13px;
  color: var(--text-dim);
}

.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.job-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.job-row:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.job-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.job-dot-completed {
  background: var(--green);
}
.job-dot-created {
  background: var(--blue);
}
.job-dot-disputed {
  background: var(--yellow);
}
.job-dot-cancelled {
  background: var(--red);
}

.job-info {
  flex: 1;
  min-width: 0;
}

.job-task {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.job-meta {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-top: 2px;
}

.job-amount {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.job-time {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.job-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  font-family: var(--mono);
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.job-badge-session {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.job-badge-quoted {
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

/* ── Form ────────────────────────────────────────────── */

.form-container {
  max-width: 600px;
}

.form-desc {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.6;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.result {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--mono);
  word-break: break-all;
}

.result.success {
  background: rgba(37, 73, 232, 0.06);
  border: 1px solid rgba(37, 73, 232, 0.15);
  color: var(--green);
}

.result.error {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--red);
}

.placeholder {
  color: var(--text-dim);
  text-align: center;
  padding: 48px;
  grid-column: 1 / -1;
}

.hidden {
  display: none !important;
}

/* ── My Agent Lookup ────────────────────────────────── */

.lookup-row {
  display: flex;
  gap: 12px;
  max-width: 600px;
  margin-bottom: 24px;
}

.lookup-row .input {
  flex: 1;
}

.agent-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 700px;
}

.agent-detail-card .agent-header {
  margin-bottom: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item .detail-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.detail-item .detail-value {
  font-size: 14px;
  font-family: var(--mono);
  font-size: 13px;
}

.detail-item-wide {
  grid-column: 1 / -1;
}

.a2a-link {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

.a2a-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.endpoint-val {
  word-break: break-all;
  font-size: 12px !important;
  color: var(--text-secondary);
}

.lookup-subheading {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 12px;
  letter-spacing: -0.2px;
}

/* ── Integrate / Docs ───────────────────────────────── */

.docs-section {
  margin-bottom: 32px;
}

.docs-heading {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.code-kw {
  color: var(--blue);
}

.api-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.api-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.api-row:hover {
  border-color: var(--border-hover);
}

.api-method {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  min-width: 42px;
  text-align: center;
}

.api-method.get {
  background: rgba(37, 73, 232, 0.08);
  color: var(--green);
}

.api-method.post {
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue);
}

.api-path {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  flex-shrink: 0;
}

.api-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-left: auto;
}

/* ── Footer ──────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-logo {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 18px;
  letter-spacing: 2px;
}

.footer-brand p {
  font-size: 12px;
  margin-top: 2px;
}

.footer-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

.network-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── MCP Page ────────────────────────────────────────── */

.mcp-hero {
  text-align: center;
  padding: 24px 0 40px;
}

.mcp-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-glow-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.mcp-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── MCP Quick Start ─────────────────────────────────── */

.mcp-quick-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.mcp-steps-simple {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mcp-step-simple {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.mcp-config-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.mcp-config-hint code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── MCP Client Carousel ─────────────────────────────── */

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.carousel-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 4px 0;
  flex: 1;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track .compat-card {
  flex: 0 0 calc(25% - 8px);
  scroll-snap-align: start;
}

.carousel-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.carousel-btn:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.compat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  border-radius: var(--radius);
  padding: 14px 16px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.compat-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 1px var(--border-hover);
}

.compat-card img {
  flex-shrink: 0;
  border-radius: 6px;
}

.compat-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.compat-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compat-company {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compat-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.compat-badge.native {
  background: rgba(37, 73, 232, 0.08);
  color: var(--green);
}

.compat-note {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.5;
}

/* ── Setup Modal ────────────────────────────────────── */

.setup-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.setup-modal-overlay.open {
  display: flex;
}

.setup-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.setup-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.setup-modal-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.setup-modal-title-row img {
  border-radius: 8px;
}

.setup-modal-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.setup-modal-company {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.setup-modal-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.setup-modal-close:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.setup-modal-body {
  padding: 20px 24px 24px;
}

.setup-modal-body .mcp-config-hint {
  margin-bottom: 16px;
}

/* ── Integrate Cards ─────────────────────────────────── */

.integrate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.integrate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}

.integrate-card:hover {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    0 4px 24px rgba(37, 73, 232, 0.06);
  transform: translateY(-2px);
}

.integrate-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 12px;
  margin-bottom: 16px;
}

.integrate-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.integrate-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.integrate-card-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.integrate-modal {
  max-width: 680px;
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 900px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    flex-direction: column;
    gap: 12px;
  }
  .step-connector {
    transform: rotate(90deg);
    width: auto;
    height: 24px;
  }
  .profile-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .carousel-track .compat-card {
    flex: 0 0 calc(33.333% - 7px);
  }
}

@media (max-width: 640px) {
  .mobile-menu-btn {
    display: flex;
  }

  nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(22, 42, 140, 0.98);
    border-bottom: 1px solid rgba(30, 58, 180, 0.15);
    flex-direction: column;
    padding: 8px 16px 12px;
    gap: 2px;
  }

  nav.open {
    display: flex;
  }

  .tab {
    text-align: left;
    padding: 10px 14px;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .hero {
    padding: 48px 0 28px;
  }
  .hero-title {
    font-size: 36px;
    letter-spacing: 3px;
  }
  .hero-desc {
    font-size: 15px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-search {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }
  .hero-search-icon {
    display: none;
  }
  .hero-search-btn {
    width: 100%;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .live-stats-bar {
    gap: 24px;
    flex-wrap: wrap;
  }
  .live-stat-value {
    font-size: 24px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .job-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .jobs-network-wrap canvas {
    height: 240px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .footer-meta {
    justify-content: center;
  }

  .lookup-row {
    flex-direction: column;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .api-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .api-desc {
    margin-left: 0;
    font-size: 12px;
  }

  .profile-header-main {
    flex-direction: column;
    text-align: center;
  }
  .profile-meta {
    justify-content: center;
    flex-wrap: wrap;
  }
  .profile-stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .profile-details-grid {
    grid-template-columns: 1fr;
  }

  .browse-header {
    flex-direction: column;
    gap: 4px;
  }
  .controls {
    flex-direction: column;
  }
  .filter-group {
    width: 100%;
    justify-content: space-between;
  }

  .carousel-track .compat-card {
    flex: 0 0 calc(50% - 5px);
  }
  .carousel-btn {
    display: none;
  }
}

/* ── Wallet Connection ─────────────────────────────────────── */

.wallet-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.wallet-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: 13px;
}

.wallet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wallet-dot-connected {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.wallet-dot-disconnected {
  background: #666;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  transition: border-color 0.15s;
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.wallet-prompt {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

/* ── Registration Form ─────────────────────────────────────── */

.register-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.register-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
}

.register-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-counter {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.form-hint {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-family: "IBM Plex Mono", monospace;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  transition: all 0.15s ease;
}
.info-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 255, 100, 0.05);
}

.info-panel {
  margin-top: 10px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.info-panel p {
  margin: 0 0 10px;
}
.info-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}
.info-panel-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.info-panel-close:hover {
  color: var(--text);
}
.info-panel-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.info-panel-section strong {
  color: var(--text);
  font-size: 13px;
}
.info-panel-section p {
  margin: 6px 0;
}
.info-panel-section ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.info-panel-section li {
  margin-bottom: 4px;
  font-size: 12px;
}

.info-prompt-box {
  margin-top: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.info-prompt-box pre {
  padding: 12px;
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 200px;
  overflow-y: auto;
}
.info-prompt-box .btn {
  display: block;
  width: 100%;
  border-radius: 0;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 8px;
  font-size: 12px;
}

.textarea {
  resize: vertical;
  min-height: 72px;
}

.btn-full {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  margin-top: 8px;
}

.form-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 13px;
}

.form-success {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(37, 73, 232, 0.08);
  border: 1px solid rgba(37, 73, 232, 0.2);
  border-radius: 6px;
  color: var(--primary);
  font-size: 13px;
}

/* ── Delivery Mode Toggle ─────────────────────────────────── */

.delivery-mode-toggle {
  display: flex;
  gap: 12px;
}

.delivery-option {
  flex: 1;
  cursor: pointer;
}

.delivery-option input[type="radio"] {
  display: none;
}

.delivery-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.delivery-card strong {
  font-size: 13px;
}

.delivery-card span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.delivery-option input[type="radio"]:checked + .delivery-card {
  border-color: var(--primary);
  background: rgba(37, 73, 232, 0.06);
}

/* ── WebSocket Token Display ──────────────────────────────── */

.ws-token-card {
  margin-top: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--primary);
  border-radius: 10px;
}

.ws-token-card h4 {
  font-size: 14px;
  margin: 0 0 12px;
  color: var(--primary);
}

.ws-token-field {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ws-token-field input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
}

.ws-token-field .btn {
  flex-shrink: 0;
}

.ws-starter-code {
  margin-top: 12px;
}

.ws-starter-code summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.ws-starter-code pre {
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .delivery-mode-toggle {
    flex-direction: column;
  }
  .integrate-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Image Dropzone ────────────────────────────────────────── */

.image-dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  position: relative;
}

.image-dropzone:hover,
.image-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(37, 73, 232, 0.04);
}

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.image-placeholder svg {
  opacity: 0.5;
}

.image-hint {
  font-size: 11px;
  opacity: 0.7;
}

.image-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.image-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.image-remove-btn:hover {
  color: #ef4444;
  border-color: #ef4444;
}

/* ── 8004 Badges ───────────────────────────────────────────── */

.badge-8004 {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
}

.badge-pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
}

/* ── Utility Classes (inline style replacements) ────────── */

/* ── Skeleton Loading ────────────────────────────────────── */

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 0.08;
  }
  50% {
    opacity: 0.16;
  }
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
  border-radius: 4px;
  background: var(--accent);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-name {
  width: 120px;
  height: 14px;
  margin-bottom: 6px;
}
.skeleton-price {
  width: 80px;
  height: 12px;
}
.skeleton-desc {
  width: 100%;
  height: 12px;
  margin-top: 12px;
}
.skeleton-desc-short {
  width: 65%;
  height: 12px;
  margin-top: 8px;
}
.skeleton-tag {
  width: 60px;
  height: 22px;
  border-radius: 12px;
  display: inline-block;
}

.agent-lookup-desc {
  margin-top: 24px;
}
.mcp-page-title {
  margin-bottom: 8px;
}
.mcp-clients-heading {
  text-align: center;
  font-size: 20px;
  margin-bottom: 6px;
}
.code-section--flush {
  margin: 0;
}
.form-desc--spaced {
  margin-bottom: 16px;
}

/* ── Chat Wallet Bar ── */

.chat-wallet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.chat-wallet-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.chat-wallet-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-wallet-balance {
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--mono);
}

.chat-key-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.chat-key-form .form-input {
  flex: 1;
  font-size: 13px;
  padding: 8px 10px;
  font-family: var(--mono);
}

/* ── Chat Layout ── */

.chat-layout {
  display: flex;
  height: calc(100vh - 180px);
  min-height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}

.chat-sidebar {
  width: 280px;
  min-width: 280px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

.chat-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.chat-sidebar-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.chat-new-form {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-new-form .form-input {
  font-size: 13px;
  padding: 8px 10px;
}

/* Custom Agent Selector Dropdown */
.agent-select-custom {
  position: relative;
}

.agent-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
}

.agent-select-trigger:hover {
  border-color: var(--accent);
}

.agent-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.agent-select-dropdown.open {
  display: block;
}

.agent-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.agent-select-option:hover {
  background: rgba(37, 73, 232, 0.1);
}

.agent-select-option:first-child {
  border-radius: 10px 10px 0 0;
}

.agent-select-option:last-child {
  border-radius: 0 0 10px 10px;
}

.agent-select-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.agent-select-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.agent-select-info {
  flex: 1;
  min-width: 0;
}

.agent-select-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.agent-select-price {
  font-size: 11px;
  color: var(--text-secondary);
}

.chat-session-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-session-item {
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 4px;
  transition: background 0.15s;
}

.chat-session-item:hover {
  background: var(--accent-glow);
}

.chat-session-item.active {
  background: var(--accent-glow-strong);
  border-left: 3px solid var(--accent);
}

.chat-session-item-id,
.chat-session-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-session-item-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.chat-session-status {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.chat-session-status.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}

.chat-session-status.closed {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-secondary);
}

.chat-session-status.expired {
  background: rgba(234, 179, 8, 0.1);
  color: var(--yellow);
}

.chat-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

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

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.chat-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  font-size: 14px;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  min-width: 0;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.agent {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* Markdown inside agent bubbles */
.chat-bubble.agent h1,
.chat-bubble.agent h2,
.chat-bubble.agent h3 {
  margin: 12px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.chat-bubble.agent h1 {
  font-size: 17px;
}
.chat-bubble.agent h2 {
  font-size: 15px;
}
.chat-bubble.agent h3 {
  font-size: 14px;
}

.chat-bubble.agent p {
  margin: 6px 0;
}

.chat-bubble.agent pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.4;
  margin: 8px 0;
}

.chat-bubble.agent code {
  font-family: var(--font-mono);
  font-size: 12px;
}

.chat-bubble.agent :not(pre) > code {
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.chat-bubble.agent ul,
.chat-bubble.agent ol {
  margin: 6px 0;
  padding-left: 20px;
}

.chat-bubble.agent li {
  margin: 3px 0;
}

.chat-bubble.agent table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
  font-size: 12px;
}

.chat-bubble.agent th,
.chat-bubble.agent td {
  border: 1px solid var(--border);
  padding: 4px 8px;
  text-align: left;
}

.chat-bubble.agent th {
  background: var(--bg);
  font-weight: 600;
}

.chat-bubble.agent strong {
  font-weight: 700;
}

.chat-bubble.agent hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

.chat-bubble-meta {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Input Required — agent is asking a question */
.chat-bubble.agent.input-required {
  border-color: var(--accent);
  border-left: 3px solid var(--accent);
  background: rgba(37, 73, 232, 0.04);
}

.chat-input-required-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 6px;
}

.chat-input-area {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  width: 100%;
}

.chat-input-area .form-input {
  flex: 1;
  resize: vertical;
  min-height: 42px;
  max-height: 200px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
}

/* Attach button */
.chat-attach-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s;
  flex-shrink: 0;
}
.chat-attach-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Attachment preview */
.chat-attachment-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.chat-attachment-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  font-size: 18px;
  flex-shrink: 0;
}
.chat-attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-attachment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-attachment-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-attachment-size {
  font-size: 11px;
  color: var(--text-dim);
}

.chat-attachment-remove {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.chat-attachment-remove:hover {
  color: var(--red);
}

.chat-attachment-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bg-input);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.chat-attachment-progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
  width: 0%;
}

/* Payment bar */
.chat-payment-bar {
  align-self: flex-start;
  max-width: 90%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 13px;
}

.chat-payment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-payment-amount {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-payment-dynamic {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 1px 5px;
  border-radius: 3px;
}

.chat-payment-detail {
  font-size: 11px;
  color: var(--text-dim);
}

/* Payment method selector */
.chat-payment-method {
  flex-shrink: 0;
}
.chat-payment-method-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 24px 4px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: border-color 0.15s;
}
.chat-payment-method-select:hover {
  border-color: var(--accent);
}
.chat-payment-method-select:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-payment-btn {
  padding: 4px 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.chat-payment-btn:hover {
  background: var(--accent-hover);
}

.chat-payment-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-payment-bar.processing {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.chat-payment-bar.paid {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

/* File attachment bubble */
/* Review prompt */
.chat-review-prompt {
  text-align: center;
  padding: 16px !important;
  border-color: var(--accent) !important;
  background: rgba(37, 73, 232, 0.04) !important;
}

.review-prompt-title {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 13px;
}

.review-stars-select {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.review-star {
  font-size: 28px;
  color: rgba(255, 215, 0, 0.25);
  cursor: pointer;
  transition:
    color 0.15s,
    transform 0.15s;
}

.review-star:hover,
.review-star.selected {
  color: #ffd700;
  transform: scale(1.15);
}

.review-comment {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  resize: none;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.review-comment::placeholder {
  color: var(--text-dim);
}

.review-submit-btn {
  font-size: 12px;
  padding: 6px 16px;
}

.review-submit-btn:disabled {
  opacity: 0.5;
}

.review-status {
  margin-top: 6px;
  font-size: 11px;
}

.review-status a {
  color: var(--accent);
  text-decoration: none;
}

.chat-file-bubble {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 14px !important;
}

.chat-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.chat-file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chat-file-name {
  font-weight: 500;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-size {
  font-size: 0.7rem;
  opacity: 0.7;
}

.chat-payment-bar.failed {
  border-color: #ef4444;
}

.chat-payment-status.paid {
  color: #10b981;
  font-weight: 600;
}

.chat-payment-tx {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
}

.chat-payment-tx:hover {
  color: var(--accent);
}

.chat-payment-error {
  color: #ef4444;
  font-size: 11px;
  margin-left: 4px;
}

/* Typing indicator */
.chat-typing-indicator {
  align-self: flex-start;
  padding: 8px 14px;
  color: var(--text-dim);
  font-size: 13px;
  font-style: italic;
}

.chat-typing-indicator .dots span {
  animation: dotPulse 1.4s infinite;
  opacity: 0.3;
}

.chat-typing-indicator .dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing-indicator .dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}

.chat-bubble.streaming {
  min-height: 36px;
}

/* Agent info header */
.chat-agent-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.chat-agent-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-agent-header-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.chat-agent-header-price {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-glow);
  padding: 2px 8px;
  border-radius: 4px;
}

.chat-agent-header-top .btn {
  margin-left: auto;
}

.chat-agent-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chat-agent-skill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  text-transform: lowercase;
}

/* Welcome area */
.chat-agent-welcome {
  max-width: 520px;
  margin: 40px auto;
  text-align: center;
  padding: 24px;
}

.chat-agent-welcome-desc {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.chat-agent-example {
  display: inline-block;
  cursor: pointer;
  padding: 10px 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.chat-agent-example:hover {
  border-color: var(--accent);
  color: var(--text);
}

.chat-agent-example-label {
  color: var(--accent);
  font-weight: 600;
  margin-right: 4px;
}

@media (max-width: 768px) {
  .chat-layout {
    flex-direction: column;
    height: calc(100vh - 80px);
  }
  .chat-sidebar {
    width: 100%;
    min-width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* ── Toast Notifications ───────────────────────────────────────── */

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  pointer-events: auto;
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
  font-size: 13px;
  line-height: 1.5;
  min-width: 320px;
}

.toast.toast-visible {
  transform: translateX(0);
  opacity: 1;
}

.toast.toast-exit {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
}

.toast-accent {
  width: 4px;
  flex-shrink: 0;
  align-self: stretch;
}

.toast-success .toast-accent {
  background: var(--green);
}
.toast-error .toast-accent {
  background: var(--red);
}
.toast-warning .toast-accent {
  background: var(--yellow);
}
.toast-info .toast-accent {
  background: var(--accent);
}

.toast-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  flex: 1;
  min-width: 0;
}

.toast-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-top: 1px;
}

.toast-success .toast-icon {
  color: var(--green);
}
.toast-error .toast-icon {
  color: var(--red);
}
.toast-warning .toast-icon {
  color: var(--yellow);
}
.toast-info .toast-icon {
  color: var(--accent);
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.toast-message {
  color: var(--text-secondary);
  word-break: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 12px 12px 12px 4px;
  font-size: 16px;
  line-height: 1;
  transition: color 0.15s ease;
}

.toast-close:hover {
  color: var(--text);
}

@media (max-width: 480px) {
  .toast-container {
    top: 8px;
    right: 8px;
    left: 8px;
    max-width: none;
  }
  .toast {
    min-width: 0;
    width: 100%;
  }
}

/* ── Ticker Bar ──────────────────────────────────────────── */

/* ── Dolphin Video ── */
#dolphin-container {
  width: 320px;
  height: 230px;
  position: relative;
  overflow: visible;
  margin: 0;
  margin-left: auto;
  margin-right: auto;
  flex-shrink: 0;
  top: 35px;
  z-index: 10;
}

#dolphin-video {
  width: 320px;
  height: 230px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 768px) {
  #dolphin-container {
    width: 140px;
    height: 100px;
    top: 5px;
  }
  #dolphin-video {
    width: 140px;
    height: 100px;
  }
}

.ticker-bar {
  position: sticky;
  top: 0;
  z-index: 99;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: 36px;
  overflow: hidden;
  margin-top: 0;
}

.ticker-track {
  height: 100%;
  overflow: hidden;
}

.ticker-scroll {
  display: flex;
  gap: 0;
  height: 100%;
  width: max-content;
  animation: ticker-scroll 40s linear infinite;
}

.ticker-bar:hover .ticker-scroll {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  height: 36px;
  white-space: nowrap;
  font-size: 0.75rem;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.15s;
}
.ticker-item:hover {
  color: #fff;
}

.ticker-rank {
  font-weight: 600;
  color: #fff;
  font-size: 0.7rem;
}

.ticker-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ticker-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.ticker-name {
  font-weight: 600;
  color: #fff;
}

.ticker-stars {
  font-size: 0.65rem;
  color: #ffd700;
  letter-spacing: -1px;
}

.stars-full {
  color: #ffd700;
}

.star-half {
  display: inline-block;
  width: 0.5em;
  overflow: hidden;
  vertical-align: top;
  color: #ffd700;
}

.stars-empty {
  color: rgba(255, 215, 0, 0.2);
}

.ticker-score {
  font-size: 0.7rem;
  font-weight: 600;
  color: #ffd700;
}

.ticker-jobs {
  font-size: 0.65rem;
  color: #fff;
}

/* ── Verified / Revoked Badges ───────────────────────────── */

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--green);
}

.revoked-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--red);
  padding: 1px 6px;
  border: 1px solid var(--red);
  border-radius: 4px;
}

.verified-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--green);
  margin-left: 8px;
}

.rating-revoked {
  opacity: 0.6;
}
.revoked-text {
  text-decoration: line-through;
}

.agent-response {
  margin-top: 8px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.agent-response-label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.75rem;
  display: block;
  margin-bottom: 4px;
}

.rating-action-btn {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 2px 8px;
}

.respond-form {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.respond-input {
  flex: 1;
  min-height: 36px;
  font-size: 0.8rem;
}

/* ── Leaderboard ─────────────────────────────────────────── */

.leaderboard-section {
  margin: 16px 0 0;
}

.leaderboard-wrapper {
  position: relative;
  margin-top: 12px;
}

.leaderboard-cards {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 4px;
}
.leaderboard-cards::-webkit-scrollbar {
  display: none;
}

.leaderboard-card {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 260px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  position: relative;
}
.leaderboard-card:hover {
  transform: translateY(-2px);
}

.leaderboard-rank {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

.leaderboard-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leaderboard-name {
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.leaderboard-stars {
  font-size: 0.8rem;
  color: #ffd700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.leaderboard-rating-text {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.leaderboard-stats {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.leaderboard-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.leaderboard-wrapper:hover .leaderboard-arrow {
  opacity: 1;
}
.leaderboard-prev {
  left: -14px;
}
.leaderboard-next {
  right: -14px;
}

/* ── Collection Stats Pills ──────────────────────────────── */

.collection-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* ── Browse Divider ──────────────────────────────────────── */

.browse-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0 16px;
}

/* ── Owner Actions ───────────────────────────────────────── */

.owner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Endpoint Input Row ──────────────────────────────────── */

.endpoint-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.endpoint-input-row .input {
  flex: 1;
}

/* ── Modal Active State ──────────────────────────────────── */

.setup-modal-overlay.active {
  display: flex;
}

@media (max-width: 640px) {
  .ticker-bar {
    height: 32px;
  }
  .ticker-item {
    padding: 0 12px;
    font-size: 0.7rem;
    height: 32px;
  }
  .leaderboard-card {
    width: 220px;
  }
  .collection-stats {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════
   JOBS + MY AGENT OVERHAUL
   ═══════════════════════════════════════════════════════════ */

/* ── Jobs Page Header ──────────────────────────────────────── */

.jobs-page-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.jobs-total-count {
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--mono);
}

/* ── Jobs Filters ──────────────────────────────────────────── */

.jobs-filters {
  margin-bottom: 20px;
}

.jobs-filter-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.jobs-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.jobs-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.jobs-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 14px 9px 34px;
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  font-family: inherit;
}

.jobs-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 255, 100, 0.06);
}

.jobs-search-input::placeholder {
  color: var(--text-dim);
}

/* ── Custom Select ─────────────────────────────────────────── */

.custom-select {
  position: relative;
  min-width: 160px;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  text-align: left;
}

.custom-select-trigger:hover {
  border-color: var(--border-hover);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 255, 100, 0.06);
}

.custom-select-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.custom-select.open .custom-select-chevron {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.15s,
    transform 0.15s,
    visibility 0.15s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  max-height: 240px;
  overflow-y: auto;
}

.custom-select.open .custom-select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s;
}

.custom-select-option:hover {
  background: rgba(255, 255, 255, 0.04);
}

.custom-select-option.selected {
  color: var(--accent);
  font-weight: 500;
}

/* ── Status Dots (small, for dropdowns) ────────────────────── */

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot-completed {
  background: #22c55e;
}
.status-dot-pending {
  background: #eab308;
}
.status-dot-failed {
  background: #ef4444;
}
.status-dot-cancelled {
  background: #6b7280;
}
.status-dot-input-required {
  background: #3b82f6;
}

/* ── Jobs Table ────────────────────────────────────────────── */

.jobs-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.jobs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.jobs-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--bg);
}

.jobs-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}

.jobs-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.jobs-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.jobs-th-id {
  width: 60px;
}
.jobs-th-amount {
  width: 110px;
}
.jobs-th-status {
  width: 130px;
}
.jobs-th-time {
  width: 110px;
}
.jobs-th-type {
  width: 140px;
}

.job-id-cell {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.job-type-cell {
  font-size: 12px;
  color: var(--text-secondary);
}

.job-type-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  font-family: var(--mono);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.job-type-badge-session {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.job-type-badge-quoted {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.job-parties-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-buyer-name,
.job-seller-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-buyer-name {
  color: var(--text-dim);
  font-size: 11px;
}

.job-seller-name {
  color: var(--text);
  font-weight: 500;
}

.job-arrow {
  color: var(--text-dim);
  font-size: 10px;
  margin: 0 2px;
}

.job-amount-cell {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.job-amount-usd {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 11px;
  margin-left: 2px;
}

.job-time-cell {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ── Status Pill Badges ────────────────────────────────────── */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.status-pill-completed {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-pill-created,
.status-pill-pending {
  background: rgba(234, 179, 8, 0.1);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.status-pill-failed,
.status-pill-disputed {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-pill-cancelled {
  background: rgba(107, 114, 128, 0.1);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.2);
}

.status-pill-input-required {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pill-completed .status-pill-dot {
  background: #4ade80;
}
.status-pill-created .status-pill-dot,
.status-pill-pending .status-pill-dot {
  background: #facc15;
}
.status-pill-failed .status-pill-dot,
.status-pill-disputed .status-pill-dot {
  background: #f87171;
}
.status-pill-cancelled .status-pill-dot {
  background: #9ca3af;
}
.status-pill-input-required .status-pill-dot {
  background: #60a5fa;
}

/* ── Jobs Empty State ──────────────────────────────────────── */

.jobs-empty {
  text-align: center;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.jobs-empty svg {
  opacity: 0.3;
}

.jobs-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.jobs-empty-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
  max-width: 360px;
}

/* ── Pagination ────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
  padding: 16px 0;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    opacity 0.15s;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(0, 255, 100, 0.03);
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-pages {
  display: flex;
  gap: 2px;
}

.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
  font-family: var(--mono);
  cursor: pointer;
  transition: all 0.15s;
}

.pagination-page:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.pagination-page.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border-color: var(--accent);
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ── Job Detail Modal ──────────────────────────────────────── */

.job-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.job-modal-overlay.active {
  display: flex;
}

.job-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.job-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.job-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.job-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

.job-modal-close:hover {
  color: var(--text);
}

.job-modal-body {
  padding: 24px;
}

.job-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.job-detail-row:last-child {
  border-bottom: none;
}

.job-detail-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  min-width: 120px;
}

.job-detail-value {
  font-size: 13px;
  color: var(--text);
  text-align: right;
  word-break: break-all;
  font-family: var(--mono);
}

/* ── Skills Chip Input ─────────────────────────────────────── */

.skills-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 42px;
  align-items: center;
  cursor: text;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.skills-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 255, 100, 0.06);
}

.skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 10px;
  background: rgba(37, 73, 232, 0.1);
  border: 1px solid rgba(37, 73, 232, 0.2);
  border-radius: 14px;
  font-size: 12px;
  color: var(--text);
  animation: chipIn 0.15s ease;
}

@keyframes chipIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.skill-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition:
    background 0.12s,
    color 0.12s;
}

.skill-chip-remove:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.skills-text-input {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  padding: 2px 0;
  font-family: inherit;
}

.skills-text-input::placeholder {
  color: var(--text-dim);
}

/* ── Improved Wallet Balance Display ───────────────────────── */

.wallet-balance-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
}

.wallet-balance-label {
  color: var(--muted);
}

.wallet-balance-amounts {
  display: flex;
  gap: 16px;
  align-items: center;
}

.wallet-balance-item {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.wallet-balance-item .balance-currency {
  font-weight: 400;
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 3px;
}

/* ── Agent Dashboard Stats ─────────────────────────────────── */

.agent-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.agent-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.agent-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
  margin-bottom: 4px;
}

.agent-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Responsive Overrides ──────────────────────────────────── */

@media (max-width: 768px) {
  .jobs-filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .jobs-search-wrap {
    max-width: 100%;
  }

  .custom-select {
    min-width: 100%;
  }

  .jobs-table thead {
    display: none;
  }
  .jobs-table,
  .jobs-table tbody,
  .jobs-table tr,
  .jobs-table td {
    display: block;
  }
  .jobs-table tbody tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    position: relative;
  }
  .jobs-table tbody td {
    padding: 3px 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .jobs-table tbody td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 80px;
  }

  .agent-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pagination {
    flex-wrap: wrap;
  }
}

/* ═══════════════════════════════════════════════════════════
   HOME + AGENTS UI OVERHAUL
   ═══════════════════════════════════════════════════════════ */

/* ── Scroll Reveal Animations ────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside feature grids */
.features.reveal .feature-card {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}
.features.revealed .feature-card {
  opacity: 1;
  transform: translateY(0);
}
.features.revealed .feature-card:nth-child(1) {
  transition-delay: 0s;
}
.features.revealed .feature-card:nth-child(2) {
  transition-delay: 0.06s;
}
.features.revealed .feature-card:nth-child(3) {
  transition-delay: 0.12s;
}
.features.revealed .feature-card:nth-child(4) {
  transition-delay: 0.18s;
}
.features.revealed .feature-card:nth-child(5) {
  transition-delay: 0.24s;
}
.features.revealed .feature-card:nth-child(6) {
  transition-delay: 0.3s;
}

/* ── Live Stats — fintech card feel ──────────────────────── */

.live-stats-bar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px 32px;
  border-top: none;
  border-bottom: none;
}

.live-stat-value {
  background: linear-gradient(135deg, var(--accent) 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Leaderboard Tier Glow ───────────────────────────────── */

.leaderboard-card[data-tier="Platinum"] {
  border-color: rgba(168, 162, 232, 0.35);
  box-shadow: 0 0 16px rgba(168, 162, 232, 0.1);
}
.leaderboard-card[data-tier="Platinum"]:hover {
  box-shadow: 0 4px 24px rgba(168, 162, 232, 0.2);
}

.leaderboard-card[data-tier="Gold"] {
  border-color: rgba(234, 179, 8, 0.3);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.08);
}
.leaderboard-card[data-tier="Gold"]:hover {
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.15);
}

.leaderboard-card[data-tier="Silver"] {
  border-color: rgba(192, 192, 192, 0.25);
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.06);
}
.leaderboard-card[data-tier="Silver"]:hover {
  box-shadow: 0 4px 16px rgba(192, 192, 192, 0.12);
}

.leaderboard-card[data-tier="Bronze"] {
  border-color: rgba(205, 127, 50, 0.25);
}
.leaderboard-card[data-tier="Bronze"]:hover {
  box-shadow: 0 4px 16px rgba(205, 127, 50, 0.1);
}

/* ── Button hover improvements ───────────────────────────── */

.btn {
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 73, 232, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(37, 73, 232, 0.04);
}

.btn-large {
  transition: all 0.25s ease;
}

.btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 73, 232, 0.15);
}

/* ── Agent card hover refinement ─────────────────────────── */

.agent-card {
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.agent-card:hover {
  border-color: rgba(37, 73, 232, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ── Feature card hover ──────────────────────────────────── */

.feature-card {
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
}

/* ── Ecosystem card hover ────────────────────────────────── */

.ecosystem-card {
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.ecosystem-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

/* ── Browse section custom dropdown fixes for light theme ── */

#tab-browse .custom-select-dropdown {
  background: var(--bg-elevated);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

#tab-browse .custom-select-option:hover {
  background: var(--accent-glow);
}

/* ── Mobile responsive tweaks for new components ─────────── */

@media (max-width: 640px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .filter-group .custom-select {
    min-width: 100%;
  }

  .live-stats-bar {
    gap: 24px;
    padding: 20px 16px;
    flex-wrap: wrap;
  }
}

/* ═══════════════════════════════════════════════════════════
   TRANSACTION PROPOSALS, NOTIFICATIONS, RECURRING, MANDATES, HEALTH
   ═══════════════════════════════════════════════════════════ */

/* ── Header Actions (bell icon area) ─────────────────────── */

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

.notif-bell {
  position: relative;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition:
    color 0.2s,
    background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-bell:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.notif-bell:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: var(--mono);
  line-height: 1;
}

/* ── Notification Panel ──────────────────────────────────── */

.notif-panel {
  position: fixed;
  top: 56px;
  right: 24px;
  width: 380px;
  max-height: 500px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  z-index: 200;
  overflow: hidden;
  animation: notifSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes notifSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-panel-title {
  font-size: 14px;
  font-weight: 600;
}
.notif-mark-read {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.notif-mark-read:hover {
  text-decoration: underline;
}

.notif-panel-list {
  max-height: 440px;
  overflow-y: auto;
  padding: 4px 0;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background: var(--accent-glow);
}
.notif-item.unread {
  background: rgba(37, 73, 232, 0.04);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-dot-green {
  background: var(--green);
}
.notif-dot-gold {
  background: var(--yellow);
}
.notif-dot-red {
  background: var(--red);
}
.notif-dot-blue {
  background: var(--accent);
}

.notif-content {
  flex: 1;
  min-width: 0;
}
.notif-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-desc {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 32px 16px;
  font-size: 13px;
}

/* ── Transaction Proposal Card (inline in chat) ──────────── */

.tx-proposal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 8px 0;
  max-width: 420px;
}
.tx-proposal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.tx-proposal-header svg {
  color: var(--accent);
  flex-shrink: 0;
}
.tx-proposal-header span {
  font-size: 14px;
  font-weight: 600;
}
.tx-proposal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}
.tx-proposal-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--bg-input);
  border-radius: 8px;
}
.tx-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tx-detail-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tx-detail-value {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--mono);
}
.tx-proposal-actions {
  display: flex;
  gap: 8px;
}
.tx-proposal-actions .btn {
  flex: 1;
}
.btn-reject {
  background: none;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-reject:hover {
  background: rgba(239, 68, 68, 0.08);
}
.btn-reject:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.tx-proposal.approved {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.04);
}
.tx-proposal.rejected {
  opacity: 0.6;
  border-color: var(--text-dim);
}

/* ── Recurring Task Bar ──────────────────────────────────── */

.recurring-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(37, 73, 232, 0.06);
  border: 1px solid rgba(37, 73, 232, 0.15);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.recurring-bar svg {
  color: var(--accent);
  flex-shrink: 0;
}
.recurring-bar-text {
  font-weight: 500;
}
.recurring-bar-budget {
  font-family: var(--mono);
  color: var(--accent);
  margin-left: auto;
}
.recurring-stop {
  border-color: var(--red) !important;
  color: var(--red) !important;
}

/* ── Schedule Popover ────────────────────────────────────── */

.chat-schedule-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition:
    color 0.2s,
    background 0.2s;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.chat-schedule-btn:hover {
  color: var(--accent);
  background: var(--accent-glow);
}
.chat-schedule-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.schedule-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 50;
  animation: notifSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.schedule-popover-header {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.schedule-popover .form-label-sm {
  font-size: 11px;
  margin-bottom: 4px;
  margin-top: 10px;
  display: block;
}
.schedule-popover .input {
  margin-bottom: 4px;
}

/* ── Mandates Section ────────────────────────────────────── */

.mandates-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.mandates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.mandates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.mandate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color 0.2s;
}
.mandate-card:hover {
  border-color: var(--border-hover);
}
.mandate-card.revoked {
  opacity: 0.5;
}

.mandate-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.mandate-card-header .agent-avatar {
  width: 32px;
  height: 32px;
}
.mandate-agent-name {
  font-weight: 600;
  font-size: 14px;
}
.mandate-revoked-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

.mandate-budget-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.mandate-budget-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.mandate-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.mandate-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mandate-card .btn {
  width: 100%;
}

/* ── Mandate Modal ───────────────────────────────────────── */

.mandate-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.mandate-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.2s ease;
}
.mandate-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.mandate-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}
.mandate-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}
.mandate-modal-close:hover {
  color: var(--text);
}
.mandate-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mandate-modal-body .form-label {
  margin-top: 8px;
}
.mandate-modal-body .input {
  margin-bottom: 4px;
}

.mandate-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}

/* ── Agent Health Stats (in profile) ─────────────────────── */

.health-section {
  margin-top: 16px;
}
.health-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.health-stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.health-stat-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--mono);
  display: block;
  margin-bottom: 2px;
}
.health-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.health-up {
  color: var(--green);
}
.health-warn {
  color: var(--yellow);
}
.health-down {
  color: var(--red);
}

.health-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 32px;
  padding: 0 4px;
}
.health-sparkline-bar {
  flex: 1;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
  opacity: 0.7;
}
.health-sparkline-bar:hover {
  opacity: 1;
}

.health-offline-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--red);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* ── Mandate Agent Option (avatar + name + price) ────────── */

.mandate-agent-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.mandate-agent-option img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.mandate-agent-option-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #60a5fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.mandate-agent-option-name {
  flex: 1;
  font-size: 13px;
}
.mandate-agent-option-price {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
}

/* ── Mobile Responsive for new components ────────────────── */

@media (max-width: 640px) {
  .notif-panel {
    right: 8px;
    left: 8px;
    width: auto;
  }
  .health-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mandates-grid {
    grid-template-columns: 1fr;
  }
  .mandate-modal {
    max-width: 100%;
    margin: 8px;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
  }
  .tx-proposal {
    max-width: 100%;
  }
  .schedule-popover {
    right: 0;
    left: 0;
    width: auto;
  }
}

/* ── Hire Options Modal ── */
.hire-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.hire-modal {
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 16px;
  width: 420px;
  max-width: 90vw;
  overflow: hidden;
}
.hire-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #333;
}
.hire-modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #fff;
}
.hire-modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.hire-modal-close:hover {
  color: #fff;
}
.hire-modal-options {
  padding: 8px;
}
.hire-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.hire-option:hover {
  background: rgba(0, 255, 136, 0.06);
  border-color: rgba(0, 255, 136, 0.2);
}
.hire-option-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.hire-option-label {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
  display: block;
}
.hire-option-desc {
  color: #888;
  font-size: 12px;
  display: block;
  margin-top: 2px;
}

/* ── My Agents Header ── */
.myagents-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.myagents-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}
.myagents-subtitle {
  font-size: 13px;
  color: #888;
  margin: 0;
}

/* ── Claim Form ── */
.claim-form {
  margin-bottom: 24px;
}
.claim-form-inner {
  background: linear-gradient(145deg, #0d1b3e, #141432);
  border: 1px solid rgba(68, 102, 170, 0.2);
  border-radius: 16px;
  padding: 24px;
  box-shadow:
    0 8px 32px rgba(0, 20, 60, 0.3),
    inset 0 1px 0 rgba(100, 140, 220, 0.08);
}
.claim-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.claim-form-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.claim-form-close {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.claim-form-close:hover {
  color: #fff;
}
.claim-form-desc {
  font-size: 13px;
  color: #888;
  margin: 0 0 16px;
}
.claim-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.claim-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.claim-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
}
.claim-form-actions {
  display: flex;
  gap: 8px;
}
@media (max-width: 640px) {
  .claim-form-fields {
    grid-template-columns: 1fr;
  }
}

/* ── My Agents Grid ── */
.my-agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.my-agent-card {
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.15s;
}
.my-agent-card:hover {
  border-color: rgba(0, 255, 136, 0.3);
}
.my-agent-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.my-agent-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #16213e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.my-agent-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.my-agent-card-name {
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}
.my-agent-card-email {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.my-agent-card-stats {
  display: flex;
  gap: 20px;
  margin: 12px 0;
  font-size: 13px;
}
.my-agent-card-stat-value {
  font-weight: 600;
  color: #00ff88;
}
.my-agent-card-stat-label {
  color: #888;
  margin-left: 4px;
}
.my-agent-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.my-agent-card-actions .btn {
  font-size: 12px;
  padding: 6px 12px;
}
.my-agent-card-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
  margin-left: 8px;
}

/* Agent Card Hover */
.my-agent-card {
  position: relative;
  overflow: hidden;
}
.my-agent-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.02), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.my-agent-card:hover::before {
  opacity: 1;
}
