* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.app {
  max-width: 1450px;
  margin: auto;
  padding: 28px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1e293b, #020617);
  border: 1px solid #334155;
  border-radius: 22px;
  padding: 26px;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.hero p {
  margin: 0;
  color: #cbd5e1;
}

.badge {
  background: #16a34a;
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: bold;
}

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
}

.card,
.office-card {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

textarea,
input {
  width: 100%;
  margin-bottom: 12px;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #020617;
  color: white;
  font-size: 15px;
}

textarea {
  min-height: 110px;
}

button {
  background: #2563eb;
  color: white;
  border: 0;
  padding: 11px 15px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  margin: 4px 4px 4px 0;
}

button:hover {
  background: #1d4ed8;
}

button.danger {
  background: #dc2626;
}

button.danger:hover {
  background: #b91c1c;
}

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

.status {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 14px;
  line-height: 1.5;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.project-item {
  padding: 13px;
  border-radius: 14px;
  background: #020617;
  border: 1px solid #334155;
  cursor: pointer;
}

.project-item:hover,
.project-item.active {
  border-color: #60a5fa;
  background: #0b1220;
}

.project-item strong {
  display: block;
  margin-bottom: 5px;
}

.project-item small {
  color: #94a3b8;
}

.office {
  min-height: 230px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #334155;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    #020617;
  background-size: 42px 42px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.avatar-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 17px;
  min-height: 170px;
  transition: .2s;
}

.avatar-card.working {
  border-color: #facc15;
  transform: translateY(-3px);
  animation: workingGlow 1.2s infinite;
}

.avatar-card.done {
  border-color: #22c55e;
}

.avatar-card.error {
  border-color: #ef4444;
}

.avatar {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: #1e293b;
  border: 1px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 12px;
}

.avatar-card h3 {
  margin: 0 0 5px;
}

.avatar-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.agent-status {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: #334155;
}

.status-working {
  background: #facc15;
  color: #111827;
}

.status-done {
  background: #16a34a;
  color: white;
}

.status-error {
  background: #dc2626;
  color: white;
}

@keyframes workingGlow {
  0% { box-shadow: 0 0 0 rgba(250,204,21,.2); }
  50% { box-shadow: 0 0 26px rgba(250,204,21,.35); }
  100% { box-shadow: 0 0 0 rgba(250,204,21,.2); }
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px;
}

.message.user {
  border-color: #60a5fa;
}

.message.agent {
  border-color: #475569;
}

.message.system {
  border-color: #22c55e;
}

.message h3 {
  margin: 0 0 10px;
  color: #93c5fd;
}

.message pre {
  white-space: pre-wrap;
  line-height: 1.45;
  margin: 0;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.small-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.small-item {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px;
  word-break: break-word;
}

.provider {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: #94a3b8;
}

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
  }

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

  .project-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
