/* Vinted Monitor — dark theme */
:root {
  --bg: #141419;
  --card: #292e37;
  --text: #e7e7e7;
  --accent: #e07b39;
  --green: #4cd97b;
  --amber: #ffd166;
  --red: #ff6b6b;
  --muted: #64748b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Inter, system-ui, Arial; background: var(--bg); color: var(--text); }

.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
}

.card {
  background: var(--card);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.card-header h2 { margin: 0; font-size: 18px; }
.card-subtitle { opacity: 0.7; font-size: 12px; }

.metric-row { display: flex; gap: 12px; margin: 8px 0; flex-wrap: wrap; }
.metric-block { flex: 1; background: #2a2f38; border-radius: 6px; padding: 10px; min-width: 120px; }
.metric-block-wide { flex: 2; }

.label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.big-value { font-size: 28px; font-weight: 700; margin: 6px 0; }
.stat-value { font-size: 14px; margin: 4px 0; }

.progress-bar-track { height: 8px; background: #2a2f38; border-radius: 6px; overflow: hidden; margin-top: 4px; }
.progress-bar-fill { height: 100%; border-radius: 6px; }
.green-fill { background: var(--green); }
.amber-fill { background: var(--amber); }
.red-fill { background: var(--red); }
.accent-fill { background: var(--accent); }

/* Phase table */
.phase-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.phase-table th, .phase-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #333;
  font-size: 13px;
}
.phase-table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; }
.phase-done { color: var(--green); }
.phase-active { color: var(--amber); }
.phase-backlog { color: var(--muted); }

/* Module list */
.module-list { list-style: none; }
.module-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #333;
  font-size: 13px;
}
.module-item:last-child { border-bottom: none; }
.module-status-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.dot-ok { background: var(--green); }
.dot-warn { background: var(--amber); }
.dot-err { background: var(--red); }
.dot-muted { background: var(--muted); }

/* File tree */
.file-tree { font-family: monospace; font-size: 12px; }
.file-tree-item { padding: 3px 0; color: #c0c0c0; }
.file-tree-item.directory { color: #4cc9f0; font-weight: 600; }
.file-tree-indent { display: inline-block; width: 20px; color: #444; }

/* Finding rows */
.finding-row { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid #333; font-size: 13px; }
.finding-key { color: var(--muted); min-width: 160px; font-weight: 600; }
.finding-val { color: var(--text); }

/* Health indicator */
.health-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.health-ok { background: #1a3a24; color: var(--green); }
.health-warn { background: #3a2e0a; color: var(--amber); }
.health-err { background: #3a1a1a; color: var(--red); }

/* Actions */
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: #2a2f38; color: var(--text); border: 1px solid #444; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Credential rows */
.cred-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #333; }
.cred-row:last-child { border-bottom: none; }
.cred-label { font-size: 13px; color: var(--muted); min-width: 140px; }
.cred-value { font-size: 13px; font-family: monospace; }
.cred-masked { color: var(--green); }

/* Session */
.session-card-info { font-size: 13px; }
.session-info-row { display: flex; gap: 12px; padding: 4px 0; }
.session-key { color: var(--muted); min-width: 140px; }
.session-val { color: var(--text); font-family: monospace; font-size: 12px; }

/* Loading */
.loading { color: var(--muted); text-align: center; padding: 40px; font-size: 14px; }
.error-msg { background: #3a1a1a; color: var(--red); padding: 12px; border-radius: 6px; font-size: 13px; }
.success-msg { background: #1a3a24; color: var(--green); padding: 12px; border-radius: 6px; font-size: 13px; }

/* Header bar */
.vinted-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #2a2a3a;
  display: flex;
  align-items: center;
  gap: 16px;
}
.vinted-header h1 { font-size: 1.2rem; color: #e2e8f0; }
.vinted-header .badge { font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }

@media (min-width: 900px) { .dashboard { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1300px) { .dashboard { grid-template-columns: repeat(3, 1fr); } }
