/* Alagad tenant portal — "My agents" roster (Layer 1 lite).
   Dark Perplexity-clean skin, cohesive with the chat tab. Brand: gold accent,
   blue links, PH-flag mark. */
:root {
  --ph-blue: #0038A8; --ph-red: #CE1126; --ph-yellow: #FCD116;
  --gold: #c9a227; --gold-soft: rgba(201,162,39,0.16); --link: #3b6cf5;
  --bg-0: #0e1116; --bg-1: #151a22; --bg-2: #1c2430; --bg-3: #243040;
  --border: #26303d; --text-0: #eef2f7; --text-1: #aeb9c7; --text-2: #6b7787;
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --radius: 14px; --radius-sm: 9px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body.alagad-portal {
  font-family: var(--font); background: var(--bg-0); color: var(--text-0);
  min-height: 100vh; font-size: 15px; line-height: 1.6;
}
a { color: var(--link); }

.portal-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--border); background: var(--bg-1);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text-0); }
.brand-mark { width: 30px; height: 30px; flex: none; display: block; }
.brand-text { font-weight: 700; font-size: 18px; letter-spacing: 0.2px; }
.portal-top .who { color: var(--text-1); font-size: 13.5px; display: flex; align-items: center; gap: 14px; }
.portal-top form { display: inline; }
.logout-btn {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text-1);
  border-radius: var(--radius-sm); padding: 7px 12px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.logout-btn:hover { background: var(--bg-3); color: var(--text-0); }

.portal-main { max-width: 860px; margin: 0 auto; padding: 40px 24px; }
.greeting h1 { font-size: 26px; font-weight: 700; }
.greeting p { color: var(--text-2); margin-top: 6px; }

/* ---- Roster ---- */
.roster { margin-top: 30px; }
.roster-head { display: flex; align-items: baseline; justify-content: space-between; }
.roster-head h2 { font-size: 18px; font-weight: 700; }
.roster-count { color: var(--text-2); font-size: 13px; }
.agent-list { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }

.agent-row {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--text-0); transition: border-color .15s, transform .15s, background .15s;
}
.agent-row:hover { border-color: var(--gold); transform: translateY(-1px); background: var(--bg-1); }
.agent-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; color: #0e1116;
  background: linear-gradient(135deg, var(--gold), #e6c350);
}
.agent-row-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.agent-row-meta .name { font-size: 16px; font-weight: 600; }
.agent-row-meta .slug { color: var(--text-2); font-family: ui-monospace, monospace; font-size: 12.5px; margin-top: 1px; }
.agent-open { color: var(--text-2); font-size: 13.5px; font-weight: 600; flex: none; }
.agent-row:hover .agent-open { color: var(--gold); }

/* ---- Status badges (shared look across portal) ---- */
.status-badge {
  flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 3px 10px; border-radius: 999px; background: var(--bg-3); color: var(--text-1);
}
.status-badge.active { background: var(--gold); color: #0e1116; }
.status-badge.degraded { background: #f0a93b; color: #0e1116; }
.status-badge.suspended, .status-badge.failed, .status-badge.destroyed { background: var(--ph-red); color: #fff; }

/* ---- States ---- */
.empty-state {
  margin-top: 28px; background: var(--bg-1); border: 1px solid var(--border);
  border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 26px 24px;
}
.empty-state h2 { font-size: 18px; }
.empty-state p { color: var(--text-1); margin-top: 8px; max-width: 560px; }

@media (max-width: 560px) {
  .portal-main { padding: 28px 16px; }
  .agent-open { display: none; }
}
