/* Company overview only: brand detail pages retain their existing styles. */
.home-shell { padding: 48px 32px; background: #f5f6f8; }
.home-wrap { max-width: 1320px; }
.home-top { gap: 32px; align-items: center; margin-bottom: 48px; }
.home-top .eyebrow { margin: 0 0 14px; color: #b94c00; font-size: 11px; letter-spacing: .18em; font-weight: 700; }
.home-top h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.25; letter-spacing: -.04em; }
.home-top .muted { margin: 14px 0 0; font-size: 14px; line-height: 1.7; color: #4b5563; }
.home-controls { display: flex; align-items: flex-end; gap: 16px; flex-shrink: 0; }
.period-control { display: grid; gap: 8px; }
.control-label { color: #374151; font-size: 12px; font-weight: 700; }
.home-controls .periods { padding: 4px; border-radius: 12px; }
.home-controls .period { min-height: 40px; padding: 9px 16px; font-size: 13px; }
.home-controls .period.active { background: #c65000; box-shadow: 0 2px 4px #c650001a; }
.home-controls #logoutButton { min-height: 50px; color: #374151; font-weight: 600; background: transparent; }
.brands-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.brands-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; }
.brand-count { padding: 3px 7px; border: 1px solid #d5dae2; border-radius: 6px; color: #374151; font-size: 11px; font-weight: 700; }
.brands-heading p { margin: 7px 0 0; color: #4b5563; font-size: 12px; }
.source-label { color: #4b5563; font-size: 12px; }
.home-shell .brand-grid { gap: 24px; }
.home-shell .brand-card-mp { --brand-accent: #d45b00; --brand-accent-dark: #a94700; --brand-tint: #fff3e8; --brand-kpi-bg: #fff7ed; --brand-kpi-border: #f3a35e; display: flex; flex-direction: column; min-width: 0; border-radius: 20px; padding: 28px; border: 1px solid #f0c9aa; border-top: 5px solid var(--brand-accent); background: linear-gradient(180deg,#fffaf6 0,#fff 120px); box-shadow: 0 8px 28px rgba(185,76,0,.08); }
.home-shell .brand-card-mp[data-brand="dclash"] { --brand-accent: #8b4f6c; --brand-accent-dark: #6d3d54; --brand-tint: #f8edf3; --brand-kpi-bg: #fbf2f6; --brand-kpi-border: #c98aa8; border-color: #e6cad7; border-top-color: var(--brand-accent); background: linear-gradient(180deg,#fdf8fa 0,#fff 120px); box-shadow: 0 8px 28px rgba(121,82,100,.09); }
.home-shell .brand-top { gap: 16px; flex-wrap: wrap; }
.brand-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-monogram { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 14px; background: var(--brand-tint); color: var(--brand-accent-dark); font-size: 25px; font-weight: 800; border: 1px solid color-mix(in srgb,var(--brand-accent) 16%,transparent); }
.home-shell .brand-identity .eyebrow { color: var(--brand-accent-dark); font-size: 10px; letter-spacing: .14em; font-weight: 800; }
.home-shell .brand-card-mp h2 { font-size: 22px; letter-spacing: -.025em; line-height: 1.3; margin: 4px 0 0; }
.home-shell .brand-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.brand-status.connected { color: #12633f; background: #e8f7ef; }
.brand-status.loading { color: #4b5563; background: #f2f4f7; }
.brand-status.error { color: #a83d30; background: #fff0ee; }
.connection-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.brand-period { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; font-size: 12px; font-weight: 600; color: #4b5563; }
.home-shell .brand-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0 26px; align-items: stretch; }
.home-shell .brand-metrics > div { min-width: 0; background: transparent; border: 1px solid transparent; border-radius: 14px; padding: 16px; }
.home-shell .brand-metrics > div:first-child { padding-left: 16px; }
.home-shell .brand-metrics > div:last-child { padding-right: 16px; }
.home-shell .brand-metrics > div + div { border-left: 1px solid transparent; }
.home-shell .brand-metrics > div:nth-child(2) { position: relative; background: var(--brand-kpi-bg); border: 2px solid var(--brand-kpi-border); box-shadow: 0 6px 18px color-mix(in srgb,var(--brand-accent) 12%,transparent); transform: translateY(-2px); }
.home-shell .brand-metrics > div:nth-child(2)::before { content: 'PRIMARY KPI'; display: inline-block; margin-bottom: 8px; padding: 4px 7px; border-radius: 999px; background: var(--brand-accent); color: #fff; font-size: 9px; line-height: 1; font-weight: 800; letter-spacing: .08em; }
.home-shell .brand-metrics small { display: block; color: #374151; font-size: 13px; font-weight: 700; line-height: 1.5; margin-bottom: 10px; }
.home-shell .brand-metrics strong { display: block; color: #111827; font-size: clamp(23px, 2.15vw, 31px); font-weight: 750; letter-spacing: -.045em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.home-shell .brand-metrics > div:nth-child(2) small { color: var(--brand-accent-dark); }
.home-shell .brand-metrics > div:nth-child(2) strong { color: var(--brand-accent-dark); font-size: clamp(27px,2.45vw,35px); font-weight: 850; }
.metric-caption { display: block; color: #596273; font-size: 11px; font-weight: 550; line-height: 1.45; margin-top: 9px; }
.home-shell .brand-metrics > div:nth-child(2) .metric-caption { color: var(--brand-accent-dark); font-weight: 700; }
/* KPI target: <= $5 = good, > $5 = not meeting target. */
.home-shell .brand-metrics .primary-kpi.kpi-good { background: #ecfeff; border-color: #22b8b5; box-shadow: 0 7px 22px rgba(13,148,136,.16); }
.home-shell .brand-metrics .primary-kpi.kpi-good::before { background: #0f9f98; }
.home-shell .brand-metrics .primary-kpi.kpi-good small,
.home-shell .brand-metrics .primary-kpi.kpi-good strong,
.home-shell .brand-metrics .primary-kpi.kpi-good .metric-caption { color: #0f6f6a; }
.home-shell .brand-metrics .primary-kpi.kpi-bad { background: #fff1f2; border-color: #ef4444; box-shadow: 0 7px 22px rgba(220,38,38,.15); }
.home-shell .brand-metrics .primary-kpi.kpi-bad::before { background: #dc2626; }
.home-shell .brand-metrics .primary-kpi.kpi-bad small,
.home-shell .brand-metrics .primary-kpi.kpi-bad strong,
.home-shell .brand-metrics .primary-kpi.kpi-bad .metric-caption { color: #b91c1c; }
.home-shell .brand-metrics .primary-kpi.kpi-neutral { background: #f8fafc; border-color: #cbd5e1; box-shadow: none; }
.home-shell .brand-metrics .primary-kpi.kpi-neutral::before { background: #64748b; }
.kpi-target-status { display: inline-flex; margin-top: 10px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1; }
.kpi-good .kpi-target-status { color: #0f6f6a; background: #ccfbf1; border: 1px solid #5eead4; }
.kpi-bad .kpi-target-status { color: #b91c1c; background: #fee2e2; border: 1px solid #fca5a5; }
.kpi-neutral .kpi-target-status { color: #475569; background: #e2e8f0; border: 1px solid #cbd5e1; }
.brand-secondary-metric { color: #374151; font-size: 12px; line-height: 1.5; }
.brand-secondary-metric b { color: #111827; }
.brand-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #e7eaf0; padding-top: 22px; margin-top: auto; flex-wrap: wrap; }
.brand-kpi-note { font-size: 12px; font-weight: 650; color: #374151; }
.brand-kpi-note > span { color: var(--brand-accent); font-size: 16px; vertical-align: -1px; margin-right: 3px; }
.home-shell .brand-enter { display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 12px 16px; min-height: 44px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #172131; transition: background .15s; }
.home-shell .brand-enter:hover { background: #334156; }
.home-shell .brand-enter > span { font-size: 17px; font-weight: 400; }
.home-shell :is(button, a):focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; }
.brand-error { padding: 12px; border: 1px solid #f4cfc9; border-radius: 10px; background: #fff7f5; color: #a13d32; margin-bottom: 20px; }
.brand-error p { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.brand-retry { margin-top: 10px; min-height: 44px; color: #a13d32; background: #fff; border: 1px solid #f4cfc9; }
.home-footnote { margin: 24px 0 0; color: #4b5563; font-size: 12px; font-weight: 550; text-align: center; }
@media (max-width: 1100px) {
  .home-top { align-items: flex-start; flex-direction: column; gap: 24px; margin-bottom: 36px; }
  .home-controls { width: 100%; justify-content: space-between; }
  .home-shell .brand-card-mp { padding: 24px; }
  .home-shell .brand-card-mp h2 { font-size: 20px; }
  .home-shell .brand-metrics > div { padding: 14px 12px; }
  .home-shell .brand-card-foot { align-items: stretch; flex-direction: column; gap: 14px; }
}
@media (max-width: 800px) {
  .home-shell { padding: 28px 20px; }
  .home-shell .brand-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .home-shell .brand-card-foot { flex-direction: row; align-items: center; }
  .home-shell .brand-metrics strong { font-size: 30px; }
  .home-shell .brand-metrics > div:nth-child(2) strong { font-size: 34px; }
}
@media (max-width: 480px) {
  .home-shell { padding: 20px 14px; }
  .home-top { gap: 18px; margin-bottom: 28px; }
  .home-top .eyebrow { font-size: 12px; margin-bottom: 10px; }
  .home-top h1 { font-size: 30px; }
  .home-top .muted { font-size: 15px; line-height: 1.6; color: #374151; }
  .home-controls { gap: 8px; align-items: flex-end; }
  .control-label { font-size: 13px; }
  .home-controls .period { padding: 10px 13px; font-size: 14px; font-weight: 650; }
  .home-controls #logoutButton { padding: 9px 10px; font-size: 13px; color: #374151; }
  .brands-heading { align-items: flex-start; margin-bottom: 16px; }
  .brands-heading h2 { font-size: 20px; }
  .brands-heading p { font-size: 14px; line-height: 1.5; color: #374151; }
  .source-label { display: none; }
  .home-shell .brand-card-mp { padding: 20px 16px; border-radius: 16px; border-top-width: 5px; }
  .brand-identity { gap: 10px; }
  .brand-monogram { flex-basis: 42px; height: 42px; border-radius: 12px; font-size: 22px; }
  .home-shell .brand-identity .eyebrow { font-size: 11px; }
  .home-shell .brand-card-mp h2 { font-size: 22px; }
  .home-shell .brand-top { gap: 12px; }
  .home-shell .brand-status { font-size: 12px; padding: 7px 10px; }
  .brand-period { margin-top: 24px; font-size: 13px; color: #374151; }
  .home-shell .brand-metrics { grid-template-columns: 1fr; margin: 14px 0 20px; gap: 10px; }
  .home-shell .brand-metrics > div,
  .home-shell .brand-metrics > div:first-child,
  .home-shell .brand-metrics > div:last-child { padding: 14px 12px; }
  .home-shell .brand-metrics > div + div { border-left: 1px solid transparent; border-top: 1px solid transparent; }
  .home-shell .brand-metrics > div:not(:nth-child(2)) { background: rgba(255,255,255,.72); border-color: #e5e7eb; }
  .home-shell .brand-metrics > div:nth-child(2) { padding: 17px 14px; transform: none; }
  .home-shell .brand-metrics > div:nth-child(2)::before { font-size: 10px; margin-bottom: 9px; }
  .home-shell .brand-metrics small { font-size: 14px; min-height: 0; margin-bottom: 5px; color: #374151; }
  .home-shell .brand-metrics strong { font-size: 32px; line-height: 1.1; }
  .home-shell .brand-metrics > div:nth-child(2) strong { font-size: 38px; }
  .metric-caption { font-size: 13px; margin-top: 5px; color: #4b5563; }
  .kpi-target-status { font-size: 11px; padding: 6px 9px; }
  .brand-secondary-metric { font-size: 13px; padding: 12px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 9px; color: #374151; }
  .brand-kpi-note { font-size: 13px; color: #374151; }
  .home-shell .brand-card-foot { align-items: stretch; flex-direction: column; }
  .home-shell .brand-enter { width: 100%; min-height: 48px; font-size: 14px; justify-content: space-between; }
  .home-footnote { font-size: 13px; color: #4b5563; line-height: 1.5; }
}
