:root {
  color-scheme: light;
  --ink: #182230;
  --ink-strong: #0b1830;
  --muted: #667085;
  --muted-light: #64748b;
  --line: #d8e2ee;
  --line-strong: #b8c7dc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --canvas: #f5f7fb;
  --lavender: #e3ecff;
  --lavender-mid: #c8d9fa;
  --lavender-deep: #adbfeb;
  --purple: #2563eb;
  --purple-dark: #1d4ed8;
  --purple-pale: #eff6ff;
  --gold: #f59e0b;
  --gold-dark: #b45309;
  --gold-pale: #fffbeb;
  --green: #16a34a;
  --green-pale: #ecfdf3;
  --shadow: 0 14px 34px rgba(15, 23, 42, .08);
  --shadow-raised: 0 16px 34px rgba(15, 23, 42, .16);
  --platinum-radius-control: 6px;
  --platinum-radius-card: 9px;
  --platinum-radius-surface: 12px;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .08), transparent 34%),
    linear-gradient(315deg, rgba(22, 163, 74, .06), transparent 30%),
    var(--canvas);
}
body.menu-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }

.crm-shell { min-height: 100vh; }
.crm-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 68px;
  padding: 0 22px;
  color: var(--ink-strong);
  border: 1px solid #6f82a4;
  background: linear-gradient(104deg, #e3ecff 0%, #c8d9fa 48%, #adbfeb 100%);
  box-shadow: inset 0 -4px 0 #98a6bd, 0 5px 10px rgba(21, 38, 68, .22);
}
.crm-menu-button {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  border: 1px solid #1c3458;
  border-radius: 6px;
  color: #102644;
  background: rgba(255, 255, 255, .14);
  box-shadow: none;
  font-size: 25px;
  line-height: 1;
}
.crm-menu-button:hover, .crm-menu-button:focus-visible {
  border-color: #102644;
  background: rgba(255, 255, 255, .34);
  color: #071831;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}
.brand:focus-visible { outline: 2px solid #1d3d6d; outline-offset: 4px; border-radius: 7px; }
.brand-platinum-mark {
  position: relative;
  display: block;
  flex: 0 0 46px;
  width: 46px;
  height: 40.94px;
  pointer-events: none;
  filter: drop-shadow(0 2px 0 #51516f) drop-shadow(0 4px 3px #17113840);
  transition: transform 160ms ease;
}
.brand-platinum-mark::before,
.brand-platinum-mark::after {
  position: absolute;
  inset: 0;
  clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);
}
.brand-platinum-mark::before {
  content: "";
  background: conic-gradient(from 35deg,#fbfcff,#b6c0d4 49deg,#596584 79deg,#eceefa 120deg,#858dab 167deg,#fff 207deg,#d8dfec 249deg,#8f99b4 277deg,#fff 311deg,#c7cce0);
}
.brand-platinum-mark::after {
  content: "PHS";
  inset: 9%;
  display: grid;
  place-items: center;
  color: #f2f3ff;
  background: linear-gradient(143deg,#615faa,#232151 44%,#100f32 76%,#615b99);
  font: 900 13px/1 Arial, sans-serif;
  letter-spacing: -.5px;
  text-shadow: 0 1px 1px #05041b90;
}
.brand:hover .brand-platinum-mark {
  transform: translateY(-1px);
}
.brand-copy { display: grid; min-width: 0; gap: 1px; }
.brand-copy strong {
  overflow: hidden;
  color: #0b1830;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-copy small {
  overflow: hidden;
  color: #263750;
  font-size: 11px;
  letter-spacing: .1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.sso-badge, .workspace-footer { color: var(--muted); font-size: 12px; }
.sso-badge { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.status-dot {
  display: inline-block;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(32, 139, 88, .12);
}

main { width: min(1680px, calc(100% - 44px)); margin: 0 auto; }
.auth-gate, .crm-workspace { padding: clamp(30px, 4vw, 52px) 0 62px; }
.auth-gate {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 680px;
  min-height: calc(100vh - 68px);
}
.gate-logo {
  display: block;
  width: min(260px, 72vw);
  height: auto;
  margin: 0 0 26px;
  mix-blend-mode: multiply;
}
.eyebrow {
  margin: 0 0 9px;
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}
h1, h2, p { margin-top: 0; }
h1 {
  max-width: 800px;
  margin-bottom: 14px;
  color: var(--ink-strong);
  font-size: clamp(37px, 5.3vw, 68px);
  font-weight: 850;
  line-height: .98;
  letter-spacing: -.045em;
}
h2 { margin-bottom: 0; color: var(--ink-strong); font-size: 21px; letter-spacing: -.015em; }
.lead { max-width: 680px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.inline-status { min-height: 22px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.inline-status[data-status="error"] { color: #aa3d48; font-weight: 700; }
.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}
.workspace-heading h1 { margin-bottom: 12px; font-size: clamp(37px, 5vw, 58px); }
.workspace-heading .lead { max-width: 690px; margin-bottom: 0; }

.primary-button, .quiet-button {
  min-height: 42px;
  border-radius: 7px;
  padding: 9px 15px;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.primary-button {
  color: #fff;
  border: 1px solid #4d1bc7;
  background: var(--purple);
  box-shadow: 0 9px 20px rgba(101, 43, 255, .24);
  white-space: nowrap;
}
.primary-button:hover, .primary-button:focus-visible {
  border-color: #3f129f;
  background: var(--purple-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(101, 43, 255, .3);
}
.primary-button span { margin-right: 5px; font-size: 18px; line-height: 0; }
.quiet-button {
  color: #263c64;
  border: 1px solid #aebed4;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.quiet-button:hover, .quiet-button:focus-visible {
  color: #102644;
  border-color: #6f82a4;
  background: #eef4ff;
  transform: translateY(-1px);
}

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card, .panel {
  border: 1px solid #d3daf0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.metric-card {
  display: grid;
  min-height: 132px;
  padding: 18px 19px;
  border-top: 4px solid var(--purple);
  background: linear-gradient(180deg, #ffffff, #f8f9ff);
}
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card span { margin-bottom: 14px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.metric-card strong { display: block; margin-bottom: 5px; color: var(--purple-dark); font-size: 34px; line-height: 1; }
.metric-card small { align-self: end; color: var(--muted-light); font-size: 11px; }
.metric-card.accent { border-top-color: #42a62f; }
.metric-card.accent strong { color: #2d8c23; }
.metric-card.warning { border-top-color: var(--gold); }
.metric-card.warning strong { color: var(--gold-dark); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 18px; }
.contacts-panel { grid-column: 1 / -1; }
.panel { min-width: 0; overflow: hidden; scroll-margin-top: 86px; }
.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 25px 17px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfcff);
}
.search-field { display: block; }
.search-field input, input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c7d0e9;
  border-radius: 7px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
}
.search-field input { width: 220px; padding: 9px 12px; }
input, select, textarea { padding: 9px 11px; }
textarea { min-height: 96px; resize: vertical; }
.search-field input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(101, 43, 255, .14);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid #edf0f7; white-space: nowrap; }
th { color: var(--muted); background: #fcfdff; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
td:first-child { padding-left: 25px; color: var(--purple-dark); font-weight: 800; }
th:first-child { padding-left: 25px; }
td:last-child, th:last-child { padding-right: 25px; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: #faf9ff; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.status-pill {
  display: inline-block;
  padding: 5px 8px;
  border: 1px solid #d7d0ff;
  border-radius: 999px;
  color: var(--purple-dark);
  background: var(--purple-pale);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}
.status-pill.at-risk { border-color: #efd58c; color: #9d5c13; background: var(--gold-pale); }
.empty-state { padding: 32px 25px; color: var(--muted); text-align: center; white-space: normal; }
.activity-list { padding: 8px 24px 18px; }
.activity-item { padding: 16px 0; border-bottom: 1px solid #edf0f7; }
.activity-item:last-child { border-bottom: 0; }
.activity-item-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 5px; }
.activity-item strong { color: var(--purple-dark); font-size: 13px; }
.activity-item time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.activity-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px 24px 24px; }
.contact-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfdff;
  box-shadow: 0 2px 6px rgba(19, 26, 76, .04);
}
.contact-card:hover { border-color: #c8c0ff; background: #fbfaff; }
.contact-card strong, .contact-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-card strong { color: var(--purple-dark); font-size: 13px; }
.contact-card span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.workspace-footer { display: flex; align-items: center; gap: 8px; margin: 22px 4px 0; }

/* This is the console's refined Platinum drawer treatment, adapted only for CRM labels. */
.crm-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 18;
  background: rgba(31, 41, 51, .32);
}
.crm-menu-backdrop[hidden], .crm-menu[hidden] { display: none; }
.crm-menu {
  --workspace-nav-ink: #242442;
  --workspace-nav-purple: #5844cc;
  position: fixed;
  inset: 14px auto auto 12px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(392px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  min-height: 0;
  padding: 0;
  border: 1px solid #e3e2f0;
  border-radius: 16px;
  color: var(--workspace-nav-ink);
  background: #fff;
  box-shadow: 0 16px 40px #201b471a, 0 3px 9px #201b470d;
  overflow: hidden;
}
.crm-menu-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 84px;
  padding: 21px 20px 19px;
  border-bottom: 1px solid #e5e2f3;
  background: linear-gradient(120deg, #f6f4ff, #efedfc);
}
.workspace-nav-brand-copy { min-width: 0; }
.workspace-nav-brand-label {
  display: block;
  margin-bottom: 4px;
  color: #66607f;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.3px;
  line-height: 1.4;
  text-transform: uppercase;
}
.crm-menu-heading h2 {
  margin: 0;
  color: var(--workspace-nav-ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.35px;
  line-height: 1.2;
}
.workspace-nav-brand-mark {
  position: relative;
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 43px;
  filter: drop-shadow(0 2px 2px #32295636);
}
.workspace-nav-brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 20deg, #f8f8ff, #9b9aad, #fff, #aaa8c0, #ececfa, #fff);
  clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);
}
.workspace-nav-brand-mark::after {
  content: "PHS";
  position: absolute;
  inset: 3px;
  display: grid;
  place-items: center;
  color: #fff;
  font: 800 11px Arial, sans-serif;
  background: linear-gradient(135deg, #685998, #211743);
  clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);
}
.crm-menu-links {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: none;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.workspace-nav-body {
  min-height: 0;
  padding: 16px 13px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #c9c2e3 transparent;
  scrollbar-width: thin;
}
.crm-menu-copy { margin: 0 12px 18px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.crm-menu-links nav { display: grid; gap: 0; }
.crm-menu-links a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 5px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--workspace-nav-ink);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
  text-decoration: none;
}
.crm-menu-links a:hover, .crm-menu-links a:focus-visible {
  outline: 0;
  background: #f7f6fc;
  color: var(--workspace-nav-purple);
}
.menu-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: #76718e;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
}
.crm-menu-links a:first-child { background: linear-gradient(var(--workspace-nav-purple),var(--workspace-nav-purple)) left center / 3px calc(100% - 18px) no-repeat #f0edff; color: var(--workspace-nav-purple); font-weight: 650; }
.crm-menu-links a:first-child .menu-icon { color: var(--workspace-nav-purple); }
.crm-menu-footer { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 23px 13px 25px; border-top: 1px solid #eae7f3; color: #756f87; background: #faf9fd; font-size: 10px; letter-spacing: .25px; line-height: 1.4; text-align: center; }
.crm-menu #crmMenuClose {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  margin-left: auto;
  padding: 0 0 2px;
  border: 1px solid #dcd7ee;
  border-radius: 8px;
  color: #625c7f;
  background: #ffffffb3;
  box-shadow: 0 2px 4px #30245609;
  transform: none;
}

/* Dialogs use the same white window and neutral surface language as console windows. */
.crm-dialog {
  width: min(560px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
}
.crm-dialog::backdrop { background: rgba(31, 41, 51, .32); }
.crm-dialog form { padding: 24px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 23px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.dialog-close {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0 0 2px;
  border: 1px solid #cfd8e7;
  border-radius: 6px;
  color: var(--muted);
  background: var(--canvas);
  font-size: 23px;
  line-height: 1;
}
.dialog-close:hover, .dialog-close:focus-visible { border-color: #9caecc; color: var(--ink-strong); background: #eef4ff; }
.crm-dialog label { display: grid; gap: 7px; margin-bottom: 15px; color: var(--muted); font-size: 12px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dialog-actions { display: flex; justify-content: end; gap: 10px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid rgba(37, 99, 235, .34); outline-offset: 2px; }

@keyframes menu-enter {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .crm-header { background: Canvas; color: CanvasText; box-shadow: none; }
  .brand-platinum-mark { filter: none; }
  .brand-platinum-mark::before { background: ButtonText; }
  .brand-platinum-mark::after { background: ButtonFace; color: ButtonText; }
  .crm-menu-backdrop { background: Canvas; opacity: .84; }
  .crm-menu, .panel, .metric-card, .crm-dialog { border-color: ButtonText; box-shadow: none; }
  .crm-menu-links a:hover, .crm-menu-links a:focus-visible, .quiet-button:hover { background: Highlight; color: HighlightText; }
}

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .contacts-panel { grid-column: auto; }
}
@media (max-width: 720px) {
  .crm-header { gap: 9px; padding: 0 14px; }
  .brand { gap: 8px; }
  .brand-platinum-mark { flex-basis: 46px; width: 46px; height: 40.94px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { font-size: 9px; }
  .sso-badge { display: none; }
  main { width: min(100% - 28px, 1380px); }
  .workspace-heading { display: block; }
  .workspace-heading .primary-button { margin-top: 18px; }
  .panel-heading { align-items: start; flex-direction: column; padding: 20px; }
  .search-field, .search-field input { width: 100%; }
  .contact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 18px 18px; }
}
@media (max-width: 400px) {
  .crm-menu { inset: 8px auto auto 8px; width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .crm-menu-heading { padding: 18px 15px; gap: 9px; }
  .workspace-nav-brand-label { font-size: 9px; }
  .workspace-nav-body { padding: 13px 10px 8px; }
}
@media (pointer: coarse) {
  .crm-menu-links a, .crm-menu #crmMenuClose { min-height: 44px; }
  .crm-menu #crmMenuClose { min-width: 44px; }
}
@media (max-width: 520px) {
  .metric-grid { gap: 10px; }
  .metric-card { min-height: 116px; padding: 15px; }
  .metric-card strong { font-size: 27px; }
  .contact-list, .form-grid { grid-template-columns: 1fr; }
  .crm-dialog form { padding: 20px; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  th, td { padding-right: 13px; padding-left: 13px; }
  th:first-child, td:first-child { padding-left: 17px; }
  td:last-child, th:last-child { padding-right: 17px; }
}

/* Local CRM product surfaces: the same Platinum shell, with a fuller customer-operations workspace. */
.workspace-actions { display: flex; align-items: center; gap: 10px; }
.demo-notice {
  display: flex; align-items: center; gap: 12px; margin: -7px 0 23px; padding: 11px 14px;
  border: 1px solid #c9d9f4; border-radius: 8px; color: #28446f; background: #eef5ff; font-size: 12px; line-height: 1.45;
}
.demo-badge { flex: 0 0 auto; padding: 4px 7px; border: 1px solid #9ebbe9; border-radius: 999px; color: #1d4ed8; background: #fff; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.metric-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-card.pipeline { border-top-color: #0f766e; }
.metric-card.pipeline strong { color: #0f766e; font-size: 27px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 28px 0 16px; }
.section-heading h2 { font-size: 27px; }
.section-description { max-width: 690px; margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr); gap: 18px; }
.lower-overview-grid { margin-top: 18px; }
.overview-grid > .panel { min-width: 0; }
.panel-count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 99px; color: var(--purple-dark); background: var(--purple-pale); font-size: 12px; font-weight: 900; }
.followup-list, .pipeline-summary { padding: 6px 18px 12px; }
.followup-row, .summary-row { display: flex; align-items: center; width: 100%; gap: 11px; padding: 13px 7px; border: 0; border-bottom: 1px solid #edf0f7; color: var(--ink); background: transparent; text-align: left; }
.followup-row:last-child, .summary-row:last-child { border-bottom: 0; }
.followup-row:hover, .followup-row:focus-visible, .summary-row:hover, .summary-row:focus-visible { border-radius: 7px; background: #f8f7ff; outline: 0; }
.activity-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid #d7d0ff; border-radius: 50%; color: var(--purple-dark); background: var(--purple-pale); font-size: 9px; font-weight: 900; }
.activity-task { color: #9a6200; border-color: #f0dba8; background: #fff9e9; }
.activity-meeting { color: #0f766e; border-color: #b8e3dc; background: #effcf9; }
.followup-copy, .summary-row span { display: grid; min-width: 0; gap: 4px; }
.followup-copy strong, .summary-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.followup-copy small, .summary-row small { color: var(--muted); font-size: 11px; }
.followup-meta { display: grid; justify-items: end; gap: 5px; margin-left: auto; white-space: nowrap; }
.followup-meta small { color: var(--muted); font-size: 10px; }
.summary-row b { margin-left: auto; color: var(--purple-dark); font-size: 13px; white-space: nowrap; }
.filter-panel { display: flex; align-items: end; gap: 14px; padding: 14px 17px; margin-bottom: 16px; }
.wide-search { flex: 1 1 360px; }
.wide-search input { width: 100%; }
.select-field { display: grid; min-width: 140px; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.select-field select { min-width: 140px; }
.filter-result { margin-left: auto; padding-bottom: 11px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.table-panel { overflow: hidden; }
.data-table th, .data-table td { padding-top: 15px; padding-bottom: 15px; }
.data-table td:first-child { min-width: 230px; }
.row-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.inline-action { padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 6px; color: var(--purple-dark); background: #fff; font-size: 10px; font-weight: 800; }
.inline-action:hover, .inline-action:focus-visible { border-color: #aaa0f3; background: #f8f7ff; outline: 0; }
.inline-action.complete-action { color: #166534; border-color: #b7e1c0; background: #f4fff6; }
.inline-action:disabled { cursor: wait; opacity: .55; }
.completed-label { color: var(--muted); font-size: 10px; font-weight: 800; }
.table-link { display: block; padding: 0; border: 0; color: var(--purple-dark); background: transparent; font-weight: 850; text-align: left; }
.table-link:hover, .table-link:focus-visible { color: #4d1bc7; text-decoration: underline; outline: 0; }
.table-subtext { display: block; max-width: 320px; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.count-badge { display: inline-grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 999px; color: var(--muted); background: #f1f4f8; font-size: 11px; font-weight: 800; }
.count-badge.has-open { color: #9a6200; background: #fff2c9; }
.status-pill, .priority-pill { white-space: nowrap; }
.status-active { color: #166534; border-color: #b7e1c0; background: #ecfdf3; }
.status-customer { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.status-prospect { color: #6d28d9; border-color: #ddd6fe; background: #f5f3ff; }
.status-at-risk { color: #a16207; border-color: #fde68a; background: #fffbeb; }
.status-inactive { color: #64748b; border-color: #cbd5e1; background: #f8fafc; }
.priority-pill { display: inline-block; padding: 4px 7px; border-radius: 999px; color: #64748b; background: #f1f5f9; font-size: 10px; font-weight: 800; }
.priority-urgent { color: #b42318; background: #fff1f0; }
.priority-high { color: #9a3412; background: #fff7ed; }
.priority-normal { color: #315b96; background: #eff6ff; }
.priority-low { color: #64748b; background: #f1f5f9; }
.contact-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.directory-contact { display: flex; align-items: center; min-width: 0; gap: 13px; padding: 16px; border: 1px solid #d3daf0; border-radius: 10px; color: var(--ink); background: #fff; box-shadow: var(--shadow); text-align: left; }
.directory-contact:hover, .directory-contact:focus-visible { border-color: #aaa0f3; background: #fbfaff; outline: 0; transform: translateY(-1px); }
.contact-avatar { display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 39px; border: 1px solid #c8d7fb; border-radius: 50%; color: var(--purple-dark); background: #eef4ff; font-size: 11px; font-weight: 900; }
.contact-avatar.large { width: 58px; height: 58px; font-size: 15px; }
.directory-contact-copy { display: grid; min-width: 0; gap: 4px; }
.directory-contact-copy strong { overflow: hidden; color: var(--ink-strong); text-overflow: ellipsis; white-space: nowrap; }
.directory-contact-copy small, .directory-contact-meta small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.directory-contact-meta { display: grid; justify-items: end; min-width: 0; gap: 4px; margin-left: auto; }
.pipeline-total { display: flex; align-items: baseline; gap: 15px; margin-bottom: 17px; padding: 16px 19px; border: 1px solid #c9d9f4; border-radius: 10px; background: linear-gradient(110deg, #eef5ff, #f9fbff); }
.pipeline-total span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pipeline-total strong { color: var(--purple-dark); font-size: 28px; }
.pipeline-total small { color: var(--muted); font-size: 11px; }
.pipeline-board { display: grid; grid-template-columns: repeat(5, minmax(185px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.pipeline-column { min-height: 270px; border: 1px solid #d3daf0; border-radius: 10px; background: #f9fbff; }
.pipeline-column-heading { padding: 15px 13px 11px; border-bottom: 1px solid #e1e7f2; }
.pipeline-column-heading div { display: flex; justify-content: space-between; gap: 7px; align-items: baseline; }
.pipeline-column-heading span { color: var(--ink-strong); font-size: 12px; font-weight: 850; }
.pipeline-column-heading small { color: var(--muted); font-size: 10px; text-align: right; }
.opportunity-list { display: grid; gap: 9px; padding: 10px; }
.opportunity-card { display: grid; gap: 10px; padding: 12px; border: 1px solid #dbe3f1; border-radius: 8px; color: var(--ink); background: #fff; box-shadow: 0 4px 10px rgba(15,23,42,.05); text-align: left; }
.opportunity-card:hover, .opportunity-card:focus-visible { border-color: #aba0ee; background: #fbfaff; outline: 0; transform: translateY(-1px); }
.opportunity-card-top, .opportunity-card-bottom { display: grid; gap: 4px; }
.opportunity-card-top strong { color: var(--ink-strong); font-size: 12px; line-height: 1.35; }
.opportunity-card-top span, .opportunity-card-bottom small { color: var(--muted); font-size: 10px; }
.opportunity-card-value { color: var(--purple-dark); font-size: 17px; font-weight: 900; }
.opportunity-card-bottom { grid-template-columns: 1fr; border-top: 1px solid #edf0f7; padding-top: 8px; }
.report-period { color: var(--muted); font-size: 12px; }
.report-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.report-kpi { display: grid; gap: 6px; padding: 17px 18px; border: 1px solid #d7def0; border-top: 3px solid #6450f5; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.report-kpi.accent { border-top-color: #2563eb; }
.report-kpi.warning { border-top-color: #d99a00; }
.report-kpi span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.report-kpi strong { color: var(--purple-dark); font-size: 24px; }
.report-kpi small { color: var(--muted); font-size: 11px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.report-card { min-width: 0; }
.bar-list { display: grid; gap: 15px; padding: 20px 24px 23px; }
.bar-row { display: grid; gap: 6px; }
.bar-row > div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.bar-row b { color: var(--ink-strong); }
.bar-track { display: block; height: 8px; overflow: hidden; border-radius: 99px; background: #edf1f7; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6b4eff, #2563eb); }
.report-followups { display: grid; gap: 0; padding: 8px 20px 13px; }
.report-followup { display: grid; gap: 5px; padding: 12px 4px; border: 0; border-bottom: 1px solid #edf0f7; color: var(--ink); background: transparent; text-align: left; }
.report-followup:hover, .report-followup:focus-visible { background: #faf9ff; outline: 0; }
.report-followup strong { font-size: 12px; }
.report-followup small { color: var(--muted); font-size: 11px; }
.detail-dialog { width: min(760px, calc(100% - 30px)); }
.dialog-heading-actions { display: flex; align-items: center; gap: 8px; }
.dialog-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.detail-summary { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 10px; margin-bottom: 23px; }
.detail-summary > div { display: grid; gap: 5px; padding: 13px; border: 1px solid #e1e7f2; border-radius: 8px; background: #f9fbff; }
.detail-summary strong { color: var(--ink-strong); font-size: 15px; }
.detail-summary small { color: var(--muted); font-size: 10px; }
.detail-section { margin-top: 22px; }
.detail-section-heading { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.detail-section-heading span { color: var(--muted); font-size: 12px; }
.detail-copy { color: var(--muted); font-size: 13px; line-height: 1.6; }
.detail-list-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid #edf0f7; color: var(--ink); background: transparent; text-align: left; }
.detail-list-row:hover, .detail-list-row:focus-visible { color: var(--purple-dark); outline: 0; }
.detail-list-row strong { font-size: 12px; }
.detail-list-row span { color: var(--muted); font-size: 11px; }
.detail-list-row.static:hover { color: var(--ink); }
.contact-profile { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.contact-profile div { display: grid; gap: 5px; }
.contact-profile strong { color: var(--ink-strong); font-size: 17px; }
.contact-profile small { color: var(--muted); font-size: 12px; }
.detail-contact-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.detail-contact-fields span { display: grid; gap: 5px; padding: 12px; border: 1px solid #e1e7f2; border-radius: 8px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.detail-contact-fields b { color: var(--ink-strong); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.detail-inline-link { padding: 0; border: 0; color: var(--purple-dark); background: transparent; font: inherit; text-align: left; text-decoration: underline; text-decoration-color: #c8d4f2; text-underline-offset: 2px; }
.crm-menu-links a:first-child { background: transparent; color: var(--workspace-nav-ink); font-weight: 550; }
.crm-menu-links a.is-active { background: linear-gradient(var(--workspace-nav-purple),var(--workspace-nav-purple)) left center / 3px calc(100% - 18px) no-repeat #f0edff; color: var(--workspace-nav-purple); font-weight: 650; }
.crm-menu-links a.is-active .menu-icon { color: var(--workspace-nav-purple); }

@media (max-width: 1250px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline-board { grid-template-columns: repeat(5, minmax(220px, 1fr)); }
}
@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid, .report-grid { grid-template-columns: 1fr; }
  .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-directory { grid-template-columns: 1fr; }
  .filter-panel { align-items: stretch; flex-wrap: wrap; }
  .filter-result { margin-left: 0; padding-bottom: 0; }
}
@media (max-width: 620px) {
  .workspace-actions { align-items: stretch; flex-direction: column-reverse; }
  .workspace-actions button { width: 100%; }
  .demo-notice { align-items: start; flex-direction: column; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading button { width: 100%; }
  .detail-summary, .detail-contact-fields { grid-template-columns: 1fr; }
  .directory-contact { align-items: start; flex-wrap: wrap; }
  .directory-contact-meta { width: 100%; margin-left: 52px; justify-items: start; }
}
