/* SkySkew AI Trend Monitor — Dashboard Styles */

:root {
  --bg: #0b0f1a;
  --surface: #131929;
  --surface2: #1a2235;
  --border: #2a3652;
  --text: #e2e8f0;
  --text-dim: #8896b3;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --purple: #c084fc;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  margin-right: 24px;
}

nav button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

nav button:hover, nav button.active {
  background: var(--surface2);
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

/* Section headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* Action buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--accent-dim);
  color: #fff;
}

.btn-primary:hover {
  background: #0284c7;
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

/* Cards / lists */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.card .card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.card .card-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.card .card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

.card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.tag-source { background: rgba(88, 166, 255, 0.15); color: var(--accent); }
.tag-status-draft     { background: rgba(148, 163, 184, 0.15); color: var(--text-dim); }
.tag-status-approved  { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.tag-status-queued    { background: rgba(251, 191, 36, 0.15); color: var(--amber); }
.tag-status-published { background: rgba(34, 197, 94, 0.3); color: var(--green); }
.tag-status-pending   { background: rgba(148, 163, 184, 0.15); color: var(--text-dim); }
.tag-status-scheduled { background: rgba(88, 166, 255, 0.15); color: var(--accent); }
.tag-status-failed    { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.tag-tier-micro { background: rgba(192, 132, 252, 0.15); color: var(--purple); }
.tag-tier-mid   { background: rgba(251, 191, 36, 0.15); color: var(--amber); }
.tag-tier-major { background: rgba(248, 113, 113, 0.15); color: var(--red); }

/* Status badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge-contacted    { background: rgba(148,163,184,0.2); color: var(--text-dim); }
.badge-sample_sent   { background: rgba(251,191,36,0.2); color: var(--amber); }
.badge-reviewing    { background: rgba(88,166,255,0.2); color: var(--accent); }
.badge-published    { background: rgba(74,222,128,0.2); color: var(--green); }
.badge-declined     { background: rgba(248,113,113,0.2); color: var(--red); }
.badge-sponsored    { background: rgba(192,132,252,0.2); color: var(--purple); }

/* Two-column layout */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Forms */
.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

input, select, textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

label {
  font-size: 12px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  padding: 16px;
}

.loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.empty {
  text-align: center;
  padding: 32px;
  color: var(--text-dim);
  font-size: 14px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }