/* ─────────────────────────────────────────────────────────────
   components.css · GreenHoss shared component patterns
   Extracted from mockup CSS files. Uses design-tokens.css vars.
   Card, badge, chip, button, metric-tile, section-divider, input.
   ───────────────────────────────────────────────────────────── */

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.card h3 {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card p {
  margin: 10px 0 0;
  font-size: clamp(26px, 1.9vw, 36px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.card p.net-negative {
  color: var(--red);
}

.card p.net-positive {
  color: var(--mint);
}

/* ── Panel ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.panel-header h2 {
  margin: 0;
  font-size: clamp(20px, 1.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.panel-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(12px, 0.85vw, 14px);
}

/* ── Badge (pill) ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-live {
  background: var(--mint-dim);
  color: var(--mint);
}

.badge-draft {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.badge-muted {
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ── Button ── */
.button {
  border: 0;
  border-radius: var(--r-pill);
  padding: 10px 24px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--mint);
  color: var(--bg);
  border: none;
}

.button-primary:hover {
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.25);
}

.button-secondary {
  background: transparent;
  color: var(--mint);
  border: 1px solid var(--border-mid);
}

.button-secondary:hover {
  background: var(--mint-faint);
}

.button-large {
  padding: 16px 28px;
  font-size: 1rem;
  width: 100%;
  margin-top: 18px;
}

/* ── Chip (selectable) ── */
.chip {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.chip.active {
  background: var(--mint-dim);
  border-color: var(--mint);
  color: var(--mint);
}

/* ── Metric tile ── */
.metric-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-value,
.metric-tile strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.metric-subtitle,
.metric-subtle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

/* ── Section divider ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 48px 0 20px;
}

.section-divider-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Input (dark) ── */
input, select, textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-family: var(--font-body);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--mint);
  outline-offset: 1px;
  border-color: var(--mint);
}

input::placeholder, textarea::placeholder {
  color: var(--text-subtle);
}
