.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
#view-agents{max-width:1120px;margin:0 auto}.agent-dialog-shell{overflow:hidden;border:1px solid #e3d9ee;border-radius:24px;background:linear-gradient(180deg,#fff 0%,#fcfaff 100%);box-shadow:0 24px 70px rgba(58,29,86,.09)}.agent-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:1px solid #eee8f3;background:linear-gradient(115deg,rgba(255,255,255,.98),rgba(248,244,255,.94) 62%,rgba(255,244,234,.92))}.agent-dialog-identity{display:flex;align-items:center;gap:12px}.agent-dialog-identity h2{margin:4px 0 0;font-size:18px}.agent-ai-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:15px;background:linear-gradient(135deg,#6d28d9,#8b5cf6 58%,#f97316);color:#fff;font-size:12px;font-weight:900;box-shadow:0 10px 24px rgba(109,40,217,.22)}.agent-dialog-status{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid #e8e1ee;border-radius:999px;background:#fff;color:#716579;font-size:11px;font-weight:800}.agent-live-dot{width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.13)}.agent-dialog-status.running .agent-live-dot{background:#8b5cf6;box-shadow:0 0 0 3px rgba(139,92,246,.15);animation:agentPulse 1.5s infinite}.agent-dialog-status.error .agent-live-dot{background:#f97316;box-shadow:0 0 0 3px rgba(249,115,22,.15)}@keyframes agentPulse{50%{opacity:.35;transform:scale(.72)}}
.agent-conversation{min-height:270px;max-height:58vh;overflow:auto;padding:24px;display:flex;flex-direction:column;gap:15px;scroll-behavior:smooth}.agent-message-row{display:flex;align-items:flex-start;gap:9px;max-width:88%}.agent-message-row.user{align-self:flex-end;flex-direction:row-reverse}.agent-message-avatar{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:10px;background:linear-gradient(135deg,#6d28d9,#a855f7);color:#fff;font-size:9px;font-weight:900}.agent-message-row.user .agent-message-avatar{background:#f0eafa;color:#6d28d9}.agent-bubble{padding:13px 15px;border:1px solid #e9e2ef;border-radius:8px 18px 18px 18px;background:#fff;color:#403548;font-size:12px;line-height:1.65;box-shadow:0 8px 22px rgba(50,27,72,.045)}.agent-message-row.user .agent-bubble{border-color:#ddd3f0;border-radius:18px 8px 18px 18px;background:linear-gradient(135deg,#f7f2ff,#fff8f2)}.agent-bubble strong{color:#261b30}.agent-bubble-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:10px}.agent-bubble-heading h3{margin:0;font-size:13px}.agent-bubble-heading p{margin:3px 0 0;color:#817589;font-size:10.5px}.agent-summary-chips,.agent-choice-grid,.agent-plan-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.agent-summary-chip{padding:4px 8px;border-radius:999px;background:#f1eafa;color:#6d28d9;font-size:9.5px;font-weight:800}.agent-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.agent-choice{position:relative;padding:11px;border:1px solid #e7e0ec;border-radius:12px;background:#fff;text-align:left;color:#403548;cursor:pointer}.agent-choice:hover{border-color:#bda6dc}.agent-choice.selected{border-color:#8b5cf6;background:#faf7ff;box-shadow:inset 0 0 0 1px rgba(139,92,246,.1)}.agent-choice strong{display:block;padding-right:42px;font-size:11.5px}.agent-choice small{display:block;margin-top:4px;color:#817589;font-size:9.5px;line-height:1.45}.agent-choice-score{position:absolute;top:9px;right:9px;color:#7c3aed;font-size:9px;font-weight:900}.agent-plan-chip{padding:8px 10px;border:1px solid #e5ddec;border-radius:10px;background:#fff;color:#5f5268;font-size:10px;font-weight:750;cursor:pointer}.agent-plan-chip.selected{border-color:#7c3aed;background:#f3edfc;color:#5b21b6}.agent-plan-chip span{display:block;margin-bottom:2px;color:#9a8ea2;font-size:8px;font-weight:700}.agent-bubble-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px}.agent-bubble-actions .secondary-button,.agent-bubble-actions .primary-button{padding:8px 12px;font-size:10.5px}.agent-selection-count{margin-right:auto;color:#887c91;font-size:9.5px}.agent-typing{display:inline-flex;gap:4px;align-items:center}.agent-typing i{width:5px;height:5px;border-radius:50%;background:#8b5cf6;animation:agentTyping 1s infinite}.agent-typing i:nth-child(2){animation-delay:.15s}.agent-typing i:nth-child(3){animation-delay:.3s}@keyframes agentTyping{50%{transform:translateY(-3px);opacity:.45}}
.agent-progress-card{min-width:min(560px,100%)}.agent-progress-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.agent-progress-head strong{font-size:12px}.agent-progress-track{height:7px;margin:10px 0 8px;overflow:hidden;border-radius:99px;background:#eee9f3}.agent-progress-fill{height:100%;border-radius:inherit;background:linear-gradient(90deg,#7c3aed,#a855f7,#f97316);transition:width .3s}.agent-progress-copy{display:flex;justify-content:space-between;gap:10px;color:#817589;font-size:9.5px}.agent-activity-list{display:grid;gap:6px;margin:12px 0 0;padding:0;list-style:none}.agent-activity-list li{display:flex;align-items:center;gap:7px;color:#685d70;font-size:10px}.agent-activity-list li::before{content:"✓";display:grid;place-items:center;width:16px;height:16px;border-radius:6px;background:#ecfdf5;color:#15803d;font-size:8px;font-weight:900}.agent-error-copy{color:#b45309}.agent-composer{margin:0 20px 20px;padding:13px;border:1px solid #ddd3e8;border-radius:18px;background:#fff;box-shadow:0 14px 38px rgba(66,32,96,.08)}.agent-composer[hidden]{display:none}.agent-composer textarea{display:block;width:100%;min-height:88px;max-height:180px;padding:4px 5px 10px;border:0;resize:vertical;outline:0;background:transparent;color:#2e2436;font:inherit;font-size:14px;line-height:1.6}.agent-composer-bottom{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.agent-filter-row{display:flex;flex-wrap:wrap;gap:7px}.agent-filter-row select{max-width:160px;padding:7px 25px 7px 9px;border:1px solid #e5ddeb;border-radius:999px;background:#f9f7fb;color:#5e5267;font-size:10px;font-weight:750;outline:0}.agent-submit-wrap{display:flex;align-items:center;gap:9px}.agent-enter-hint{color:#9a8fa2;font-size:9px;white-space:nowrap}.agent-send-button{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 15px;border:0;border-radius:12px;background:linear-gradient(135deg,#5b21b6,#7c3aed 65%,#f97316);color:#fff;font-size:11px;font-weight:900;cursor:pointer;box-shadow:0 9px 20px rgba(109,40,217,.2)}.agent-send-button:disabled{opacity:.5;cursor:not-allowed}.agent-inline-message{min-height:0;margin:8px 4px 0;color:#b45309;font-size:10px}.agent-inline-message:empty{display:none}
@media(max-width:720px){#view-agents{padding-inline:12px}.agent-dialog-head{padding:16px}.agent-dialog-status{display:none}.agent-conversation{padding:16px;max-height:none}.agent-message-row{max-width:96%}.agent-choice-grid{grid-template-columns:1fr}.agent-composer{margin:0 10px 12px}.agent-composer-bottom{align-items:stretch;flex-direction:column}.agent-submit-wrap{justify-content:space-between}.agent-enter-hint{display:none}.agent-send-button{justify-content:center}.agent-filter-row select{max-width:none}.agent-filter-row label{flex:1 1 120px}}

.agent-filter-row .agent-follower-bounds{flex:1 1 180px}.agent-filter-row .agent-follower-bounds select{max-width:none;padding:0;border:0;border-radius:0;background:transparent;color:var(--purple-dark)}
.agent-composer{padding:10px 11px}.agent-composer textarea{min-height:64px;padding:3px 3px 7px}.agent-composer-bottom{gap:9px}.agent-filter-row>label,.agent-filter-row>.agent-follower-bounds{padding:6px 8px}.agent-follower-bounds legend{margin-bottom:2px}
.agent-composer textarea{min-height:52px}.agent-filter-row{min-height:38px}.agent-filter-row>label{display:flex;align-items:center;padding:0 8px}.agent-filter-row>label>span,.agent-follower-bounds legend,.agent-follower-bounds label>span{display:none}.agent-filter-row>.agent-follower-bounds{padding:0 8px;align-items:center}.agent-follower-bounds label{display:flex;align-items:center}.agent-follower-bounds i{padding:0}
.agent-composer textarea::placeholder{color:#716b7f;opacity:1}.agent-enter-hint{color:#716b7f}
.agent-filter-row{display:grid;grid-template-columns:.8fr 1.05fr 1.65fr;gap:0;overflow:hidden;border:1px solid #e2d9eb;border-radius:14px;background:#fbf9fd;box-shadow:0 5px 14px rgba(66,32,96,.05)}.agent-filter-row>label,.agent-filter-row>.agent-follower-bounds{min-width:0;margin:0;padding:8px 10px;border:0;border-right:1px solid #ebe4f0;border-radius:0;background:transparent}.agent-filter-row>label{display:grid;gap:3px;color:#817589;font-size:9px;font-weight:800}.agent-filter-row>label select{width:100%;max-width:none;padding:0 16px 0 0;border:0;border-radius:0;background:transparent;color:#4b1b98;font-size:11px;font-weight:800}.agent-follower-bounds{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;gap:4px}.agent-follower-bounds legend{float:left;width:100%;grid-column:1/-1;margin:0 0 3px;padding:0;color:#817589;font-size:9px;font-weight:800}.agent-follower-bounds label{display:grid;gap:2px;min-width:0;color:#938b9e;font-size:8px}.agent-follower-bounds i{padding-bottom:1px;color:#aaa1b2;font-style:normal}@media(max-width:720px){.agent-filter-row{grid-template-columns:.8fr 1.1fr}.agent-filter-row>.agent-follower-bounds{grid-column:1/-1;border-top:1px solid #ebe4f0;border-right:0}.agent-filter-row>label{flex:none}}
.agent-filter-row{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;min-height:0;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.agent-filter-row>label{display:flex;align-items:center;flex:0 1 92px;min-width:72px;min-height:32px;padding:0 8px;border:1px solid #e2d9eb;border-radius:10px;background:#fbf9fd}.agent-filter-row>label:nth-child(2){flex-basis:108px}.agent-filter-row>.agent-follower-bounds{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;flex:1 1 150px;min-width:135px;min-height:32px;padding:0 8px;border:1px solid #e2d9eb;border-radius:10px;background:#fbf9fd}.agent-follower-bounds label{display:flex;align-items:center}.agent-follower-bounds i{padding:0}
.agent-composer textarea{min-height:82px}.agent-filter-row{display:grid;grid-template-columns:82px 108px minmax(0,1fr);gap:5px}.agent-filter-row>label{min-width:0;min-height:27px;padding:0 7px;border-radius:999px}.agent-filter-row>label:nth-child(2){min-width:0}.agent-filter-row>.agent-follower-bounds{grid-column:1/3;width:176px;min-width:0;min-height:27px;padding:0 7px;border-radius:999px}

.agent-composer {
  padding: 10px 11px;
}
.agent-composer textarea {
  min-height: 96px;
}
.agent-filter-row {
  display: grid;
  grid-template-columns: 90px 118px;
  grid-template-areas:
    "platform country"
    "followers followers";
  gap: 5px 6px;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.agent-filter-row > label {
  min-width: 0;
  min-height: 24px;
  margin: 0;
  padding: 0 7px;
  border: 1px solid #e2d9eb;
  border-radius: 999px;
  background: #fbf9fd;
}
.agent-filter-row > label:first-child {
  grid-area: platform;
}
.agent-filter-row > label:nth-child(2) {
  grid-area: country;
  min-width: 0;
}
.agent-filter-row > label,
.agent-filter-row > label > select {
  font-size: 10px;
}
.agent-follower-bounds {
  grid-area: followers;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 24px;
  margin: 0;
  padding: 0 7px;
  border: 1px solid #e2d9eb;
  border-radius: 999px;
  background: #fbf9fd;
}
.agent-follower-bounds legend {
  display: none;
}
.agent-follower-bounds label {
  display: flex;
  align-items: center;
}
.agent-follower-bounds label > span {
  display: none;
}
.agent-follower-bounds select {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--purple-dark);
}
.agent-follower-bounds i {
  padding: 0;
  font-size: 11px;
}

@media (max-width: 720px) {
  .agent-filter-row {
    grid-template-columns: minmax(84px, 1fr) minmax(120px, 1fr);
  }
}

/* Refined AI conversation surface: response first, composer follows normal document flow. */
.agent-dialog-shell {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.agent-dialog-head {
  padding: 10px 12px 8px;
  border: 0;
  background: transparent;
}
.agent-dialog-identity h2 {
  margin-top: 3px;
  font-size: 16px;
  letter-spacing: -.02em;
}
.agent-dialog-status {
  padding: 5px 9px;
  border-color: rgba(124, 58, 237, .12);
  background: rgba(255, 255, 255, .68);
  font-size: 9px;
}
.agent-response-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 14px 3px;
}
.agent-response-bar > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #392d45;
  font-size: 10px;
  font-weight: 850;
}
.agent-response-bar > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .08);
}
.agent-response-bar a {
  color: #6d28d9;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}
.agent-response-bar a::after { content: '›'; margin-left: 5px; font-size: 12px; }
.agent-bottom-hub {
  display: flex;
  justify-content: center;
  padding: 9px 12px 4px;
}
.agent-bottom-hub a {
  color: #6d28d9;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}
.agent-bottom-hub a::after {
  content: '›';
  margin-left: 5px;
  font-size: 12px;
}
.agent-conversation {
  min-height: 180px;
  max-height: 58vh;
  padding: 14px;
  border-left: 2px solid rgba(124, 58, 237, .10);
  margin-left: 16px;
}
.agent-ai-avatar {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 13px;
  box-shadow: 0 7px 18px rgba(109, 40, 217, .16);
}
.agent-message-avatar {
  display: block;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 9px;
  box-shadow: 0 5px 12px rgba(109, 40, 217, .13);
}
.agent-message-row.user .agent-message-avatar {
  display: grid;
  place-items: center;
  object-fit: initial;
  font-size: 8px;
}
.agent-message-row { max-width: 92%; }
.agent-bubble {
  padding: 11px 13px;
  border-color: rgba(139, 92, 246, .10);
  background: rgba(255, 255, 255, .76);
  box-shadow: none;
}
.agent-composer {
  position: static;
  margin: 8px 0 0;
  padding: 10px 11px;
  border-color: rgba(139, 92, 246, .16);
  border-radius: 15px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 24px rgba(58, 29, 86, .055);
}
.agent-composer textarea {
  min-height: 72px;
  padding: 8px 8px 7px;
  font-size: 13px;
}
.agent-filter-row {
  grid-template-columns: 76px 100px minmax(104px, 122px);
  grid-template-areas: "platform country followers";
  gap: 3px 4px;
  padding: 4px 6px 5px;
  border-top: 1px solid rgba(139, 92, 246, .10);
}
.agent-filter-row > label,
.agent-filter-row > .agent-follower-bounds {
  min-height: 19px;
  height: 19px;
  border-color: rgba(124, 58, 237, .13);
  background: rgba(249, 247, 252, .82);
}
.agent-filter-row > label > select,
.agent-filter-row .agent-follower-bounds select { height: 17px; font-size: 8.5px; line-height: 17px; }
.agent-filter-row > label { padding-inline: 5px; }
.agent-filter-row > .agent-follower-bounds {
  display: flex;
  width: 100%;
  padding-inline: 4px;
}
.agent-filter-row .agent-follower-bounds i { font-size: 9px; }
.agent-send-button {
  min-height: 34px;
  border-radius: 10px;
  box-shadow: none;
}
@media (max-width: 720px) {
  .agent-dialog-head { padding-inline: 4px; }
  .agent-response-bar { align-items: flex-start; padding-inline: 6px; }
  .agent-response-bar a { max-width: 55%; text-align: right; }
  .agent-conversation { min-height: 140px; margin-left: 7px; padding: 12px 8px 12px 13px; }
  .agent-composer { margin: 6px 0 0; }
}
