.agente-page {
  padding-top: 24px;
  padding-bottom: 32px;
}

.agente-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.agente-hero h2 {
  margin-bottom: 10px;
}

.agente-lead {
  color: #cbd5e1;
  max-width: 72ch;
}

.agente-back-link {
  white-space: nowrap;
}

.agente-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.agente-card {
  min-height: 100%;
}

.agente-card-header h3 {
  margin-bottom: 8px;
}

.agente-card-header p {
  color: #cbd5e1;
  margin-bottom: 0;
}

.agente-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.agente-form label {
  font-weight: 700;
  color: #facc15;
}

.agente-form textarea {
  width: 100%;
  min-height: 280px;
  box-sizing: border-box;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid #334155;
  background: #07111f;
  color: #f8fafc;
  padding: 16px 18px;
  line-height: 1.6;
}

.agente-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.agente-history-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.agente-history-item {
  background: #07111f;
  border: 1px solid #26354f;
  border-radius: 16px;
  padding: 16px;
}

.agente-history-item time {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.agente-history-item p {
  margin: 0;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

.agente-empty-state {
  margin-top: 20px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed #334155;
  color: #94a3b8;
  background: rgba(7, 17, 31, 0.55);
}

@media (max-width: 900px) {
  .agente-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .agente-grid {
    grid-template-columns: 1fr;
  }

  .agente-back-link {
    align-self: flex-start;
  }
}

@media (max-width: 640px) {
  .agente-form textarea {
    min-height: 220px;
  }

  .agente-actions {
    flex-direction: column;
  }

  .agente-actions button,
  .agente-back-link {
    width: 100%;
    justify-content: center;
  }
}
