/* P4.T5 — Home dashboard sections (TinkyTown platform spec).
 *
 * Brand tokens (canonical):
 *   --surface-deep #0d0b10  --amber #e8a33d
 *   --green #22c55e  --green-soft #4ade80
 * Fonts: Fraunces (titles), General Sans (body) — loaded globally.
 *
 * Scoped under #home-p4-sections to never collide with the existing
 * .home-welcome / .home-stats / .home-ai-box owned by outreach-home.js.
 */

.home-p4-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px auto 32px;
  max-width: 880px;
  padding: 0 16px;
  color: var(--text-primary, #f4f1ea);
  font-family: 'General Sans', system-ui, sans-serif;
}

.home-p4-card {
  background: var(--surface-card, color-mix(in srgb, var(--surface-deep, #0d0b10) 88%, transparent));
  border: 1px solid color-mix(in srgb, var(--amber, #e8a33d) 18%, transparent);
  border-radius: 14px;
  padding: 18px 22px 16px;
  transition: border-color 160ms ease, background 160ms ease;
}
.home-p4-card:hover {
  border-color: color-mix(in srgb, var(--amber, #e8a33d) 32%, transparent);
}
.home-p4-card.has-alerts {
  border-color: color-mix(in srgb, var(--amber, #e8a33d) 55%, transparent);
  background: color-mix(in srgb, var(--amber, #e8a33d) 6%, var(--surface-deep, #0d0b10));
}

.home-p4-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.home-p4-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--text-primary, #f4f1ea);
}

.home-p4-viewall {
  background: transparent;
  border: none;
  color: var(--green-soft, #4ade80);
  font: 500 0.85rem/1 'General Sans', system-ui, sans-serif;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 120ms ease, background 120ms ease;
  min-height: 44px;
}
.home-p4-viewall:hover {
  color: var(--green, #22c55e);
  background: color-mix(in srgb, var(--green-soft, #4ade80) 10%, transparent);
}
.home-p4-viewall:focus-visible {
  outline: 2px solid var(--amber, #e8a33d);
  outline-offset: 2px;
}

.home-p4-body { display: flex; flex-direction: column; gap: 8px; }

.home-p4-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-deep, #0d0b10) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber, #e8a33d) 8%, transparent);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
  min-height: 44px;
}
.home-p4-row:hover {
  border-color: color-mix(in srgb, var(--green-soft, #4ade80) 28%, transparent);
  background: color-mix(in srgb, var(--green-soft, #4ade80) 4%, var(--surface-deep, #0d0b10));
}

.home-p4-icon {
  font-size: 1.1rem;
  line-height: 1.2;
  text-align: center;
}

.home-p4-rowtext { min-width: 0; }
.home-p4-rowtitle {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-p4-rowsub {
  color: var(--text-muted, #b0a89a);
  font-size: 0.82rem;
  line-height: 1.35;
}

.home-p4-alert-error {
  border-color: color-mix(in srgb, #ef4444 45%, transparent);
  background: color-mix(in srgb, #ef4444 6%, var(--surface-deep, #0d0b10));
}
.home-p4-alert-warn {
  border-color: color-mix(in srgb, var(--amber, #e8a33d) 45%, transparent);
  background: color-mix(in srgb, var(--amber, #e8a33d) 5%, var(--surface-deep, #0d0b10));
}

.home-p4-empty {
  padding: 12px 4px;
  color: var(--text-muted, #b0a89a);
  font-size: 0.88rem;
  line-height: 1.45;
}

.home-p4-placeholder {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--green-soft, #4ade80) 5%, var(--surface-deep, #0d0b10));
  border: 1px dashed color-mix(in srgb, var(--green-soft, #4ade80) 28%, transparent);
}
.home-p4-placeholder-emoji { font-size: 1.6rem; }
.home-p4-placeholder-text {
  color: var(--text-muted, #b0a89a);
  font-size: 0.92rem;
  line-height: 1.4;
}

.home-p4-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.home-p4-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--amber, #e8a33d);
  color: var(--surface-deep, #0d0b10);
  border: 1px solid var(--amber, #e8a33d);
  font: 600 0.92rem/1 'General Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: background 120ms ease, transform 60ms ease;
}
.home-p4-action span { font-size: 1rem; }
.home-p4-action:hover {
  background: color-mix(in srgb, var(--amber, #e8a33d) 88%, #fff);
}
.home-p4-action:active { transform: translateY(1px); }
.home-p4-action:focus-visible {
  outline: 2px solid var(--green-soft, #4ade80);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .home-p4-sections { padding: 0 12px; gap: 12px; }
  .home-p4-card { padding: 14px 16px 12px; }
  .home-p4-title { font-size: 1.1rem; }
  .home-p4-actions { grid-template-columns: 1fr; }
}
