/* =====================================================================
   avatar.css — M6 UI-REVAMP (Spark 6)
   AGENT AVATAR / PROFILE PRESENTATION — ref-agent-profile-tabs.jpg
   ---------------------------------------------------------------------
   Also resolves R-1: the /avatar.css route existed in server.py's static
   whitelist but the FILE was missing (404 on every load — A-3 audit).
   This staged copy supplies real content; the route needs NO server.py
   change (whitelisted already) — only a <link> in index.html (added) and
   this file dropped into web/ at cutover.
   ---------------------------------------------------------------------
   Styling contract (matches the DOM added to index.html #profile-sheet):
     .ps-avatar-wrap > #ps-avatar   big circular avatar w/ glow ring
     #ps-tabs .ps-tab[data-ptab]    horizontal tabs Profile/Status/Files/Settings
     #ps-rows .ps-row               icon / label / value rows
     .ps-tag (chips), .ps-live (status pill)
     .ps-btn.ps-primary / .ps-btn   primary / outline buttons
   US-theme colors only (per M6 addendum: NOT the ref palettes).
   Additive: base .ps-* rules stay in index.html <style>; this file
   overrides/extends them last-block-wins.
   ===================================================================== */

.ps-card {
  position: relative;                     /* anchor the ✕ close to the card */
  width: min(360px, 92vw);
  padding: 22px 20px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ps-close { z-index: 2; }

/* ---- large circular avatar with glow ring (ref) ---- */
.ps-avatar-wrap {
  display: flex; justify-content: center; margin: 4px 0 10px;
}
.ps-avatar-wrap .ps-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.9);
  box-shadow:
    0 0 0 4px rgba(10,12,22,.85),
    0 0 0 7px var(--aac, rgba(157,78,221,.55)),
    0 0 24px 4px var(--aac-soft, rgba(157,78,221,.45)),
    0 10px 26px rgba(0,0,0,.5);
}
/* profile ring per agent (matches console accents) */
.ps-card.acc-main    { --aac: #9D4EDD; --aac-soft: rgba(157,78,221,.35); }
.ps-card.acc-tia2    { --aac: #F97316; --aac-soft: rgba(249,115,22,.35); }
.ps-card.acc-gauge   { --aac: #22C55E; --aac-soft: rgba(34,197,94,.35); }
.ps-card.acc-ragnar  { --aac: #3B82F6; --aac-soft: rgba(59,130,246,.38); }

/* ---- horizontal tabs (Profile / Status / Files / Settings) ---- */
.ps-tabs {
  display: flex; gap: 2px;
  margin: 10px -4px 12px; padding: 0 4px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.ps-tab {
  flex: 1; min-height: 40px;
  font: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--muted, #9fb0d8);
  background: transparent; border: 0; border-radius: 10px 10px 0 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ps-tab:hover { color: var(--text, #e8eefc); background: rgba(255,255,255,.05); }
.ps-tab.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(157,78,221,.22), rgba(157,78,221,.05));
  box-shadow: inset 0 -2px 0 var(--aac, #9D4EDD);
}

/* ---- icon / value rows ---- */
.ps-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ps-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  font-size: 12.5px;
}
.ps-row-ic {
  flex: 0 0 auto; width: 20px; text-align: center;
  font-size: 13px; opacity: .95;
}
.ps-row-lb {
  flex: 0 0 auto; min-width: 92px;
  color: var(--muted, #9fb0d8); font-weight: 650;
}
.ps-row-vl {
  flex: 1 1 auto; min-width: 0;
  color: var(--text, #e8eefc);
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  overflow-wrap: anywhere;
}
.ps-row.live .ps-row-vl { color: #2DD4BF; }
.ps-tag {
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(157,78,221,.2);
  border: 1px solid rgba(157,78,221,.45);
  color: #e6d9ff;
}
.ps-live {
  font-size: 11px; font-weight: 800; color: #2DD4BF;
  text-shadow: 0 0 8px rgba(45,212,191,.5);
}

/* ---- actions: primary + outline ---- */
.ps-actions { display: flex; gap: 10px; }
.ps-btn {
  flex: 1; min-height: 46px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18);
  background: transparent; color: var(--text, #e8eefc);
  font: inherit; font-size: 13.5px; font-weight: 750; cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
.ps-btn:hover { background: rgba(255,255,255,.08); }
.ps-btn.ps-primary {
  background: linear-gradient(180deg, #5b8df5, #2d5cb8);
  border-color: rgba(120,170,255,.55);
  color: #fff;
  box-shadow: 0 8px 22px rgba(45,92,184,.35);
}
.ps-btn.ps-primary:hover { filter: brightness(1.12); }
.ps-btn:disabled { opacity: .5; cursor: not-allowed; }

/* mobile safe-area breathing room for the sheet */
@media (max-width: 720px) {
  .ps-card {
    margin-top: env(safe-area-inset-top);
    margin-bottom: env(safe-area-inset-bottom);
  }
}