/* Byline Dashboard — extends theme.css */
.dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 48px;
}

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 0;
  margin-bottom: 48px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.stat-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  gap: 8px;
}
.stat-chip:last-child { border-right: none; }
.stat-chip .stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.stat-chip .stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}
.stat-chip .stat-value.accent { color: var(--accent); }
.stat-chip .stat-value.muted { color: var(--fg-muted); }

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

/* Panel */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 2px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn:hover { opacity: 0.85; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 3px 8px; font-size: 0.75rem; }
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-accent { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--fg-muted); }

/* Articles list */
.articles-list { display: flex; flex-direction: column; gap: 0; }
.article-item {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.article-item:last-child { border-bottom: 1px solid var(--border); }
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.article-topic {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.article-status {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
}
.status-pending { background: rgba(138,133,125,0.15); color: var(--fg-muted); }
.status-drafting { background: rgba(232,80,42,0.15); color: var(--accent); }
.status-published { background: rgba(60,180,100,0.15); color: #3cb464; }
.status-failed { background: rgba(220,60,60,0.15); color: #dc3c3c; }
.article-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--fg);
}
.article-actions { margin-bottom: 10px; }
.article-footer {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.article-error {
  font-size: 0.8rem;
  color: #dc3c3c;
  margin-bottom: 8px;
  background: rgba(220,60,60,0.1);
  padding: 6px 10px;
  border-radius: 2px;
}

/* Topics list */
.topic-form {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-actions { display: flex; gap: 8px; }
.topics-list { display: flex; flex-direction: column; gap: 0; }
.topic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.topic-item:last-child { border-bottom: 1px solid var(--border); }
.topic-info { display: flex; align-items: center; gap: 10px; }
.topic-name { font-size: 0.9rem; }
.topic-priority {
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}
.topic-actions { display: flex; gap: 4px; }

/* Research list */
.research-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 16px; }
.research-item {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.research-item:last-child { border-bottom: 1px solid var(--border); }
.research-source {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.research-title {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 4px;
}
.research-topic {
  font-size: 0.7rem;
  color: var(--fg-muted);
  background: rgba(138,133,125,0.1);
  padding: 2px 6px;
  border-radius: 2px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--fg-muted);
  font-size: 0.9rem;
}
.empty-hint { font-size: 0.85rem; color: var(--fg-muted); margin-top: 4px; }

/* Modal */
.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
}
.modal-body { padding: 24px; }
.article-meta-line {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-bottom: 20px;
}
.article-content-markdown {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--fg);
  white-space: pre-wrap;
}
.article-seo {
  margin-top: 20px;
  padding: 12px;
  background: var(--bg);
  border-radius: 2px;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* Mobile */
@media (max-width: 768px) {
  .dashboard { padding: 24px; }
  .stats-bar { flex-wrap: wrap; }
  .stat-chip { flex: 1 1 40%; min-width: 80px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}