/* Dashboard 1.102.0 — CRM-native blue, semantic signals and responsive detail.
   Inspired by reference composition, never by its purple branding. All visual
   proportions are derived from live counts already returned by the CRM. */
#dashboard-view.dashboard-studio {
  --crm-ink:#0e2166;
  --crm-primary:#0b7ff0;
  --crm-primary-dark:#096fd2;
  --crm-soft:#eaf5ff;
  --crm-teal:#1da59a;
  --crm-positive:#169b69;
  --crm-warning:#b77913;
  --crm-danger:#d94e5b;
  --ref-purple:var(--crm-primary);
  --ref-purple-deep:var(--crm-primary-dark);
  --ref-lilac:#80baf1;
  --ref-ink:#1f2a44;
  --ref-border:#e0e8f2;
  --ref-shadow:0 10px 30px rgba(14,33,102,.045),0 2px 8px rgba(14,33,102,.018);
  background:#f3f6fb;
}
#signed-in.app-shell:has(#dashboard-view:not([hidden])) .app-content { background:#f3f6fb; }
#signed-in.app-shell:has(#dashboard-view:not([hidden])) .app-topbar #account-menu-toggle .account-toggle__avatar {
  background:#eaf5ff!important;border-color:#d1e7fc;color:#0b7ff0!important;
}
#signed-in.app-shell:has(#dashboard-view:not([hidden])) .app-topbar #account-menu-toggle:hover {
  background:#f2f8ff!important;border-color:#cde5fb!important;
}
#dashboard-view.dashboard-studio .dashboard-welcome h1,
#dashboard-view.dashboard-studio .dashboard-section-heading h2,
#dashboard-view.dashboard-studio .dashboard-section-heading--inverse h2 { color:#0e2166; }
#dashboard-view.dashboard-studio #dashboard-refresh {
  background:#0b7ff0;border-color:#0b7ff0;
  box-shadow:0 8px 20px rgba(11,127,240,.16);
}
#dashboard-view.dashboard-studio #dashboard-refresh:hover { background:#096fd2;border-color:#096fd2; }
#dashboard-view.dashboard-studio .dashboard-quick-actions__btn,
#dashboard-view.dashboard-studio #dashboard-new-task.dashboard-quick-actions__btn--task-refined,
#dashboard-view.dashboard-studio #dashboard-new-activity.dashboard-quick-actions__btn--activity {
  background:#fff!important;border-color:#dfebf6!important;
  box-shadow:var(--ref-shadow)!important;
}
#dashboard-view.dashboard-studio .dashboard-quick-actions__icon,
#dashboard-view.dashboard-studio #dashboard-new-task .dashboard-quick-actions__icon,
#dashboard-view.dashboard-studio #dashboard-new-activity .dashboard-quick-actions__icon {
  background:#0b7ff0!important;color:#fff;
}
#dashboard-view.dashboard-studio .dashboard-quick-actions__label { color:#0e2166; }
#dashboard-view.dashboard-studio .dashboard-quick-actions__btn:hover,
#dashboard-view.dashboard-studio .dashboard-quick-actions__btn:focus-visible {
  border-color:#9acdf8!important;
  box-shadow:0 12px 26px rgba(11,127,240,.095)!important;
}

/* Operational cards have denser information, accessible state chips, and
   real proportional mini-bars for the three task counts. */
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card,
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--open,
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--overdue,
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--activities {
  gap:10px;min-height:156px;padding:18px;
  border-color:#e1e9f3;background:#fff;
}
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card__title { color:#172b47; }
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card__value,
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--open .dashboard-metric-card__value {
  color:#0e2166;font-variant-numeric:tabular-nums;
}
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--overdue .dashboard-metric-card__value { color:#d94e5b; }
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-card-icon {
  background:#eaf5ff;color:#0b7ff0;
}
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--today .dashboard-card-icon { background:#fff5df;color:#b77913; }
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--overdue .dashboard-card-icon { background:#fff0f1;color:#d94e5b; }
#dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--activities .dashboard-card-icon { background:#e9f8f4;color:#159a7c; }
#dashboard-view.dashboard-studio .studio-metric-footer {
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  min-width:0;margin-top:auto;
}
#dashboard-view.dashboard-studio .studio-metric-status {
  display:inline-flex;align-items:center;gap:7px;min-width:0;
  color:#65758a;font-size:11px;font-weight:650;line-height:1.35;
}
#dashboard-view.dashboard-studio .studio-metric-status::before {
  content:"";width:7px;height:7px;flex:0 0 7px;border-radius:50%;
  background:#70addf;box-shadow:0 0 0 3px #edf6fe;
}
#dashboard-view.dashboard-studio .studio-metric-status--success { color:#21865e; }
#dashboard-view.dashboard-studio .studio-metric-status--success::before { background:#1fa476;box-shadow:0 0 0 3px #e2f6ec; }
#dashboard-view.dashboard-studio .studio-metric-status--warning { color:#a97518; }
#dashboard-view.dashboard-studio .studio-metric-status--warning::before { background:#e2a33b;box-shadow:0 0 0 3px #fff1d6; }
#dashboard-view.dashboard-studio .studio-metric-status--danger { color:#bc4551; }
#dashboard-view.dashboard-studio .studio-metric-status--danger::before { background:#dc5962;box-shadow:0 0 0 3px #ffebed; }
#dashboard-view.dashboard-studio .studio-metric-link { color:#0b7ff0;font-size:12px;font-weight:730;white-space:nowrap; }
#dashboard-view.dashboard-studio .studio-metric-track {
  display:block;width:100%;height:5px;min-height:5px;
  background:#edf3fa;border-radius:999px;overflow:hidden;
}
#dashboard-view.dashboard-studio .studio-metric-track__fill {
  display:block;width:var(--studio-metric-share,0%);height:100%;
  background:linear-gradient(90deg,#0b7ff0,#69c8ff);
  border-radius:inherit;transform-origin:left;
  animation:crm-dash-progress .7s cubic-bezier(.22,.83,.25,1) both;
}
#dashboard-view.dashboard-studio .dashboard-metric-card--today .studio-metric-track__fill { background:linear-gradient(90deg,#dc9d29,#f2cc6d); }
#dashboard-view.dashboard-studio .dashboard-metric-card--overdue .studio-metric-track__fill { background:linear-gradient(90deg,#d94e5b,#f48a8f); }
#dashboard-view.dashboard-studio .dashboard-workspace button.dashboard-metric-card:hover:not(:disabled),
#dashboard-view.dashboard-studio .dashboard-workspace button.dashboard-metric-card:focus-visible {
  border-color:#a9d7f8;background:#fff;box-shadow:0 16px 33px rgba(11,91,169,.095);
}
#dashboard-view.dashboard-studio .dashboard-workspace button.dashboard-metric-card:hover .dashboard-card-icon { background:#dcefff; }
#dashboard-view.dashboard-studio .dashboard-workspace button.dashboard-metric-card:hover .studio-metric-track__fill { filter:brightness(1.1); }
#dashboard-view.dashboard-studio .studio-workload-chart:not([hidden]) { border-color:#e0e8f2; }
#dashboard-view.dashboard-studio .studio-workload-chart__readout-value { color:#0b7ff0; }
#dashboard-view.dashboard-studio .studio-workload-chart__area { fill:#eaf5ff; }
#dashboard-view.dashboard-studio .studio-workload-chart__line { stroke:#0b7ff0;stroke-width:4; }
#dashboard-view.dashboard-studio .studio-workload-chart__marker { stroke:#fff;fill:#67b4f5; }
#dashboard-view.dashboard-studio .studio-workload-chart__marker.is-active { fill:#0b7ff0;stroke:#d5ebff; }
#dashboard-view.dashboard-studio .studio-workload-chart__selector { background:#f8fbff; }
#dashboard-view.dashboard-studio .studio-workload-chart__selector[aria-pressed="true"],
#dashboard-view.dashboard-studio .studio-workload-chart__selector:hover {
  color:#0a5ea9;background:#eaf5ff;border-color:#cae4fa;
}

/* The portfolio has ONE source of truth: an interactive donut and the two
   actual values immediately beneath it. Duplicate counter tiles are hidden
   at every breakpoint (they remain in the DOM for compatibility). */
#dashboard-view.dashboard-studio .dashboard-canvas > .dashboard-section--portfolio {
  display:flex!important;flex-direction:column!important;align-items:center!important;
  justify-content:center!important;gap:20px!important;
  min-width:0;min-height:0;padding:27px;
  background:#fff;border-color:#e0e8f2;
}
#dashboard-view.dashboard-studio .dashboard-section--portfolio .dashboard-section-heading {
  display:flex;align-self:stretch;width:100%;margin:0;
}
#dashboard-view.dashboard-studio .dashboard-section--portfolio .dashboard-counters { display:none!important; }
#dashboard-view.dashboard-studio .dashboard-section--portfolio .dashboard-portfolio-comparison {
  display:flex!important;flex-direction:column!important;align-items:center!important;
  justify-content:center!important;gap:20px!important;
  grid-column:auto!important;grid-row:auto!important;
  width:100%!important;max-width:660px!important;
  min-width:0;margin:0 auto!important;padding:0!important;
}
#dashboard-view.dashboard-studio .studio-portfolio-unavailable {
  margin:10px 0;padding:18px 20px;border:1px dashed #bbd8f1;
  border-radius:14px;background:#f6fbff;color:#55708f;
  font-size:14px;text-align:center;
}
#dashboard-view.dashboard-studio .studio-portfolio-donut {
  width:clamp(170px,17vw,218px)!important;aspect-ratio:1;
  background:conic-gradient(from -90deg,
    #0b7ff0 0 var(--studio-company-stop),
    #fff var(--studio-company-stop) var(--studio-lead-start),
    #22a7a0 var(--studio-lead-start) 100%);
  box-shadow:0 18px 35px rgba(21,104,173,.09),inset 0 0 0 1px #dceefb;
  transition:transform .28s cubic-bezier(.2,.8,.2,1),box-shadow .28s;
}
#dashboard-view.dashboard-studio .studio-portfolio-donut::before {
  inset:17%;background:#fff;box-shadow:inset 0 0 0 1px #e7eff7;
}
#dashboard-view.dashboard-studio .studio-portfolio-donut:hover {
  transform:scale(1.035);box-shadow:0 22px 42px rgba(21,104,173,.14);
}
#dashboard-view.dashboard-studio .studio-portfolio-donut__amount { color:#0e2166;font-size:clamp(34px,3.6vw,51px);font-variant-numeric:tabular-nums; }
#dashboard-view.dashboard-studio .studio-portfolio-donut__caption { color:#60718d;font-size:12px; }
#dashboard-view.dashboard-studio .studio-portfolio-donut__microcopy {
  margin-top:6px;padding:5px 8px;border-radius:99px;
  background:#eff7ff;color:#0c71c9;font-size:10px;font-weight:750;
}
#dashboard-view.dashboard-studio .studio-portfolio-donut__legend {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px;width:100%!important;max-width:600px!important;
}
#dashboard-view.dashboard-studio .studio-portfolio-donut__category {
  display:grid;gap:10px;min-width:0;min-height:103px;
  padding:16px 18px;background:#f9fbfe;border:1px solid #e0e9f4;
  border-radius:17px;box-shadow:none;
  transition:background .2s,border-color .2s,transform .2s,box-shadow .2s;
}
#dashboard-view.dashboard-studio .studio-portfolio-donut__category-name { color:#33445d;font-size:13px;font-weight:740; }
#dashboard-view.dashboard-studio .studio-portfolio-donut__category-name::before { background:#0b7ff0; }
#dashboard-view.dashboard-studio .studio-portfolio-donut__category--leads .studio-portfolio-donut__category-name::before { background:#22a7a0; }
#dashboard-view.dashboard-studio .studio-portfolio-donut__category-stats strong { color:#0e2166;font-size:26px;font-variant-numeric:tabular-nums; }
#dashboard-view.dashboard-studio .studio-portfolio-donut__category-stats small { color:#6d7e94;font-weight:700; }
#dashboard-view.dashboard-studio .studio-portfolio-donut__category-track {
  display:block;width:100%;height:5px;background:#e7eef7;
  border-radius:99px;overflow:hidden;
}
#dashboard-view.dashboard-studio .studio-portfolio-donut__category-fill {
  display:block;width:var(--studio-category-share,0%);height:100%;
  background:#0b7ff0;border-radius:inherit;
  transform-origin:left;animation:crm-dash-progress .75s ease both;
}
#dashboard-view.dashboard-studio .studio-portfolio-donut__category--leads .studio-portfolio-donut__category-fill { background:#22a7a0; }
#dashboard-view.dashboard-studio .studio-portfolio-donut__category:hover,
#dashboard-view.dashboard-studio .studio-portfolio-donut__category[aria-pressed="true"] {
  background:#f0f8ff;border-color:#a8d7f8;
  transform:translateY(-2px);box-shadow:0 10px 22px rgba(11,104,195,.075);
}
#dashboard-view.dashboard-studio .studio-portfolio-donut__category--leads:hover,
#dashboard-view.dashboard-studio .studio-portfolio-donut__category--leads[aria-pressed="true"] {
  background:#effaf8;border-color:#a9ded8;
}
#dashboard-view.dashboard-studio .studio-portfolio-donut__category:focus-visible { outline:3px solid #8dccfa;outline-offset:2px; }

/* Release notes show exactly which change was a fix and which an improvement.
   Each category arrives from the role-filtered backend catalog. */
#dashboard-view.dashboard-studio .dashboard-analytics > .dashboard-quick-card--changelog {
  background:#fff;border:1px solid #e0e8f2;overflow:hidden;
}
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__header {
  background:linear-gradient(140deg,#ecf7ff,#e6f2fe)!important;
}
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__header::after { border-color:rgba(30,132,215,.12); }
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__title { color:#0e2166!important; }
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__visual { background:#d9edff;color:#0b7ff0;border:0; }
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__version {
  color:#0b67b5;background:#d2e9fc;
}
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__date { color:#657d95; }
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .studio-changelog-body { padding:20px 23px 9px; }
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__list {
  display:grid;gap:10px;
}
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__list .studio-changelog-item {
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;
  max-width:none;margin:0;padding:13px 15px;
  border:1px solid #edf1f7;border-radius:14px;
  background:#fcfdff;color:#39475d;font-size:13px;line-height:1.5;
  transition:border-color .2s,background .2s,transform .2s;
}
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__list .studio-changelog-item::before { display:none; }
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__list .studio-changelog-item:hover {
  background:#f6fbff;border-color:#c9e5fa;transform:translateX(3px);
}
#dashboard-view.dashboard-studio .studio-changelog-badge {
  display:inline-flex;align-items:center;gap:5px;padding:4px 9px;
  border:1px solid #cce6fc;border-radius:99px;background:#eaf5ff;
  color:#0b69b6;font-size:10px;font-weight:800;letter-spacing:.02em;white-space:nowrap;
}
#dashboard-view.dashboard-studio .studio-changelog-badge--bugfix {
  background:#e8f8ef;border-color:#bcebd2;color:#138253;
}
#dashboard-view.dashboard-studio .studio-changelog-badge--update {
  background:#f3f6fa;border-color:#e1e7ef;color:#657489;
}
#dashboard-view.dashboard-studio .studio-changelog-item__text { color:#46566d;font-size:13px;overflow-wrap:anywhere; }
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__more {
  color:#0b68b6;background:#e8f4fe;
}
#dashboard-view.dashboard-studio .dashboard-quick-card--changelog:hover .dashboard-quick-card__more { background:#d7ecfb; }

/* The other modules remain white; semantic accents do not replace CRM blue. */
#dashboard-view.dashboard-studio .dashboard-analytics > .dashboard-business-card,
#dashboard-view.dashboard-studio .dashboard-analytics > .dashboard-quick-card { border-color:#e0e8f2; }
#dashboard-view.dashboard-studio .dashboard-business-card .insight-card__title,
#dashboard-view.dashboard-studio .dashboard-quick-card__title { color:#0e2166!important; }
#dashboard-view.dashboard-studio .studio-opportunity-mark,
#dashboard-view.dashboard-studio .dashboard-quick-card__visual { color:#0b7ff0;background:#eaf5ff; }
#dashboard-view.dashboard-studio .studio-opportunity-number { color:#0e2166; }
#dashboard-view.dashboard-studio .studio-opportunity-gauge {
  background:conic-gradient(#0b7ff0 var(--studio-gauge-current),#e7f1fb var(--studio-gauge-current));
}
#dashboard-view.dashboard-studio .dashboard-business-card .dashboard-opportunity-progress { background:#e7eff7; }
#dashboard-view.dashboard-studio .dashboard-opportunity-progress > span { background:linear-gradient(90deg,#0b7ff0,#66c1f3); }
#dashboard-view.dashboard-studio .studio-note-row__number,
#dashboard-view.dashboard-studio .studio-guide-tile__number,
#dashboard-view.dashboard-studio .studio-guide-tile .dashboard-quick-card__item-title,
#dashboard-view.dashboard-studio .studio-guide-tile__launch { color:#0b7ff0; }
#dashboard-view.dashboard-studio .dashboard-quick-card--guides .studio-guide-tile.dashboard-quick-card__item { border-color:#dfeaf6;background:#f7fbff; }
#dashboard-view.dashboard-studio .dashboard-team-kpis__heading::before { background:#0b7ff0; }
#dashboard-view.dashboard-studio .dashboard-daily-widgets .dashboard-card-icon,
#dashboard-view.dashboard-studio .dashboard-daily-widgets .dashboard-metric-card--pill .dashboard-card-icon { color:#0b7ff0;background:#eaf5ff; }
#dashboard-view.dashboard-studio .dashboard-daily-widgets .dashboard-date__day { color:#0e2166; }
#dashboard-view.dashboard-studio .studio-daily-controls__tab[aria-pressed="true"] { color:#0a66b8;background:#eaf5ff;border-color:#d8ebfc; }
#dashboard-view.dashboard-studio .studio-daily-controls__arrow { color:#0b7ff0;border-color:#dbe8f5; }
#dashboard-view.dashboard-studio .studio-daily-controls__arrow:hover { background:#eaf5ff; }
#dashboard-view.dashboard-studio .studio-daily-controls button:focus-visible { outline-color:#8eccfa; }

@keyframes crm-dash-progress {
  from { transform:scaleX(0);opacity:.65; }
  to { transform:scaleX(1);opacity:1; }
}
@media(max-width:850px) {
  #dashboard-view.dashboard-studio .dashboard-canvas > .dashboard-section--portfolio {
    grid-column:1/-1!important;
    width:100%!important;max-width:100%!important;
  }
  #dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__header { background:#eaf5ff!important; }
}
@media(max-width:620px) {
  #dashboard-view.dashboard-studio .dashboard-canvas > .dashboard-section--portfolio { padding:23px 18px!important; }
  #dashboard-view.dashboard-studio .dashboard-section--portfolio .dashboard-portfolio-comparison { gap:20px!important; }
  #dashboard-view.dashboard-studio .studio-portfolio-donut { width:min(60vw,215px)!important; }
  #dashboard-view.dashboard-studio .studio-portfolio-donut__legend { grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px; }
  #dashboard-view.dashboard-studio .studio-portfolio-donut__category { padding:14px 12px;min-height:105px; }
  #dashboard-view.dashboard-studio .studio-portfolio-donut__category-stats strong { font-size:23px; }
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-widgets { gap:11px; }
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-widgets > .dashboard-metric-card,
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-widgets > .dashboard-metric-card--open,
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-widgets > .dashboard-metric-card--today,
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-widgets > .dashboard-metric-card--overdue,
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-widgets > .dashboard-metric-card--activities {
    grid-column:1/-1!important;min-height:139px!important;
    padding:17px 18px!important;gap:7px!important;
  }
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card__value,
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--open .dashboard-metric-card__value { font-size:clamp(35px,10vw,45px); }
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--activities { display:flex;flex-direction:column; }
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--activities .dashboard-metric-card__value-row { grid-column:auto;grid-row:auto;justify-content:flex-start; }
  #dashboard-view.dashboard-studio .dashboard-workspace .dashboard-metric-card--activities .dashboard-metric-card__meta { display:none; }
  #dashboard-view.dashboard-studio .dashboard-analytics > .dashboard-quick-card--changelog { display:flex!important;flex-direction:column!important; }
  #dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__header {
    display:flex;flex-direction:column;gap:12px;
    padding:19px!important;
  }
  #dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__header .dashboard-quick-card__visual { position:absolute;right:17px;top:17px; }
  #dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__title { padding-right:40px; }
  #dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__release { display:flex;gap:9px;flex-wrap:wrap; }
  #dashboard-view.dashboard-studio .dashboard-quick-card--changelog .studio-changelog-body { padding:16px 17px 6px; }
  #dashboard-view.dashboard-studio .dashboard-quick-card--changelog .dashboard-quick-card__list .studio-changelog-item { padding:12px; }
  #dashboard-view.dashboard-studio .studio-changelog-item__text { font-size:12px; }
}
@media(max-width:360px) {
  #dashboard-view.dashboard-studio .studio-portfolio-donut__legend { grid-template-columns:1fr!important; }
}
@media(prefers-reduced-motion:reduce) {
  #dashboard-view.dashboard-studio .studio-metric-track__fill,
  #dashboard-view.dashboard-studio .studio-portfolio-donut__category-fill { animation:none!important; }
  #dashboard-view.dashboard-studio .studio-portfolio-donut:hover { transform:none; }
}
