* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: #0f1115;
  color: #f2f3f5;
}

.app-header {
  padding: 2.5rem 1.5rem 1.5rem;
  text-align: center;
  background: #141720;
}

.subtitle {
  color: #9aa0a6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.panel {
  background: #1b1f2b;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 2rem;
}

.panel.hidden {
  display: none;
}

label {
  display: block;
  margin-bottom: 1rem;
}

input {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.4rem;
  background: #0f1115;
  border: 1px solid #2a2f3d;
  border-radius: 8px;
  color: #f2f3f5;
}

button {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: none;
  background: #6c5ce7;
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: #3c4358;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.actions {
  margin: 1rem 0;
}

.section-divider {
  height: 1px;
  background: #2a2f3d;
  margin: 2rem 0;
}

.panel-subsection h3 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.form-inline label {
  margin-bottom: 0;
}

select {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.4rem;
  background: #0f1115;
  border: 1px solid #2a2f3d;
  border-radius: 8px;
  color: #f2f3f5;
}

.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.bot-card {
  background: #141720;
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid #2a2f3d;
}

.bot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.status.running {
  background: #1f8f45;
}

.status.stopped {
  background: #b23b3b;
}

.bot-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #9aa0a6;
  margin-top: 0.5rem;
}

.bot-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.file-browser {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #2a2f3d;
  border-radius: 10px;
  overflow: hidden;
}

.file-list li {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #2a2f3d;
  cursor: pointer;
}

.file-list li:last-child {
  border-bottom: none;
}

.file-list li.active {
  background: #262b3a;
}

.file-editor textarea {
  width: 100%;
  background: #0f1115;
  border: 1px solid #2a2f3d;
  border-radius: 10px;
  color: #f2f3f5;
  padding: 0.8rem;
}

.file-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
}

.log-output {
  background: #0f1115;
  border: 1px solid #2a2f3d;
  border-radius: 10px;
  padding: 1rem;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
}

.error {
  color: #ff6b6b;
}

.muted {
  color: #9aa0a6;
}

.footer {
  text-align: center;
  padding: 1.5rem;
  color: #6c7280;
}
