:root {
  color-scheme: light;
  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-200: #bae6fd;
  --brand-500: #0284c7;
  --brand-600: #0369a1;
  --brand-700: #075985;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --emerald-50: #ecfdf5;
  --emerald-700: #047857;
  --amber-50: #fffbeb;
  --amber-700: #b45309;
  --rose-50: #fff1f2;
  --rose-700: #be123c;
  --surface: #ffffff;
  --line: var(--slate-200);
  --ink: var(--slate-900);
  --muted: var(--slate-500);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 0; background: var(--slate-50); }
body { min-width: 0; margin: 0; overflow-x: hidden; color: var(--ink); background: var(--slate-50); font-size: 14px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}
button:disabled { cursor: not-allowed; opacity: 0.45; }

.brand { display: flex; align-items: center; gap: 0.65rem; min-width: 0; color: var(--slate-900); text-decoration: none; }
.brand-mark { display: grid; flex: 0 0 auto; place-items: center; width: 2rem; height: 2rem; border-radius: 0.5rem; color: white; background: var(--brand-600); box-shadow: 0 5px 12px rgba(3, 105, 161, 0.2); font-size: 1rem; font-weight: 800; }
.brand-logo { display: block; width: 7.375rem; max-width: 100%; height: auto; }
.brand-product { color: var(--slate-400); font-size: 0.62rem; font-weight: 750; letter-spacing: 0.12em; line-height: 1; text-transform: uppercase; }
.brand-copy { min-width: 0; }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { color: var(--slate-900); font-size: 1.2rem; font-weight: 750; letter-spacing: -0.025em; line-height: 1.1; }
.brand-copy small { margin-top: 0.22rem; color: var(--slate-400); font-size: 0.62rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.brand--center { justify-content: center; margin-bottom: 1.8rem; }

.eyebrow { margin: 0 0 0.28rem; color: var(--slate-400); font-size: 0.65rem; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.55; }

/* Secure login, adapted from the December centered portal card. */
.login-body { min-height: 100vh; background: var(--slate-100); }
.login-layout { display: grid; min-height: 100vh; place-items: center; padding: 1.5rem; }
.login-panel { width: min(100%, 430px); }
.login-card { border: 1px solid var(--slate-200); border-radius: 1rem; padding: clamp(1.75rem, 5vw, 2.5rem); background: var(--surface); box-shadow: var(--shadow-md); }
.login-card .eyebrow { margin-bottom: 0.55rem; color: var(--brand-600); text-align: center; }
.login-card h1 { margin: 0; color: var(--slate-900); font-size: 1.55rem; font-weight: 750; letter-spacing: -0.035em; line-height: 1.2; text-align: center; }
.login-card > .muted { margin: 0.65rem auto 0; max-width: 320px; font-size: 0.86rem; text-align: center; }
.auth-form { display: grid; gap: 0.55rem; margin-top: 1.75rem; }
.auth-form label { margin-top: 0.45rem; color: var(--slate-700); font-size: 0.78rem; font-weight: 650; }
.auth-form input { width: 100%; min-height: 2.65rem; border: 1px solid var(--slate-300); border-radius: 0.5rem; padding: 0.65rem 0.8rem; color: var(--slate-900); background: white; box-shadow: var(--shadow-sm); outline: none; }
.auth-form input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16); }
.auth-form .button--primary { width: 100%; margin-top: 0.85rem; }
.alert { margin-top: 1.25rem; border: 1px solid #fecdd3; border-radius: 0.5rem; padding: 0.75rem 0.9rem; color: var(--rose-700); background: var(--rose-50); font-size: 0.8rem; line-height: 1.5; }

/* December Business App shell. */
.app-shell { min-height: 100vh; background: var(--slate-50); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: 256px; height: 100vh; flex-direction: column; border-right: 1px solid var(--slate-200); background: white; }
.sidebar > .brand { min-height: 127px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 0.7rem; border-bottom: 1px solid var(--slate-100); padding: 1.45rem 1.5rem 1.2rem; }
.sidebar nav { display: grid; gap: 0.2rem; min-height: 0; overflow-y: auto; padding: 1.45rem 0.75rem; }
.nav-link { display: flex; align-items: center; gap: 0.75rem; min-height: 2.7rem; border-radius: 0.5rem; padding: 0.68rem 0.9rem; color: var(--slate-600); font-size: 0.82rem; font-weight: 600; text-decoration: none; transition: color 150ms ease, background 150ms ease; }
.nav-link:hover { color: var(--slate-900); background: var(--slate-50); }
.nav-link--active { color: var(--brand-700); background: var(--brand-50); }
.nav-icon { flex: 0 0 auto; width: 1.12rem; height: 1.12rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar__user { display: flex; align-items: center; gap: 0.7rem; margin-top: auto; border-top: 1px solid var(--slate-100); padding: 1rem; }
.sidebar__user > span:last-child { min-width: 0; }
.sidebar__user strong, .sidebar__user small { display: block; max-width: 156px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user strong { color: var(--slate-700); font-size: 0.78rem; font-weight: 650; }
.sidebar__user small { margin-top: 0.16rem; color: var(--slate-400); font-size: 0.65rem; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--brand-700); background: var(--brand-100); font-size: 0.7rem; font-weight: 800; }

.workspace { min-width: 0; min-height: 100vh; margin-left: 256px; }
.context-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-width: 0; height: 64px; border-bottom: 1px solid var(--slate-200); padding: 0 2rem; background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(10px); }
.context-title { min-width: 0; }
.context-header h1 { max-width: min(44vw, 620px); margin: 0; overflow: hidden; color: var(--slate-900); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; min-width: 0; align-items: center; gap: 0.42rem; }
.header-actions form { display: contents; }
.icon { width: 1.08rem; height: 1.08rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button, .icon-text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.2rem; border: 0; border-radius: 999px; color: var(--slate-500); background: transparent; text-decoration: none; transition: color 150ms ease, background 150ms ease; }
.icon-button { width: 2.2rem; padding: 0; }
.icon-text-button { gap: 0.45rem; padding: 0 0.72rem; font-size: 0.72rem; font-weight: 600; }
.icon-button:not(:disabled):hover, .icon-text-button:hover { color: var(--slate-800); background: var(--slate-100); }
.language-switcher { display: flex; align-items: center; gap: 0.15rem; margin-right: 0.35rem; border-right: 1px solid var(--slate-200); padding-right: 0.7rem; color: var(--slate-400); }
.language-switcher .icon { margin-right: 0.18rem; width: 0.9rem; height: 0.9rem; }
.language-switcher button, .language-switcher__active { display: grid; min-width: 1.7rem; height: 1.65rem; place-items: center; border: 0; border-radius: 0.35rem; padding: 0 0.32rem; font-size: 0.58rem; font-weight: 800; }
.language-switcher__active { color: white; background: var(--brand-600); }
.language-switcher button { color: var(--slate-400); background: transparent; }
.workspace-content { min-width: 0; padding: 2rem; }

.button--primary, .button--quiet { display: inline-flex; min-height: 2.4rem; align-items: center; justify-content: center; border-radius: 0.5rem; padding: 0.58rem 0.9rem; font-size: 0.75rem; font-weight: 650; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease; }
.button--primary { border: 1px solid var(--brand-600); color: white; background: var(--brand-600); box-shadow: var(--shadow-sm); }
.button--primary:hover { border-color: var(--brand-700); background: var(--brand-700); }
.button--primary:disabled { cursor: wait; opacity: 0.65; }
.button--quiet { border: 1px solid var(--slate-300); color: var(--slate-700); background: white; }
.button--quiet:hover { border-color: var(--slate-400); background: var(--slate-50); }
.link-button { margin-top: 1.3rem; }

/* Issue 22 overview: December dashboard composition with server-owned values and states. */
.overview-dashboard { display: grid; min-width: 0; gap: 1rem; }
.overview-heading { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.35rem; }
.overview-heading > div { min-width: 0; }
.overview-heading h2 { margin: 0; color: var(--slate-900); font-size: clamp(1.45rem, 2.5vw, 1.75rem); font-weight: 780; letter-spacing: -0.04em; line-height: 1.15; }
.overview-heading p { max-width: 680px; margin: 0.42rem 0 0; color: var(--slate-500); font-size: 0.82rem; line-height: 1.55; }
.overview-source { display: flex; flex: 0 1 auto; min-width: 0; align-items: center; gap: 0.45rem; border: 1px solid var(--slate-200); border-radius: 999px; padding: 0.42rem 0.65rem; color: var(--slate-500); background: white; font-size: 0.64rem; line-height: 1.3; box-shadow: var(--shadow-sm); }
.overview-source svg { flex: 0 0 auto; width: 0.85rem; height: 0.85rem; color: var(--brand-600); }
.overview-source span { min-width: 0; overflow-wrap: anywhere; }
.overview-heading__actions { display: flex; flex: 0 1 auto; min-width: 0; align-items: center; justify-content: flex-end; gap: 0.65rem; }
.daily-summary-form { flex: 0 0 auto; }
.daily-summary-button { gap: 0.42rem; }

/* Issue 23 grounded daily summary. */
.daily-summary { min-width: 0; overflow: hidden; border: 0; border-radius: 0.8rem; padding: 1.25rem; color: white; background: linear-gradient(140deg, var(--slate-900), #0c4a6e); box-shadow: var(--shadow-md); }
.daily-summary__header { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.daily-summary__header > div { min-width: 0; }
.daily-summary__eyebrow { margin: 0 0 0.42rem; color: #7dd3fc; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; line-height: 1.35; text-transform: uppercase; }
.daily-summary h3 { margin: 0; color: white; font-size: 1.08rem; font-weight: 750; letter-spacing: -0.02em; }
.daily-summary__status { flex: 0 0 auto; border: 1px solid rgba(186, 230, 253, 0.35); border-radius: 999px; padding: 0.3rem 0.55rem; color: #e0f2fe; background: rgba(255, 255, 255, 0.08); font-size: 0.58rem; font-weight: 750; }
.daily-summary__findings { display: grid; gap: 0; margin: 1rem 0 0; padding: 0; list-style: none; }
.daily-summary__findings li { border-top: 1px solid rgba(186, 230, 253, 0.17); padding: 0.82rem 0; }
.daily-summary__findings p { margin: 0; color: #dbeafe; font-size: 0.78rem; line-height: 1.55; }
.daily-summary__sources { display: flex; flex-wrap: wrap; gap: 0.42rem 0.75rem; margin-top: 0.48rem; }
.daily-summary__sources span { display: inline-flex; flex-wrap: wrap; gap: 0.28rem; align-items: baseline; }
.daily-summary__sources a { color: var(--brand-200); font-size: 0.66rem; font-weight: 700; overflow-wrap: anywhere; text-underline-offset: 0.16rem; }
.daily-summary__sources a:hover { color: white; }
.daily-summary__sources time { color: #7dd3fc; font-size: 0.59rem; }
.daily-summary__state { margin-top: 1rem; border: 1px solid rgba(186, 230, 253, 0.2); border-radius: 0.62rem; padding: 0.9rem; background: rgba(255, 255, 255, 0.06); }
.daily-summary__state strong { display: block; color: white; font-size: 0.78rem; }
.daily-summary__state p { margin: 0.32rem 0 0; max-width: 720px; color: #dbeafe; font-size: 0.72rem; line-height: 1.55; }
.daily-summary__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.45rem 1rem; margin: 0.7rem -1.25rem -1.25rem; border-top: 1px solid rgba(186, 230, 253, 0.17); padding: 0.72rem 1.25rem; color: var(--brand-200); font-size: 0.61rem; line-height: 1.4; }
.daily-summary__footer time { color: white; font-weight: 700; }
.daily-summary--loading { display: flex; align-items: center; gap: 0.9rem; min-height: 88px; }
.daily-summary--loading[hidden] { display: none; }
.daily-summary--loading strong { display: block; font-size: 0.78rem; }
.daily-summary--loading p { margin: 0.22rem 0 0; color: #dbeafe; font-size: 0.7rem; line-height: 1.45; }
.daily-summary__spinner { flex: 0 0 auto; width: 1.45rem; height: 1.45rem; border: 2px solid rgba(255, 255, 255, 0.28); border-top-color: white; border-radius: 50%; animation: daily-summary-spin 0.8s linear infinite; }
@keyframes daily-summary-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .daily-summary__spinner { animation: none; border-top-color: rgba(255, 255, 255, 0.28); background: white; } }

.overview-kpis { display: grid; min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.overview-card { min-width: 0; border: 1px solid var(--slate-200); border-radius: 0.75rem; background: white; box-shadow: var(--shadow-sm); }
.metric-card { position: relative; display: grid; min-height: 140px; align-content: start; padding: 1.1rem; }
.metric-card__label { max-width: calc(100% - 3rem); color: var(--slate-500); font-size: 0.72rem; font-weight: 650; }
.metric-card__value { margin-top: 0.55rem; overflow-wrap: anywhere; color: var(--slate-900); font-size: clamp(1.45rem, 2.4vw, 1.75rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.metric-card__value--unavailable { max-width: calc(100% - 2.75rem); color: var(--slate-700); font-size: 1rem; letter-spacing: -0.02em; }
.metric-card__detail { margin: 0.45rem 0 0; overflow-wrap: anywhere; color: var(--slate-500); font-size: 0.66rem; line-height: 1.45; }
.metric-card__detail--warning { color: var(--amber-700); }
.metric-card__icon { position: absolute; top: 1rem; right: 1rem; display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: 0.58rem; color: var(--brand-600); background: var(--brand-50); }
.metric-card__icon .nav-icon { width: 1.05rem; height: 1.05rem; }

.overview-primary { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.8fr); gap: 1rem; }
.overview-secondary { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(260px, 0.8fr); gap: 1rem; }
.overview-panel { display: grid; min-width: 0; align-content: start; padding: 1.2rem; }
.overview-panel__header { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.overview-panel__header h3 { margin: 0; color: var(--slate-900); font-size: 0.92rem; font-weight: 720; letter-spacing: -0.015em; }
.overview-panel__meta { color: var(--slate-500); font-size: 0.65rem; line-height: 1.4; text-align: right; }

.period-nav { display: flex; max-width: 100%; align-items: center; gap: 0.25rem; overflow-x: auto; border-radius: 0.48rem; padding: 0.2rem; background: var(--slate-100); scrollbar-width: none; }
.period-nav::-webkit-scrollbar { display: none; }
.period-nav a { flex: 0 0 auto; border-radius: 0.36rem; padding: 0.32rem 0.5rem; color: var(--slate-500); font-size: 0.62rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.period-nav a:hover { color: var(--slate-800); background: rgba(255, 255, 255, 0.7); }
.period-nav a[aria-current="page"] { color: var(--brand-700); background: white; box-shadow: var(--shadow-sm); }

.overview-unavailable { display: grid; min-height: 190px; place-items: center; border: 1px dashed var(--slate-300); border-radius: 0.65rem; padding: 1.4rem; background: var(--slate-50); text-align: center; }
.overview-unavailable--compact { min-height: 138px; }
.overview-unavailable > div { max-width: 390px; }
.overview-unavailable__icon { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; margin: 0 auto 0.75rem; border-radius: 0.58rem; color: var(--slate-500); background: white; box-shadow: var(--shadow-sm); }
.overview-unavailable__icon svg { width: 1.05rem; height: 1.05rem; }
.overview-unavailable strong { display: block; color: var(--slate-700); font-size: 0.78rem; }
.overview-unavailable p { margin: 0.32rem 0 0; overflow-wrap: anywhere; color: var(--slate-500); font-size: 0.68rem; line-height: 1.5; }
.overview-unavailable--error { border-color: #fecdd3; background: var(--rose-50); }
.overview-unavailable--error .overview-unavailable__icon { color: var(--rose-700); }

.attention-list, .activity-list, .catalogue-health { display: grid; min-width: 0; gap: 0; margin: 0; padding: 0; list-style: none; }
.attention-item, .overview-activity-item, .catalogue-health__item { display: flex; min-width: 0; align-items: flex-start; gap: 0.68rem; border-bottom: 1px solid var(--slate-100); padding: 0.72rem 0; }
.attention-item:last-child, .overview-activity-item:last-child, .catalogue-health__item:last-child { border-bottom: 0; }
.attention-item__dot, .catalogue-health__dot { flex: 0 0 auto; width: 0.48rem; height: 0.48rem; margin-top: 0.35rem; border-radius: 50%; background: var(--amber-700); }
.attention-item > span:last-child, .overview-activity-item > span:last-child { min-width: 0; }
.attention-item strong, .overview-activity-item strong { display: block; overflow-wrap: anywhere; color: var(--slate-800); font-size: 0.74rem; line-height: 1.4; }
.attention-item small, .overview-activity-item small { display: block; margin-top: 0.18rem; overflow-wrap: anywhere; color: var(--slate-500); font-size: 0.65rem; line-height: 1.45; }
.catalogue-health__item { align-items: center; }
.catalogue-health__dot { margin-top: 0; }
.catalogue-health__dot--current { background: #059669; }
.catalogue-health__dot--stale { background: #d97706; }
.catalogue-health__dot--removed { background: #e11d48; }
.catalogue-health__dot--missing { background: var(--slate-300); }
.catalogue-health__label { min-width: 0; overflow-wrap: anywhere; color: var(--slate-600); font-size: 0.7rem; }
.catalogue-health__value { margin-left: auto; color: var(--slate-900); font-size: 0.78rem; font-weight: 750; }
.overview-panel__footer { margin: 0.75rem -1.2rem -1.2rem; border-top: 1px solid var(--slate-100); padding: 0.72rem 1.2rem; color: var(--slate-500); font-size: 0.63rem; line-height: 1.45; }
.overview-panel__footer time { color: var(--slate-700); font-weight: 650; }

/* Legacy empty-module shell primitives remain available outside Overview. */
.dashboard { display: grid; gap: 1.5rem; }
.dashboard__headline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dashboard__headline h2 { margin: 0; color: var(--slate-900); font-size: 1.5rem; font-weight: 750; letter-spacing: -0.035em; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat-card { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.85rem; border: 1px solid var(--slate-200); border-radius: 0.75rem; padding: 1.15rem; background: white; box-shadow: var(--shadow-sm); text-decoration: none; transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.stat-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card__icon { display: grid; width: 2.65rem; height: 2.65rem; place-items: center; border-radius: 0.65rem; color: var(--brand-600); background: var(--brand-50); }
.stat-card__icon .nav-icon, .empty-state__icon .nav-icon { width: 1.2rem; height: 1.2rem; }
.stat-card small, .stat-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-card small { color: var(--slate-400); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.stat-card strong { margin-top: 0.25rem; color: var(--slate-900); font-size: 0.94rem; }
.stat-card__status { grid-column: 2; width: fit-content; border: 1px solid var(--slate-200); border-radius: 999px; padding: 0.12rem 0.42rem; color: var(--slate-600); background: var(--slate-100); font-size: 0.58rem; font-weight: 700; }
.activity-card { border: 1px solid var(--slate-200); border-radius: 0.75rem; background: white; box-shadow: var(--shadow-sm); }
.activity-card h3 { margin: 0; border-bottom: 1px solid var(--slate-100); padding: 1rem 1.2rem; font-size: 0.94rem; }
.activity-row { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1.15rem 1.2rem; }
.activity-row strong, .activity-row small { display: block; }
.activity-row strong { color: var(--slate-800); font-size: 0.82rem; }
.activity-row small { margin-top: 0.25rem; color: var(--slate-500); font-size: 0.72rem; line-height: 1.5; }

.empty-state { display: grid; max-width: 620px; justify-items: center; margin: clamp(2rem, 9vh, 5rem) auto 0; border: 1px solid var(--slate-200); border-radius: 0.85rem; padding: clamp(2rem, 6vw, 3.2rem); background: white; box-shadow: var(--shadow-sm); text-align: center; }
.empty-state__icon { display: grid; width: 3.2rem; height: 3.2rem; place-items: center; margin-bottom: 1.2rem; border-radius: 0.75rem; color: var(--brand-600); background: var(--brand-50); font-size: 1.3rem; font-weight: 800; }
.empty-state h2 { margin: 0; color: var(--slate-900); font-size: 1.35rem; font-weight: 750; letter-spacing: -0.03em; }
.empty-state > p:last-of-type { max-width: 460px; margin: 0.65rem 0 0; color: var(--slate-500); font-size: 0.82rem; line-height: 1.6; }
.empty-state--error .empty-state__icon { color: var(--rose-700); background: var(--rose-50); }

/* Catalogue cards, filters, state banners, detail and tables. */
.catalogue-content { display: grid; min-width: 0; gap: 1.35rem; }
.sync-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem 1rem; color: var(--slate-500); font-size: 0.72rem; }
.status-dot { width: 0.48rem; height: 0.48rem; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px #d1fae5; }
.state-banner { display: flex; min-width: 0; align-items: flex-start; border: 1px solid var(--slate-200); border-left-width: 4px; border-radius: 0.65rem; padding: 0.9rem 1rem; background: white; box-shadow: var(--shadow-sm); }
.state-banner strong { display: block; color: var(--slate-800); font-size: 0.8rem; }
.state-banner p { margin: 0.25rem 0 0; overflow-wrap: anywhere; color: var(--slate-600); font-size: 0.72rem; line-height: 1.5; }
.state-banner--neutral { border-left-color: var(--slate-400); background: var(--slate-50); }
.state-banner--success { border-color: #a7f3d0; border-left-color: #10b981; background: var(--emerald-50); }
.state-banner--warning { border-color: #fde68a; border-left-color: #f59e0b; background: var(--amber-50); }
.state-banner--error { border-color: #fecdd3; border-left-color: #e11d48; background: var(--rose-50); }

.catalogue-filters { display: grid; min-width: 0; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(132px, 1fr)) auto; align-items: end; gap: 0.75rem; border: 1px solid var(--slate-200); border-radius: 0.75rem; padding: 1rem; background: white; box-shadow: var(--shadow-sm); }
.filter-field { display: grid; min-width: 0; gap: 0.38rem; }
.filter-field label { color: var(--slate-700); font-size: 0.66rem; font-weight: 700; }
.filter-field input, .filter-field select { width: 100%; min-width: 0; min-height: 2.55rem; border: 1px solid var(--slate-300); border-radius: 0.5rem; padding: 0.58rem 0.7rem; color: var(--slate-800); background: white; box-shadow: var(--shadow-sm); outline: none; }
.filter-field input:focus, .filter-field select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14); }
.filter-submit { min-height: 2.55rem; }
.catalogue-summary { display: flex; flex-wrap: wrap; gap: 0.3rem; color: var(--slate-500); font-size: 0.72rem; }
.catalogue-summary strong { color: var(--slate-800); }

.product-grid { display: grid; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.product-card { display: grid; min-width: 0; min-height: 270px; align-content: space-between; gap: 1.15rem; border: 1px solid var(--slate-200); border-radius: 0.75rem; padding: 1.2rem; background: white; box-shadow: var(--shadow-sm); transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.product-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.product-card__topline { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 0.7rem; }
.product-card__source, .variant-id { min-width: 0; overflow-wrap: anywhere; color: var(--slate-400); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.62rem; }
.product-card__brand { margin: 0 0 0.38rem; color: var(--brand-600); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.product-card h2 { margin: 0; overflow-wrap: anywhere; color: var(--slate-900); font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.product-card h2 a { text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.product-card h2 a:hover { color: var(--brand-700); text-decoration-color: currentColor; }
.product-card__meta, .product-card__seen { margin: 0.44rem 0 0; overflow-wrap: anywhere; color: var(--slate-500); font-size: 0.69rem; line-height: 1.45; }
.product-facts { display: grid; min-width: 0; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0; border-top: 1px solid var(--slate-100); padding-top: 0.85rem; }
.product-facts div { min-width: 0; }
.product-facts dt, .detail-metadata dt, .variant-identifiers dt { color: var(--slate-400); font-size: 0.61rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.product-facts dd { margin: 0.24rem 0 0; overflow-wrap: anywhere; color: var(--slate-800); font-size: 0.78rem; font-weight: 700; }
.missing-value { color: var(--amber-700); font-weight: 650; }
.status-badge { display: inline-flex; width: fit-content; max-width: 100%; border: 1px solid var(--slate-200); border-radius: 999px; padding: 0.2rem 0.48rem; overflow-wrap: anywhere; font-size: 0.57rem; font-weight: 750; letter-spacing: 0.04em; line-height: 1.25; text-transform: uppercase; }
.status-badge--active { border-color: #a7f3d0; color: var(--emerald-700); background: var(--emerald-50); }
.status-badge--follow-up { border-color: #fde68a; color: var(--amber-700); background: var(--amber-50); }
.status-badge--inactive { border-color: var(--slate-300); color: var(--slate-600); background: var(--slate-100); }
.status-badge--stale { border-color: #fde68a; color: var(--amber-700); background: var(--amber-50); }
.status-badge--removed { border-color: #fecdd3; color: var(--rose-700); background: var(--rose-50); }
.empty-state--catalogue { margin-top: 0.5rem; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.8rem; color: var(--slate-500); font-size: 0.72rem; }
.pagination a { border: 1px solid var(--slate-300); border-radius: 0.5rem; padding: 0.5rem 0.7rem; color: var(--slate-700); background: white; text-decoration: none; box-shadow: var(--shadow-sm); }
.pagination a:hover { border-color: #7dd3fc; color: var(--brand-700); }

.catalogue-detail { gap: 1.4rem; }
.back-link { width: fit-content; color: var(--brand-600); font-size: 0.73rem; font-weight: 650; text-underline-offset: 0.2em; }
.detail-overview { display: grid; min-width: 0; grid-template-columns: minmax(210px, 0.75fr) minmax(360px, 1.25fr); gap: clamp(1.5rem, 4vw, 3.5rem); border: 1px solid var(--slate-200); border-radius: 0.75rem; padding: 1.5rem; background: white; box-shadow: var(--shadow-sm); }
.detail-overview h2, .section-heading h2 { margin: 0; color: var(--slate-900); font-size: 1.35rem; font-weight: 750; letter-spacing: -0.03em; }
.detail-lede { max-width: 420px; color: var(--slate-500); font-size: 0.8rem; line-height: 1.6; }
.detail-metadata { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1.25rem; margin: 0; }
.detail-metadata div { min-width: 0; border-bottom: 1px solid var(--slate-100); padding-bottom: 0.65rem; }
.detail-metadata dd, .variant-identifiers dd { margin: 0.28rem 0 0; overflow-wrap: anywhere; color: var(--slate-700); font-size: 0.74rem; line-height: 1.45; }

/* CRM-owned account directory, forms, detail, and explicit future placeholders. */
.status-badge--trade { border-color: var(--slate-300); color: var(--slate-700); background: var(--slate-200); }
.status-badge--consumer { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.accounts-content { display: grid; min-width: 0; gap: 1.35rem; }
.accounts-heading { display: flex; min-width: 0; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.accounts-heading h2 { margin: 0; color: var(--slate-900); font-size: 1.35rem; letter-spacing: -0.03em; }
.accounts-heading p { margin: 0.35rem 0 0; color: var(--slate-500); font-size: 0.76rem; }
.view-toggle { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--slate-300); border-radius: 0.55rem; padding: 0.18rem; background: white; box-shadow: var(--shadow-sm); }
.view-toggle a { border-radius: 0.38rem; padding: 0.46rem 0.72rem; color: var(--slate-500); font-size: 0.7rem; font-weight: 700; text-decoration: none; }
.view-toggle a.view-toggle__active { color: white; background: var(--brand-600); }
.accounts-content .account-filters { grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(132px, 1fr)) auto; }
.account-grid { display: grid; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.placeholder-grid { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.account-card, .placeholder-card, .account-form-card { min-width: 0; border: 1px solid var(--slate-200); border-radius: 0.75rem; background: white; box-shadow: var(--shadow-sm); }
.account-card { display: grid; min-height: 240px; align-content: space-between; gap: 1.15rem; padding: 1.2rem; transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.account-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.account-card, .account-card dd, .account-card h2, .product-card__source, .detail-metadata dd { overflow-wrap: anywhere; }
.account-card h2 { margin: 0; color: var(--slate-900); font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.account-card h2 a { text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.account-card h2 a:hover { color: var(--brand-700); text-decoration-color: currentColor; }
.account-facts { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0; border-top: 1px solid var(--slate-100); padding-top: 0.85rem; }
.account-facts div { min-width: 0; }
.account-facts dt { color: var(--slate-400); font-size: 0.59rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.account-facts dd { margin: 0.24rem 0 0; overflow-wrap: anywhere; color: var(--slate-800); font-size: 0.72rem; font-weight: 700; }
.account-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--slate-200); border-radius: 0.75rem; background: white; box-shadow: var(--shadow-sm); }
.account-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.72rem; }
.account-table thead { background: var(--slate-50); }
.account-table th { color: var(--slate-500); font-size: 0.58rem; letter-spacing: 0.05em; text-align: left; text-transform: uppercase; }
.account-table th, .account-table td { border-bottom: 1px solid var(--slate-100); padding: 0.78rem; vertical-align: top; }
.account-table tbody tr:last-child td { border-bottom: 0; }
.account-table td:first-child a { display: block; color: var(--slate-900); font-weight: 750; }
.account-table td:first-child small { display: block; margin-top: 0.2rem; color: var(--slate-500); }
.placeholder-card, .account-form-card { padding: 1.35rem; }
.placeholder-card { border-top: 3px solid var(--brand-600); }
.placeholder-card h2, .account-form-card h2 { margin: 0; color: var(--slate-900); font-size: 1.25rem; font-weight: 750; letter-spacing: -0.03em; }
.placeholder-card p:last-child { margin-bottom: 0; color: var(--slate-500); font-size: 0.8rem; line-height: 1.6; }
.account-detail { gap: 1.4rem; }
.account-summary-card { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; border: 1px solid var(--slate-200); border-radius: 0.75rem; padding: 1.2rem; background: white; box-shadow: var(--shadow-sm); }
.account-summary-card h2 { margin: 0; color: var(--slate-900); font-size: 1.15rem; }
.account-summary-card p, .account-summary-card small { display: block; margin: 0.3rem 0 0; overflow-wrap: anywhere; color: var(--slate-500); font-size: 0.72rem; }
.account-avatar { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: 0.75rem; color: white; background: var(--brand-600); font-weight: 800; }
.record-tabs { display: flex; min-width: 0; gap: 0.15rem; overflow-x: auto; border-bottom: 1px solid var(--slate-200); scrollbar-width: thin; }
.record-tab { flex: 0 0 auto; border-bottom: 2px solid transparent; padding: 0.7rem 0.85rem; color: var(--slate-500); font-size: 0.7rem; font-weight: 700; }
.record-tab--active { border-bottom-color: var(--brand-600); color: var(--brand-700); }
.account-detail-grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(240px, 0.34fr); gap: 1rem; align-items: start; }
.account-detail-grid .detail-overview { grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr); }
.commercial-snapshot { min-width: 0; border: 1px solid var(--slate-200); border-radius: 0.75rem; padding: 1.2rem; background: white; box-shadow: var(--shadow-sm); }
.commercial-snapshot h2 { margin: 0 0 0.8rem; color: var(--slate-900); font-size: 1rem; }
.commercial-snapshot dl { display: grid; margin: 0; }
.commercial-snapshot div { border-bottom: 1px solid var(--slate-100); padding: 0.72rem 0; }
.commercial-snapshot div:last-child { border-bottom: 0; }
.commercial-snapshot dt { color: var(--slate-500); font-size: 0.63rem; font-weight: 700; }
.commercial-snapshot dd { margin: 0.25rem 0 0; overflow-wrap: anywhere; font-size: 0.7rem; line-height: 1.45; }
.account-form { display: grid; min-width: 0; gap: 1rem; margin-top: 1.2rem; }
.account-form input, .account-form select { min-width: 0; max-width: 100%; }
.form-grid { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.2rem; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.provenance-list { display: grid; gap: 0.48rem; margin: 0; padding: 0; list-style: none; }
.provenance-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.38rem; }
.provenance-list small { flex-basis: 100%; color: var(--slate-500); }
.source-reference { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.65rem !important; }
.variant-section { display: grid; min-width: 0; gap: 1rem; }
.variant-list { display: grid; min-width: 0; gap: 0.9rem; }
.variant-card { min-width: 0; border: 1px solid var(--slate-200); border-top: 3px solid var(--brand-600); border-radius: 0.75rem; padding: 1.2rem; background: white; box-shadow: var(--shadow-sm); }
.variant-card > header { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.variant-card h3 { margin: 0.38rem 0 0; overflow-wrap: anywhere; color: var(--slate-900); font-size: 1rem; font-weight: 700; }
.variant-identifiers { display: grid; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.offer-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--slate-200); border-radius: 0.55rem; }
.offer-table { width: 100%; min-width: 700px; border-collapse: collapse; background: white; font-size: 0.71rem; }
.offer-table thead { background: var(--slate-50); }
.offer-table th { color: var(--slate-500); font-size: 0.59rem; font-weight: 700; letter-spacing: 0.05em; text-align: left; text-transform: uppercase; }
.offer-table th, .offer-table td { border-bottom: 1px solid var(--slate-200); padding: 0.68rem 0.75rem; white-space: nowrap; }
.offer-table tbody tr:last-child td { border-bottom: 0; }
.seller-default { margin-left: 0.28rem; border: 1px solid var(--slate-300); border-radius: 999px; padding: 0.12rem 0.34rem; color: var(--slate-700); background: var(--slate-200); font-size: 0.54rem; font-weight: 750; text-transform: uppercase; }
.missing-panel { border: 1px solid #fde68a; border-left: 3px solid #f59e0b; border-radius: 0.5rem; padding: 0.72rem 0.82rem; background: var(--amber-50); }
.missing-panel strong { color: var(--amber-700); font-size: 0.76rem; }
.missing-panel p { margin: 0.22rem 0 0; color: var(--slate-600); font-size: 0.7rem; line-height: 1.5; }

/* Issue 24 approved sales pipeline. */
.leads-content { display: grid; min-width: 0; gap: 1.25rem; }
.leads-heading { display: flex; min-width: 0; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.leads-heading > div { min-width: 0; }
.leads-heading h2 { margin: 0; color: var(--slate-900); font-size: clamp(1.45rem, 2.5vw, 1.75rem); font-weight: 780; letter-spacing: -0.04em; line-height: 1.15; }
.leads-heading p { margin: 0.42rem 0 0; color: var(--slate-500); font-size: 0.82rem; line-height: 1.55; }
.pipeline-value { display: inline-flex; flex: 0 0 auto; align-items: center; border-radius: 999px; padding: 0.38rem 0.62rem; color: var(--emerald-700); background: var(--emerald-50); font-size: 0.63rem; font-weight: 800; }
.lead-filters { display: grid; min-width: 0; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr)) auto; align-items: end; gap: 0.7rem; }
.lead-board { display: grid; min-width: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; align-items: start; }
.lead-column { min-width: 0; overflow: hidden; border-radius: 0.72rem; background: var(--slate-100); }
.lead-column__header { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 0.78rem; }
.lead-column__header h3, .lead-column__header strong { margin: 0; overflow-wrap: anywhere; color: var(--slate-700); font-size: 0.68rem; line-height: 1.35; }
.lead-column__header h3 { font-weight: 800; }
.lead-column__header h3 span { color: var(--slate-500); }
.lead-column__header strong { text-align: right; }
.lead-column__cards { display: grid; min-width: 0; gap: 0.65rem; padding: 0 0.65rem 0.65rem; }
.lead-card { display: grid; min-width: 0; gap: 0.7rem; border: 1px solid var(--slate-200); border-radius: 0.62rem; padding: 0.78rem; background: white; box-shadow: var(--shadow-sm); }
.lead-card__topline { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 0.55rem; }
.lead-card__topline a { min-width: 0; overflow-wrap: anywhere; color: var(--slate-900); font-size: 0.74rem; font-weight: 760; line-height: 1.35; text-decoration-color: transparent; text-underline-offset: 0.15em; }
.lead-card__topline a:hover { color: var(--brand-700); text-decoration-color: currentColor; }
.lead-card p { margin: 0; overflow-wrap: anywhere; color: var(--slate-600); font-size: 0.66rem; line-height: 1.45; }
.lead-card__meta { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 0.55rem; color: var(--slate-400); font-size: 0.58rem; line-height: 1.35; }
.lead-card__meta span { min-width: 0; overflow-wrap: anywhere; }
.lead-card__meta strong { flex: 0 0 auto; color: var(--slate-600); font-size: 0.63rem; white-space: nowrap; }
.lead-card__source { overflow-wrap: anywhere; color: var(--slate-400); font-size: 0.58rem; line-height: 1.35; }
.lead-column__empty { border: 1px dashed var(--slate-300); border-radius: 0.55rem; padding: 1rem 0.7rem; color: var(--slate-500); background: rgba(255, 255, 255, 0.45); font-size: 0.64rem; text-align: center; }
.status-badge--lead-new { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.status-badge--lead-contacted { border-color: var(--slate-300); color: var(--slate-700); background: var(--slate-200); }
.status-badge--lead-qualified, .status-badge--lead-won { border-color: #a7f3d0; color: var(--emerald-700); background: var(--emerald-50); }
.status-badge--lead-proposal { border-color: #fde68a; color: var(--amber-700); background: var(--amber-50); }
.status-badge--lead-lost { border-color: #fecdd3; color: var(--rose-700); background: var(--rose-50); }
.lead-detail { gap: 1.15rem; }
.lead-summary-card { margin-top: 0.1rem; }
.lead-actions { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.lead-actions form { display: contents; }
.lead-detail-grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.5fr); gap: 1rem; align-items: start; }
.lead-detail-grid .detail-overview { grid-template-columns: minmax(170px, 0.55fr) minmax(0, 1.45fr); }
.lead-history ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.lead-history li { display: grid; gap: 0.2rem; border-bottom: 1px solid var(--slate-100); padding: 0.7rem 0; }
.lead-history li:last-child { border-bottom: 0; }
.lead-history li strong { color: var(--slate-800); font-size: 0.7rem; }
.lead-history li span { overflow-wrap: anywhere; color: var(--slate-500); font-size: 0.62rem; line-height: 1.4; }
.lead-form-card { width: min(100%, 900px); }
.form-grid__full { grid-column: 1 / -1; }
.conversion-identity { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 1rem 0 0; }
.conversion-identity div { min-width: 0; border: 1px solid var(--slate-200); border-radius: 0.55rem; padding: 0.75rem; background: var(--slate-50); }
.conversion-identity dt { color: var(--slate-500); font-size: 0.6rem; font-weight: 750; text-transform: uppercase; }
.conversion-identity dd { margin: 0.25rem 0 0; overflow-wrap: anywhere; color: var(--slate-800); font-size: 0.72rem; }
.field-hint { color: var(--slate-500); font-size: 0.64rem; line-height: 1.45; }

/* Account-scoped contacts: the records are loaded through the authenticated contact API. */
.contact-loading, .contact-panel, .contact-form-card, .contact-summary-card, .contact-aside-card, .contact-card {
  min-width: 0;
  border: 1px solid var(--slate-200);
  border-radius: 0.75rem;
  background: white;
  box-shadow: var(--shadow-sm);
}
.contact-loading { padding: 1.4rem; }
.contact-loading h2, .contact-panel h2, .contact-form-card h2, .contact-aside-card h2 { margin: 0; color: var(--slate-900); font-size: 1.15rem; letter-spacing: -0.03em; }
.contact-loading p:last-child { margin: 0.45rem 0 0; color: var(--slate-500); font-size: 0.78rem; }
.contacts-heading, .contact-panel__header, .contact-summary-card__top, .contact-card__header, .contact-action-row { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.contacts-heading h2 { margin: 0; color: var(--slate-900); font-size: 1.35rem; letter-spacing: -0.03em; }
.contacts-heading p { margin: 0.35rem 0 0; color: var(--slate-500); font-size: 0.76rem; }
.contact-roster { display: grid; min-width: 0; gap: 1rem; }
.contact-panel, .contact-form-card, .contact-aside-card { padding: 1.2rem; }
.contact-panel__header { align-items: flex-start; border-bottom: 1px solid var(--slate-100); padding-bottom: 0.8rem; }
.contact-panel__header--spaced { margin-top: 1.2rem; }
.contact-panel__header h2 { font-size: 1rem; }
.contact-panel__header p { margin: 0.18rem 0 0; color: var(--slate-500); font-size: 0.68rem; }
.contact-list { display: grid; min-width: 0; gap: 0.72rem; margin-top: 0.9rem; }
.contact-card { display: grid; min-width: 0; gap: 0.7rem; padding: 0.9rem; }
.contact-card--featured { border-color: var(--brand-200); background: var(--brand-50); }
.contact-card__header { align-items: flex-start; }
.contact-card__identity { display: flex; min-width: 0; align-items: center; gap: 0.7rem; }
.contact-card__identity > div { min-width: 0; }
.contact-card__identity strong, .contact-card__identity small { display: block; overflow-wrap: anywhere; }
.contact-card__identity strong { color: var(--slate-900); font-size: 0.85rem; }
.contact-card__identity small { margin-top: 0.16rem; color: var(--slate-500); font-size: 0.67rem; }
.contact-avatar { display: grid; flex: 0 0 auto; width: 2.45rem; height: 2.45rem; place-items: center; border-radius: 0.65rem; color: var(--brand-700); background: var(--brand-50); font-size: 0.74rem; font-weight: 800; }
.contact-card__facts { display: grid; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; margin: 0; }
.contact-card__facts div { min-width: 0; }
.contact-card__facts dt, .contact-metadata dt { color: var(--slate-400); font-size: 0.58rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.contact-card__facts dd, .contact-metadata dd { margin: 0.22rem 0 0; overflow-wrap: anywhere; color: var(--slate-700); font-size: 0.7rem; line-height: 1.4; }
.contact-empty { border: 1px dashed var(--slate-300); border-radius: 0.6rem; padding: 1.15rem; color: var(--slate-500); background: var(--slate-50); font-size: 0.75rem; line-height: 1.5; }
.contact-summary-card { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.9rem; padding: 1.15rem; }
.contact-summary-card__top { grid-column: 2; align-items: flex-start; }
.contact-summary-card h2 { margin: 0; overflow-wrap: anywhere; color: var(--slate-900); font-size: 1.2rem; }
.contact-summary-card p { margin: 0.28rem 0 0; color: var(--slate-500); font-size: 0.72rem; }
.contact-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.contact-detail-grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.48fr); gap: 1rem; align-items: start; }
.contact-metadata { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; margin: 0.9rem 0 0; }
.contact-metadata div { min-width: 0; border-bottom: 1px solid var(--slate-100); padding-bottom: 0.65rem; }
.contact-metadata--single { grid-template-columns: 1fr; }
.contact-aside { display: grid; min-width: 0; gap: 1rem; }
.contact-aside-card dl { display: grid; margin: 0.8rem 0 0; }
.contact-aside-card dl div { border-bottom: 1px solid var(--slate-100); padding: 0.65rem 0; }
.contact-aside-card dl div:last-child { border-bottom: 0; }
.contact-aside-card dt { color: var(--slate-500); font-size: 0.62rem; font-weight: 700; }
.contact-aside-card dd { margin: 0.22rem 0 0; overflow-wrap: anywhere; color: var(--slate-800); font-size: 0.72rem; }
.contact-action-row { justify-content: flex-start; }
.contact-action-row--spaced { margin-top: 0.8rem; }
.contact-action-row .button--quiet[aria-disabled="true"] { cursor: not-allowed; opacity: 0.58; }
.contact-form { display: grid; min-width: 0; gap: 0.9rem; margin-top: 1rem; }
.contact-form .form-grid { align-items: end; }
.contact-form textarea { width: 100%; min-width: 0; min-height: 5.5rem; resize: vertical; border: 1px solid var(--slate-300); border-radius: 0.5rem; padding: 0.58rem 0.7rem; color: var(--slate-800); font: inherit; box-shadow: var(--shadow-sm); outline: none; }
.contact-form textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14); }
.contact-form .filter-field input, .contact-form .filter-field select { box-sizing: border-box; }
.contact-activity { display: grid; min-width: 0; gap: 0; margin-top: 0.95rem; padding: 0; list-style: none; }
.contact-activity li { border-bottom: 1px solid var(--slate-100); padding: 0.7rem 0; color: var(--slate-600); font-size: 0.72rem; }
.contact-activity li:last-child { border-bottom: 0; }
.contact-activity__item { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 0.8rem; }
.contact-activity__item > div { min-width: 0; }
.contact-activity__item strong { display: block; overflow-wrap: anywhere; color: var(--slate-800); font-size: 0.76rem; }
.contact-activity__item p { margin: 0.18rem 0 0; overflow-wrap: anywhere; color: var(--slate-500); font-size: 0.66rem; line-height: 1.45; }
.contact-activity__item time { flex: 0 0 auto; max-width: 42%; color: var(--slate-500); font-size: 0.62rem; line-height: 1.4; text-align: right; }

@media (max-width: 1180px) {
  .contact-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .contact-card__facts, .contact-metadata { grid-template-columns: 1fr; }
  .contact-summary-card { grid-template-columns: auto minmax(0, 1fr); }
  .contact-summary-card__top { grid-column: 1 / -1; }
  .contacts-heading .button--primary, .contact-action-row .button--primary, .contact-action-row .button--quiet { width: 100%; }
  .contact-activity__item { align-items: flex-start; flex-direction: column; gap: 0.26rem; }
  .contact-activity__item time { max-width: 100%; text-align: left; }
}

@media (max-width: 1180px) {
  .overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-primary { grid-template-columns: 1fr; }
  .overview-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-secondary > :last-child { grid-column: 1 / -1; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalogue-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-field--search { grid-column: 1 / -1; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accounts-content .account-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-detail-grid { grid-template-columns: 1fr; }
  .lead-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-filters .filter-field--search { grid-column: 1 / -1; }
  .lead-board { grid-template-columns: 1fr; }
  .lead-column__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; max-height: none; border-right: 0; border-bottom: 1px solid var(--slate-200); }
  .sidebar > .brand { min-height: 56px; align-items: center; flex-direction: row; justify-content: flex-start; gap: 0.8rem; border-bottom: 1px solid var(--slate-100); padding: 0.7rem 1rem; }
  .sidebar .brand-logo { width: 6.4rem; }
  .sidebar .brand-product { font-size: 0.55rem; }
  .sidebar .brand-copy small { display: none; }
  .sidebar nav { display: flex; gap: 0.22rem; overflow-x: auto; padding: 0.45rem 0.6rem; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .nav-link { flex: 0 0 auto; min-height: 2.35rem; gap: 0.42rem; padding: 0.52rem 0.7rem; font-size: 0.72rem; }
  .nav-icon { width: 0.95rem; height: 0.95rem; }
  .sidebar__user { display: none; }
  .workspace { margin-left: 0; }
  .context-header { top: 109px; height: 64px; padding: 0 1rem; }
  .workspace-content { padding: 1.2rem; }
  .language-switcher { display: none; }
  .header-actions > .icon-button:disabled { display: none; }
  .detail-overview { grid-template-columns: 1fr; }
  .lead-detail-grid .detail-overview { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .context-header h1 { max-width: 31vw; font-size: 0.94rem; }
  .context-header .eyebrow { display: none; }
  .header-actions { gap: 0.28rem; }
  .icon-text-button { width: 2.2rem; padding: 0; }
  .icon-text-button span { display: none; }
  .workspace-content { padding: 1rem; }
  .overview-heading { flex-direction: column; }
  .overview-heading__actions { width: 100%; align-items: stretch; flex-direction: column; }
  .daily-summary-form, .daily-summary-button { width: 100%; }
  .daily-summary__header { flex-direction: column; }
  .daily-summary__footer { align-items: flex-start; flex-direction: column; }
  .overview-source { width: fit-content; max-width: 100%; }
  .overview-kpis, .overview-secondary { grid-template-columns: 1fr; }
  .overview-secondary > :last-child { grid-column: auto; }
  .overview-panel__header { align-items: flex-start; flex-direction: column; }
  .overview-panel__meta { text-align: left; }
  .period-nav { width: 100%; }
  .metric-card { min-height: 132px; }
  .dashboard__headline { align-items: flex-start; flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr; }
  .catalogue-filters { grid-template-columns: 1fr; }
  .filter-field--search { grid-column: auto; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 240px; }
  .accounts-heading { align-items: flex-start; flex-direction: column; }
  .accounts-content .account-filters, .account-grid, .placeholder-grid, .form-grid { grid-template-columns: 1fr; }
  .account-card { min-height: 220px; }
  .account-summary-card { grid-template-columns: auto minmax(0, 1fr); }
  .account-summary-card > .status-badge { grid-column: 1 / -1; }
  .account-detail-grid .detail-overview { grid-template-columns: 1fr; }
  .leads-heading { align-items: flex-start; flex-direction: column; }
  .lead-filters { grid-template-columns: 1fr; }
  .lead-filters .filter-field--search { grid-column: auto; }
  .lead-column__cards { grid-template-columns: 1fr; }
  .lead-actions, .lead-actions .button--primary, .lead-actions .button--quiet { width: 100%; }
  .conversion-identity { grid-template-columns: 1fr; }
  .form-grid__full { grid-column: auto; }
  .detail-metadata { grid-template-columns: 1fr; }
  .variant-card > header { flex-direction: column; }
  .variant-identifiers { grid-template-columns: 1fr 1fr; }
  .empty-state { margin-top: 1rem; padding: 2rem 1.2rem; }
}

@media (max-width: 430px) {
  .login-layout { padding: 1rem; }
  .login-card { padding: 1.5rem; }
  .brand-copy strong { font-size: 1.05rem; }
  .context-header h1 { max-width: 28vw; }
  .button--primary, .button--quiet { padding-inline: 0.68rem; }
  .product-facts, .variant-identifiers { grid-template-columns: 1fr; }
  .account-facts { grid-template-columns: 1fr; }
  .account-card, .placeholder-card, .account-form-card { max-width: 100%; }
}
