:root {
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-hover: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0ea5e9;
  --teal-soft: #e0f2fe;
  --teal-dark: #0284c7;
  --red: #ef4444;
  --red-soft: #fee2e2;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', 'IBM Plex Sans SC', sans-serif;
  color: var(--ink);
  background-color: var(--surface-soft);
  line-height: 1.6;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.back-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--ink);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

h1 {
  font-size: 20px;
  font-weight: 600;
}

.app-main {
  display: flex;
  flex: 1;
  padding: 24px;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.sidebar {
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

h2 {
  font-size: 16px;
  font-weight: 600;
}

textarea {
  width: 100%;
  height: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

textarea:focus {
  border-color: var(--teal);
}

.btn {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--teal);
  color: white;
}

.btn-primary:hover {
  background: var(--teal-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status-panel {
  flex: 1;
}

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

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px 0;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.canvas-area {
  flex: 1;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.empty-canvas {
  text-align: center;
  color: var(--muted);
}

.empty-canvas .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-canvas p {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}

.empty-canvas span {
  font-size: 14px;
}

.app-footer {
  border-top: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-container a {
  color: inherit;
  text-decoration: none;
}
