/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f14;
  --bg-card: #1a1a24;
  --bg-card-highlight: #1e1a2e;
  --text: #e8e6f0;
  --text-muted: #9590a8;
  --accent: #b49fdc;
  --accent-light: #d4c4f5;
  --accent-dim: #7b6a9e;
  --accent-glow: rgba(180, 159, 220, 0.15);
  --border: #2a2836;
  --green: #6ec87a;
  --yellow: #e8c84a;
  --blue: #5da4e8;
  --orange: #e89a4a;
  --red: #e86a5a;
  --radius: 12px;
  --max-w: 960px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

s { color: var(--text-muted); font-size: 0.85em; margin-left: 4px; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* ===== Header ===== */
.header {
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #16141f 0%, var(--bg) 100%);
}
.header__title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.header__dash { color: var(--accent); }
.header__subtitle {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 0.35rem;
}
.header__meta {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.5rem 0;
  overflow: hidden;
}
.card--highlight {
  background: var(--bg-card-highlight);
  border-color: var(--accent-dim);
}
.card__title {
  font-size: 1.15rem;
  font-weight: 700;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--accent-light);
}
.card__subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.card__subtitle-note {
  padding: 0 1.5rem;
  padding-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.card__body { padding: 1.25rem 1.5rem; }
.card__body p { margin-bottom: 0.6rem; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
thead th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(180, 159, 220, 0.04); }

.price-free { color: var(--green); font-weight: 600; }

/* ===== Status Pills ===== */
.status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.status--active      { background: rgba(110, 200, 122, 0.15); color: var(--green); }
.status--dormant     { background: rgba(232, 106, 90, 0.15); color: var(--red); }
.status--dispatched  { background: rgba(93, 164, 232, 0.15); color: var(--blue); }
.status--building    { background: rgba(232, 200, 74, 0.15); color: var(--yellow); }
.status--searching   { background: rgba(232, 154, 74, 0.15); color: var(--orange); }
.status--working     { background: rgba(180, 159, 220, 0.15); color: var(--accent); }

/* ===== Goal Banner ===== */
.goal-banner {
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.goal-banner__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent);
}
.goal-banner__value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-light);
}

/* ===== Grade Box ===== */
.grade-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(232, 106, 90, 0.08);
  border: 1px solid rgba(232, 106, 90, 0.25);
  border-radius: 8px;
}
.grade-box__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--text-muted); }
.grade-box__value { font-size: 1.75rem; font-weight: 800; color: var(--red); }
.grade-box__note { font-size: 0.85rem; color: var(--text-muted); }

/* ===== Findings List ===== */
.findings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.findings-list li {
  padding-left: 1rem;
  border-left: 3px solid var(--accent-dim);
  font-size: 0.9rem;
}

.asset-callout {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: rgba(110, 200, 122, 0.08);
  border: 1px solid rgba(110, 200, 122, 0.25);
  border-radius: 8px;
  font-size: 0.9rem;
}

.file-ref {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.file-ref code {
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* ===== Revenue Bars ===== */
.revenue-bars { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.revenue-bar { display: flex; align-items: center; gap: 0.75rem; }
.revenue-bar__label { width: 3rem; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-align: right; flex-shrink: 0; }
.revenue-bar__track { flex: 1; height: 22px; background: rgba(255,255,255,0.04); border-radius: 6px; overflow: hidden; }
.revenue-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 6px;
  min-width: 4px;
  transition: width 0.6s ease;
}
.revenue-bar__value { width: 5rem; font-size: 0.82rem; font-weight: 600; color: var(--accent-light); }

/* ===== Checklist ===== */
.phase-label { margin-top: 1.25rem; margin-bottom: 0.5rem; }
.phase-label:first-of-type { margin-top: 0; }

.checklist { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.5rem; }
.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  padding: 0.35rem 0;
}
.checkbox {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-dim);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== Action List ===== */
.action-list {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.action-list li {
  font-size: 0.9rem;
  padding-left: 0.4rem;
}
.action-list li::marker { color: var(--accent); font-weight: 700; }

/* ===== Insight Quote ===== */
.insight-quote {
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  background: var(--accent-glow);
  border-radius: 0 8px 8px 0;
}

/* ===== Footer ===== */
.footer {
  margin-top: 3rem;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer__main { font-weight: 600; color: var(--accent); margin-bottom: 0.25rem; }
.footer__agents { margin-bottom: 0.25rem; }
.footer__version { font-size: 0.75rem; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .header { padding: 2rem 0 1.5rem; }
  .card__title { padding: 0.75rem 1rem; font-size: 1.05rem; }
  .card__body { padding: 1rem; }
  .goal-banner { flex-direction: column; gap: 0.25rem; text-align: center; }
  .grade-box { flex-wrap: wrap; }
  .revenue-bar__label { width: 2.5rem; font-size: 0.72rem; }
  .revenue-bar__value { width: 4rem; font-size: 0.75rem; }
  thead th, tbody td { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
}
