.dashboard-body {
  background: var(--surface);
  min-height: 100vh;
}

.dashboard-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.dashboard-nav .logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--heading);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

.paywall-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #fbbf24;
  background: #fffbeb;
  color: #92400e;
}

.paywall-banner p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.9;
}

.dashboard-layout.locked .sidebar button,
.dashboard-layout.locked .btn-row button,
.dashboard-layout.locked .chat-form {
  opacity: 0.45;
  pointer-events: none;
}

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

.sidebar {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 96px;
}

.sidebar h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--caption);
  margin: 0 0 16px;
}

.agent-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.agent-list li {
  margin-bottom: 8px;
}

.agent-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
  text-align: left;
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
}

.agent-btn:hover,
.agent-btn.active {
  background: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-700);
}

.agent-btn .icon {
  font-size: 18px;
}

.main-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.company-card {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.company-card h1 {
  font-size: 28px;
  margin: 0 0 8px;
  color: var(--heading);
}

.company-card .idea {
  color: var(--body);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-50);
  color: var(--primary-700);
}

.status-pill.offline {
  background: var(--warning);
  color: #fff;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.log-terminal {
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid #334155;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.log-terminal__bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #020617;
  border-bottom: 1px solid #334155;
}

.log-terminal__bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.log-terminal__bar span:nth-child(1) { background: #ef4444; }
.log-terminal__bar span:nth-child(2) { background: #f59e0b; }
.log-terminal__bar span:nth-child(3) { background: #22c55e; }

.log-terminal__body {
  flex: 1;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #94a3b8;
  overflow-y: auto;
  max-height: 480px;
}

.log-line {
  margin-bottom: 12px;
  animation: fadeIn 300ms var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.log-line .agent {
  color: #a5b4fc;
  font-weight: 500;
}

.log-line .time {
  color: #64748b;
  font-size: 11px;
  margin-right: 8px;
}

.log-line.ai .badge {
  font-size: 10px;
  background: rgba(16, 185, 129, 0.2);
  color: #4ade80;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

.chat-panel {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 24px;
}

.chat-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--heading);
}

.chat-panel__hint {
  margin: 0 0 16px;
  font-size: 13px;
}

.chat-form {
  display: block;
}

.chat-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.chat-compose__row input[type="text"] {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}

.chat-compose__row input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.chat-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.chat-attach-btn:hover {
  border-color: var(--primary-600);
  background: #fff;
}

.chat-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-image-preview:not([hidden]) {
  display: flex;
}

.chat-image-chip {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.chat-image-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-image-chip button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.chat-image-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-form input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}

.chat-form input:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.chat-response {
  margin-top: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  display: none;
}

.chat-response.visible {
  display: block;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
