.agent-home-page {
  background:
    radial-gradient(circle at 85% 8%, rgba(20, 184, 166, 0.12), transparent 28%),
    #f6f8fb;
}

.agent-home-page > main.wrap {
  width: min(1120px, calc(100% - 32px));
  padding-top: 24px;
}

.agent-home-shell {
  display: grid;
  gap: 26px;
}

.agent-card {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 44px rgba(15, 23, 42, 0.07);
}

.agent-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.agent-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 13px;
  font-weight: 850;
}

.agent-card h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.agent-card p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 16px;
}

.agent-prompt-wrap {
  position: relative;
  margin-top: 20px;
}

.agent-prompt-wrap textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 17px 18px 36px;
  border: 1px solid #d7e0ea;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 15px;
  line-height: 1.65;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.agent-prompt-wrap textarea:focus {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.agent-count {
  position: absolute;
  right: 16px;
  bottom: 12px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 750;
}

.agent-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.agent-param-lines {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.agent-param-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e4ebf2;
  border-radius: 14px;
  background: #f8fafc;
}

.agent-param-row > span {
  color: #344054;
  font-size: 14px;
  font-weight: 900;
}

.agent-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-tool,
.agent-option {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #ffffff;
  color: #344054;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.agent-tool:hover,
.agent-option:hover,
.agent-tool.is-active,
.agent-option.is-selected {
  border-color: rgba(15, 118, 110, 0.42);
  background: #ecfdf5;
  color: #0f766e;
}

.agent-uploaded-panel {
  margin-top: 16px;
  padding: 17px;
  border: 1px solid #e4ebf2;
  border-radius: 16px;
  background: #ffffff;
}

.agent-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.agent-section-head h2 {
  margin: 0;
  color: #182230;
  font-size: 16px;
  line-height: 1.3;
}

.agent-section-head p {
  margin: 2px 0 0;
  color: #667085;
  font-size: 13px;
}

.agent-section-head.is-inline {
  align-items: center;
}

.agent-section-head button {
  border: 0;
  background: transparent;
  color: #0f766e;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.agent-native-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.agent-uploaded-list {
  display: flex;
  min-height: 54px;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.agent-empty {
  margin: 0;
  color: #98a2b3;
  font-size: 14px;
}

.agent-uploaded-item {
  display: grid;
  grid-template-columns: 50px minmax(80px, 1fr) 26px;
  gap: 10px;
  min-width: 190px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e4ebf2;
  border-radius: 12px;
  background: #ffffff;
  cursor: grab;
}

.agent-uploaded-item.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.agent-uploaded-item.is-drag-over {
  border-color: rgba(15, 118, 110, 0.55);
  background: #ecfdf5;
}

.agent-uploaded-item img {
  width: 50px;
  height: 50px;
  border-radius: 9px;
  object-fit: cover;
  background: #f2f4f7;
}

.agent-uploaded-item strong,
.agent-uploaded-item span {
  display: block;
}

.agent-uploaded-item strong {
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.agent-uploaded-item span {
  color: #667085;
  font-size: 12px;
  text-transform: uppercase;
}

.agent-uploaded-item button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  cursor: pointer;
}

.agent-alert {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #fecdca;
  border-radius: 12px;
  background: #fff4f2;
  color: #b42318;
  font-size: 14px;
  font-weight: 750;
}

.agent-submit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}

.agent-submit-row.is-single {
  grid-template-columns: 1fr;
}

.agent-cost-note {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  border: 1px solid rgba(15, 159, 143, 0.22);
  border-radius: 12px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.agent-cost-note strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
}

.agent-submit {
  display: inline-flex;
  width: 100%;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  border: 0;
  border-radius: 12px;
  background: #0f9f8f;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 159, 143, 0.22);
}

.agent-submit:hover {
  background: #0f8f83;
}

.agent-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid #e4ebf2;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.agent-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
}

.agent-step span {
  grid-row: span 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #ecfdf5;
  color: #0f766e;
  font-weight: 900;
}

.agent-step strong {
  color: #182230;
  font-size: 15px;
}

.agent-step p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

@media (max-width: 900px) {
  .agent-upload-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .agent-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .agent-home-page > main.wrap {
    width: min(100% - 32px, 1100px);
    padding-top: 18px;
  }

  .agent-card {
    padding: 18px;
    border-radius: 18px;
  }

  .agent-card-head {
    display: block;
  }

  .agent-prompt-wrap textarea {
    min-height: 110px;
    padding: 14px 14px 34px;
  }

  .agent-tools,
  .agent-options {
    gap: 8px;
  }

  .agent-param-row {
    grid-template-columns: 1fr;
  }

  .agent-tool,
  .agent-option {
    flex: 1 1 auto;
  }

  .agent-uploaded-list {
    margin-right: -6px;
    padding-right: 6px;
  }

  .agent-submit-row {
    grid-template-columns: 1fr;
  }

  .agent-cost-note {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .agent-submit {
    height: 52px;
  }
}
