/* Control — Dark Trading Terminal Theme */

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #181825;
  --bg-input: #0e0e16;
  --accent: #00ff88;
  --accent-dim: #00ff8833;
  --accent-glow: #00ff8822;
  --secondary: #7b61ff;
  --secondary-dim: #7b61ff33;
  --red: #ff4757;
  --red-dim: #ff475733;
  --yellow: #ffa502;
  --text: #e0e0e0;
  --text-dim: #888;
  --text-muted: #555;
  --border: #1e1e2e;
  --border-accent: #00ff8844;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --transition: 0.2s ease;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* === HEADER / NAV === */
header {
  background: linear-gradient(180deg, #0e0e18 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.logo .ctrl { color: var(--accent); }
.logo .alt { color: var(--secondary); }
.logo .agent { color: var(--text); }

.tagline {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav a {
  color: var(--text-dim);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

nav a:hover, nav a.active {
  color: var(--text);
  background: var(--bg-card);
  opacity: 1;
}

nav a.active { color: var(--accent); }

.btn-create {
  background: linear-gradient(135deg, var(--accent) 0%, #00cc6a 100%);
  color: #000;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-create:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-dim);
}

/* === LAYOUT === */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === CARDS === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* === STATS GRID === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  opacity: 0.5;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.stat-value .unit {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 0.25rem;
}

/* === GRID LAYOUTS === */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.full-width { grid-column: 1 / -1; }

/* === TOKEN LIST === */
.token-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.token-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.token-row:hover {
  border-color: var(--border-accent);
  background: var(--bg-card);
}

.token-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #000;
  flex-shrink: 0;
}

.token-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

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

.token-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-ticker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.token-price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
  min-width: 100px;
}

/* === BONDING PROGRESS BAR === */
.bonding-bar-wrap {
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bonding-bar {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bonding-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  position: relative;
}

.bonding-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  border-radius: 0 4px 4px 0;
}

.bonding-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: right;
}

/* Dynamic gradient colors set via JS */

/* === LEADERBOARD === */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.leaderboard-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.leaderboard-table tr {
  cursor: pointer;
  transition: background var(--transition);
}

.leaderboard-table tbody tr:hover { background: var(--bg-input); }

.rank {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-dim);
  width: 2rem;
}

.rank-1 { color: #ffd700; }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }

.agent-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.agent-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  color: #000;
  flex-shrink: 0;
}

.agent-avatar-sm img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.mono {
  font-family: var(--font-mono);
}

.positive { color: var(--accent); }
.negative { color: var(--red); }

/* === CREATE AGENT VIEW === */
.create-container {
  max-width: 600px;
  margin: 0 auto;
}

.create-container h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.create-container .subtitle {
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-primary {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--accent) 0%, #00cc6a 100%);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-dim);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 0.6rem 1.25rem;
  background: var(--bg-input);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

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

/* === AGENT VIEW === */
.agent-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.agent-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: #000;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

.agent-avatar-lg img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.agent-meta h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.agent-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-model {
  background: var(--secondary-dim);
  color: var(--secondary);
}

.badge-deployer {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-active {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-inactive {
  background: var(--red-dim);
  color: var(--red);
}

.agent-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

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

.agent-stat .label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.agent-stat .value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
}

.agent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* === CHAT INTERFACE === */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.chat-msg {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  animation: msgIn 0.2s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.human {
  align-self: flex-end;
  background: var(--secondary-dim);
  border: 1px solid var(--secondary);
  color: var(--text);
}

.chat-msg.agent {
  align-self: flex-start;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.chat-msg.system {
  align-self: center;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.chat-msg .msg-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.chat-input-row input {
  flex: 1;
  padding: 0.65rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

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

.chat-input-row button {
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
}

.chat-input-row button:hover {
  box-shadow: 0 2px 12px var(--accent-dim);
}

.ws-status {
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.ws-status.connected { color: var(--accent); background: var(--accent-dim); }
.ws-status.disconnected { color: var(--red); background: var(--red-dim); }

/* === PORTFOLIO / HOLDINGS === */
.holdings-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.holding-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.holding-row:hover { background: var(--bg-card-hover); }

.holding-token { font-weight: 600; }
.holding-amount { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-dim); }
.holding-value { font-family: var(--font-mono); font-weight: 600; }

/* === TRADE HISTORY === */
.trade-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.trade-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.trade-side {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.trade-side.buy { color: var(--accent); background: var(--accent-dim); }
.trade-side.sell { color: var(--red); background: var(--red-dim); }

.trade-detail { flex: 1; }
.trade-amount { font-family: var(--font-mono); font-weight: 600; }
.trade-time { font-size: 0.75rem; color: var(--text-muted); }

/* === TOKEN VIEW === */
.token-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.token-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  color: #000;
  flex-shrink: 0;
}

.token-avatar-lg img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.token-meta h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.token-meta .ticker {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.9rem;
}

.token-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

/* === PRICE CHART === */
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* === BONDING CURVE DETAIL === */
.bonding-detail {
  text-align: center;
  padding: 1.5rem;
}

.bonding-ring {
  width: 180px;
  height: 180px;
  margin: 0 auto 1rem;
  position: relative;
}

.bonding-ring canvas {
  width: 100%;
  height: 100%;
}

.bonding-ring-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.bonding-ring-pct {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.bonding-ring-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bonding-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.bonding-stat-item {
  text-align: center;
}

.bonding-stat-item .label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.bonding-stat-item .value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
}

/* === HOLDER DISTRIBUTION === */
.holder-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.holder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

.holder-name {
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.holder-name:hover { color: var(--accent); }

.holder-pct {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.holder-bar {
  width: 60px;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}

.holder-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* === TOKEN INFO / DESCRIPTION === */
.token-description {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.token-thesis {
  background: var(--bg-input);
  border-left: 3px solid var(--secondary);
  padding: 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
}

.token-thesis .label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.35rem;
}

.token-thesis p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* === FUND MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 400px;
  max-width: 90vw;
}

.modal h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.modal .form-group { margin-bottom: 1rem; }

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal-actions .btn-primary { flex: 1; }
.modal-actions .btn-secondary { flex: 0; }

/* === EMPTY STATES === */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.9rem;
}

/* === LOADING === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-muted);
  gap: 0.5rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === GRADUATED BADGE === */
.graduated-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: 1fr; }
  .token-grid { grid-template-columns: 1fr; }
  .agent-stats-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  main { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .header-inner { padding: 0; }
  .tagline { display: none; }
  .agent-stats-row { grid-template-columns: repeat(2, 1fr); }
  .bonding-stats { grid-template-columns: 1fr; }
}
